diff --git a/doc/Eqs/pair_meam_spline.jpg b/doc/Eqs/pair_meam_spline.jpg new file mode 100644 index 000000000..7efcd076d Binary files /dev/null and b/doc/Eqs/pair_meam_spline.jpg differ diff --git a/doc/Eqs/pair_meam_spline.tex b/doc/Eqs/pair_meam_spline.tex new file mode 100644 index 000000000..55d42f801 --- /dev/null +++ b/doc/Eqs/pair_meam_spline.tex @@ -0,0 +1,13 @@ +\documentclass[12pt]{article} + +\begin{document} + +$$ + E=\sum_{ij}\phi(r_{ij})+\sum_{i}U(\rho_{i}), +$$ + +$$ + \rho_{i}=\sum_{j}\rho(r_{ij})+\sum_{jk}f(r_{ij})f(r_{ik})g[\cos(\theta_{jik})] +$$ + +\end{document} diff --git a/doc/Eqs/pair_meam_spline_1.png b/doc/Eqs/pair_meam_spline_1.png deleted file mode 100644 index 4849be9df..000000000 Binary files a/doc/Eqs/pair_meam_spline_1.png and /dev/null differ diff --git a/doc/Eqs/pair_meam_spline_2.png b/doc/Eqs/pair_meam_spline_2.png deleted file mode 100644 index 479b77b5b..000000000 Binary files a/doc/Eqs/pair_meam_spline_2.png and /dev/null differ diff --git a/doc/Manual.pdf b/doc/Manual.pdf index 41d74ec2f..5d98d7beb 100644 Binary files a/doc/Manual.pdf and b/doc/Manual.pdf differ diff --git a/doc/Section_commands.html b/doc/Section_commands.html index 48e2bfa0d..f825048ee 100644 --- a/doc/Section_commands.html +++ b/doc/Section_commands.html @@ -1,633 +1,634 @@ <HTML> <CENTER><A HREF = "Section_start.html">Previous Section</A> - <A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> - <A HREF = "Section_packages.html">Next Section</A> </CENTER> <HR> <H3>3. Commands </H3> <P>This section describes how a LAMMPS input script is formatted and the input script commands used to define a LAMMPS simulation. </P> 3.1 <A HREF = "#cmd_1">LAMMPS input script</A><BR> 3.2 <A HREF = "#cmd_2">Parsing rules</A><BR> 3.3 <A HREF = "#cmd_3">Input script structure</A><BR> 3.4 <A HREF = "#cmd_4">Commands listed by category</A><BR> 3.5 <A HREF = "#cmd_5">Commands listed alphabetically</A> <BR> <HR> <HR> <A NAME = "cmd_1"></A><H4>3.1 LAMMPS input script </H4> <P>LAMMPS executes by reading commands from a input script (text file), one line at a time. When the input script ends, LAMMPS exits. Each command causes LAMMPS to take some action. It may set an internal variable, read in a file, or run a simulation. Most commands have default settings, which means you only need to use the command if you wish to change the default. </P> <P>In many cases, the ordering of commands in an input script is not important. However the following rules apply: </P> <P>(1) LAMMPS does not read your entire input script and then perform a simulation with all the settings. Rather, the input script is read one line at a time and each command takes effect when it is read. Thus this sequence of commands: </P> <PRE>timestep 0.5 run 100 run 100 </PRE> <P>does something different than this sequence: </P> <PRE>run 100 timestep 0.5 run 100 </PRE> <P>In the first case, the specified timestep (0.5 fmsec) is used for two simulations of 100 timesteps each. In the 2nd case, the default timestep (1.0 fmsec) is used for the 1st 100 step simulation and a 0.5 fmsec timestep is used for the 2nd one. </P> <P>(2) Some commands are only valid when they follow other commands. For example you cannot set the temperature of a group of atoms until atoms have been defined and a group command is used to define which atoms belong to the group. </P> <P>(3) Sometimes command B will use values that can be set by command A. This means command A must precede command B in the input script if it is to have the desired effect. For example, the <A HREF = "read_data.html">read_data</A> command initializes the system by setting up the simulation box and assigning atoms to processors. If default values are not desired, the <A HREF = "processors.html">processors</A> and <A HREF = "boundary.html">boundary</A> commands need to be used before read_data to tell LAMMPS how to map processors to the simulation box. </P> <P>Many input script errors are detected by LAMMPS and an ERROR or WARNING message is printed. <A HREF = "Section_errors.html">This section</A> gives more information on what errors mean. The documentation for each command lists restrictions on how the command can be used. </P> <HR> <A NAME = "cmd_2"></A><H4>3.2 Parsing rules </H4> <P>Each non-blank line in the input script is treated as a command. LAMMPS commands are case sensitive. Command names are lower-case, as are specified command arguments. Upper case letters may be used in file names or user-chosen ID strings. </P> <P>Here is how each line in the input script is parsed by LAMMPS: </P> <P>(1) If the last printable character on the line is a "&" character (with no surrounding quotes), the command is assumed to continue on the next line. The next line is concatenated to the previous line by removing the "&" character and newline. This allows long commands to be continued across two or more lines. </P> <P>(2) All characters from the first "#" character onward are treated as comment and discarded. See an exception in (6). Note that a comment after a trailing "&" character will prevent the command from continuing on the next line. Also note that for multi-line commands a single leading "#" will comment out the entire command. </P> <P>(3) The line is searched repeatedly for $ characters, which indicate variables that are replaced with a text string. See an exception in (6). If the $ is followed by curly brackets, then the variable name is the text inside the curly brackets. If no curly brackets follow the $, then the variable name is the single character immediately following the $. Thus ${myTemp} and $x refer to variable names "myTemp" and "x". See the <A HREF = "variable.html">variable</A> command for details of how strings are assigned to variables and how they are substituted for in input script commands. </P> <P>(4) The line is broken into "words" separated by whitespace (tabs, spaces). Note that words can thus contain letters, digits, underscores, or punctuation characters. </P> <P>(5) The first word is the command name. All successive words in the line are arguments. </P> <P>(6) If you want text with spaces to be treated as a single argument, it can be enclosed in either double or single quotes. E.g. </P> <PRE>print "Volume = $v" print 'Volume = $v' </PRE> <P>The quotes are removed when the single argument is stored internally. See the <A HREF = "dump_modify.html">dump modify format</A> or <A HREF = "if.html">if</A> commands for examples. A "#" or "$" character that is between quotes will not be treated as a comment indicator in (2) or substituted for as a variable in (3). </P> <P>IMPORTANT NOTE: If the argument is itself a command that requires a quoted argument (e.g. using a <A HREF = "print.html">print</A> command as part of an <A HREF = "if.html">if</A> or <A HREF = "run.html">run every</A> command), then the double and single quotes can be nested in the usual manner. See the doc pages for those commands for examples. Only one of level of nesting is allowed, but that should be sufficient for most use cases. </P> <HR> <H4><A NAME = "cmd_3"></A>3.3 Input script structure </H4> <P>This section describes the structure of a typical LAMMPS input script. The "examples" directory in the LAMMPS distribution contains many sample input scripts; the corresponding problems are discussed in <A HREF = "Section_example.html">Section_example</A>, and animated on the <A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A>. </P> <P>A LAMMPS input script typically has 4 parts: </P> <OL><LI>Initialization <LI>Atom definition <LI>Settings <LI>Run a simulation </OL> <P>The last 2 parts can be repeated as many times as desired. I.e. run a simulation, change some settings, run some more, etc. Each of the 4 parts is now described in more detail. Remember that almost all the commands need only be used if a non-default value is desired. </P> <P>(1) Initialization </P> <P>Set parameters that need to be defined before atoms are created or read-in from a file. </P> <P>The relevant commands are <A HREF = "units.html">units</A>, <A HREF = "dimension.html">dimension</A>, <A HREF = "newton.html">newton</A>, <A HREF = "processors.html">processors</A>, <A HREF = "boundary.html">boundary</A>, <A HREF = "atom_style.html">atom_style</A>, <A HREF = "atom_modify.html">atom_modify</A>. </P> <P>If force-field parameters appear in the files that will be read, these commands tell LAMMPS what kinds of force fields are being used: <A HREF = "pair_style.html">pair_style</A>, <A HREF = "bond_style.html">bond_style</A>, <A HREF = "angle_style.html">angle_style</A>, <A HREF = "dihedral_style.html">dihedral_style</A>, <A HREF = "improper_style.html">improper_style</A>. </P> <P>(2) Atom definition </P> <P>There are 3 ways to define atoms in LAMMPS. Read them in from a data or restart file via the <A HREF = "read_data.html">read_data</A> or <A HREF = "read_restart.html">read_restart</A> commands. These files can contain molecular topology information. Or create atoms on a lattice (with no molecular topology), using these commands: <A HREF = "lattice.html">lattice</A>, <A HREF = "region.html">region</A>, <A HREF = "create_box.html">create_box</A>, <A HREF = "create_atoms.html">create_atoms</A>. The entire set of atoms can be duplicated to make a larger simulation using the <A HREF = "replicate.html">replicate</A> command. </P> <P>(3) Settings </P> <P>Once atoms and molecular topology are defined, a variety of settings can be specified: force field coefficients, simulation parameters, output options, etc. </P> <P>Force field coefficients are set by these commands (they can also be set in the read-in files): <A HREF = "pair_coeff.html">pair_coeff</A>, <A HREF = "bond_coeff.html">bond_coeff</A>, <A HREF = "angle_coeff.html">angle_coeff</A>, <A HREF = "dihedral_coeff.html">dihedral_coeff</A>, <A HREF = "improper_coeff.html">improper_coeff</A>, <A HREF = "kspace_style.html">kspace_style</A>, <A HREF = "dielectric.html">dielectric</A>, <A HREF = "special_bonds.html">special_bonds</A>. </P> <P>Various simulation parameters are set by these commands: <A HREF = "neighbor.html">neighbor</A>, <A HREF = "neigh_modify.html">neigh_modify</A>, <A HREF = "group.html">group</A>, <A HREF = "timestep.html">timestep</A>, <A HREF = "reset_timestep.html">reset_timestep</A>, <A HREF = "run_style.html">run_style</A>, <A HREF = "min_style.html">min_style</A>, <A HREF = "min_modify.html">min_modify</A>. </P> <P>Fixes impose a variety of boundary conditions, time integration, and diagnostic options. The <A HREF = "fix.html">fix</A> command comes in many flavors. </P> <P>Various computations can be specified for execution during a simulation using the <A HREF = "compute.html">compute</A>, <A HREF = "compute_modify.html">compute_modify</A>, and <A HREF = "variable.html">variable</A> commands. </P> <P>Output options are set by the <A HREF = "thermo.html">thermo</A>, <A HREF = "dump.html">dump</A>, and <A HREF = "restart.html">restart</A> commands. </P> <P>(4) Run a simulation </P> <P>A molecular dynamics simulation is run using the <A HREF = "run.html">run</A> command. Energy minimization (molecular statics) is performed using the <A HREF = "minimize.html">minimize</A> command. A parallel tempering (replica-exchange) simulation can be run using the <A HREF = "temper.html">temper</A> command. </P> <HR> <A NAME = "cmd_4"></A><H4>3.4 Commands listed by category </H4> <P>This section lists all LAMMPS commands, grouped by category. The <A HREF = "#cmd_5">next section</A> lists the same commands alphabetically. Note that some style options for some commands are part of specific LAMMPS packages, which means they cannot be used unless the package was included when LAMMPS was built. Not all packages are included in a default LAMMPS build. These dependencies are listed as Restrictions in the command's documentation. </P> <P>Initialization: </P> <P><A HREF = "atom_modify.html">atom_modify</A>, <A HREF = "atom_style.html">atom_style</A>, <A HREF = "boundary.html">boundary</A>, <A HREF = "dimension.html">dimension</A>, <A HREF = "newton.html">newton</A>, <A HREF = "processors.html">processors</A>, <A HREF = "units.html">units</A> </P> <P>Atom definition: </P> <P><A HREF = "create_atoms.html">create_atoms</A>, <A HREF = "create_box.html">create_box</A>, <A HREF = "lattice.html">lattice</A>, <A HREF = "read_data.html">read_data</A>, <A HREF = "read_restart.html">read_restart</A>, <A HREF = "region.html">region</A>, <A HREF = "replicate.html">replicate</A> </P> <P>Force fields: </P> <P><A HREF = "angle_coeff.html">angle_coeff</A>, <A HREF = "angle_style.html">angle_style</A>, <A HREF = "bond_coeff.html">bond_coeff</A>, <A HREF = "bond_style.html">bond_style</A>, <A HREF = "dielectric.html">dielectric</A>, <A HREF = "dihedral_coeff.html">dihedral_coeff</A>, <A HREF = "dihedral_style.html">dihedral_style</A>, <A HREF = "improper_coeff.html">improper_coeff</A>, <A HREF = "improper_style.html">improper_style</A>, <A HREF = "kspace_modify.html">kspace_modify</A>, <A HREF = "kspace_style.html">kspace_style</A>, <A HREF = "pair_coeff.html">pair_coeff</A>, <A HREF = "pair_modify.html">pair_modify</A>, <A HREF = "pair_style.html">pair_style</A>, <A HREF = "pair_write.html">pair_write</A>, <A HREF = "special_bonds.html">special_bonds</A> </P> <P>Settings: </P> <P><A HREF = "communicate.html">communicate</A>, <A HREF = "group.html">group</A>, <A HREF = "mass.html">mass</A>, <A HREF = "min_modify.html">min_modify</A>, <A HREF = "min_style.html">min_style</A>, <A HREF = "neigh_modify.html">neigh_modify</A>, <A HREF = "neighbor.html">neighbor</A>, <A HREF = "reset_timestep.html">reset_timestep</A>, <A HREF = "run_style.html">run_style</A>, <A HREF = "set.html">set</A>, <A HREF = "timestep.html">timestep</A>, <A HREF = "velocity.html">velocity</A> </P> <P>Fixes: </P> <P><A HREF = "fix.html">fix</A>, <A HREF = "fix_modify.html">fix_modify</A>, <A HREF = "unfix.html">unfix</A> </P> <P>Computes: </P> <P><A HREF = "compute.html">compute</A>, <A HREF = "compute_modify.html">compute_modify</A>, <A HREF = "uncompute.html">uncompute</A> </P> <P>Output: </P> <P><A HREF = "dump.html">dump</A>, <A HREF = "dump_image.html">dump image</A>, <A HREF = "dump_modify.html">dump_modify</A>, <A HREF = "restart.html">restart</A>, <A HREF = "thermo.html">thermo</A>, <A HREF = "thermo_modify.html">thermo_modify</A>, <A HREF = "thermo_style.html">thermo_style</A>, <A HREF = "undump.html">undump</A>, <A HREF = "write_restart.html">write_restart</A> </P> <P>Actions: </P> <P><A HREF = "delete_atoms.html">delete_atoms</A>, <A HREF = "delete_bonds.html">delete_bonds</A>, <A HREF = "displace_atoms.html">displace_atoms</A>, <A HREF = "change_box.html">change_box</A>, <A HREF = "minimize.html">minimize</A>, <A HREF = "neb.html">neb</A> <A HREF = "prd.html">prd</A>, <A HREF = "run.html">run</A>, <A HREF = "temper.html">temper</A> </P> <P>Miscellaneous: </P> <P><A HREF = "clear.html">clear</A>, <A HREF = "echo.html">echo</A>, <A HREF = "if.html">if</A>, <A HREF = "include.html">include</A>, <A HREF = "jump.html">jump</A>, <A HREF = "label.html">label</A>, <A HREF = "log.html">log</A>, <A HREF = "next.html">next</A>, <A HREF = "print.html">print</A>, <A HREF = "shell.html">shell</A>, <A HREF = "variable.html">variable</A> </P> <HR> <H4><A NAME = "cmd_5"></A><A NAME = "comm"></A>3.5 Individual commands </H4> <P>This section lists all LAMMPS commands alphabetically, with a separate listing below of styles within certain commands. The <A HREF = "#cmd_4">previous section</A> lists the same commands, grouped by category. Note that some style options for some commands are part of specific LAMMPS packages, which means they cannot be used unless the package was included when LAMMPS was built. Not all packages are included in a default LAMMPS build. These dependencies are listed as Restrictions in the command's documentation. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "angle_coeff.html">angle_coeff</A></TD><TD ><A HREF = "angle_style.html">angle_style</A></TD><TD ><A HREF = "atom_modify.html">atom_modify</A></TD><TD ><A HREF = "atom_style.html">atom_style</A></TD><TD ><A HREF = "balance.html">balance</A></TD><TD ><A HREF = "bond_coeff.html">bond_coeff</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "bond_style.html">bond_style</A></TD><TD ><A HREF = "boundary.html">boundary</A></TD><TD ><A HREF = "change_box.html">change_box</A></TD><TD ><A HREF = "clear.html">clear</A></TD><TD ><A HREF = "communicate.html">communicate</A></TD><TD ><A HREF = "compute.html">compute</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_modify.html">compute_modify</A></TD><TD ><A HREF = "create_atoms.html">create_atoms</A></TD><TD ><A HREF = "create_box.html">create_box</A></TD><TD ><A HREF = "delete_atoms.html">delete_atoms</A></TD><TD ><A HREF = "delete_bonds.html">delete_bonds</A></TD><TD ><A HREF = "dielectric.html">dielectric</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "dihedral_coeff.html">dihedral_coeff</A></TD><TD ><A HREF = "dihedral_style.html">dihedral_style</A></TD><TD ><A HREF = "dimension.html">dimension</A></TD><TD ><A HREF = "displace_atoms.html">displace_atoms</A></TD><TD ><A HREF = "dump.html">dump</A></TD><TD ><A HREF = "dump_image.html">dump image</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "dump_modify.html">dump_modify</A></TD><TD ><A HREF = "echo.html">echo</A></TD><TD ><A HREF = "fix.html">fix</A></TD><TD ><A HREF = "fix_modify.html">fix_modify</A></TD><TD ><A HREF = "group.html">group</A></TD><TD ><A HREF = "if.html">if</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "improper_coeff.html">improper_coeff</A></TD><TD ><A HREF = "improper_style.html">improper_style</A></TD><TD ><A HREF = "include.html">include</A></TD><TD ><A HREF = "jump.html">jump</A></TD><TD ><A HREF = "kspace_modify.html">kspace_modify</A></TD><TD ><A HREF = "kspace_style.html">kspace_style</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "label.html">label</A></TD><TD ><A HREF = "lattice.html">lattice</A></TD><TD ><A HREF = "log.html">log</A></TD><TD ><A HREF = "mass.html">mass</A></TD><TD ><A HREF = "minimize.html">minimize</A></TD><TD ><A HREF = "min_modify.html">min_modify</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "min_style.html">min_style</A></TD><TD ><A HREF = "neb.html">neb</A></TD><TD ><A HREF = "neigh_modify.html">neigh_modify</A></TD><TD ><A HREF = "neighbor.html">neighbor</A></TD><TD ><A HREF = "newton.html">newton</A></TD><TD ><A HREF = "next.html">next</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "package.html">package</A></TD><TD ><A HREF = "pair_coeff.html">pair_coeff</A></TD><TD ><A HREF = "pair_modify.html">pair_modify</A></TD><TD ><A HREF = "pair_style.html">pair_style</A></TD><TD ><A HREF = "pair_write.html">pair_write</A></TD><TD ><A HREF = "partition.html">partition</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "prd.html">prd</A></TD><TD ><A HREF = "print.html">print</A></TD><TD ><A HREF = "processors.html">processors</A></TD><TD ><A HREF = "quit.html">quit</A></TD><TD ><A HREF = "read_data.html">read_data</A></TD><TD ><A HREF = "read_restart.html">read_restart</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "region.html">region</A></TD><TD ><A HREF = "replicate.html">replicate</A></TD><TD ><A HREF = "reset_timestep.html">reset_timestep</A></TD><TD ><A HREF = "restart.html">restart</A></TD><TD ><A HREF = "run.html">run</A></TD><TD ><A HREF = "run_style.html">run_style</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "set.html">set</A></TD><TD ><A HREF = "shell.html">shell</A></TD><TD ><A HREF = "special_bonds.html">special_bonds</A></TD><TD ><A HREF = "suffix.html">suffix</A></TD><TD ><A HREF = "tad.html">tad</A></TD><TD ><A HREF = "temper.html">temper</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "thermo.html">thermo</A></TD><TD ><A HREF = "thermo_modify.html">thermo_modify</A></TD><TD ><A HREF = "thermo_style.html">thermo_style</A></TD><TD ><A HREF = "timestep.html">timestep</A></TD><TD ><A HREF = "uncompute.html">uncompute</A></TD><TD ><A HREF = "undump.html">undump</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "unfix.html">unfix</A></TD><TD ><A HREF = "units.html">units</A></TD><TD ><A HREF = "variable.html">variable</A></TD><TD ><A HREF = "velocity.html">velocity</A></TD><TD ><A HREF = "write_restart.html">write_restart</A> </TD></TR></TABLE></DIV> <HR> <H4>Fix styles </H4> <P>See the <A HREF = "fix.html">fix</A> command for one-line descriptions of each style or click on the style itself for a full description: </P> <DIV ALIGN=center><TABLE BORDER=1 > -<TR ALIGN="center"><TD ><A HREF = "fix_adapt.html">adapt</A></TD><TD ><A HREF = "fix_addforce.html">addforce</A></TD><TD ><A HREF = "fix_aveforce.html">aveforce</A></TD><TD ><A HREF = "fix_ave_atom.html">ave/atom</A></TD><TD ><A HREF = "fix_ave_correlate.html">ave/correlate</A></TD><TD ><A HREF = "fix_ave_histo.html">ave/histo</A></TD><TD ><A HREF = "fix_ave_spatial.html">ave/spatial</A></TD><TD ><A HREF = "fix_ave_time.html">ave/time</A></TD></TR> -<TR ALIGN="center"><TD ><A HREF = "fix_bond_break.html">bond/break</A></TD><TD ><A HREF = "fix_bond_create.html">bond/create</A></TD><TD ><A HREF = "fix_bond_swap.html">bond/swap</A></TD><TD ><A HREF = "fix_box_relax.html">box/relax</A></TD><TD ><A HREF = "fix_deform.html">deform</A></TD><TD ><A HREF = "fix_deposit.html">deposit</A></TD><TD ><A HREF = "fix_drag.html">drag</A></TD><TD ><A HREF = "fix_dt_reset.html">dt/reset</A></TD></TR> -<TR ALIGN="center"><TD ><A HREF = "fix_efield.html">efield</A></TD><TD ><A HREF = "fix_enforce2d.html">enforce2d</A></TD><TD ><A HREF = "fix_evaporate.html">evaporate</A></TD><TD ><A HREF = "fix_external.html">external</A></TD><TD ><A HREF = "fix_freeze.html">freeze</A></TD><TD ><A HREF = "fix_gcmc.html">gcmc</A></TD><TD ><A HREF = "fix_gravity.html">gravity</A></TD><TD ><A HREF = "fix_heat.html">heat</A></TD></TR> -<TR ALIGN="center"><TD ><A HREF = "fix_indent.html">indent</A></TD><TD ><A HREF = "fix_langevin.html">langevin</A></TD><TD ><A HREF = "fix_lineforce.html">lineforce</A></TD><TD ><A HREF = "fix_momentum.html">momentum</A></TD><TD ><A HREF = "fix_move.html">move</A></TD><TD ><A HREF = "fix_msst.html">msst</A></TD><TD ><A HREF = "fix_neb.html">neb</A></TD><TD ><A HREF = "fix_nh.html">nph</A></TD></TR> -<TR ALIGN="center"><TD ><A HREF = "fix_nphug.html">nphug</A></TD><TD ><A HREF = "fix_nph_asphere.html">nph/asphere</A></TD><TD ><A HREF = "fix_nph_sphere.html">nph/sphere</A></TD><TD ><A HREF = "fix_nh.html">npt</A></TD><TD ><A HREF = "fix_npt_asphere.html">npt/asphere</A></TD><TD ><A HREF = "fix_npt_sphere.html">npt/sphere</A></TD><TD ><A HREF = "fix_nve.html">nve</A></TD><TD ><A HREF = "fix_nve_asphere.html">nve/asphere</A></TD></TR> -<TR ALIGN="center"><TD ><A HREF = "fix_nve_asphere_noforce.html">nve/asphere/noforce</A></TD><TD ><A HREF = "fix_nve_limit.html">nve/limit</A></TD><TD ><A HREF = "fix_nve_line.html">nve/line</A></TD><TD ><A HREF = "fix_nve_noforce.html">nve/noforce</A></TD><TD ><A HREF = "fix_nve_sphere.html">nve/sphere</A></TD><TD ><A HREF = "fix_nve_tri.html">nve/tri</A></TD><TD ><A HREF = "fix_nh.html">nvt</A></TD><TD ><A HREF = "fix_nvt_asphere.html">nvt/asphere</A></TD></TR> -<TR ALIGN="center"><TD ><A HREF = "fix_nvt_sllod.html">nvt/sllod</A></TD><TD ><A HREF = "fix_nvt_sphere.html">nvt/sphere</A></TD><TD ><A HREF = "fix_orient_fcc.html">orient/fcc</A></TD><TD ><A HREF = "fix_planeforce.html">planeforce</A></TD><TD ><A HREF = "fix_poems.html">poems</A></TD><TD ><A HREF = "fix_pour.html">pour</A></TD><TD ><A HREF = "fix_press_berendsen.html">press/berendsen</A></TD><TD ><A HREF = "fix_print.html">print</A></TD></TR> -<TR ALIGN="center"><TD ><A HREF = "fix_qeq_comb.html">qeq/comb</A></TD><TD ><A HREF = "fix_reax_bonds.html">reax/bonds</A></TD><TD ><A HREF = "fix_reax_bonds.html">reax/c/bonds</A></TD><TD ><A HREF = "fix_recenter.html">recenter</A></TD><TD ><A HREF = "fix_restrain.html">restrain</A></TD><TD ><A HREF = "fix_rigid.html">rigid</A></TD><TD ><A HREF = "fix_rigid.html">rigid/nve</A></TD><TD ><A HREF = "fix_rigid.html">rigid/nvt</A></TD></TR> -<TR ALIGN="center"><TD ><A HREF = "fix_setforce.html">setforce</A></TD><TD ><A HREF = "fix_shake.html">shake</A></TD><TD ><A HREF = "fix_spring.html">spring</A></TD><TD ><A HREF = "fix_spring_rg.html">spring/rg</A></TD><TD ><A HREF = "fix_spring_self.html">spring/self</A></TD><TD ><A HREF = "fix_srd.html">srd</A></TD><TD ><A HREF = "fix_store_force.html">store/force</A></TD><TD ><A HREF = "fix_store_state.html">store/state</A></TD></TR> -<TR ALIGN="center"><TD ><A HREF = "fix_temp_berendsen.html">temp/berendsen</A></TD><TD ><A HREF = "fix_temp_rescale.html">temp/rescale</A></TD><TD ><A HREF = "fix_thermal_conductivity.html">thermal/conductivity</A></TD><TD ><A HREF = "fix_tmd.html">tmd</A></TD><TD ><A HREF = "fix_ttm.html">ttm</A></TD><TD ><A HREF = "fix_viscosity.html">viscosity</A></TD><TD ><A HREF = "fix_viscous.html">viscous</A></TD><TD ><A HREF = "fix_wall.html">wall/colloid</A></TD></TR> -<TR ALIGN="center"><TD ><A HREF = "fix_wall_gran.html">wall/gran</A></TD><TD ><A HREF = "fix_wall.html">wall/harmonic</A></TD><TD ><A HREF = "fix_wall.html">wall/lj126</A></TD><TD ><A HREF = "fix_wall.html">wall/lj93</A></TD><TD ><A HREF = "fix_wall_reflect.html">wall/reflect</A></TD><TD ><A HREF = "fix_wall_region.html">wall/region</A></TD><TD ><A HREF = "fix_wall_srd.html">wall/srd</A> +<TR ALIGN="center"><TD ><A HREF = "fix_adapt.html">adapt</A></TD><TD ><A HREF = "fix_addforce.html">addforce</A></TD><TD ><A HREF = "fix_append_atoms.html">append/atoms</A></TD><TD ><A HREF = "fix_aveforce.html">aveforce</A></TD><TD ><A HREF = "fix_ave_atom.html">ave/atom</A></TD><TD ><A HREF = "fix_ave_correlate.html">ave/correlate</A></TD><TD ><A HREF = "fix_ave_histo.html">ave/histo</A></TD><TD ><A HREF = "fix_ave_spatial.html">ave/spatial</A></TD></TR> +<TR ALIGN="center"><TD ><A HREF = "fix_ave_time.html">ave/time</A></TD><TD ><A HREF = "fix_bond_break.html">bond/break</A></TD><TD ><A HREF = "fix_bond_create.html">bond/create</A></TD><TD ><A HREF = "fix_bond_swap.html">bond/swap</A></TD><TD ><A HREF = "fix_box_relax.html">box/relax</A></TD><TD ><A HREF = "fix_deform.html">deform</A></TD><TD ><A HREF = "fix_deposit.html">deposit</A></TD><TD ><A HREF = "fix_drag.html">drag</A></TD></TR> +<TR ALIGN="center"><TD ><A HREF = "fix_dt_reset.html">dt/reset</A></TD><TD ><A HREF = "fix_efield.html">efield</A></TD><TD ><A HREF = "fix_enforce2d.html">enforce2d</A></TD><TD ><A HREF = "fix_evaporate.html">evaporate</A></TD><TD ><A HREF = "fix_external.html">external</A></TD><TD ><A HREF = "fix_freeze.html">freeze</A></TD><TD ><A HREF = "fix_gcmc.html">gcmc</A></TD><TD ><A HREF = "fix_gravity.html">gravity</A></TD></TR> +<TR ALIGN="center"><TD ><A HREF = "fix_heat.html">heat</A></TD><TD ><A HREF = "fix_indent.html">indent</A></TD><TD ><A HREF = "fix_langevin.html">langevin</A></TD><TD ><A HREF = "fix_lineforce.html">lineforce</A></TD><TD ><A HREF = "fix_momentum.html">momentum</A></TD><TD ><A HREF = "fix_move.html">move</A></TD><TD ><A HREF = "fix_msst.html">msst</A></TD><TD ><A HREF = "fix_neb.html">neb</A></TD></TR> +<TR ALIGN="center"><TD ><A HREF = "fix_nh.html">nph</A></TD><TD ><A HREF = "fix_nphug.html">nphug</A></TD><TD ><A HREF = "fix_nph_asphere.html">nph/asphere</A></TD><TD ><A HREF = "fix_nph_sphere.html">nph/sphere</A></TD><TD ><A HREF = "fix_nh.html">npt</A></TD><TD ><A HREF = "fix_npt_asphere.html">npt/asphere</A></TD><TD ><A HREF = "fix_npt_sphere.html">npt/sphere</A></TD><TD ><A HREF = "fix_nve.html">nve</A></TD></TR> +<TR ALIGN="center"><TD ><A HREF = "fix_nve_asphere.html">nve/asphere</A></TD><TD ><A HREF = "fix_nve_asphere_noforce.html">nve/asphere/noforce</A></TD><TD ><A HREF = "fix_nve_limit.html">nve/limit</A></TD><TD ><A HREF = "fix_nve_line.html">nve/line</A></TD><TD ><A HREF = "fix_nve_noforce.html">nve/noforce</A></TD><TD ><A HREF = "fix_nve_sphere.html">nve/sphere</A></TD><TD ><A HREF = "fix_nve_tri.html">nve/tri</A></TD><TD ><A HREF = "fix_nh.html">nvt</A></TD></TR> +<TR ALIGN="center"><TD ><A HREF = "fix_nvt_asphere.html">nvt/asphere</A></TD><TD ><A HREF = "fix_nvt_sllod.html">nvt/sllod</A></TD><TD ><A HREF = "fix_nvt_sphere.html">nvt/sphere</A></TD><TD ><A HREF = "fix_orient_fcc.html">orient/fcc</A></TD><TD ><A HREF = "fix_planeforce.html">planeforce</A></TD><TD ><A HREF = "fix_poems.html">poems</A></TD><TD ><A HREF = "fix_pour.html">pour</A></TD><TD ><A HREF = "fix_press_berendsen.html">press/berendsen</A></TD></TR> +<TR ALIGN="center"><TD ><A HREF = "fix_print.html">print</A></TD><TD ><A HREF = "fix_qeq_comb.html">qeq/comb</A></TD><TD ><A HREF = "fix_reax_bonds.html">reax/bonds</A></TD><TD ><A HREF = "fix_reax_bonds.html">reax/c/bonds</A></TD><TD ><A HREF = "fix_recenter.html">recenter</A></TD><TD ><A HREF = "fix_restrain.html">restrain</A></TD><TD ><A HREF = "fix_rigid.html">rigid</A></TD><TD ><A HREF = "fix_rigid.html">rigid/nve</A></TD></TR> +<TR ALIGN="center"><TD ><A HREF = "fix_rigid.html">rigid/nvt</A></TD><TD ><A HREF = "fix_setforce.html">setforce</A></TD><TD ><A HREF = "fix_shake.html">shake</A></TD><TD ><A HREF = "fix_spring.html">spring</A></TD><TD ><A HREF = "fix_spring_rg.html">spring/rg</A></TD><TD ><A HREF = "fix_spring_self.html">spring/self</A></TD><TD ><A HREF = "fix_srd.html">srd</A></TD><TD ><A HREF = "fix_store_force.html">store/force</A></TD></TR> +<TR ALIGN="center"><TD ><A HREF = "fix_store_state.html">store/state</A></TD><TD ><A HREF = "fix_temp_berendsen.html">temp/berendsen</A></TD><TD ><A HREF = "fix_temp_rescale.html">temp/rescale</A></TD><TD ><A HREF = "fix_thermal_conductivity.html">thermal/conductivity</A></TD><TD ><A HREF = "fix_tmd.html">tmd</A></TD><TD ><A HREF = "fix_ttm.html">ttm</A></TD><TD ><A HREF = "fix_viscosity.html">viscosity</A></TD><TD ><A HREF = "fix_viscous.html">viscous</A></TD></TR> +<TR ALIGN="center"><TD ><A HREF = "fix_wall.html">wall/colloid</A></TD><TD ><A HREF = "fix_wall_gran.html">wall/gran</A></TD><TD ><A HREF = "fix_wall.html">wall/harmonic</A></TD><TD ><A HREF = "fix_wall.html">wall/lj126</A></TD><TD ><A HREF = "fix_wall.html">wall/lj93</A></TD><TD ><A HREF = "fix_wall_piston.html">wall/piston</A></TD><TD ><A HREF = "fix_wall_reflect.html">wall/reflect</A></TD><TD ><A HREF = "fix_wall_region.html">wall/region</A></TD></TR> +<TR ALIGN="center"><TD ><A HREF = "fix_wall_srd.html">wall/srd</A> </TD></TR></TABLE></DIV> <P>These are fix styles contributed by users, which can be used if <A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "fix_addtorque.html">addtorque</A></TD><TD ><A HREF = "fix_atc.html">atc</A></TD><TD ><A HREF = "fix_imd.html">imd</A></TD><TD ><A HREF = "fix_langevin_eff.html">langevin/eff</A></TD><TD ><A HREF = "fix_meso.html">meso</A></TD><TD ><A HREF = "fix_meso_stationary.html">meso/stationary</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "fix_nh_eff.html">nph/eff</A></TD><TD ><A HREF = "fix_nh_eff.html">npt/eff</A></TD><TD ><A HREF = "fix_nve_eff.html">nve/eff</A></TD><TD ><A HREF = "fix_nh_eff.html">nvt/eff</A></TD><TD ><A HREF = "fix_nvt_sllod_eff.html">nvt/sllod/eff</A></TD><TD ><A HREF = "fix_qeq_reax.html">qeq/reax</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "fix_smd.html">smd</A></TD><TD ><A HREF = "fix_temp_rescale_eff.html">temp/rescale/eff</A> </TD></TR></TABLE></DIV> <P>These are accelerated fix styles, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "fix_freeze.html">freeze/cuda</A></TD><TD ><A HREF = "fix_addforce.html">addforce/cuda</A></TD><TD ><A HREF = "fix_aveforce.html">aveforce/cuda</A></TD><TD ><A HREF = "fix_enforce2d.html">enforce2d/cuda</A></TD><TD ><A HREF = "fix_gravity.html">gravity/cuda</A></TD><TD ><A HREF = "fix_gravity.html">gravity/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "fix_nh.html">npt/cuda</A></TD><TD ><A HREF = "fix_nh.html">nve/cuda</A></TD><TD ><A HREF = "fix_nve_sphere.html">nve/sphere/omp</A></TD><TD ><A HREF = "fix_nh.html">nvt/cuda</A></TD><TD ><A HREF = "fix_qeq_comb.html">qeq/comb/omp</A></TD><TD ><A HREF = "fix_setforce.html">setforce/cuda</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "fix_shake.html">shake/cuda</A></TD><TD ><A HREF = "fix_temp_berendsen.html">temp/berendsen/cuda</A></TD><TD ><A HREF = "fix_temp_rescale.html">temp/rescale/cuda</A></TD><TD ><A HREF = "fix_temp_rescale.html">temp/rescale/limit/cuda</A></TD><TD ><A HREF = "fix_viscous.html">viscous/cuda</A> </TD></TR></TABLE></DIV> <HR> <H4>Compute styles </H4> <P>See the <A HREF = "compute.html">compute</A> command for one-line descriptions of each style or click on the style itself for a full description: </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "compute_angle_local.html">angle/local</A></TD><TD ><A HREF = "compute_atom_molecule.html">atom/molecule</A></TD><TD ><A HREF = "compute_bond_local.html">bond/local</A></TD><TD ><A HREF = "compute_centro_atom.html">centro/atom</A></TD><TD ><A HREF = "compute_cluster_atom.html">cluster/atom</A></TD><TD ><A HREF = "compute_cna_atom.html">cna/atom</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_com.html">com</A></TD><TD ><A HREF = "compute_com_molecule.html">com/molecule</A></TD><TD ><A HREF = "compute_coord_atom.html">coord/atom</A></TD><TD ><A HREF = "compute_damage_atom.html">damage/atom</A></TD><TD ><A HREF = "compute_dihedral_local.html">dihedral/local</A></TD><TD ><A HREF = "compute_displace_atom.html">displace/atom</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_erotate_asphere.html">erotate/asphere</A></TD><TD ><A HREF = "compute_erotate_sphere.html">erotate/sphere</A></TD><TD ><A HREF = "compute_event_displace.html">event/displace</A></TD><TD ><A HREF = "compute_group_group.html">group/group</A></TD><TD ><A HREF = "compute_gyration.html">gyration</A></TD><TD ><A HREF = "compute_gyration_molecule.html">gyration/molecule</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_heat_flux.html">heat/flux</A></TD><TD ><A HREF = "compute_improper_local.html">improper/local</A></TD><TD ><A HREF = "compute_ke.html">ke</A></TD><TD ><A HREF = "compute_ke_atom.html">ke/atom</A></TD><TD ><A HREF = "compute_msd.html">msd</A></TD><TD ><A HREF = "compute_msd_molecule.html">msd/molecule</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_pair.html">pair</A></TD><TD ><A HREF = "compute_pair_local.html">pair/local</A></TD><TD ><A HREF = "compute_pe.html">pe</A></TD><TD ><A HREF = "compute_pe_atom.html">pe/atom</A></TD><TD ><A HREF = "compute_pressure.html">pressure</A></TD><TD ><A HREF = "compute_property_atom.html">property/atom</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_property_local.html">property/local</A></TD><TD ><A HREF = "compute_property_molecule.html">property/molecule</A></TD><TD ><A HREF = "compute_rdf.html">rdf</A></TD><TD ><A HREF = "compute_reduce.html">reduce</A></TD><TD ><A HREF = "compute_reduce.html">reduce/region</A></TD><TD ><A HREF = "compute_slice.html">slice</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_stress_atom.html">stress/atom</A></TD><TD ><A HREF = "compute_temp.html">temp</A></TD><TD ><A HREF = "compute_temp_asphere.html">temp/asphere</A></TD><TD ><A HREF = "compute_temp_com.html">temp/com</A></TD><TD ><A HREF = "compute_temp_deform.html">temp/deform</A></TD><TD ><A HREF = "compute_temp_partial.html">temp/partial</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_temp_profile.html">temp/profile</A></TD><TD ><A HREF = "compute_temp_ramp.html">temp/ramp</A></TD><TD ><A HREF = "compute_temp_region.html">temp/region</A></TD><TD ><A HREF = "compute_temp_sphere.html">temp/sphere</A></TD><TD ><A HREF = "compute_ti.html">ti</A> </TD></TR></TABLE></DIV> <P>These are compute styles contributed by users, which can be used if <A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "compute_ackland_atom.html">ackland/atom</A></TD><TD ><A HREF = "compute_ke_eff.html">ke/eff</A></TD><TD ><A HREF = "compute_ke_atom_eff.html">ke/atom/eff</A></TD><TD ><A HREF = "compute_meso_e_atom.html">meso_e/atom</A></TD><TD ><A HREF = "compute_meso_rho_atom.html">meso_rho/atom</A></TD><TD ><A HREF = "compute_meso_t_atom.html">meso_t/atom</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_temp_eff.html">temp/eff</A></TD><TD ><A HREF = "compute_temp_deform_eff.html">temp/deform/eff</A></TD><TD ><A HREF = "compute_temp_region_eff.html">temp/region/eff</A></TD><TD ><A HREF = "compute_temp_rotate.html">temp/rotate</A> </TD></TR></TABLE></DIV> <P>These are accelerated compute styles, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "compute_pe.html">pe/cuda</A></TD><TD ><A HREF = "compute_pressure.html">pressure/cuda</A></TD><TD ><A HREF = "compute_temp.html">temp/cuda</A></TD><TD ><A HREF = "compute_temp_partial.html">temp/partial/cuda</A> </TD></TR></TABLE></DIV> <HR> <H4>Pair_style potentials </H4> <P>See the <A HREF = "pair_style.html">pair_style</A> command for an overview of pair potentials. Click on the style itself for a full description: </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "pair_none.html">none</A></TD><TD ><A HREF = "pair_hybrid.html">hybrid</A></TD><TD ><A HREF = "pair_hybrid.html">hybrid/overlay</A></TD><TD ><A HREF = "pair_adp.html">adp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_airebo.html">airebo</A></TD><TD ><A HREF = "pair_beck.html">beck</A></TD><TD ><A HREF = "pair_born.html">born</A></TD><TD ><A HREF = "pair_born.html">born/coul/long</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_born.html">born/coul/wolf</A></TD><TD ><A HREF = "pair_brownian.html">brownian</A></TD><TD ><A HREF = "pair_brownian.html">brownian/poly</A></TD><TD ><A HREF = "pair_buck.html">buck</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_buck.html">buck/coul/cut</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/long</A></TD><TD ><A HREF = "pair_colloid.html">colloid</A></TD><TD ><A HREF = "pair_comb.html">comb</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_coul.html">coul/cut</A></TD><TD ><A HREF = "pair_coul.html">coul/debye</A></TD><TD ><A HREF = "pair_coul.html">coul/long</A></TD><TD ><A HREF = "pair_coul.html">coul/wolf</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_dipole.html">dipole/cut</A></TD><TD ><A HREF = "pair_dpd.html">dpd</A></TD><TD ><A HREF = "pair_dpd.html">dpd/tstat</A></TD><TD ><A HREF = "pair_dsmc.html">dsmc</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam</A></TD><TD ><A HREF = "pair_eam.html">eam/alloy</A></TD><TD ><A HREF = "pair_eam.html">eam/fs</A></TD><TD ><A HREF = "pair_eim.html">eim</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_gauss.html">gauss</A></TD><TD ><A HREF = "pair_gayberne.html">gayberne</A></TD><TD ><A HREF = "pair_gran.html">gran/hertz/history</A></TD><TD ><A HREF = "pair_gran.html">gran/hooke</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_gran.html">gran/hooke/history</A></TD><TD ><A HREF = "pair_hbond_dreiding.html">hbond/dreiding/lj</A></TD><TD ><A HREF = "pair_hbond_dreiding.html">hbond/dreiding/morse</A></TD><TD ><A HREF = "pair_kim.html">kim</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_line_lj.html">line/lj</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/implicit</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_class2.html">lj/class2</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/cut</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/long</A></TD><TD ><A HREF = "pair_lj.html">lj/cut</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/coul/cut</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/debye</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/tip4p</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj_expand.html">lj/expand</A></TD><TD ><A HREF = "pair_gromacs.html">lj/gromacs</A></TD><TD ><A HREF = "pair_gromacs.html">lj/gromacs/coul/gromacs</A></TD><TD ><A HREF = "pair_lj_smooth.html">lj/smooth</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj_smooth_linear.html">lj/smooth/linear</A></TD><TD ><A HREF = "pair_lj96.html">lj96/cut</A></TD><TD ><A HREF = "pair_lubricate.html">lubricate</A></TD><TD ><A HREF = "pair_lubricate.html">lubricate/poly</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lubricateU.html">lubricateU</A></TD><TD ><A HREF = "pair_lubricateU.html">lubricateU/poly</A></TD><TD ><A HREF = "pair_meam.html">meam</A></TD><TD ><A HREF = "pair_morse.html">morse</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_peri.html">peri/lps</A></TD><TD ><A HREF = "pair_peri.html">peri/pmb</A></TD><TD ><A HREF = "pair_reax.html">reax</A></TD><TD ><A HREF = "pair_airebo.html">rebo</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_resquared.html">resquared</A></TD><TD ><A HREF = "pair_soft.html">soft</A></TD><TD ><A HREF = "pair_sw.html">sw</A></TD><TD ><A HREF = "pair_table.html">table</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_tersoff.html">tersoff</A></TD><TD ><A HREF = "pair_tersoff_zbl.html">tersoff/zbl</A></TD><TD ><A HREF = "pair_tri_lj.html">tri/lj</A></TD><TD ><A HREF = "pair_yukawa.html">yukawa</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_yukawa_colloid.html">yukawa/colloid</A> </TD></TR></TABLE></DIV> <P>These are pair styles contributed by users, which can be used if <A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "pair_awpmd.html">awpmd/cut</A></TD><TD ><A HREF = "pair_buck_coul.html">buck/coul</A></TD><TD ><A HREF = "pair_coul_diel.html">coul/diel</A></TD><TD ><A HREF = "pair_dipole.html">dipole/sf</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam/cd</A></TD><TD ><A HREF = "pair_edip.html">edip</A></TD><TD ><A HREF = "pair_eff.html">eff/cut</A></TD><TD ><A HREF = "pair_gauss.html">gauss/cut</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj_coul.html">lj/coul</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk/coul/long</A></TD><TD ><A HREF = "pair_lj_sf.html">lj/sf</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_meam_spline.html">meam/spline</A></TD><TD ><A HREF = "pair_reax_c.html">reax/c</A></TD><TD ><A HREF = "pair_heatconduction.html">sph/heatconduction</A></TD><TD ><A HREF = "pair_idealgas.html">sph/idealgas</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj.html">sph/lj</A></TD><TD ><A HREF = "pair_rhosum.html">sph/rhosum</A></TD><TD ><A HREF = "pair_taitwater.html">sph/taitwater</A></TD><TD ><A HREF = "pair_taitwater_morris.html">sph/taitwater/morris</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_tersoff.html">tersoff/table</A> </TD></TR></TABLE></DIV> <P>These are accelerated pair styles, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "pair_adp.html">adp/omp</A></TD><TD ><A HREF = "pair_airebo.html">airebo/omp</A></TD><TD ><A HREF = "pair_beck.html">beck/omp</A></TD><TD ><A HREF = "pair_born.html">born/coul/long/cuda</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_born.html">born/coul/long/omp</A></TD><TD ><A HREF = "pair_born.html">born/coul/wolf/omp</A></TD><TD ><A HREF = "pair_born.html">born/omp</A></TD><TD ><A HREF = "pair_brownian.html">brownian/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_brownian.html">brownian/poly/omp</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/cut/cuda</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/cut/gpu</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/cut/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_buck.html">buck/coul/long/cuda</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/long/gpu</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/long/omp</A></TD><TD ><A HREF = "pair_buck_coul.html">buck/coul/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_buck.html">buck/cuda</A></TD><TD ><A HREF = "pair_buck.html">buck/gpu</A></TD><TD ><A HREF = "pair_buck.html">buck/omp</A></TD><TD ><A HREF = "pair_colloid.html">colloid/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_comb.html">comb/omp</A></TD><TD ><A HREF = "pair_coul.html">coul/cut/omp</A></TD><TD ><A HREF = "pair_coul.html">coul/debye/omp</A></TD><TD ><A HREF = "pair_coul.html">coul/long/gpu</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_coul.html">coul/long/omp</A></TD><TD ><A HREF = "pair_coul.html">coul/wolf</A></TD><TD ><A HREF = "pair_dipole.html">dipole/cut/omp</A></TD><TD ><A HREF = "pair_dipole.html">dipole/sf/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_dpd.html">dpd/omp</A></TD><TD ><A HREF = "pair_dpd.html">dpd/tstat/omp</A></TD><TD ><A HREF = "pair_eam.html">eam/alloy/cuda</A></TD><TD ><A HREF = "pair_eam.html">eam/alloy/gpu</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam/alloy/omp</A></TD><TD ><A HREF = "pair_eam.html">eam/alloy/opt</A></TD><TD ><A HREF = "pair_eam.html">eam/cd/omp</A></TD><TD ><A HREF = "pair_eam.html">eam/cuda</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam/fs/cuda</A></TD><TD ><A HREF = "pair_eam.html">eam/fs/gpu</A></TD><TD ><A HREF = "pair_eam.html">eam/fs/omp</A></TD><TD ><A HREF = "pair_eam.html">eam/fs/opt</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam/gpu</A></TD><TD ><A HREF = "pair_eam.html">eam/omp</A></TD><TD ><A HREF = "pair_eam.html">eam/opt</A></TD><TD ><A HREF = "pair_edip.html">edip/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_eim.html">eim/omp</A></TD><TD ><A HREF = "pair_gauss.html">gauss/omp</A></TD><TD ><A HREF = "pair_gayberne.html">gayberne/gpu</A></TD><TD ><A HREF = "pair_gayberne.html">gayberne/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_gran.html">gran/hertz/history/omp</A></TD><TD ><A HREF = "pair_gran.html">gran/hooke/cuda</A></TD><TD ><A HREF = "pair_gran.html">gran/hooke/history/omp</A></TD><TD ><A HREF = "pair_gran.html">gran/hooke/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_hbond_dreiding.html">hbond/dreiding/lj/omp</A></TD><TD ><A HREF = "pair_hbond_dreiding.html">hbond/dreiding/morse/omp</A></TD><TD ><A HREF = "pair_line_lj.html">line/lj/omp</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/cuda</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/omp</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/implicit/cuda</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/implicit/omp</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long/cuda</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long/gpu</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long/omp</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long/opt</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/pppm/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_class2.html">lj/class2/coul/cut/cuda</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/cut/omp</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/long/cuda</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/long/gpu</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_class2.html">lj/class2/coul/pppm/omp</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/long/omp</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/cuda</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/gpu</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_class2.html">lj/class2/omp</A></TD><TD ><A HREF = "pair_lj_coul.html">lj/coul/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/cut/cuda</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/cut/gpu</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/coul/cut/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/debye/cuda</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/debye/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/cuda</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/gpu</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/opt</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/tip4p/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/tip4p/opt</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/pppm/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/pppm/tip4p/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/cuda</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/experimental/cuda</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/gpu</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/opt</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj_expand.html">lj/expand/cuda</A></TD><TD ><A HREF = "pair_lj_expand.html">lj/expand/gpu</A></TD><TD ><A HREF = "pair_lj_expand.html">lj/expand/omp</A></TD><TD ><A HREF = "pair_gromacs.html">lj/gromacs/coul/gromacs/cuda</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_gromacs.html">lj/gromacs/coul/gromacs/omp</A></TD><TD ><A HREF = "pair_gromacs.html">lj/gromacs/cuda</A></TD><TD ><A HREF = "pair_gromacs.html">lj/gromacs/omp</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk/gpu</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_sdk.html">lj/sdk/omp</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk/coul/long/gpu</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk/coul/long/omp</A></TD><TD ><A HREF = "pair_lj_sf.html">lj/sf/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj_smooth.html">lj/smooth/cuda</A></TD><TD ><A HREF = "pair_lj_smooth.html">lj/smooth/omp</A></TD><TD ><A HREF = "pair_lj_smooth_linear.html">lj/smooth/linear/omp</A></TD><TD ><A HREF = "pair_lj96.html">lj96/cut/cuda</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj96.html">lj96/cut/gpu</A></TD><TD ><A HREF = "pair_lj96.html">lj96/cut/omp</A></TD><TD ><A HREF = "pair_lubricate.html">lubricate/omp</A></TD><TD ><A HREF = "pair_lubricate.html">lubricate/poly/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_meam_spline.html">meam/spline/omp</A></TD><TD ><A HREF = "pair_morse.html">morse/cuda</A></TD><TD ><A HREF = "pair_morse.html">morse/gpu</A></TD><TD ><A HREF = "pair_morse.html">morse/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_morse.html">morse/opt</A></TD><TD ><A HREF = "pair_peri.html">peri/lps/omp</A></TD><TD ><A HREF = "pair_peri.html">peri/pmb/omp</A></TD><TD ><A HREF = "pair_airebo.html">rebo/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_resquared.html">resquared/gpu</A></TD><TD ><A HREF = "pair_resquared.html">resquared/omp</A></TD><TD ><A HREF = "pair_soft.html">soft/omp</A></TD><TD ><A HREF = "pair_sw.html">sw/cuda</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_sw.html">sw/omp</A></TD><TD ><A HREF = "pair_table.html">table/gpu</A></TD><TD ><A HREF = "pair_table.html">table/omp</A></TD><TD ><A HREF = "pair_tersoff.html">tersoff/cuda</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_tersoff.html">tersoff/omp</A></TD><TD ><A HREF = "pair_tersoff.html">tersoff/table/omp</A></TD><TD ><A HREF = "pair_tersoff_zbl.html">tersoff/zbl/omp</A></TD><TD ><A HREF = "pair_tri_lj.html">tri/lj/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_yukawa.html">yukawa/gpu</A></TD><TD ><A HREF = "pair_yukawa.html">yukawa/omp</A></TD><TD ><A HREF = "pair_yukawa_colloid.html">yukawa/colloid/omp</A> </TD></TR></TABLE></DIV> <HR> <H4>Bond_style potentials </H4> <P>See the <A HREF = "bond_style.html">bond_style</A> command for an overview of bond potentials. Click on the style itself for a full description: </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD WIDTH="100"><A HREF = "bond_none.html">none</A></TD><TD WIDTH="100"><A HREF = "bond_hybrid.html">hybrid</A></TD><TD WIDTH="100"><A HREF = "bond_class2.html">class2</A></TD><TD WIDTH="100"><A HREF = "bond_fene.html">fene</A></TD></TR> <TR ALIGN="center"><TD WIDTH="100"><A HREF = "bond_fene_expand.html">fene/expand</A></TD><TD WIDTH="100"><A HREF = "bond_harmonic.html">harmonic</A></TD><TD WIDTH="100"><A HREF = "bond_morse.html">morse</A></TD><TD WIDTH="100"><A HREF = "bond_nonlinear.html">nonlinear</A></TD></TR> <TR ALIGN="center"><TD WIDTH="100"><A HREF = "bond_quartic.html">quartic</A></TD><TD WIDTH="100"><A HREF = "bond_table.html">table</A> </TD></TR></TABLE></DIV> <P>These are bond styles contributed by users, which can be used if <A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "bond_harmonic_shift.html">harmonic/shift</A></TD><TD ><A HREF = "bond_harmonic_shift_cut.html">harmonic/shift/cut</A> </TD></TR></TABLE></DIV> <P>These are accelerated bond styles, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD WIDTH="100"><A HREF = "bond_class2.html">class2/omp</A></TD><TD WIDTH="100"><A HREF = "bond_fene.html">fene/omp</A></TD><TD WIDTH="100"><A HREF = "bond_fene_expand.html">fene/expand/omp</A></TD><TD WIDTH="100"><A HREF = "bond_harmonic.html">harmonic/omp</A></TD></TR> <TR ALIGN="center"><TD WIDTH="100"><A HREF = "bond_harmonic_shift.html">harmonic/shift/omp</A></TD><TD WIDTH="100"><A HREF = "bond_harmonic_shift_cut.html">harmonic/shift/cut/omp</A></TD><TD WIDTH="100"><A HREF = "bond_morse.html">morse/omp</A></TD><TD WIDTH="100"><A HREF = "bond_nonlinear.html">nonlinear/omp</A></TD></TR> <TR ALIGN="center"><TD WIDTH="100"><A HREF = "bond_quartic.html">quartic/omp</A></TD><TD WIDTH="100"><A HREF = "bond_table.html">table/omp</A> </TD></TR></TABLE></DIV> <HR> <H4>Angle_style potentials </H4> <P>See the <A HREF = "angle_style.html">angle_style</A> command for an overview of angle potentials. Click on the style itself for a full description: </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD WIDTH="100"><A HREF = "angle_none.html">none</A></TD><TD WIDTH="100"><A HREF = "angle_hybrid.html">hybrid</A></TD><TD WIDTH="100"><A HREF = "angle_charmm.html">charmm</A></TD><TD WIDTH="100"><A HREF = "angle_class2.html">class2</A></TD></TR> <TR ALIGN="center"><TD WIDTH="100"><A HREF = "angle_cosine.html">cosine</A></TD><TD WIDTH="100"><A HREF = "angle_cosine_delta.html">cosine/delta</A></TD><TD WIDTH="100"><A HREF = "angle_cosine_periodic.html">cosine/periodic</A></TD><TD WIDTH="100"><A HREF = "angle_cosine_squared.html">cosine/squared</A></TD></TR> <TR ALIGN="center"><TD WIDTH="100"><A HREF = "angle_harmonic.html">harmonic</A></TD><TD WIDTH="100"><A HREF = "angle_table.html">table</A> </TD></TR></TABLE></DIV> <P>These are angle styles contributed by users, which can be used if <A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "angle_sdk.html">sdk</A></TD><TD ><A HREF = "angle_cosine_shift.html">cosine/shift</A></TD><TD ><A HREF = "angle_cosine_shift_exp.html">cosine/shift/exp</A></TD><TD ><A HREF = "angle_dipole.html">dipole</A> </TD></TR></TABLE></DIV> <P>These are accelerated angle styles, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD WIDTH="100"><A HREF = "angle_charmm.html">charmm/omp</A></TD><TD WIDTH="100"><A HREF = "angle_class2.html">class2/omp</A></TD><TD WIDTH="100"><A HREF = "angle_cosine.html">cosine/omp</A></TD><TD WIDTH="100"><A HREF = "angle_cosine_delta.html">cosine/delta/omp</A></TD></TR> <TR ALIGN="center"><TD WIDTH="100"><A HREF = "angle_cosine_periodic.html">cosine/periodic/omp</A></TD><TD WIDTH="100"><A HREF = "angle_cosine_shift.html">cosine/shift/omp</A></TD><TD WIDTH="100"><A HREF = "angle_cosine_shift_exp.html">cosine/shift/exp/omp</A></TD><TD WIDTH="100"><A HREF = "angle_cosine_squared.html">cosine/squared/omp</A></TD></TR> <TR ALIGN="center"><TD WIDTH="100"><A HREF = "angle_dipole.html">dipole/omp</A><A HREF = "angle_harmonic.html">harmonic/omp</A></TD><TD WIDTH="100"><A HREF = "angle_table.html">table/omp</A> </TD></TR></TABLE></DIV> <HR> <H4>Dihedral_style potentials </H4> <P>See the <A HREF = "dihedral_style.html">dihedral_style</A> command for an overview of dihedral potentials. Click on the style itself for a full description: </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD WIDTH="100"><A HREF = "dihedral_none.html">none</A></TD><TD WIDTH="100"><A HREF = "dihedral_hybrid.html">hybrid</A></TD><TD WIDTH="100"><A HREF = "dihedral_charmm.html">charmm</A></TD><TD WIDTH="100"><A HREF = "dihedral_class2.html">class2</A></TD></TR> <TR ALIGN="center"><TD WIDTH="100"><A HREF = "dihedral_harmonic.html">harmonic</A></TD><TD WIDTH="100"><A HREF = "dihedral_helix.html">helix</A></TD><TD WIDTH="100"><A HREF = "dihedral_multi_harmonic.html">multi/harmonic</A></TD><TD WIDTH="100"><A HREF = "dihedral_opls.html">opls</A> </TD></TR></TABLE></DIV> <P>These are dihedral styles contributed by users, which can be used if <A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "dihedral_cosine_shift_exp.html">cosine/shift/exp</A></TD><TD ><A HREF = "dihedral_table.html">table</A> </TD></TR></TABLE></DIV> <P>These are accelerated dihedral styles, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD WIDTH="100"><A HREF = "dihedral_charmm.html">charmm/omp</A></TD><TD WIDTH="100"><A HREF = "dihedral_class2.html">class2/omp</A></TD><TD WIDTH="100"><A HREF = "dihedral_cosine_shift_exp.html">cosine/shift/exp/omp</A></TD><TD WIDTH="100"><A HREF = "dihedral_harmonic.html">harmonic/omp</A></TD></TR> <TR ALIGN="center"><TD WIDTH="100"><A HREF = "dihedral_helix.html">helix/omp</A></TD><TD WIDTH="100"><A HREF = "dihedral_multi_harmonic.html">multi/harmonic/omp</A></TD><TD WIDTH="100"><A HREF = "dihedral_opls.html">opls/omp</A><A HREF = "dihedral_table.html">table/omp</A> </TD></TR></TABLE></DIV> <HR> <H4>Improper_style potentials </H4> <P>See the <A HREF = "improper_style.html">improper_style</A> command for an overview of improper potentials. Click on the style itself for a full description: </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD WIDTH="100"><A HREF = "improper_none.html">none</A></TD><TD WIDTH="100"><A HREF = "improper_hybrid.html">hybrid</A></TD><TD WIDTH="100"><A HREF = "improper_class2.html">class2</A></TD><TD WIDTH="100"><A HREF = "improper_cvff.html">cvff</A></TD></TR> <TR ALIGN="center"><TD WIDTH="100"><A HREF = "improper_harmonic.html">harmonic</A></TD><TD WIDTH="100"><A HREF = "improper_umbrella.html">umbrella</A> </TD></TR></TABLE></DIV> <P>These are accelerated improper styles, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD WIDTH="100"><A HREF = "improper_class2.html">class2/omp</A></TD><TD WIDTH="100"><A HREF = "improper_cvff.html">cvff/omp</A></TD><TD WIDTH="100"><A HREF = "improper_harmonic.html">harmonic/omp</A></TD><TD WIDTH="100"><A HREF = "improper_umbrella.html">umbrella/omp</A> </TD></TR></TABLE></DIV> <HR> <H4>Kspace solvers </H4> <P>See the <A HREF = "kspace_style.html">kspace_style</A> command for an overview of Kspace solvers. Click on the style itself for a full description: </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD WIDTH="100"><A HREF = "kspace_style.html">ewald</A></TD><TD WIDTH="100"><A HREF = "kspace_style.html">pppm</A></TD><TD WIDTH="100"><A HREF = "kspace_style.html">pppm/cg</A></TD><TD WIDTH="100"><A HREF = "kspace_style.html">pppm/tip4p</A> </TD></TR></TABLE></DIV> <P>These are Kspace solvers contributed by users, which can be used if <A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD WIDTH="100"><A HREF = "kspace_style.html">ewald/n</A> </TD></TR></TABLE></DIV> <P>These are accelerated Kspace solvers, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "kspace_style.html">ewald/omp</A></TD><TD ><A HREF = "kspace_style.html">pppm/cuda</A></TD><TD ><A HREF = "kspace_style.html">pppm/gpu</A></TD><TD ><A HREF = "kspace_style.html">pppm/omp</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "kspace_style.html">pppm/cg/omp</A></TD><TD ><A HREF = "kspace_style.html">pppm/proxy</A> </TD></TR></TABLE></DIV> </HTML> diff --git a/doc/Section_commands.txt b/doc/Section_commands.txt index 5fe036092..b4bae86b9 100644 --- a/doc/Section_commands.txt +++ b/doc/Section_commands.txt @@ -1,1030 +1,1032 @@ "Previous Section"_Section_start.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next Section"_Section_packages.html :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line 3. Commands :h3 This section describes how a LAMMPS input script is formatted and the input script commands used to define a LAMMPS simulation. 3.1 "LAMMPS input script"_#cmd_1 3.2 "Parsing rules"_#cmd_2 3.3 "Input script structure"_#cmd_3 3.4 "Commands listed by category"_#cmd_4 3.5 "Commands listed alphabetically"_#cmd_5 :all(b) :line :line 3.1 LAMMPS input script :link(cmd_1),h4 LAMMPS executes by reading commands from a input script (text file), one line at a time. When the input script ends, LAMMPS exits. Each command causes LAMMPS to take some action. It may set an internal variable, read in a file, or run a simulation. Most commands have default settings, which means you only need to use the command if you wish to change the default. In many cases, the ordering of commands in an input script is not important. However the following rules apply: (1) LAMMPS does not read your entire input script and then perform a simulation with all the settings. Rather, the input script is read one line at a time and each command takes effect when it is read. Thus this sequence of commands: timestep 0.5 run 100 run 100 :pre does something different than this sequence: run 100 timestep 0.5 run 100 :pre In the first case, the specified timestep (0.5 fmsec) is used for two simulations of 100 timesteps each. In the 2nd case, the default timestep (1.0 fmsec) is used for the 1st 100 step simulation and a 0.5 fmsec timestep is used for the 2nd one. (2) Some commands are only valid when they follow other commands. For example you cannot set the temperature of a group of atoms until atoms have been defined and a group command is used to define which atoms belong to the group. (3) Sometimes command B will use values that can be set by command A. This means command A must precede command B in the input script if it is to have the desired effect. For example, the "read_data"_read_data.html command initializes the system by setting up the simulation box and assigning atoms to processors. If default values are not desired, the "processors"_processors.html and "boundary"_boundary.html commands need to be used before read_data to tell LAMMPS how to map processors to the simulation box. Many input script errors are detected by LAMMPS and an ERROR or WARNING message is printed. "This section"_Section_errors.html gives more information on what errors mean. The documentation for each command lists restrictions on how the command can be used. :line 3.2 Parsing rules :link(cmd_2),h4 Each non-blank line in the input script is treated as a command. LAMMPS commands are case sensitive. Command names are lower-case, as are specified command arguments. Upper case letters may be used in file names or user-chosen ID strings. Here is how each line in the input script is parsed by LAMMPS: (1) If the last printable character on the line is a "&" character (with no surrounding quotes), the command is assumed to continue on the next line. The next line is concatenated to the previous line by removing the "&" character and newline. This allows long commands to be continued across two or more lines. (2) All characters from the first "#" character onward are treated as comment and discarded. See an exception in (6). Note that a comment after a trailing "&" character will prevent the command from continuing on the next line. Also note that for multi-line commands a single leading "#" will comment out the entire command. (3) The line is searched repeatedly for $ characters, which indicate variables that are replaced with a text string. See an exception in (6). If the $ is followed by curly brackets, then the variable name is the text inside the curly brackets. If no curly brackets follow the $, then the variable name is the single character immediately following the $. Thus $\{myTemp\} and $x refer to variable names "myTemp" and "x". See the "variable"_variable.html command for details of how strings are assigned to variables and how they are substituted for in input script commands. (4) The line is broken into "words" separated by whitespace (tabs, spaces). Note that words can thus contain letters, digits, underscores, or punctuation characters. (5) The first word is the command name. All successive words in the line are arguments. (6) If you want text with spaces to be treated as a single argument, it can be enclosed in either double or single quotes. E.g. print "Volume = $v" print 'Volume = $v' :pre The quotes are removed when the single argument is stored internally. See the "dump modify format"_dump_modify.html or "if"_if.html commands for examples. A "#" or "$" character that is between quotes will not be treated as a comment indicator in (2) or substituted for as a variable in (3). IMPORTANT NOTE: If the argument is itself a command that requires a quoted argument (e.g. using a "print"_print.html command as part of an "if"_if.html or "run every"_run.html command), then the double and single quotes can be nested in the usual manner. See the doc pages for those commands for examples. Only one of level of nesting is allowed, but that should be sufficient for most use cases. :line 3.3 Input script structure :h4,link(cmd_3) This section describes the structure of a typical LAMMPS input script. The "examples" directory in the LAMMPS distribution contains many sample input scripts; the corresponding problems are discussed in "Section_example"_Section_example.html, and animated on the "LAMMPS WWW Site"_lws. A LAMMPS input script typically has 4 parts: Initialization Atom definition Settings Run a simulation :ol The last 2 parts can be repeated as many times as desired. I.e. run a simulation, change some settings, run some more, etc. Each of the 4 parts is now described in more detail. Remember that almost all the commands need only be used if a non-default value is desired. (1) Initialization Set parameters that need to be defined before atoms are created or read-in from a file. The relevant commands are "units"_units.html, "dimension"_dimension.html, "newton"_newton.html, "processors"_processors.html, "boundary"_boundary.html, "atom_style"_atom_style.html, "atom_modify"_atom_modify.html. If force-field parameters appear in the files that will be read, these commands tell LAMMPS what kinds of force fields are being used: "pair_style"_pair_style.html, "bond_style"_bond_style.html, "angle_style"_angle_style.html, "dihedral_style"_dihedral_style.html, "improper_style"_improper_style.html. (2) Atom definition There are 3 ways to define atoms in LAMMPS. Read them in from a data or restart file via the "read_data"_read_data.html or "read_restart"_read_restart.html commands. These files can contain molecular topology information. Or create atoms on a lattice (with no molecular topology), using these commands: "lattice"_lattice.html, "region"_region.html, "create_box"_create_box.html, "create_atoms"_create_atoms.html. The entire set of atoms can be duplicated to make a larger simulation using the "replicate"_replicate.html command. (3) Settings Once atoms and molecular topology are defined, a variety of settings can be specified: force field coefficients, simulation parameters, output options, etc. Force field coefficients are set by these commands (they can also be set in the read-in files): "pair_coeff"_pair_coeff.html, "bond_coeff"_bond_coeff.html, "angle_coeff"_angle_coeff.html, "dihedral_coeff"_dihedral_coeff.html, "improper_coeff"_improper_coeff.html, "kspace_style"_kspace_style.html, "dielectric"_dielectric.html, "special_bonds"_special_bonds.html. Various simulation parameters are set by these commands: "neighbor"_neighbor.html, "neigh_modify"_neigh_modify.html, "group"_group.html, "timestep"_timestep.html, "reset_timestep"_reset_timestep.html, "run_style"_run_style.html, "min_style"_min_style.html, "min_modify"_min_modify.html. Fixes impose a variety of boundary conditions, time integration, and diagnostic options. The "fix"_fix.html command comes in many flavors. Various computations can be specified for execution during a simulation using the "compute"_compute.html, "compute_modify"_compute_modify.html, and "variable"_variable.html commands. Output options are set by the "thermo"_thermo.html, "dump"_dump.html, and "restart"_restart.html commands. (4) Run a simulation A molecular dynamics simulation is run using the "run"_run.html command. Energy minimization (molecular statics) is performed using the "minimize"_minimize.html command. A parallel tempering (replica-exchange) simulation can be run using the "temper"_temper.html command. :line 3.4 Commands listed by category :link(cmd_4),h4 This section lists all LAMMPS commands, grouped by category. The "next section"_#cmd_5 lists the same commands alphabetically. Note that some style options for some commands are part of specific LAMMPS packages, which means they cannot be used unless the package was included when LAMMPS was built. Not all packages are included in a default LAMMPS build. These dependencies are listed as Restrictions in the command's documentation. Initialization: "atom_modify"_atom_modify.html, "atom_style"_atom_style.html, "boundary"_boundary.html, "dimension"_dimension.html, "newton"_newton.html, "processors"_processors.html, "units"_units.html Atom definition: "create_atoms"_create_atoms.html, "create_box"_create_box.html, "lattice"_lattice.html, "read_data"_read_data.html, "read_restart"_read_restart.html, "region"_region.html, "replicate"_replicate.html Force fields: "angle_coeff"_angle_coeff.html, "angle_style"_angle_style.html, "bond_coeff"_bond_coeff.html, "bond_style"_bond_style.html, "dielectric"_dielectric.html, "dihedral_coeff"_dihedral_coeff.html, "dihedral_style"_dihedral_style.html, "improper_coeff"_improper_coeff.html, "improper_style"_improper_style.html, "kspace_modify"_kspace_modify.html, "kspace_style"_kspace_style.html, "pair_coeff"_pair_coeff.html, "pair_modify"_pair_modify.html, "pair_style"_pair_style.html, "pair_write"_pair_write.html, "special_bonds"_special_bonds.html Settings: "communicate"_communicate.html, "group"_group.html, "mass"_mass.html, "min_modify"_min_modify.html, "min_style"_min_style.html, "neigh_modify"_neigh_modify.html, "neighbor"_neighbor.html, "reset_timestep"_reset_timestep.html, "run_style"_run_style.html, "set"_set.html, "timestep"_timestep.html, "velocity"_velocity.html Fixes: "fix"_fix.html, "fix_modify"_fix_modify.html, "unfix"_unfix.html Computes: "compute"_compute.html, "compute_modify"_compute_modify.html, "uncompute"_uncompute.html Output: "dump"_dump.html, "dump image"_dump_image.html, "dump_modify"_dump_modify.html, "restart"_restart.html, "thermo"_thermo.html, "thermo_modify"_thermo_modify.html, "thermo_style"_thermo_style.html, "undump"_undump.html, "write_restart"_write_restart.html Actions: "delete_atoms"_delete_atoms.html, "delete_bonds"_delete_bonds.html, "displace_atoms"_displace_atoms.html, "change_box"_change_box.html, "minimize"_minimize.html, "neb"_neb.html "prd"_prd.html, "run"_run.html, "temper"_temper.html Miscellaneous: "clear"_clear.html, "echo"_echo.html, "if"_if.html, "include"_include.html, "jump"_jump.html, "label"_label.html, "log"_log.html, "next"_next.html, "print"_print.html, "shell"_shell.html, "variable"_variable.html :line 3.5 Individual commands :h4,link(cmd_5),link(comm) This section lists all LAMMPS commands alphabetically, with a separate listing below of styles within certain commands. The "previous section"_#cmd_4 lists the same commands, grouped by category. Note that some style options for some commands are part of specific LAMMPS packages, which means they cannot be used unless the package was included when LAMMPS was built. Not all packages are included in a default LAMMPS build. These dependencies are listed as Restrictions in the command's documentation. "angle_coeff"_angle_coeff.html, "angle_style"_angle_style.html, "atom_modify"_atom_modify.html, "atom_style"_atom_style.html, "balance"_balance.html, "bond_coeff"_bond_coeff.html, "bond_style"_bond_style.html, "boundary"_boundary.html, "change_box"_change_box.html, "clear"_clear.html, "communicate"_communicate.html, "compute"_compute.html, "compute_modify"_compute_modify.html, "create_atoms"_create_atoms.html, "create_box"_create_box.html, "delete_atoms"_delete_atoms.html, "delete_bonds"_delete_bonds.html, "dielectric"_dielectric.html, "dihedral_coeff"_dihedral_coeff.html, "dihedral_style"_dihedral_style.html, "dimension"_dimension.html, "displace_atoms"_displace_atoms.html, "dump"_dump.html, "dump image"_dump_image.html, "dump_modify"_dump_modify.html, "echo"_echo.html, "fix"_fix.html, "fix_modify"_fix_modify.html, "group"_group.html, "if"_if.html, "improper_coeff"_improper_coeff.html, "improper_style"_improper_style.html, "include"_include.html, "jump"_jump.html, "kspace_modify"_kspace_modify.html, "kspace_style"_kspace_style.html, "label"_label.html, "lattice"_lattice.html, "loadbalance"_loadbalance.html, "log"_log.html, "mass"_mass.html, "minimize"_minimize.html, "min_modify"_min_modify.html, "min_style"_min_style.html, "neb"_neb.html, "neigh_modify"_neigh_modify.html, "neighbor"_neighbor.html, "newton"_newton.html, "next"_next.html, "package"_package.html, "pair_coeff"_pair_coeff.html, "pair_modify"_pair_modify.html, "pair_style"_pair_style.html, "pair_write"_pair_write.html, "partition"_partition.html, "prd"_prd.html, "print"_print.html, "processors"_processors.html, "quit"_quit.html, "read_data"_read_data.html, "read_restart"_read_restart.html, "region"_region.html, "replicate"_replicate.html, "reset_timestep"_reset_timestep.html, "restart"_restart.html, "run"_run.html, "run_style"_run_style.html, "set"_set.html, "shell"_shell.html, "special_bonds"_special_bonds.html, "suffix"_suffix.html, "tad"_tad.html, "temper"_temper.html, "thermo"_thermo.html, "thermo_modify"_thermo_modify.html, "thermo_style"_thermo_style.html, "timestep"_timestep.html, "uncompute"_uncompute.html, "undump"_undump.html, "unfix"_unfix.html, "units"_units.html, "variable"_variable.html, "velocity"_velocity.html, "write_restart"_write_restart.html :tb(c=6,ea=c) :line Fix styles :h4 See the "fix"_fix.html command for one-line descriptions of each style or click on the style itself for a full description: "adapt"_fix_adapt.html, "addforce"_fix_addforce.html, +"append/atoms"_fix_append_atoms.html, "aveforce"_fix_aveforce.html, "ave/atom"_fix_ave_atom.html, "ave/correlate"_fix_ave_correlate.html, "ave/histo"_fix_ave_histo.html, "ave/spatial"_fix_ave_spatial.html, "ave/time"_fix_ave_time.html, "bond/break"_fix_bond_break.html, "bond/create"_fix_bond_create.html, "bond/swap"_fix_bond_swap.html, "box/relax"_fix_box_relax.html, "deform"_fix_deform.html, "deposit"_fix_deposit.html, "drag"_fix_drag.html, "dt/reset"_fix_dt_reset.html, "efield"_fix_efield.html, "enforce2d"_fix_enforce2d.html, "evaporate"_fix_evaporate.html, "external"_fix_external.html, "freeze"_fix_freeze.html, "gcmc"_fix_gcmc.html, "gravity"_fix_gravity.html, "heat"_fix_heat.html, "indent"_fix_indent.html, "langevin"_fix_langevin.html, "lineforce"_fix_lineforce.html, "momentum"_fix_momentum.html, "move"_fix_move.html, "msst"_fix_msst.html, "neb"_fix_neb.html, "nph"_fix_nh.html, "nphug"_fix_nphug.html, "nph/asphere"_fix_nph_asphere.html, "nph/sphere"_fix_nph_sphere.html, "npt"_fix_nh.html, "npt/asphere"_fix_npt_asphere.html, "npt/sphere"_fix_npt_sphere.html, "nve"_fix_nve.html, "nve/asphere"_fix_nve_asphere.html, "nve/asphere/noforce"_fix_nve_asphere_noforce.html, "nve/limit"_fix_nve_limit.html, "nve/line"_fix_nve_line.html, "nve/noforce"_fix_nve_noforce.html, "nve/sphere"_fix_nve_sphere.html, "nve/tri"_fix_nve_tri.html, "nvt"_fix_nh.html, "nvt/asphere"_fix_nvt_asphere.html, "nvt/sllod"_fix_nvt_sllod.html, "nvt/sphere"_fix_nvt_sphere.html, "orient/fcc"_fix_orient_fcc.html, "planeforce"_fix_planeforce.html, "poems"_fix_poems.html, "pour"_fix_pour.html, "press/berendsen"_fix_press_berendsen.html, "print"_fix_print.html, "qeq/comb"_fix_qeq_comb.html, "reax/bonds"_fix_reax_bonds.html, "reax/c/bonds"_fix_reax_bonds.html, "recenter"_fix_recenter.html, "restrain"_fix_restrain.html, "rigid"_fix_rigid.html, "rigid/nve"_fix_rigid.html, "rigid/nvt"_fix_rigid.html, "setforce"_fix_setforce.html, "shake"_fix_shake.html, "spring"_fix_spring.html, "spring/rg"_fix_spring_rg.html, "spring/self"_fix_spring_self.html, "srd"_fix_srd.html, "store/force"_fix_store_force.html, "store/state"_fix_store_state.html, "temp/berendsen"_fix_temp_berendsen.html, "temp/rescale"_fix_temp_rescale.html, "thermal/conductivity"_fix_thermal_conductivity.html, "tmd"_fix_tmd.html, "ttm"_fix_ttm.html, "viscosity"_fix_viscosity.html, "viscous"_fix_viscous.html, "wall/colloid"_fix_wall.html, "wall/gran"_fix_wall_gran.html, "wall/harmonic"_fix_wall.html, "wall/lj126"_fix_wall.html, "wall/lj93"_fix_wall.html, +"wall/piston"_fix_wall_piston.html, "wall/reflect"_fix_wall_reflect.html, "wall/region"_fix_wall_region.html, "wall/srd"_fix_wall_srd.html :tb(c=8,ea=c) These are fix styles contributed by users, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "addtorque"_fix_addtorque.html, "atc"_fix_atc.html, "imd"_fix_imd.html, "langevin/eff"_fix_langevin_eff.html, "meso"_fix_meso.html, "meso/stationary"_fix_meso_stationary.html, "nph/eff"_fix_nh_eff.html, "npt/eff"_fix_nh_eff.html, "nve/eff"_fix_nve_eff.html, "nvt/eff"_fix_nh_eff.html, "nvt/sllod/eff"_fix_nvt_sllod_eff.html, "qeq/reax"_fix_qeq_reax.html, "smd"_fix_smd.html, "temp/rescale/eff"_fix_temp_rescale_eff.html :tb(c=6,ea=c) These are accelerated fix styles, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. "freeze/cuda"_fix_freeze.html, "addforce/cuda"_fix_addforce.html, "aveforce/cuda"_fix_aveforce.html, "enforce2d/cuda"_fix_enforce2d.html, "gravity/cuda"_fix_gravity.html, "gravity/omp"_fix_gravity.html, "npt/cuda"_fix_nh.html, "nve/cuda"_fix_nh.html, "nve/sphere/omp"_fix_nve_sphere.html, "nvt/cuda"_fix_nh.html, "qeq/comb/omp"_fix_qeq_comb.html, "setforce/cuda"_fix_setforce.html, "shake/cuda"_fix_shake.html, "temp/berendsen/cuda"_fix_temp_berendsen.html, "temp/rescale/cuda"_fix_temp_rescale.html, "temp/rescale/limit/cuda"_fix_temp_rescale.html, "viscous/cuda"_fix_viscous.html :tb(c=6,ea=c) :line Compute styles :h4 See the "compute"_compute.html command for one-line descriptions of each style or click on the style itself for a full description: "angle/local"_compute_angle_local.html, "atom/molecule"_compute_atom_molecule.html, "bond/local"_compute_bond_local.html, "centro/atom"_compute_centro_atom.html, "cluster/atom"_compute_cluster_atom.html, "cna/atom"_compute_cna_atom.html, "com"_compute_com.html, "com/molecule"_compute_com_molecule.html, "coord/atom"_compute_coord_atom.html, "damage/atom"_compute_damage_atom.html, "dihedral/local"_compute_dihedral_local.html, "displace/atom"_compute_displace_atom.html, "erotate/asphere"_compute_erotate_asphere.html, "erotate/sphere"_compute_erotate_sphere.html, "event/displace"_compute_event_displace.html, "group/group"_compute_group_group.html, "gyration"_compute_gyration.html, "gyration/molecule"_compute_gyration_molecule.html, "heat/flux"_compute_heat_flux.html, "improper/local"_compute_improper_local.html, "ke"_compute_ke.html, "ke/atom"_compute_ke_atom.html, "msd"_compute_msd.html, "msd/molecule"_compute_msd_molecule.html, "pair"_compute_pair.html, "pair/local"_compute_pair_local.html, "pe"_compute_pe.html, "pe/atom"_compute_pe_atom.html, "pressure"_compute_pressure.html, "property/atom"_compute_property_atom.html, "property/local"_compute_property_local.html, "property/molecule"_compute_property_molecule.html, "rdf"_compute_rdf.html, "reduce"_compute_reduce.html, "reduce/region"_compute_reduce.html, "slice"_compute_slice.html, "stress/atom"_compute_stress_atom.html, "temp"_compute_temp.html, "temp/asphere"_compute_temp_asphere.html, "temp/com"_compute_temp_com.html, "temp/deform"_compute_temp_deform.html, "temp/partial"_compute_temp_partial.html, "temp/profile"_compute_temp_profile.html, "temp/ramp"_compute_temp_ramp.html, "temp/region"_compute_temp_region.html, "temp/sphere"_compute_temp_sphere.html, "ti"_compute_ti.html :tb(c=6,ea=c) These are compute styles contributed by users, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "ackland/atom"_compute_ackland_atom.html, "ke/eff"_compute_ke_eff.html, "ke/atom/eff"_compute_ke_atom_eff.html, "meso_e/atom"_compute_meso_e_atom.html, "meso_rho/atom"_compute_meso_rho_atom.html, "meso_t/atom"_compute_meso_t_atom.html, "temp/eff"_compute_temp_eff.html, "temp/deform/eff"_compute_temp_deform_eff.html, "temp/region/eff"_compute_temp_region_eff.html, "temp/rotate"_compute_temp_rotate.html :tb(c=6,ea=c) These are accelerated compute styles, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. "pe/cuda"_compute_pe.html, "pressure/cuda"_compute_pressure.html, "temp/cuda"_compute_temp.html, "temp/partial/cuda"_compute_temp_partial.html :tb(c=6,ea=c) :line Pair_style potentials :h4 See the "pair_style"_pair_style.html command for an overview of pair potentials. Click on the style itself for a full description: "none"_pair_none.html, "hybrid"_pair_hybrid.html, "hybrid/overlay"_pair_hybrid.html, "adp"_pair_adp.html, "airebo"_pair_airebo.html, "beck"_pair_beck.html, "born"_pair_born.html, "born/coul/long"_pair_born.html, "born/coul/wolf"_pair_born.html, "brownian"_pair_brownian.html, "brownian/poly"_pair_brownian.html, "buck"_pair_buck.html, "buck/coul/cut"_pair_buck.html, "buck/coul/long"_pair_buck.html, "colloid"_pair_colloid.html, "comb"_pair_comb.html, "coul/cut"_pair_coul.html, "coul/debye"_pair_coul.html, "coul/long"_pair_coul.html, "coul/wolf"_pair_coul.html, "dipole/cut"_pair_dipole.html, "dpd"_pair_dpd.html, "dpd/tstat"_pair_dpd.html, "dsmc"_pair_dsmc.html, "eam"_pair_eam.html, "eam/alloy"_pair_eam.html, "eam/fs"_pair_eam.html, "eim"_pair_eim.html, "gauss"_pair_gauss.html, "gayberne"_pair_gayberne.html, "gran/hertz/history"_pair_gran.html, "gran/hooke"_pair_gran.html, "gran/hooke/history"_pair_gran.html, "hbond/dreiding/lj"_pair_hbond_dreiding.html, "hbond/dreiding/morse"_pair_hbond_dreiding.html, "kim"_pair_kim.html, "line/lj"_pair_line_lj.html, "lj/charmm/coul/charmm"_pair_charmm.html, "lj/charmm/coul/charmm/implicit"_pair_charmm.html, "lj/charmm/coul/long"_pair_charmm.html, "lj/class2"_pair_class2.html, "lj/class2/coul/cut"_pair_class2.html, "lj/class2/coul/long"_pair_class2.html, "lj/cut"_pair_lj.html, "lj/cut/coul/cut"_pair_lj.html, "lj/cut/coul/debye"_pair_lj.html, "lj/cut/coul/long"_pair_lj.html, "lj/cut/coul/long/tip4p"_pair_lj.html, "lj/expand"_pair_lj_expand.html, "lj/gromacs"_pair_gromacs.html, "lj/gromacs/coul/gromacs"_pair_gromacs.html, "lj/smooth"_pair_lj_smooth.html, "lj/smooth/linear"_pair_lj_smooth_linear.html, "lj96/cut"_pair_lj96.html, "lubricate"_pair_lubricate.html, "lubricate/poly"_pair_lubricate.html, "lubricateU"_pair_lubricateU.html, "lubricateU/poly"_pair_lubricateU.html, "meam"_pair_meam.html, "morse"_pair_morse.html, "peri/lps"_pair_peri.html, "peri/pmb"_pair_peri.html, "reax"_pair_reax.html, "rebo"_pair_airebo.html, "resquared"_pair_resquared.html, "soft"_pair_soft.html, "sw"_pair_sw.html, "table"_pair_table.html, "tersoff"_pair_tersoff.html, "tersoff/zbl"_pair_tersoff_zbl.html, "tri/lj"_pair_tri_lj.html, "yukawa"_pair_yukawa.html, "yukawa/colloid"_pair_yukawa_colloid.html :tb(c=4,ea=c) These are pair styles contributed by users, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "awpmd/cut"_pair_awpmd.html, "buck/coul"_pair_buck_coul.html, "coul/diel"_pair_coul_diel.html, "dipole/sf"_pair_dipole.html, "eam/cd"_pair_eam.html, "edip"_pair_edip.html, "eff/cut"_pair_eff.html, "gauss/cut"_pair_gauss.html, "lj/coul"_pair_lj_coul.html, "lj/sdk"_pair_sdk.html, "lj/sdk/coul/long"_pair_sdk.html, "lj/sf"_pair_lj_sf.html, "meam/spline"_pair_meam_spline.html, "reax/c"_pair_reax_c.html, "sph/heatconduction"_pair_heatconduction.html, "sph/idealgas"_pair_idealgas.html, "sph/lj"_pair_lj.html, "sph/rhosum"_pair_rhosum.html, "sph/taitwater"_pair_taitwater.html, "sph/taitwater/morris"_pair_taitwater_morris.html, "tersoff/table"_pair_tersoff.html :tb(c=4,ea=c) These are accelerated pair styles, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. "adp/omp"_pair_adp.html, "airebo/omp"_pair_airebo.html, "beck/omp"_pair_beck.html, "born/coul/long/cuda"_pair_born.html, "born/coul/long/omp"_pair_born.html, "born/coul/wolf/omp"_pair_born.html, "born/omp"_pair_born.html, "brownian/omp"_pair_brownian.html, "brownian/poly/omp"_pair_brownian.html, "buck/coul/cut/cuda"_pair_buck.html, "buck/coul/cut/gpu"_pair_buck.html, "buck/coul/cut/omp"_pair_buck.html, "buck/coul/long/cuda"_pair_buck.html, "buck/coul/long/gpu"_pair_buck.html, "buck/coul/long/omp"_pair_buck.html, "buck/coul/omp"_pair_buck_coul.html, "buck/cuda"_pair_buck.html, "buck/gpu"_pair_buck.html, "buck/omp"_pair_buck.html, "colloid/omp"_pair_colloid.html, "comb/omp"_pair_comb.html, "coul/cut/omp"_pair_coul.html, "coul/debye/omp"_pair_coul.html, "coul/long/gpu"_pair_coul.html, "coul/long/omp"_pair_coul.html, "coul/wolf"_pair_coul.html, "dipole/cut/omp"_pair_dipole.html, "dipole/sf/omp"_pair_dipole.html, "dpd/omp"_pair_dpd.html, "dpd/tstat/omp"_pair_dpd.html, "eam/alloy/cuda"_pair_eam.html, "eam/alloy/gpu"_pair_eam.html, "eam/alloy/omp"_pair_eam.html, "eam/alloy/opt"_pair_eam.html, "eam/cd/omp"_pair_eam.html, "eam/cuda"_pair_eam.html, "eam/fs/cuda"_pair_eam.html, "eam/fs/gpu"_pair_eam.html, "eam/fs/omp"_pair_eam.html, "eam/fs/opt"_pair_eam.html, "eam/gpu"_pair_eam.html, "eam/omp"_pair_eam.html, "eam/opt"_pair_eam.html, "edip/omp"_pair_edip.html, "eim/omp"_pair_eim.html, "gauss/omp"_pair_gauss.html, "gayberne/gpu"_pair_gayberne.html, "gayberne/omp"_pair_gayberne.html, "gran/hertz/history/omp"_pair_gran.html, "gran/hooke/cuda"_pair_gran.html, "gran/hooke/history/omp"_pair_gran.html, "gran/hooke/omp"_pair_gran.html, "hbond/dreiding/lj/omp"_pair_hbond_dreiding.html, "hbond/dreiding/morse/omp"_pair_hbond_dreiding.html, "line/lj/omp"_pair_line_lj.html, "lj/charmm/coul/charmm/cuda"_pair_charmm.html, "lj/charmm/coul/charmm/omp"_pair_charmm.html, "lj/charmm/coul/charmm/implicit/cuda"_pair_charmm.html, "lj/charmm/coul/charmm/implicit/omp"_pair_charmm.html, "lj/charmm/coul/long/cuda"_pair_charmm.html, "lj/charmm/coul/long/gpu"_pair_charmm.html, "lj/charmm/coul/long/omp"_pair_charmm.html, "lj/charmm/coul/long/opt"_pair_charmm.html, "lj/charmm/coul/pppm/omp"_pair_charmm.html, "lj/class2/coul/cut/cuda"_pair_class2.html, "lj/class2/coul/cut/omp"_pair_class2.html, "lj/class2/coul/long/cuda"_pair_class2.html, "lj/class2/coul/long/gpu"_pair_class2.html, "lj/class2/coul/pppm/omp"_pair_class2.html, "lj/class2/coul/long/omp"_pair_class2.html, "lj/class2/cuda"_pair_class2.html, "lj/class2/gpu"_pair_class2.html, "lj/class2/omp"_pair_class2.html, "lj/coul/omp"_pair_lj_coul.html, "lj/cut/coul/cut/cuda"_pair_lj.html, "lj/cut/coul/cut/gpu"_pair_lj.html, "lj/cut/coul/cut/omp"_pair_lj.html, "lj/cut/coul/debye/cuda"_pair_lj.html, "lj/cut/coul/debye/omp"_pair_lj.html, "lj/cut/coul/long/cuda"_pair_lj.html, "lj/cut/coul/long/gpu"_pair_lj.html, "lj/cut/coul/long/omp"_pair_lj.html, "lj/cut/coul/long/opt"_pair_lj.html, "lj/cut/coul/long/tip4p/omp"_pair_lj.html, "lj/cut/coul/long/tip4p/opt"_pair_lj.html, "lj/cut/coul/pppm/omp"_pair_lj.html, "lj/cut/coul/pppm/tip4p/omp"_pair_lj.html, "lj/cut/cuda"_pair_lj.html, "lj/cut/experimental/cuda"_pair_lj.html, "lj/cut/gpu"_pair_lj.html, "lj/cut/omp"_pair_lj.html, "lj/cut/opt"_pair_lj.html, "lj/expand/cuda"_pair_lj_expand.html, "lj/expand/gpu"_pair_lj_expand.html, "lj/expand/omp"_pair_lj_expand.html, "lj/gromacs/coul/gromacs/cuda"_pair_gromacs.html, "lj/gromacs/coul/gromacs/omp"_pair_gromacs.html, "lj/gromacs/cuda"_pair_gromacs.html, "lj/gromacs/omp"_pair_gromacs.html, "lj/sdk/gpu"_pair_sdk.html, "lj/sdk/omp"_pair_sdk.html, "lj/sdk/coul/long/gpu"_pair_sdk.html, "lj/sdk/coul/long/omp"_pair_sdk.html, "lj/sf/omp"_pair_lj_sf.html, "lj/smooth/cuda"_pair_lj_smooth.html, "lj/smooth/omp"_pair_lj_smooth.html, "lj/smooth/linear/omp"_pair_lj_smooth_linear.html, "lj96/cut/cuda"_pair_lj96.html, "lj96/cut/gpu"_pair_lj96.html, "lj96/cut/omp"_pair_lj96.html, "lubricate/omp"_pair_lubricate.html, "lubricate/poly/omp"_pair_lubricate.html, "meam/spline/omp"_pair_meam_spline.html, "morse/cuda"_pair_morse.html, "morse/gpu"_pair_morse.html, "morse/omp"_pair_morse.html, "morse/opt"_pair_morse.html, "peri/lps/omp"_pair_peri.html, "peri/pmb/omp"_pair_peri.html, "rebo/omp"_pair_airebo.html, "resquared/gpu"_pair_resquared.html, "resquared/omp"_pair_resquared.html, "soft/omp"_pair_soft.html, "sw/cuda"_pair_sw.html, "sw/omp"_pair_sw.html, "table/gpu"_pair_table.html, "table/omp"_pair_table.html, "tersoff/cuda"_pair_tersoff.html, "tersoff/omp"_pair_tersoff.html, "tersoff/table/omp"_pair_tersoff.html, "tersoff/zbl/omp"_pair_tersoff_zbl.html, "tri/lj/omp"_pair_tri_lj.html, "yukawa/gpu"_pair_yukawa.html, "yukawa/omp"_pair_yukawa.html, "yukawa/colloid/omp"_pair_yukawa_colloid.html :tb(c=4,ea=c) :line Bond_style potentials :h4 See the "bond_style"_bond_style.html command for an overview of bond potentials. Click on the style itself for a full description: "none"_bond_none.html, "hybrid"_bond_hybrid.html, "class2"_bond_class2.html, "fene"_bond_fene.html, "fene/expand"_bond_fene_expand.html, "harmonic"_bond_harmonic.html, "morse"_bond_morse.html, "nonlinear"_bond_nonlinear.html, "quartic"_bond_quartic.html, "table"_bond_table.html :tb(c=4,ea=c,w=100) These are bond styles contributed by users, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "harmonic/shift"_bond_harmonic_shift.html, "harmonic/shift/cut"_bond_harmonic_shift_cut.html :tb(c=4,ea=c) These are accelerated bond styles, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. "class2/omp"_bond_class2.html, "fene/omp"_bond_fene.html, "fene/expand/omp"_bond_fene_expand.html, "harmonic/omp"_bond_harmonic.html, "harmonic/shift/omp"_bond_harmonic_shift.html, "harmonic/shift/cut/omp"_bond_harmonic_shift_cut.html, "morse/omp"_bond_morse.html, "nonlinear/omp"_bond_nonlinear.html, "quartic/omp"_bond_quartic.html, "table/omp"_bond_table.html :tb(c=4,ea=c,w=100) :line Angle_style potentials :h4 See the "angle_style"_angle_style.html command for an overview of angle potentials. Click on the style itself for a full description: "none"_angle_none.html, "hybrid"_angle_hybrid.html, "charmm"_angle_charmm.html, "class2"_angle_class2.html, "cosine"_angle_cosine.html, "cosine/delta"_angle_cosine_delta.html, "cosine/periodic"_angle_cosine_periodic.html, "cosine/squared"_angle_cosine_squared.html, "harmonic"_angle_harmonic.html, "table"_angle_table.html :tb(c=4,ea=c,w=100) These are angle styles contributed by users, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "sdk"_angle_sdk.html, "cosine/shift"_angle_cosine_shift.html, "cosine/shift/exp"_angle_cosine_shift_exp.html, "dipole"_angle_dipole.html :tb(c=4,ea=c) These are accelerated angle styles, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. "charmm/omp"_angle_charmm.html, "class2/omp"_angle_class2.html, "cosine/omp"_angle_cosine.html, "cosine/delta/omp"_angle_cosine_delta.html, "cosine/periodic/omp"_angle_cosine_periodic.html, "cosine/shift/omp"_angle_cosine_shift.html, "cosine/shift/exp/omp"_angle_cosine_shift_exp.html, "cosine/squared/omp"_angle_cosine_squared.html, "dipole/omp"_angle_dipole.html "harmonic/omp"_angle_harmonic.html, "table/omp"_angle_table.html :tb(c=4,ea=c,w=100) :line Dihedral_style potentials :h4 See the "dihedral_style"_dihedral_style.html command for an overview of dihedral potentials. Click on the style itself for a full description: "none"_dihedral_none.html, "hybrid"_dihedral_hybrid.html, "charmm"_dihedral_charmm.html, "class2"_dihedral_class2.html, "harmonic"_dihedral_harmonic.html, "helix"_dihedral_helix.html, "multi/harmonic"_dihedral_multi_harmonic.html, "opls"_dihedral_opls.html :tb(c=4,ea=c,w=100) These are dihedral styles contributed by users, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "cosine/shift/exp"_dihedral_cosine_shift_exp.html, "table"_dihedral_table.html :tb(c=4,ea=c) These are accelerated dihedral styles, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. "charmm/omp"_dihedral_charmm.html, "class2/omp"_dihedral_class2.html, "cosine/shift/exp/omp"_dihedral_cosine_shift_exp.html, "harmonic/omp"_dihedral_harmonic.html, "helix/omp"_dihedral_helix.html, "multi/harmonic/omp"_dihedral_multi_harmonic.html, "opls/omp"_dihedral_opls.html "table/omp"_dihedral_table.html :tb(c=4,ea=c,w=100) :line Improper_style potentials :h4 See the "improper_style"_improper_style.html command for an overview of improper potentials. Click on the style itself for a full description: "none"_improper_none.html, "hybrid"_improper_hybrid.html, "class2"_improper_class2.html, "cvff"_improper_cvff.html, "harmonic"_improper_harmonic.html, "umbrella"_improper_umbrella.html :tb(c=4,ea=c,w=100) These are accelerated improper styles, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. "class2/omp"_improper_class2.html, "cvff/omp"_improper_cvff.html, "harmonic/omp"_improper_harmonic.html, "umbrella/omp"_improper_umbrella.html :tb(c=4,ea=c,w=100) :line Kspace solvers :h4 See the "kspace_style"_kspace_style.html command for an overview of Kspace solvers. Click on the style itself for a full description: "ewald"_kspace_style.html, "pppm"_kspace_style.html, "pppm/cg"_kspace_style.html, "pppm/tip4p"_kspace_style.html :tb(c=4,ea=c,w=100) These are Kspace solvers contributed by users, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "ewald/n"_kspace_style.html :tb(c=4,ea=c,w=100) These are accelerated Kspace solvers, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. "ewald/omp"_kspace_style.html, "pppm/cuda"_kspace_style.html, "pppm/gpu"_kspace_style.html, "pppm/omp"_kspace_style.html, "pppm/cg/omp"_kspace_style.html, "pppm/proxy"_kspace_style.html :tb(c=4,ea=c) diff --git a/doc/Section_errors.html b/doc/Section_errors.html index d4023ad81..8003f89e0 100644 --- a/doc/Section_errors.html +++ b/doc/Section_errors.html @@ -1,7309 +1,7491 @@ <HTML> <CENTER><A HREF = "Section_python.html">Previous Section</A> - <A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> - <A HREF = "Section_history.html">Next Section</A> </CENTER> <HR> <H3>12. Errors </H3> <P>This section describes the errors you can encounter when using LAMMPS, either conceptually, or as printed out by the program. </P> 12.1 <A HREF = "#err_1">Common problems</A><BR> 12.2 <A HREF = "#err_2">Reporting bugs</A><BR> 12.3 <A HREF = "#err_3">Error & warning messages</A> <BR> <HR> <HR> <A NAME = "err_1"></A><H4>12.1 Common problems </H4> <P>If two LAMMPS runs do not produce the same answer on different machines or different numbers of processors, this is typically not a bug. In theory you should get identical answers on any number of processors and on any machine. In practice, numerical round-off can cause slight differences and eventual divergence of molecular dynamics phase space trajectories within a few 100s or few 1000s of timesteps. However, the statistical properties of the two runs (e.g. average energy or temperature) should still be the same. </P> <P>If the <A HREF = "velocity.html">velocity</A> command is used to set initial atom velocities, a particular atom can be assigned a different velocity when the problem is run on a different number of processors or on different machines. If this happens, the phase space trajectories of the two simulations will rapidly diverge. See the discussion of the <I>loop</I> option in the <A HREF = "velocity.html">velocity</A> command for details and options that avoid this issue. </P> <P>Similarly, the <A HREF = "create_atoms.html">create_atoms</A> command generates a lattice of atoms. For the same physical system, the ordering and numbering of atoms by atom ID may be different depending on the number of processors. </P> <P>Some commands use random number generators which may be setup to produce different random number streams on each processor and hence will produce different effects when run on different numbers of processors. A commonly-used example is the <A HREF = "fix_langevin.html">fix langevin</A> command for thermostatting. </P> <P>A LAMMPS simulation typically has two stages, setup and run. Most LAMMPS errors are detected at setup time; others like a bond stretching too far may not occur until the middle of a run. </P> <P>LAMMPS tries to flag errors and print informative error messages so you can fix the problem. Of course, LAMMPS cannot figure out your physics or numerical mistakes, like choosing too big a timestep, specifying erroneous force field coefficients, or putting 2 atoms on top of each other! If you run into errors that LAMMPS doesn't catch that you think it should flag, please send an email to the <A HREF = "http://lammps.sandia.gov/authors.html">developers</A>. </P> <P>If you get an error message about an invalid command in your input script, you can determine what command is causing the problem by looking in the log.lammps file or using the <A HREF = "echo.html">echo command</A> to see it on the screen. For a given command, LAMMPS expects certain arguments in a specified order. If you mess this up, LAMMPS will often flag the error, but it may read a bogus argument and assign a value that is valid, but not what you wanted. E.g. trying to read the string "abc" as an integer value and assigning the associated variable a value of 0. </P> <P>Generally, LAMMPS will print a message to the screen and logfile and exit gracefully when it encounters a fatal error. Sometimes it will print a WARNING to the screen and logfile and continue on; you can decide if the WARNING is important or not. A WARNING message that is generated in the middle of a run is only printed to the screen, not to the logfile, to avoid cluttering up thermodynamic output. If LAMMPS crashes or hangs without spitting out an error message first then it could be a bug (see <A HREF = "#err_2">this section</A>) or one of the following cases: </P> <P>LAMMPS runs in the available memory a processor allows to be allocated. Most reasonable MD runs are compute limited, not memory limited, so this shouldn't be a bottleneck on most platforms. Almost all large memory allocations in the code are done via C-style malloc's which will generate an error message if you run out of memory. Smaller chunks of memory are allocated via C++ "new" statements. If you are unlucky you could run out of memory just when one of these small requests is made, in which case the code will crash or hang (in parallel), since LAMMPS doesn't trap on those errors. </P> <P>Illegal arithmetic can cause LAMMPS to run slow or crash. This is typically due to invalid physics and numerics that your simulation is computing. If you see wild thermodynamic values or NaN values in your LAMMPS output, something is wrong with your simulation. If you suspect this is happening, it is a good idea to print out thermodynamic info frequently (e.g. every timestep) via the <A HREF = "thermo.html">thermo</A> so you can monitor what is happening. Visualizing the atom movement is also a good idea to insure your model is behaving as you expect. </P> <P>In parallel, one way LAMMPS can hang is due to how different MPI implementations handle buffering of messages. If the code hangs without an error message, it may be that you need to specify an MPI setting or two (usually via an environment variable) to enable buffering or boost the sizes of messages that can be buffered. </P> <HR> <A NAME = "err_2"></A><H4>12.2 Reporting bugs </H4> <P>If you are confident that you have found a bug in LAMMPS, follow these steps. </P> <P>Check the <A HREF = "http://lammps.sandia.gov/bug.html">New features and bug fixes</A> section of the <A HREF = "http://lammps.sandia.gov">LAMMPS WWW site</A> to see if the bug has already been reported or fixed or the <A HREF = "http://lammps.sandia.gov/unbug.html">Unfixed bug</A> to see if a fix is pending. </P> <P>Check the <A HREF = "http://lammps.sandia.gov/mail.html">mailing list</A> to see if it has been discussed before. </P> <P>If not, send an email to the mailing list describing the problem with any ideas you have as to what is causing it or where in the code the problem might be. The developers will ask for more info if needed, such as an input script or data files. </P> <P>The most useful thing you can do to help us fix the bug is to isolate the problem. Run it on the smallest number of atoms and fewest number of processors and with the simplest input script that reproduces the bug and try to identify what command or combination of commands is causing the problem. </P> <P>As a last resort, you can send an email directly to the <A HREF = "http://lammps.sandia.gov/authors.html">developers</A>. </P> <HR> <H4><A NAME = "err_3"></A>12.3 Error & warning messages </H4> <P>These are two alphabetic lists of the <A HREF = "#error">ERROR</A> and <A HREF = "#warn">WARNING</A> messages LAMMPS prints out and the reason why. If the explanation here is not sufficient, the documentation for the offending command may help. Error and warning messages also list the source file and line number where the error was generated. For example, this message </P> <P>ERROR: Illegal velocity command (velocity.cpp:78) </P> <P>means that line #78 in the file src/velocity.cpp generated the error. Looking in the source code may help you figure out what went wrong. </P> <P>Note that error messages from <A HREF = "Section_start.html#start_3">user-contributed packages</A> are not listed here. If such an error occurs and is not self-explanatory, you'll need to look in the source code or contact the author of the package. </P> <H4><A NAME = "error"></A>Errors: </H4> <DL> <DT><I>1-3 bond count is inconsistent</I> <DD>An inconsistency was detected when computing the number of 1-3 neighbors for each atom. This likely means something is wrong with the bond topologies you have defined. <DT><I>1-4 bond count is inconsistent</I> <DD>An inconsistency was detected when computing the number of 1-4 neighbors for each atom. This likely means something is wrong with the bond topologies you have defined. <DT><I>64-bit atom IDs are not yet supported</I> +<DD>See description of this data type in src/lmptype.h. + +<DT><I>Accelerated style in input script but no fix gpu</I> + +<DD>UNDOCUMENTED + +<DT><I>Accelerator sharing is not currently supported on system</I> + <DD>UNDOCUMENTED <DT><I>All angle coeffs are not set</I> <DD>All angle coefficients must be set in the data file or by the angle_coeff command before running a simulation. <DT><I>All bond coeffs are not set</I> <DD>All bond coefficients must be set in the data file or by the bond_coeff command before running a simulation. <DT><I>All dihedral coeffs are not set</I> <DD>All dihedral coefficients must be set in the data file or by the dihedral_coeff command before running a simulation. <DT><I>All improper coeffs are not set</I> <DD>All improper coefficients must be set in the data file or by the improper_coeff command before running a simulation. <DT><I>All masses are not set</I> <DD>For atom styles that define masses for each atom type, all masses must be set in the data file or by the mass command before running a simulation. They must also be set before using the velocity command. <DT><I>All pair coeffs are not set</I> <DD>All pair coefficients must be set in the data file or by the pair_coeff command before running a simulation. <DT><I>All universe/uloop variables must have same # of values</I> <DD>Self-explanatory. <DT><I>All variables in next command must be same style</I> <DD>Self-explanatory. <DT><I>Angle atom missing in delete_bonds</I> <DD>The delete_bonds command cannot find one or more atoms in a particular angle on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid angle. <DT><I>Angle atom missing in set command</I> <DD>The set command cannot find one or more atoms in a particular angle on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid angle. <DT><I>Angle atoms %d %d %d missing on proc %d at step %ld</I> <DD>One or more of 3 atoms needed to compute a particular angle are missing on this processor. Typically this is because the pairwise cutoff is set too short or the angle has blown apart and an atom is -too far away. :dd +too far away. <DT><I>Angle coeff for hybrid has invalid style</I> <DD>Angle style hybrid uses another angle style as one of its coefficients. The angle style used in the angle_coeff command or read from a restart file is not recognized. <DT><I>Angle coeffs are not set</I> <DD>No angle coefficients have been assigned in the data file or via the angle_coeff command. <DT><I>Angle potential must be defined for SHAKE</I> <DD>When shaking angles, an angle_style potential must be used. <DT><I>Angle style hybrid cannot have hybrid as an argument</I> <DD>Self-explanatory. <DT><I>Angle style hybrid cannot have none as an argument</I> <DD>Self-explanatory. <DT><I>Angle style hybrid cannot use same pair style twice</I> <DD>Self-explanatory. <DT><I>Angle table must range from 0 to 180 degrees</I> <DD>Self-explanatory. <DT><I>Angle table parameters did not set N</I> <DD>List of angle table parameters must include N setting. <DT><I>Angle_coeff command before angle_style is defined</I> <DD>Coefficients cannot be set in the data file or via the angle_coeff command until an angle_style has been assigned. <DT><I>Angle_coeff command before simulation box is defined</I> <DD>The angle_coeff command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Angle_coeff command when no angles allowed</I> <DD>The chosen atom style does not allow for angles to be defined. <DT><I>Angle_style command when no angles allowed</I> <DD>The chosen atom style does not allow for angles to be defined. <DT><I>Angles assigned incorrectly</I> <DD>Angles read in from the data file were not assigned correctly to atoms. This means there is something invalid about the topology definitions. <DT><I>Angles defined but no angle types</I> <DD>The data file header lists angles but no angle types. <DT><I>Another input script is already being processed</I> <DD>Cannot attempt to open a 2nd input script, when the original file is still being processed. <DT><I>Append boundary must be shrink/minimum</I> -<DD>UNDOCUMENTED +<DD>The boundary style of the face where atoms are added +must be of type m (shrink/minimum). <DT><I>Arccos of invalid value in variable formula</I> <DD>Argument of arccos() must be between -1 and 1. <DT><I>Arcsin of invalid value in variable formula</I> <DD>Argument of arcsin() must be between -1 and 1. <DT><I>Assigning ellipsoid parameters to non-ellipsoid atom</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Assigning line parameters to non-line atom</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Assigning tri parameters to non-tri atom</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Atom IDs must be consecutive for velocity create loop all</I> <DD>Self-explanatory. <DT><I>Atom count changed in fix neb</I> <DD>This is not allowed in a NEB calculation. <DT><I>Atom count is inconsistent, cannot write restart file</I> <DD>Sum of atoms across processors does not equal initial total count. This is probably because you have lost some atoms. <DT><I>Atom in too many rigid bodies - boost MAXBODY</I> <DD>Fix poems has a parameter MAXBODY (in fix_poems.cpp) which determines the maximum number of rigid bodies a single atom can belong to (i.e. a multibody joint). The bodies you have defined exceed this limit. <DT><I>Atom sort did not operate correctly</I> <DD>This is an internal LAMMPS error. Please report it to the developers. <DT><I>Atom sorting has bin size = 0.0</I> <DD>The neighbor cutoff is being used as the bin size, but it is zero. Thus you must explicitly list a bin size in the atom_modify sort command or turn off sorting. <DT><I>Atom style hybrid cannot have hybrid as an argument</I> <DD>Self-explanatory. <DT><I>Atom style hybrid cannot use same atom style twice</I> <DD>Self-explanatory. <DT><I>Atom vector in equal-style variable formula</I> <DD>Atom vectors generate one value per atom which is not allowed in an equal-style variable. <DT><I>Atom-style variable in equal-style variable formula</I> <DD>Atom-style variables generate one value per atom which is not allowed in an equal-style variable. <DT><I>Atom_modify map command after simulation box is defined</I> <DD>The atom_modify map command cannot be used after a read_data, read_restart, or create_box command. <DT><I>Atom_modify sort and first options cannot be used together</I> <DD>Self-explanatory. <DT><I>Atom_style command after simulation box is defined</I> <DD>The atom_style command cannot be used after a read_data, read_restart, or create_box command. <DT><I>Atom_style line can only be used in 2d simulations</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Atom_style tri can only be used in 3d simulations</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Attempt to pop empty stack in fix box/relax</I> <DD>Internal LAMMPS error. Please report it to the developers. <DT><I>Attempt to push beyond stack limit in fix box/relax</I> <DD>Internal LAMMPS error. Please report it to the developers. <DT><I>Attempting to rescale a 0.0 temperature</I> <DD>Cannot rescale a temperature that is already 0.0. -<DT><I>BAD VECLINE COUNT: %s: %d %d: %d %d\n</I> - -<DD>UNDOCUMENTED - -<DT><I>BAD VECLINE PTRS: %s: %d %d: %d\n</I> - -<DD>UNDOCUMENTED - <DT><I>Bad FENE bond</I> <DD>Two atoms in a FENE bond have become so far apart that the bond cannot be computed. <DT><I>Bad TIP4P angle type for PPPM/TIP4P</I> <DD>Specified angle type is not valid. <DT><I>Bad TIP4P bond type for PPPM/TIP4P</I> <DD>Specified bond type is not valid. -<DT><I>Bad fix ID in fix append_atoms command</I> +<DT><I>Bad fix ID in fix append/atoms command</I> -<DD>UNDOCUMENTED +<DD>The value of the fix_id for keyword spatial must start with the suffix +f_. <DT><I>Bad grid of processors</I> <DD>The 3d grid of processors defined by the processors command does not match the number of processors LAMMPS is being run on. <DT><I>Bad kspace_modify slab parameter</I> <DD>Kspace_modify value for the slab/volume keyword must be >= 2.0. <DT><I>Bad matrix inversion in mldivide3</I> -<DD>UNDOCUMENTED +<DD>This error should not occur unless the matrix is badly formed. <DT><I>Bad principal moments</I> <DD>Fix rigid did not compute the principal moments of inertia of a rigid group of atoms correctly. <DT><I>Bad quadratic solve for particle/line collision</I> -<DD>UNDOCUMENTED +<DD>This is an internal error. It should nornally not occur. <DT><I>Bad quadratic solve for particle/tri collision</I> -<DD>UNDOCUMENTED +<DD>This is an internal error. It should nornally not occur. + +<DT><I>Balance command before simulation box is defined</I> + +<DD>The balance command cannot be used before a read_data, read_restart, +or create_box command. + +<DT><I>Balance dynamic string is invalid</I> + +<DD>The string can only contain the characters "x", "y", or "z". + +<DT><I>Balance dynamic string is invalid for 2d simulation</I> + +<DD>The string cannot contain the letter "z". <DT><I>Bias compute does not calculate a velocity bias</I> <DD>The specified compute must compute a bias for temperature. <DT><I>Bias compute does not calculate temperature</I> <DD>The specified compute must compute temperature. <DT><I>Bias compute group does not match compute group</I> <DD>The specified compute must operate on the same group as the parent compute. <DT><I>Big particle in fix srd cannot be point particle</I> <DD>Big particles must be extended spheriods or ellipsoids. <DT><I>Bigint setting in lmptype.h is invalid</I> <DD>Size of bigint is less than size of tagint. <DT><I>Bigint setting in lmptype.h is not compatible</I> <DD>Bigint stored in restart file is not consistent with LAMMPS version you are running. <DT><I>Bitmapped lookup tables require int/float be same size</I> <DD>Cannot use pair tables on this machine, because of word sizes. Use the pair_modify command with table 0 instead. <DT><I>Bitmapped table in file does not match requested table</I> <DD>Setting for bitmapped table in pair_coeff command must match table in file exactly. <DT><I>Bitmapped table is incorrect length in table file</I> <DD>Number of table entries is not a correct power of 2. <DT><I>Bond and angle potentials must be defined for TIP4P</I> <DD>Cannot use TIP4P pair potential unless bond and angle potentials are defined. <DT><I>Bond atom missing in delete_bonds</I> <DD>The delete_bonds command cannot find one or more atoms in a particular bond on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid bond. <DT><I>Bond atom missing in set command</I> <DD>The set command cannot find one or more atoms in a particular bond on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid bond. <DT><I>Bond atoms %d %d missing on proc %d at step %ld</I> <DD>One or both of 2 atoms needed to compute a particular bond are missing on this processor. Typically this is because the pairwise cutoff is set too short or the bond has blown apart and an atom is -too far away. :dd +too far away. <DT><I>Bond coeff for hybrid has invalid style</I> <DD>Bond style hybrid uses another bond style as one of its coefficients. The bond style used in the bond_coeff command or read from a restart file is not recognized. <DT><I>Bond coeffs are not set</I> <DD>No bond coefficients have been assigned in the data file or via the bond_coeff command. <DT><I>Bond potential must be defined for SHAKE</I> <DD>Cannot use fix shake unless bond potential is defined. <DT><I>Bond style hybrid cannot have hybrid as an argument</I> <DD>Self-explanatory. <DT><I>Bond style hybrid cannot have none as an argument</I> <DD>Self-explanatory. <DT><I>Bond style hybrid cannot use same pair style twice</I> <DD>Self-explanatory. <DT><I>Bond style quartic cannot be used with 3,4-body interactions</I> <DD>No angle, dihedral, or improper styles can be defined when using bond style quartic. <DT><I>Bond style quartic requires special_bonds = 1,1,1</I> <DD>This is a restriction of the current bond quartic implementation. <DT><I>Bond table parameters did not set N</I> <DD>List of bond table parameters must include N setting. <DT><I>Bond table values are not increasing</I> <DD>The values in the tabulated file must be monotonically increasing. <DT><I>Bond_coeff command before bond_style is defined</I> <DD>Coefficients cannot be set in the data file or via the bond_coeff command until an bond_style has been assigned. <DT><I>Bond_coeff command before simulation box is defined</I> <DD>The bond_coeff command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Bond_coeff command when no bonds allowed</I> <DD>The chosen atom style does not allow for bonds to be defined. <DT><I>Bond_style command when no bonds allowed</I> <DD>The chosen atom style does not allow for bonds to be defined. <DT><I>Bonds assigned incorrectly</I> <DD>Bonds read in from the data file were not assigned correctly to atoms. This means there is something invalid about the topology definitions. <DT><I>Bonds defined but no bond types</I> <DD>The data file header lists bonds but no bond types. <DT><I>Both sides of boundary must be periodic</I> <DD>Cannot specify a boundary as periodic only on the lo or hi side. Must be periodic on both sides. <DT><I>Boundary command after simulation box is defined</I> <DD>The boundary command cannot be used after a read_data, read_restart, or create_box command. <DT><I>Box bounds are invalid</I> <DD>The box boundaries specified in the read_data file are invalid. The lo value must be less than the hi value for all 3 dimensions. <DT><I>Can not specify Pxy/Pxz/Pyz in fix box/relax with non-triclinic box</I> <DD>Only triclinic boxes can be used with off-diagonal pressure components. See the region prism command for details. <DT><I>Can not specify Pxy/Pxz/Pyz in fix nvt/npt/nph with non-triclinic box</I> <DD>Only triclinic boxes can be used with off-diagonal pressure components. See the region prism command for details. <DT><I>Can only use -plog with multiple partitions</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. See doc page discussion of command-line switches. <DT><I>Can only use -pscreen with multiple partitions</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. See doc page discussion of command-line switches. <DT><I>Can only use NEB with 1-processor replicas</I> <DD>This is current restriction for NEB as implemented in LAMMPS. <DT><I>Can only use TAD with 1-processor replicas for NEB</I> <DD>This is current restriction for NEB as implemented in LAMMPS. <DT><I>Cannot (yet) use PPPM with triclinic box</I> <DD>This feature is not yet supported. <DT><I>Cannot add atoms to fix move variable</I> <DD>Atoms can not be added afterwards to this fix option. <DT><I>Cannot append atoms to a triclinic box</I> -<DD>UNDOCUMENTED +<DD>The simulation box must be defined with edges alligned with the +Cartesian axes. -<DT><I>Cannot change box to orthogonal when tilt is non-zero</I> +<DT><I>Cannot balance in z dimension for 2d simulation</I> -<DD>Self-explanatory +<DD>Self-explanatory. + +<DT><I>Cannot change box ortho/triclinic with certain fixes defined</I> + +<DD>This is because those fixes store the shape of the box. You need to +use unfix to discard the fix, change the box, then redefine a new +fix. + +<DT><I>Cannot change box ortho/triclinic with dumps defined</I> -<DT><I>Cannot change box with certain fixes defined</I> +<DD>This is because some dumps store the shape of the box. You need to +use undump to discard the dump, change the box, then redefine a new +dump. -<DD>The change_box command cannot be used when fix ave/spatial or -fix/deform are defined . +<DT><I>Cannot change box tilt factors for orthogonal box</I> + +<DD>Cannot use tilt factors unless the simulation box is non-orthogonal. + +<DT><I>Cannot change box to orthogonal when tilt is non-zero</I> + +<DD>Self-explanatory. -<DT><I>Cannot change box with dumps defined</I> +<DT><I>Cannot change box z boundary to nonperiodic for a 2d simulation</I> <DD>Self-explanatory. <DT><I>Cannot change dump_modify every for dump dcd</I> <DD>The frequency of writing dump dcd snapshots cannot be changed. <DT><I>Cannot change dump_modify every for dump xtc</I> <DD>The frequency of writing dump xtc snapshots cannot be changed. <DT><I>Cannot change timestep once fix srd is setup</I> <DD>This is because various SRD properties depend on the timestep size. <DT><I>Cannot change timestep with fix pour</I> <DD>This fix pre-computes some values based on the timestep, so it cannot be changed during a simulation run. +<DT><I>Cannot change_box after reading restart file with per-atom info</I> + +<DD>This is because the restart file info cannot be migrated with the +atoms. You can get around this by performing a 0-timestep run which +will assign the restart file info to actual atoms. + +<DT><I>Cannot change_box in xz or yz for 2d simulation</I> + +<DD>Self-explanatory. + +<DT><I>Cannot change_box in z dimension for 2d simulation</I> + +<DD>Self-explanatory. + <DT><I>Cannot compute PPPM G</I> <DD>LAMMPS failed to compute a valid approximation for the PPPM g_ewald factor that partitions the computation between real space and k-space. <DT><I>Cannot create an atom map unless atoms have IDs</I> <DD>The simulation requires a mapping from global atom IDs to local atoms, but the atoms that have been defined have no IDs. <DT><I>Cannot create atoms with undefined lattice</I> <DD>Must use the lattice command before using the create_atoms command. <DT><I>Cannot create/grow a vector/array of pointers for %s</I> <DD>LAMMPS code is making an illegal call to the templated memory allocaters, to create a vector or array of pointers. <DT><I>Cannot create_atoms after reading restart file with per-atom info</I> <DD>The per-atom info was stored to be used when by a fix that you may re-define. If you add atoms before re-defining the fix, then there will not be a correct amount of per-atom info. <DT><I>Cannot create_box after simulation box is defined</I> <DD>The create_box command cannot be used after a read_data, read_restart, or create_box command. <DT><I>Cannot currently use pair reax with pair hybrid</I> <DD>This is not yet supported. <DT><I>Cannot delete group all</I> <DD>Self-explanatory. <DT><I>Cannot delete group currently used by a compute</I> <DD>Self-explanatory. <DT><I>Cannot delete group currently used by a dump</I> <DD>Self-explanatory. <DT><I>Cannot delete group currently used by a fix</I> <DD>Self-explanatory. <DT><I>Cannot delete group currently used by atom_modify first</I> <DD>Self-explanatory. <DT><I>Cannot displace_atoms after reading restart file with per-atom info</I> <DD>This is because the restart file info cannot be migrated with the atoms. You can get around this by performing a 0-timestep run which will assign the restart file info to actual atoms. -<DT><I>Cannot displace_box after reading restart file with per-atom info</I> - -<DD>This is because the restart file info cannot be migrated with the -atoms. You can get around this by performing a 0-timestep run which -will assign the restart file info to actual atoms. - -<DT><I>Cannot displace_box on a non-periodic boundary</I> - -<DD>Self-explanatory. - <DT><I>Cannot do GCMC on atoms in atom_modify first group</I> <DD>UNDOCUMENTED <DT><I>Cannot dump JPG file</I> -<DD>UNDOCUMENTED +<DD>LAMMPS was not built with the -DLAMMPS_JPEG switch in the Makefile. <DT><I>Cannot dump sort on atom IDs with no atom IDs defined</I> <DD>Self-explanatory. <DT><I>Cannot evaporate atoms in atom_modify first group</I> <DD>This is a restriction due to the way atoms are organized in a list to enable the atom_modify first command. <DT><I>Cannot find delete_bonds group ID</I> <DD>Group ID used in the delete_bonds command does not exist. <DT><I>Cannot have both pair_modify shift and tail set to yes</I> <DD>These 2 options are contradictory. <DT><I>Cannot open -reorder file</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot open ADP potential file %s</I> -<DD>UNDOCUMENTED +<DD>The specified ADP potential file cannot be opened. Check that the +path and name are correct. <DT><I>Cannot open AIREBO potential file %s</I> <DD>The specified AIREBO potential file cannot be opened. Check that the path and name are correct. <DT><I>Cannot open COMB potential file %s</I> <DD>The specified COMB potential file cannot be opened. Check that the path and name are correct. <DT><I>Cannot open EAM potential file %s</I> <DD>The specified EAM potential file cannot be opened. Check that the path and name are correct. <DT><I>Cannot open EIM potential file %s</I> <DD>The specified EIM potential file cannot be opened. Check that the path and name are correct. <DT><I>Cannot open MEAM potential file %s</I> <DD>The specified MEAM potential file cannot be opened. Check that the path and name are correct. <DT><I>Cannot open Stillinger-Weber potential file %s</I> <DD>The specified SW potential file cannot be opened. Check that the path and name are correct. <DT><I>Cannot open Tersoff potential file %s</I> <DD>The specified Tersoff potential file cannot be opened. Check that the path and name are correct. +<DT><I>Cannot open balance output file</I> + +<DD>This error message can only occur if debug options +are uncommented in src/balance.cpp. + <DT><I>Cannot open custom file</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot open dir to search for restart file</I> <DD>Using a "*" in the name of the restart file will open the current directory to search for matching file names. <DT><I>Cannot open dump file</I> <DD>The output file for the dump command cannot be opened. Check that the path and name are correct. <DT><I>Cannot open file %s</I> <DD>The specified file cannot be opened. Check that the path and name are correct. <DT><I>Cannot open fix ave/correlate file %s</I> <DD>The specified file cannot be opened. Check that the path and name are correct. <DT><I>Cannot open fix ave/histo file %s</I> <DD>The specified file cannot be opened. Check that the path and name are correct. <DT><I>Cannot open fix ave/spatial file %s</I> <DD>The specified file cannot be opened. Check that the path and name are correct. <DT><I>Cannot open fix ave/time file %s</I> <DD>The specified file cannot be opened. Check that the path and name are correct. <DT><I>Cannot open fix poems file %s</I> <DD>The specified file cannot be opened. Check that the path and name are correct. <DT><I>Cannot open fix print file %s</I> <DD>The output file generated by the fix print command cannot be opened <DT><I>Cannot open fix qeq/comb file %s</I> <DD>The output file for the fix qeq/combs command cannot be opened. Check that the path and name are correct. <DT><I>Cannot open fix reax/bonds file %s</I> <DD>The output file for the fix reax/bonds command cannot be opened. Check that the path and name are correct. <DT><I>Cannot open fix tmd file %s</I> <DD>The output file for the fix tmd command cannot be opened. Check that the path and name are correct. <DT><I>Cannot open fix ttm file %s</I> <DD>The output file for the fix ttm command cannot be opened. Check that the path and name are correct. <DT><I>Cannot open gzipped file</I> <DD>LAMMPS is attempting to open a gzipped version of the specified file but was unsuccessful. Check that the path and name are correct. <DT><I>Cannot open input script %s</I> <DD>Self-explanatory. <DT><I>Cannot open log.lammps</I> <DD>The default LAMMPS log file cannot be opened. Check that the directory you are running in allows for files to be created. <DT><I>Cannot open logfile</I> <DD>The LAMMPS log file named in a command-line argument cannot be opened. Check that the path and name are correct. <DT><I>Cannot open logfile %s</I> <DD>The LAMMPS log file specified in the input script cannot be opened. Check that the path and name are correct. <DT><I>Cannot open pair_write file</I> <DD>The specified output file for pair energies and forces cannot be opened. Check that the path and name are correct. -<DT><I>Cannot open processors custom file</I> +<DT><I>Cannot open processors output file</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot open restart file %s</I> <DD>Self-explanatory. <DT><I>Cannot open screen file</I> <DD>The screen file specified as a command-line argument cannot be opened. Check that the directory you are running in allows for files to be created. <DT><I>Cannot open universe log file</I> <DD>For a multi-partition run, the master log file cannot be opened. Check that the directory you are running in allows for files to be created. <DT><I>Cannot open universe screen file</I> <DD>For a multi-partition run, the master screen file cannot be opened. Check that the directory you are running in allows for files to be created. <DT><I>Cannot read_data after simulation box is defined</I> <DD>The read_data command cannot be used after a read_data, read_restart, or create_box command. <DT><I>Cannot read_restart after simulation box is defined</I> <DD>The read_restart command cannot be used after a read_data, read_restart, or create_box command. <DT><I>Cannot redefine variable as a different style</I> <DD>An equal-style variable can be re-defined but only if it was originally an equal-style variable. <DT><I>Cannot replicate 2d simulation in z dimension</I> <DD>The replicate command cannot replicate a 2d simulation in the z dimension. <DT><I>Cannot replicate with fixes that store atom quantities</I> <DD>Either fixes are defined that create and store atom-based vectors or a restart file was read which included atom-based vectors for fixes. The replicate command cannot duplicate that information for new atoms. You should use the replicate command before fixes are applied to the system. <DT><I>Cannot reset timestep with a dynamic region defined</I> <DD>Dynamic regions (see the region command) have a time dependence. Thus you cannot change the timestep when one or more of these are defined. <DT><I>Cannot reset timestep with a time-dependent fix defined</I> <DD>You cannot reset the timestep when a fix that keeps track of elapsed time is in place. <DT><I>Cannot reset timestep with dump file already written to</I> <DD>Changing the timestep will confuse when a dump file is written. Use the undump command, then restart the dump file. <DT><I>Cannot reset timestep with restart file already written</I> <DD>Changing the timestep will confuse when a restart file is written. Use the "restart 0" command to turn off restarts, then start them again. <DT><I>Cannot restart fix rigid/nvt with different # of chains</I> <DD>This is because the restart file contains per-chain info. <DT><I>Cannot run 2d simulation with nonperiodic Z dimension</I> <DD>Use the boundary command to make the z dimension periodic in order to run a 2d simulation. <DT><I>Cannot set both respa pair and inner/middle/outer</I> <DD>In the rRESPA integrator, you must compute pairwise potentials either all together (pair), or in pieces (inner/middle/outer). You can't do both. <DT><I>Cannot set dump_modify flush for dump xtc</I> <DD>Self-explanatory. <DT><I>Cannot set mass for this atom style</I> <DD>This atom style does not support mass settings for each atom type. Instead they are defined on a per-atom basis in the data file. <DT><I>Cannot set meso_rho for this atom style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot set non-zero image flag for non-periodic dimension</I> <DD>Self-explanatory. <DT><I>Cannot set non-zero z velocity for 2d simulation</I> <DD>Self-explanatory. <DT><I>Cannot set quaternion for atom that has none</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot set respa middle without inner/outer</I> <DD>In the rRESPA integrator, you must define both a inner and outer setting in order to use a middle setting. <DT><I>Cannot set theta for atom that is not a line</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot set this attribute for this atom style</I> <DD>The attribute being set does not exist for the defined atom style. <DT><I>Cannot set variable z velocity for 2d simulation</I> <DD>Self-explanatory. <DT><I>Cannot skew triclinic box in z for 2d simulation</I> <DD>Self-explanatory. <DT><I>Cannot use -cuda on without USER-CUDA installed</I> -<DD>UNDOCUMENTED +<DD>The USER-CUDA package must be installed via "make yes-user-cuda" +before LAMMPS is built. <DT><I>Cannot use -reorder after -partition</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. See doc page discussion of command-line switches. <DT><I>Cannot use Ewald with 2d simulation</I> <DD>The kspace style ewald cannot be used in 2d simulations. You can use 2d Ewald in a 3d simulation; see the kspace_modify command. <DT><I>Cannot use Ewald with triclinic box</I> <DD>This feature is not yet supported. <DT><I>Cannot use NEB unless atom map exists</I> <DD>Use the atom_modify command to create an atom map. <DT><I>Cannot use NEB with a single replica</I> <DD>Self-explanatory. <DT><I>Cannot use NEB with atom_modify sort enabled</I> <DD>This is current restriction for NEB implemented in LAMMPS. <DT><I>Cannot use PPPM with 2d simulation</I> <DD>The kspace style pppm cannot be used in 2d simulations. You can use 2d PPPM in a 3d simulation; see the kspace_modify command. <DT><I>Cannot use PRD with a time-dependent fix defined</I> <DD>PRD alters the timestep in ways that will mess up these fixes. <DT><I>Cannot use PRD with a time-dependent region defined</I> <DD>PRD alters the timestep in ways that will mess up these regions. <DT><I>Cannot use PRD with atom_modify sort enabled</I> <DD>This is a current restriction of PRD. You must turn off sorting, which is enabled by default, via the atom_modify command. <DT><I>Cannot use PRD with multi-processor replicas unless atom map exists</I> <DD>Use the atom_modify command to create an atom map. <DT><I>Cannot use TAD unless atom map exists for NEB</I> <DD>See atom_modify map command to set this. <DT><I>Cannot use TAD with a single replica for NEB</I> <DD>NEB requires multiple replicas. <DT><I>Cannot use TAD with atom_modify sort enabled for NEB</I> <DD>This is a current restriction of NEB. <DT><I>Cannot use a damped dynamics min style with fix box/relax</I> <DD>This is a current restriction in LAMMPS. Use another minimizer style. <DT><I>Cannot use a damped dynamics min style with per-atom DOF</I> <DD>This is a current restriction in LAMMPS. Use another minimizer style. -<DT><I>Cannot use append_atoms in periodic dimension</I> +<DT><I>Cannot use append/atoms in periodic dimension</I> -<DD>UNDOCUMENTED +<DD>The boundary style of the face where atoms are added can not be of +type p (periodic). <DT><I>Cannot use compute cluster/atom unless atoms have IDs</I> <DD>Atom IDs are used to identify clusters. <DT><I>Cannot use cwiggle in variable formula between runs</I> <DD>This is a function of elapsed time. <DT><I>Cannot use delete_atoms unless atoms have IDs</I> <DD>Your atoms do not have IDs, so the delete_atoms command cannot be used. <DT><I>Cannot use delete_bonds with non-molecular system</I> <DD>Your choice of atom style does not have bonds. <DT><I>Cannot use fix GPU with USER-CUDA mode enabled</I> -<DD>UNDOCUMENTED +<DD>You cannot use both the GPU and USER-CUDA packages +together. Use one or the other. <DT><I>Cannot use fix TMD unless atom map exists</I> <DD>Using this fix requires the ability to lookup an atom index, which is provided by an atom map. An atom map does not exist (by default) for non-molecular problems. Using the atom_modify map command will force an atom map to be created. <DT><I>Cannot use fix ave/spatial z for 2 dimensional model</I> <DD>Self-explanatory. <DT><I>Cannot use fix bond/break with non-molecular systems</I> <DD>Self-explanatory. <DT><I>Cannot use fix bond/create with non-molecular systems</I> <DD>Self-explanatory. <DT><I>Cannot use fix box/relax on a 2nd non-periodic dimension</I> <DD>When specifying an off-diagonal pressure component, the 2nd of the two dimensions must be periodic. E.g. if the xy component is specified, then the y dimension must be periodic. <DT><I>Cannot use fix box/relax on a non-periodic dimension</I> <DD>When specifying a diagonal pressure component, the dimension must be periodic. -<DT><I>Cannot use fix deform on a 2nd non-periodic boundary</I> +<DT><I>Cannot use fix deform on a shrink-wrapped boundary</I> -<DD>When specifying a tilt factor change, the 2nd of the two dimensions -must be periodic. E.g. if the xy tilt is specified, then the y -dimension must be periodic. +<DD>The x, y, z options cannot be applied to shrink-wrapped +dimensions. -<DT><I>Cannot use fix deform on a non-periodic boundary</I> +<DT><I>Cannot use fix deform tilt on a shrink-wrapped 2nd dim</I> -<DD>When specifying a change is a box dimension, the dimension must be -periodic. +<DD>This is because the shrink-wrapping will change the value +of the strain implied by the tilt factor. <DT><I>Cannot use fix deform trate on a box with zero tilt</I> <DD>The trate style alters the current strain. <DT><I>Cannot use fix enforce2d with 3d simulation</I> <DD>Self-explanatory. <DT><I>Cannot use fix msst without per-type mass defined</I> <DD>Self-explanatory. <DT><I>Cannot use fix npt and fix deform on same component of stress tensor</I> <DD>This would be changing the same box dimension twice. <DT><I>Cannot use fix nvt/npt/nph on a 2nd non-periodic dimension</I> <DD>When specifying an off-diagonal pressure component, the 2nd of the two dimensions must be periodic. E.g. if the xy component is specified, then the y dimension must be periodic. <DT><I>Cannot use fix nvt/npt/nph on a non-periodic dimension</I> <DD>When specifying a diagonal pressure component, the dimension must be periodic. <DT><I>Cannot use fix nvt/npt/nph with both xy dynamics and xy scaling</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use fix nvt/npt/nph with both xz dynamics and xz scaling</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. + +<DT><I>Cannot use fix nvt/npt/nph with both yz dynamics and yz scaling</I> + +<DD>Self-explanatory. <DT><I>Cannot use fix nvt/npt/nph with xy dynamics when y is non-periodic dimension</I> -<DD>UNDOCUMENTED +<DD>The 2nd dimension in the barostatted tilt factor must be periodic. <DT><I>Cannot use fix nvt/npt/nph with xz dynamics when z is non-periodic dimension</I> -<DD>UNDOCUMENTED +<DD>The 2nd dimension in the barostatted tilt factor must be periodic. <DT><I>Cannot use fix nvt/npt/nph with yz dynamics when z is non-periodic dimension</I> -<DD>UNDOCUMENTED - -<DT><I>Cannot use fix nvt/npt/nph withboth yz dynamics and yz scaling</I> - -<DD>UNDOCUMENTED +<DD>The 2nd dimension in the barostatted tilt factor must be periodic. <DT><I>Cannot use fix pour with triclinic box</I> <DD>This feature is not yet supported. <DT><I>Cannot use fix press/berendsen and fix deform on same component of stress tensor</I> <DD>These commands both change the box size/shape, so you cannot use both together. <DT><I>Cannot use fix press/berendsen on a non-periodic dimension</I> <DD>Self-explanatory. <DT><I>Cannot use fix press/berendsen with triclinic box</I> <DD>Self-explanatory. <DT><I>Cannot use fix reax/bonds without pair_style reax</I> <DD>Self-explantory. <DT><I>Cannot use fix shake with non-molecular system</I> <DD>Your choice of atom style does not have bonds. <DT><I>Cannot use fix ttm with 2d simulation</I> <DD>This is a current restriction of this fix due to the grid it creates. <DT><I>Cannot use fix ttm with triclinic box</I> <DD>This is a current restriction of this fix due to the grid it creates. <DT><I>Cannot use fix wall in periodic dimension</I> <DD>Self-explanatory. <DT><I>Cannot use fix wall zlo/zhi for a 2d simulation</I> <DD>Self-explanatory. <DT><I>Cannot use fix wall/reflect in periodic dimension</I> <DD>Self-explanatory. <DT><I>Cannot use fix wall/reflect zlo/zhi for a 2d simulation</I> <DD>Self-explanatory. <DT><I>Cannot use fix wall/srd in periodic dimension</I> <DD>Self-explanatory. <DT><I>Cannot use fix wall/srd more than once</I> <DD>Nor is their a need to since multiple walls can be specified in one command. <DT><I>Cannot use fix wall/srd without fix srd</I> <DD>Self-explanatory. <DT><I>Cannot use fix wall/srd zlo/zhi for a 2d simulation</I> <DD>Self-explanatory. <DT><I>Cannot use force/hybrid_neigh with triclinic box</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use force/neigh with triclinic box</I> <DD>This is a current limitation of the GPU implementation in LAMMPS. <DT><I>Cannot use kspace solver on system with no charge</I> <DD>No atoms in system have a non-zero charge. <DT><I>Cannot use lines with fix srd unless overlap is set</I> -<DD>UNDOCUMENTED +<DD>This is because line segements are connected to each other. <DT><I>Cannot use neigh_modify exclude with GPU neighbor builds</I> <DD>This is a current limitation of the GPU implementation in LAMMPS. <DT><I>Cannot use neighbor bins - box size << cutoff</I> <DD>Too many neighbor bins will be created. This typically happens when the simulation box is very small in some dimension, compared to the neighbor cutoff. Use the "nsq" style instead of "bin" style. -<DT><I>Cannot use newton pair with buck/gpu pair style</I> - -<DD>UNDOCUMENTED - <DT><I>Cannot use newton pair with buck/coul/cut/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use newton pair with buck/coul/long/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. + +<DT><I>Cannot use newton pair with buck/gpu pair style</I> + +<DD>Self-explanatory. <DT><I>Cannot use newton pair with coul/long/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use newton pair with eam/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use newton pair with gayberne/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use newton pair with lj/charmm/coul/long/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use newton pair with lj/class2/coul/long/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use newton pair with lj/class2/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use newton pair with lj/cut/coul/cut/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use newton pair with lj/cut/coul/long/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use newton pair with lj/cut/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use newton pair with lj/expand/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. + +<DT><I>Cannot use newton pair with lj/sdk/coul/long/gpu pair style</I> + +<DD>Self-explanatory. + +<DT><I>Cannot use newton pair with lj/sdk/gpu pair style</I> + +<DD>Self-explanatory. <DT><I>Cannot use newton pair with lj96/cut/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use newton pair with morse/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use newton pair with resquared/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use newton pair with table/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use newton pair with yukawa/gpu pair style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use non-zero forces in an energy minimization</I> <DD>Fix setforce cannot be used in this manner. Use fix addforce instead. <DT><I>Cannot use nonperiodic boundares with fix ttm</I> <DD>This fix requires a fully periodic simulation box. <DT><I>Cannot use nonperiodic boundaries with Ewald</I> <DD>For kspace style ewald, all 3 dimensions must have periodic boundaries unless you use the kspace_modify command to define a 2d slab with a non-periodic z dimension. <DT><I>Cannot use nonperiodic boundaries with PPPM</I> <DD>For kspace style pppm, all 3 dimensions must have periodic boundaries unless you use the kspace_modify command to define a 2d slab with a non-periodic z dimension. <DT><I>Cannot use order greater than 8 with pppm/gpu.</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use pair hybrid with GPU neighbor builds</I> <DD>See documentation for fix gpu. <DT><I>Cannot use pair tail corrections with 2d simulations</I> <DD>The correction factors are only currently defined for 3d systems. <DT><I>Cannot use processors part command without using partitions</I> -<DD>UNDOCUMENTED +<DD>See the command-line -partition switch. <DT><I>Cannot use ramp in variable formula between runs</I> <DD>This is because the ramp() function is time dependent. <DT><I>Cannot use region INF or EDGE when box does not exist</I> <DD>Regions that extend to the box boundaries can only be used after the create_box command has been used. <DT><I>Cannot use set atom with no atom IDs defined</I> <DD>Atom IDs are not defined, so they cannot be used to identify an atom. <DT><I>Cannot use set mol with no molecule IDs defined</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Cannot use swiggle in variable formula between runs</I> <DD>This is a function of elapsed time. <DT><I>Cannot use tris with fix srd unless overlap is set</I> -<DD>UNDOCUMENTED +<DD>This is because triangles are connected to each other. <DT><I>Cannot use variable energy with constant force in fix addforce</I> <DD>This is because for constant force, LAMMPS can compute the change in energy directly. <DT><I>Cannot use variable every setting for dump dcd</I> <DD>The format of DCD dump files requires snapshots be output at a constant frequency. <DT><I>Cannot use variable every setting for dump xtc</I> <DD>The format of this file requires snapshots at regular intervals. <DT><I>Cannot use vdisplace in variable formula between runs</I> <DD>This is a function of elapsed time. <DT><I>Cannot use velocity create loop all unless atoms have IDs</I> <DD>Atoms in the simulation to do not have IDs, so this style of velocity creation cannot be performed. <DT><I>Cannot use wall in periodic dimension</I> <DD>Self-explanatory. <DT><I>Cannot wiggle and shear fix wall/gran</I> <DD>Cannot specify both options at the same time. <DT><I>Cannot zero Langevin force of 0 atoms</I> -<DD>UNDOCUMENTED +<DD>The group has zero atoms, so you cannot request its force +be zeroed. <DT><I>Cannot zero momentum of 0 atoms</I> <DD>The collection of atoms for which momentum is being computed has no atoms. <DT><I>Change_box command before simulation box is defined</I> <DD>Self-explanatory. -<DT><I>Change_box operation is invalid</I> +<DT><I>Change_box volume used incorrectly</I> -<DD>Cannot change orthogonal box to orthogonal or a triclinic box to -triclinic. +<DD>The "dim volume" option must be used immediately following one or two +settings for "dim1 ..." (and optionally "dim2 ...") and must be for a +different dimension, i.e. dim != dim1 and dim != dim2. <DT><I>Communicate group != atom_modify first group</I> <DD>Self-explanatory. <DT><I>Compute ID for compute atom/molecule does not exist</I> <DD>Self-explanatory. <DT><I>Compute ID for compute reduce does not exist</I> <DD>Self-explanatory. <DT><I>Compute ID for compute slice does not exist</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Compute ID for fix ave/atom does not exist</I> <DD>Self-explanatory. <DT><I>Compute ID for fix ave/correlate does not exist</I> <DD>Self-explanatory. <DT><I>Compute ID for fix ave/histo does not exist</I> <DD>Self-explanatory. <DT><I>Compute ID for fix ave/spatial does not exist</I> <DD>Self-explanatory. <DT><I>Compute ID for fix ave/time does not exist</I> <DD>Self-explanatory. <DT><I>Compute ID for fix store/state does not exist</I> <DD>Self-explanatory. <DT><I>Compute ID must be alphanumeric or underscore characters</I> <DD>Self-explanatory. <DT><I>Compute angle/local used when angles are not allowed</I> <DD>The atom style does not support angles. <DT><I>Compute atom/molecule compute array is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Compute atom/molecule compute does not calculate a per-atom array</I> <DD>Self-explanatory. <DT><I>Compute atom/molecule compute does not calculate a per-atom vector</I> <DD>Self-explanatory. <DT><I>Compute atom/molecule compute does not calculate per-atom values</I> <DD>Self-explanatory. <DT><I>Compute atom/molecule fix array is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Compute atom/molecule fix does not calculate a per-atom array</I> <DD>Self-explanatory. <DT><I>Compute atom/molecule fix does not calculate a per-atom vector</I> <DD>Self-explanatory. <DT><I>Compute atom/molecule fix does not calculate per-atom values</I> <DD>Self-explanatory. <DT><I>Compute atom/molecule requires molecular atom style</I> <DD>Self-explanatory. <DT><I>Compute atom/molecule variable is not atom-style variable</I> <DD>Self-explanatory. <DT><I>Compute bond/local used when bonds are not allowed</I> <DD>The atom style does not support bonds. <DT><I>Compute centro/atom requires a pair style be defined</I> <DD>This is because the computation of the centro-symmetry values uses a pairwise neighbor list. <DT><I>Compute cluster/atom cutoff is longer than pairwise cutoff</I> <DD>Cannot identify clusters beyond cutoff. <DT><I>Compute cluster/atom requires a pair style be defined</I> <DD>This is so that the pair style defines a cutoff distance which is used to find clusters. <DT><I>Compute cna/atom cutoff is longer than pairwise cutoff</I> <DD>Self-explantory. <DT><I>Compute cna/atom requires a pair style be defined</I> <DD>Self-explantory. <DT><I>Compute com/molecule requires molecular atom style</I> <DD>Self-explanatory. <DT><I>Compute coord/atom cutoff is longer than pairwise cutoff</I> <DD>Cannot compute coordination at distances longer than the pair cutoff, since those atoms are not in the neighbor list. <DT><I>Compute coord/atom requires a pair style be defined</I> <DD>Self-explantory. <DT><I>Compute damage/atom requires peridynamic potential</I> <DD>Damage is a Peridynamic-specific metric. It requires you to be running a Peridynamics simulation. <DT><I>Compute dihedral/local used when dihedrals are not allowed</I> <DD>The atom style does not support dihedrals. <DT><I>Compute does not allow an extra compute or fix to be reset</I> <DD>This is an internal LAMMPS error. Please report it to the developers. <DT><I>Compute erotate/asphere requires atom style ellipsoid or line or tri</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Compute erotate/asphere requires extended particles</I> <DD>This compute cannot be used with point paritlces. <DT><I>Compute erotate/sphere requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Compute event/displace has invalid fix event assigned</I> <DD>This is an internal LAMMPS error. Please report it to the developers. <DT><I>Compute group/group group ID does not exist</I> <DD>Self-explanatory. <DT><I>Compute gyration/molecule requires molecular atom style</I> <DD>Self-explanatory. <DT><I>Compute heat/flux compute ID does not compute ke/atom</I> <DD>Self-explanatory. <DT><I>Compute heat/flux compute ID does not compute pe/atom</I> <DD>Self-explanatory. <DT><I>Compute heat/flux compute ID does not compute stress/atom</I> <DD>Self-explanatory. <DT><I>Compute improper/local used when impropers are not allowed</I> <DD>The atom style does not support impropers. <DT><I>Compute msd/molecule requires molecular atom style</I> <DD>Self-explanatory. <DT><I>Compute nve/asphere requires atom style ellipsoid</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Compute nvt/nph/npt asphere requires atom style ellipsoid</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Compute pair must use group all</I> <DD>Pair styles accumlate energy on all atoms. <DT><I>Compute pe must use group all</I> <DD>Energies computed by potentials (pair, bond, etc) are computed on all atoms. <DT><I>Compute pressure must use group all</I> <DD>Virial contributions computed by potentials (pair, bond, etc) are computed on all atoms. <DT><I>Compute pressure temperature ID does not compute temperature</I> <DD>The compute ID assigned to a pressure computation must compute temperature. <DT><I>Compute property/atom for atom property that isn't allocated</I> <DD>Self-explanatory. <DT><I>Compute property/local cannot use these inputs together</I> <DD>Only inputs that generate the same number of datums can be used togther. E.g. bond and angle quantities cannot be mixed. <DT><I>Compute property/local for property that isn't allocated</I> <DD>Self-explanatory. <DT><I>Compute property/molecule requires molecular atom style</I> <DD>Self-explanatory. <DT><I>Compute rdf requires a pair style be defined</I> <DD>Self-explanatory. <DT><I>Compute reduce compute array is accessed out-of-range</I> -<DD>Self-explanatory. +<DD>An index for the array is out of bounds. <DT><I>Compute reduce compute calculates global values</I> <DD>A compute that calculates peratom or local values is required. <DT><I>Compute reduce compute does not calculate a local array</I> <DD>Self-explanatory. <DT><I>Compute reduce compute does not calculate a local vector</I> <DD>Self-explanatory. <DT><I>Compute reduce compute does not calculate a per-atom array</I> <DD>Self-explanatory. <DT><I>Compute reduce compute does not calculate a per-atom vector</I> <DD>Self-explanatory. <DT><I>Compute reduce fix array is accessed out-of-range</I> -<DD>Self-explanatory. +<DD>An index for the array is out of bounds. <DT><I>Compute reduce fix calculates global values</I> <DD>A fix that calculates peratom or local values is required. <DT><I>Compute reduce fix does not calculate a local array</I> <DD>Self-explanatory. <DT><I>Compute reduce fix does not calculate a local vector</I> <DD>Self-explanatory. <DT><I>Compute reduce fix does not calculate a per-atom array</I> <DD>Self-explanatory. <DT><I>Compute reduce fix does not calculate a per-atom vector</I> <DD>Self-explanatory. <DT><I>Compute reduce replace requires min or max mode</I> <DD>Self-explanatory. <DT><I>Compute reduce variable is not atom-style variable</I> <DD>Self-explanatory. <DT><I>Compute slice compute array is accessed out-of-range</I> -<DD>UNDOCUMENTED +<DD>An index for the array is out of bounds. <DT><I>Compute slice compute does not calculate a global array</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Compute slice compute does not calculate a global vector</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Compute slice compute does not calculate global vector or array</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Compute slice compute vector is accessed out-of-range</I> -<DD>UNDOCUMENTED +<DD>The index for the vector is out of bounds. <DT><I>Compute slice fix array is accessed out-of-range</I> -<DD>UNDOCUMENTED +<DD>An index for the array is out of bounds. <DT><I>Compute slice fix does not calculate a global array</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Compute slice fix does not calculate a global vector</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Compute slice fix does not calculate global vector or array</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Compute slice fix vector is accessed out-of-range</I> -<DD>UNDOCUMENTED +<DD>The index for the vector is out of bounds. <DT><I>Compute temp/asphere requires atom style ellipsoid</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Compute temp/asphere requires extended particles</I> <DD>This compute cannot be used with point paritlces. <DT><I>Compute temp/partial cannot use vz for 2d systemx</I> <DD>Self-explanatory. <DT><I>Compute temp/profile cannot bin z for 2d systems</I> <DD>Self-explanatory. <DT><I>Compute temp/profile cannot use vz for 2d systemx</I> <DD>Self-explanatory. <DT><I>Compute temp/sphere requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Compute ti kspace style does not exist</I> <DD>Self-explanatory. <DT><I>Compute ti pair style does not exist</I> <DD>Self-explanatory. <DT><I>Compute ti tail when pair style does not compute tail corrections</I> <DD>Self-explanatory. <DT><I>Compute used in variable between runs is not current</I> <DD>Computes cannot be invoked by a variable in between runs. Thus they must have been evaluated on the last timestep of the previous run in order for their value(s) to be accessed. See the doc page for the variable command for more info. <DT><I>Compute used in variable thermo keyword between runs is not current</I> <DD>Some thermo keywords rely on a compute to calculate their value(s). Computes cannot be invoked by a variable in between runs. Thus they must have been evaluated on the last timestep of the previous run in order for their value(s) to be accessed. See the doc page for the variable command for more info. <DT><I>Computed temperature for fix temp/berendsen cannot be 0.0</I> <DD>Self-explanatory. <DT><I>Computed temperature for fix temp/rescale cannot be 0.0</I> <DD>Cannot rescale the temperature to a new value if the current temperature is 0.0. <DT><I>Could not count initial bonds in fix bond/create</I> <DD>Could not find one of the atoms in a bond on this processor. <DT><I>Could not create 3d FFT plan</I> <DD>The FFT setup in pppm failed. <DT><I>Could not create 3d grid of processors</I> -<DD>UNDOCUMENTED +<DD>The specified constraints did not allow a Px by Py by Pz grid to be +created where Px * Py * Pz = P = total number of processors. <DT><I>Could not create 3d remap plan</I> <DD>The FFT setup in pppm failed. -<DT><I>Could not create numa 3d grid of processors</I> - -<DD>UNDOCUMENTED - <DT><I>Could not create numa grid of processors</I> -<DD>UNDOCUMENTED +<DD>The specified constraints did not allow this style of grid to be +created. Usually this is because the total processor count is not a +multiple of the cores/node or the user specified processor count is > +1 in one of the dimensions. <DT><I>Could not create twolevel 3d grid of processors</I> -<DD>UNDOCUMENTED +<DD>The specified constraints did not allow this style of grid to be +created. <DT><I>Could not find atom_modify first group ID</I> <DD>Self-explanatory. +<DT><I>Could not find change_box group ID</I> + +<DD>Group ID used in the change_box command does not exist. + <DT><I>Could not find compute ID for PRD</I> <DD>Self-explanatory. <DT><I>Could not find compute ID for TAD</I> <DD>Self-explanatory. <DT><I>Could not find compute ID for temperature bias</I> <DD>Self-explanatory. <DT><I>Could not find compute ID to delete</I> <DD>Self-explanatory. <DT><I>Could not find compute displace/atom fix ID</I> <DD>Self-explanatory. <DT><I>Could not find compute event/displace fix ID</I> <DD>Self-explanatory. <DT><I>Could not find compute group ID</I> <DD>Self-explanatory. <DT><I>Could not find compute heat/flux compute ID</I> <DD>Self-explanatory. <DT><I>Could not find compute msd fix ID</I> <DD>Self-explanatory. <DT><I>Could not find compute pressure temperature ID</I> <DD>The compute ID for calculating temperature does not exist. <DT><I>Could not find compute_modify ID</I> <DD>Self-explanatory. <DT><I>Could not find delete_atoms group ID</I> <DD>Group ID used in the delete_atoms command does not exist. <DT><I>Could not find delete_atoms region ID</I> <DD>Region ID used in the delete_atoms command does not exist. <DT><I>Could not find displace_atoms group ID</I> <DD>Group ID used in the displace_atoms command does not exist. -<DT><I>Could not find displace_box group ID</I> - -<DD>Group ID used in the displace_box command does not exist. - <DT><I>Could not find dump custom compute ID</I> <DD>The compute ID needed by dump custom to compute a per-atom quantity does not exist. <DT><I>Could not find dump custom fix ID</I> <DD>Self-explanatory. <DT><I>Could not find dump custom variable name</I> <DD>Self-explanatory. <DT><I>Could not find dump group ID</I> <DD>A group ID used in the dump command does not exist. <DT><I>Could not find dump local compute ID</I> <DD>Self-explanatory. <DT><I>Could not find dump local fix ID</I> <DD>Self-explanatory. <DT><I>Could not find dump modify compute ID</I> <DD>Self-explanatory. <DT><I>Could not find dump modify fix ID</I> <DD>Self-explanatory. <DT><I>Could not find dump modify variable name</I> <DD>Self-explanatory. <DT><I>Could not find fix ID to delete</I> <DD>Self-explanatory. <DT><I>Could not find fix group ID</I> <DD>A group ID used in the fix command does not exist. <DT><I>Could not find fix msst compute ID</I> <DD>Self-explanatory. <DT><I>Could not find fix poems group ID</I> <DD>A group ID used in the fix poems command does not exist. <DT><I>Could not find fix recenter group ID</I> <DD>A group ID used in the fix recenter command does not exist. <DT><I>Could not find fix rigid group ID</I> <DD>A group ID used in the fix rigid command does not exist. <DT><I>Could not find fix srd group ID</I> <DD>Self-explanatory. <DT><I>Could not find fix_modify ID</I> <DD>A fix ID used in the fix_modify command does not exist. <DT><I>Could not find fix_modify pressure ID</I> <DD>The compute ID for computing pressure does not exist. <DT><I>Could not find fix_modify temperature ID</I> <DD>The compute ID for computing temperature does not exist. <DT><I>Could not find group delete group ID</I> <DD>Self-explanatory. <DT><I>Could not find set group ID</I> <DD>Group ID specified in set command does not exist. <DT><I>Could not find thermo compute ID</I> <DD>Compute ID specified in thermo_style command does not exist. <DT><I>Could not find thermo custom compute ID</I> <DD>The compute ID needed by thermo style custom to compute a requested quantity does not exist. <DT><I>Could not find thermo custom fix ID</I> <DD>The fix ID needed by thermo style custom to compute a requested quantity does not exist. <DT><I>Could not find thermo custom variable name</I> <DD>Self-explanatory. <DT><I>Could not find thermo fix ID</I> <DD>Fix ID specified in thermo_style command does not exist. +<DT><I>Could not find thermo variable name</I> + +<DD>Self-explanatory. + <DT><I>Could not find thermo_modify pressure ID</I> <DD>The compute ID needed by thermo style custom to compute pressure does not exist. <DT><I>Could not find thermo_modify temperature ID</I> <DD>The compute ID needed by thermo style custom to compute temperature does not exist. <DT><I>Could not find undump ID</I> <DD>A dump ID used in the undump command does not exist. <DT><I>Could not find velocity group ID</I> <DD>A group ID used in the velocity command does not exist. <DT><I>Could not find velocity temperature ID</I> <DD>The compute ID needed by the velocity command to compute temperature does not exist. +<DT><I>Could not find/initialize a specified accelerator device</I> + +<DD>UNDOCUMENTED + <DT><I>Could not grab element entry from EIM potential file</I> <DD>Self-explanatory <DT><I>Could not grab global entry from EIM potential file</I> <DD>Self-explanatory. <DT><I>Could not grab pair entry from EIM potential file</I> <DD>Self-explanatory. <DT><I>Coulomb cutoffs of pair hybrid sub-styles do not match</I> <DD>If using a Kspace solver, all Coulomb cutoffs of long pair styles must be the same. <DT><I>Cound not find dump_modify ID</I> <DD>Self-explanatory. <DT><I>Create_atoms command before simulation box is defined</I> <DD>The create_atoms command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Create_atoms region ID does not exist</I> <DD>A region ID used in the create_atoms command does not exist. <DT><I>Create_box region ID does not exist</I> <DD>A region ID used in the create_box command does not exist. <DT><I>Create_box region does not support a bounding box</I> <DD>Not all regions represent bounded volumes. You cannot use such a region with the create_box command. <DT><I>Cyclic loop in joint connections</I> <DD>Fix poems cannot (yet) work with coupled bodies whose joints connect the bodies in a ring (or cycle). <DT><I>Degenerate lattice primitive vectors</I> <DD>Invalid set of 3 lattice vectors for lattice command. <DT><I>Delete region ID does not exist</I> <DD>Self-explanatory. <DT><I>Delete_atoms command before simulation box is defined</I> <DD>The delete_atoms command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Delete_atoms cutoff > neighbor cutoff</I> <DD>Cannot delete atoms further away than a processor knows about. <DT><I>Delete_atoms requires a pair style be defined</I> <DD>This is because atom deletion within a cutoff uses a pairwise neighbor list. <DT><I>Delete_bonds command before simulation box is defined</I> <DD>The delete_bonds command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Delete_bonds command with no atoms existing</I> <DD>No atoms are yet defined so the delete_bonds command cannot be used. <DT><I>Deposition region extends outside simulation box</I> <DD>Self-explanatory. <DT><I>Did not assign all atoms correctly</I> <DD>Atoms read in from a data file were not assigned correctly to processors. This is likely due to some atom coordinates being outside a non-periodic simulation box. <DT><I>Did not find all elements in MEAM library file</I> <DD>The requested elements were not found in the MEAM file. <DT><I>Did not find fix shake partner info</I> <DD>Could not find bond partners implied by fix shake command. This error can be triggered if the delete_bonds command was used before fix shake, and it removed bonds without resetting the 1-2, 1-3, 1-4 weighting list via the special keyword. <DT><I>Did not find keyword in table file</I> <DD>Keyword used in pair_coeff command was not found in table file. <DT><I>Did not set temp for fix rigid/nvt</I> <DD>The temp keyword must be used. <DT><I>Dihedral atom missing in delete_bonds</I> <DD>The delete_bonds command cannot find one or more atoms in a particular dihedral on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid dihedral. <DT><I>Dihedral atom missing in set command</I> <DD>The set command cannot find one or more atoms in a particular dihedral on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid dihedral. <DT><I>Dihedral atoms %d %d %d %d missing on proc %d at step %ld</I> <DD>One or more of 4 atoms needed to compute a particular dihedral are missing on this processor. Typically this is because the pairwise cutoff is set too short or the dihedral has blown apart and an atom is -too far away. :dd +too far away. <DT><I>Dihedral charmm is incompatible with Pair style</I> <DD>Dihedral style charmm must be used with a pair style charmm in order for the 1-4 epsilon/sigma parameters to be defined. <DT><I>Dihedral coeff for hybrid has invalid style</I> <DD>Dihedral style hybrid uses another dihedral style as one of its coefficients. The dihedral style used in the dihedral_coeff command or read from a restart file is not recognized. <DT><I>Dihedral coeffs are not set</I> <DD>No dihedral coefficients have been assigned in the data file or via the dihedral_coeff command. <DT><I>Dihedral style hybrid cannot have hybrid as an argument</I> <DD>Self-explanatory. <DT><I>Dihedral style hybrid cannot have none as an argument</I> <DD>Self-explanatory. <DT><I>Dihedral style hybrid cannot use same dihedral style twice</I> <DD>Self-explanatory. <DT><I>Dihedral_coeff command before dihedral_style is defined</I> <DD>Coefficients cannot be set in the data file or via the dihedral_coeff command until an dihedral_style has been assigned. <DT><I>Dihedral_coeff command before simulation box is defined</I> <DD>The dihedral_coeff command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Dihedral_coeff command when no dihedrals allowed</I> <DD>The chosen atom style does not allow for dihedrals to be defined. <DT><I>Dihedral_style command when no dihedrals allowed</I> <DD>The chosen atom style does not allow for dihedrals to be defined. <DT><I>Dihedrals assigned incorrectly</I> <DD>Dihedrals read in from the data file were not assigned correctly to atoms. This means there is something invalid about the topology definitions. <DT><I>Dihedrals defined but no dihedral types</I> <DD>The data file header lists dihedrals but no dihedral types. <DT><I>Dimension command after simulation box is defined</I> <DD>The dimension command cannot be used after a read_data, read_restart, or create_box command. <DT><I>Displace_atoms command before simulation box is defined</I> <DD>The displace_atoms command cannot be used before a read_data, read_restart, or create_box command. -<DT><I>Displace_box command before simulation box is defined</I> - -<DD>Self-explanatory. - -<DT><I>Displace_box tilt factors require triclinic box</I> - -<DD>Cannot use tilt factors unless the simulation box is -non-orthogonal. - <DT><I>Distance must be > 0 for compute event/displace</I> <DD>Self-explanatory. <DT><I>Divide by 0 in influence function of pair peri/lps</I> <DD>This should not normally occur. It is likely a problem with your model. <DT><I>Divide by 0 in variable formula</I> <DD>Self-explanatory. <DT><I>Domain too large for neighbor bins</I> <DD>The domain has become extremely large so that neighbor bins cannot be used. Most likely, one or more atoms have been blown out of the simulation box to a great distance. -<DT><I>Dump cfg arguments can not mix xs|ys|zs with xsu|ysu|zsu</I> +<DT><I>Double precision is not supported on this accelerator</I> <DD>UNDOCUMENTED +<DT><I>Dump cfg arguments can not mix xs|ys|zs with xsu|ysu|zsu</I> + +<DD>Self-explanatory. + <DT><I>Dump cfg arguments must start with 'id type xs ys zs' or 'id type xsu ysu zsu'</I> -<DD>This is a requirement of the CFG output format. :dd +<DD>This is a requirement of the CFG output format. <DT><I>Dump cfg requires one snapshot per file</I> <DD>Use the wildcard "*" character in the filename. <DT><I>Dump custom and fix not computed at compatible times</I> <DD>The fix must produce per-atom quantities on timesteps that dump custom needs them. <DT><I>Dump custom compute does not calculate per-atom array</I> <DD>Self-explanatory. <DT><I>Dump custom compute does not calculate per-atom vector</I> <DD>Self-explanatory. <DT><I>Dump custom compute does not compute per-atom info</I> <DD>Self-explanatory. <DT><I>Dump custom compute vector is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Dump custom fix does not compute per-atom array</I> <DD>Self-explanatory. <DT><I>Dump custom fix does not compute per-atom info</I> <DD>Self-explanatory. <DT><I>Dump custom fix does not compute per-atom vector</I> <DD>Self-explanatory. <DT><I>Dump custom fix vector is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Dump custom variable is not atom-style variable</I> <DD>Only atom-style variables generate per-atom quantities, needed for dump output. <DT><I>Dump dcd of non-matching # of atoms</I> <DD>Every snapshot written by dump dcd must contain the same # of atoms. <DT><I>Dump dcd requires sorting by atom ID</I> <DD>Use the dump_modify sort command to enable this. <DT><I>Dump every variable returned a bad timestep</I> <DD>The variable must return a timestep greater than the current timestep. <DT><I>Dump image bond not allowed with no bond types</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Dump image cannot perform sorting</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Dump image persp option is not yet supported</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Dump image requires one snapshot per file</I> -<DD>UNDOCUMENTED +<DD>Use a "*" in the filename. <DT><I>Dump local and fix not computed at compatible times</I> <DD>The fix must produce per-atom quantities on timesteps that dump local needs them. <DT><I>Dump local attributes contain no compute or fix</I> <DD>Self-explanatory. <DT><I>Dump local cannot sort by atom ID</I> <DD>This is because dump local does not really dump per-atom info. <DT><I>Dump local compute does not calculate local array</I> <DD>Self-explanatory. <DT><I>Dump local compute does not calculate local vector</I> <DD>Self-explanatory. <DT><I>Dump local compute does not compute local info</I> <DD>Self-explanatory. <DT><I>Dump local compute vector is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Dump local count is not consistent across input fields</I> <DD>Every column of output must be the same length. <DT><I>Dump local fix does not compute local array</I> <DD>Self-explanatory. <DT><I>Dump local fix does not compute local info</I> <DD>Self-explanatory. <DT><I>Dump local fix does not compute local vector</I> <DD>Self-explanatory. <DT><I>Dump local fix vector is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Dump modify bcolor not allowed with no bond types</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Dump modify bdiam not allowed with no bond types</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Dump modify compute ID does not compute per-atom array</I> <DD>Self-explanatory. <DT><I>Dump modify compute ID does not compute per-atom info</I> <DD>Self-explanatory. <DT><I>Dump modify compute ID does not compute per-atom vector</I> <DD>Self-explanatory. <DT><I>Dump modify compute ID vector is not large enough</I> <DD>Self-explanatory. <DT><I>Dump modify element names do not match atom types</I> <DD>Number of element names must equal number of atom types. <DT><I>Dump modify fix ID does not compute per-atom array</I> <DD>Self-explanatory. <DT><I>Dump modify fix ID does not compute per-atom info</I> <DD>Self-explanatory. <DT><I>Dump modify fix ID does not compute per-atom vector</I> <DD>Self-explanatory. <DT><I>Dump modify fix ID vector is not large enough</I> <DD>Self-explanatory. <DT><I>Dump modify variable is not atom-style variable</I> <DD>Self-explanatory. <DT><I>Dump sort column is invalid</I> <DD>Self-explanatory. <DT><I>Dump xtc requires sorting by atom ID</I> <DD>Use the dump_modify sort command to enable this. <DT><I>Dump_modify region ID does not exist</I> <DD>Self-explanatory. <DT><I>Dumping an atom property that isn't allocated</I> <DD>The chosen atom style does not define the per-atom quantity being dumped. <DT><I>Dumping an atom quantity that isn't allocated</I> <DD>Only per-atom quantities that are defined for the atom style being used are allowed. <DT><I>Duplicate particle in PeriDynamic bond - simulation box is too small</I> <DD>This is likely because your box length is shorter than 2 times the bond length. <DT><I>Electronic temperature dropped below zero</I> <DD>Something has gone wrong with the fix ttm electron temperature model. <DT><I>Empty brackets in variable</I> <DD>There is no variable syntax that uses empty brackets. Check the variable doc page. <DT><I>Energy was not tallied on needed timestep</I> <DD>You are using a thermo keyword that requires potentials to have tallied energy, but they didn't on this timestep. See the variable doc page for ideas on how to make this work. <DT><I>Expected floating point parameter in input script or data file</I> <DD>The quantity being read is an integer on non-numeric value. <DT><I>Expected floating point parameter in variable definition</I> <DD>The quantity being read is a non-numeric value. <DT><I>Expected integer parameter in input script or data file</I> <DD>The quantity being read is a floating point or non-numeric value. <DT><I>Expected integer parameter in variable definition</I> <DD>The quantity being read is a floating point or non-numeric value. <DT><I>Failed to allocate %ld bytes for array %s</I> <DD>Your LAMMPS simulation has run out of memory. You need to run a -smaller simulation or on more processors. :dd +smaller simulation or on more processors. <DT><I>Failed to reallocate %ld bytes for array %s</I> <DD>Your LAMMPS simulation has run out of memory. You need to run a -smaller simulation or on more processors. :dd +smaller simulation or on more processors. <DT><I>Fewer SRD bins than processors in some dimension</I> <DD>This is not allowed. Make your SRD bin size smaller. <DT><I>Final box dimension due to fix deform is < 0.0</I> <DD>Self-explanatory. <DT><I>Fix GCMC incompatible with given pair_style</I> <DD>UNDOCUMENTED <DT><I>Fix GCMC molecule command requires atom attribute molecule</I> <DD>UNDOCUMENTED <DT><I>Fix GCMC molecule feature does not yet work</I> <DD>UNDOCUMENTED <DT><I>Fix GPU split must be positive for hybrid pair styles</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix ID for compute atom/molecule does not exist</I> <DD>Self-explanatory. <DT><I>Fix ID for compute reduce does not exist</I> <DD>Self-explanatory. <DT><I>Fix ID for compute slice does not exist</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix ID for fix ave/atom does not exist</I> <DD>Self-explanatory. <DT><I>Fix ID for fix ave/correlate does not exist</I> <DD>Self-explanatory. <DT><I>Fix ID for fix ave/histo does not exist</I> <DD>Self-explanatory. <DT><I>Fix ID for fix ave/spatial does not exist</I> <DD>Self-explanatory. <DT><I>Fix ID for fix ave/time does not exist</I> <DD>Self-explanatory. <DT><I>Fix ID for fix store/state does not exist</I> <DD>Self-explanatory <DT><I>Fix ID must be alphanumeric or underscore characters</I> <DD>Self-explanatory. <DT><I>Fix SRD no-slip requires atom attribute torque</I> <DD>This is because the SRD collisions will impart torque to the solute particles. <DT><I>Fix SRD: bad bin assignment for SRD advection</I> <DD>Something has gone wrong in your SRD model; try using more conservative settings. <DT><I>Fix SRD: bad search bin assignment</I> <DD>Something has gone wrong in your SRD model; try using more conservative settings. <DT><I>Fix SRD: bad stencil bin for big particle</I> <DD>Something has gone wrong in your SRD model; try using more conservative settings. <DT><I>Fix SRD: too many big particles in bin</I> <DD>Reset the ATOMPERBIN parameter at the top of fix_srd.cpp to a larger value, and re-compile the code. <DT><I>Fix SRD: too many walls in bin</I> <DD>This should not happen unless your system has been setup incorrectly. <DT><I>Fix adapt kspace style does not exist</I> <DD>Self-explanatory. <DT><I>Fix adapt pair style does not exist</I> <DD>Self-explanatory <DT><I>Fix adapt pair style param not supported</I> <DD>The pair style does not know about the parameter you specified. <DT><I>Fix adapt requires atom attribute diameter</I> <DD>The atom style being used does not specify an atom diameter. <DT><I>Fix adapt type pair range is not valid for pair hybrid sub-style</I> <DD>Self-explanatory. <DT><I>Fix ave/atom compute array is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Fix ave/atom compute does not calculate a per-atom array</I> <DD>Self-explanatory. <DT><I>Fix ave/atom compute does not calculate a per-atom vector</I> <DD>A compute used by fix ave/atom must generate per-atom values. <DT><I>Fix ave/atom compute does not calculate per-atom values</I> <DD>A compute used by fix ave/atom must generate per-atom values. <DT><I>Fix ave/atom fix array is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Fix ave/atom fix does not calculate a per-atom array</I> <DD>Self-explanatory. <DT><I>Fix ave/atom fix does not calculate a per-atom vector</I> <DD>A fix used by fix ave/atom must generate per-atom values. <DT><I>Fix ave/atom fix does not calculate per-atom values</I> <DD>A fix used by fix ave/atom must generate per-atom values. <DT><I>Fix ave/atom variable is not atom-style variable</I> <DD>A variable used by fix ave/atom must generate per-atom values. <DT><I>Fix ave/correlate compute does not calculate a scalar</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix ave/correlate compute does not calculate a vector</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix ave/correlate compute vector is accessed out-of-range</I> -<DD>UNDOCUMENTED +<DD>The index for the vector is out of bounds. <DT><I>Fix ave/correlate fix does not calculate a scalar</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix ave/correlate fix does not calculate a vector</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix ave/correlate fix vector is accessed out-of-range</I> -<DD>UNDOCUMENTED +<DD>The index for the vector is out of bounds. <DT><I>Fix ave/correlate variable is not equal-style variable</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix ave/histo cannot input local values in scalar mode</I> <DD>Self-explanatory. <DT><I>Fix ave/histo cannot input per-atom values in scalar mode</I> <DD>Self-explanatory. <DT><I>Fix ave/histo compute array is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Fix ave/histo compute does not calculate a global array</I> <DD>Self-explanatory. <DT><I>Fix ave/histo compute does not calculate a global scalar</I> <DD>Self-explanatory. <DT><I>Fix ave/histo compute does not calculate a global vector</I> <DD>Self-explanatory. <DT><I>Fix ave/histo compute does not calculate a local array</I> <DD>Self-explanatory. <DT><I>Fix ave/histo compute does not calculate a local vector</I> <DD>Self-explanatory. <DT><I>Fix ave/histo compute does not calculate a per-atom array</I> <DD>Self-explanatory. <DT><I>Fix ave/histo compute does not calculate a per-atom vector</I> <DD>Self-explanatory. <DT><I>Fix ave/histo compute does not calculate local values</I> <DD>Self-explanatory. <DT><I>Fix ave/histo compute does not calculate per-atom values</I> <DD>Self-explanatory. <DT><I>Fix ave/histo compute vector is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Fix ave/histo fix array is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Fix ave/histo fix does not calculate a global array</I> <DD>Self-explanatory. <DT><I>Fix ave/histo fix does not calculate a global scalar</I> <DD>Self-explanatory. <DT><I>Fix ave/histo fix does not calculate a global vector</I> <DD>Self-explanatory. <DT><I>Fix ave/histo fix does not calculate a local array</I> <DD>Self-explanatory. <DT><I>Fix ave/histo fix does not calculate a local vector</I> <DD>Self-explanatory. <DT><I>Fix ave/histo fix does not calculate a per-atom array</I> <DD>Self-explanatory. <DT><I>Fix ave/histo fix does not calculate a per-atom vector</I> <DD>Self-explanatory. <DT><I>Fix ave/histo fix does not calculate local values</I> <DD>Self-explanatory. <DT><I>Fix ave/histo fix does not calculate per-atom values</I> <DD>Self-explanatory. <DT><I>Fix ave/histo fix vector is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Fix ave/histo input is invalid compute</I> <DD>Self-explanatory. <DT><I>Fix ave/histo input is invalid fix</I> <DD>Self-explanatory. <DT><I>Fix ave/histo input is invalid variable</I> <DD>Self-explanatory. <DT><I>Fix ave/histo inputs are not all global, peratom, or local</I> <DD>All inputs in a single fix ave/histo command must be of the same style. <DT><I>Fix ave/spatial compute does not calculate a per-atom array</I> <DD>Self-explanatory. <DT><I>Fix ave/spatial compute does not calculate a per-atom vector</I> <DD>A compute used by fix ave/spatial must generate per-atom values. <DT><I>Fix ave/spatial compute does not calculate per-atom values</I> <DD>A compute used by fix ave/spatial must generate per-atom values. <DT><I>Fix ave/spatial compute vector is accessed out-of-range</I> <DD>The index for the vector is out of bounds. <DT><I>Fix ave/spatial fix does not calculate a per-atom array</I> <DD>Self-explanatory. <DT><I>Fix ave/spatial fix does not calculate a per-atom vector</I> <DD>A fix used by fix ave/spatial must generate per-atom values. <DT><I>Fix ave/spatial fix does not calculate per-atom values</I> <DD>A fix used by fix ave/spatial must generate per-atom values. <DT><I>Fix ave/spatial fix vector is accessed out-of-range</I> <DD>The index for the vector is out of bounds. <DT><I>Fix ave/spatial for triclinic boxes requires units reduced</I> <DD>Self-explanatory. <DT><I>Fix ave/spatial settings invalid with changing box</I> <DD>If the ave setting is "running" or "window" and the box size/shape changes during the simulation, then the units setting must be "reduced", else the number of bins may change. <DT><I>Fix ave/spatial variable is not atom-style variable</I> <DD>A variable used by fix ave/spatial must generate per-atom values. <DT><I>Fix ave/time cannot set output array intensive/extensive from these inputs</I> <DD>One of more of the vector inputs has individual elements which are flagged as intensive or extensive. Such an input cannot be flagged as all intensive/extensive when turned into an array by fix ave/time. <DT><I>Fix ave/time cannot use variable with vector mode</I> <DD>Variables produce scalar values. <DT><I>Fix ave/time columns are inconsistent lengths</I> <DD>Self-explanatory. <DT><I>Fix ave/time compute array is accessed out-of-range</I> -<DD>Self-explanatory. +<DD>An index for the array is out of bounds. <DT><I>Fix ave/time compute does not calculate a scalar</I> -<DD>Only computes that calculate a scalar or vector quantity (not a -per-atom quantity) can be used with fix ave/time. +<DD>Self-explantory. <DT><I>Fix ave/time compute does not calculate a vector</I> -<DD>Only computes that calculate a scalar or vector quantity (not a -per-atom quantity) can be used with fix ave/time. +<DD>Self-explantory. <DT><I>Fix ave/time compute does not calculate an array</I> <DD>Self-explanatory. <DT><I>Fix ave/time compute vector is accessed out-of-range</I> <DD>The index for the vector is out of bounds. <DT><I>Fix ave/time fix array is accessed out-of-range</I> -<DD>Self-explanatory. +<DD>An index for the array is out of bounds. <DT><I>Fix ave/time fix does not calculate a scalar</I> -<DD>A fix used by fix ave/time must generate global values. +<DD>Self-explanatory. <DT><I>Fix ave/time fix does not calculate a vector</I> -<DD>A fix used by fix ave/time must generate global values. +<DD>Self-explanatory. <DT><I>Fix ave/time fix does not calculate an array</I> <DD>Self-explanatory. <DT><I>Fix ave/time fix vector is accessed out-of-range</I> <DD>The index for the vector is out of bounds. <DT><I>Fix ave/time variable is not equal-style variable</I> -<DD>A variable used by fix ave/time must generate a global value. +<DD>Self-explanatory. <DT><I>Fix bond/break requires special_bonds = 0,1,1</I> <DD>This is a restriction of the current fix bond/break implementation. <DT><I>Fix bond/create cutoff is longer than pairwise cutoff</I> <DD>This is not allowed because bond creation is done using the pairwise neighbor list. <DT><I>Fix bond/create requires special_bonds coul = 0,1,1</I> <DD>Self-explanatory. <DT><I>Fix bond/create requires special_bonds lj = 0,1,1</I> <DD>Self-explanatory. <DT><I>Fix bond/swap cannot use dihedral or improper styles</I> <DD>These styles cannot be defined when using this fix. <DT><I>Fix bond/swap requires pair and bond styles</I> <DD>Self-explanatory. <DT><I>Fix bond/swap requires special_bonds = 0,1,1</I> <DD>Self-explanatory. <DT><I>Fix box/relax generated negative box length</I> <DD>The pressure being applied is likely too large. Try applying it incrementally, to build to the high pressure. <DT><I>Fix command before simulation box is defined</I> <DD>The fix command cannot be used before a read_data, read_restart, or create_box command. -<DT><I>Fix deform is changing yz by too much with changing xy</I> +<DT><I>Fix deform cannot use yz variable with xy</I> + +<DD>The yz setting cannot be a variable if xy deformation is also +specified. This is because LAMMPS cannot determine if the yz setting +will induce a box flip which would be invalid if xy is also changing. + +<DT><I>Fix deform is changing yz too much with xy</I> <DD>When both yz and xy are changing, it induces changes in xz if the box must flip from one tilt extreme to another. Thus it is not allowed for yz to grow so much that a flip is induced. <DT><I>Fix deform tilt factors require triclinic box</I> <DD>Cannot deform the tilt factors of a simulation box unless it is a triclinic (non-orthogonal) box. <DT><I>Fix deform volume setting is invalid</I> <DD>Cannot use volume style unless other dimensions are being controlled. <DT><I>Fix deposit region cannot be dynamic</I> <DD>Only static regions can be used with fix deposit. <DT><I>Fix deposit region does not support a bounding box</I> <DD>Not all regions represent bounded volumes. You cannot use such a region with the fix deposit command. <DT><I>Fix efield requires atom attribute q</I> <DD>Self-explanatory. <DT><I>Fix evaporate molecule requires atom attribute molecule</I> <DD>The atom style being used does not define a molecule ID. <DT><I>Fix external callback function not set</I> <DD>This must be done by an external program in order to use this fix. <DT><I>Fix for fix ave/atom not computed at compatible time</I> <DD>Fixes generate their values on specific timesteps. Fix ave/atom is requesting a value on a non-allowed timestep. <DT><I>Fix for fix ave/correlate not computed at compatible time</I> <DD>Fixes generate their values on specific timesteps. Fix ave/correlate is requesting a value on a non-allowed timestep. <DT><I>Fix for fix ave/histo not computed at compatible time</I> <DD>Fixes generate their values on specific timesteps. Fix ave/histo is requesting a value on a non-allowed timestep. <DT><I>Fix for fix ave/spatial not computed at compatible time</I> <DD>Fixes generate their values on specific timesteps. Fix ave/spatial is requesting a value on a non-allowed timestep. <DT><I>Fix for fix ave/time not computed at compatible time</I> <DD>Fixes generate their values on specific timesteps. Fix ave/time is requesting a value on a non-allowed timestep. <DT><I>Fix for fix store/state not computed at compatible time</I> <DD>Fixes generate their values on specific timesteps. Fix store/state is requesting a value on a non-allowed timestep. <DT><I>Fix freeze requires atom attribute torque</I> <DD>The atom style defined does not have this attribute. <DT><I>Fix heat group has no atoms</I> <DD>Self-explanatory. <DT><I>Fix heat kinetic energy went negative</I> <DD>This will cause the velocity rescaling about to be performed by fix heat to be invalid. <DT><I>Fix in variable not computed at compatible time</I> <DD>Fixes generate their values on specific timesteps. The variable is requesting the values on a non-allowed timestep. -<DT><I>Fix langevin angmom require atom style ellipsoid</I> - -<DD>UNDOCUMENTED - <DT><I>Fix langevin angmom requires atom style ellipsoid</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix langevin angmom requires extended particles</I> -<DD>UNDOCUMENTED +<DD>This fix option cannot be used with point paritlces. -<DT><I>Fix langevin omega require atom style sphere</I> +<DT><I>Fix langevin omega requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix langevin omega requires extended particles</I> -<DD>UNDOCUMENTED +<DD>One of the particles has radius 0.0. <DT><I>Fix langevin period must be > 0.0</I> <DD>The time window for temperature relaxation must be > 0 <DT><I>Fix langevin variable returned negative temperature</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix momentum group has no atoms</I> <DD>Self-explanatory. <DT><I>Fix move cannot define z or vz variable for 2d problem</I> <DD>Self-explanatory. <DT><I>Fix move cannot have 0 length rotation vector</I> <DD>Self-explanatory. <DT><I>Fix move cannot rotate aroung non z-axis for 2d problem</I> <DD>Self-explanatory. <DT><I>Fix move cannot set linear z motion for 2d problem</I> <DD>Self-explanatory. <DT><I>Fix move cannot set wiggle z motion for 2d problem</I> <DD>Self-explanatory. <DT><I>Fix msst compute ID does not compute potential energy</I> <DD>Self-explanatory. <DT><I>Fix msst compute ID does not compute pressure</I> <DD>Self-explanatory. <DT><I>Fix msst compute ID does not compute temperature</I> <DD>Self-explanatory. <DT><I>Fix msst requires a periodic box</I> <DD>Self-explanatory. <DT><I>Fix msst tscale must satisfy 0 <= tscale < 1</I> <DD>Self-explanatory. <DT><I>Fix npt/nph has tilted box too far in one step - periodic cell is too far from equilibrium state</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. The change in the box tilt is too extreme +on a short timescale. <DT><I>Fix nve/asphere requires extended particles</I> <DD>This fix can only be used for particles with a shape setting. <DT><I>Fix nve/asphere/noforce requires atom style ellipsoid</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix nve/asphere/noforce requires extended particles</I> -<DD>UNDOCUMENTED +<DD>One of the particles is not an ellipsoid. <DT><I>Fix nve/line can only be used for 2d simulations</I> -<DD>UNDOCUMENTED - -<DT><I>Fix nve/line can only be used for 3d simulations</I> - -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix nve/line requires atom style line</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix nve/line requires line particles</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix nve/sphere requires atom attribute mu</I> <DD>An atom style with this attribute is needed. <DT><I>Fix nve/sphere requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix nve/sphere requires extended particles</I> <DD>This fix can only be used for particles of a finite size. +<DT><I>Fix nve/tri can only be used for 3d simulations</I> + +<DD>Self-explanatory. + <DT><I>Fix nve/tri requires atom style tri</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix nve/tri requires tri particles</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix nvt/nph/npt asphere requires extended particles</I> <DD>The shape setting for a particle in the fix group has shape = 0.0, which means it is a point particle. <DT><I>Fix nvt/nph/npt sphere requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix nvt/npt/nph damping parameters must be > 0.0</I> <DD>Self-explanatory. <DT><I>Fix nvt/sphere requires extended particles</I> <DD>This fix can only be used for particles of a finite size. <DT><I>Fix orient/fcc file open failed</I> <DD>The fix orient/fcc command could not open a specified file. <DT><I>Fix orient/fcc file read failed</I> <DD>The fix orient/fcc command could not read the needed parameters from a specified file. <DT><I>Fix orient/fcc found self twice</I> <DD>The neighbor lists used by fix orient/fcc are messed up. If this error occurs, it is likely a bug, so send an email to the <A HREF = "http://lammps.sandia.gov/authors.html">developers</A>. <DT><I>Fix peri neigh does not exist</I> <DD>Somehow a fix that the pair style defines has been deleted. <DT><I>Fix pour region ID does not exist</I> <DD>Self-explanatory. <DT><I>Fix pour region cannot be dynamic</I> <DD>Only static regions can be used with fix pour. <DT><I>Fix pour region does not support a bounding box</I> <DD>Not all regions represent bounded volumes. You cannot use such a region with the fix pour command. <DT><I>Fix pour requires atom attributes radius, rmass</I> <DD>The atom style defined does not have these attributes. <DT><I>Fix press/berendsen damping parameters must be > 0.0</I> <DD>Self-explanatory. <DT><I>Fix qeq/comb group has no atoms</I> <DD>Self-explanatory. <DT><I>Fix qeq/comb requires atom attribute q</I> <DD>An atom style with charge must be used to perform charge equilibration. <DT><I>Fix reax/bonds numbonds > nsbmax_most</I> <DD>The limit of the number of bonds expected by the ReaxFF force field was exceeded. <DT><I>Fix recenter group has no atoms</I> <DD>Self-explanatory. <DT><I>Fix restrain requires an atom map, see atom_modify</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix rigid atom has non-zero image flag in a non-periodic dimension</I> <DD>You cannot set image flags for non-periodic dimensions. <DT><I>Fix rigid langevin period must be > 0.0</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix rigid molecule requires atom attribute molecule</I> <DD>Self-explanatory. <DT><I>Fix rigid xy torque cannot be on for 2d simulation</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix rigid z force cannot be on for 2d simulation</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix rigid/nvt period must be > 0.0</I> <DD>Self-explanatory <DT><I>Fix rigid: Bad principal moments</I> <DD>The principal moments of inertia computed for a rigid body are not within the required tolerances. <DT><I>Fix shake cannot be used with minimization</I> <DD>Cannot use fix shake while doing an energy minimization since it turns off bonds that should contribute to the energy. <DT><I>Fix spring couple group ID does not exist</I> <DD>Self-explanatory. <DT><I>Fix srd lamda must be >= 0.6 of SRD grid size</I> <DD>This is a requirement for accuracy reasons. <DT><I>Fix srd requires SRD particles all have same mass</I> <DD>Self-explanatory. <DT><I>Fix srd requires ghost atoms store velocity</I> <DD>Use the communicate vel yes command to enable this. <DT><I>Fix srd requires newton pair on</I> <DD>Self-explanatory. <DT><I>Fix store/state compute array is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Fix store/state compute does not calculate a per-atom array</I> <DD>The compute calculates a per-atom vector. <DT><I>Fix store/state compute does not calculate a per-atom vector</I> <DD>The compute calculates a per-atom vector. <DT><I>Fix store/state compute does not calculate per-atom values</I> <DD>Computes that calculate global or local quantities cannot be used with fix store/state. <DT><I>Fix store/state fix array is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Fix store/state fix does not calculate a per-atom array</I> <DD>The fix calculates a per-atom vector. <DT><I>Fix store/state fix does not calculate a per-atom vector</I> <DD>The fix calculates a per-atom array. <DT><I>Fix store/state fix does not calculate per-atom values</I> <DD>Fixes that calculate global or local quantities cannot be used with fix store/state. <DT><I>Fix store/state for atom property that isn't allocated</I> <DD>Self-explanatory. <DT><I>Fix store/state variable is not atom-style variable</I> <DD>Only atom-style variables calculate per-atom quantities. <DT><I>Fix temp/berendsen period must be > 0.0</I> <DD>Self-explanatory. <DT><I>Fix thermal/conductivity swap value must be positive</I> <DD>Self-explanatory. <DT><I>Fix tmd must come after integration fixes</I> <DD>Any fix tmd command must appear in the input script after all time integration fixes (nve, nvt, npt). See the fix tmd documentation for details. <DT><I>Fix ttm electron temperatures must be > 0.0</I> <DD>Self-explanatory. <DT><I>Fix ttm electronic_density must be > 0.0</I> <DD>Self-explanatory. <DT><I>Fix ttm electronic_specific_heat must be > 0.0</I> <DD>Self-explanatory. <DT><I>Fix ttm electronic_thermal_conductivity must be >= 0.0</I> <DD>Self-explanatory. <DT><I>Fix ttm gamma_p must be > 0.0</I> <DD>Self-explanatory. <DT><I>Fix ttm gamma_s must be >= 0.0</I> <DD>Self-explanatory. <DT><I>Fix ttm number of nodes must be > 0</I> <DD>Self-explanatory. <DT><I>Fix ttm v_0 must be >= 0.0</I> <DD>Self-explanatory. <DT><I>Fix used in compute atom/molecule not computed at compatible time</I> <DD>The fix must produce per-atom quantities on timesteps that the compute needs them. <DT><I>Fix used in compute reduce not computed at compatible time</I> -<DD>Fixes generate their values on specific timesteps. Compute sum is +<DD>Fixes generate their values on specific timesteps. Compute reduce is requesting a value on a non-allowed timestep. <DT><I>Fix used in compute slice not computed at compatible time</I> -<DD>UNDOCUMENTED +<DD>Fixes generate their values on specific timesteps. Compute slice is +requesting a value on a non-allowed timestep. <DT><I>Fix viscosity swap value must be positive</I> <DD>Self-explanatory. <DT><I>Fix viscosity vtarget value must be positive</I> <DD>Self-explanatory. <DT><I>Fix wall cutoff <= 0.0</I> <DD>Self-explanatory. <DT><I>Fix wall/colloid requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix wall/colloid requires extended particles</I> -<DD>Self-explanatory. +<DD>One of the particles has radius 0.0. <DT><I>Fix wall/gran is incompatible with Pair style</I> <DD>Must use a granular pair style to define the parameters needed for this fix. <DT><I>Fix wall/gran requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix wall/piston command only available at zlo</I> -<DD>UNDOCUMENTED +<DD>The face keyword must be zlo. <DT><I>Fix wall/region colloid requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Fix wall/region colloid requires extended particles</I> -<DD>Self-explanatory. +<DD>One of the particles has radius 0.0. <DT><I>Fix wall/region cutoff <= 0.0</I> <DD>Self-explanatory. <DT><I>Fix_modify order must be 3 or 5</I> <DD>Self-explanatory. <DT><I>Fix_modify pressure ID does not compute pressure</I> <DD>The compute ID assigned to the fix must compute pressure. <DT><I>Fix_modify temperature ID does not compute temperature</I> <DD>The compute ID assigned to the fix must compute temperature. +<DT><I>For triclinic deformation, specified target stress must be hydrostatic</I> + +<DD>Triclinic pressure control is allowed using the tri keyword, but +non-hydrostatic pressure control can not be used in this case. + <DT><I>Found no restart file matching pattern</I> <DD>When using a "*" in the restart file name, no matching file was found. +<DT><I>GPU library not compiled for this accelerator</I> + +<DD>UNDOCUMENTED + +<DT><I>GPU particle split must be set to 1 for this pair style.</I> + +<DD>UNDOCUMENTED + <DT><I>Gmask function in equal-style variable formula</I> <DD>Gmask is per-atom operation. <DT><I>Gravity changed since fix pour was created</I> <DD>Gravity must be static and not dynamic for use with fix pour. <DT><I>Gravity must point in -y to use with fix pour in 2d</I> <DD>Gravity must be pointing "down" in a 2d box. <DT><I>Gravity must point in -z to use with fix pour in 3d</I> <DD>Gravity must be pointing "down" in a 3d box, i.e. theta = 180.0. <DT><I>Grmask function in equal-style variable formula</I> <DD>Grmask is per-atom operation. <DT><I>Group ID does not exist</I> <DD>A group ID used in the group command does not exist. <DT><I>Group ID in variable formula does not exist</I> <DD>Self-explanatory. <DT><I>Group command before simulation box is defined</I> <DD>The group command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Group region ID does not exist</I> <DD>A region ID used in the group command does not exist. -<DT><I>Illega dump_modify command</I> - -<DD>UNDOCUMENTED - <DT><I>Illegal ... command</I> <DD>Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. <DT><I>Illegal COMB parameter</I> <DD>One or more of the coefficients defined in the potential file is invalid. <DT><I>Illegal Stillinger-Weber parameter</I> <DD>One or more of the coefficients defined in the potential file is invalid. <DT><I>Illegal Tersoff parameter</I> <DD>One or more of the coefficients defined in the potential file is invalid. <DT><I>Illegal fix wall/piston velocity</I> -<DD>UNDOCUMENTED +<DD>The piston velocity must be positive. <DT><I>Illegal integrate style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Illegal number of angle table entries</I> <DD>There must be at least 2 table entries. <DT><I>Illegal number of bond table entries</I> <DD>There must be at least 2 table entries. <DT><I>Illegal number of pair table entries</I> <DD>There must be at least 2 table entries. <DT><I>Illegal simulation box</I> <DD>The lower bound of the simulation box is greater than the upper bound. <DT><I>Improper atom missing in delete_bonds</I> <DD>The delete_bonds command cannot find one or more atoms in a particular improper on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid improper. <DT><I>Improper atom missing in set command</I> <DD>The set command cannot find one or more atoms in a particular improper on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid improper. <DT><I>Improper atoms %d %d %d %d missing on proc %d at step %ld</I> <DD>One or more of 4 atoms needed to compute a particular improper are missing on this processor. Typically this is because the pairwise cutoff is set too short or the improper has blown apart and an atom is -too far away. :dd +too far away. <DT><I>Improper coeff for hybrid has invalid style</I> <DD>Improper style hybrid uses another improper style as one of its coefficients. The improper style used in the improper_coeff command or read from a restart file is not recognized. <DT><I>Improper coeffs are not set</I> <DD>No improper coefficients have been assigned in the data file or via the improper_coeff command. <DT><I>Improper style hybrid cannot have hybrid as an argument</I> <DD>Self-explanatory. <DT><I>Improper style hybrid cannot have none as an argument</I> <DD>Self-explanatory. <DT><I>Improper style hybrid cannot use same improper style twice</I> <DD>Self-explanatory. <DT><I>Improper_coeff command before improper_style is defined</I> <DD>Coefficients cannot be set in the data file or via the improper_coeff command until an improper_style has been assigned. <DT><I>Improper_coeff command before simulation box is defined</I> <DD>The improper_coeff command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Improper_coeff command when no impropers allowed</I> <DD>The chosen atom style does not allow for impropers to be defined. <DT><I>Improper_style command when no impropers allowed</I> <DD>The chosen atom style does not allow for impropers to be defined. <DT><I>Impropers assigned incorrectly</I> <DD>Impropers read in from the data file were not assigned correctly to atoms. This means there is something invalid about the topology definitions. <DT><I>Impropers defined but no improper types</I> <DD>The data file header lists improper but no improper types. <DT><I>Inconsistent iparam/jparam values in fix bond/create command</I> <DD>If itype and jtype are the same, then their maxbond and newtype settings must also be the same. <DT><I>Inconsistent line segment in data file</I> -<DD>UNDOCUMENTED +<DD>The end points of the line segment are not equal distances from the +center point which is the atom coordinate. <DT><I>Inconsistent triangle in data file</I> -<DD>UNDOCUMENTED +<DD>The centroid of the triangle as defined by the corner points is not +the atom coordinate. <DT><I>Incorrect args for angle coefficients</I> <DD>Self-explanatory. Check the input script or data file. <DT><I>Incorrect args for bond coefficients</I> <DD>Self-explanatory. Check the input script or data file. <DT><I>Incorrect args for dihedral coefficients</I> <DD>Self-explanatory. Check the input script or data file. <DT><I>Incorrect args for improper coefficients</I> <DD>Self-explanatory. Check the input script or data file. <DT><I>Incorrect args for pair coefficients</I> <DD>Self-explanatory. Check the input script or data file. <DT><I>Incorrect args in pair_style command</I> <DD>Self-explanatory. <DT><I>Incorrect atom format in data file</I> <DD>Number of values per atom line in the data file is not consistent with the atom style. <DT><I>Incorrect bonus data format in data file</I> -<DD>UNDOCUMENTED +<DD>See the read_data doc page for a description of how various kinds of +bonus data must be formatted for certain atom styles. <DT><I>Incorrect boundaries with slab Ewald</I> <DD>Must have periodic x,y dimensions and non-periodic z dimension to use 2d slab option with Ewald. <DT><I>Incorrect boundaries with slab PPPM</I> <DD>Must have periodic x,y dimensions and non-periodic z dimension to use 2d slab option with PPPM. <DT><I>Incorrect element names in ADP potential file</I> -<DD>UNDOCUMENTED +<DD>The element names in the ADP file do not match those requested. <DT><I>Incorrect element names in EAM potential file</I> <DD>The element names in the EAM file do not match those requested. <DT><I>Incorrect format in COMB potential file</I> <DD>Incorrect number of words per line in the potential file. <DT><I>Incorrect format in MEAM potential file</I> <DD>Incorrect number of words per line in the potential file. <DT><I>Incorrect format in NEB coordinate file</I> <DD>Self-explanatory. <DT><I>Incorrect format in Stillinger-Weber potential file</I> <DD>Incorrect number of words per line in the potential file. <DT><I>Incorrect format in TMD target file</I> <DD>Format of file read by fix tmd command is incorrect. <DT><I>Incorrect format in Tersoff potential file</I> <DD>Incorrect number of words per line in the potential file. <DT><I>Incorrect multiplicity arg for dihedral coefficients</I> <DD>Self-explanatory. Check the input script or data file. <DT><I>Incorrect sign arg for dihedral coefficients</I> <DD>Self-explanatory. Check the input script or data file. <DT><I>Incorrect velocity format in data file</I> <DD>Each atom style defines a format for the Velocity section of the data file. The read-in lines do not match. <DT><I>Incorrect weight arg for dihedral coefficients</I> <DD>Self-explanatory. Check the input script or data file. <DT><I>Index between variable brackets must be positive</I> <DD>Self-explanatory. <DT><I>Indexed per-atom vector in variable formula without atom map</I> <DD>Accessing a value from an atom vector requires the ability to lookup an atom index, which is provided by an atom map. An atom map does not exist (by default) for non-molecular problems. Using the atom_modify map command will force an atom map to be created. -<DT><I>Induced tilt by displace_box is too large</I> - -<DD>The final tilt value must be between -1/2 and 1/2 of the perpendicular -box length. - <DT><I>Initial temperatures not all set in fix ttm</I> <DD>Self-explantory. <DT><I>Input line too long after variable substitution</I> <DD>This is a hard (very large) limit defined in the input.cpp file. <DT><I>Input line too long: %s</I> <DD>This is a hard (very large) limit defined in the input.cpp file. <DT><I>Insertion region extends outside simulation box</I> <DD>Region specified with fix pour command extends outside the global simulation box. <DT><I>Insufficient Jacobi rotations for POEMS body</I> <DD>Eigensolve for rigid body was not sufficiently accurate. <DT><I>Insufficient Jacobi rotations for rigid body</I> <DD>Eigensolve for rigid body was not sufficiently accurate. <DT><I>Insufficient Jacobi rotations for triangle</I> +<DD>The calculation of the intertia tensor of the triangle failed. This +should not happen if it is a reasonably shaped triangle. + +<DT><I>Insufficient memory on accelerator</I> + <DD>UNDOCUMENTED <DT><I>Invalid -reorder N value</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Invalid Boolean syntax in if command</I> <DD>Self-explanatory. <DT><I>Invalid REAX atom type</I> <DD>There is a mis-match between LAMMPS atom types and the elements listed in the ReaxFF force field file. <DT><I>Invalid angle style</I> <DD>The choice of angle style is unknown. <DT><I>Invalid angle table length</I> <DD>Length must be 2 or greater. <DT><I>Invalid angle type in Angles section of data file</I> <DD>Angle type must be positive integer and within range of specified angle types. <DT><I>Invalid angle type index for fix shake</I> <DD>Self-explanatory. -<DT><I>Invalid argument for fix nphug</I> - -<DD>UNDOCUMENTED - <DT><I>Invalid atom ID in Angles section of data file</I> <DD>Atom IDs must be positive integers and within range of defined atoms. <DT><I>Invalid atom ID in Atoms section of data file</I> <DD>Atom IDs must be positive integers. <DT><I>Invalid atom ID in Bonds section of data file</I> <DD>Atom IDs must be positive integers and within range of defined atoms. <DT><I>Invalid atom ID in Bonus section of data file</I> -<DD>UNDOCUMENTED +<DD>Atom IDs must be positive integers and within range of defined +atoms. <DT><I>Invalid atom ID in Dihedrals section of data file</I> <DD>Atom IDs must be positive integers and within range of defined atoms. <DT><I>Invalid atom ID in Impropers section of data file</I> <DD>Atom IDs must be positive integers and within range of defined atoms. <DT><I>Invalid atom ID in Velocities section of data file</I> <DD>Atom IDs must be positive integers and within range of defined atoms. <DT><I>Invalid atom mass for fix shake</I> <DD>Mass specified in fix shake command must be > 0.0. <DT><I>Invalid atom style</I> <DD>The choice of atom style is unknown. <DT><I>Invalid atom type in Atoms section of data file</I> <DD>Atom types must range from 1 to specified # of types. <DT><I>Invalid atom type in create_atoms command</I> <DD>The create_box command specified the range of valid atom types. An invalid type is being requested. <DT><I>Invalid atom type in fix GCMC command</I> <DD>UNDOCUMENTED <DT><I>Invalid atom type in fix bond/create command</I> <DD>Self-explanatory. <DT><I>Invalid atom type in neighbor exclusion list</I> <DD>Atom types must range from 1 to Ntypes inclusive. <DT><I>Invalid atom type index for fix shake</I> <DD>Atom types must range from 1 to Ntypes inclusive. <DT><I>Invalid atom types in pair_write command</I> <DD>Atom types must range from 1 to Ntypes inclusive. <DT><I>Invalid atom vector in variable formula</I> <DD>The atom vector is not recognized. <DT><I>Invalid attribute in dump custom command</I> <DD>Self-explantory. <DT><I>Invalid attribute in dump local command</I> <DD>Self-explantory. <DT><I>Invalid attribute in dump modify command</I> <DD>Self-explantory. <DT><I>Invalid bond style</I> <DD>The choice of bond style is unknown. <DT><I>Invalid bond table length</I> <DD>Length must be 2 or greater. <DT><I>Invalid bond type in Bonds section of data file</I> <DD>Bond type must be positive integer and within range of specified bond types. <DT><I>Invalid bond type in fix bond/break command</I> <DD>Self-explanatory. <DT><I>Invalid bond type in fix bond/create command</I> <DD>Self-explanatory. <DT><I>Invalid bond type index for fix shake</I> <DD>Self-explanatory. Check the fix shake command in the input script. <DT><I>Invalid coeffs for this dihedral style</I> <DD>Cannot set class 2 coeffs in data file for this dihedral style. <DT><I>Invalid color in dump_modify command</I> -<DD>UNDOCUMENTED - -<DT><I>Invalid color map in dump_modify command</I> - -<DD>UNDOCUMENTED +<DD>The specified color name was not in the list of recognized colors. +See the dump_modify doc page. <DT><I>Invalid command-line argument</I> <DD>One or more command-line arguments is invalid. Check the syntax of the command you are using to launch LAMMPS. <DT><I>Invalid compute ID in variable formula</I> <DD>The compute is not recognized. <DT><I>Invalid compute style</I> <DD>Self-explanatory. <DT><I>Invalid cutoff in communicate command</I> <DD>Specified cutoff must be >= 0.0. <DT><I>Invalid cutoffs in pair_write command</I> <DD>Inner cutoff must be larger than 0.0 and less than outer cutoff. <DT><I>Invalid d1 or d2 value for pair colloid coeff</I> <DD>Neither d1 or d2 can be < 0. <DT><I>Invalid data file section: Angle Coeffs</I> <DD>Atom style does not allow angles. <DT><I>Invalid data file section: AngleAngle Coeffs</I> <DD>Atom style does not allow impropers. <DT><I>Invalid data file section: AngleAngleTorsion Coeffs</I> <DD>Atom style does not allow dihedrals. <DT><I>Invalid data file section: AngleTorsion Coeffs</I> <DD>Atom style does not allow dihedrals. <DT><I>Invalid data file section: Angles</I> <DD>Atom style does not allow angles. <DT><I>Invalid data file section: Bond Coeffs</I> <DD>Atom style does not allow bonds. <DT><I>Invalid data file section: BondAngle Coeffs</I> <DD>Atom style does not allow angles. <DT><I>Invalid data file section: BondBond Coeffs</I> <DD>Atom style does not allow angles. <DT><I>Invalid data file section: BondBond13 Coeffs</I> <DD>Atom style does not allow dihedrals. <DT><I>Invalid data file section: Bonds</I> <DD>Atom style does not allow bonds. <DT><I>Invalid data file section: Dihedral Coeffs</I> <DD>Atom style does not allow dihedrals. <DT><I>Invalid data file section: Dihedrals</I> <DD>Atom style does not allow dihedrals. <DT><I>Invalid data file section: Ellipsoids</I> -<DD>UNDOCUMENTED +<DD>Atom style does not allow ellipsoids. <DT><I>Invalid data file section: EndBondTorsion Coeffs</I> <DD>Atom style does not allow dihedrals. <DT><I>Invalid data file section: Improper Coeffs</I> <DD>Atom style does not allow impropers. <DT><I>Invalid data file section: Impropers</I> <DD>Atom style does not allow impropers. <DT><I>Invalid data file section: Lines</I> -<DD>UNDOCUMENTED +<DD>Atom style does not allow lines. <DT><I>Invalid data file section: MiddleBondTorsion Coeffs</I> <DD>Atom style does not allow dihedrals. <DT><I>Invalid data file section: Triangles</I> -<DD>UNDOCUMENTED +<DD>Atom style does not allow triangles. <DT><I>Invalid delta_conf in tad command</I> <DD>The value must be between 0 and 1 inclusive. <DT><I>Invalid density in Atoms section of data file</I> <DD>Density value cannot be <= 0.0. <DT><I>Invalid diameter in set command</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Invalid dihedral style</I> <DD>The choice of dihedral style is unknown. <DT><I>Invalid dihedral type in Dihedrals section of data file</I> <DD>Dihedral type must be positive integer and within range of specified dihedral types. <DT><I>Invalid dipole length in set command</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Invalid dump dcd filename</I> <DD>Filenames used with the dump dcd style cannot be binary or compressed or cause multiple files to be written. <DT><I>Invalid dump frequency</I> <DD>Dump frequency must be 1 or greater. -<DT><I>Invalid dump image color range</I> - -<DD>UNDOCUMENTED - <DT><I>Invalid dump image element name</I> -<DD>UNDOCUMENTED +<DD>The specified element name was not in the standard list of elements. +See the dump_modify doc page. <DT><I>Invalid dump image filename</I> -<DD>UNDOCUMENTED +<DD>The file produced by dump image cannot be binary and must +be for a single processor. <DT><I>Invalid dump image persp value</I> -<DD>UNDOCUMENTED +<DD>Persp value must be >= 0.0. <DT><I>Invalid dump image theta value</I> -<DD>UNDOCUMENTED - -<DT><I>Invalid dump image up vector</I> - -<DD>UNDOCUMENTED +<DD>Theta must be between 0.0 and 180.0 inclusive. <DT><I>Invalid dump image zoom value</I> -<DD>UNDOCUMENTED +<DD>Zoom value must be > 0.0. <DT><I>Invalid dump style</I> <DD>The choice of dump style is unknown. <DT><I>Invalid dump xtc filename</I> <DD>Filenames used with the dump xtc style cannot be binary or compressed or cause multiple files to be written. <DT><I>Invalid dump xyz filename</I> <DD>Filenames used with the dump xyz style cannot be binary or cause files to be written by each processor. <DT><I>Invalid dump_modify threshhold operator</I> <DD>Operator keyword used for threshold specification in not recognized. -<DT><I>Invalid entry in reorder file</I> +<DT><I>Invalid entry in -reorder file</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Invalid fix ID in variable formula</I> <DD>The fix is not recognized. <DT><I>Invalid fix ave/time off column</I> <DD>Self-explantory. <DT><I>Invalid fix box/relax command for a 2d simulation</I> <DD>Fix box/relax styles involving the z dimension cannot be used in a 2d simulation. <DT><I>Invalid fix box/relax command pressure settings</I> <DD>If multiple dimensions are coupled, those dimensions must be specified. <DT><I>Invalid fix box/relax pressure settings</I> <DD>Settings for coupled dimensions must be the same. <DT><I>Invalid fix nvt/npt/nph command for a 2d simulation</I> <DD>Cannot control z dimension in a 2d model. <DT><I>Invalid fix nvt/npt/nph command pressure settings</I> <DD>If multiple dimensions are coupled, those dimensions must be specified. <DT><I>Invalid fix nvt/npt/nph pressure settings</I> <DD>Settings for coupled dimensions must be the same. <DT><I>Invalid fix press/berendsen for a 2d simulation</I> <DD>The z component of pressure cannot be controlled for a 2d model. <DT><I>Invalid fix press/berendsen pressure settings</I> <DD>Settings for coupled dimensions must be the same. <DT><I>Invalid fix style</I> <DD>The choice of fix style is unknown. <DT><I>Invalid flag in force field section of restart file</I> <DD>Unrecognized entry in restart file. <DT><I>Invalid flag in header section of restart file</I> <DD>Unrecognized entry in restart file. <DT><I>Invalid flag in type arrays section of restart file</I> <DD>Unrecognized entry in restart file. <DT><I>Invalid frequency in temper command</I> <DD>Nevery must be > 0. <DT><I>Invalid group ID in neigh_modify command</I> <DD>A group ID used in the neigh_modify command does not exist. <DT><I>Invalid group function in variable formula</I> <DD>Group function is not recognized. <DT><I>Invalid group in communicate command</I> <DD>Self-explanatory. +<DT><I>Invalid image color range</I> + +<DD>The lo value in the range is larger than the hi value. + +<DT><I>Invalid image up vector</I> + +<DD>Up vector cannot be (0,0,0). + <DT><I>Invalid improper style</I> <DD>The choice of improper style is unknown. <DT><I>Invalid improper type in Impropers section of data file</I> <DD>Improper type must be positive integer and within range of specified improper types. <DT><I>Invalid keyword in angle table parameters</I> <DD>Self-explanatory. <DT><I>Invalid keyword in bond table parameters</I> <DD>Self-explanatory. <DT><I>Invalid keyword in compute angle/local command</I> <DD>Self-explanatory. <DT><I>Invalid keyword in compute bond/local command</I> <DD>Self-explanatory. <DT><I>Invalid keyword in compute dihedral/local command</I> <DD>Self-explanatory. <DT><I>Invalid keyword in compute improper/local command</I> <DD>Self-explanatory. <DT><I>Invalid keyword in compute pair/local command</I> <DD>Self-explanatory. <DT><I>Invalid keyword in compute property/atom command</I> <DD>Self-explanatory. <DT><I>Invalid keyword in compute property/local command</I> <DD>Self-explanatory. <DT><I>Invalid keyword in compute property/molecule command</I> <DD>Self-explanatory. <DT><I>Invalid keyword in dump cfg command</I> <DD>Self-explanatory. <DT><I>Invalid keyword in pair table parameters</I> <DD>Keyword used in list of table parameters is not recognized. <DT><I>Invalid keyword in thermo_style custom command</I> <DD>One or more specified keywords are not recognized. <DT><I>Invalid kspace style</I> <DD>The choice of kspace style is unknown. <DT><I>Invalid length in set command</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Invalid mass in set command</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Invalid mass line in data file</I> <DD>Self-explanatory. <DT><I>Invalid mass value</I> <DD>Self-explanatory. <DT><I>Invalid math function in variable formula</I> <DD>Self-explanatory. <DT><I>Invalid math/group/special function in variable formula</I> <DD>Self-explanatory. <DT><I>Invalid option in lattice command for non-custom style</I> <DD>Certain lattice keywords are not supported unless the lattice style is "custom". <DT><I>Invalid order of forces within respa levels</I> <DD>For respa, ordering of force computations within respa levels must obey certain rules. E.g. bonds cannot be compute less frequently than angles, pairwise forces cannot be computed less frequently than kspace, etc. <DT><I>Invalid pair style</I> <DD>The choice of pair style is unknown. <DT><I>Invalid pair table cutoff</I> <DD>Cutoffs in pair_coeff command are not valid with read-in pair table. <DT><I>Invalid pair table length</I> <DD>Length of read-in pair table is invalid <DT><I>Invalid partitions in processors part command</I> -<DD>UNDOCUMENTED +<DD>Valid partitions are numbered 1 to N and the sender and receiver +cannot be the same partition. <DT><I>Invalid radius in Atoms section of data file</I> <DD>Radius must be >= 0.0. <DT><I>Invalid random number seed in fix ttm command</I> <DD>Random number seed must be > 0. <DT><I>Invalid random number seed in set command</I> <DD>Random number seed must be > 0. <DT><I>Invalid region style</I> <DD>The choice of region style is unknown. <DT><I>Invalid replace values in compute reduce</I> <DD>Self-explanatory. <DT><I>Invalid run command N value</I> <DD>The number of timesteps must fit in a 32-bit integer. If you want to run for more steps than this, perform multiple shorter runs. <DT><I>Invalid run command start/stop value</I> <DD>Self-explanatory. <DT><I>Invalid run command upto value</I> <DD>Self-explanatory. <DT><I>Invalid seed for Marsaglia random # generator</I> <DD>The initial seed for this random number generator must be a positive integer less than or equal to 900 million. <DT><I>Invalid seed for Park random # generator</I> <DD>The initial seed for this random number generator must be a positive integer. <DT><I>Invalid shape in Ellipsoids section of data file</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Invalid shape in Triangles section of data file</I> -<DD>UNDOCUMENTED +<DD>Two or more of the triangle corners are duplicate points. <DT><I>Invalid shape in set command</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Invalid shear direction for fix wall/gran</I> <DD>Self-explanatory. <DT><I>Invalid special function in variable formula</I> <DD>Self-explanatory. <DT><I>Invalid style in pair_write command</I> <DD>Self-explanatory. Check the input script. <DT><I>Invalid syntax in variable formula</I> <DD>Self-explanatory. <DT><I>Invalid t_event in prd command</I> <DD>Self-explanatory. <DT><I>Invalid t_event in tad command</I> <DD>The value must be greater than 0. <DT><I>Invalid thermo keyword in variable formula</I> <DD>The keyword is not recognized. <DT><I>Invalid tmax in tad command</I> <DD>The value must be greater than 0.0. <DT><I>Invalid type for mass set</I> <DD>Mass command must set a type from 1-N where N is the number of atom types. <DT><I>Invalid value in set command</I> <DD>The value specified for the setting is invalid, likely because it is too small or too large. <DT><I>Invalid variable evaluation in variable formula</I> <DD>A variable used in a formula could not be evaluated. <DT><I>Invalid variable in next command</I> <DD>Self-explanatory. <DT><I>Invalid variable name</I> <DD>Variable name used in an input script line is invalid. <DT><I>Invalid variable name in variable formula</I> <DD>Variable name is not recognized. <DT><I>Invalid variable style with next command</I> <DD>Variable styles <I>equal</I> and <I>world</I> cannot be used in a next command. <DT><I>Invalid wiggle direction for fix wall/gran</I> <DD>Self-explanatory. <DT><I>Invoked angle equil angle on angle style none</I> <DD>Self-explanatory. <DT><I>Invoked angle single on angle style none</I> <DD>Self-explanatory. <DT><I>Invoked bond equil distance on bond style none</I> <DD>Self-explanatory. <DT><I>Invoked bond single on bond style none</I> <DD>Self-explanatory. <DT><I>Invoked pair single on pair style none</I> <DD>A command (e.g. a dump) attempted to invoke the single() function on a pair style none, which is illegal. You are probably attempting to compute per-atom quantities with an undefined pair style. +<DT><I>KIM initialization failed</I> + +<DD>This is an error return from the KIM library. + +<DT><I>KIM neighbor iterator exceeded range</I> + +<DD>This error should not normally occur if the KIM library is working +correctly. + +<DT><I>KIM_DIR environement variable is unset</I> + +<DD>The KIM library requires that this environment variable be set before +running LAMMPS> + <DT><I>KSpace style has not yet been set</I> <DD>Cannot use kspace_modify command until a kspace style is set. <DT><I>KSpace style is incompatible with Pair style</I> <DD>Setting a kspace style requires that a pair style with a long-range Coulombic component be selected. <DT><I>Keyword %s in MEAM parameter file not recognized</I> <DD>Self-explanatory. <DT><I>Kspace style pppm/tip4p requires newton on</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Kspace style requires atom attribute q</I> <DD>The atom style defined does not have these attributes. <DT><I>Label wasn't found in input script</I> <DD>Self-explanatory. <DT><I>Lattice orient vectors are not orthogonal</I> <DD>The three specified lattice orientation vectors must be mutually orthogonal. <DT><I>Lattice orient vectors are not right-handed</I> <DD>The three specified lattice orientation vectors must create a right-handed coordinate system such that a1 cross a2 = a3. <DT><I>Lattice primitive vectors are collinear</I> <DD>The specified lattice primitive vectors do not for a unit cell with non-zero volume. <DT><I>Lattice settings are not compatible with 2d simulation</I> <DD>One or more of the specified lattice vectors has a non-zero z component. <DT><I>Lattice spacings are invalid</I> <DD>Each x,y,z spacing must be > 0. <DT><I>Lattice style incompatible with simulation dimension</I> <DD>2d simulation can use sq, sq2, or hex lattice. 3d simulation can use sc, bcc, or fcc lattice. <DT><I>Log of zero/negative value in variable formula</I> <DD>Self-explanatory. -<DT><I>Lost atoms via displace_atoms: original %ld current %ld</I> - -<DD>UNDOCUMENTED - -<DT><I>Lost atoms via displace_box: original %ld current %ld</I> +<DT><I>Lost atoms via balance: original %ld current %ld</I> -<DD>UNDOCUMENTED +<DD>This should not occur. Report the problem to the developers. <DT><I>Lost atoms: original %ld current %ld</I> -<DD>UNDOCUMENTED +<DD>Lost atoms are checked for each time thermo output is done. See the +thermo_modify lost command for options. Lost atoms usually indicate +bad dynamics, e.g. atoms have been blown far out of the simulation +box, or moved futher than one processor's sub-domain away before +reneighboring. <DT><I>MEAM library error %d</I> <DD>A call to the MEAM Fortran library returned an error. <DT><I>MPI_LMP_BIGINT and bigint in lmptype.h are not compatible</I> <DD>The size of the MPI datatype does not match the size of a bigint. <DT><I>MPI_LMP_TAGINT and tagint in lmptype.h are not compatible</I> <DD>The size of the MPI datatype does not match the size of a tagint. <DT><I>Mass command before simulation box is defined</I> <DD>The mass command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Min_style command before simulation box is defined</I> <DD>The min_style command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Minimization could not find thermo_pe compute</I> <DD>This compute is created by the thermo command. It must have been explicitly deleted by a uncompute command. <DT><I>Minimize command before simulation box is defined</I> <DD>The minimize command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Mismatched brackets in variable</I> <DD>Self-explanatory. <DT><I>Mismatched compute in variable formula</I> <DD>A compute is referenced incorrectly or a compute that produces per-atom values is used in an equal-style variable formula. <DT><I>Mismatched fix in variable formula</I> <DD>A fix is referenced incorrectly or a fix that produces per-atom values is used in an equal-style variable formula. <DT><I>Mismatched variable in variable formula</I> <DD>A variable is referenced incorrectly or an atom-style variable that produces per-atom values is used in an equal-style variable formula. <DT><I>Molecular data file has too many atoms</I> <DD>These kids of data files are currently limited to a number of atoms that fits in a 32-bit integer. <DT><I>Molecule count changed in compute atom/molecule</I> <DD>Number of molecules must remain constant over time. <DT><I>Molecule count changed in compute com/molecule</I> <DD>Number of molecules must remain constant over time. <DT><I>Molecule count changed in compute gyration/molecule</I> <DD>Number of molecules must remain constant over time. <DT><I>Molecule count changed in compute msd/molecule</I> <DD>Number of molecules must remain constant over time. <DT><I>Molecule count changed in compute property/molecule</I> <DD>Number of molecules must remain constant over time. <DT><I>More than one fix deform</I> <DD>Only one fix deform can be defined at a time. <DT><I>More than one fix freeze</I> <DD>Only one of these fixes can be defined, since the granular pair potentials access it. <DT><I>More than one fix shake</I> <DD>Only one fix shake can be defined. <DT><I>Must define angle_style before Angle Coeffs</I> <DD>Must use an angle_style command before reading a data file that defines Angle Coeffs. <DT><I>Must define angle_style before BondAngle Coeffs</I> <DD>Must use an angle_style command before reading a data file that defines Angle Coeffs. <DT><I>Must define angle_style before BondBond Coeffs</I> <DD>Must use an angle_style command before reading a data file that defines Angle Coeffs. <DT><I>Must define bond_style before Bond Coeffs</I> <DD>Must use a bond_style command before reading a data file that defines Bond Coeffs. <DT><I>Must define dihedral_style before AngleAngleTorsion Coeffs</I> <DD>Must use a dihedral_style command before reading a data file that defines AngleAngleTorsion Coeffs. <DT><I>Must define dihedral_style before AngleTorsion Coeffs</I> <DD>Must use a dihedral_style command before reading a data file that defines AngleTorsion Coeffs. <DT><I>Must define dihedral_style before BondBond13 Coeffs</I> <DD>Must use a dihedral_style command before reading a data file that defines BondBond13 Coeffs. <DT><I>Must define dihedral_style before Dihedral Coeffs</I> <DD>Must use a dihedral_style command before reading a data file that defines Dihedral Coeffs. <DT><I>Must define dihedral_style before EndBondTorsion Coeffs</I> <DD>Must use a dihedral_style command before reading a data file that defines EndBondTorsion Coeffs. <DT><I>Must define dihedral_style before MiddleBondTorsion Coeffs</I> <DD>Must use a dihedral_style command before reading a data file that defines MiddleBondTorsion Coeffs. <DT><I>Must define improper_style before AngleAngle Coeffs</I> <DD>Must use an improper_style command before reading a data file that defines AngleAngle Coeffs. <DT><I>Must define improper_style before Improper Coeffs</I> <DD>Must use an improper_style command before reading a data file that defines Improper Coeffs. -<DT><I>Must define lattice to append_atoms</I> +<DT><I>Must define lattice to append/atoms</I> -<DD>UNDOCUMENTED +<DD>A lattice must be defined before using this fix. <DT><I>Must define pair_style before Pair Coeffs</I> <DD>Must use a pair_style command before reading a data file that defines Pair Coeffs. <DT><I>Must have more than one processor partition to temper</I> <DD>Cannot use the temper command with only one processor partition. Use the -partition command-line option. <DT><I>Must read Atoms before Angles</I> <DD>The Atoms section of a data file must come before an Angles section. <DT><I>Must read Atoms before Bonds</I> <DD>The Atoms section of a data file must come before a Bonds section. <DT><I>Must read Atoms before Dihedrals</I> <DD>The Atoms section of a data file must come before a Dihedrals section. <DT><I>Must read Atoms before Ellipsoids</I> -<DD>UNDOCUMENTED +<DD>The Atoms section of a data file must come before a Ellipsoids +section. <DT><I>Must read Atoms before Impropers</I> <DD>The Atoms section of a data file must come before an Impropers section. <DT><I>Must read Atoms before Lines</I> -<DD>UNDOCUMENTED +<DD>The Atoms section of a data file must come before a Lines section. <DT><I>Must read Atoms before Triangles</I> -<DD>UNDOCUMENTED +<DD>The Atoms section of a data file must come before a Triangles section. <DT><I>Must read Atoms before Velocities</I> <DD>The Atoms section of a data file must come before a Velocities section. <DT><I>Must set both respa inner and outer</I> <DD>Cannot use just the inner or outer option with respa without using the other. <DT><I>Must shrink-wrap piston boundary</I> -<DD>UNDOCUMENTED +<DD>The boundary style of the face where the piston is applied must be of +type s (shrink-wrapped). <DT><I>Must specify a region in fix deposit</I> <DD>The region keyword must be specified with this fix. <DT><I>Must specify a region in fix pour</I> <DD>The region keyword must be specified with this fix. <DT><I>Must use -in switch with multiple partitions</I> <DD>A multi-partition simulation cannot read the input script from stdin. The -in command-line option must be used to specify a file. <DT><I>Must use a block or cylinder region with fix pour</I> <DD>Self-explanatory. <DT><I>Must use a block region with fix pour for 2d simulations</I> <DD>Self-explanatory. <DT><I>Must use a bond style with TIP4P potential</I> <DD>TIP4P potentials assume bond lengths in water are constrained by a fix shake command. <DT><I>Must use a molecular atom style with fix poems molecule</I> <DD>Self-explanatory. <DT><I>Must use a z-axis cylinder with fix pour</I> <DD>The axis of the cylinder region used with the fix pour command must be oriented along the z dimension. <DT><I>Must use an angle style with TIP4P potential</I> <DD>TIP4P potentials assume angles in water are constrained by a fix shake command. <DT><I>Must use atom style with molecule IDs with fix bond/swap</I> <DD>Self-explanatory. <DT><I>Must use pair_style comb with fix qeq/comb</I> <DD>Self-explanatory. <DT><I>Must use variable energy with fix addforce</I> <DD>Must define an energy vartiable when applyting a dynamic force during minimization. <DT><I>NEB command before simulation box is defined</I> <DD>Self-explanatory. <DT><I>NEB requires damped dynamics minimizer</I> <DD>Use a different minimization style. <DT><I>NEB requires use of fix neb</I> <DD>Self-explanatory. <DT><I>NL ramp in wall/piston only implemented in zlo for now</I> -<DD>UNDOCUMENTED +<DD>The ramp keyword can only be used for piston applied to face zlo. <DT><I>Needed bonus data not in data file</I> -<DD>UNDOCUMENTED +<DD>Some atom styles require bonus data. See the read_data doc page for +details. <DT><I>Needed topology not in data file</I> <DD>The header of the data file indicated that bonds or angles or dihedrals or impropers would be included, but they were not present. <DT><I>Neigh_modify exclude molecule requires atom attribute molecule</I> <DD>Self-explanatory. <DT><I>Neigh_modify include group != atom_modify first group</I> <DD>Self-explanatory. <DT><I>Neighbor delay must be 0 or multiple of every setting</I> <DD>The delay and every parameters set via the neigh_modify command are inconsistent. If the delay setting is non-zero, then it must be a multiple of the every setting. <DT><I>Neighbor include group not allowed with ghost neighbors</I> <DD>This is a current restriction within LAMMPS. +<DT><I>Neighbor list overflow, boost neigh_modify one</I> + +<DD>There are too many neighbors of a single atom. Use the neigh_modify +command to increase the max number of neighbors allowed for one atom. +You may also want to boost the page size. + <DT><I>Neighbor list overflow, boost neigh_modify one or page</I> <DD>There are too many neighbors of a single atom. Use the neigh_modify command to increase the neighbor page size and the max number of neighbors allowed for one atom. <DT><I>Neighbor multi not yet enabled for ghost neighbors</I> <DD>This is a current restriction within LAMMPS. <DT><I>Neighbor multi not yet enabled for granular</I> <DD>Self-explanatory. <DT><I>Neighbor multi not yet enabled for rRESPA</I> <DD>Self-explanatory. <DT><I>Neighbor page size must be >= 10x the one atom setting</I> <DD>This is required to prevent wasting too much memory. <DT><I>Neighbors of ghost atoms only allowed for full neighbor lists</I> <DD>This is a current restriction within LAMMPS. <DT><I>New bond exceeded bonds per atom in fix bond/create</I> <DD>See the read_data command for info on setting the "extra bond per atom" header value to allow for additional bonds to be formed. <DT><I>New bond exceeded special list size in fix bond/create</I> <DD>See the special_bonds extra command for info on how to leave space in the special bonds list to allow for additional bonds to be formed. <DT><I>Newton bond change after simulation box is defined</I> <DD>The newton command cannot be used to change the newton bond value after a read_data, read_restart, or create_box command. <DT><I>No OpenMP support compiled in</I> -<DD>UNDOCUMENTED +<DD>An OpenMP flag is set, but LAMMPS was not built with +OpenMP support. <DT><I>No angle style is defined for compute angle/local</I> <DD>Self-explanatory. <DT><I>No angles allowed with this atom style</I> <DD>Self-explanatory. Check data file. <DT><I>No atoms in data file</I> <DD>The header of the data file indicated that atoms would be included, but they were not present. <DT><I>No basis atoms in lattice</I> <DD>Basis atoms must be defined for lattice style user. <DT><I>No bond style is defined for compute bond/local</I> <DD>Self-explanatory. <DT><I>No bonds allowed with this atom style</I> <DD>Self-explanatory. Check data file. <DT><I>No dihedral style is defined for compute dihedral/local</I> <DD>Self-explanatory. <DT><I>No dihedrals allowed with this atom style</I> <DD>Self-explanatory. Check data file. <DT><I>No dump custom arguments specified</I> <DD>The dump custom command requires that atom quantities be specified to output to dump file. <DT><I>No dump local arguments specified</I> <DD>Self-explanatory. <DT><I>No ellipsoids allowed with this atom style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. Check data file. <DT><I>No fix gravity defined for fix pour</I> <DD>Cannot add poured particles without gravity to move them. <DT><I>No improper style is defined for compute improper/local</I> <DD>Self-explanatory. <DT><I>No impropers allowed with this atom style</I> <DD>Self-explanatory. Check data file. <DT><I>No lines allowed with this atom style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. Check data file. <DT><I>No matching element in ADP potential file</I> -<DD>UNDOCUMENTED +<DD>The ADP potential file does not contain elements that match the +requested elements. <DT><I>No matching element in EAM potential file</I> <DD>The EAM potential file does not contain elements that match the requested elements. <DT><I>No pair hbond/dreiding coefficients set</I> <DD>Self-explanatory. <DT><I>No pair style defined for compute group/group</I> <DD>Cannot calculate group interactions without a pair style defined. <DT><I>No pair style is defined for compute pair/local</I> <DD>Self-explanatory. <DT><I>No pair style is defined for compute property/local</I> <DD>Self-explanatory. <DT><I>No rigid bodies defined</I> <DD>The fix specification did not end up defining any rigid bodies. <DT><I>No triangles allowed with this atom style</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. Check data file. <DT><I>Non digit character between brackets in variable</I> <DD>Self-explantory. <DT><I>Non integer # of swaps in temper command</I> <DD>Swap frequency in temper command must evenly divide the total # of timesteps. -<DT><I>Nprocs not a multiple of N for -reorder</I> +<DT><I>Not allocate memory eam/gpu pair style</I> <DD>UNDOCUMENTED +<DT><I>Nprocs not a multiple of N for -reorder</I> + +<DD>Self-explanatory. + <DT><I>Numeric index is out of bounds</I> -<DD>UNDOCUMENTED +<DD>A command with an argument that specifies an integer or range of +integers is using a value that is less than 1 or greater than the +maximum allowed limit. <DT><I>One or more atoms belong to multiple rigid bodies</I> <DD>Two or more rigid bodies defined by the fix rigid command cannot contain the same atom. <DT><I>One or zero atoms in rigid body</I> <DD>Any rigid body defined by the fix rigid command must contain 2 or more atoms. -<DT><I>Only zhi currently implemented for append_atom</I> - -<DD>UNDOCUMENTED - -<DT><I>Only zhi currently implemented for append_atoms</I> +<DT><I>Only zhi currently implemented for fix append/atoms</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Out of memory on GPGPU</I> -<DD>UNDOCUMENTED +<DD>GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. <DT><I>Out of range atoms - cannot compute PPPM</I> <DD>One or more atoms are attempting to map their charge to a PPPM grid point that is not owned by a processor. This is likely for one of two reasons, both of them bad. First, it may mean that an atom near the boundary of a processor's sub-domain has moved more than 1/2 the <A HREF = "neighbor.html">neighbor skin distance</A> without neighbor lists being rebuilt and atoms being migrated to new processors. This also means you may be missing pairwise interactions that need to be computed. The solution is to change the re-neighboring criteria via the <A HREF = "neigh_modify">neigh_modify</A> command. The safest settings are "delay 0 every 1 check yes". Second, it may mean that an atom has moved far outside a processor's sub-domain or even the entire simulation box. This indicates bad physics, e.g. due to highly overlapping atoms, too large a timestep, etc. <DT><I>Overlapping large/large in pair colloid</I> <DD>This potential is infinite when there is an overlap. <DT><I>Overlapping small/large in pair colloid</I> <DD>This potential is inifinte when there is an overlap. <DT><I>POEMS fix must come before NPT/NPH fix</I> <DD>NPT/NPH fix must be defined in input script after all poems fixes, else the fix contribution to the pressure virial is incorrect. <DT><I>PPPM grid is too large</I> <DD>The global PPPM grid is larger than OFFSET in one or more dimensions. OFFSET is currently set to 4096. You likely need to decrease the requested precision. <DT><I>PPPM order cannot be greater than %d</I> <DD>Self-explanatory. <DT><I>PPPM order has been reduced to 0</I> <DD>LAMMPS has attempted to reduce the PPPM order to enable the simulation to run, but can reduce the order no further. Try increasing the accuracy of PPPM by reducing the tolerance size, thus inducing a larger PPPM grid. <DT><I>PRD command before simulation box is defined</I> <DD>The prd command cannot be used before a read_data, read_restart, or create_box command. <DT><I>PRD nsteps must be multiple of t_event</I> <DD>Self-explanatory. <DT><I>PRD t_corr must be multiple of t_event</I> <DD>Self-explanatory. +<DT><I>PWD environement variable is unset</I> + +<DD>The KIM library requires that this environment variable be set before +running LAMMPS> + <DT><I>Package command after simulation box is defined</I> -<DD>UNDOCUMENTED +<DD>The package command cannot be used afer a read_data, read_restart, or +create_box command. <DT><I>Package cuda command without USER-CUDA installed</I> -<DD>UNDOCUMENTED +<DD>The USER-CUDA package must be installed via "make yes-user-cuda" +before LAMMPS is built. <DT><I>Pair brownian requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair brownian requires extended particles</I> -<DD>UNDOCUMENTED +<DD>One of the particles has radius 0.0. <DT><I>Pair brownian requires monodisperse particles</I> -<DD>UNDOCUMENTED +<DD>All particles must be the same finite size. <DT><I>Pair brownian/poly requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair brownian/poly requires extended particles</I> -<DD>UNDOCUMENTED +<DD>One of the particles has radius 0.0. <DT><I>Pair brownian/poly requires newton pair off</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair coeff for hybrid has invalid style</I> <DD>Style in pair coeff must have been listed in pair_style command. <DT><I>Pair coul/wolf requires atom attribute q</I> -<DD>UNDOCUMENTED +<DD>The atom style defined does not have this attribute. <DT><I>Pair cutoff < Respa interior cutoff</I> <DD>One or more pairwise cutoffs are too short to use with the specified rRESPA cutoffs. <DT><I>Pair dipole/cut requires atom attributes q, mu, torque</I> -<DD>UNDOCUMENTED +<DD>The atom style defined does not have these attributes. <DT><I>Pair distance < table inner cutoff</I> <DD>Two atoms are closer together than the pairwise table allows. <DT><I>Pair distance > table outer cutoff</I> <DD>Two atoms are further apart than the pairwise table allows. <DT><I>Pair dpd requires ghost atoms store velocity</I> <DD>Use the communicate vel yes command to enable this. <DT><I>Pair gayberne epsilon a,b,c coeffs are not all set</I> <DD>Each atom type involved in pair_style gayberne must have these 3 coefficients set at least once. <DT><I>Pair gayberne requires atom style ellipsoid</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair gayberne requires atoms with same type have same shape</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair gayberne/gpu requires atom style ellipsoid</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair gayberne/gpu requires atoms with same type have same shape</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair granular requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair granular requires ghost atoms store velocity</I> <DD>Use the communicate vel yes command to enable this. <DT><I>Pair granular with shear history requires newton pair off</I> <DD>This is a current restriction of the implementation of pair granular styles with history. <DT><I>Pair hybrid sub-style does not support single call</I> <DD>You are attempting to invoke a single() call on a pair style that doesn't support it. <DT><I>Pair hybrid sub-style is not used</I> <DD>No pair_coeff command used a sub-style specified in the pair_style command. <DT><I>Pair inner cutoff < Respa interior cutoff</I> <DD>One or more pairwise cutoffs are too short to use with the specified rRESPA cutoffs. <DT><I>Pair inner cutoff >= Pair outer cutoff</I> <DD>The specified cutoffs for the pair style are inconsistent. <DT><I>Pair line/lj requires atom style line</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair lubricate requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair lubricate requires ghost atoms store velocity</I> <DD>Use the communicate vel yes command to enable this. <DT><I>Pair lubricate requires monodisperse particles</I> -<DD>UNDOCUMENTED +<DD>All particles must be the same finite size. <DT><I>Pair lubricate/poly requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair lubricate/poly requires extended particles</I> -<DD>UNDOCUMENTED +<DD>One of the particles has radius 0.0. <DT><I>Pair lubricate/poly requires ghost atoms store velocity</I> -<DD>UNDOCUMENTED +<DD>Use the communicate vel yes command to enable this. <DT><I>Pair lubricate/poly requires newton pair off</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair lubricateU requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair lubricateU requires ghost atoms store velocity</I> -<DD>UNDOCUMENTED +<DD>Use the communicate vel yes command to enable this. <DT><I>Pair lubricateU requires monodisperse particles</I> -<DD>UNDOCUMENTED +<DD>All particles must be the same finite size. <DT><I>Pair lubricateU/poly requires ghost atoms store velocity</I> -<DD>UNDOCUMENTED +<DD>Use the communicate vel yes command to enable this. <DT><I>Pair lubricateU/poly requires newton pair off</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair peri lattice is not identical in x, y, and z</I> <DD>The lattice defined by the lattice command must be cubic. <DT><I>Pair peri requires a lattice be defined</I> <DD>Use the lattice command for this purpose. <DT><I>Pair peri requires an atom map, see atom_modify</I> <DD>Even for atomic systems, an atom map is required to find Peridynamic bonds. Use the atom_modify command to define one. <DT><I>Pair resquared epsilon a,b,c coeffs are not all set</I> <DD>Self-explanatory. <DT><I>Pair resquared epsilon and sigma coeffs are not all set</I> <DD>Self-explanatory. <DT><I>Pair resquared requires atom style ellipsoid</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. + +<DT><I>Pair resquared requires atoms with same type have same shape</I> + +<DD>Self-explanatory. <DT><I>Pair resquared/gpu requires atom style ellipsoid</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair resquared/gpu requires atoms with same type have same shape</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair style AIREBO requires atom IDs</I> <DD>This is a requirement to use the AIREBO potential. <DT><I>Pair style AIREBO requires newton pair on</I> <DD>See the newton command. This is a restriction to use the AIREBO potential. <DT><I>Pair style COMB requires atom IDs</I> <DD>This is a requirement to use the AIREBO potential. <DT><I>Pair style COMB requires atom attribute q</I> <DD>Self-explanatory. <DT><I>Pair style COMB requires newton pair on</I> <DD>See the newton command. This is a restriction to use the COMB potential. <DT><I>Pair style MEAM requires newton pair on</I> <DD>See the newton command. This is a restriction to use the MEAM potential. <DT><I>Pair style Stillinger-Weber requires atom IDs</I> <DD>This is a requirement to use the SW potential. <DT><I>Pair style Stillinger-Weber requires newton pair on</I> <DD>See the newton command. This is a restriction to use the SW potential. <DT><I>Pair style Tersoff requires atom IDs</I> <DD>This is a requirement to use the Tersoff potential. <DT><I>Pair style Tersoff requires newton pair on</I> <DD>See the newton command. This is a restriction to use the Tersoff potential. -<DT><I>Pair style born/coul/Wolf requires atom attribute q</I> - -<DD>UNDOCUMENTED - <DT><I>Pair style born/coul/long requires atom attribute q</I> <DD>An atom style that defines this attribute must be used. +<DT><I>Pair style born/coul/wolf requires atom attribute q</I> + +<DD>The atom style defined does not have this attribute. + <DT><I>Pair style buck/coul/cut requires atom attribute q</I> <DD>The atom style defined does not have this attribute. <DT><I>Pair style buck/coul/long requires atom attribute q</I> <DD>The atom style defined does not have these attributes. +<DT><I>Pair style buck/coul/long/gpu requires atom attribute q</I> + +<DD>The atom style defined does not have this attribute. + <DT><I>Pair style coul/cut requires atom attribute q</I> <DD>The atom style defined does not have these attributes. <DT><I>Pair style coul/long/gpu requires atom attribute q</I> -<DD>UNDOCUMENTED +<DD>The atom style defined does not have these attributes. -<DT><I>Pair style does not have single field requested by compute pair/local</I> +<DT><I>Pair style does not have extra field requested by compute pair/local</I> -<DD>UNDOCUMENTED +<DD>The pair style does not support the pN value requested by the compute +pair/local command. <DT><I>Pair style does not support bond_style quartic</I> <DD>The pair style does not have a single() function, so it can not be invoked by bond_style quartic. <DT><I>Pair style does not support compute group/group</I> <DD>The pair_style does not have a single() function, so it cannot be invokded by the compute group/group command. <DT><I>Pair style does not support compute pair/local</I> <DD>The pair style does not have a single() function, so it can -not be invoked by fix bond/swap. +not be invoked by compute pair/local. <DT><I>Pair style does not support compute property/local</I> <DD>The pair style does not have a single() function, so it can not be invoked by fix bond/swap. <DT><I>Pair style does not support fix bond/swap</I> <DD>The pair style does not have a single() function, so it can not be invoked by fix bond/swap. <DT><I>Pair style does not support pair_write</I> <DD>The pair style does not have a single() function, so it can not be invoked by pair write. <DT><I>Pair style does not support rRESPA inner/middle/outer</I> <DD>You are attempting to use rRESPA options with a pair style that does not support them. <DT><I>Pair style granular with history requires atoms have IDs</I> <DD>Atoms in the simulation do not have IDs, so history effects cannot be tracked by the granular pair potential. <DT><I>Pair style hbond/dreiding requires an atom map, see atom_modify</I> <DD>Self-explanatory. <DT><I>Pair style hbond/dreiding requires atom IDs</I> <DD>Self-explanatory. <DT><I>Pair style hbond/dreiding requires molecular system</I> <DD>Self-explanatory. <DT><I>Pair style hbond/dreiding requires newton pair on</I> <DD>See the newton command for details. <DT><I>Pair style hybrid cannot have hybrid as an argument</I> <DD>Self-explanatory. <DT><I>Pair style hybrid cannot have none as an argument</I> <DD>Self-explanatory. -<DT><I>Pair style hybrid cannot use same pair style twice</I> - -<DD>The sub-style arguments of pair_style hybrid cannot be duplicated. -Check the input script. - <DT><I>Pair style is incompatible with KSpace style</I> <DD>If a pair style with a long-range Coulombic component is selected, then a kspace style must also be used. +<DT><I>Pair style kim requires newton pair off</I> + +<DD>Self-explanatory. + <DT><I>Pair style lj/charmm/coul/charmm requires atom attribute q</I> <DD>The atom style defined does not have these attributes. <DT><I>Pair style lj/charmm/coul/long requires atom attribute q</I> <DD>The atom style defined does not have these attributes. <DT><I>Pair style lj/charmm/coul/long/gpu requires atom attribute q</I> -<DD>UNDOCUMENTED +<DD>The atom style defined does not have this attribute. <DT><I>Pair style lj/class2/coul/cut requires atom attribute q</I> <DD>The atom style defined does not have this attribute. <DT><I>Pair style lj/class2/coul/long requires atom attribute q</I> <DD>The atom style defined does not have this attribute. <DT><I>Pair style lj/class2/coul/long/gpu requires atom attribute q</I> -<DD>UNDOCUMENTED +<DD>The atom style defined does not have this attribute. <DT><I>Pair style lj/cut/coul/cut requires atom attribute q</I> <DD>The atom style defined does not have this attribute. <DT><I>Pair style lj/cut/coul/cut/gpu requires atom attribute q</I> -<DD>UNDOCUMENTED +<DD>The atom style defined does not have this attribute. <DT><I>Pair style lj/cut/coul/long requires atom attribute q</I> <DD>The atom style defined does not have this attribute. <DT><I>Pair style lj/cut/coul/long/gpu requires atom attribute q</I> -<DD>UNDOCUMENTED +<DD>The atom style defined does not have this attribute. <DT><I>Pair style lj/cut/coul/long/tip4p requires atom IDs</I> <DD>There are no atom IDs defined in the system and the TIP4P potential requires them to find O,H atoms with a water molecule. <DT><I>Pair style lj/cut/coul/long/tip4p requires atom attribute q</I> <DD>The atom style defined does not have these attributes. <DT><I>Pair style lj/cut/coul/long/tip4p requires newton pair on</I> <DD>This is because the computation of constraint forces within a water molecule adds forces to atoms owned by other processors. <DT><I>Pair style lj/gromacs/coul/gromacs requires atom attribute q</I> <DD>An atom_style with this attribute is needed. +<DT><I>Pair style lj/sdk/coul/long/gpu requires atom attribute q</I> + +<DD>The atom style defined does not have this attribute. + <DT><I>Pair style peri requires atom style peri</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair style reax requires atom IDs</I> <DD>This is a requirement to use the ReaxFF potential. <DT><I>Pair style reax requires newton pair on</I> <DD>This is a requirement to use the ReaxFF potential. <DT><I>Pair table cutoffs must all be equal to use with KSpace</I> <DD>When using pair style table with a long-range KSpace solver, the cutoffs for all atom type pairs must all be the same, since the long-range solver starts at that cutoff. <DT><I>Pair table parameters did not set N</I> <DD>List of pair table parameters must include N setting. <DT><I>Pair tersoff/zbl requires metal or real units</I> <DD>This is a current restriction of this pair potential. <DT><I>Pair tri/lj requires atom style tri</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair yukawa/colloid requires atom style sphere</I> -<DD>UNDOCUMENTED +<DD>Self-explantory. <DT><I>Pair yukawa/colloid requires atoms with same type have same radius</I> -<DD>UNDOCUMENTED +<DD>Self-explantory. <DT><I>Pair_coeff command before pair_style is defined</I> <DD>Self-explanatory. <DT><I>Pair_coeff command before simulation box is defined</I> <DD>The pair_coeff command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Pair_modify command before pair_style is defined</I> <DD>Self-explanatory. <DT><I>Pair_write command before pair_style is defined</I> <DD>Self-explanatory. <DT><I>Particle on or inside fix wall surface</I> <DD>Particles must be "exterior" to the wall in order for energy/force to be calculated. <DT><I>Particle on or inside surface of region used in fix wall/region</I> <DD>Particles must be "exterior" to the region surface in order for energy/force to be calculated. <DT><I>Per-atom compute in equal-style variable formula</I> <DD>Equal-style variables cannot use per-atom quantities. <DT><I>Per-atom energy was not tallied on needed timestep</I> <DD>You are using a thermo keyword that requires potentials to have tallied energy, but they didn't on this timestep. See the variable doc page for ideas on how to make this work. <DT><I>Per-atom fix in equal-style variable formula</I> <DD>Equal-style variables cannot use per-atom quantities. <DT><I>Per-atom virial was not tallied on needed timestep</I> <DD>You are using a thermo keyword that requires potentials to have tallied the virial, but they didn't on this timestep. See the variable doc page for ideas on how to make this work. <DT><I>Per-processor system is too big</I> <DD>The number of owned atoms plus ghost atoms on a single processor must fit in 32-bit integer. <DT><I>Potential energy ID for fix neb does not exist</I> <DD>Self-explanatory. <DT><I>Potential energy ID for fix nvt/nph/npt does not exist</I> -<DD>UNDOCUMENTED +<DD>A compute for potential energy must be defined. <DT><I>Potential file has duplicate entry</I> <DD>The potential file for a SW or Tersoff potential has more than one entry for the same 3 ordered elements. <DT><I>Potential file is missing an entry</I> <DD>The potential file for a SW or Tersoff potential does not have a needed entry. <DT><I>Power by 0 in variable formula</I> <DD>Self-explanatory. <DT><I>Pressure ID for fix box/relax does not exist</I> <DD>The compute ID needed to compute pressure for the fix does not exist. <DT><I>Pressure ID for fix modify does not exist</I> <DD>Self-explanatory. <DT><I>Pressure ID for fix npt/nph does not exist</I> <DD>Self-explanatory. <DT><I>Pressure ID for fix press/berendsen does not exist</I> <DD>The compute ID needed to compute pressure for the fix does not exist. <DT><I>Pressure ID for thermo does not exist</I> <DD>The compute ID needed to compute pressure for thermodynamics does not exist. <DT><I>Pressure control can not be used with fix nvt</I> <DD>Self-explanatory. <DT><I>Pressure control can not be used with fix nvt/asphere</I> <DD>Self-explanatory. <DT><I>Pressure control can not be used with fix nvt/sllod</I> <DD>Self-explanatory. <DT><I>Pressure control can not be used with fix nvt/sphere</I> <DD>Self-explanatory. <DT><I>Pressure control must be used with fix nph</I> <DD>Self-explanatory. <DT><I>Pressure control must be used with fix nph/asphere</I> <DD>Self-explanatory. <DT><I>Pressure control must be used with fix nph/sphere</I> <DD>Self-explanatory. <DT><I>Pressure control must be used with fix nphug</I> -<DD>UNDOCUMENTED +<DD>A pressure control keyword (iso, aniso, tri, x, y, or z) must be +provided. <DT><I>Pressure control must be used with fix npt</I> <DD>Self-explanatory. <DT><I>Pressure control must be used with fix npt/asphere</I> <DD>Self-explanatory. <DT><I>Pressure control must be used with fix npt/sphere</I> <DD>Self-explanatory. <DT><I>Processor count in z must be 1 for 2d simulation</I> <DD>Self-explanatory. <DT><I>Processor partitions are inconsistent</I> <DD>The total number of processors in all partitions must match the number of processors LAMMPS is running on. <DT><I>Processors command after simulation box is defined</I> <DD>The processors command cannot be used after a read_data, read_restart, or create_box command. <DT><I>Processors custom grid file is inconsistent</I> -<DD>UNDOCUMENTED - -<DT><I>Processors custom grid file is invalid</I> - -<DD>UNDOCUMENTED +<DD>The vales in the custom file are not consistent with the number of +processors you are running on or the Px,Py,Pz settings of the +processors command. Or there was not a setting for every processor. <DT><I>Processors grid numa and map style are incompatible</I> -<DD>UNDOCUMENTED +<DD>Using numa for gstyle in the processors command requires using +cart for the map option. <DT><I>Processors part option and grid style are incompatible</I> -<DD>UNDOCUMENTED +<DD>Cannot use gstyle numa or custom with the part option. <DT><I>Processors twogrid requires proc count be a multiple of core count</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. + +<DT><I>Pstart and Pstop must have the same value</I> + +<DD>Self-explanatory. <DT><I>R0 < 0 for fix spring command</I> <DD>Equilibrium spring length is invalid. <DT><I>Reax_defs.h setting for NATDEF is too small</I> <DD>Edit the setting in the ReaxFF library and re-compile the library and re-build LAMMPS. <DT><I>Reax_defs.h setting for NNEIGHMAXDEF is too small</I> <DD>Edit the setting in the ReaxFF library and re-compile the library and re-build LAMMPS. <DT><I>Receiving partition in processors part command is already a receiver</I> -<DD>UNDOCUMENTED +<DD>Cannot specify a partition to be a receiver twice. <DT><I>Region ID for compute reduce/region does not exist</I> <DD>Self-explanatory. <DT><I>Region ID for compute temp/region does not exist</I> <DD>Self-explanatory. <DT><I>Region ID for dump custom does not exist</I> <DD>Self-explanatory. <DT><I>Region ID for fix addforce does not exist</I> <DD>Self-explanatory. <DT><I>Region ID for fix ave/spatial does not exist</I> <DD>Self-explanatory. <DT><I>Region ID for fix aveforce does not exist</I> <DD>Self-explanatory. <DT><I>Region ID for fix deposit does not exist</I> <DD>Self-explanatory. <DT><I>Region ID for fix evaporate does not exist</I> <DD>Self-explanatory. <DT><I>Region ID for fix heat does not exist</I> <DD>Self-explanatory. <DT><I>Region ID for fix setforce does not exist</I> <DD>Self-explanatory. <DT><I>Region ID for fix wall/region does not exist</I> <DD>Self-explanatory. <DT><I>Region ID in variable formula does not exist</I> <DD>Self-explanatory. <DT><I>Region cannot have 0 length rotation vector</I> <DD>Self-explanatory. <DT><I>Region intersect region ID does not exist</I> <DD>Self-explanatory. <DT><I>Region union or intersect cannot be dynamic</I> <DD>The sub-regions can be dynamic, but not the combined region. <DT><I>Region union region ID does not exist</I> <DD>One or more of the region IDs specified by the region union command does not exist. <DT><I>Replacing a fix, but new style != old style</I> <DD>A fix ID can be used a 2nd time, but only if the style matches the previous fix. In this case it is assumed you with to reset a fix's parameters. This error may mean you are mistakenly re-using a fix ID when you do not intend to. <DT><I>Replicate command before simulation box is defined</I> <DD>The replicate command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Replicate did not assign all atoms correctly</I> <DD>Atoms replicated by the replicate command were not assigned correctly to processors. This is likely due to some atom coordinates being outside a non-periodic simulation box. <DT><I>Replicated molecular system atom IDs are too big</I> <DD>See the setting for the allowed atom ID size in the src/lmptype.h file. <DT><I>Replicated system is too big</I> <DD>See the setting for bigint in the src/lmptype.h file. <DT><I>Resetting timestep is not allowed with fix move</I> <DD>This is because fix move is moving atoms based on elapsed time. <DT><I>Respa inner cutoffs are invalid</I> <DD>The first cutoff must be <= the second cutoff. <DT><I>Respa levels must be >= 1</I> <DD>Self-explanatory. <DT><I>Respa middle cutoffs are invalid</I> <DD>The first cutoff must be <= the second cutoff. <DT><I>Restrain atoms %d %d %d %d missing on proc %d at step %ld</I> -<DD>UNDOCUMENTED +<DD>The 4 atoms in a restrain dihedral specified by the fix restrain +command are not all accessible to a processor. This probably means an +atom has moved too far. <DT><I>Reuse of compute ID</I> <DD>A compute ID cannot be used twice. <DT><I>Reuse of dump ID</I> <DD>A dump ID cannot be used twice. <DT><I>Reuse of region ID</I> <DD>A region ID cannot be used twice. <DT><I>Rigid body has degenerate moment of inertia</I> <DD>Fix poems will only work with bodies (collections of atoms) that have non-zero principal moments of inertia. This means they must be 3 or more non-collinear atoms, even with joint atoms removed. <DT><I>Rigid fix must come before NPT/NPH fix</I> <DD>NPT/NPH fix must be defined in input script after all rigid fixes, else the rigid fix contribution to the pressure virial is incorrect. <DT><I>Rmask function in equal-style variable formula</I> <DD>Rmask is per-atom operation. <DT><I>Run command before simulation box is defined</I> <DD>The run command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Run command start value is after start of run</I> <DD>Self-explanatory. <DT><I>Run command stop value is before end of run</I> <DD>Self-explanatory. <DT><I>Run_style command before simulation box is defined</I> <DD>The run_style command cannot be used before a read_data, read_restart, or create_box command. <DT><I>SRD bin size for fix srd differs from user request</I> -<DD>Fix SRD had to adjust the bin size to fit the simulation box. +<DD>Fix SRD had to adjust the bin size to fit the simulation box. See the +cubic keyword if you want this message to be an error vs warning. <DT><I>SRD bins for fix srd are not cubic enough</I> -<DD>The bin shape is not within tolerance of cubic. +<DD>The bin shape is not within tolerance of cubic. See the cubic +keyword if you want this message to be an error vs warning. -<DT><I>SRD particle %d started inside big particle %d on step %ld bounce %d\n</I> +<DT><I>SRD particle %d started inside big particle %d on step %ld bounce %d</I> -<DD>UNDOCUMENTED +<DD>See the inside keyword if you want this message to be an error vs +warning. <DT><I>Same dimension twice in fix ave/spatial</I> <DD>Self-explanatory. <DT><I>Sending partition in processors part command is already a sender</I> -<DD>UNDOCUMENTED +<DD>Cannot specify a partition to be a sender twice. <DT><I>Set command before simulation box is defined</I> <DD>The set command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Set command with no atoms existing</I> <DD>No atoms are yet defined so the set command cannot be used. <DT><I>Set region ID does not exist</I> <DD>Region ID specified in set command does not exist. <DT><I>Shake angles have different bond types</I> <DD>All 3-atom angle-constrained SHAKE clusters specified by the fix shake command that are the same angle type, must also have the same bond types for the 2 bonds in the angle. <DT><I>Shake atoms %d %d %d %d missing on proc %d at step %ld</I> <DD>The 4 atoms in a single shake cluster specified by the fix shake command are not all accessible to a processor. This probably means -an atom has moved too far. :dd +an atom has moved too far. <DT><I>Shake atoms %d %d %d missing on proc %d at step %ld</I> <DD>The 3 atoms in a single shake cluster specified by the fix shake command are not all accessible to a processor. This probably means -an atom has moved too far. :dd +an atom has moved too far. <DT><I>Shake atoms %d %d missing on proc %d at step %ld</I> <DD>The 2 atoms in a single shake cluster specified by the fix shake command are not all accessible to a processor. This probably means -an atom has moved too far. :dd +an atom has moved too far. <DT><I>Shake cluster of more than 4 atoms</I> <DD>A single cluster specified by the fix shake command can have no more than 4 atoms. <DT><I>Shake clusters are connected</I> <DD>A single cluster specified by the fix shake command must have a single central atom with up to 3 other atoms bonded to it. <DT><I>Shake determinant = 0.0</I> <DD>The determinant of the matrix being solved for a single cluster specified by the fix shake command is numerically invalid. <DT><I>Shake fix must come before NPT/NPH fix</I> <DD>NPT fix must be defined in input script after SHAKE fix, else the SHAKE fix contribution to the pressure virial is incorrect. <DT><I>Small, tag, big integers are not sized correctly</I> -<DD>UNDOCUMENTED +<DD>See description of these 3 data types in src/lmptype.h. <DT><I>Smallint setting in lmptype.h is invalid</I> <DD>It has to be the size of an integer. <DT><I>Smallint setting in lmptype.h is not compatible</I> <DD>Smallint stored in restart file is not consistent with LAMMPS version you are running. +<DT><I>Specified processors != physical processors</I> + +<DD>The 3d grid of processors defined by the processors command does not +match the number of processors LAMMPS is being run on. + +<DT><I>Specified target stress must be uniaxial or hydrostatic</I> + +<DD>Self-explanatory. + <DT><I>Sqrt of negative value in variable formula</I> <DD>Self-explanatory. <DT><I>Substitution for illegal variable</I> <DD>Input script line contained a variable that could not be substituted for. <DT><I>System in data file is too big</I> <DD>See the setting for bigint in the src/lmptype.h file. <DT><I>TAD nsteps must be multiple of t_event</I> <DD>Self-explanatory. <DT><I>TIP4P hydrogen has incorrect atom type</I> <DD>The TIP4P pairwise computation found an H atom whose type does not agree with the specified H type. <DT><I>TIP4P hydrogen is missing</I> <DD>The TIP4P pairwise computation failed to find the correct H atom within a water molecule. <DT><I>TMD target file did not list all group atoms</I> <DD>The target file for the fix tmd command did not list all atoms in the fix group. <DT><I>Tad command before simulation box is defined</I> <DD>Self-explanatory. <DT><I>Tagint setting in lmptype.h is invalid</I> <DD>Tagint must be as large or larger than smallint. <DT><I>Tagint setting in lmptype.h is not compatible</I> <DD>Smallint stored in restart file is not consistent with LAMMPS version you are running. <DT><I>Target temperature for fix nvt/npt/nph cannot be 0.0</I> <DD>Self-explanatory. <DT><I>Target temperature for fix rigid/nvt cannot be 0.0</I> <DD>Self-explanatory. <DT><I>Temper command before simulation box is defined</I> <DD>The temper command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Temperature ID for fix bond/swap does not exist</I> <DD>Self-explanatory. <DT><I>Temperature ID for fix box/relax does not exist</I> <DD>Self-explanatory. <DT><I>Temperature ID for fix nvt/nph/npt does not exist</I> <DD>Self-explanatory. <DT><I>Temperature ID for fix press/berendsen does not exist</I> <DD>Self-explanatory. <DT><I>Temperature ID for fix temp/berendsen does not exist</I> <DD>Self-explanatory. <DT><I>Temperature ID for fix temp/rescale does not exist</I> <DD>Self-explanatory. <DT><I>Temperature control can not be used with fix nph</I> <DD>Self-explanatory. <DT><I>Temperature control can not be used with fix nph/asphere</I> <DD>Self-explanatory. <DT><I>Temperature control can not be used with fix nph/sphere</I> <DD>Self-explanatory. <DT><I>Temperature control must be used with fix nphug</I> -<DD>UNDOCUMENTED +<DD>The temp keyword must be provided. <DT><I>Temperature control must be used with fix npt</I> <DD>Self-explanatory. <DT><I>Temperature control must be used with fix npt/asphere</I> <DD>Self-explanatory. <DT><I>Temperature control must be used with fix npt/sphere</I> <DD>Self-explanatory. <DT><I>Temperature control must be used with fix nvt</I> <DD>Self-explanatory. <DT><I>Temperature control must be used with fix nvt/asphere</I> <DD>Self-explanatory. <DT><I>Temperature control must be used with fix nvt/sllod</I> <DD>Self-explanatory. <DT><I>Temperature control must be used with fix nvt/sphere</I> <DD>Self-explanatory. <DT><I>Temperature for fix nvt/sllod does not have a bias</I> <DD>The specified compute must compute temperature with a bias. <DT><I>Tempering could not find thermo_pe compute</I> <DD>This compute is created by the thermo command. It must have been explicitly deleted by a uncompute command. <DT><I>Tempering fix ID is not defined</I> <DD>The fix ID specified by the temper command does not exist. <DT><I>Tempering temperature fix is not valid</I> <DD>The fix specified by the temper command is not one that controls temperature (nvt or langevin). +<DT><I>The package gpu command is required for gpu styles</I> + +<DD>UNDOCUMENTED + <DT><I>Thermo and fix not computed at compatible times</I> <DD>Fixes generate values on specific timesteps. The thermo output does not match these timesteps. <DT><I>Thermo compute array is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Thermo compute does not compute array</I> <DD>Self-explanatory. <DT><I>Thermo compute does not compute scalar</I> <DD>Self-explanatory. <DT><I>Thermo compute does not compute vector</I> <DD>Self-explanatory. <DT><I>Thermo compute vector is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Thermo custom variable cannot be indexed</I> <DD>Self-explanatory. <DT><I>Thermo custom variable is not equal-style variable</I> <DD>Only equal-style variables can be output with thermodynamics, not atom-style variables. <DT><I>Thermo every variable returned a bad timestep</I> <DD>The variable must return a timestep greater than the current timestep. <DT><I>Thermo fix array is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Thermo fix does not compute array</I> <DD>Self-explanatory. <DT><I>Thermo fix does not compute scalar</I> <DD>Self-explanatory. <DT><I>Thermo fix does not compute vector</I> <DD>Self-explanatory. <DT><I>Thermo fix vector is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Thermo keyword in variable requires lattice be defined</I> <DD>The xlat, ylat, zlat keywords refer to lattice properties. <DT><I>Thermo keyword in variable requires thermo to use/init pe</I> <DD>You are using a thermo keyword in a variable that requires potential energy to be calculated, but your thermo output does not use it. Add it to your thermo output. <DT><I>Thermo keyword in variable requires thermo to use/init press</I> <DD>You are using a thermo keyword in a variable that requires pressure to be calculated, but your thermo output does not use it. Add it to your thermo output. <DT><I>Thermo keyword in variable requires thermo to use/init temp</I> <DD>You are using a thermo keyword in a variable that requires temperature to be calculated, but your thermo output does not use it. Add it to your thermo output. <DT><I>Thermo keyword requires lattice be defined</I> <DD>The xlat, ylat, zlat keywords refer to lattice properties. <DT><I>Thermo style does not use press</I> <DD>Cannot use thermo_modify to set this parameter since the thermo_style is not computing this quantity. <DT><I>Thermo style does not use temp</I> <DD>Cannot use thermo_modify to set this parameter since the thermo_style is not computing this quantity. <DT><I>Thermo_modify int format does not contain d character</I> <DD>Self-explanatory. <DT><I>Thermo_modify pressure ID does not compute pressure</I> <DD>The specified compute ID does not compute pressure. <DT><I>Thermo_modify temperature ID does not compute temperature</I> <DD>The specified compute ID does not compute temperature. <DT><I>Thermo_style command before simulation box is defined</I> <DD>The thermo_style command cannot be used before a read_data, read_restart, or create_box command. <DT><I>This variable thermo keyword cannot be used between runs</I> <DD>Keywords that refer to time (such as cpu, elapsed) do not make sense in between runs. <DT><I>Threshhold for an atom property that isn't allocated</I> <DD>A dump threshhold has been requested on a quantity that is not defined by the atom style used in this simulation. <DT><I>Timestep must be >= 0</I> -<DD>Specified timestep size is invalid. +<DD>Specified timestep is invalid. <DT><I>Too big a problem to use velocity create loop all</I> <DD>The system size must fit in a 32-bit integer to use this option. <DT><I>Too big a timestep</I> -<DD>UNDOCUMENTED +<DD>Specified timestep is too large. <DT><I>Too big a timestep for dump dcd</I> <DD>The timestep must fit in a 32-bit integer to use this dump style. <DT><I>Too big a timestep for dump xtc</I> <DD>The timestep must fit in a 32-bit integer to use this dump style. <DT><I>Too few bits for lookup table</I> <DD>Table size specified via pair_modify command does not work with your machine's floating point representation. <DT><I>Too many atom sorting bins</I> <DD>This is likely due to an immense simulation box that has blown up to a large size. <DT><I>Too many atoms for dump dcd</I> <DD>The system size must fit in a 32-bit integer to use this dump style. <DT><I>Too many atoms for dump xtc</I> <DD>The system size must fit in a 32-bit integer to use this dump style. <DT><I>Too many atoms to dump sort</I> <DD>Cannot sort when running with more than 2^31 atoms. <DT><I>Too many exponent bits for lookup table</I> <DD>Table size specified via pair_modify command does not work with your machine's floating point representation. <DT><I>Too many groups</I> <DD>The maximum number of atom groups (including the "all" group) is given by MAX_GROUP in group.cpp and is 32. <DT><I>Too many iterations</I> <DD>You must use a number of iterations that fit in a 32-bit integer for minimization. <DT><I>Too many local+ghost atoms for neighbor list</I> -<DD>UNDOCUMENTED +<DD>The number of nlocal + nghost atoms on a processor +is limited by the size of a 32-bit integer with 2 bits +removed for masking 1-2, 1-3, 1-4 neighbors. <DT><I>Too many mantissa bits for lookup table</I> <DD>Table size specified via pair_modify command does not work with your machine's floating point representation. <DT><I>Too many masses for fix shake</I> <DD>The fix shake command cannot list more masses than there are atom types. <DT><I>Too many neighbor bins</I> <DD>This is likely due to an immense simulation box that has blown up to a large size. <DT><I>Too many timesteps</I> -<DD>UNDOCUMENTED +<DD>The cummulative timesteps must fit in a 64-bit integer. <DT><I>Too many timesteps for NEB</I> <DD>You must use a number of timesteps that fit in a 32-bit integer for NEB. <DT><I>Too many total atoms</I> <DD>See the setting for bigint in the src/lmptype.h file. <DT><I>Too many total bits for bitmapped lookup table</I> <DD>Table size specified via pair_modify command is too large. Note that a value of N generates a 2^N size table. <DT><I>Too many touching neighbors - boost MAXTOUCH</I> <DD>A granular simulation has too many neighbors touching one atom. The MAXTOUCH parameter in fix_shear_history.cpp must be set larger and LAMMPS must be re-built. <DT><I>Too much per-proc info for dump</I> <DD>Number of local atoms times number of columns must fit in a 32-bit integer for dump. <DT><I>Tree structure in joint connections</I> <DD>Fix poems cannot (yet) work with coupled bodies whose joints connect the bodies in a tree structure. -<DT><I>Triclinic box must be periodic in skewed dimensions</I> - -<DD>This is a requirement for using a non-orthogonal box. E.g. to set a -non-zero xy tilt, both x and y must be periodic dimensions. - <DT><I>Triclinic box skew is too large</I> <DD>The displacement in a skewed direction must be less than half the box length in that dimension. E.g. the xy tilt must be between -half and +half of the x box length. <DT><I>Tried to convert a double to int, but input_double > INT_MAX</I> <DD>Self-explanatory. <DT><I>Two groups cannot be the same in fix spring couple</I> <DD>Self-explanatory. <DT><I>USER-CUDA mode requires CUDA variant of min style</I> -<DD>UNDOCUMENTED +<DD>CUDA mode is enabled, so the min style must include a cuda suffix. <DT><I>USER-CUDA mode requires CUDA variant of run style</I> +<DD>CUDA mode is enabled, so the run style must include a cuda suffix. + +<DT><I>Unable to initialize accelerator for use</I> + <DD>UNDOCUMENTED <DT><I>Unbalanced quotes in input line</I> <DD>No matching end double quote was found following a leading double quote. <DT><I>Unexpected end of -reorder file</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Unexpected end of custom file</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Unexpected end of data file</I> <DD>LAMMPS hit the end of the data file while attempting to read a section. Something is wrong with the format of the data file. -<DT><I>Unexpected end of reorder file</I> - -<DD>UNDOCUMENTED - <DT><I>Units command after simulation box is defined</I> <DD>The units command cannot be used after a read_data, read_restart, or create_box command. <DT><I>Universe/uloop variable count < # of partitions</I> <DD>A universe or uloop style variable must specify a number of values >= to the number of processor partitions. <DT><I>Unknown command: %s</I> <DD>The command is not known to LAMMPS. Check the input script. +<DT><I>Unknown error in GPU library</I> + +<DD>UNDOCUMENTED + <DT><I>Unknown identifier in data file: %s</I> <DD>A section of the data file cannot be read by LAMMPS. <DT><I>Unknown table style in angle style table</I> <DD>Self-explanatory. <DT><I>Unknown table style in bond style table</I> <DD>Self-explanatory. <DT><I>Unknown table style in pair_style command</I> <DD>Style of table is invalid for use with pair_style table command. <DT><I>Unrecognized lattice type in MEAM file 1</I> <DD>The lattice type in an entry of the MEAM library file is not valid. <DT><I>Unrecognized lattice type in MEAM file 2</I> <DD>The lattice type in an entry of the MEAM parameter file is not valid. <DT><I>Unrecognized pair style in compute pair command</I> <DD>Self-explanatory. +<DT><I>Use of change_box with undefined lattice</I> + +<DD>Must use lattice command with displace_box command if units option is +set to lattice. + <DT><I>Use of compute temp/ramp with undefined lattice</I> <DD>Must use lattice command with compute temp/ramp command if units option is set to lattice. <DT><I>Use of displace_atoms with undefined lattice</I> <DD>Must use lattice command with displace_atoms command if units option is set to lattice. -<DT><I>Use of displace_box with undefined lattice</I> - -<DD>Must use lattice command with displace_box command if units option is -set to lattice. - -<DT><I>Use of fix append_atoms with undefined lattice</I> +<DT><I>Use of fix append/atoms with undefined lattice</I> -<DD>UNDOCUMENTED +<DD>A lattice must be defined before using this fix. <DT><I>Use of fix ave/spatial with undefined lattice</I> <DD>A lattice must be defined to use fix ave/spatial with units = lattice. <DT><I>Use of fix deform with undefined lattice</I> <DD>A lattice must be defined to use fix deform with units = lattice. <DT><I>Use of fix deposit with undefined lattice</I> <DD>Must use lattice command with compute fix deposit command if units option is set to lattice. <DT><I>Use of fix dt/reset with undefined lattice</I> <DD>Must use lattice command with fix dt/reset command if units option is set to lattice. <DT><I>Use of fix indent with undefined lattice</I> <DD>The lattice command must be used to define a lattice before using the fix indent command. <DT><I>Use of fix move with undefined lattice</I> <DD>Must use lattice command with fix move command if units option is set to lattice. <DT><I>Use of fix recenter with undefined lattice</I> <DD>Must use lattice command with fix recenter command if units option is set to lattice. <DT><I>Use of fix wall with undefined lattice</I> <DD>Must use lattice command with fix wall command if units option is set to lattice. <DT><I>Use of fix wall/piston with undefined lattice</I> -<DD>UNDOCUMENTED +<DD>A lattice must be defined before using this fix. <DT><I>Use of region with undefined lattice</I> <DD>If scale = lattice (the default) for the region command, then a lattice must first be defined via the lattice command. <DT><I>Use of velocity with undefined lattice</I> <DD>If scale = lattice (the default) for the velocity set or velocity ramp command, then a lattice must first be defined via the lattice command. <DT><I>Using fix nvt/sllod with inconsistent fix deform remap option</I> <DD>Fix nvt/sllod requires that deforming atoms have a velocity profile provided by "remap v" as a fix deform option. <DT><I>Using fix nvt/sllod with no fix deform defined</I> <DD>Self-explanatory. <DT><I>Using fix srd with inconsistent fix deform remap option</I> <DD>When shearing the box in an SRD simulation, the remap v option for fix deform needs to be used. <DT><I>Using pair lubricate with inconsistent fix deform remap option</I> -<DD>UNDOCUMENTED +<DD>If fix deform is used, the remap v option is required. <DT><I>Using pair lubricate/poly with inconsistent fix deform remap option</I> -<DD>UNDOCUMENTED +<DD>If fix deform is used, the remap v option is required. <DT><I>Variable evaluation before simulation box is defined</I> <DD>Cannot evaluate a compute or fix or atom-based value in a variable before the simulation has been setup. <DT><I>Variable for compute ti is invalid style</I> <DD>Self-explanatory. <DT><I>Variable for dump every is invalid style</I> <DD>Only equal-style variables can be used. <DT><I>Variable for dump image center is invalid style</I> -<DD>UNDOCUMENTED +<DD>Must be an equal-style variable. <DT><I>Variable for dump image persp is invalid style</I> -<DD>UNDOCUMENTED +<DD>Must be an equal-style variable. <DT><I>Variable for dump image phi is invalid style</I> -<DD>UNDOCUMENTED +<DD>Must be an equal-style variable. <DT><I>Variable for dump image theta is invalid style</I> -<DD>UNDOCUMENTED +<DD>Must be an equal-style variable. <DT><I>Variable for dump image zoom is invalid style</I> -<DD>UNDOCUMENTED +<DD>Must be an equal-style variable. <DT><I>Variable for fix adapt is invalid style</I> <DD>Only equal-style variables can be used. <DT><I>Variable for fix addforce is invalid style</I> <DD>Self-explanatory. <DT><I>Variable for fix aveforce is invalid style</I> <DD>Only equal-style variables can be used. +<DT><I>Variable for fix deform is invalid style</I> + +<DD>The variable must be an equal-style variable. + <DT><I>Variable for fix efield is invalid style</I> <DD>Only equal-style variables can be used. <DT><I>Variable for fix indent is invalid style</I> <DD>Only equal-style variables can be used. <DT><I>Variable for fix indent is not equal style</I> <DD>Only equal-style variables can be used. <DT><I>Variable for fix langevin is invalid style</I> -<DD>UNDOCUMENTED +<DD>It must be an equal-style variable. <DT><I>Variable for fix move is invalid style</I> <DD>Only equal-style variables can be used. <DT><I>Variable for fix setforce is invalid style</I> <DD>Only equal-style variables can be used. <DT><I>Variable for fix wall is invalid style</I> <DD>Only equal-style variables can be used. <DT><I>Variable for fix wall/reflect is invalid style</I> <DD>Only equal-style variables can be used. <DT><I>Variable for fix wall/srd is invalid style</I> <DD>Only equal-style variables can be used. <DT><I>Variable for region is invalid style</I> <DD>Only equal-style variables can be used. <DT><I>Variable for region is not equal style</I> <DD>Self-explanatory. <DT><I>Variable for thermo every is invalid style</I> <DD>Only equal-style variables can be used. <DT><I>Variable for velocity set is invalid style</I> <DD>Only atom-style variables can be used. <DT><I>Variable formula compute array is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Variable formula compute vector is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Variable formula fix array is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Variable formula fix vector is accessed out-of-range</I> <DD>Self-explanatory. <DT><I>Variable name for compute atom/molecule does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for compute reduce does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for compute ti does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for dump every does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for dump image center does not exist</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Variable name for dump image persp does not exist</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Variable name for dump image phi does not exist</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Variable name for dump image theta does not exist</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Variable name for dump image zoom does not exist</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Variable name for fix adapt does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for fix addforce does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for fix ave/atom does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for fix ave/correlate does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for fix ave/histo does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for fix ave/spatial does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for fix ave/time does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for fix aveforce does not exist</I> <DD>Self-explanatory. +<DT><I>Variable name for fix deform does not exist</I> + +<DD>Self-explantory. + <DT><I>Variable name for fix efield does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for fix indent does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for fix langevin does not exist</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Variable name for fix move does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for fix setforce does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for fix store/state does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for fix wall does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for fix wall/reflect does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for fix wall/srd does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for region does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for thermo every does not exist</I> <DD>Self-explanatory. <DT><I>Variable name for velocity set does not exist</I> <DD>Self-explanatory. <DT><I>Variable name must be alphanumeric or underscore characters</I> <DD>Self-explanatory. <DT><I>Velocity command before simulation box is defined</I> <DD>The velocity command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Velocity command with no atoms existing</I> <DD>A velocity command has been used, but no atoms yet exist. <DT><I>Velocity ramp in z for a 2d problem</I> <DD>Self-explanatory. <DT><I>Velocity temperature ID does not compute temperature</I> <DD>The compute ID given to the velocity command must compute temperature. <DT><I>Verlet/split requires 2 partitions</I> -<DD>UNDOCUMENTED +<DD>See the -partition command-line switch. <DT><I>Verlet/split requires Rspace partition layout be multiple of Kspace partition layout in each dim</I> -<DD>UNDOCUMENTED +<DD>This is controlled by the processors command. <DT><I>Verlet/split requires Rspace partition size be multiple of Kspace partition size</I> -<DD>UNDOCUMENTED +<DD>This is so there is an equal number of Rspace processors for every +Kspace processor. <DT><I>Virial was not tallied on needed timestep</I> <DD>You are using a thermo keyword that requires potentials to have tallied the virial, but they didn't on this timestep. See the variable doc page for ideas on how to make this work. <DT><I>Wall defined twice in fix wall command</I> <DD>Self-explanatory. <DT><I>Wall defined twice in fix wall/reflect command</I> <DD>Self-explanatory. <DT><I>Wall defined twice in fix wall/srd command</I> <DD>Self-explanatory. <DT><I>World variable count doesn't match # of partitions</I> <DD>A world-style variable must specify a number of values equal to the number of processor partitions. <DT><I>Write_restart command before simulation box is defined</I> <DD>The write_restart command cannot be used before a read_data, read_restart, or create_box command. <DT><I>Zero-length lattice orient vector</I> <DD>Self-explanatory. </DL> <H4><A NAME = "warn"></A>Warnings: </H4> <DL> <DT><I>Atom with molecule ID = 0 included in compute molecule group</I> <DD>The group used in a compute command that operates on moleclues includes atoms with no molecule ID. This is probably not what you want. <DT><I>Broken bonds will not alter angles, dihedrals, or impropers</I> <DD>See the doc page for fix bond/break for more info on this restriction. <DT><I>Building an occasional neighobr list when atoms may have moved too far</I> <DD>This can cause LAMMPS to crash when the neighbor list is built. The solution is to check for building the regular neighbor lists more frequently. <DT><I>Compute cna/atom cutoff may be too large to find ghost atom neighbors</I> <DD>The neighbor cutoff used may not encompass enough ghost atoms to perform this operation correctly. <DT><I>Computing temperature of portions of rigid bodies</I> <DD>The group defined by the temperature compute does not encompass all the atoms in one or more rigid bodies, so the change in degrees-of-freedom for the atoms in those partial rigid bodies will not be accounted for. <DT><I>Created bonds will not create angles, dihedrals, or impropers</I> <DD>See the doc page for fix bond/create for more info on this restriction. <DT><I>Dihedral problem: %d %ld %d %d %d %d</I> <DD>Conformation of the 4 listed dihedral atoms is extreme; you may want -to check your simulation geometry. :dd +to check your simulation geometry. <DT><I>Dump dcd/xtc timestamp may be wrong with fix dt/reset</I> <DD>If the fix changes the timestep, the dump dcd file will not reflect the change. <DT><I>FENE bond too long: %ld %d %d %g</I> <DD>A FENE bond has stretched dangerously far. It's interaction strength -will be truncated to attempt to prevent the bond from blowing up. :dd +will be truncated to attempt to prevent the bond from blowing up. <DT><I>FENE bond too long: %ld %g</I> <DD>A FENE bond has stretched dangerously far. It's interaction strength -will be truncated to attempt to prevent the bond from blowing up. :dd +will be truncated to attempt to prevent the bond from blowing up. <DT><I>Fix GCMC may delete atom with non-zero molecule ID</I> <DD>UNDOCUMENTED <DT><I>Fix SRD walls overlap but fix srd overlap not set</I> <DD>You likely want to set this in your input script. <DT><I>Fix bond/swap will ignore defined angles</I> <DD>See the doc page for fix bond/swap for more info on this restriction. <DT><I>Fix evaporate may delete atom with non-zero molecule ID</I> -<DD>UNDOCUMENTED +<DD>This is probably an error, since you should not delete only one atom +of a molecule. <DT><I>Fix move does not update angular momentum</I> <DD>Atoms store this quantity, but fix move does not (yet) update it. <DT><I>Fix move does not update quaternions</I> <DD>Atoms store this quantity, but fix move does not (yet) update it. <DT><I>Fix recenter should come after all other integration fixes</I> <DD>Other fixes may change the position of the center-of-mass, so fix recenter should come last. <DT><I>Fix srd SRD moves may trigger frequent reneighboring</I> <DD>This is because the SRD particles may move long distances. <DT><I>Fix srd grid size > 1/4 of big particle diameter</I> <DD>This may cause accuracy problems. <DT><I>Fix srd particle moved outside valid domain</I> <DD>This may indicate a problem with your simulation parameters. <DT><I>Fix srd particles may move > big particle diameter</I> <DD>This may cause accuracy problems. <DT><I>Fix srd viscosity < 0.0 due to low SRD density</I> <DD>This may cause accuracy problems. <DT><I>Fix thermal/conductivity comes before fix ave/spatial</I> <DD>The order of these 2 fixes in your input script is such that fix thermal/conductivity comes first. If you are using fix ave/spatial to measure the temperature profile induced by fix viscosity, then this may cause a glitch in the profile since you are averaging immediately after swaps have occurred. Flipping the order of the 2 fixes typically helps. <DT><I>Fix viscosity comes before fix ave/spatial</I> <DD>The order of these 2 fixes in your input script is such that fix viscosity comes first. If you are using fix ave/spatial to measure the velocity profile induced by fix viscosity, then this may cause a glitch in the profile since you are averaging immediately after swaps have occurred. Flipping the order of the 2 fixes typically helps. <DT><I>Group for fix_modify temp != fix group</I> <DD>The fix_modify command is specifying a temperature computation that computes a temperature on a different group of atoms than the fix itself operates on. This is probably not what you want to do. <DT><I>Improper problem: %d %ld %d %d %d %d</I> <DD>Conformation of the 4 listed improper atoms is extreme; you may want -to check your simulation geometry. :dd +to check your simulation geometry. <DT><I>Kspace_modify slab param < 2.0 may cause unphysical behavior</I> <DD>The kspace_modify slab parameter should be larger to insure periodic grids padded with empty space do not overlap. <DT><I>Less insertions than requested</I> <DD>Less atom insertions occurred on this timestep due to the fix pour command than were scheduled. This is probably because there were too many overlaps detected. +<DT><I>Lost atoms via change_box: original %ld current %ld</I> + +<DD>The command options you have used caused atoms to be lost. + +<DT><I>Lost atoms via displace_atoms: original %ld current %ld</I> + +<DD>The command options you have used caused atoms to be lost. + +<DT><I>Lost atoms: original %ld current %ld</I> + +<DD>Lost atoms are checked for each time thermo output is done. See the +thermo_modify lost command for options. Lost atoms usually indicate +bad dynamics, e.g. atoms have been blown far out of the simulation +box, or moved futher than one processor's sub-domain away before +reneighboring. + <DT><I>Mismatch between velocity and compute groups</I> <DD>The temperature computation used by the velocity command will not be on the same group of atoms that velocities are being set for. <DT><I>More than one compute centro/atom</I> <DD>It is not efficient to use compute centro/atom more than once. <DT><I>More than one compute cluster/atom</I> <DD>It is not efficient to use compute cluster/atom more than once. <DT><I>More than one compute cna/atom defined</I> <DD>It is not efficient to use compute cna/atom more than once. <DT><I>More than one compute coord/atom</I> <DD>It is not efficient to use compute coord/atom more than once. <DT><I>More than one compute damage/atom</I> <DD>It is not efficient to use compute ke/atom more than once. <DT><I>More than one compute ke/atom</I> <DD>It is not efficient to use compute ke/atom more than once. <DT><I>More than one fix poems</I> <DD>It is not efficient to use fix poems more than once. <DT><I>More than one fix rigid</I> <DD>It is not efficient to use fix rigid more than once. <DT><I>New thermo_style command, previous thermo_modify settings will be lost</I> <DD>If a thermo_style command is used after a thermo_modify command, the settings changed by the thermo_modify command will be reset to their default values. This is because the thermo_modify commmand acts on the currently defined thermo style, and a thermo_style command creates a new style. <DT><I>No Kspace calculation with verlet/split</I> -<DD>UNDOCUMENTED +<DD>The 2nd partition performs a kspace calculation so the kspace_style +command must be used. <DT><I>No fixes defined, atoms won't move</I> <DD>If you are not using a fix like nve, nvt, npt then atom velocities and coordinates will not be updated during timestepping. <DT><I>No joints between rigid bodies, use fix rigid instead</I> <DD>The bodies defined by fix poems are not connected by joints. POEMS will integrate the body motion, but it would be more efficient to use fix rigid. <DT><I>Not using real units with pair reax</I> <DD>This is most likely an error, unless you have created your own ReaxFF parameter file in a different set of units. <DT><I>One or more atoms are time integrated more than once</I> <DD>This is probably an error since you typically do not want to advance the positions or velocities of an atom more than once per timestep. <DT><I>One or more compute molecules has atoms not in group</I> <DD>The group used in a compute command that operates on moleclues does not include all the atoms in some molecules. This is probably not what you want. <DT><I>One or more respa levels compute no forces</I> <DD>This is computationally inefficient. <DT><I>Pair COMB charge %.10f with force %.10f hit max barrier</I> <DD>Something is possibly wrong with your model. <DT><I>Pair COMB charge %.10f with force %.10f hit min barrier</I> <DD>Something is possibly wrong with your model. <DT><I>Pair brownian needs newton pair on for momentum conservation</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair dpd needs newton pair on for momentum conservation</I> -<DD>UNDOCUMENTED +<DD>Self-explanatory. <DT><I>Pair dsmc: num_of_collisions > number_of_A</I> <DD>Collision model in DSMC is breaking down. <DT><I>Pair dsmc: num_of_collisions > number_of_B</I> <DD>Collision model in DSMC is breaking down. <DT><I>Particle deposition was unsuccessful</I> <DD>The fix deposit command was not able to insert as many atoms as needed. The requested volume fraction may be too high, or other atoms may be in the insertion region. <DT><I>Reducing PPPM order b/c stencil extends beyond neighbor processor</I> <DD>LAMMPS is attempting this in order to allow the simulation to run. It should not effect the PPPM accuracy. <DT><I>Replacing a fix, but new group != old group</I> <DD>The ID and style of a fix match for a fix you are changing with a fix command, but the new group you are specifying does not match the old group. <DT><I>Replicating in a non-periodic dimension</I> <DD>The parameters for a replicate command will cause a non-periodic dimension to be replicated; this may cause unwanted behavior. <DT><I>Resetting reneighboring criteria during PRD</I> <DD>A PRD simulation requires that neigh_modify settings be delay = 0, every = 1, check = yes. Since these settings were not in place, LAMMPS changed them and will restore them to their original values after the PRD simulation. <DT><I>Resetting reneighboring criteria during TAD</I> <DD>A TAD simulation requires that neigh_modify settings be delay = 0, every = 1, check = yes. Since these settings were not in place, LAMMPS changed them and will restore them to their original values after the PRD simulation. <DT><I>Resetting reneighboring criteria during minimization</I> <DD>Minimization requires that neigh_modify settings be delay = 0, every = 1, check = yes. Since these settings were not in place, LAMMPS changed them and will restore them to their original values after the minimization. <DT><I>Restart file used different # of processors</I> <DD>The restart file was written out by a LAMMPS simulation running on a different number of processors. Due to round-off, the trajectories of your restarted simulation may diverge a little more quickly than if you ran on the same # of processors. <DT><I>Restart file used different 3d processor grid</I> <DD>The restart file was written out by a LAMMPS simulation running on a different 3d grid of processors. Due to round-off, the trajectories of your restarted simulation may diverge a little more quickly than if you ran on the same # of processors. <DT><I>Restart file used different boundary settings, using restart file values</I> <DD>Your input script cannot change these restart file settings. <DT><I>Restart file used different newton bond setting, using restart file value</I> <DD>The restart file value will override the setting in the input script. <DT><I>Restart file used different newton pair setting, using input script value</I> <DD>The input script value will override the setting in the restart file. <DT><I>Restart file version does not match LAMMPS version</I> <DD>This may cause problems when reading the restart file. <DT><I>Restrain problem: %d %ld %d %d %d %d</I> -<DD>UNDOCUMENTED +<DD>Conformation of the 4 listed dihedral atoms is extreme; you may want +to check your simulation geometry. <DT><I>Running PRD with only one replica</I> <DD>This is allowed, but you will get no parallel speed-up. <DT><I>SRD bin shifting turned on due to small lamda</I> <DD>This is done to try to preserve accuracy. +<DT><I>SRD bin size for fix srd differs from user request</I> + +<DD>Fix SRD had to adjust the bin size to fit the simulation box. See the +cubic keyword if you want this message to be an error vs warning. + +<DT><I>SRD bins for fix srd are not cubic enough</I> + +<DD>The bin shape is not within tolerance of cubic. See the cubic +keyword if you want this message to be an error vs warning. + +<DT><I>SRD particle %d started inside big particle %d on step %ld bounce %d</I> + +<DD>See the inside keyword if you want this message to be an error vs +warning. + <DT><I>Shake determinant < 0.0</I> <DD>The determinant of the quadratic equation being solved for a single cluster specified by the fix shake command is numerically suspect. LAMMPS will set it to 0.0 and continue. <DT><I>Should not allow rigid bodies to bounce off relecting walls</I> <DD>LAMMPS allows this, but their dynamics are not computed correctly. <DT><I>System is not charge neutral, net charge = %g</I> <DD>The total charge on all atoms on the system is not 0.0, which is not valid for Ewald or PPPM. <DT><I>Table inner cutoff >= outer cutoff</I> <DD>You specified an inner cutoff for a Coulombic table that is longer than the global cutoff. Probably not what you wanted. <DT><I>Temperature for MSST is not for group all</I> <DD>User-assigned temperature to MSST fix does not compute temperature for all atoms. Since MSST computes a global pressure, the kinetic energy contribution from the temperature is assumed to also be for all atoms. Thus the pressure used by MSST could be inaccurate. <DT><I>Temperature for NPT is not for group all</I> <DD>User-assigned temperature to NPT fix does not compute temperature for all atoms. Since NPT computes a global pressure, the kinetic energy contribution from the temperature is assumed to also be for all atoms. Thus the pressure used by NPT could be inaccurate. <DT><I>Temperature for fix modify is not for group all</I> <DD>The temperature compute is being used with a pressure calculation which does operate on group all, so this may be inconsistent. <DT><I>Temperature for thermo pressure is not for group all</I> <DD>User-assigned temperature to thermo via the thermo_modify command does not compute temperature for all atoms. Since thermo computes a global pressure, the kinetic energy contribution from the temperature is assumed to also be for all atoms. Thus the pressure printed by thermo could be inaccurate. <DT><I>Too many common neighbors in CNA %d times</I> <DD>More than the maximum # of neighbors was found multiple times. This was unexpected. <DT><I>Too many inner timesteps in fix ttm</I> <DD>Self-explanatory. <DT><I>Too many neighbors in CNA for %d atoms</I> <DD>More than the maximum # of neighbors was found multiple times. This was unexpected. <DT><I>Use special bonds = 0,1,1 with bond style fene</I> <DD>Most FENE models need this setting for the special_bonds command. <DT><I>Use special bonds = 0,1,1 with bond style fene/expand</I> <DD>Most FENE models need this setting for the special_bonds command. <DT><I>Using compute temp/deform with inconsistent fix deform remap option</I> <DD>Fix nvt/sllod assumes deforming atoms have a velocity profile provided by "remap v" or "remap none" as a fix deform option. <DT><I>Using compute temp/deform with no fix deform defined</I> <DD>This is probably an error, since it makes little sense to use compute temp/deform in this case. <DT><I>Using fix srd with box deformation but no SRD thermostat</I> -<DD>UNDOCUMENTED +<DD>The deformation will heat the SRD particles so this can +be dangerous. <DT><I>Using pair tail corrections with nonperiodic system</I> <DD>This is probably a bogus thing to do, since tail corrections are computed by integrating the density of a periodic system out to infinity. </DL> </HTML> diff --git a/doc/Section_errors.txt b/doc/Section_errors.txt index 14a99e82e..cb31ac452 100644 --- a/doc/Section_errors.txt +++ b/doc/Section_errors.txt @@ -1,7304 +1,7486 @@ "Previous Section"_Section_python.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next Section"_Section_history.html :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line 12. Errors :h3 This section describes the errors you can encounter when using LAMMPS, either conceptually, or as printed out by the program. 12.1 "Common problems"_#err_1 12.2 "Reporting bugs"_#err_2 12.3 "Error & warning messages"_#err_3 :all(b) :line :line 12.1 Common problems :link(err_1),h4 If two LAMMPS runs do not produce the same answer on different machines or different numbers of processors, this is typically not a bug. In theory you should get identical answers on any number of processors and on any machine. In practice, numerical round-off can cause slight differences and eventual divergence of molecular dynamics phase space trajectories within a few 100s or few 1000s of timesteps. However, the statistical properties of the two runs (e.g. average energy or temperature) should still be the same. If the "velocity"_velocity.html command is used to set initial atom velocities, a particular atom can be assigned a different velocity when the problem is run on a different number of processors or on different machines. If this happens, the phase space trajectories of the two simulations will rapidly diverge. See the discussion of the {loop} option in the "velocity"_velocity.html command for details and options that avoid this issue. Similarly, the "create_atoms"_create_atoms.html command generates a lattice of atoms. For the same physical system, the ordering and numbering of atoms by atom ID may be different depending on the number of processors. Some commands use random number generators which may be setup to produce different random number streams on each processor and hence will produce different effects when run on different numbers of processors. A commonly-used example is the "fix langevin"_fix_langevin.html command for thermostatting. A LAMMPS simulation typically has two stages, setup and run. Most LAMMPS errors are detected at setup time; others like a bond stretching too far may not occur until the middle of a run. LAMMPS tries to flag errors and print informative error messages so you can fix the problem. Of course, LAMMPS cannot figure out your physics or numerical mistakes, like choosing too big a timestep, specifying erroneous force field coefficients, or putting 2 atoms on top of each other! If you run into errors that LAMMPS doesn't catch that you think it should flag, please send an email to the "developers"_http://lammps.sandia.gov/authors.html. If you get an error message about an invalid command in your input script, you can determine what command is causing the problem by looking in the log.lammps file or using the "echo command"_echo.html to see it on the screen. For a given command, LAMMPS expects certain arguments in a specified order. If you mess this up, LAMMPS will often flag the error, but it may read a bogus argument and assign a value that is valid, but not what you wanted. E.g. trying to read the string "abc" as an integer value and assigning the associated variable a value of 0. Generally, LAMMPS will print a message to the screen and logfile and exit gracefully when it encounters a fatal error. Sometimes it will print a WARNING to the screen and logfile and continue on; you can decide if the WARNING is important or not. A WARNING message that is generated in the middle of a run is only printed to the screen, not to the logfile, to avoid cluttering up thermodynamic output. If LAMMPS crashes or hangs without spitting out an error message first then it could be a bug (see "this section"_#err_2) or one of the following cases: LAMMPS runs in the available memory a processor allows to be allocated. Most reasonable MD runs are compute limited, not memory limited, so this shouldn't be a bottleneck on most platforms. Almost all large memory allocations in the code are done via C-style malloc's which will generate an error message if you run out of memory. Smaller chunks of memory are allocated via C++ "new" statements. If you are unlucky you could run out of memory just when one of these small requests is made, in which case the code will crash or hang (in parallel), since LAMMPS doesn't trap on those errors. Illegal arithmetic can cause LAMMPS to run slow or crash. This is typically due to invalid physics and numerics that your simulation is computing. If you see wild thermodynamic values or NaN values in your LAMMPS output, something is wrong with your simulation. If you suspect this is happening, it is a good idea to print out thermodynamic info frequently (e.g. every timestep) via the "thermo"_thermo.html so you can monitor what is happening. Visualizing the atom movement is also a good idea to insure your model is behaving as you expect. In parallel, one way LAMMPS can hang is due to how different MPI implementations handle buffering of messages. If the code hangs without an error message, it may be that you need to specify an MPI setting or two (usually via an environment variable) to enable buffering or boost the sizes of messages that can be buffered. :line 12.2 Reporting bugs :link(err_2),h4 If you are confident that you have found a bug in LAMMPS, follow these steps. Check the "New features and bug fixes"_http://lammps.sandia.gov/bug.html section of the "LAMMPS WWW site"_lws to see if the bug has already been reported or fixed or the "Unfixed bug"_http://lammps.sandia.gov/unbug.html to see if a fix is pending. Check the "mailing list"_http://lammps.sandia.gov/mail.html to see if it has been discussed before. If not, send an email to the mailing list describing the problem with any ideas you have as to what is causing it or where in the code the problem might be. The developers will ask for more info if needed, such as an input script or data files. The most useful thing you can do to help us fix the bug is to isolate the problem. Run it on the smallest number of atoms and fewest number of processors and with the simplest input script that reproduces the bug and try to identify what command or combination of commands is causing the problem. As a last resort, you can send an email directly to the "developers"_http://lammps.sandia.gov/authors.html. :line 12.3 Error & warning messages :h4,link(err_3) These are two alphabetic lists of the "ERROR"_#error and "WARNING"_#warn messages LAMMPS prints out and the reason why. If the explanation here is not sufficient, the documentation for the offending command may help. Error and warning messages also list the source file and line number where the error was generated. For example, this message ERROR: Illegal velocity command (velocity.cpp:78) means that line #78 in the file src/velocity.cpp generated the error. Looking in the source code may help you figure out what went wrong. Note that error messages from "user-contributed packages"_Section_start.html#start_3 are not listed here. If such an error occurs and is not self-explanatory, you'll need to look in the source code or contact the author of the package. Errors: :h4,link(error) :dlb {1-3 bond count is inconsistent} :dt An inconsistency was detected when computing the number of 1-3 neighbors for each atom. This likely means something is wrong with the bond topologies you have defined. :dd {1-4 bond count is inconsistent} :dt An inconsistency was detected when computing the number of 1-4 neighbors for each atom. This likely means something is wrong with the bond topologies you have defined. :dd {64-bit atom IDs are not yet supported} :dt +See description of this data type in src/lmptype.h. :dd + +{Accelerated style in input script but no fix gpu} :dt + +UNDOCUMENTED :dd + +{Accelerator sharing is not currently supported on system} :dt + UNDOCUMENTED :dd {All angle coeffs are not set} :dt All angle coefficients must be set in the data file or by the angle_coeff command before running a simulation. :dd {All bond coeffs are not set} :dt All bond coefficients must be set in the data file or by the bond_coeff command before running a simulation. :dd {All dihedral coeffs are not set} :dt All dihedral coefficients must be set in the data file or by the dihedral_coeff command before running a simulation. :dd {All improper coeffs are not set} :dt All improper coefficients must be set in the data file or by the improper_coeff command before running a simulation. :dd {All masses are not set} :dt For atom styles that define masses for each atom type, all masses must be set in the data file or by the mass command before running a simulation. They must also be set before using the velocity command. :dd {All pair coeffs are not set} :dt All pair coefficients must be set in the data file or by the pair_coeff command before running a simulation. :dd {All universe/uloop variables must have same # of values} :dt Self-explanatory. :dd {All variables in next command must be same style} :dt Self-explanatory. :dd {Angle atom missing in delete_bonds} :dt The delete_bonds command cannot find one or more atoms in a particular angle on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid angle. :dd {Angle atom missing in set command} :dt The set command cannot find one or more atoms in a particular angle on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid angle. :dd {Angle atoms %d %d %d missing on proc %d at step %ld} :dt One or more of 3 atoms needed to compute a particular angle are missing on this processor. Typically this is because the pairwise cutoff is set too short or the angle has blown apart and an atom is -too far away. :dd :dd +too far away. :dd {Angle coeff for hybrid has invalid style} :dt Angle style hybrid uses another angle style as one of its coefficients. The angle style used in the angle_coeff command or read from a restart file is not recognized. :dd {Angle coeffs are not set} :dt No angle coefficients have been assigned in the data file or via the angle_coeff command. :dd {Angle potential must be defined for SHAKE} :dt When shaking angles, an angle_style potential must be used. :dd {Angle style hybrid cannot have hybrid as an argument} :dt Self-explanatory. :dd {Angle style hybrid cannot have none as an argument} :dt Self-explanatory. :dd {Angle style hybrid cannot use same pair style twice} :dt Self-explanatory. :dd {Angle table must range from 0 to 180 degrees} :dt Self-explanatory. :dd {Angle table parameters did not set N} :dt List of angle table parameters must include N setting. :dd {Angle_coeff command before angle_style is defined} :dt Coefficients cannot be set in the data file or via the angle_coeff command until an angle_style has been assigned. :dd {Angle_coeff command before simulation box is defined} :dt The angle_coeff command cannot be used before a read_data, read_restart, or create_box command. :dd {Angle_coeff command when no angles allowed} :dt The chosen atom style does not allow for angles to be defined. :dd {Angle_style command when no angles allowed} :dt The chosen atom style does not allow for angles to be defined. :dd {Angles assigned incorrectly} :dt Angles read in from the data file were not assigned correctly to atoms. This means there is something invalid about the topology definitions. :dd {Angles defined but no angle types} :dt The data file header lists angles but no angle types. :dd {Another input script is already being processed} :dt Cannot attempt to open a 2nd input script, when the original file is still being processed. :dd {Append boundary must be shrink/minimum} :dt -UNDOCUMENTED :dd +The boundary style of the face where atoms are added +must be of type m (shrink/minimum). :dd {Arccos of invalid value in variable formula} :dt Argument of arccos() must be between -1 and 1. :dd {Arcsin of invalid value in variable formula} :dt Argument of arcsin() must be between -1 and 1. :dd {Assigning ellipsoid parameters to non-ellipsoid atom} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Assigning line parameters to non-line atom} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Assigning tri parameters to non-tri atom} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Atom IDs must be consecutive for velocity create loop all} :dt Self-explanatory. :dd {Atom count changed in fix neb} :dt This is not allowed in a NEB calculation. :dd {Atom count is inconsistent, cannot write restart file} :dt Sum of atoms across processors does not equal initial total count. This is probably because you have lost some atoms. :dd {Atom in too many rigid bodies - boost MAXBODY} :dt Fix poems has a parameter MAXBODY (in fix_poems.cpp) which determines the maximum number of rigid bodies a single atom can belong to (i.e. a multibody joint). The bodies you have defined exceed this limit. :dd {Atom sort did not operate correctly} :dt This is an internal LAMMPS error. Please report it to the developers. :dd {Atom sorting has bin size = 0.0} :dt The neighbor cutoff is being used as the bin size, but it is zero. Thus you must explicitly list a bin size in the atom_modify sort command or turn off sorting. :dd {Atom style hybrid cannot have hybrid as an argument} :dt Self-explanatory. :dd {Atom style hybrid cannot use same atom style twice} :dt Self-explanatory. :dd {Atom vector in equal-style variable formula} :dt Atom vectors generate one value per atom which is not allowed in an equal-style variable. :dd {Atom-style variable in equal-style variable formula} :dt Atom-style variables generate one value per atom which is not allowed in an equal-style variable. :dd {Atom_modify map command after simulation box is defined} :dt The atom_modify map command cannot be used after a read_data, read_restart, or create_box command. :dd {Atom_modify sort and first options cannot be used together} :dt Self-explanatory. :dd {Atom_style command after simulation box is defined} :dt The atom_style command cannot be used after a read_data, read_restart, or create_box command. :dd {Atom_style line can only be used in 2d simulations} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Atom_style tri can only be used in 3d simulations} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Attempt to pop empty stack in fix box/relax} :dt Internal LAMMPS error. Please report it to the developers. :dd {Attempt to push beyond stack limit in fix box/relax} :dt Internal LAMMPS error. Please report it to the developers. :dd {Attempting to rescale a 0.0 temperature} :dt Cannot rescale a temperature that is already 0.0. :dd -{BAD VECLINE COUNT: %s: %d %d: %d %d\n} :dt - -UNDOCUMENTED :dd - -{BAD VECLINE PTRS: %s: %d %d: %d\n} :dt - -UNDOCUMENTED :dd - {Bad FENE bond} :dt Two atoms in a FENE bond have become so far apart that the bond cannot be computed. :dd {Bad TIP4P angle type for PPPM/TIP4P} :dt Specified angle type is not valid. :dd {Bad TIP4P bond type for PPPM/TIP4P} :dt Specified bond type is not valid. :dd -{Bad fix ID in fix append_atoms command} :dt +{Bad fix ID in fix append/atoms command} :dt -UNDOCUMENTED :dd +The value of the fix_id for keyword spatial must start with the suffix +f_. :dd {Bad grid of processors} :dt The 3d grid of processors defined by the processors command does not match the number of processors LAMMPS is being run on. :dd {Bad kspace_modify slab parameter} :dt Kspace_modify value for the slab/volume keyword must be >= 2.0. :dd {Bad matrix inversion in mldivide3} :dt -UNDOCUMENTED :dd +This error should not occur unless the matrix is badly formed. :dd {Bad principal moments} :dt Fix rigid did not compute the principal moments of inertia of a rigid group of atoms correctly. :dd {Bad quadratic solve for particle/line collision} :dt -UNDOCUMENTED :dd +This is an internal error. It should nornally not occur. :dd {Bad quadratic solve for particle/tri collision} :dt -UNDOCUMENTED :dd +This is an internal error. It should nornally not occur. :dd + +{Balance command before simulation box is defined} :dt + +The balance command cannot be used before a read_data, read_restart, +or create_box command. :dd + +{Balance dynamic string is invalid} :dt + +The string can only contain the characters "x", "y", or "z". :dd + +{Balance dynamic string is invalid for 2d simulation} :dt + +The string cannot contain the letter "z". :dd {Bias compute does not calculate a velocity bias} :dt The specified compute must compute a bias for temperature. :dd {Bias compute does not calculate temperature} :dt The specified compute must compute temperature. :dd {Bias compute group does not match compute group} :dt The specified compute must operate on the same group as the parent compute. :dd {Big particle in fix srd cannot be point particle} :dt Big particles must be extended spheriods or ellipsoids. :dd {Bigint setting in lmptype.h is invalid} :dt Size of bigint is less than size of tagint. :dd {Bigint setting in lmptype.h is not compatible} :dt Bigint stored in restart file is not consistent with LAMMPS version you are running. :dd {Bitmapped lookup tables require int/float be same size} :dt Cannot use pair tables on this machine, because of word sizes. Use the pair_modify command with table 0 instead. :dd {Bitmapped table in file does not match requested table} :dt Setting for bitmapped table in pair_coeff command must match table in file exactly. :dd {Bitmapped table is incorrect length in table file} :dt Number of table entries is not a correct power of 2. :dd {Bond and angle potentials must be defined for TIP4P} :dt Cannot use TIP4P pair potential unless bond and angle potentials are defined. :dd {Bond atom missing in delete_bonds} :dt The delete_bonds command cannot find one or more atoms in a particular bond on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid bond. :dd {Bond atom missing in set command} :dt The set command cannot find one or more atoms in a particular bond on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid bond. :dd {Bond atoms %d %d missing on proc %d at step %ld} :dt One or both of 2 atoms needed to compute a particular bond are missing on this processor. Typically this is because the pairwise cutoff is set too short or the bond has blown apart and an atom is -too far away. :dd :dd +too far away. :dd {Bond coeff for hybrid has invalid style} :dt Bond style hybrid uses another bond style as one of its coefficients. The bond style used in the bond_coeff command or read from a restart file is not recognized. :dd {Bond coeffs are not set} :dt No bond coefficients have been assigned in the data file or via the bond_coeff command. :dd {Bond potential must be defined for SHAKE} :dt Cannot use fix shake unless bond potential is defined. :dd {Bond style hybrid cannot have hybrid as an argument} :dt Self-explanatory. :dd {Bond style hybrid cannot have none as an argument} :dt Self-explanatory. :dd {Bond style hybrid cannot use same pair style twice} :dt Self-explanatory. :dd {Bond style quartic cannot be used with 3,4-body interactions} :dt No angle, dihedral, or improper styles can be defined when using bond style quartic. :dd {Bond style quartic requires special_bonds = 1,1,1} :dt This is a restriction of the current bond quartic implementation. :dd {Bond table parameters did not set N} :dt List of bond table parameters must include N setting. :dd {Bond table values are not increasing} :dt The values in the tabulated file must be monotonically increasing. :dd {Bond_coeff command before bond_style is defined} :dt Coefficients cannot be set in the data file or via the bond_coeff command until an bond_style has been assigned. :dd {Bond_coeff command before simulation box is defined} :dt The bond_coeff command cannot be used before a read_data, read_restart, or create_box command. :dd {Bond_coeff command when no bonds allowed} :dt The chosen atom style does not allow for bonds to be defined. :dd {Bond_style command when no bonds allowed} :dt The chosen atom style does not allow for bonds to be defined. :dd {Bonds assigned incorrectly} :dt Bonds read in from the data file were not assigned correctly to atoms. This means there is something invalid about the topology definitions. :dd {Bonds defined but no bond types} :dt The data file header lists bonds but no bond types. :dd {Both sides of boundary must be periodic} :dt Cannot specify a boundary as periodic only on the lo or hi side. Must be periodic on both sides. :dd {Boundary command after simulation box is defined} :dt The boundary command cannot be used after a read_data, read_restart, or create_box command. :dd {Box bounds are invalid} :dt The box boundaries specified in the read_data file are invalid. The lo value must be less than the hi value for all 3 dimensions. :dd {Can not specify Pxy/Pxz/Pyz in fix box/relax with non-triclinic box} :dt Only triclinic boxes can be used with off-diagonal pressure components. See the region prism command for details. :dd {Can not specify Pxy/Pxz/Pyz in fix nvt/npt/nph with non-triclinic box} :dt Only triclinic boxes can be used with off-diagonal pressure components. See the region prism command for details. :dd {Can only use -plog with multiple partitions} :dt -UNDOCUMENTED :dd +Self-explanatory. See doc page discussion of command-line switches. :dd {Can only use -pscreen with multiple partitions} :dt -UNDOCUMENTED :dd +Self-explanatory. See doc page discussion of command-line switches. :dd {Can only use NEB with 1-processor replicas} :dt This is current restriction for NEB as implemented in LAMMPS. :dd {Can only use TAD with 1-processor replicas for NEB} :dt This is current restriction for NEB as implemented in LAMMPS. :dd {Cannot (yet) use PPPM with triclinic box} :dt This feature is not yet supported. :dd {Cannot add atoms to fix move variable} :dt Atoms can not be added afterwards to this fix option. :dd {Cannot append atoms to a triclinic box} :dt -UNDOCUMENTED :dd +The simulation box must be defined with edges alligned with the +Cartesian axes. :dd -{Cannot change box to orthogonal when tilt is non-zero} :dt +{Cannot balance in z dimension for 2d simulation} :dt -Self-explanatory :dd +Self-explanatory. :dd + +{Cannot change box ortho/triclinic with certain fixes defined} :dt + +This is because those fixes store the shape of the box. You need to +use unfix to discard the fix, change the box, then redefine a new +fix. :dd + +{Cannot change box ortho/triclinic with dumps defined} :dt -{Cannot change box with certain fixes defined} :dt +This is because some dumps store the shape of the box. You need to +use undump to discard the dump, change the box, then redefine a new +dump. :dd -The change_box command cannot be used when fix ave/spatial or -fix/deform are defined . :dd +{Cannot change box tilt factors for orthogonal box} :dt + +Cannot use tilt factors unless the simulation box is non-orthogonal. :dd + +{Cannot change box to orthogonal when tilt is non-zero} :dt + +Self-explanatory. :dd -{Cannot change box with dumps defined} :dt +{Cannot change box z boundary to nonperiodic for a 2d simulation} :dt Self-explanatory. :dd {Cannot change dump_modify every for dump dcd} :dt The frequency of writing dump dcd snapshots cannot be changed. :dd {Cannot change dump_modify every for dump xtc} :dt The frequency of writing dump xtc snapshots cannot be changed. :dd {Cannot change timestep once fix srd is setup} :dt This is because various SRD properties depend on the timestep size. :dd {Cannot change timestep with fix pour} :dt This fix pre-computes some values based on the timestep, so it cannot be changed during a simulation run. :dd +{Cannot change_box after reading restart file with per-atom info} :dt + +This is because the restart file info cannot be migrated with the +atoms. You can get around this by performing a 0-timestep run which +will assign the restart file info to actual atoms. :dd + +{Cannot change_box in xz or yz for 2d simulation} :dt + +Self-explanatory. :dd + +{Cannot change_box in z dimension for 2d simulation} :dt + +Self-explanatory. :dd + {Cannot compute PPPM G} :dt LAMMPS failed to compute a valid approximation for the PPPM g_ewald factor that partitions the computation between real space and k-space. :dd {Cannot create an atom map unless atoms have IDs} :dt The simulation requires a mapping from global atom IDs to local atoms, but the atoms that have been defined have no IDs. :dd {Cannot create atoms with undefined lattice} :dt Must use the lattice command before using the create_atoms command. :dd {Cannot create/grow a vector/array of pointers for %s} :dt LAMMPS code is making an illegal call to the templated memory allocaters, to create a vector or array of pointers. :dd {Cannot create_atoms after reading restart file with per-atom info} :dt The per-atom info was stored to be used when by a fix that you may re-define. If you add atoms before re-defining the fix, then there will not be a correct amount of per-atom info. :dd {Cannot create_box after simulation box is defined} :dt The create_box command cannot be used after a read_data, read_restart, or create_box command. :dd {Cannot currently use pair reax with pair hybrid} :dt This is not yet supported. :dd {Cannot delete group all} :dt Self-explanatory. :dd {Cannot delete group currently used by a compute} :dt Self-explanatory. :dd {Cannot delete group currently used by a dump} :dt Self-explanatory. :dd {Cannot delete group currently used by a fix} :dt Self-explanatory. :dd {Cannot delete group currently used by atom_modify first} :dt Self-explanatory. :dd {Cannot displace_atoms after reading restart file with per-atom info} :dt This is because the restart file info cannot be migrated with the atoms. You can get around this by performing a 0-timestep run which will assign the restart file info to actual atoms. :dd -{Cannot displace_box after reading restart file with per-atom info} :dt - -This is because the restart file info cannot be migrated with the -atoms. You can get around this by performing a 0-timestep run which -will assign the restart file info to actual atoms. :dd - -{Cannot displace_box on a non-periodic boundary} :dt - -Self-explanatory. :dd - {Cannot do GCMC on atoms in atom_modify first group} :dt UNDOCUMENTED :dd {Cannot dump JPG file} :dt -UNDOCUMENTED :dd +LAMMPS was not built with the -DLAMMPS_JPEG switch in the Makefile. :dd {Cannot dump sort on atom IDs with no atom IDs defined} :dt Self-explanatory. :dd {Cannot evaporate atoms in atom_modify first group} :dt This is a restriction due to the way atoms are organized in a list to enable the atom_modify first command. :dd {Cannot find delete_bonds group ID} :dt Group ID used in the delete_bonds command does not exist. :dd {Cannot have both pair_modify shift and tail set to yes} :dt These 2 options are contradictory. :dd {Cannot open -reorder file} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot open ADP potential file %s} :dt -UNDOCUMENTED :dd +The specified ADP potential file cannot be opened. Check that the +path and name are correct. :dd {Cannot open AIREBO potential file %s} :dt The specified AIREBO potential file cannot be opened. Check that the path and name are correct. :dd {Cannot open COMB potential file %s} :dt The specified COMB potential file cannot be opened. Check that the path and name are correct. :dd {Cannot open EAM potential file %s} :dt The specified EAM potential file cannot be opened. Check that the path and name are correct. :dd {Cannot open EIM potential file %s} :dt The specified EIM potential file cannot be opened. Check that the path and name are correct. :dd {Cannot open MEAM potential file %s} :dt The specified MEAM potential file cannot be opened. Check that the path and name are correct. :dd {Cannot open Stillinger-Weber potential file %s} :dt The specified SW potential file cannot be opened. Check that the path and name are correct. :dd {Cannot open Tersoff potential file %s} :dt The specified Tersoff potential file cannot be opened. Check that the path and name are correct. :dd +{Cannot open balance output file} :dt + +This error message can only occur if debug options +are uncommented in src/balance.cpp. :dd + {Cannot open custom file} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot open dir to search for restart file} :dt Using a "*" in the name of the restart file will open the current directory to search for matching file names. :dd {Cannot open dump file} :dt The output file for the dump command cannot be opened. Check that the path and name are correct. :dd {Cannot open file %s} :dt The specified file cannot be opened. Check that the path and name are correct. :dd {Cannot open fix ave/correlate file %s} :dt The specified file cannot be opened. Check that the path and name are correct. :dd {Cannot open fix ave/histo file %s} :dt The specified file cannot be opened. Check that the path and name are correct. :dd {Cannot open fix ave/spatial file %s} :dt The specified file cannot be opened. Check that the path and name are correct. :dd {Cannot open fix ave/time file %s} :dt The specified file cannot be opened. Check that the path and name are correct. :dd {Cannot open fix poems file %s} :dt The specified file cannot be opened. Check that the path and name are correct. :dd {Cannot open fix print file %s} :dt The output file generated by the fix print command cannot be opened :dd {Cannot open fix qeq/comb file %s} :dt The output file for the fix qeq/combs command cannot be opened. Check that the path and name are correct. :dd {Cannot open fix reax/bonds file %s} :dt The output file for the fix reax/bonds command cannot be opened. Check that the path and name are correct. :dd {Cannot open fix tmd file %s} :dt The output file for the fix tmd command cannot be opened. Check that the path and name are correct. :dd {Cannot open fix ttm file %s} :dt The output file for the fix ttm command cannot be opened. Check that the path and name are correct. :dd {Cannot open gzipped file} :dt LAMMPS is attempting to open a gzipped version of the specified file but was unsuccessful. Check that the path and name are correct. :dd {Cannot open input script %s} :dt Self-explanatory. :dd {Cannot open log.lammps} :dt The default LAMMPS log file cannot be opened. Check that the directory you are running in allows for files to be created. :dd {Cannot open logfile} :dt The LAMMPS log file named in a command-line argument cannot be opened. Check that the path and name are correct. :dd {Cannot open logfile %s} :dt The LAMMPS log file specified in the input script cannot be opened. Check that the path and name are correct. :dd {Cannot open pair_write file} :dt The specified output file for pair energies and forces cannot be opened. Check that the path and name are correct. :dd -{Cannot open processors custom file} :dt +{Cannot open processors output file} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot open restart file %s} :dt Self-explanatory. :dd {Cannot open screen file} :dt The screen file specified as a command-line argument cannot be opened. Check that the directory you are running in allows for files to be created. :dd {Cannot open universe log file} :dt For a multi-partition run, the master log file cannot be opened. Check that the directory you are running in allows for files to be created. :dd {Cannot open universe screen file} :dt For a multi-partition run, the master screen file cannot be opened. Check that the directory you are running in allows for files to be created. :dd {Cannot read_data after simulation box is defined} :dt The read_data command cannot be used after a read_data, read_restart, or create_box command. :dd {Cannot read_restart after simulation box is defined} :dt The read_restart command cannot be used after a read_data, read_restart, or create_box command. :dd {Cannot redefine variable as a different style} :dt An equal-style variable can be re-defined but only if it was originally an equal-style variable. :dd {Cannot replicate 2d simulation in z dimension} :dt The replicate command cannot replicate a 2d simulation in the z dimension. :dd {Cannot replicate with fixes that store atom quantities} :dt Either fixes are defined that create and store atom-based vectors or a restart file was read which included atom-based vectors for fixes. The replicate command cannot duplicate that information for new atoms. You should use the replicate command before fixes are applied to the system. :dd {Cannot reset timestep with a dynamic region defined} :dt Dynamic regions (see the region command) have a time dependence. Thus you cannot change the timestep when one or more of these are defined. :dd {Cannot reset timestep with a time-dependent fix defined} :dt You cannot reset the timestep when a fix that keeps track of elapsed time is in place. :dd {Cannot reset timestep with dump file already written to} :dt Changing the timestep will confuse when a dump file is written. Use the undump command, then restart the dump file. :dd {Cannot reset timestep with restart file already written} :dt Changing the timestep will confuse when a restart file is written. Use the "restart 0" command to turn off restarts, then start them again. :dd {Cannot restart fix rigid/nvt with different # of chains} :dt This is because the restart file contains per-chain info. :dd {Cannot run 2d simulation with nonperiodic Z dimension} :dt Use the boundary command to make the z dimension periodic in order to run a 2d simulation. :dd {Cannot set both respa pair and inner/middle/outer} :dt In the rRESPA integrator, you must compute pairwise potentials either all together (pair), or in pieces (inner/middle/outer). You can't do both. :dd {Cannot set dump_modify flush for dump xtc} :dt Self-explanatory. :dd {Cannot set mass for this atom style} :dt This atom style does not support mass settings for each atom type. Instead they are defined on a per-atom basis in the data file. :dd {Cannot set meso_rho for this atom style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot set non-zero image flag for non-periodic dimension} :dt Self-explanatory. :dd {Cannot set non-zero z velocity for 2d simulation} :dt Self-explanatory. :dd {Cannot set quaternion for atom that has none} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot set respa middle without inner/outer} :dt In the rRESPA integrator, you must define both a inner and outer setting in order to use a middle setting. :dd {Cannot set theta for atom that is not a line} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot set this attribute for this atom style} :dt The attribute being set does not exist for the defined atom style. :dd {Cannot set variable z velocity for 2d simulation} :dt Self-explanatory. :dd {Cannot skew triclinic box in z for 2d simulation} :dt Self-explanatory. :dd {Cannot use -cuda on without USER-CUDA installed} :dt -UNDOCUMENTED :dd +The USER-CUDA package must be installed via "make yes-user-cuda" +before LAMMPS is built. :dd {Cannot use -reorder after -partition} :dt -UNDOCUMENTED :dd +Self-explanatory. See doc page discussion of command-line switches. :dd {Cannot use Ewald with 2d simulation} :dt The kspace style ewald cannot be used in 2d simulations. You can use 2d Ewald in a 3d simulation; see the kspace_modify command. :dd {Cannot use Ewald with triclinic box} :dt This feature is not yet supported. :dd {Cannot use NEB unless atom map exists} :dt Use the atom_modify command to create an atom map. :dd {Cannot use NEB with a single replica} :dt Self-explanatory. :dd {Cannot use NEB with atom_modify sort enabled} :dt This is current restriction for NEB implemented in LAMMPS. :dd {Cannot use PPPM with 2d simulation} :dt The kspace style pppm cannot be used in 2d simulations. You can use 2d PPPM in a 3d simulation; see the kspace_modify command. :dd {Cannot use PRD with a time-dependent fix defined} :dt PRD alters the timestep in ways that will mess up these fixes. :dd {Cannot use PRD with a time-dependent region defined} :dt PRD alters the timestep in ways that will mess up these regions. :dd {Cannot use PRD with atom_modify sort enabled} :dt This is a current restriction of PRD. You must turn off sorting, which is enabled by default, via the atom_modify command. :dd {Cannot use PRD with multi-processor replicas unless atom map exists} :dt Use the atom_modify command to create an atom map. :dd {Cannot use TAD unless atom map exists for NEB} :dt See atom_modify map command to set this. :dd {Cannot use TAD with a single replica for NEB} :dt NEB requires multiple replicas. :dd {Cannot use TAD with atom_modify sort enabled for NEB} :dt This is a current restriction of NEB. :dd {Cannot use a damped dynamics min style with fix box/relax} :dt This is a current restriction in LAMMPS. Use another minimizer style. :dd {Cannot use a damped dynamics min style with per-atom DOF} :dt This is a current restriction in LAMMPS. Use another minimizer style. :dd -{Cannot use append_atoms in periodic dimension} :dt +{Cannot use append/atoms in periodic dimension} :dt -UNDOCUMENTED :dd +The boundary style of the face where atoms are added can not be of +type p (periodic). :dd {Cannot use compute cluster/atom unless atoms have IDs} :dt Atom IDs are used to identify clusters. :dd {Cannot use cwiggle in variable formula between runs} :dt This is a function of elapsed time. :dd {Cannot use delete_atoms unless atoms have IDs} :dt Your atoms do not have IDs, so the delete_atoms command cannot be used. :dd {Cannot use delete_bonds with non-molecular system} :dt Your choice of atom style does not have bonds. :dd {Cannot use fix GPU with USER-CUDA mode enabled} :dt -UNDOCUMENTED :dd +You cannot use both the GPU and USER-CUDA packages +together. Use one or the other. :dd {Cannot use fix TMD unless atom map exists} :dt Using this fix requires the ability to lookup an atom index, which is provided by an atom map. An atom map does not exist (by default) for non-molecular problems. Using the atom_modify map command will force an atom map to be created. :dd {Cannot use fix ave/spatial z for 2 dimensional model} :dt Self-explanatory. :dd {Cannot use fix bond/break with non-molecular systems} :dt Self-explanatory. :dd {Cannot use fix bond/create with non-molecular systems} :dt Self-explanatory. :dd {Cannot use fix box/relax on a 2nd non-periodic dimension} :dt When specifying an off-diagonal pressure component, the 2nd of the two dimensions must be periodic. E.g. if the xy component is specified, then the y dimension must be periodic. :dd {Cannot use fix box/relax on a non-periodic dimension} :dt When specifying a diagonal pressure component, the dimension must be periodic. :dd -{Cannot use fix deform on a 2nd non-periodic boundary} :dt +{Cannot use fix deform on a shrink-wrapped boundary} :dt -When specifying a tilt factor change, the 2nd of the two dimensions -must be periodic. E.g. if the xy tilt is specified, then the y -dimension must be periodic. :dd +The x, y, z options cannot be applied to shrink-wrapped +dimensions. :dd -{Cannot use fix deform on a non-periodic boundary} :dt +{Cannot use fix deform tilt on a shrink-wrapped 2nd dim} :dt -When specifying a change is a box dimension, the dimension must be -periodic. :dd +This is because the shrink-wrapping will change the value +of the strain implied by the tilt factor. :dd {Cannot use fix deform trate on a box with zero tilt} :dt The trate style alters the current strain. :dd {Cannot use fix enforce2d with 3d simulation} :dt Self-explanatory. :dd {Cannot use fix msst without per-type mass defined} :dt Self-explanatory. :dd {Cannot use fix npt and fix deform on same component of stress tensor} :dt This would be changing the same box dimension twice. :dd {Cannot use fix nvt/npt/nph on a 2nd non-periodic dimension} :dt When specifying an off-diagonal pressure component, the 2nd of the two dimensions must be periodic. E.g. if the xy component is specified, then the y dimension must be periodic. :dd {Cannot use fix nvt/npt/nph on a non-periodic dimension} :dt When specifying a diagonal pressure component, the dimension must be periodic. :dd {Cannot use fix nvt/npt/nph with both xy dynamics and xy scaling} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use fix nvt/npt/nph with both xz dynamics and xz scaling} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd + +{Cannot use fix nvt/npt/nph with both yz dynamics and yz scaling} :dt + +Self-explanatory. :dd {Cannot use fix nvt/npt/nph with xy dynamics when y is non-periodic dimension} :dt -UNDOCUMENTED :dd +The 2nd dimension in the barostatted tilt factor must be periodic. :dd {Cannot use fix nvt/npt/nph with xz dynamics when z is non-periodic dimension} :dt -UNDOCUMENTED :dd +The 2nd dimension in the barostatted tilt factor must be periodic. :dd {Cannot use fix nvt/npt/nph with yz dynamics when z is non-periodic dimension} :dt -UNDOCUMENTED :dd - -{Cannot use fix nvt/npt/nph withboth yz dynamics and yz scaling} :dt - -UNDOCUMENTED :dd +The 2nd dimension in the barostatted tilt factor must be periodic. :dd {Cannot use fix pour with triclinic box} :dt This feature is not yet supported. :dd {Cannot use fix press/berendsen and fix deform on same component of stress tensor} :dt These commands both change the box size/shape, so you cannot use both together. :dd {Cannot use fix press/berendsen on a non-periodic dimension} :dt Self-explanatory. :dd {Cannot use fix press/berendsen with triclinic box} :dt Self-explanatory. :dd {Cannot use fix reax/bonds without pair_style reax} :dt Self-explantory. :dd {Cannot use fix shake with non-molecular system} :dt Your choice of atom style does not have bonds. :dd {Cannot use fix ttm with 2d simulation} :dt This is a current restriction of this fix due to the grid it creates. :dd {Cannot use fix ttm with triclinic box} :dt This is a current restriction of this fix due to the grid it creates. :dd {Cannot use fix wall in periodic dimension} :dt Self-explanatory. :dd {Cannot use fix wall zlo/zhi for a 2d simulation} :dt Self-explanatory. :dd {Cannot use fix wall/reflect in periodic dimension} :dt Self-explanatory. :dd {Cannot use fix wall/reflect zlo/zhi for a 2d simulation} :dt Self-explanatory. :dd {Cannot use fix wall/srd in periodic dimension} :dt Self-explanatory. :dd {Cannot use fix wall/srd more than once} :dt Nor is their a need to since multiple walls can be specified in one command. :dd {Cannot use fix wall/srd without fix srd} :dt Self-explanatory. :dd {Cannot use fix wall/srd zlo/zhi for a 2d simulation} :dt Self-explanatory. :dd {Cannot use force/hybrid_neigh with triclinic box} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use force/neigh with triclinic box} :dt This is a current limitation of the GPU implementation in LAMMPS. :dd {Cannot use kspace solver on system with no charge} :dt No atoms in system have a non-zero charge. :dd {Cannot use lines with fix srd unless overlap is set} :dt -UNDOCUMENTED :dd +This is because line segements are connected to each other. :dd {Cannot use neigh_modify exclude with GPU neighbor builds} :dt This is a current limitation of the GPU implementation in LAMMPS. :dd {Cannot use neighbor bins - box size << cutoff} :dt Too many neighbor bins will be created. This typically happens when the simulation box is very small in some dimension, compared to the neighbor cutoff. Use the "nsq" style instead of "bin" style. :dd -{Cannot use newton pair with buck/gpu pair style} :dt - -UNDOCUMENTED :dd - {Cannot use newton pair with buck/coul/cut/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use newton pair with buck/coul/long/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd + +{Cannot use newton pair with buck/gpu pair style} :dt + +Self-explanatory. :dd {Cannot use newton pair with coul/long/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use newton pair with eam/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use newton pair with gayberne/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use newton pair with lj/charmm/coul/long/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use newton pair with lj/class2/coul/long/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use newton pair with lj/class2/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use newton pair with lj/cut/coul/cut/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use newton pair with lj/cut/coul/long/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use newton pair with lj/cut/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use newton pair with lj/expand/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd + +{Cannot use newton pair with lj/sdk/coul/long/gpu pair style} :dt + +Self-explanatory. :dd + +{Cannot use newton pair with lj/sdk/gpu pair style} :dt + +Self-explanatory. :dd {Cannot use newton pair with lj96/cut/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use newton pair with morse/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use newton pair with resquared/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use newton pair with table/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use newton pair with yukawa/gpu pair style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use non-zero forces in an energy minimization} :dt Fix setforce cannot be used in this manner. Use fix addforce instead. :dd {Cannot use nonperiodic boundares with fix ttm} :dt This fix requires a fully periodic simulation box. :dd {Cannot use nonperiodic boundaries with Ewald} :dt For kspace style ewald, all 3 dimensions must have periodic boundaries unless you use the kspace_modify command to define a 2d slab with a non-periodic z dimension. :dd {Cannot use nonperiodic boundaries with PPPM} :dt For kspace style pppm, all 3 dimensions must have periodic boundaries unless you use the kspace_modify command to define a 2d slab with a non-periodic z dimension. :dd {Cannot use order greater than 8 with pppm/gpu.} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use pair hybrid with GPU neighbor builds} :dt See documentation for fix gpu. :dd {Cannot use pair tail corrections with 2d simulations} :dt The correction factors are only currently defined for 3d systems. :dd {Cannot use processors part command without using partitions} :dt -UNDOCUMENTED :dd +See the command-line -partition switch. :dd {Cannot use ramp in variable formula between runs} :dt This is because the ramp() function is time dependent. :dd {Cannot use region INF or EDGE when box does not exist} :dt Regions that extend to the box boundaries can only be used after the create_box command has been used. :dd {Cannot use set atom with no atom IDs defined} :dt Atom IDs are not defined, so they cannot be used to identify an atom. :dd {Cannot use set mol with no molecule IDs defined} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Cannot use swiggle in variable formula between runs} :dt This is a function of elapsed time. :dd {Cannot use tris with fix srd unless overlap is set} :dt -UNDOCUMENTED :dd +This is because triangles are connected to each other. :dd {Cannot use variable energy with constant force in fix addforce} :dt This is because for constant force, LAMMPS can compute the change in energy directly. :dd {Cannot use variable every setting for dump dcd} :dt The format of DCD dump files requires snapshots be output at a constant frequency. :dd {Cannot use variable every setting for dump xtc} :dt The format of this file requires snapshots at regular intervals. :dd {Cannot use vdisplace in variable formula between runs} :dt This is a function of elapsed time. :dd {Cannot use velocity create loop all unless atoms have IDs} :dt Atoms in the simulation to do not have IDs, so this style of velocity creation cannot be performed. :dd {Cannot use wall in periodic dimension} :dt Self-explanatory. :dd {Cannot wiggle and shear fix wall/gran} :dt Cannot specify both options at the same time. :dd {Cannot zero Langevin force of 0 atoms} :dt -UNDOCUMENTED :dd +The group has zero atoms, so you cannot request its force +be zeroed. :dd {Cannot zero momentum of 0 atoms} :dt The collection of atoms for which momentum is being computed has no atoms. :dd {Change_box command before simulation box is defined} :dt Self-explanatory. :dd -{Change_box operation is invalid} :dt +{Change_box volume used incorrectly} :dt -Cannot change orthogonal box to orthogonal or a triclinic box to -triclinic. :dd +The "dim volume" option must be used immediately following one or two +settings for "dim1 ..." (and optionally "dim2 ...") and must be for a +different dimension, i.e. dim != dim1 and dim != dim2. :dd {Communicate group != atom_modify first group} :dt Self-explanatory. :dd {Compute ID for compute atom/molecule does not exist} :dt Self-explanatory. :dd {Compute ID for compute reduce does not exist} :dt Self-explanatory. :dd {Compute ID for compute slice does not exist} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Compute ID for fix ave/atom does not exist} :dt Self-explanatory. :dd {Compute ID for fix ave/correlate does not exist} :dt Self-explanatory. :dd {Compute ID for fix ave/histo does not exist} :dt Self-explanatory. :dd {Compute ID for fix ave/spatial does not exist} :dt Self-explanatory. :dd {Compute ID for fix ave/time does not exist} :dt Self-explanatory. :dd {Compute ID for fix store/state does not exist} :dt Self-explanatory. :dd {Compute ID must be alphanumeric or underscore characters} :dt Self-explanatory. :dd {Compute angle/local used when angles are not allowed} :dt The atom style does not support angles. :dd {Compute atom/molecule compute array is accessed out-of-range} :dt Self-explanatory. :dd {Compute atom/molecule compute does not calculate a per-atom array} :dt Self-explanatory. :dd {Compute atom/molecule compute does not calculate a per-atom vector} :dt Self-explanatory. :dd {Compute atom/molecule compute does not calculate per-atom values} :dt Self-explanatory. :dd {Compute atom/molecule fix array is accessed out-of-range} :dt Self-explanatory. :dd {Compute atom/molecule fix does not calculate a per-atom array} :dt Self-explanatory. :dd {Compute atom/molecule fix does not calculate a per-atom vector} :dt Self-explanatory. :dd {Compute atom/molecule fix does not calculate per-atom values} :dt Self-explanatory. :dd {Compute atom/molecule requires molecular atom style} :dt Self-explanatory. :dd {Compute atom/molecule variable is not atom-style variable} :dt Self-explanatory. :dd {Compute bond/local used when bonds are not allowed} :dt The atom style does not support bonds. :dd {Compute centro/atom requires a pair style be defined} :dt This is because the computation of the centro-symmetry values uses a pairwise neighbor list. :dd {Compute cluster/atom cutoff is longer than pairwise cutoff} :dt Cannot identify clusters beyond cutoff. :dd {Compute cluster/atom requires a pair style be defined} :dt This is so that the pair style defines a cutoff distance which is used to find clusters. :dd {Compute cna/atom cutoff is longer than pairwise cutoff} :dt Self-explantory. :dd {Compute cna/atom requires a pair style be defined} :dt Self-explantory. :dd {Compute com/molecule requires molecular atom style} :dt Self-explanatory. :dd {Compute coord/atom cutoff is longer than pairwise cutoff} :dt Cannot compute coordination at distances longer than the pair cutoff, since those atoms are not in the neighbor list. :dd {Compute coord/atom requires a pair style be defined} :dt Self-explantory. :dd {Compute damage/atom requires peridynamic potential} :dt Damage is a Peridynamic-specific metric. It requires you to be running a Peridynamics simulation. :dd {Compute dihedral/local used when dihedrals are not allowed} :dt The atom style does not support dihedrals. :dd {Compute does not allow an extra compute or fix to be reset} :dt This is an internal LAMMPS error. Please report it to the developers. :dd {Compute erotate/asphere requires atom style ellipsoid or line or tri} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Compute erotate/asphere requires extended particles} :dt This compute cannot be used with point paritlces. :dd {Compute erotate/sphere requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Compute event/displace has invalid fix event assigned} :dt This is an internal LAMMPS error. Please report it to the developers. :dd {Compute group/group group ID does not exist} :dt Self-explanatory. :dd {Compute gyration/molecule requires molecular atom style} :dt Self-explanatory. :dd {Compute heat/flux compute ID does not compute ke/atom} :dt Self-explanatory. :dd {Compute heat/flux compute ID does not compute pe/atom} :dt Self-explanatory. :dd {Compute heat/flux compute ID does not compute stress/atom} :dt Self-explanatory. :dd {Compute improper/local used when impropers are not allowed} :dt The atom style does not support impropers. :dd {Compute msd/molecule requires molecular atom style} :dt Self-explanatory. :dd {Compute nve/asphere requires atom style ellipsoid} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Compute nvt/nph/npt asphere requires atom style ellipsoid} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Compute pair must use group all} :dt Pair styles accumlate energy on all atoms. :dd {Compute pe must use group all} :dt Energies computed by potentials (pair, bond, etc) are computed on all atoms. :dd {Compute pressure must use group all} :dt Virial contributions computed by potentials (pair, bond, etc) are computed on all atoms. :dd {Compute pressure temperature ID does not compute temperature} :dt The compute ID assigned to a pressure computation must compute temperature. :dd {Compute property/atom for atom property that isn't allocated} :dt Self-explanatory. :dd {Compute property/local cannot use these inputs together} :dt Only inputs that generate the same number of datums can be used togther. E.g. bond and angle quantities cannot be mixed. :dd {Compute property/local for property that isn't allocated} :dt Self-explanatory. :dd {Compute property/molecule requires molecular atom style} :dt Self-explanatory. :dd {Compute rdf requires a pair style be defined} :dt Self-explanatory. :dd {Compute reduce compute array is accessed out-of-range} :dt -Self-explanatory. :dd +An index for the array is out of bounds. :dd {Compute reduce compute calculates global values} :dt A compute that calculates peratom or local values is required. :dd {Compute reduce compute does not calculate a local array} :dt Self-explanatory. :dd {Compute reduce compute does not calculate a local vector} :dt Self-explanatory. :dd {Compute reduce compute does not calculate a per-atom array} :dt Self-explanatory. :dd {Compute reduce compute does not calculate a per-atom vector} :dt Self-explanatory. :dd {Compute reduce fix array is accessed out-of-range} :dt -Self-explanatory. :dd +An index for the array is out of bounds. :dd {Compute reduce fix calculates global values} :dt A fix that calculates peratom or local values is required. :dd {Compute reduce fix does not calculate a local array} :dt Self-explanatory. :dd {Compute reduce fix does not calculate a local vector} :dt Self-explanatory. :dd {Compute reduce fix does not calculate a per-atom array} :dt Self-explanatory. :dd {Compute reduce fix does not calculate a per-atom vector} :dt Self-explanatory. :dd {Compute reduce replace requires min or max mode} :dt Self-explanatory. :dd {Compute reduce variable is not atom-style variable} :dt Self-explanatory. :dd {Compute slice compute array is accessed out-of-range} :dt -UNDOCUMENTED :dd +An index for the array is out of bounds. :dd {Compute slice compute does not calculate a global array} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Compute slice compute does not calculate a global vector} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Compute slice compute does not calculate global vector or array} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Compute slice compute vector is accessed out-of-range} :dt -UNDOCUMENTED :dd +The index for the vector is out of bounds. :dd {Compute slice fix array is accessed out-of-range} :dt -UNDOCUMENTED :dd +An index for the array is out of bounds. :dd {Compute slice fix does not calculate a global array} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Compute slice fix does not calculate a global vector} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Compute slice fix does not calculate global vector or array} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Compute slice fix vector is accessed out-of-range} :dt -UNDOCUMENTED :dd +The index for the vector is out of bounds. :dd {Compute temp/asphere requires atom style ellipsoid} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Compute temp/asphere requires extended particles} :dt This compute cannot be used with point paritlces. :dd {Compute temp/partial cannot use vz for 2d systemx} :dt Self-explanatory. :dd {Compute temp/profile cannot bin z for 2d systems} :dt Self-explanatory. :dd {Compute temp/profile cannot use vz for 2d systemx} :dt Self-explanatory. :dd {Compute temp/sphere requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Compute ti kspace style does not exist} :dt Self-explanatory. :dd {Compute ti pair style does not exist} :dt Self-explanatory. :dd {Compute ti tail when pair style does not compute tail corrections} :dt Self-explanatory. :dd {Compute used in variable between runs is not current} :dt Computes cannot be invoked by a variable in between runs. Thus they must have been evaluated on the last timestep of the previous run in order for their value(s) to be accessed. See the doc page for the variable command for more info. :dd {Compute used in variable thermo keyword between runs is not current} :dt Some thermo keywords rely on a compute to calculate their value(s). Computes cannot be invoked by a variable in between runs. Thus they must have been evaluated on the last timestep of the previous run in order for their value(s) to be accessed. See the doc page for the variable command for more info. :dd {Computed temperature for fix temp/berendsen cannot be 0.0} :dt Self-explanatory. :dd {Computed temperature for fix temp/rescale cannot be 0.0} :dt Cannot rescale the temperature to a new value if the current temperature is 0.0. :dd {Could not count initial bonds in fix bond/create} :dt Could not find one of the atoms in a bond on this processor. :dd {Could not create 3d FFT plan} :dt The FFT setup in pppm failed. :dd {Could not create 3d grid of processors} :dt -UNDOCUMENTED :dd +The specified constraints did not allow a Px by Py by Pz grid to be +created where Px * Py * Pz = P = total number of processors. :dd {Could not create 3d remap plan} :dt The FFT setup in pppm failed. :dd -{Could not create numa 3d grid of processors} :dt - -UNDOCUMENTED :dd - {Could not create numa grid of processors} :dt -UNDOCUMENTED :dd +The specified constraints did not allow this style of grid to be +created. Usually this is because the total processor count is not a +multiple of the cores/node or the user specified processor count is > +1 in one of the dimensions. :dd {Could not create twolevel 3d grid of processors} :dt -UNDOCUMENTED :dd +The specified constraints did not allow this style of grid to be +created. :dd {Could not find atom_modify first group ID} :dt Self-explanatory. :dd +{Could not find change_box group ID} :dt + +Group ID used in the change_box command does not exist. :dd + {Could not find compute ID for PRD} :dt Self-explanatory. :dd {Could not find compute ID for TAD} :dt Self-explanatory. :dd {Could not find compute ID for temperature bias} :dt Self-explanatory. :dd {Could not find compute ID to delete} :dt Self-explanatory. :dd {Could not find compute displace/atom fix ID} :dt Self-explanatory. :dd {Could not find compute event/displace fix ID} :dt Self-explanatory. :dd {Could not find compute group ID} :dt Self-explanatory. :dd {Could not find compute heat/flux compute ID} :dt Self-explanatory. :dd {Could not find compute msd fix ID} :dt Self-explanatory. :dd {Could not find compute pressure temperature ID} :dt The compute ID for calculating temperature does not exist. :dd {Could not find compute_modify ID} :dt Self-explanatory. :dd {Could not find delete_atoms group ID} :dt Group ID used in the delete_atoms command does not exist. :dd {Could not find delete_atoms region ID} :dt Region ID used in the delete_atoms command does not exist. :dd {Could not find displace_atoms group ID} :dt Group ID used in the displace_atoms command does not exist. :dd -{Could not find displace_box group ID} :dt - -Group ID used in the displace_box command does not exist. :dd - {Could not find dump custom compute ID} :dt The compute ID needed by dump custom to compute a per-atom quantity does not exist. :dd {Could not find dump custom fix ID} :dt Self-explanatory. :dd {Could not find dump custom variable name} :dt Self-explanatory. :dd {Could not find dump group ID} :dt A group ID used in the dump command does not exist. :dd {Could not find dump local compute ID} :dt Self-explanatory. :dd {Could not find dump local fix ID} :dt Self-explanatory. :dd {Could not find dump modify compute ID} :dt Self-explanatory. :dd {Could not find dump modify fix ID} :dt Self-explanatory. :dd {Could not find dump modify variable name} :dt Self-explanatory. :dd {Could not find fix ID to delete} :dt Self-explanatory. :dd {Could not find fix group ID} :dt A group ID used in the fix command does not exist. :dd {Could not find fix msst compute ID} :dt Self-explanatory. :dd {Could not find fix poems group ID} :dt A group ID used in the fix poems command does not exist. :dd {Could not find fix recenter group ID} :dt A group ID used in the fix recenter command does not exist. :dd {Could not find fix rigid group ID} :dt A group ID used in the fix rigid command does not exist. :dd {Could not find fix srd group ID} :dt Self-explanatory. :dd {Could not find fix_modify ID} :dt A fix ID used in the fix_modify command does not exist. :dd {Could not find fix_modify pressure ID} :dt The compute ID for computing pressure does not exist. :dd {Could not find fix_modify temperature ID} :dt The compute ID for computing temperature does not exist. :dd {Could not find group delete group ID} :dt Self-explanatory. :dd {Could not find set group ID} :dt Group ID specified in set command does not exist. :dd {Could not find thermo compute ID} :dt Compute ID specified in thermo_style command does not exist. :dd {Could not find thermo custom compute ID} :dt The compute ID needed by thermo style custom to compute a requested quantity does not exist. :dd {Could not find thermo custom fix ID} :dt The fix ID needed by thermo style custom to compute a requested quantity does not exist. :dd {Could not find thermo custom variable name} :dt Self-explanatory. :dd {Could not find thermo fix ID} :dt Fix ID specified in thermo_style command does not exist. :dd +{Could not find thermo variable name} :dt + +Self-explanatory. :dd + {Could not find thermo_modify pressure ID} :dt The compute ID needed by thermo style custom to compute pressure does not exist. :dd {Could not find thermo_modify temperature ID} :dt The compute ID needed by thermo style custom to compute temperature does not exist. :dd {Could not find undump ID} :dt A dump ID used in the undump command does not exist. :dd {Could not find velocity group ID} :dt A group ID used in the velocity command does not exist. :dd {Could not find velocity temperature ID} :dt The compute ID needed by the velocity command to compute temperature does not exist. :dd +{Could not find/initialize a specified accelerator device} :dt + +UNDOCUMENTED :dd + {Could not grab element entry from EIM potential file} :dt Self-explanatory :dd {Could not grab global entry from EIM potential file} :dt Self-explanatory. :dd {Could not grab pair entry from EIM potential file} :dt Self-explanatory. :dd {Coulomb cutoffs of pair hybrid sub-styles do not match} :dt If using a Kspace solver, all Coulomb cutoffs of long pair styles must be the same. :dd {Cound not find dump_modify ID} :dt Self-explanatory. :dd {Create_atoms command before simulation box is defined} :dt The create_atoms command cannot be used before a read_data, read_restart, or create_box command. :dd {Create_atoms region ID does not exist} :dt A region ID used in the create_atoms command does not exist. :dd {Create_box region ID does not exist} :dt A region ID used in the create_box command does not exist. :dd {Create_box region does not support a bounding box} :dt Not all regions represent bounded volumes. You cannot use such a region with the create_box command. :dd {Cyclic loop in joint connections} :dt Fix poems cannot (yet) work with coupled bodies whose joints connect the bodies in a ring (or cycle). :dd {Degenerate lattice primitive vectors} :dt Invalid set of 3 lattice vectors for lattice command. :dd {Delete region ID does not exist} :dt Self-explanatory. :dd {Delete_atoms command before simulation box is defined} :dt The delete_atoms command cannot be used before a read_data, read_restart, or create_box command. :dd {Delete_atoms cutoff > neighbor cutoff} :dt Cannot delete atoms further away than a processor knows about. :dd {Delete_atoms requires a pair style be defined} :dt This is because atom deletion within a cutoff uses a pairwise neighbor list. :dd {Delete_bonds command before simulation box is defined} :dt The delete_bonds command cannot be used before a read_data, read_restart, or create_box command. :dd {Delete_bonds command with no atoms existing} :dt No atoms are yet defined so the delete_bonds command cannot be used. :dd {Deposition region extends outside simulation box} :dt Self-explanatory. :dd {Did not assign all atoms correctly} :dt Atoms read in from a data file were not assigned correctly to processors. This is likely due to some atom coordinates being outside a non-periodic simulation box. :dd {Did not find all elements in MEAM library file} :dt The requested elements were not found in the MEAM file. :dd {Did not find fix shake partner info} :dt Could not find bond partners implied by fix shake command. This error can be triggered if the delete_bonds command was used before fix shake, and it removed bonds without resetting the 1-2, 1-3, 1-4 weighting list via the special keyword. :dd {Did not find keyword in table file} :dt Keyword used in pair_coeff command was not found in table file. :dd {Did not set temp for fix rigid/nvt} :dt The temp keyword must be used. :dd {Dihedral atom missing in delete_bonds} :dt The delete_bonds command cannot find one or more atoms in a particular dihedral on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid dihedral. :dd {Dihedral atom missing in set command} :dt The set command cannot find one or more atoms in a particular dihedral on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid dihedral. :dd {Dihedral atoms %d %d %d %d missing on proc %d at step %ld} :dt One or more of 4 atoms needed to compute a particular dihedral are missing on this processor. Typically this is because the pairwise cutoff is set too short or the dihedral has blown apart and an atom is -too far away. :dd :dd +too far away. :dd {Dihedral charmm is incompatible with Pair style} :dt Dihedral style charmm must be used with a pair style charmm in order for the 1-4 epsilon/sigma parameters to be defined. :dd {Dihedral coeff for hybrid has invalid style} :dt Dihedral style hybrid uses another dihedral style as one of its coefficients. The dihedral style used in the dihedral_coeff command or read from a restart file is not recognized. :dd {Dihedral coeffs are not set} :dt No dihedral coefficients have been assigned in the data file or via the dihedral_coeff command. :dd {Dihedral style hybrid cannot have hybrid as an argument} :dt Self-explanatory. :dd {Dihedral style hybrid cannot have none as an argument} :dt Self-explanatory. :dd {Dihedral style hybrid cannot use same dihedral style twice} :dt Self-explanatory. :dd {Dihedral_coeff command before dihedral_style is defined} :dt Coefficients cannot be set in the data file or via the dihedral_coeff command until an dihedral_style has been assigned. :dd {Dihedral_coeff command before simulation box is defined} :dt The dihedral_coeff command cannot be used before a read_data, read_restart, or create_box command. :dd {Dihedral_coeff command when no dihedrals allowed} :dt The chosen atom style does not allow for dihedrals to be defined. :dd {Dihedral_style command when no dihedrals allowed} :dt The chosen atom style does not allow for dihedrals to be defined. :dd {Dihedrals assigned incorrectly} :dt Dihedrals read in from the data file were not assigned correctly to atoms. This means there is something invalid about the topology definitions. :dd {Dihedrals defined but no dihedral types} :dt The data file header lists dihedrals but no dihedral types. :dd {Dimension command after simulation box is defined} :dt The dimension command cannot be used after a read_data, read_restart, or create_box command. :dd {Displace_atoms command before simulation box is defined} :dt The displace_atoms command cannot be used before a read_data, read_restart, or create_box command. :dd -{Displace_box command before simulation box is defined} :dt - -Self-explanatory. :dd - -{Displace_box tilt factors require triclinic box} :dt - -Cannot use tilt factors unless the simulation box is -non-orthogonal. :dd - {Distance must be > 0 for compute event/displace} :dt Self-explanatory. :dd {Divide by 0 in influence function of pair peri/lps} :dt This should not normally occur. It is likely a problem with your model. :dd {Divide by 0 in variable formula} :dt Self-explanatory. :dd {Domain too large for neighbor bins} :dt The domain has become extremely large so that neighbor bins cannot be used. Most likely, one or more atoms have been blown out of the simulation box to a great distance. :dd -{Dump cfg arguments can not mix xs|ys|zs with xsu|ysu|zsu} :dt +{Double precision is not supported on this accelerator} :dt UNDOCUMENTED :dd +{Dump cfg arguments can not mix xs|ys|zs with xsu|ysu|zsu} :dt + +Self-explanatory. :dd + {Dump cfg arguments must start with 'id type xs ys zs' or 'id type xsu ysu zsu'} :dt -This is a requirement of the CFG output format. :dd :dd +This is a requirement of the CFG output format. :dd {Dump cfg requires one snapshot per file} :dt Use the wildcard "*" character in the filename. :dd {Dump custom and fix not computed at compatible times} :dt The fix must produce per-atom quantities on timesteps that dump custom needs them. :dd {Dump custom compute does not calculate per-atom array} :dt Self-explanatory. :dd {Dump custom compute does not calculate per-atom vector} :dt Self-explanatory. :dd {Dump custom compute does not compute per-atom info} :dt Self-explanatory. :dd {Dump custom compute vector is accessed out-of-range} :dt Self-explanatory. :dd {Dump custom fix does not compute per-atom array} :dt Self-explanatory. :dd {Dump custom fix does not compute per-atom info} :dt Self-explanatory. :dd {Dump custom fix does not compute per-atom vector} :dt Self-explanatory. :dd {Dump custom fix vector is accessed out-of-range} :dt Self-explanatory. :dd {Dump custom variable is not atom-style variable} :dt Only atom-style variables generate per-atom quantities, needed for dump output. :dd {Dump dcd of non-matching # of atoms} :dt Every snapshot written by dump dcd must contain the same # of atoms. :dd {Dump dcd requires sorting by atom ID} :dt Use the dump_modify sort command to enable this. :dd {Dump every variable returned a bad timestep} :dt The variable must return a timestep greater than the current timestep. :dd {Dump image bond not allowed with no bond types} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Dump image cannot perform sorting} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Dump image persp option is not yet supported} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Dump image requires one snapshot per file} :dt -UNDOCUMENTED :dd +Use a "*" in the filename. :dd {Dump local and fix not computed at compatible times} :dt The fix must produce per-atom quantities on timesteps that dump local needs them. :dd {Dump local attributes contain no compute or fix} :dt Self-explanatory. :dd {Dump local cannot sort by atom ID} :dt This is because dump local does not really dump per-atom info. :dd {Dump local compute does not calculate local array} :dt Self-explanatory. :dd {Dump local compute does not calculate local vector} :dt Self-explanatory. :dd {Dump local compute does not compute local info} :dt Self-explanatory. :dd {Dump local compute vector is accessed out-of-range} :dt Self-explanatory. :dd {Dump local count is not consistent across input fields} :dt Every column of output must be the same length. :dd {Dump local fix does not compute local array} :dt Self-explanatory. :dd {Dump local fix does not compute local info} :dt Self-explanatory. :dd {Dump local fix does not compute local vector} :dt Self-explanatory. :dd {Dump local fix vector is accessed out-of-range} :dt Self-explanatory. :dd {Dump modify bcolor not allowed with no bond types} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Dump modify bdiam not allowed with no bond types} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Dump modify compute ID does not compute per-atom array} :dt Self-explanatory. :dd {Dump modify compute ID does not compute per-atom info} :dt Self-explanatory. :dd {Dump modify compute ID does not compute per-atom vector} :dt Self-explanatory. :dd {Dump modify compute ID vector is not large enough} :dt Self-explanatory. :dd {Dump modify element names do not match atom types} :dt Number of element names must equal number of atom types. :dd {Dump modify fix ID does not compute per-atom array} :dt Self-explanatory. :dd {Dump modify fix ID does not compute per-atom info} :dt Self-explanatory. :dd {Dump modify fix ID does not compute per-atom vector} :dt Self-explanatory. :dd {Dump modify fix ID vector is not large enough} :dt Self-explanatory. :dd {Dump modify variable is not atom-style variable} :dt Self-explanatory. :dd {Dump sort column is invalid} :dt Self-explanatory. :dd {Dump xtc requires sorting by atom ID} :dt Use the dump_modify sort command to enable this. :dd {Dump_modify region ID does not exist} :dt Self-explanatory. :dd {Dumping an atom property that isn't allocated} :dt The chosen atom style does not define the per-atom quantity being dumped. :dd {Dumping an atom quantity that isn't allocated} :dt Only per-atom quantities that are defined for the atom style being used are allowed. :dd {Duplicate particle in PeriDynamic bond - simulation box is too small} :dt This is likely because your box length is shorter than 2 times the bond length. :dd {Electronic temperature dropped below zero} :dt Something has gone wrong with the fix ttm electron temperature model. :dd {Empty brackets in variable} :dt There is no variable syntax that uses empty brackets. Check the variable doc page. :dd {Energy was not tallied on needed timestep} :dt You are using a thermo keyword that requires potentials to have tallied energy, but they didn't on this timestep. See the variable doc page for ideas on how to make this work. :dd {Expected floating point parameter in input script or data file} :dt The quantity being read is an integer on non-numeric value. :dd {Expected floating point parameter in variable definition} :dt The quantity being read is a non-numeric value. :dd {Expected integer parameter in input script or data file} :dt The quantity being read is a floating point or non-numeric value. :dd {Expected integer parameter in variable definition} :dt The quantity being read is a floating point or non-numeric value. :dd {Failed to allocate %ld bytes for array %s} :dt Your LAMMPS simulation has run out of memory. You need to run a -smaller simulation or on more processors. :dd :dd +smaller simulation or on more processors. :dd {Failed to reallocate %ld bytes for array %s} :dt Your LAMMPS simulation has run out of memory. You need to run a -smaller simulation or on more processors. :dd :dd +smaller simulation or on more processors. :dd {Fewer SRD bins than processors in some dimension} :dt This is not allowed. Make your SRD bin size smaller. :dd {Final box dimension due to fix deform is < 0.0} :dt Self-explanatory. :dd {Fix GCMC incompatible with given pair_style} :dt UNDOCUMENTED :dd {Fix GCMC molecule command requires atom attribute molecule} :dt UNDOCUMENTED :dd {Fix GCMC molecule feature does not yet work} :dt UNDOCUMENTED :dd {Fix GPU split must be positive for hybrid pair styles} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix ID for compute atom/molecule does not exist} :dt Self-explanatory. :dd {Fix ID for compute reduce does not exist} :dt Self-explanatory. :dd {Fix ID for compute slice does not exist} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix ID for fix ave/atom does not exist} :dt Self-explanatory. :dd {Fix ID for fix ave/correlate does not exist} :dt Self-explanatory. :dd {Fix ID for fix ave/histo does not exist} :dt Self-explanatory. :dd {Fix ID for fix ave/spatial does not exist} :dt Self-explanatory. :dd {Fix ID for fix ave/time does not exist} :dt Self-explanatory. :dd {Fix ID for fix store/state does not exist} :dt Self-explanatory :dd {Fix ID must be alphanumeric or underscore characters} :dt Self-explanatory. :dd {Fix SRD no-slip requires atom attribute torque} :dt This is because the SRD collisions will impart torque to the solute particles. :dd {Fix SRD: bad bin assignment for SRD advection} :dt Something has gone wrong in your SRD model; try using more conservative settings. :dd {Fix SRD: bad search bin assignment} :dt Something has gone wrong in your SRD model; try using more conservative settings. :dd {Fix SRD: bad stencil bin for big particle} :dt Something has gone wrong in your SRD model; try using more conservative settings. :dd {Fix SRD: too many big particles in bin} :dt Reset the ATOMPERBIN parameter at the top of fix_srd.cpp to a larger value, and re-compile the code. :dd {Fix SRD: too many walls in bin} :dt This should not happen unless your system has been setup incorrectly. :dd {Fix adapt kspace style does not exist} :dt Self-explanatory. :dd {Fix adapt pair style does not exist} :dt Self-explanatory :dd {Fix adapt pair style param not supported} :dt The pair style does not know about the parameter you specified. :dd {Fix adapt requires atom attribute diameter} :dt The atom style being used does not specify an atom diameter. :dd {Fix adapt type pair range is not valid for pair hybrid sub-style} :dt Self-explanatory. :dd {Fix ave/atom compute array is accessed out-of-range} :dt Self-explanatory. :dd {Fix ave/atom compute does not calculate a per-atom array} :dt Self-explanatory. :dd {Fix ave/atom compute does not calculate a per-atom vector} :dt A compute used by fix ave/atom must generate per-atom values. :dd {Fix ave/atom compute does not calculate per-atom values} :dt A compute used by fix ave/atom must generate per-atom values. :dd {Fix ave/atom fix array is accessed out-of-range} :dt Self-explanatory. :dd {Fix ave/atom fix does not calculate a per-atom array} :dt Self-explanatory. :dd {Fix ave/atom fix does not calculate a per-atom vector} :dt A fix used by fix ave/atom must generate per-atom values. :dd {Fix ave/atom fix does not calculate per-atom values} :dt A fix used by fix ave/atom must generate per-atom values. :dd {Fix ave/atom variable is not atom-style variable} :dt A variable used by fix ave/atom must generate per-atom values. :dd {Fix ave/correlate compute does not calculate a scalar} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix ave/correlate compute does not calculate a vector} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix ave/correlate compute vector is accessed out-of-range} :dt -UNDOCUMENTED :dd +The index for the vector is out of bounds. :dd {Fix ave/correlate fix does not calculate a scalar} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix ave/correlate fix does not calculate a vector} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix ave/correlate fix vector is accessed out-of-range} :dt -UNDOCUMENTED :dd +The index for the vector is out of bounds. :dd {Fix ave/correlate variable is not equal-style variable} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix ave/histo cannot input local values in scalar mode} :dt Self-explanatory. :dd {Fix ave/histo cannot input per-atom values in scalar mode} :dt Self-explanatory. :dd {Fix ave/histo compute array is accessed out-of-range} :dt Self-explanatory. :dd {Fix ave/histo compute does not calculate a global array} :dt Self-explanatory. :dd {Fix ave/histo compute does not calculate a global scalar} :dt Self-explanatory. :dd {Fix ave/histo compute does not calculate a global vector} :dt Self-explanatory. :dd {Fix ave/histo compute does not calculate a local array} :dt Self-explanatory. :dd {Fix ave/histo compute does not calculate a local vector} :dt Self-explanatory. :dd {Fix ave/histo compute does not calculate a per-atom array} :dt Self-explanatory. :dd {Fix ave/histo compute does not calculate a per-atom vector} :dt Self-explanatory. :dd {Fix ave/histo compute does not calculate local values} :dt Self-explanatory. :dd {Fix ave/histo compute does not calculate per-atom values} :dt Self-explanatory. :dd {Fix ave/histo compute vector is accessed out-of-range} :dt Self-explanatory. :dd {Fix ave/histo fix array is accessed out-of-range} :dt Self-explanatory. :dd {Fix ave/histo fix does not calculate a global array} :dt Self-explanatory. :dd {Fix ave/histo fix does not calculate a global scalar} :dt Self-explanatory. :dd {Fix ave/histo fix does not calculate a global vector} :dt Self-explanatory. :dd {Fix ave/histo fix does not calculate a local array} :dt Self-explanatory. :dd {Fix ave/histo fix does not calculate a local vector} :dt Self-explanatory. :dd {Fix ave/histo fix does not calculate a per-atom array} :dt Self-explanatory. :dd {Fix ave/histo fix does not calculate a per-atom vector} :dt Self-explanatory. :dd {Fix ave/histo fix does not calculate local values} :dt Self-explanatory. :dd {Fix ave/histo fix does not calculate per-atom values} :dt Self-explanatory. :dd {Fix ave/histo fix vector is accessed out-of-range} :dt Self-explanatory. :dd {Fix ave/histo input is invalid compute} :dt Self-explanatory. :dd {Fix ave/histo input is invalid fix} :dt Self-explanatory. :dd {Fix ave/histo input is invalid variable} :dt Self-explanatory. :dd {Fix ave/histo inputs are not all global, peratom, or local} :dt All inputs in a single fix ave/histo command must be of the same style. :dd {Fix ave/spatial compute does not calculate a per-atom array} :dt Self-explanatory. :dd {Fix ave/spatial compute does not calculate a per-atom vector} :dt A compute used by fix ave/spatial must generate per-atom values. :dd {Fix ave/spatial compute does not calculate per-atom values} :dt A compute used by fix ave/spatial must generate per-atom values. :dd {Fix ave/spatial compute vector is accessed out-of-range} :dt The index for the vector is out of bounds. :dd {Fix ave/spatial fix does not calculate a per-atom array} :dt Self-explanatory. :dd {Fix ave/spatial fix does not calculate a per-atom vector} :dt A fix used by fix ave/spatial must generate per-atom values. :dd {Fix ave/spatial fix does not calculate per-atom values} :dt A fix used by fix ave/spatial must generate per-atom values. :dd {Fix ave/spatial fix vector is accessed out-of-range} :dt The index for the vector is out of bounds. :dd {Fix ave/spatial for triclinic boxes requires units reduced} :dt Self-explanatory. :dd {Fix ave/spatial settings invalid with changing box} :dt If the ave setting is "running" or "window" and the box size/shape changes during the simulation, then the units setting must be "reduced", else the number of bins may change. :dd {Fix ave/spatial variable is not atom-style variable} :dt A variable used by fix ave/spatial must generate per-atom values. :dd {Fix ave/time cannot set output array intensive/extensive from these inputs} :dt One of more of the vector inputs has individual elements which are flagged as intensive or extensive. Such an input cannot be flagged as all intensive/extensive when turned into an array by fix ave/time. :dd {Fix ave/time cannot use variable with vector mode} :dt Variables produce scalar values. :dd {Fix ave/time columns are inconsistent lengths} :dt Self-explanatory. :dd {Fix ave/time compute array is accessed out-of-range} :dt -Self-explanatory. :dd +An index for the array is out of bounds. :dd {Fix ave/time compute does not calculate a scalar} :dt -Only computes that calculate a scalar or vector quantity (not a -per-atom quantity) can be used with fix ave/time. :dd +Self-explantory. :dd {Fix ave/time compute does not calculate a vector} :dt -Only computes that calculate a scalar or vector quantity (not a -per-atom quantity) can be used with fix ave/time. :dd +Self-explantory. :dd {Fix ave/time compute does not calculate an array} :dt Self-explanatory. :dd {Fix ave/time compute vector is accessed out-of-range} :dt The index for the vector is out of bounds. :dd {Fix ave/time fix array is accessed out-of-range} :dt -Self-explanatory. :dd +An index for the array is out of bounds. :dd {Fix ave/time fix does not calculate a scalar} :dt -A fix used by fix ave/time must generate global values. :dd +Self-explanatory. :dd {Fix ave/time fix does not calculate a vector} :dt -A fix used by fix ave/time must generate global values. :dd +Self-explanatory. :dd {Fix ave/time fix does not calculate an array} :dt Self-explanatory. :dd {Fix ave/time fix vector is accessed out-of-range} :dt The index for the vector is out of bounds. :dd {Fix ave/time variable is not equal-style variable} :dt -A variable used by fix ave/time must generate a global value. :dd +Self-explanatory. :dd {Fix bond/break requires special_bonds = 0,1,1} :dt This is a restriction of the current fix bond/break implementation. :dd {Fix bond/create cutoff is longer than pairwise cutoff} :dt This is not allowed because bond creation is done using the pairwise neighbor list. :dd {Fix bond/create requires special_bonds coul = 0,1,1} :dt Self-explanatory. :dd {Fix bond/create requires special_bonds lj = 0,1,1} :dt Self-explanatory. :dd {Fix bond/swap cannot use dihedral or improper styles} :dt These styles cannot be defined when using this fix. :dd {Fix bond/swap requires pair and bond styles} :dt Self-explanatory. :dd {Fix bond/swap requires special_bonds = 0,1,1} :dt Self-explanatory. :dd {Fix box/relax generated negative box length} :dt The pressure being applied is likely too large. Try applying it incrementally, to build to the high pressure. :dd {Fix command before simulation box is defined} :dt The fix command cannot be used before a read_data, read_restart, or create_box command. :dd -{Fix deform is changing yz by too much with changing xy} :dt +{Fix deform cannot use yz variable with xy} :dt + +The yz setting cannot be a variable if xy deformation is also +specified. This is because LAMMPS cannot determine if the yz setting +will induce a box flip which would be invalid if xy is also changing. :dd + +{Fix deform is changing yz too much with xy} :dt When both yz and xy are changing, it induces changes in xz if the box must flip from one tilt extreme to another. Thus it is not allowed for yz to grow so much that a flip is induced. :dd {Fix deform tilt factors require triclinic box} :dt Cannot deform the tilt factors of a simulation box unless it is a triclinic (non-orthogonal) box. :dd {Fix deform volume setting is invalid} :dt Cannot use volume style unless other dimensions are being controlled. :dd {Fix deposit region cannot be dynamic} :dt Only static regions can be used with fix deposit. :dd {Fix deposit region does not support a bounding box} :dt Not all regions represent bounded volumes. You cannot use such a region with the fix deposit command. :dd {Fix efield requires atom attribute q} :dt Self-explanatory. :dd {Fix evaporate molecule requires atom attribute molecule} :dt The atom style being used does not define a molecule ID. :dd {Fix external callback function not set} :dt This must be done by an external program in order to use this fix. :dd {Fix for fix ave/atom not computed at compatible time} :dt Fixes generate their values on specific timesteps. Fix ave/atom is requesting a value on a non-allowed timestep. :dd {Fix for fix ave/correlate not computed at compatible time} :dt Fixes generate their values on specific timesteps. Fix ave/correlate is requesting a value on a non-allowed timestep. :dd {Fix for fix ave/histo not computed at compatible time} :dt Fixes generate their values on specific timesteps. Fix ave/histo is requesting a value on a non-allowed timestep. :dd {Fix for fix ave/spatial not computed at compatible time} :dt Fixes generate their values on specific timesteps. Fix ave/spatial is requesting a value on a non-allowed timestep. :dd {Fix for fix ave/time not computed at compatible time} :dt Fixes generate their values on specific timesteps. Fix ave/time is requesting a value on a non-allowed timestep. :dd {Fix for fix store/state not computed at compatible time} :dt Fixes generate their values on specific timesteps. Fix store/state is requesting a value on a non-allowed timestep. :dd {Fix freeze requires atom attribute torque} :dt The atom style defined does not have this attribute. :dd {Fix heat group has no atoms} :dt Self-explanatory. :dd {Fix heat kinetic energy went negative} :dt This will cause the velocity rescaling about to be performed by fix heat to be invalid. :dd {Fix in variable not computed at compatible time} :dt Fixes generate their values on specific timesteps. The variable is requesting the values on a non-allowed timestep. :dd -{Fix langevin angmom require atom style ellipsoid} :dt - -UNDOCUMENTED :dd - {Fix langevin angmom requires atom style ellipsoid} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix langevin angmom requires extended particles} :dt -UNDOCUMENTED :dd +This fix option cannot be used with point paritlces. :dd -{Fix langevin omega require atom style sphere} :dt +{Fix langevin omega requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix langevin omega requires extended particles} :dt -UNDOCUMENTED :dd +One of the particles has radius 0.0. :dd {Fix langevin period must be > 0.0} :dt The time window for temperature relaxation must be > 0 :dd {Fix langevin variable returned negative temperature} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix momentum group has no atoms} :dt Self-explanatory. :dd {Fix move cannot define z or vz variable for 2d problem} :dt Self-explanatory. :dd {Fix move cannot have 0 length rotation vector} :dt Self-explanatory. :dd {Fix move cannot rotate aroung non z-axis for 2d problem} :dt Self-explanatory. :dd {Fix move cannot set linear z motion for 2d problem} :dt Self-explanatory. :dd {Fix move cannot set wiggle z motion for 2d problem} :dt Self-explanatory. :dd {Fix msst compute ID does not compute potential energy} :dt Self-explanatory. :dd {Fix msst compute ID does not compute pressure} :dt Self-explanatory. :dd {Fix msst compute ID does not compute temperature} :dt Self-explanatory. :dd {Fix msst requires a periodic box} :dt Self-explanatory. :dd {Fix msst tscale must satisfy 0 <= tscale < 1} :dt Self-explanatory. :dd {Fix npt/nph has tilted box too far in one step - periodic cell is too far from equilibrium state} :dt -UNDOCUMENTED :dd +Self-explanatory. The change in the box tilt is too extreme +on a short timescale. :dd {Fix nve/asphere requires extended particles} :dt This fix can only be used for particles with a shape setting. :dd {Fix nve/asphere/noforce requires atom style ellipsoid} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix nve/asphere/noforce requires extended particles} :dt -UNDOCUMENTED :dd +One of the particles is not an ellipsoid. :dd {Fix nve/line can only be used for 2d simulations} :dt -UNDOCUMENTED :dd - -{Fix nve/line can only be used for 3d simulations} :dt - -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix nve/line requires atom style line} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix nve/line requires line particles} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix nve/sphere requires atom attribute mu} :dt An atom style with this attribute is needed. :dd {Fix nve/sphere requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix nve/sphere requires extended particles} :dt This fix can only be used for particles of a finite size. :dd +{Fix nve/tri can only be used for 3d simulations} :dt + +Self-explanatory. :dd + {Fix nve/tri requires atom style tri} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix nve/tri requires tri particles} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix nvt/nph/npt asphere requires extended particles} :dt The shape setting for a particle in the fix group has shape = 0.0, which means it is a point particle. :dd {Fix nvt/nph/npt sphere requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix nvt/npt/nph damping parameters must be > 0.0} :dt Self-explanatory. :dd {Fix nvt/sphere requires extended particles} :dt This fix can only be used for particles of a finite size. :dd {Fix orient/fcc file open failed} :dt The fix orient/fcc command could not open a specified file. :dd {Fix orient/fcc file read failed} :dt The fix orient/fcc command could not read the needed parameters from a specified file. :dd {Fix orient/fcc found self twice} :dt The neighbor lists used by fix orient/fcc are messed up. If this error occurs, it is likely a bug, so send an email to the "developers"_http://lammps.sandia.gov/authors.html. :dd {Fix peri neigh does not exist} :dt Somehow a fix that the pair style defines has been deleted. :dd {Fix pour region ID does not exist} :dt Self-explanatory. :dd {Fix pour region cannot be dynamic} :dt Only static regions can be used with fix pour. :dd {Fix pour region does not support a bounding box} :dt Not all regions represent bounded volumes. You cannot use such a region with the fix pour command. :dd {Fix pour requires atom attributes radius, rmass} :dt The atom style defined does not have these attributes. :dd {Fix press/berendsen damping parameters must be > 0.0} :dt Self-explanatory. :dd {Fix qeq/comb group has no atoms} :dt Self-explanatory. :dd {Fix qeq/comb requires atom attribute q} :dt An atom style with charge must be used to perform charge equilibration. :dd {Fix reax/bonds numbonds > nsbmax_most} :dt The limit of the number of bonds expected by the ReaxFF force field was exceeded. :dd {Fix recenter group has no atoms} :dt Self-explanatory. :dd {Fix restrain requires an atom map, see atom_modify} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix rigid atom has non-zero image flag in a non-periodic dimension} :dt You cannot set image flags for non-periodic dimensions. :dd {Fix rigid langevin period must be > 0.0} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix rigid molecule requires atom attribute molecule} :dt Self-explanatory. :dd {Fix rigid xy torque cannot be on for 2d simulation} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix rigid z force cannot be on for 2d simulation} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix rigid/nvt period must be > 0.0} :dt Self-explanatory :dd {Fix rigid: Bad principal moments} :dt The principal moments of inertia computed for a rigid body are not within the required tolerances. :dd {Fix shake cannot be used with minimization} :dt Cannot use fix shake while doing an energy minimization since it turns off bonds that should contribute to the energy. :dd {Fix spring couple group ID does not exist} :dt Self-explanatory. :dd {Fix srd lamda must be >= 0.6 of SRD grid size} :dt This is a requirement for accuracy reasons. :dd {Fix srd requires SRD particles all have same mass} :dt Self-explanatory. :dd {Fix srd requires ghost atoms store velocity} :dt Use the communicate vel yes command to enable this. :dd {Fix srd requires newton pair on} :dt Self-explanatory. :dd {Fix store/state compute array is accessed out-of-range} :dt Self-explanatory. :dd {Fix store/state compute does not calculate a per-atom array} :dt The compute calculates a per-atom vector. :dd {Fix store/state compute does not calculate a per-atom vector} :dt The compute calculates a per-atom vector. :dd {Fix store/state compute does not calculate per-atom values} :dt Computes that calculate global or local quantities cannot be used with fix store/state. :dd {Fix store/state fix array is accessed out-of-range} :dt Self-explanatory. :dd {Fix store/state fix does not calculate a per-atom array} :dt The fix calculates a per-atom vector. :dd {Fix store/state fix does not calculate a per-atom vector} :dt The fix calculates a per-atom array. :dd {Fix store/state fix does not calculate per-atom values} :dt Fixes that calculate global or local quantities cannot be used with fix store/state. :dd {Fix store/state for atom property that isn't allocated} :dt Self-explanatory. :dd {Fix store/state variable is not atom-style variable} :dt Only atom-style variables calculate per-atom quantities. :dd {Fix temp/berendsen period must be > 0.0} :dt Self-explanatory. :dd {Fix thermal/conductivity swap value must be positive} :dt Self-explanatory. :dd {Fix tmd must come after integration fixes} :dt Any fix tmd command must appear in the input script after all time integration fixes (nve, nvt, npt). See the fix tmd documentation for details. :dd {Fix ttm electron temperatures must be > 0.0} :dt Self-explanatory. :dd {Fix ttm electronic_density must be > 0.0} :dt Self-explanatory. :dd {Fix ttm electronic_specific_heat must be > 0.0} :dt Self-explanatory. :dd {Fix ttm electronic_thermal_conductivity must be >= 0.0} :dt Self-explanatory. :dd {Fix ttm gamma_p must be > 0.0} :dt Self-explanatory. :dd {Fix ttm gamma_s must be >= 0.0} :dt Self-explanatory. :dd {Fix ttm number of nodes must be > 0} :dt Self-explanatory. :dd {Fix ttm v_0 must be >= 0.0} :dt Self-explanatory. :dd {Fix used in compute atom/molecule not computed at compatible time} :dt The fix must produce per-atom quantities on timesteps that the compute needs them. :dd {Fix used in compute reduce not computed at compatible time} :dt -Fixes generate their values on specific timesteps. Compute sum is +Fixes generate their values on specific timesteps. Compute reduce is requesting a value on a non-allowed timestep. :dd {Fix used in compute slice not computed at compatible time} :dt -UNDOCUMENTED :dd +Fixes generate their values on specific timesteps. Compute slice is +requesting a value on a non-allowed timestep. :dd {Fix viscosity swap value must be positive} :dt Self-explanatory. :dd {Fix viscosity vtarget value must be positive} :dt Self-explanatory. :dd {Fix wall cutoff <= 0.0} :dt Self-explanatory. :dd {Fix wall/colloid requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix wall/colloid requires extended particles} :dt -Self-explanatory. :dd +One of the particles has radius 0.0. :dd {Fix wall/gran is incompatible with Pair style} :dt Must use a granular pair style to define the parameters needed for this fix. :dd {Fix wall/gran requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix wall/piston command only available at zlo} :dt -UNDOCUMENTED :dd +The face keyword must be zlo. :dd {Fix wall/region colloid requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Fix wall/region colloid requires extended particles} :dt -Self-explanatory. :dd +One of the particles has radius 0.0. :dd {Fix wall/region cutoff <= 0.0} :dt Self-explanatory. :dd {Fix_modify order must be 3 or 5} :dt Self-explanatory. :dd {Fix_modify pressure ID does not compute pressure} :dt The compute ID assigned to the fix must compute pressure. :dd {Fix_modify temperature ID does not compute temperature} :dt The compute ID assigned to the fix must compute temperature. :dd +{For triclinic deformation, specified target stress must be hydrostatic} :dt + +Triclinic pressure control is allowed using the tri keyword, but +non-hydrostatic pressure control can not be used in this case. :dd + {Found no restart file matching pattern} :dt When using a "*" in the restart file name, no matching file was found. :dd +{GPU library not compiled for this accelerator} :dt + +UNDOCUMENTED :dd + +{GPU particle split must be set to 1 for this pair style.} :dt + +UNDOCUMENTED :dd + {Gmask function in equal-style variable formula} :dt Gmask is per-atom operation. :dd {Gravity changed since fix pour was created} :dt Gravity must be static and not dynamic for use with fix pour. :dd {Gravity must point in -y to use with fix pour in 2d} :dt Gravity must be pointing "down" in a 2d box. :dd {Gravity must point in -z to use with fix pour in 3d} :dt Gravity must be pointing "down" in a 3d box, i.e. theta = 180.0. :dd {Grmask function in equal-style variable formula} :dt Grmask is per-atom operation. :dd {Group ID does not exist} :dt A group ID used in the group command does not exist. :dd {Group ID in variable formula does not exist} :dt Self-explanatory. :dd {Group command before simulation box is defined} :dt The group command cannot be used before a read_data, read_restart, or create_box command. :dd {Group region ID does not exist} :dt A region ID used in the group command does not exist. :dd -{Illega dump_modify command} :dt - -UNDOCUMENTED :dd - {Illegal ... command} :dt Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. :dd {Illegal COMB parameter} :dt One or more of the coefficients defined in the potential file is invalid. :dd {Illegal Stillinger-Weber parameter} :dt One or more of the coefficients defined in the potential file is invalid. :dd {Illegal Tersoff parameter} :dt One or more of the coefficients defined in the potential file is invalid. :dd {Illegal fix wall/piston velocity} :dt -UNDOCUMENTED :dd +The piston velocity must be positive. :dd {Illegal integrate style} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Illegal number of angle table entries} :dt There must be at least 2 table entries. :dd {Illegal number of bond table entries} :dt There must be at least 2 table entries. :dd {Illegal number of pair table entries} :dt There must be at least 2 table entries. :dd {Illegal simulation box} :dt The lower bound of the simulation box is greater than the upper bound. :dd {Improper atom missing in delete_bonds} :dt The delete_bonds command cannot find one or more atoms in a particular improper on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid improper. :dd {Improper atom missing in set command} :dt The set command cannot find one or more atoms in a particular improper on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid improper. :dd {Improper atoms %d %d %d %d missing on proc %d at step %ld} :dt One or more of 4 atoms needed to compute a particular improper are missing on this processor. Typically this is because the pairwise cutoff is set too short or the improper has blown apart and an atom is -too far away. :dd :dd +too far away. :dd {Improper coeff for hybrid has invalid style} :dt Improper style hybrid uses another improper style as one of its coefficients. The improper style used in the improper_coeff command or read from a restart file is not recognized. :dd {Improper coeffs are not set} :dt No improper coefficients have been assigned in the data file or via the improper_coeff command. :dd {Improper style hybrid cannot have hybrid as an argument} :dt Self-explanatory. :dd {Improper style hybrid cannot have none as an argument} :dt Self-explanatory. :dd {Improper style hybrid cannot use same improper style twice} :dt Self-explanatory. :dd {Improper_coeff command before improper_style is defined} :dt Coefficients cannot be set in the data file or via the improper_coeff command until an improper_style has been assigned. :dd {Improper_coeff command before simulation box is defined} :dt The improper_coeff command cannot be used before a read_data, read_restart, or create_box command. :dd {Improper_coeff command when no impropers allowed} :dt The chosen atom style does not allow for impropers to be defined. :dd {Improper_style command when no impropers allowed} :dt The chosen atom style does not allow for impropers to be defined. :dd {Impropers assigned incorrectly} :dt Impropers read in from the data file were not assigned correctly to atoms. This means there is something invalid about the topology definitions. :dd {Impropers defined but no improper types} :dt The data file header lists improper but no improper types. :dd {Inconsistent iparam/jparam values in fix bond/create command} :dt If itype and jtype are the same, then their maxbond and newtype settings must also be the same. :dd {Inconsistent line segment in data file} :dt -UNDOCUMENTED :dd +The end points of the line segment are not equal distances from the +center point which is the atom coordinate. :dd {Inconsistent triangle in data file} :dt -UNDOCUMENTED :dd +The centroid of the triangle as defined by the corner points is not +the atom coordinate. :dd {Incorrect args for angle coefficients} :dt Self-explanatory. Check the input script or data file. :dd {Incorrect args for bond coefficients} :dt Self-explanatory. Check the input script or data file. :dd {Incorrect args for dihedral coefficients} :dt Self-explanatory. Check the input script or data file. :dd {Incorrect args for improper coefficients} :dt Self-explanatory. Check the input script or data file. :dd {Incorrect args for pair coefficients} :dt Self-explanatory. Check the input script or data file. :dd {Incorrect args in pair_style command} :dt Self-explanatory. :dd {Incorrect atom format in data file} :dt Number of values per atom line in the data file is not consistent with the atom style. :dd {Incorrect bonus data format in data file} :dt -UNDOCUMENTED :dd +See the read_data doc page for a description of how various kinds of +bonus data must be formatted for certain atom styles. :dd {Incorrect boundaries with slab Ewald} :dt Must have periodic x,y dimensions and non-periodic z dimension to use 2d slab option with Ewald. :dd {Incorrect boundaries with slab PPPM} :dt Must have periodic x,y dimensions and non-periodic z dimension to use 2d slab option with PPPM. :dd {Incorrect element names in ADP potential file} :dt -UNDOCUMENTED :dd +The element names in the ADP file do not match those requested. :dd {Incorrect element names in EAM potential file} :dt The element names in the EAM file do not match those requested. :dd {Incorrect format in COMB potential file} :dt Incorrect number of words per line in the potential file. :dd {Incorrect format in MEAM potential file} :dt Incorrect number of words per line in the potential file. :dd {Incorrect format in NEB coordinate file} :dt Self-explanatory. :dd {Incorrect format in Stillinger-Weber potential file} :dt Incorrect number of words per line in the potential file. :dd {Incorrect format in TMD target file} :dt Format of file read by fix tmd command is incorrect. :dd {Incorrect format in Tersoff potential file} :dt Incorrect number of words per line in the potential file. :dd {Incorrect multiplicity arg for dihedral coefficients} :dt Self-explanatory. Check the input script or data file. :dd {Incorrect sign arg for dihedral coefficients} :dt Self-explanatory. Check the input script or data file. :dd {Incorrect velocity format in data file} :dt Each atom style defines a format for the Velocity section of the data file. The read-in lines do not match. :dd {Incorrect weight arg for dihedral coefficients} :dt Self-explanatory. Check the input script or data file. :dd {Index between variable brackets must be positive} :dt Self-explanatory. :dd {Indexed per-atom vector in variable formula without atom map} :dt Accessing a value from an atom vector requires the ability to lookup an atom index, which is provided by an atom map. An atom map does not exist (by default) for non-molecular problems. Using the atom_modify map command will force an atom map to be created. :dd -{Induced tilt by displace_box is too large} :dt - -The final tilt value must be between -1/2 and 1/2 of the perpendicular -box length. :dd - {Initial temperatures not all set in fix ttm} :dt Self-explantory. :dd {Input line too long after variable substitution} :dt This is a hard (very large) limit defined in the input.cpp file. :dd {Input line too long: %s} :dt This is a hard (very large) limit defined in the input.cpp file. :dd {Insertion region extends outside simulation box} :dt Region specified with fix pour command extends outside the global simulation box. :dd {Insufficient Jacobi rotations for POEMS body} :dt Eigensolve for rigid body was not sufficiently accurate. :dd {Insufficient Jacobi rotations for rigid body} :dt Eigensolve for rigid body was not sufficiently accurate. :dd {Insufficient Jacobi rotations for triangle} :dt +The calculation of the intertia tensor of the triangle failed. This +should not happen if it is a reasonably shaped triangle. :dd + +{Insufficient memory on accelerator} :dt + UNDOCUMENTED :dd {Invalid -reorder N value} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Invalid Boolean syntax in if command} :dt Self-explanatory. :dd {Invalid REAX atom type} :dt There is a mis-match between LAMMPS atom types and the elements listed in the ReaxFF force field file. :dd {Invalid angle style} :dt The choice of angle style is unknown. :dd {Invalid angle table length} :dt Length must be 2 or greater. :dd {Invalid angle type in Angles section of data file} :dt Angle type must be positive integer and within range of specified angle types. :dd {Invalid angle type index for fix shake} :dt Self-explanatory. :dd -{Invalid argument for fix nphug} :dt - -UNDOCUMENTED :dd - {Invalid atom ID in Angles section of data file} :dt Atom IDs must be positive integers and within range of defined atoms. :dd {Invalid atom ID in Atoms section of data file} :dt Atom IDs must be positive integers. :dd {Invalid atom ID in Bonds section of data file} :dt Atom IDs must be positive integers and within range of defined atoms. :dd {Invalid atom ID in Bonus section of data file} :dt -UNDOCUMENTED :dd +Atom IDs must be positive integers and within range of defined +atoms. :dd {Invalid atom ID in Dihedrals section of data file} :dt Atom IDs must be positive integers and within range of defined atoms. :dd {Invalid atom ID in Impropers section of data file} :dt Atom IDs must be positive integers and within range of defined atoms. :dd {Invalid atom ID in Velocities section of data file} :dt Atom IDs must be positive integers and within range of defined atoms. :dd {Invalid atom mass for fix shake} :dt Mass specified in fix shake command must be > 0.0. :dd {Invalid atom style} :dt The choice of atom style is unknown. :dd {Invalid atom type in Atoms section of data file} :dt Atom types must range from 1 to specified # of types. :dd {Invalid atom type in create_atoms command} :dt The create_box command specified the range of valid atom types. An invalid type is being requested. :dd {Invalid atom type in fix GCMC command} :dt UNDOCUMENTED :dd {Invalid atom type in fix bond/create command} :dt Self-explanatory. :dd {Invalid atom type in neighbor exclusion list} :dt Atom types must range from 1 to Ntypes inclusive. :dd {Invalid atom type index for fix shake} :dt Atom types must range from 1 to Ntypes inclusive. :dd {Invalid atom types in pair_write command} :dt Atom types must range from 1 to Ntypes inclusive. :dd {Invalid atom vector in variable formula} :dt The atom vector is not recognized. :dd {Invalid attribute in dump custom command} :dt Self-explantory. :dd {Invalid attribute in dump local command} :dt Self-explantory. :dd {Invalid attribute in dump modify command} :dt Self-explantory. :dd {Invalid bond style} :dt The choice of bond style is unknown. :dd {Invalid bond table length} :dt Length must be 2 or greater. :dd {Invalid bond type in Bonds section of data file} :dt Bond type must be positive integer and within range of specified bond types. :dd {Invalid bond type in fix bond/break command} :dt Self-explanatory. :dd {Invalid bond type in fix bond/create command} :dt Self-explanatory. :dd {Invalid bond type index for fix shake} :dt Self-explanatory. Check the fix shake command in the input script. :dd {Invalid coeffs for this dihedral style} :dt Cannot set class 2 coeffs in data file for this dihedral style. :dd {Invalid color in dump_modify command} :dt -UNDOCUMENTED :dd - -{Invalid color map in dump_modify command} :dt - -UNDOCUMENTED :dd +The specified color name was not in the list of recognized colors. +See the dump_modify doc page. :dd {Invalid command-line argument} :dt One or more command-line arguments is invalid. Check the syntax of the command you are using to launch LAMMPS. :dd {Invalid compute ID in variable formula} :dt The compute is not recognized. :dd {Invalid compute style} :dt Self-explanatory. :dd {Invalid cutoff in communicate command} :dt Specified cutoff must be >= 0.0. :dd {Invalid cutoffs in pair_write command} :dt Inner cutoff must be larger than 0.0 and less than outer cutoff. :dd {Invalid d1 or d2 value for pair colloid coeff} :dt Neither d1 or d2 can be < 0. :dd {Invalid data file section: Angle Coeffs} :dt Atom style does not allow angles. :dd {Invalid data file section: AngleAngle Coeffs} :dt Atom style does not allow impropers. :dd {Invalid data file section: AngleAngleTorsion Coeffs} :dt Atom style does not allow dihedrals. :dd {Invalid data file section: AngleTorsion Coeffs} :dt Atom style does not allow dihedrals. :dd {Invalid data file section: Angles} :dt Atom style does not allow angles. :dd {Invalid data file section: Bond Coeffs} :dt Atom style does not allow bonds. :dd {Invalid data file section: BondAngle Coeffs} :dt Atom style does not allow angles. :dd {Invalid data file section: BondBond Coeffs} :dt Atom style does not allow angles. :dd {Invalid data file section: BondBond13 Coeffs} :dt Atom style does not allow dihedrals. :dd {Invalid data file section: Bonds} :dt Atom style does not allow bonds. :dd {Invalid data file section: Dihedral Coeffs} :dt Atom style does not allow dihedrals. :dd {Invalid data file section: Dihedrals} :dt Atom style does not allow dihedrals. :dd {Invalid data file section: Ellipsoids} :dt -UNDOCUMENTED :dd +Atom style does not allow ellipsoids. :dd {Invalid data file section: EndBondTorsion Coeffs} :dt Atom style does not allow dihedrals. :dd {Invalid data file section: Improper Coeffs} :dt Atom style does not allow impropers. :dd {Invalid data file section: Impropers} :dt Atom style does not allow impropers. :dd {Invalid data file section: Lines} :dt -UNDOCUMENTED :dd +Atom style does not allow lines. :dd {Invalid data file section: MiddleBondTorsion Coeffs} :dt Atom style does not allow dihedrals. :dd {Invalid data file section: Triangles} :dt -UNDOCUMENTED :dd +Atom style does not allow triangles. :dd {Invalid delta_conf in tad command} :dt The value must be between 0 and 1 inclusive. :dd {Invalid density in Atoms section of data file} :dt Density value cannot be <= 0.0. :dd {Invalid diameter in set command} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Invalid dihedral style} :dt The choice of dihedral style is unknown. :dd {Invalid dihedral type in Dihedrals section of data file} :dt Dihedral type must be positive integer and within range of specified dihedral types. :dd {Invalid dipole length in set command} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Invalid dump dcd filename} :dt Filenames used with the dump dcd style cannot be binary or compressed or cause multiple files to be written. :dd {Invalid dump frequency} :dt Dump frequency must be 1 or greater. :dd -{Invalid dump image color range} :dt - -UNDOCUMENTED :dd - {Invalid dump image element name} :dt -UNDOCUMENTED :dd +The specified element name was not in the standard list of elements. +See the dump_modify doc page. :dd {Invalid dump image filename} :dt -UNDOCUMENTED :dd +The file produced by dump image cannot be binary and must +be for a single processor. :dd {Invalid dump image persp value} :dt -UNDOCUMENTED :dd +Persp value must be >= 0.0. :dd {Invalid dump image theta value} :dt -UNDOCUMENTED :dd - -{Invalid dump image up vector} :dt - -UNDOCUMENTED :dd +Theta must be between 0.0 and 180.0 inclusive. :dd {Invalid dump image zoom value} :dt -UNDOCUMENTED :dd +Zoom value must be > 0.0. :dd {Invalid dump style} :dt The choice of dump style is unknown. :dd {Invalid dump xtc filename} :dt Filenames used with the dump xtc style cannot be binary or compressed or cause multiple files to be written. :dd {Invalid dump xyz filename} :dt Filenames used with the dump xyz style cannot be binary or cause files to be written by each processor. :dd {Invalid dump_modify threshhold operator} :dt Operator keyword used for threshold specification in not recognized. :dd -{Invalid entry in reorder file} :dt +{Invalid entry in -reorder file} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Invalid fix ID in variable formula} :dt The fix is not recognized. :dd {Invalid fix ave/time off column} :dt Self-explantory. :dd {Invalid fix box/relax command for a 2d simulation} :dt Fix box/relax styles involving the z dimension cannot be used in a 2d simulation. :dd {Invalid fix box/relax command pressure settings} :dt If multiple dimensions are coupled, those dimensions must be specified. :dd {Invalid fix box/relax pressure settings} :dt Settings for coupled dimensions must be the same. :dd {Invalid fix nvt/npt/nph command for a 2d simulation} :dt Cannot control z dimension in a 2d model. :dd {Invalid fix nvt/npt/nph command pressure settings} :dt If multiple dimensions are coupled, those dimensions must be specified. :dd {Invalid fix nvt/npt/nph pressure settings} :dt Settings for coupled dimensions must be the same. :dd {Invalid fix press/berendsen for a 2d simulation} :dt The z component of pressure cannot be controlled for a 2d model. :dd {Invalid fix press/berendsen pressure settings} :dt Settings for coupled dimensions must be the same. :dd {Invalid fix style} :dt The choice of fix style is unknown. :dd {Invalid flag in force field section of restart file} :dt Unrecognized entry in restart file. :dd {Invalid flag in header section of restart file} :dt Unrecognized entry in restart file. :dd {Invalid flag in type arrays section of restart file} :dt Unrecognized entry in restart file. :dd {Invalid frequency in temper command} :dt Nevery must be > 0. :dd {Invalid group ID in neigh_modify command} :dt A group ID used in the neigh_modify command does not exist. :dd {Invalid group function in variable formula} :dt Group function is not recognized. :dd {Invalid group in communicate command} :dt Self-explanatory. :dd +{Invalid image color range} :dt + +The lo value in the range is larger than the hi value. :dd + +{Invalid image up vector} :dt + +Up vector cannot be (0,0,0). :dd + {Invalid improper style} :dt The choice of improper style is unknown. :dd {Invalid improper type in Impropers section of data file} :dt Improper type must be positive integer and within range of specified improper types. :dd {Invalid keyword in angle table parameters} :dt Self-explanatory. :dd {Invalid keyword in bond table parameters} :dt Self-explanatory. :dd {Invalid keyword in compute angle/local command} :dt Self-explanatory. :dd {Invalid keyword in compute bond/local command} :dt Self-explanatory. :dd {Invalid keyword in compute dihedral/local command} :dt Self-explanatory. :dd {Invalid keyword in compute improper/local command} :dt Self-explanatory. :dd {Invalid keyword in compute pair/local command} :dt Self-explanatory. :dd {Invalid keyword in compute property/atom command} :dt Self-explanatory. :dd {Invalid keyword in compute property/local command} :dt Self-explanatory. :dd {Invalid keyword in compute property/molecule command} :dt Self-explanatory. :dd {Invalid keyword in dump cfg command} :dt Self-explanatory. :dd {Invalid keyword in pair table parameters} :dt Keyword used in list of table parameters is not recognized. :dd {Invalid keyword in thermo_style custom command} :dt One or more specified keywords are not recognized. :dd {Invalid kspace style} :dt The choice of kspace style is unknown. :dd {Invalid length in set command} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Invalid mass in set command} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Invalid mass line in data file} :dt Self-explanatory. :dd {Invalid mass value} :dt Self-explanatory. :dd {Invalid math function in variable formula} :dt Self-explanatory. :dd {Invalid math/group/special function in variable formula} :dt Self-explanatory. :dd {Invalid option in lattice command for non-custom style} :dt Certain lattice keywords are not supported unless the lattice style is "custom". :dd {Invalid order of forces within respa levels} :dt For respa, ordering of force computations within respa levels must obey certain rules. E.g. bonds cannot be compute less frequently than angles, pairwise forces cannot be computed less frequently than kspace, etc. :dd {Invalid pair style} :dt The choice of pair style is unknown. :dd {Invalid pair table cutoff} :dt Cutoffs in pair_coeff command are not valid with read-in pair table. :dd {Invalid pair table length} :dt Length of read-in pair table is invalid :dd {Invalid partitions in processors part command} :dt -UNDOCUMENTED :dd +Valid partitions are numbered 1 to N and the sender and receiver +cannot be the same partition. :dd {Invalid radius in Atoms section of data file} :dt Radius must be >= 0.0. :dd {Invalid random number seed in fix ttm command} :dt Random number seed must be > 0. :dd {Invalid random number seed in set command} :dt Random number seed must be > 0. :dd {Invalid region style} :dt The choice of region style is unknown. :dd {Invalid replace values in compute reduce} :dt Self-explanatory. :dd {Invalid run command N value} :dt The number of timesteps must fit in a 32-bit integer. If you want to run for more steps than this, perform multiple shorter runs. :dd {Invalid run command start/stop value} :dt Self-explanatory. :dd {Invalid run command upto value} :dt Self-explanatory. :dd {Invalid seed for Marsaglia random # generator} :dt The initial seed for this random number generator must be a positive integer less than or equal to 900 million. :dd {Invalid seed for Park random # generator} :dt The initial seed for this random number generator must be a positive integer. :dd {Invalid shape in Ellipsoids section of data file} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Invalid shape in Triangles section of data file} :dt -UNDOCUMENTED :dd +Two or more of the triangle corners are duplicate points. :dd {Invalid shape in set command} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Invalid shear direction for fix wall/gran} :dt Self-explanatory. :dd {Invalid special function in variable formula} :dt Self-explanatory. :dd {Invalid style in pair_write command} :dt Self-explanatory. Check the input script. :dd {Invalid syntax in variable formula} :dt Self-explanatory. :dd {Invalid t_event in prd command} :dt Self-explanatory. :dd {Invalid t_event in tad command} :dt The value must be greater than 0. :dd {Invalid thermo keyword in variable formula} :dt The keyword is not recognized. :dd {Invalid tmax in tad command} :dt The value must be greater than 0.0. :dd {Invalid type for mass set} :dt Mass command must set a type from 1-N where N is the number of atom types. :dd {Invalid value in set command} :dt The value specified for the setting is invalid, likely because it is too small or too large. :dd {Invalid variable evaluation in variable formula} :dt A variable used in a formula could not be evaluated. :dd {Invalid variable in next command} :dt Self-explanatory. :dd {Invalid variable name} :dt Variable name used in an input script line is invalid. :dd {Invalid variable name in variable formula} :dt Variable name is not recognized. :dd {Invalid variable style with next command} :dt Variable styles {equal} and {world} cannot be used in a next command. :dd {Invalid wiggle direction for fix wall/gran} :dt Self-explanatory. :dd {Invoked angle equil angle on angle style none} :dt Self-explanatory. :dd {Invoked angle single on angle style none} :dt Self-explanatory. :dd {Invoked bond equil distance on bond style none} :dt Self-explanatory. :dd {Invoked bond single on bond style none} :dt Self-explanatory. :dd {Invoked pair single on pair style none} :dt A command (e.g. a dump) attempted to invoke the single() function on a pair style none, which is illegal. You are probably attempting to compute per-atom quantities with an undefined pair style. :dd +{KIM initialization failed} :dt + +This is an error return from the KIM library. :dd + +{KIM neighbor iterator exceeded range} :dt + +This error should not normally occur if the KIM library is working +correctly. :dd + +{KIM_DIR environement variable is unset} :dt + +The KIM library requires that this environment variable be set before +running LAMMPS> :dd + {KSpace style has not yet been set} :dt Cannot use kspace_modify command until a kspace style is set. :dd {KSpace style is incompatible with Pair style} :dt Setting a kspace style requires that a pair style with a long-range Coulombic component be selected. :dd {Keyword %s in MEAM parameter file not recognized} :dt Self-explanatory. :dd {Kspace style pppm/tip4p requires newton on} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Kspace style requires atom attribute q} :dt The atom style defined does not have these attributes. :dd {Label wasn't found in input script} :dt Self-explanatory. :dd {Lattice orient vectors are not orthogonal} :dt The three specified lattice orientation vectors must be mutually orthogonal. :dd {Lattice orient vectors are not right-handed} :dt The three specified lattice orientation vectors must create a right-handed coordinate system such that a1 cross a2 = a3. :dd {Lattice primitive vectors are collinear} :dt The specified lattice primitive vectors do not for a unit cell with non-zero volume. :dd {Lattice settings are not compatible with 2d simulation} :dt One or more of the specified lattice vectors has a non-zero z component. :dd {Lattice spacings are invalid} :dt Each x,y,z spacing must be > 0. :dd {Lattice style incompatible with simulation dimension} :dt 2d simulation can use sq, sq2, or hex lattice. 3d simulation can use sc, bcc, or fcc lattice. :dd {Log of zero/negative value in variable formula} :dt Self-explanatory. :dd -{Lost atoms via displace_atoms: original %ld current %ld} :dt - -UNDOCUMENTED :dd - -{Lost atoms via displace_box: original %ld current %ld} :dt +{Lost atoms via balance: original %ld current %ld} :dt -UNDOCUMENTED :dd +This should not occur. Report the problem to the developers. :dd {Lost atoms: original %ld current %ld} :dt -UNDOCUMENTED :dd +Lost atoms are checked for each time thermo output is done. See the +thermo_modify lost command for options. Lost atoms usually indicate +bad dynamics, e.g. atoms have been blown far out of the simulation +box, or moved futher than one processor's sub-domain away before +reneighboring. :dd {MEAM library error %d} :dt A call to the MEAM Fortran library returned an error. :dd {MPI_LMP_BIGINT and bigint in lmptype.h are not compatible} :dt The size of the MPI datatype does not match the size of a bigint. :dd {MPI_LMP_TAGINT and tagint in lmptype.h are not compatible} :dt The size of the MPI datatype does not match the size of a tagint. :dd {Mass command before simulation box is defined} :dt The mass command cannot be used before a read_data, read_restart, or create_box command. :dd {Min_style command before simulation box is defined} :dt The min_style command cannot be used before a read_data, read_restart, or create_box command. :dd {Minimization could not find thermo_pe compute} :dt This compute is created by the thermo command. It must have been explicitly deleted by a uncompute command. :dd {Minimize command before simulation box is defined} :dt The minimize command cannot be used before a read_data, read_restart, or create_box command. :dd {Mismatched brackets in variable} :dt Self-explanatory. :dd {Mismatched compute in variable formula} :dt A compute is referenced incorrectly or a compute that produces per-atom values is used in an equal-style variable formula. :dd {Mismatched fix in variable formula} :dt A fix is referenced incorrectly or a fix that produces per-atom values is used in an equal-style variable formula. :dd {Mismatched variable in variable formula} :dt A variable is referenced incorrectly or an atom-style variable that produces per-atom values is used in an equal-style variable formula. :dd {Molecular data file has too many atoms} :dt These kids of data files are currently limited to a number of atoms that fits in a 32-bit integer. :dd {Molecule count changed in compute atom/molecule} :dt Number of molecules must remain constant over time. :dd {Molecule count changed in compute com/molecule} :dt Number of molecules must remain constant over time. :dd {Molecule count changed in compute gyration/molecule} :dt Number of molecules must remain constant over time. :dd {Molecule count changed in compute msd/molecule} :dt Number of molecules must remain constant over time. :dd {Molecule count changed in compute property/molecule} :dt Number of molecules must remain constant over time. :dd {More than one fix deform} :dt Only one fix deform can be defined at a time. :dd {More than one fix freeze} :dt Only one of these fixes can be defined, since the granular pair potentials access it. :dd {More than one fix shake} :dt Only one fix shake can be defined. :dd {Must define angle_style before Angle Coeffs} :dt Must use an angle_style command before reading a data file that defines Angle Coeffs. :dd {Must define angle_style before BondAngle Coeffs} :dt Must use an angle_style command before reading a data file that defines Angle Coeffs. :dd {Must define angle_style before BondBond Coeffs} :dt Must use an angle_style command before reading a data file that defines Angle Coeffs. :dd {Must define bond_style before Bond Coeffs} :dt Must use a bond_style command before reading a data file that defines Bond Coeffs. :dd {Must define dihedral_style before AngleAngleTorsion Coeffs} :dt Must use a dihedral_style command before reading a data file that defines AngleAngleTorsion Coeffs. :dd {Must define dihedral_style before AngleTorsion Coeffs} :dt Must use a dihedral_style command before reading a data file that defines AngleTorsion Coeffs. :dd {Must define dihedral_style before BondBond13 Coeffs} :dt Must use a dihedral_style command before reading a data file that defines BondBond13 Coeffs. :dd {Must define dihedral_style before Dihedral Coeffs} :dt Must use a dihedral_style command before reading a data file that defines Dihedral Coeffs. :dd {Must define dihedral_style before EndBondTorsion Coeffs} :dt Must use a dihedral_style command before reading a data file that defines EndBondTorsion Coeffs. :dd {Must define dihedral_style before MiddleBondTorsion Coeffs} :dt Must use a dihedral_style command before reading a data file that defines MiddleBondTorsion Coeffs. :dd {Must define improper_style before AngleAngle Coeffs} :dt Must use an improper_style command before reading a data file that defines AngleAngle Coeffs. :dd {Must define improper_style before Improper Coeffs} :dt Must use an improper_style command before reading a data file that defines Improper Coeffs. :dd -{Must define lattice to append_atoms} :dt +{Must define lattice to append/atoms} :dt -UNDOCUMENTED :dd +A lattice must be defined before using this fix. :dd {Must define pair_style before Pair Coeffs} :dt Must use a pair_style command before reading a data file that defines Pair Coeffs. :dd {Must have more than one processor partition to temper} :dt Cannot use the temper command with only one processor partition. Use the -partition command-line option. :dd {Must read Atoms before Angles} :dt The Atoms section of a data file must come before an Angles section. :dd {Must read Atoms before Bonds} :dt The Atoms section of a data file must come before a Bonds section. :dd {Must read Atoms before Dihedrals} :dt The Atoms section of a data file must come before a Dihedrals section. :dd {Must read Atoms before Ellipsoids} :dt -UNDOCUMENTED :dd +The Atoms section of a data file must come before a Ellipsoids +section. :dd {Must read Atoms before Impropers} :dt The Atoms section of a data file must come before an Impropers section. :dd {Must read Atoms before Lines} :dt -UNDOCUMENTED :dd +The Atoms section of a data file must come before a Lines section. :dd {Must read Atoms before Triangles} :dt -UNDOCUMENTED :dd +The Atoms section of a data file must come before a Triangles section. :dd {Must read Atoms before Velocities} :dt The Atoms section of a data file must come before a Velocities section. :dd {Must set both respa inner and outer} :dt Cannot use just the inner or outer option with respa without using the other. :dd {Must shrink-wrap piston boundary} :dt -UNDOCUMENTED :dd +The boundary style of the face where the piston is applied must be of +type s (shrink-wrapped). :dd {Must specify a region in fix deposit} :dt The region keyword must be specified with this fix. :dd {Must specify a region in fix pour} :dt The region keyword must be specified with this fix. :dd {Must use -in switch with multiple partitions} :dt A multi-partition simulation cannot read the input script from stdin. The -in command-line option must be used to specify a file. :dd {Must use a block or cylinder region with fix pour} :dt Self-explanatory. :dd {Must use a block region with fix pour for 2d simulations} :dt Self-explanatory. :dd {Must use a bond style with TIP4P potential} :dt TIP4P potentials assume bond lengths in water are constrained by a fix shake command. :dd {Must use a molecular atom style with fix poems molecule} :dt Self-explanatory. :dd {Must use a z-axis cylinder with fix pour} :dt The axis of the cylinder region used with the fix pour command must be oriented along the z dimension. :dd {Must use an angle style with TIP4P potential} :dt TIP4P potentials assume angles in water are constrained by a fix shake command. :dd {Must use atom style with molecule IDs with fix bond/swap} :dt Self-explanatory. :dd {Must use pair_style comb with fix qeq/comb} :dt Self-explanatory. :dd {Must use variable energy with fix addforce} :dt Must define an energy vartiable when applyting a dynamic force during minimization. :dd {NEB command before simulation box is defined} :dt Self-explanatory. :dd {NEB requires damped dynamics minimizer} :dt Use a different minimization style. :dd {NEB requires use of fix neb} :dt Self-explanatory. :dd {NL ramp in wall/piston only implemented in zlo for now} :dt -UNDOCUMENTED :dd +The ramp keyword can only be used for piston applied to face zlo. :dd {Needed bonus data not in data file} :dt -UNDOCUMENTED :dd +Some atom styles require bonus data. See the read_data doc page for +details. :dd {Needed topology not in data file} :dt The header of the data file indicated that bonds or angles or dihedrals or impropers would be included, but they were not present. :dd {Neigh_modify exclude molecule requires atom attribute molecule} :dt Self-explanatory. :dd {Neigh_modify include group != atom_modify first group} :dt Self-explanatory. :dd {Neighbor delay must be 0 or multiple of every setting} :dt The delay and every parameters set via the neigh_modify command are inconsistent. If the delay setting is non-zero, then it must be a multiple of the every setting. :dd {Neighbor include group not allowed with ghost neighbors} :dt This is a current restriction within LAMMPS. :dd +{Neighbor list overflow, boost neigh_modify one} :dt + +There are too many neighbors of a single atom. Use the neigh_modify +command to increase the max number of neighbors allowed for one atom. +You may also want to boost the page size. :dd + {Neighbor list overflow, boost neigh_modify one or page} :dt There are too many neighbors of a single atom. Use the neigh_modify command to increase the neighbor page size and the max number of neighbors allowed for one atom. :dd {Neighbor multi not yet enabled for ghost neighbors} :dt This is a current restriction within LAMMPS. :dd {Neighbor multi not yet enabled for granular} :dt Self-explanatory. :dd {Neighbor multi not yet enabled for rRESPA} :dt Self-explanatory. :dd {Neighbor page size must be >= 10x the one atom setting} :dt This is required to prevent wasting too much memory. :dd {Neighbors of ghost atoms only allowed for full neighbor lists} :dt This is a current restriction within LAMMPS. :dd {New bond exceeded bonds per atom in fix bond/create} :dt See the read_data command for info on setting the "extra bond per atom" header value to allow for additional bonds to be formed. :dd {New bond exceeded special list size in fix bond/create} :dt See the special_bonds extra command for info on how to leave space in the special bonds list to allow for additional bonds to be formed. :dd {Newton bond change after simulation box is defined} :dt The newton command cannot be used to change the newton bond value after a read_data, read_restart, or create_box command. :dd {No OpenMP support compiled in} :dt -UNDOCUMENTED :dd +An OpenMP flag is set, but LAMMPS was not built with +OpenMP support. :dd {No angle style is defined for compute angle/local} :dt Self-explanatory. :dd {No angles allowed with this atom style} :dt Self-explanatory. Check data file. :dd {No atoms in data file} :dt The header of the data file indicated that atoms would be included, but they were not present. :dd {No basis atoms in lattice} :dt Basis atoms must be defined for lattice style user. :dd {No bond style is defined for compute bond/local} :dt Self-explanatory. :dd {No bonds allowed with this atom style} :dt Self-explanatory. Check data file. :dd {No dihedral style is defined for compute dihedral/local} :dt Self-explanatory. :dd {No dihedrals allowed with this atom style} :dt Self-explanatory. Check data file. :dd {No dump custom arguments specified} :dt The dump custom command requires that atom quantities be specified to output to dump file. :dd {No dump local arguments specified} :dt Self-explanatory. :dd {No ellipsoids allowed with this atom style} :dt -UNDOCUMENTED :dd +Self-explanatory. Check data file. :dd {No fix gravity defined for fix pour} :dt Cannot add poured particles without gravity to move them. :dd {No improper style is defined for compute improper/local} :dt Self-explanatory. :dd {No impropers allowed with this atom style} :dt Self-explanatory. Check data file. :dd {No lines allowed with this atom style} :dt -UNDOCUMENTED :dd +Self-explanatory. Check data file. :dd {No matching element in ADP potential file} :dt -UNDOCUMENTED :dd +The ADP potential file does not contain elements that match the +requested elements. :dd {No matching element in EAM potential file} :dt The EAM potential file does not contain elements that match the requested elements. :dd {No pair hbond/dreiding coefficients set} :dt Self-explanatory. :dd {No pair style defined for compute group/group} :dt Cannot calculate group interactions without a pair style defined. :dd {No pair style is defined for compute pair/local} :dt Self-explanatory. :dd {No pair style is defined for compute property/local} :dt Self-explanatory. :dd {No rigid bodies defined} :dt The fix specification did not end up defining any rigid bodies. :dd {No triangles allowed with this atom style} :dt -UNDOCUMENTED :dd +Self-explanatory. Check data file. :dd {Non digit character between brackets in variable} :dt Self-explantory. :dd {Non integer # of swaps in temper command} :dt Swap frequency in temper command must evenly divide the total # of timesteps. :dd -{Nprocs not a multiple of N for -reorder} :dt +{Not allocate memory eam/gpu pair style} :dt UNDOCUMENTED :dd +{Nprocs not a multiple of N for -reorder} :dt + +Self-explanatory. :dd + {Numeric index is out of bounds} :dt -UNDOCUMENTED :dd +A command with an argument that specifies an integer or range of +integers is using a value that is less than 1 or greater than the +maximum allowed limit. :dd {One or more atoms belong to multiple rigid bodies} :dt Two or more rigid bodies defined by the fix rigid command cannot contain the same atom. :dd {One or zero atoms in rigid body} :dt Any rigid body defined by the fix rigid command must contain 2 or more atoms. :dd -{Only zhi currently implemented for append_atom} :dt - -UNDOCUMENTED :dd - -{Only zhi currently implemented for append_atoms} :dt +{Only zhi currently implemented for fix append/atoms} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Out of memory on GPGPU} :dt -UNDOCUMENTED :dd +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. :dd {Out of range atoms - cannot compute PPPM} :dt One or more atoms are attempting to map their charge to a PPPM grid point that is not owned by a processor. This is likely for one of two reasons, both of them bad. First, it may mean that an atom near the boundary of a processor's sub-domain has moved more than 1/2 the "neighbor skin distance"_neighbor.html without neighbor lists being rebuilt and atoms being migrated to new processors. This also means you may be missing pairwise interactions that need to be computed. The solution is to change the re-neighboring criteria via the "neigh_modify"_neigh_modify command. The safest settings are "delay 0 every 1 check yes". Second, it may mean that an atom has moved far outside a processor's sub-domain or even the entire simulation box. This indicates bad physics, e.g. due to highly overlapping atoms, too large a timestep, etc. :dd {Overlapping large/large in pair colloid} :dt This potential is infinite when there is an overlap. :dd {Overlapping small/large in pair colloid} :dt This potential is inifinte when there is an overlap. :dd {POEMS fix must come before NPT/NPH fix} :dt NPT/NPH fix must be defined in input script after all poems fixes, else the fix contribution to the pressure virial is incorrect. :dd {PPPM grid is too large} :dt The global PPPM grid is larger than OFFSET in one or more dimensions. OFFSET is currently set to 4096. You likely need to decrease the requested precision. :dd {PPPM order cannot be greater than %d} :dt Self-explanatory. :dd {PPPM order has been reduced to 0} :dt LAMMPS has attempted to reduce the PPPM order to enable the simulation to run, but can reduce the order no further. Try increasing the accuracy of PPPM by reducing the tolerance size, thus inducing a larger PPPM grid. :dd {PRD command before simulation box is defined} :dt The prd command cannot be used before a read_data, read_restart, or create_box command. :dd {PRD nsteps must be multiple of t_event} :dt Self-explanatory. :dd {PRD t_corr must be multiple of t_event} :dt Self-explanatory. :dd +{PWD environement variable is unset} :dt + +The KIM library requires that this environment variable be set before +running LAMMPS> :dd + {Package command after simulation box is defined} :dt -UNDOCUMENTED :dd +The package command cannot be used afer a read_data, read_restart, or +create_box command. :dd {Package cuda command without USER-CUDA installed} :dt -UNDOCUMENTED :dd +The USER-CUDA package must be installed via "make yes-user-cuda" +before LAMMPS is built. :dd {Pair brownian requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair brownian requires extended particles} :dt -UNDOCUMENTED :dd +One of the particles has radius 0.0. :dd {Pair brownian requires monodisperse particles} :dt -UNDOCUMENTED :dd +All particles must be the same finite size. :dd {Pair brownian/poly requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair brownian/poly requires extended particles} :dt -UNDOCUMENTED :dd +One of the particles has radius 0.0. :dd {Pair brownian/poly requires newton pair off} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair coeff for hybrid has invalid style} :dt Style in pair coeff must have been listed in pair_style command. :dd {Pair coul/wolf requires atom attribute q} :dt -UNDOCUMENTED :dd +The atom style defined does not have this attribute. :dd {Pair cutoff < Respa interior cutoff} :dt One or more pairwise cutoffs are too short to use with the specified rRESPA cutoffs. :dd {Pair dipole/cut requires atom attributes q, mu, torque} :dt -UNDOCUMENTED :dd +The atom style defined does not have these attributes. :dd {Pair distance < table inner cutoff} :dt Two atoms are closer together than the pairwise table allows. :dd {Pair distance > table outer cutoff} :dt Two atoms are further apart than the pairwise table allows. :dd {Pair dpd requires ghost atoms store velocity} :dt Use the communicate vel yes command to enable this. :dd {Pair gayberne epsilon a,b,c coeffs are not all set} :dt Each atom type involved in pair_style gayberne must have these 3 coefficients set at least once. :dd {Pair gayberne requires atom style ellipsoid} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair gayberne requires atoms with same type have same shape} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair gayberne/gpu requires atom style ellipsoid} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair gayberne/gpu requires atoms with same type have same shape} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair granular requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair granular requires ghost atoms store velocity} :dt Use the communicate vel yes command to enable this. :dd {Pair granular with shear history requires newton pair off} :dt This is a current restriction of the implementation of pair granular styles with history. :dd {Pair hybrid sub-style does not support single call} :dt You are attempting to invoke a single() call on a pair style that doesn't support it. :dd {Pair hybrid sub-style is not used} :dt No pair_coeff command used a sub-style specified in the pair_style command. :dd {Pair inner cutoff < Respa interior cutoff} :dt One or more pairwise cutoffs are too short to use with the specified rRESPA cutoffs. :dd {Pair inner cutoff >= Pair outer cutoff} :dt The specified cutoffs for the pair style are inconsistent. :dd {Pair line/lj requires atom style line} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair lubricate requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair lubricate requires ghost atoms store velocity} :dt Use the communicate vel yes command to enable this. :dd {Pair lubricate requires monodisperse particles} :dt -UNDOCUMENTED :dd +All particles must be the same finite size. :dd {Pair lubricate/poly requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair lubricate/poly requires extended particles} :dt -UNDOCUMENTED :dd +One of the particles has radius 0.0. :dd {Pair lubricate/poly requires ghost atoms store velocity} :dt -UNDOCUMENTED :dd +Use the communicate vel yes command to enable this. :dd {Pair lubricate/poly requires newton pair off} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair lubricateU requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair lubricateU requires ghost atoms store velocity} :dt -UNDOCUMENTED :dd +Use the communicate vel yes command to enable this. :dd {Pair lubricateU requires monodisperse particles} :dt -UNDOCUMENTED :dd +All particles must be the same finite size. :dd {Pair lubricateU/poly requires ghost atoms store velocity} :dt -UNDOCUMENTED :dd +Use the communicate vel yes command to enable this. :dd {Pair lubricateU/poly requires newton pair off} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair peri lattice is not identical in x, y, and z} :dt The lattice defined by the lattice command must be cubic. :dd {Pair peri requires a lattice be defined} :dt Use the lattice command for this purpose. :dd {Pair peri requires an atom map, see atom_modify} :dt Even for atomic systems, an atom map is required to find Peridynamic bonds. Use the atom_modify command to define one. :dd {Pair resquared epsilon a,b,c coeffs are not all set} :dt Self-explanatory. :dd {Pair resquared epsilon and sigma coeffs are not all set} :dt Self-explanatory. :dd {Pair resquared requires atom style ellipsoid} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd + +{Pair resquared requires atoms with same type have same shape} :dt + +Self-explanatory. :dd {Pair resquared/gpu requires atom style ellipsoid} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair resquared/gpu requires atoms with same type have same shape} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair style AIREBO requires atom IDs} :dt This is a requirement to use the AIREBO potential. :dd {Pair style AIREBO requires newton pair on} :dt See the newton command. This is a restriction to use the AIREBO potential. :dd {Pair style COMB requires atom IDs} :dt This is a requirement to use the AIREBO potential. :dd {Pair style COMB requires atom attribute q} :dt Self-explanatory. :dd {Pair style COMB requires newton pair on} :dt See the newton command. This is a restriction to use the COMB potential. :dd {Pair style MEAM requires newton pair on} :dt See the newton command. This is a restriction to use the MEAM potential. :dd {Pair style Stillinger-Weber requires atom IDs} :dt This is a requirement to use the SW potential. :dd {Pair style Stillinger-Weber requires newton pair on} :dt See the newton command. This is a restriction to use the SW potential. :dd {Pair style Tersoff requires atom IDs} :dt This is a requirement to use the Tersoff potential. :dd {Pair style Tersoff requires newton pair on} :dt See the newton command. This is a restriction to use the Tersoff potential. :dd -{Pair style born/coul/Wolf requires atom attribute q} :dt - -UNDOCUMENTED :dd - {Pair style born/coul/long requires atom attribute q} :dt An atom style that defines this attribute must be used. :dd +{Pair style born/coul/wolf requires atom attribute q} :dt + +The atom style defined does not have this attribute. :dd + {Pair style buck/coul/cut requires atom attribute q} :dt The atom style defined does not have this attribute. :dd {Pair style buck/coul/long requires atom attribute q} :dt The atom style defined does not have these attributes. :dd +{Pair style buck/coul/long/gpu requires atom attribute q} :dt + +The atom style defined does not have this attribute. :dd + {Pair style coul/cut requires atom attribute q} :dt The atom style defined does not have these attributes. :dd {Pair style coul/long/gpu requires atom attribute q} :dt -UNDOCUMENTED :dd +The atom style defined does not have these attributes. :dd -{Pair style does not have single field requested by compute pair/local} :dt +{Pair style does not have extra field requested by compute pair/local} :dt -UNDOCUMENTED :dd +The pair style does not support the pN value requested by the compute +pair/local command. :dd {Pair style does not support bond_style quartic} :dt The pair style does not have a single() function, so it can not be invoked by bond_style quartic. :dd {Pair style does not support compute group/group} :dt The pair_style does not have a single() function, so it cannot be invokded by the compute group/group command. :dd {Pair style does not support compute pair/local} :dt The pair style does not have a single() function, so it can -not be invoked by fix bond/swap. :dd +not be invoked by compute pair/local. :dd {Pair style does not support compute property/local} :dt The pair style does not have a single() function, so it can not be invoked by fix bond/swap. :dd {Pair style does not support fix bond/swap} :dt The pair style does not have a single() function, so it can not be invoked by fix bond/swap. :dd {Pair style does not support pair_write} :dt The pair style does not have a single() function, so it can not be invoked by pair write. :dd {Pair style does not support rRESPA inner/middle/outer} :dt You are attempting to use rRESPA options with a pair style that does not support them. :dd {Pair style granular with history requires atoms have IDs} :dt Atoms in the simulation do not have IDs, so history effects cannot be tracked by the granular pair potential. :dd {Pair style hbond/dreiding requires an atom map, see atom_modify} :dt Self-explanatory. :dd {Pair style hbond/dreiding requires atom IDs} :dt Self-explanatory. :dd {Pair style hbond/dreiding requires molecular system} :dt Self-explanatory. :dd {Pair style hbond/dreiding requires newton pair on} :dt See the newton command for details. :dd {Pair style hybrid cannot have hybrid as an argument} :dt Self-explanatory. :dd {Pair style hybrid cannot have none as an argument} :dt Self-explanatory. :dd -{Pair style hybrid cannot use same pair style twice} :dt - -The sub-style arguments of pair_style hybrid cannot be duplicated. -Check the input script. :dd - {Pair style is incompatible with KSpace style} :dt If a pair style with a long-range Coulombic component is selected, then a kspace style must also be used. :dd +{Pair style kim requires newton pair off} :dt + +Self-explanatory. :dd + {Pair style lj/charmm/coul/charmm requires atom attribute q} :dt The atom style defined does not have these attributes. :dd {Pair style lj/charmm/coul/long requires atom attribute q} :dt The atom style defined does not have these attributes. :dd {Pair style lj/charmm/coul/long/gpu requires atom attribute q} :dt -UNDOCUMENTED :dd +The atom style defined does not have this attribute. :dd {Pair style lj/class2/coul/cut requires atom attribute q} :dt The atom style defined does not have this attribute. :dd {Pair style lj/class2/coul/long requires atom attribute q} :dt The atom style defined does not have this attribute. :dd {Pair style lj/class2/coul/long/gpu requires atom attribute q} :dt -UNDOCUMENTED :dd +The atom style defined does not have this attribute. :dd {Pair style lj/cut/coul/cut requires atom attribute q} :dt The atom style defined does not have this attribute. :dd {Pair style lj/cut/coul/cut/gpu requires atom attribute q} :dt -UNDOCUMENTED :dd +The atom style defined does not have this attribute. :dd {Pair style lj/cut/coul/long requires atom attribute q} :dt The atom style defined does not have this attribute. :dd {Pair style lj/cut/coul/long/gpu requires atom attribute q} :dt -UNDOCUMENTED :dd +The atom style defined does not have this attribute. :dd {Pair style lj/cut/coul/long/tip4p requires atom IDs} :dt There are no atom IDs defined in the system and the TIP4P potential requires them to find O,H atoms with a water molecule. :dd {Pair style lj/cut/coul/long/tip4p requires atom attribute q} :dt The atom style defined does not have these attributes. :dd {Pair style lj/cut/coul/long/tip4p requires newton pair on} :dt This is because the computation of constraint forces within a water molecule adds forces to atoms owned by other processors. :dd {Pair style lj/gromacs/coul/gromacs requires atom attribute q} :dt An atom_style with this attribute is needed. :dd +{Pair style lj/sdk/coul/long/gpu requires atom attribute q} :dt + +The atom style defined does not have this attribute. :dd + {Pair style peri requires atom style peri} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair style reax requires atom IDs} :dt This is a requirement to use the ReaxFF potential. :dd {Pair style reax requires newton pair on} :dt This is a requirement to use the ReaxFF potential. :dd {Pair table cutoffs must all be equal to use with KSpace} :dt When using pair style table with a long-range KSpace solver, the cutoffs for all atom type pairs must all be the same, since the long-range solver starts at that cutoff. :dd {Pair table parameters did not set N} :dt List of pair table parameters must include N setting. :dd {Pair tersoff/zbl requires metal or real units} :dt This is a current restriction of this pair potential. :dd {Pair tri/lj requires atom style tri} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair yukawa/colloid requires atom style sphere} :dt -UNDOCUMENTED :dd +Self-explantory. :dd {Pair yukawa/colloid requires atoms with same type have same radius} :dt -UNDOCUMENTED :dd +Self-explantory. :dd {Pair_coeff command before pair_style is defined} :dt Self-explanatory. :dd {Pair_coeff command before simulation box is defined} :dt The pair_coeff command cannot be used before a read_data, read_restart, or create_box command. :dd {Pair_modify command before pair_style is defined} :dt Self-explanatory. :dd {Pair_write command before pair_style is defined} :dt Self-explanatory. :dd {Particle on or inside fix wall surface} :dt Particles must be "exterior" to the wall in order for energy/force to be calculated. :dd {Particle on or inside surface of region used in fix wall/region} :dt Particles must be "exterior" to the region surface in order for energy/force to be calculated. :dd {Per-atom compute in equal-style variable formula} :dt Equal-style variables cannot use per-atom quantities. :dd {Per-atom energy was not tallied on needed timestep} :dt You are using a thermo keyword that requires potentials to have tallied energy, but they didn't on this timestep. See the variable doc page for ideas on how to make this work. :dd {Per-atom fix in equal-style variable formula} :dt Equal-style variables cannot use per-atom quantities. :dd {Per-atom virial was not tallied on needed timestep} :dt You are using a thermo keyword that requires potentials to have tallied the virial, but they didn't on this timestep. See the variable doc page for ideas on how to make this work. :dd {Per-processor system is too big} :dt The number of owned atoms plus ghost atoms on a single processor must fit in 32-bit integer. :dd {Potential energy ID for fix neb does not exist} :dt Self-explanatory. :dd {Potential energy ID for fix nvt/nph/npt does not exist} :dt -UNDOCUMENTED :dd +A compute for potential energy must be defined. :dd {Potential file has duplicate entry} :dt The potential file for a SW or Tersoff potential has more than one entry for the same 3 ordered elements. :dd {Potential file is missing an entry} :dt The potential file for a SW or Tersoff potential does not have a needed entry. :dd {Power by 0 in variable formula} :dt Self-explanatory. :dd {Pressure ID for fix box/relax does not exist} :dt The compute ID needed to compute pressure for the fix does not exist. :dd {Pressure ID for fix modify does not exist} :dt Self-explanatory. :dd {Pressure ID for fix npt/nph does not exist} :dt Self-explanatory. :dd {Pressure ID for fix press/berendsen does not exist} :dt The compute ID needed to compute pressure for the fix does not exist. :dd {Pressure ID for thermo does not exist} :dt The compute ID needed to compute pressure for thermodynamics does not exist. :dd {Pressure control can not be used with fix nvt} :dt Self-explanatory. :dd {Pressure control can not be used with fix nvt/asphere} :dt Self-explanatory. :dd {Pressure control can not be used with fix nvt/sllod} :dt Self-explanatory. :dd {Pressure control can not be used with fix nvt/sphere} :dt Self-explanatory. :dd {Pressure control must be used with fix nph} :dt Self-explanatory. :dd {Pressure control must be used with fix nph/asphere} :dt Self-explanatory. :dd {Pressure control must be used with fix nph/sphere} :dt Self-explanatory. :dd {Pressure control must be used with fix nphug} :dt -UNDOCUMENTED :dd +A pressure control keyword (iso, aniso, tri, x, y, or z) must be +provided. :dd {Pressure control must be used with fix npt} :dt Self-explanatory. :dd {Pressure control must be used with fix npt/asphere} :dt Self-explanatory. :dd {Pressure control must be used with fix npt/sphere} :dt Self-explanatory. :dd {Processor count in z must be 1 for 2d simulation} :dt Self-explanatory. :dd {Processor partitions are inconsistent} :dt The total number of processors in all partitions must match the number of processors LAMMPS is running on. :dd {Processors command after simulation box is defined} :dt The processors command cannot be used after a read_data, read_restart, or create_box command. :dd {Processors custom grid file is inconsistent} :dt -UNDOCUMENTED :dd - -{Processors custom grid file is invalid} :dt - -UNDOCUMENTED :dd +The vales in the custom file are not consistent with the number of +processors you are running on or the Px,Py,Pz settings of the +processors command. Or there was not a setting for every processor. :dd {Processors grid numa and map style are incompatible} :dt -UNDOCUMENTED :dd +Using numa for gstyle in the processors command requires using +cart for the map option. :dd {Processors part option and grid style are incompatible} :dt -UNDOCUMENTED :dd +Cannot use gstyle numa or custom with the part option. :dd {Processors twogrid requires proc count be a multiple of core count} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd + +{Pstart and Pstop must have the same value} :dt + +Self-explanatory. :dd {R0 < 0 for fix spring command} :dt Equilibrium spring length is invalid. :dd {Reax_defs.h setting for NATDEF is too small} :dt Edit the setting in the ReaxFF library and re-compile the library and re-build LAMMPS. :dd {Reax_defs.h setting for NNEIGHMAXDEF is too small} :dt Edit the setting in the ReaxFF library and re-compile the library and re-build LAMMPS. :dd {Receiving partition in processors part command is already a receiver} :dt -UNDOCUMENTED :dd +Cannot specify a partition to be a receiver twice. :dd {Region ID for compute reduce/region does not exist} :dt Self-explanatory. :dd {Region ID for compute temp/region does not exist} :dt Self-explanatory. :dd {Region ID for dump custom does not exist} :dt Self-explanatory. :dd {Region ID for fix addforce does not exist} :dt Self-explanatory. :dd {Region ID for fix ave/spatial does not exist} :dt Self-explanatory. :dd {Region ID for fix aveforce does not exist} :dt Self-explanatory. :dd {Region ID for fix deposit does not exist} :dt Self-explanatory. :dd {Region ID for fix evaporate does not exist} :dt Self-explanatory. :dd {Region ID for fix heat does not exist} :dt Self-explanatory. :dd {Region ID for fix setforce does not exist} :dt Self-explanatory. :dd {Region ID for fix wall/region does not exist} :dt Self-explanatory. :dd {Region ID in variable formula does not exist} :dt Self-explanatory. :dd {Region cannot have 0 length rotation vector} :dt Self-explanatory. :dd {Region intersect region ID does not exist} :dt Self-explanatory. :dd {Region union or intersect cannot be dynamic} :dt The sub-regions can be dynamic, but not the combined region. :dd {Region union region ID does not exist} :dt One or more of the region IDs specified by the region union command does not exist. :dd {Replacing a fix, but new style != old style} :dt A fix ID can be used a 2nd time, but only if the style matches the previous fix. In this case it is assumed you with to reset a fix's parameters. This error may mean you are mistakenly re-using a fix ID when you do not intend to. :dd {Replicate command before simulation box is defined} :dt The replicate command cannot be used before a read_data, read_restart, or create_box command. :dd {Replicate did not assign all atoms correctly} :dt Atoms replicated by the replicate command were not assigned correctly to processors. This is likely due to some atom coordinates being outside a non-periodic simulation box. :dd {Replicated molecular system atom IDs are too big} :dt See the setting for the allowed atom ID size in the src/lmptype.h file. :dd {Replicated system is too big} :dt See the setting for bigint in the src/lmptype.h file. :dd {Resetting timestep is not allowed with fix move} :dt This is because fix move is moving atoms based on elapsed time. :dd {Respa inner cutoffs are invalid} :dt The first cutoff must be <= the second cutoff. :dd {Respa levels must be >= 1} :dt Self-explanatory. :dd {Respa middle cutoffs are invalid} :dt The first cutoff must be <= the second cutoff. :dd {Restrain atoms %d %d %d %d missing on proc %d at step %ld} :dt -UNDOCUMENTED :dd +The 4 atoms in a restrain dihedral specified by the fix restrain +command are not all accessible to a processor. This probably means an +atom has moved too far. :dd {Reuse of compute ID} :dt A compute ID cannot be used twice. :dd {Reuse of dump ID} :dt A dump ID cannot be used twice. :dd {Reuse of region ID} :dt A region ID cannot be used twice. :dd {Rigid body has degenerate moment of inertia} :dt Fix poems will only work with bodies (collections of atoms) that have non-zero principal moments of inertia. This means they must be 3 or more non-collinear atoms, even with joint atoms removed. :dd {Rigid fix must come before NPT/NPH fix} :dt NPT/NPH fix must be defined in input script after all rigid fixes, else the rigid fix contribution to the pressure virial is incorrect. :dd {Rmask function in equal-style variable formula} :dt Rmask is per-atom operation. :dd {Run command before simulation box is defined} :dt The run command cannot be used before a read_data, read_restart, or create_box command. :dd {Run command start value is after start of run} :dt Self-explanatory. :dd {Run command stop value is before end of run} :dt Self-explanatory. :dd {Run_style command before simulation box is defined} :dt The run_style command cannot be used before a read_data, read_restart, or create_box command. :dd {SRD bin size for fix srd differs from user request} :dt -Fix SRD had to adjust the bin size to fit the simulation box. :dd +Fix SRD had to adjust the bin size to fit the simulation box. See the +cubic keyword if you want this message to be an error vs warning. :dd {SRD bins for fix srd are not cubic enough} :dt -The bin shape is not within tolerance of cubic. :dd +The bin shape is not within tolerance of cubic. See the cubic +keyword if you want this message to be an error vs warning. :dd -{SRD particle %d started inside big particle %d on step %ld bounce %d\n} :dt +{SRD particle %d started inside big particle %d on step %ld bounce %d} :dt -UNDOCUMENTED :dd +See the inside keyword if you want this message to be an error vs +warning. :dd {Same dimension twice in fix ave/spatial} :dt Self-explanatory. :dd {Sending partition in processors part command is already a sender} :dt -UNDOCUMENTED :dd +Cannot specify a partition to be a sender twice. :dd {Set command before simulation box is defined} :dt The set command cannot be used before a read_data, read_restart, or create_box command. :dd {Set command with no atoms existing} :dt No atoms are yet defined so the set command cannot be used. :dd {Set region ID does not exist} :dt Region ID specified in set command does not exist. :dd {Shake angles have different bond types} :dt All 3-atom angle-constrained SHAKE clusters specified by the fix shake command that are the same angle type, must also have the same bond types for the 2 bonds in the angle. :dd {Shake atoms %d %d %d %d missing on proc %d at step %ld} :dt The 4 atoms in a single shake cluster specified by the fix shake command are not all accessible to a processor. This probably means -an atom has moved too far. :dd :dd +an atom has moved too far. :dd {Shake atoms %d %d %d missing on proc %d at step %ld} :dt The 3 atoms in a single shake cluster specified by the fix shake command are not all accessible to a processor. This probably means -an atom has moved too far. :dd :dd +an atom has moved too far. :dd {Shake atoms %d %d missing on proc %d at step %ld} :dt The 2 atoms in a single shake cluster specified by the fix shake command are not all accessible to a processor. This probably means -an atom has moved too far. :dd :dd +an atom has moved too far. :dd {Shake cluster of more than 4 atoms} :dt A single cluster specified by the fix shake command can have no more than 4 atoms. :dd {Shake clusters are connected} :dt A single cluster specified by the fix shake command must have a single central atom with up to 3 other atoms bonded to it. :dd {Shake determinant = 0.0} :dt The determinant of the matrix being solved for a single cluster specified by the fix shake command is numerically invalid. :dd {Shake fix must come before NPT/NPH fix} :dt NPT fix must be defined in input script after SHAKE fix, else the SHAKE fix contribution to the pressure virial is incorrect. :dd {Small, tag, big integers are not sized correctly} :dt -UNDOCUMENTED :dd +See description of these 3 data types in src/lmptype.h. :dd {Smallint setting in lmptype.h is invalid} :dt It has to be the size of an integer. :dd {Smallint setting in lmptype.h is not compatible} :dt Smallint stored in restart file is not consistent with LAMMPS version you are running. :dd +{Specified processors != physical processors} :dt + +The 3d grid of processors defined by the processors command does not +match the number of processors LAMMPS is being run on. :dd + +{Specified target stress must be uniaxial or hydrostatic} :dt + +Self-explanatory. :dd + {Sqrt of negative value in variable formula} :dt Self-explanatory. :dd {Substitution for illegal variable} :dt Input script line contained a variable that could not be substituted for. :dd {System in data file is too big} :dt See the setting for bigint in the src/lmptype.h file. :dd {TAD nsteps must be multiple of t_event} :dt Self-explanatory. :dd {TIP4P hydrogen has incorrect atom type} :dt The TIP4P pairwise computation found an H atom whose type does not agree with the specified H type. :dd {TIP4P hydrogen is missing} :dt The TIP4P pairwise computation failed to find the correct H atom within a water molecule. :dd {TMD target file did not list all group atoms} :dt The target file for the fix tmd command did not list all atoms in the fix group. :dd {Tad command before simulation box is defined} :dt Self-explanatory. :dd {Tagint setting in lmptype.h is invalid} :dt Tagint must be as large or larger than smallint. :dd {Tagint setting in lmptype.h is not compatible} :dt Smallint stored in restart file is not consistent with LAMMPS version you are running. :dd {Target temperature for fix nvt/npt/nph cannot be 0.0} :dt Self-explanatory. :dd {Target temperature for fix rigid/nvt cannot be 0.0} :dt Self-explanatory. :dd {Temper command before simulation box is defined} :dt The temper command cannot be used before a read_data, read_restart, or create_box command. :dd {Temperature ID for fix bond/swap does not exist} :dt Self-explanatory. :dd {Temperature ID for fix box/relax does not exist} :dt Self-explanatory. :dd {Temperature ID for fix nvt/nph/npt does not exist} :dt Self-explanatory. :dd {Temperature ID for fix press/berendsen does not exist} :dt Self-explanatory. :dd {Temperature ID for fix temp/berendsen does not exist} :dt Self-explanatory. :dd {Temperature ID for fix temp/rescale does not exist} :dt Self-explanatory. :dd {Temperature control can not be used with fix nph} :dt Self-explanatory. :dd {Temperature control can not be used with fix nph/asphere} :dt Self-explanatory. :dd {Temperature control can not be used with fix nph/sphere} :dt Self-explanatory. :dd {Temperature control must be used with fix nphug} :dt -UNDOCUMENTED :dd +The temp keyword must be provided. :dd {Temperature control must be used with fix npt} :dt Self-explanatory. :dd {Temperature control must be used with fix npt/asphere} :dt Self-explanatory. :dd {Temperature control must be used with fix npt/sphere} :dt Self-explanatory. :dd {Temperature control must be used with fix nvt} :dt Self-explanatory. :dd {Temperature control must be used with fix nvt/asphere} :dt Self-explanatory. :dd {Temperature control must be used with fix nvt/sllod} :dt Self-explanatory. :dd {Temperature control must be used with fix nvt/sphere} :dt Self-explanatory. :dd {Temperature for fix nvt/sllod does not have a bias} :dt The specified compute must compute temperature with a bias. :dd {Tempering could not find thermo_pe compute} :dt This compute is created by the thermo command. It must have been explicitly deleted by a uncompute command. :dd {Tempering fix ID is not defined} :dt The fix ID specified by the temper command does not exist. :dd {Tempering temperature fix is not valid} :dt The fix specified by the temper command is not one that controls temperature (nvt or langevin). :dd +{The package gpu command is required for gpu styles} :dt + +UNDOCUMENTED :dd + {Thermo and fix not computed at compatible times} :dt Fixes generate values on specific timesteps. The thermo output does not match these timesteps. :dd {Thermo compute array is accessed out-of-range} :dt Self-explanatory. :dd {Thermo compute does not compute array} :dt Self-explanatory. :dd {Thermo compute does not compute scalar} :dt Self-explanatory. :dd {Thermo compute does not compute vector} :dt Self-explanatory. :dd {Thermo compute vector is accessed out-of-range} :dt Self-explanatory. :dd {Thermo custom variable cannot be indexed} :dt Self-explanatory. :dd {Thermo custom variable is not equal-style variable} :dt Only equal-style variables can be output with thermodynamics, not atom-style variables. :dd {Thermo every variable returned a bad timestep} :dt The variable must return a timestep greater than the current timestep. :dd {Thermo fix array is accessed out-of-range} :dt Self-explanatory. :dd {Thermo fix does not compute array} :dt Self-explanatory. :dd {Thermo fix does not compute scalar} :dt Self-explanatory. :dd {Thermo fix does not compute vector} :dt Self-explanatory. :dd {Thermo fix vector is accessed out-of-range} :dt Self-explanatory. :dd {Thermo keyword in variable requires lattice be defined} :dt The xlat, ylat, zlat keywords refer to lattice properties. :dd {Thermo keyword in variable requires thermo to use/init pe} :dt You are using a thermo keyword in a variable that requires potential energy to be calculated, but your thermo output does not use it. Add it to your thermo output. :dd {Thermo keyword in variable requires thermo to use/init press} :dt You are using a thermo keyword in a variable that requires pressure to be calculated, but your thermo output does not use it. Add it to your thermo output. :dd {Thermo keyword in variable requires thermo to use/init temp} :dt You are using a thermo keyword in a variable that requires temperature to be calculated, but your thermo output does not use it. Add it to your thermo output. :dd {Thermo keyword requires lattice be defined} :dt The xlat, ylat, zlat keywords refer to lattice properties. :dd {Thermo style does not use press} :dt Cannot use thermo_modify to set this parameter since the thermo_style is not computing this quantity. :dd {Thermo style does not use temp} :dt Cannot use thermo_modify to set this parameter since the thermo_style is not computing this quantity. :dd {Thermo_modify int format does not contain d character} :dt Self-explanatory. :dd {Thermo_modify pressure ID does not compute pressure} :dt The specified compute ID does not compute pressure. :dd {Thermo_modify temperature ID does not compute temperature} :dt The specified compute ID does not compute temperature. :dd {Thermo_style command before simulation box is defined} :dt The thermo_style command cannot be used before a read_data, read_restart, or create_box command. :dd {This variable thermo keyword cannot be used between runs} :dt Keywords that refer to time (such as cpu, elapsed) do not make sense in between runs. :dd {Threshhold for an atom property that isn't allocated} :dt A dump threshhold has been requested on a quantity that is not defined by the atom style used in this simulation. :dd {Timestep must be >= 0} :dt -Specified timestep size is invalid. :dd +Specified timestep is invalid. :dd {Too big a problem to use velocity create loop all} :dt The system size must fit in a 32-bit integer to use this option. :dd {Too big a timestep} :dt -UNDOCUMENTED :dd +Specified timestep is too large. :dd {Too big a timestep for dump dcd} :dt The timestep must fit in a 32-bit integer to use this dump style. :dd {Too big a timestep for dump xtc} :dt The timestep must fit in a 32-bit integer to use this dump style. :dd {Too few bits for lookup table} :dt Table size specified via pair_modify command does not work with your machine's floating point representation. :dd {Too many atom sorting bins} :dt This is likely due to an immense simulation box that has blown up to a large size. :dd {Too many atoms for dump dcd} :dt The system size must fit in a 32-bit integer to use this dump style. :dd {Too many atoms for dump xtc} :dt The system size must fit in a 32-bit integer to use this dump style. :dd {Too many atoms to dump sort} :dt Cannot sort when running with more than 2^31 atoms. :dd {Too many exponent bits for lookup table} :dt Table size specified via pair_modify command does not work with your machine's floating point representation. :dd {Too many groups} :dt The maximum number of atom groups (including the "all" group) is given by MAX_GROUP in group.cpp and is 32. :dd {Too many iterations} :dt You must use a number of iterations that fit in a 32-bit integer for minimization. :dd {Too many local+ghost atoms for neighbor list} :dt -UNDOCUMENTED :dd +The number of nlocal + nghost atoms on a processor +is limited by the size of a 32-bit integer with 2 bits +removed for masking 1-2, 1-3, 1-4 neighbors. :dd {Too many mantissa bits for lookup table} :dt Table size specified via pair_modify command does not work with your machine's floating point representation. :dd {Too many masses for fix shake} :dt The fix shake command cannot list more masses than there are atom types. :dd {Too many neighbor bins} :dt This is likely due to an immense simulation box that has blown up to a large size. :dd {Too many timesteps} :dt -UNDOCUMENTED :dd +The cummulative timesteps must fit in a 64-bit integer. :dd {Too many timesteps for NEB} :dt You must use a number of timesteps that fit in a 32-bit integer for NEB. :dd {Too many total atoms} :dt See the setting for bigint in the src/lmptype.h file. :dd {Too many total bits for bitmapped lookup table} :dt Table size specified via pair_modify command is too large. Note that a value of N generates a 2^N size table. :dd {Too many touching neighbors - boost MAXTOUCH} :dt A granular simulation has too many neighbors touching one atom. The MAXTOUCH parameter in fix_shear_history.cpp must be set larger and LAMMPS must be re-built. :dd {Too much per-proc info for dump} :dt Number of local atoms times number of columns must fit in a 32-bit integer for dump. :dd {Tree structure in joint connections} :dt Fix poems cannot (yet) work with coupled bodies whose joints connect the bodies in a tree structure. :dd -{Triclinic box must be periodic in skewed dimensions} :dt - -This is a requirement for using a non-orthogonal box. E.g. to set a -non-zero xy tilt, both x and y must be periodic dimensions. :dd - {Triclinic box skew is too large} :dt The displacement in a skewed direction must be less than half the box length in that dimension. E.g. the xy tilt must be between -half and +half of the x box length. :dd {Tried to convert a double to int, but input_double > INT_MAX} :dt Self-explanatory. :dd {Two groups cannot be the same in fix spring couple} :dt Self-explanatory. :dd {USER-CUDA mode requires CUDA variant of min style} :dt -UNDOCUMENTED :dd +CUDA mode is enabled, so the min style must include a cuda suffix. :dd {USER-CUDA mode requires CUDA variant of run style} :dt +CUDA mode is enabled, so the run style must include a cuda suffix. :dd + +{Unable to initialize accelerator for use} :dt + UNDOCUMENTED :dd {Unbalanced quotes in input line} :dt No matching end double quote was found following a leading double quote. :dd {Unexpected end of -reorder file} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Unexpected end of custom file} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Unexpected end of data file} :dt LAMMPS hit the end of the data file while attempting to read a section. Something is wrong with the format of the data file. :dd -{Unexpected end of reorder file} :dt - -UNDOCUMENTED :dd - {Units command after simulation box is defined} :dt The units command cannot be used after a read_data, read_restart, or create_box command. :dd {Universe/uloop variable count < # of partitions} :dt A universe or uloop style variable must specify a number of values >= to the number of processor partitions. :dd {Unknown command: %s} :dt The command is not known to LAMMPS. Check the input script. :dd +{Unknown error in GPU library} :dt + +UNDOCUMENTED :dd + {Unknown identifier in data file: %s} :dt A section of the data file cannot be read by LAMMPS. :dd {Unknown table style in angle style table} :dt Self-explanatory. :dd {Unknown table style in bond style table} :dt Self-explanatory. :dd {Unknown table style in pair_style command} :dt Style of table is invalid for use with pair_style table command. :dd {Unrecognized lattice type in MEAM file 1} :dt The lattice type in an entry of the MEAM library file is not valid. :dd {Unrecognized lattice type in MEAM file 2} :dt The lattice type in an entry of the MEAM parameter file is not valid. :dd {Unrecognized pair style in compute pair command} :dt Self-explanatory. :dd +{Use of change_box with undefined lattice} :dt + +Must use lattice command with displace_box command if units option is +set to lattice. :dd + {Use of compute temp/ramp with undefined lattice} :dt Must use lattice command with compute temp/ramp command if units option is set to lattice. :dd {Use of displace_atoms with undefined lattice} :dt Must use lattice command with displace_atoms command if units option is set to lattice. :dd -{Use of displace_box with undefined lattice} :dt - -Must use lattice command with displace_box command if units option is -set to lattice. :dd - -{Use of fix append_atoms with undefined lattice} :dt +{Use of fix append/atoms with undefined lattice} :dt -UNDOCUMENTED :dd +A lattice must be defined before using this fix. :dd {Use of fix ave/spatial with undefined lattice} :dt A lattice must be defined to use fix ave/spatial with units = lattice. :dd {Use of fix deform with undefined lattice} :dt A lattice must be defined to use fix deform with units = lattice. :dd {Use of fix deposit with undefined lattice} :dt Must use lattice command with compute fix deposit command if units option is set to lattice. :dd {Use of fix dt/reset with undefined lattice} :dt Must use lattice command with fix dt/reset command if units option is set to lattice. :dd {Use of fix indent with undefined lattice} :dt The lattice command must be used to define a lattice before using the fix indent command. :dd {Use of fix move with undefined lattice} :dt Must use lattice command with fix move command if units option is set to lattice. :dd {Use of fix recenter with undefined lattice} :dt Must use lattice command with fix recenter command if units option is set to lattice. :dd {Use of fix wall with undefined lattice} :dt Must use lattice command with fix wall command if units option is set to lattice. :dd {Use of fix wall/piston with undefined lattice} :dt -UNDOCUMENTED :dd +A lattice must be defined before using this fix. :dd {Use of region with undefined lattice} :dt If scale = lattice (the default) for the region command, then a lattice must first be defined via the lattice command. :dd {Use of velocity with undefined lattice} :dt If scale = lattice (the default) for the velocity set or velocity ramp command, then a lattice must first be defined via the lattice command. :dd {Using fix nvt/sllod with inconsistent fix deform remap option} :dt Fix nvt/sllod requires that deforming atoms have a velocity profile provided by "remap v" as a fix deform option. :dd {Using fix nvt/sllod with no fix deform defined} :dt Self-explanatory. :dd {Using fix srd with inconsistent fix deform remap option} :dt When shearing the box in an SRD simulation, the remap v option for fix deform needs to be used. :dd {Using pair lubricate with inconsistent fix deform remap option} :dt -UNDOCUMENTED :dd +If fix deform is used, the remap v option is required. :dd {Using pair lubricate/poly with inconsistent fix deform remap option} :dt -UNDOCUMENTED :dd +If fix deform is used, the remap v option is required. :dd {Variable evaluation before simulation box is defined} :dt Cannot evaluate a compute or fix or atom-based value in a variable before the simulation has been setup. :dd {Variable for compute ti is invalid style} :dt Self-explanatory. :dd {Variable for dump every is invalid style} :dt Only equal-style variables can be used. :dd {Variable for dump image center is invalid style} :dt -UNDOCUMENTED :dd +Must be an equal-style variable. :dd {Variable for dump image persp is invalid style} :dt -UNDOCUMENTED :dd +Must be an equal-style variable. :dd {Variable for dump image phi is invalid style} :dt -UNDOCUMENTED :dd +Must be an equal-style variable. :dd {Variable for dump image theta is invalid style} :dt -UNDOCUMENTED :dd +Must be an equal-style variable. :dd {Variable for dump image zoom is invalid style} :dt -UNDOCUMENTED :dd +Must be an equal-style variable. :dd {Variable for fix adapt is invalid style} :dt Only equal-style variables can be used. :dd {Variable for fix addforce is invalid style} :dt Self-explanatory. :dd {Variable for fix aveforce is invalid style} :dt Only equal-style variables can be used. :dd +{Variable for fix deform is invalid style} :dt + +The variable must be an equal-style variable. :dd + {Variable for fix efield is invalid style} :dt Only equal-style variables can be used. :dd {Variable for fix indent is invalid style} :dt Only equal-style variables can be used. :dd {Variable for fix indent is not equal style} :dt Only equal-style variables can be used. :dd {Variable for fix langevin is invalid style} :dt -UNDOCUMENTED :dd +It must be an equal-style variable. :dd {Variable for fix move is invalid style} :dt Only equal-style variables can be used. :dd {Variable for fix setforce is invalid style} :dt Only equal-style variables can be used. :dd {Variable for fix wall is invalid style} :dt Only equal-style variables can be used. :dd {Variable for fix wall/reflect is invalid style} :dt Only equal-style variables can be used. :dd {Variable for fix wall/srd is invalid style} :dt Only equal-style variables can be used. :dd {Variable for region is invalid style} :dt Only equal-style variables can be used. :dd {Variable for region is not equal style} :dt Self-explanatory. :dd {Variable for thermo every is invalid style} :dt Only equal-style variables can be used. :dd {Variable for velocity set is invalid style} :dt Only atom-style variables can be used. :dd {Variable formula compute array is accessed out-of-range} :dt Self-explanatory. :dd {Variable formula compute vector is accessed out-of-range} :dt Self-explanatory. :dd {Variable formula fix array is accessed out-of-range} :dt Self-explanatory. :dd {Variable formula fix vector is accessed out-of-range} :dt Self-explanatory. :dd {Variable name for compute atom/molecule does not exist} :dt Self-explanatory. :dd {Variable name for compute reduce does not exist} :dt Self-explanatory. :dd {Variable name for compute ti does not exist} :dt Self-explanatory. :dd {Variable name for dump every does not exist} :dt Self-explanatory. :dd {Variable name for dump image center does not exist} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Variable name for dump image persp does not exist} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Variable name for dump image phi does not exist} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Variable name for dump image theta does not exist} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Variable name for dump image zoom does not exist} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Variable name for fix adapt does not exist} :dt Self-explanatory. :dd {Variable name for fix addforce does not exist} :dt Self-explanatory. :dd {Variable name for fix ave/atom does not exist} :dt Self-explanatory. :dd {Variable name for fix ave/correlate does not exist} :dt Self-explanatory. :dd {Variable name for fix ave/histo does not exist} :dt Self-explanatory. :dd {Variable name for fix ave/spatial does not exist} :dt Self-explanatory. :dd {Variable name for fix ave/time does not exist} :dt Self-explanatory. :dd {Variable name for fix aveforce does not exist} :dt Self-explanatory. :dd +{Variable name for fix deform does not exist} :dt + +Self-explantory. :dd + {Variable name for fix efield does not exist} :dt Self-explanatory. :dd {Variable name for fix indent does not exist} :dt Self-explanatory. :dd {Variable name for fix langevin does not exist} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Variable name for fix move does not exist} :dt Self-explanatory. :dd {Variable name for fix setforce does not exist} :dt Self-explanatory. :dd {Variable name for fix store/state does not exist} :dt Self-explanatory. :dd {Variable name for fix wall does not exist} :dt Self-explanatory. :dd {Variable name for fix wall/reflect does not exist} :dt Self-explanatory. :dd {Variable name for fix wall/srd does not exist} :dt Self-explanatory. :dd {Variable name for region does not exist} :dt Self-explanatory. :dd {Variable name for thermo every does not exist} :dt Self-explanatory. :dd {Variable name for velocity set does not exist} :dt Self-explanatory. :dd {Variable name must be alphanumeric or underscore characters} :dt Self-explanatory. :dd {Velocity command before simulation box is defined} :dt The velocity command cannot be used before a read_data, read_restart, or create_box command. :dd {Velocity command with no atoms existing} :dt A velocity command has been used, but no atoms yet exist. :dd {Velocity ramp in z for a 2d problem} :dt Self-explanatory. :dd {Velocity temperature ID does not compute temperature} :dt The compute ID given to the velocity command must compute temperature. :dd {Verlet/split requires 2 partitions} :dt -UNDOCUMENTED :dd +See the -partition command-line switch. :dd {Verlet/split requires Rspace partition layout be multiple of Kspace partition layout in each dim} :dt -UNDOCUMENTED :dd +This is controlled by the processors command. :dd {Verlet/split requires Rspace partition size be multiple of Kspace partition size} :dt -UNDOCUMENTED :dd +This is so there is an equal number of Rspace processors for every +Kspace processor. :dd {Virial was not tallied on needed timestep} :dt You are using a thermo keyword that requires potentials to have tallied the virial, but they didn't on this timestep. See the variable doc page for ideas on how to make this work. :dd {Wall defined twice in fix wall command} :dt Self-explanatory. :dd {Wall defined twice in fix wall/reflect command} :dt Self-explanatory. :dd {Wall defined twice in fix wall/srd command} :dt Self-explanatory. :dd {World variable count doesn't match # of partitions} :dt A world-style variable must specify a number of values equal to the number of processor partitions. :dd {Write_restart command before simulation box is defined} :dt The write_restart command cannot be used before a read_data, read_restart, or create_box command. :dd {Zero-length lattice orient vector} :dt Self-explanatory. :dd :dle Warnings: :h4,link(warn) :dlb {Atom with molecule ID = 0 included in compute molecule group} :dt The group used in a compute command that operates on moleclues includes atoms with no molecule ID. This is probably not what you want. :dd {Broken bonds will not alter angles, dihedrals, or impropers} :dt See the doc page for fix bond/break for more info on this restriction. :dd {Building an occasional neighobr list when atoms may have moved too far} :dt This can cause LAMMPS to crash when the neighbor list is built. The solution is to check for building the regular neighbor lists more frequently. :dd {Compute cna/atom cutoff may be too large to find ghost atom neighbors} :dt The neighbor cutoff used may not encompass enough ghost atoms to perform this operation correctly. :dd {Computing temperature of portions of rigid bodies} :dt The group defined by the temperature compute does not encompass all the atoms in one or more rigid bodies, so the change in degrees-of-freedom for the atoms in those partial rigid bodies will not be accounted for. :dd {Created bonds will not create angles, dihedrals, or impropers} :dt See the doc page for fix bond/create for more info on this restriction. :dd {Dihedral problem: %d %ld %d %d %d %d} :dt Conformation of the 4 listed dihedral atoms is extreme; you may want -to check your simulation geometry. :dd :dd +to check your simulation geometry. :dd {Dump dcd/xtc timestamp may be wrong with fix dt/reset} :dt If the fix changes the timestep, the dump dcd file will not reflect the change. :dd {FENE bond too long: %ld %d %d %g} :dt A FENE bond has stretched dangerously far. It's interaction strength -will be truncated to attempt to prevent the bond from blowing up. :dd :dd +will be truncated to attempt to prevent the bond from blowing up. :dd {FENE bond too long: %ld %g} :dt A FENE bond has stretched dangerously far. It's interaction strength -will be truncated to attempt to prevent the bond from blowing up. :dd :dd +will be truncated to attempt to prevent the bond from blowing up. :dd {Fix GCMC may delete atom with non-zero molecule ID} :dt UNDOCUMENTED :dd {Fix SRD walls overlap but fix srd overlap not set} :dt You likely want to set this in your input script. :dd {Fix bond/swap will ignore defined angles} :dt See the doc page for fix bond/swap for more info on this restriction. :dd {Fix evaporate may delete atom with non-zero molecule ID} :dt -UNDOCUMENTED :dd +This is probably an error, since you should not delete only one atom +of a molecule. :dd {Fix move does not update angular momentum} :dt Atoms store this quantity, but fix move does not (yet) update it. :dd {Fix move does not update quaternions} :dt Atoms store this quantity, but fix move does not (yet) update it. :dd {Fix recenter should come after all other integration fixes} :dt Other fixes may change the position of the center-of-mass, so fix recenter should come last. :dd {Fix srd SRD moves may trigger frequent reneighboring} :dt This is because the SRD particles may move long distances. :dd {Fix srd grid size > 1/4 of big particle diameter} :dt This may cause accuracy problems. :dd {Fix srd particle moved outside valid domain} :dt This may indicate a problem with your simulation parameters. :dd {Fix srd particles may move > big particle diameter} :dt This may cause accuracy problems. :dd {Fix srd viscosity < 0.0 due to low SRD density} :dt This may cause accuracy problems. :dd {Fix thermal/conductivity comes before fix ave/spatial} :dt The order of these 2 fixes in your input script is such that fix thermal/conductivity comes first. If you are using fix ave/spatial to measure the temperature profile induced by fix viscosity, then this may cause a glitch in the profile since you are averaging immediately after swaps have occurred. Flipping the order of the 2 fixes typically helps. :dd {Fix viscosity comes before fix ave/spatial} :dt The order of these 2 fixes in your input script is such that fix viscosity comes first. If you are using fix ave/spatial to measure the velocity profile induced by fix viscosity, then this may cause a glitch in the profile since you are averaging immediately after swaps have occurred. Flipping the order of the 2 fixes typically helps. :dd {Group for fix_modify temp != fix group} :dt The fix_modify command is specifying a temperature computation that computes a temperature on a different group of atoms than the fix itself operates on. This is probably not what you want to do. :dd {Improper problem: %d %ld %d %d %d %d} :dt Conformation of the 4 listed improper atoms is extreme; you may want -to check your simulation geometry. :dd :dd +to check your simulation geometry. :dd {Kspace_modify slab param < 2.0 may cause unphysical behavior} :dt The kspace_modify slab parameter should be larger to insure periodic grids padded with empty space do not overlap. :dd {Less insertions than requested} :dt Less atom insertions occurred on this timestep due to the fix pour command than were scheduled. This is probably because there were too many overlaps detected. :dd +{Lost atoms via change_box: original %ld current %ld} :dt + +The command options you have used caused atoms to be lost. :dd + +{Lost atoms via displace_atoms: original %ld current %ld} :dt + +The command options you have used caused atoms to be lost. :dd + +{Lost atoms: original %ld current %ld} :dt + +Lost atoms are checked for each time thermo output is done. See the +thermo_modify lost command for options. Lost atoms usually indicate +bad dynamics, e.g. atoms have been blown far out of the simulation +box, or moved futher than one processor's sub-domain away before +reneighboring. :dd + {Mismatch between velocity and compute groups} :dt The temperature computation used by the velocity command will not be on the same group of atoms that velocities are being set for. :dd {More than one compute centro/atom} :dt It is not efficient to use compute centro/atom more than once. :dd {More than one compute cluster/atom} :dt It is not efficient to use compute cluster/atom more than once. :dd {More than one compute cna/atom defined} :dt It is not efficient to use compute cna/atom more than once. :dd {More than one compute coord/atom} :dt It is not efficient to use compute coord/atom more than once. :dd {More than one compute damage/atom} :dt It is not efficient to use compute ke/atom more than once. :dd {More than one compute ke/atom} :dt It is not efficient to use compute ke/atom more than once. :dd {More than one fix poems} :dt It is not efficient to use fix poems more than once. :dd {More than one fix rigid} :dt It is not efficient to use fix rigid more than once. :dd {New thermo_style command, previous thermo_modify settings will be lost} :dt If a thermo_style command is used after a thermo_modify command, the settings changed by the thermo_modify command will be reset to their default values. This is because the thermo_modify commmand acts on the currently defined thermo style, and a thermo_style command creates a new style. :dd {No Kspace calculation with verlet/split} :dt -UNDOCUMENTED :dd +The 2nd partition performs a kspace calculation so the kspace_style +command must be used. :dd {No fixes defined, atoms won't move} :dt If you are not using a fix like nve, nvt, npt then atom velocities and coordinates will not be updated during timestepping. :dd {No joints between rigid bodies, use fix rigid instead} :dt The bodies defined by fix poems are not connected by joints. POEMS will integrate the body motion, but it would be more efficient to use fix rigid. :dd {Not using real units with pair reax} :dt This is most likely an error, unless you have created your own ReaxFF parameter file in a different set of units. :dd {One or more atoms are time integrated more than once} :dt This is probably an error since you typically do not want to advance the positions or velocities of an atom more than once per timestep. :dd {One or more compute molecules has atoms not in group} :dt The group used in a compute command that operates on moleclues does not include all the atoms in some molecules. This is probably not what you want. :dd {One or more respa levels compute no forces} :dt This is computationally inefficient. :dd {Pair COMB charge %.10f with force %.10f hit max barrier} :dt Something is possibly wrong with your model. :dd {Pair COMB charge %.10f with force %.10f hit min barrier} :dt Something is possibly wrong with your model. :dd {Pair brownian needs newton pair on for momentum conservation} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair dpd needs newton pair on for momentum conservation} :dt -UNDOCUMENTED :dd +Self-explanatory. :dd {Pair dsmc: num_of_collisions > number_of_A} :dt Collision model in DSMC is breaking down. :dd {Pair dsmc: num_of_collisions > number_of_B} :dt Collision model in DSMC is breaking down. :dd {Particle deposition was unsuccessful} :dt The fix deposit command was not able to insert as many atoms as needed. The requested volume fraction may be too high, or other atoms may be in the insertion region. :dd {Reducing PPPM order b/c stencil extends beyond neighbor processor} :dt LAMMPS is attempting this in order to allow the simulation to run. It should not effect the PPPM accuracy. :dd {Replacing a fix, but new group != old group} :dt The ID and style of a fix match for a fix you are changing with a fix command, but the new group you are specifying does not match the old group. :dd {Replicating in a non-periodic dimension} :dt The parameters for a replicate command will cause a non-periodic dimension to be replicated; this may cause unwanted behavior. :dd {Resetting reneighboring criteria during PRD} :dt A PRD simulation requires that neigh_modify settings be delay = 0, every = 1, check = yes. Since these settings were not in place, LAMMPS changed them and will restore them to their original values after the PRD simulation. :dd {Resetting reneighboring criteria during TAD} :dt A TAD simulation requires that neigh_modify settings be delay = 0, every = 1, check = yes. Since these settings were not in place, LAMMPS changed them and will restore them to their original values after the PRD simulation. :dd {Resetting reneighboring criteria during minimization} :dt Minimization requires that neigh_modify settings be delay = 0, every = 1, check = yes. Since these settings were not in place, LAMMPS changed them and will restore them to their original values after the minimization. :dd {Restart file used different # of processors} :dt The restart file was written out by a LAMMPS simulation running on a different number of processors. Due to round-off, the trajectories of your restarted simulation may diverge a little more quickly than if you ran on the same # of processors. :dd {Restart file used different 3d processor grid} :dt The restart file was written out by a LAMMPS simulation running on a different 3d grid of processors. Due to round-off, the trajectories of your restarted simulation may diverge a little more quickly than if you ran on the same # of processors. :dd {Restart file used different boundary settings, using restart file values} :dt Your input script cannot change these restart file settings. :dd {Restart file used different newton bond setting, using restart file value} :dt The restart file value will override the setting in the input script. :dd {Restart file used different newton pair setting, using input script value} :dt The input script value will override the setting in the restart file. :dd {Restart file version does not match LAMMPS version} :dt This may cause problems when reading the restart file. :dd {Restrain problem: %d %ld %d %d %d %d} :dt -UNDOCUMENTED :dd +Conformation of the 4 listed dihedral atoms is extreme; you may want +to check your simulation geometry. :dd {Running PRD with only one replica} :dt This is allowed, but you will get no parallel speed-up. :dd {SRD bin shifting turned on due to small lamda} :dt This is done to try to preserve accuracy. :dd +{SRD bin size for fix srd differs from user request} :dt + +Fix SRD had to adjust the bin size to fit the simulation box. See the +cubic keyword if you want this message to be an error vs warning. :dd + +{SRD bins for fix srd are not cubic enough} :dt + +The bin shape is not within tolerance of cubic. See the cubic +keyword if you want this message to be an error vs warning. :dd + +{SRD particle %d started inside big particle %d on step %ld bounce %d} :dt + +See the inside keyword if you want this message to be an error vs +warning. :dd + {Shake determinant < 0.0} :dt The determinant of the quadratic equation being solved for a single cluster specified by the fix shake command is numerically suspect. LAMMPS will set it to 0.0 and continue. :dd {Should not allow rigid bodies to bounce off relecting walls} :dt LAMMPS allows this, but their dynamics are not computed correctly. :dd {System is not charge neutral, net charge = %g} :dt The total charge on all atoms on the system is not 0.0, which is not valid for Ewald or PPPM. :dd {Table inner cutoff >= outer cutoff} :dt You specified an inner cutoff for a Coulombic table that is longer than the global cutoff. Probably not what you wanted. :dd {Temperature for MSST is not for group all} :dt User-assigned temperature to MSST fix does not compute temperature for all atoms. Since MSST computes a global pressure, the kinetic energy contribution from the temperature is assumed to also be for all atoms. Thus the pressure used by MSST could be inaccurate. :dd {Temperature for NPT is not for group all} :dt User-assigned temperature to NPT fix does not compute temperature for all atoms. Since NPT computes a global pressure, the kinetic energy contribution from the temperature is assumed to also be for all atoms. Thus the pressure used by NPT could be inaccurate. :dd {Temperature for fix modify is not for group all} :dt The temperature compute is being used with a pressure calculation which does operate on group all, so this may be inconsistent. :dd {Temperature for thermo pressure is not for group all} :dt User-assigned temperature to thermo via the thermo_modify command does not compute temperature for all atoms. Since thermo computes a global pressure, the kinetic energy contribution from the temperature is assumed to also be for all atoms. Thus the pressure printed by thermo could be inaccurate. :dd {Too many common neighbors in CNA %d times} :dt More than the maximum # of neighbors was found multiple times. This was unexpected. :dd {Too many inner timesteps in fix ttm} :dt Self-explanatory. :dd {Too many neighbors in CNA for %d atoms} :dt More than the maximum # of neighbors was found multiple times. This was unexpected. :dd {Use special bonds = 0,1,1 with bond style fene} :dt Most FENE models need this setting for the special_bonds command. :dd {Use special bonds = 0,1,1 with bond style fene/expand} :dt Most FENE models need this setting for the special_bonds command. :dd {Using compute temp/deform with inconsistent fix deform remap option} :dt Fix nvt/sllod assumes deforming atoms have a velocity profile provided by "remap v" or "remap none" as a fix deform option. :dd {Using compute temp/deform with no fix deform defined} :dt This is probably an error, since it makes little sense to use compute temp/deform in this case. :dd {Using fix srd with box deformation but no SRD thermostat} :dt -UNDOCUMENTED :dd +The deformation will heat the SRD particles so this can +be dangerous. :dd {Using pair tail corrections with nonperiodic system} :dt This is probably a bogus thing to do, since tail corrections are computed by integrating the density of a periodic system out to infinity. :dd :dle diff --git a/doc/balance.html b/doc/balance.html index 216fdae35..c8985c8d5 100644 --- a/doc/balance.html +++ b/doc/balance.html @@ -1,209 +1,209 @@ <HTML> <CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> </CENTER> <HR> <H3>balance command </H3> <P>NOTE: the fix balance command referred to here for dynamic load balancing has not yet been released. </P> <P><B>Syntax:</B> </P> -<PRE>balance group-ID keyword args ... +<PRE>balance keyword args ... </PRE> <LI>one or more keyword/arg pairs may be appended </UL> <LI>keyword = <I>x</I> or <I>y</I> or <I>z</I> or <I>dynamic</I> <PRE> <I>x</I> args = <I>uniform</I> or Px-1 numbers between 0 and 1 <I>uniform</I> = evenly spaced cuts between processors in x dimension numbers = Px-1 ascending values between 0 and 1, Px - # of processors in x dimension <I>y</I> args = <I>uniform</I> or Py-1 numbers between 0 and 1 <I>uniform</I> = evenly spaced cuts between processors in x dimension numbers = Py-1 ascending values between 0 and 1, Py - # of processors in y dimension <I>z</I> args = <I>uniform</I> or Pz-1 numbers between 0 and 1 <I>uniform</I> = evenly spaced cuts between processors in x dimension numbers = Pz-1 ascending values between 0 and 1, Pz - # of processors in z dimension <I>dynamic</I> args = Nrepeat Niter dimstr thresh Nrepeat = # of times to repeat dimstr sequence Niter = # of times to iterate within each dimension of dimstr sequence dimstr = sequence of letters containing "x" or "y" or "z" thresh = stop balancing when this imbalance threshhold is reached </PRE> </UL> <P><B>Examples:</B> </P> <PRE>balance x uniform y 0.4 0.5 0.6 balance dynamic 1 5 xzx 1.1 balance dynamic 5 10 x 1.0 </PRE> <P><B>Description:</B> </P> <P>This command adjusts the size of processor sub-domains within the simulation box, to attempt to balance the number of particles and thus the computational cost (load) evenly across processors. The load balancing is "static" in the sense that this command performs the balancing once, before or between simulations. The processor sub-domains will then remain static during the subsequent run. To -perform "dynammic" balancing, see the <A HREF = "fix_balance.html">fix balance</A> +perform "dynamic" balancing, see the <A HREF = "fix_balance.html">fix balance</A> command, which can adjust processor sub-domain sizes on-the-fly during a <A HREF = "run.html">run</A>. </P> <P>Load-balancing is only useful if the particles in the simulation box have a spatially-varying density distribution. E.g. a model of a vapor/liquid interface, or a solid with an irregular-shaped geometry containing void regions. In this case, the LAMMPS default of dividing the simulation box volume into a regular-spaced grid of processor sub-domain, with one equal-volume sub-domain per procesor, may assign very different numbers of particles per processor. This can lead to poor performance in a scalability sense, when the simulation is run in parallel. </P> <P>Note that the <A HREF = "processors.html">processors</A> command gives you some control over how the box volume is split across processors. Specifically, for a Px by Py by Pz grid of processors, it lets you choose Px, Py, and Pz, subject to the constraint that Px * Py * Pz = P, the total number of processors. This can be sufficient to achieve good load-balance for some models on some processor counts. However, all the processor sub-domains will still be the same shape and have the same volume. </P> <P>This command does not alter the topology of the Px by Py by Pz grid or processors. But it shifts the cutting planes between processors (in 3d, or lines in 2d), which adjusts the volume (area in 2d) assigned to each processor, as in the following 2d diagram. The left diagram is the default partitioning of the simulation box across processors (one sub-box for each of 16 processors); the right diagram is after balancing. </P> <CENTER><IMG SRC = "JPG/balance.jpg"> </CENTER> <P>When the balance command completes, it prints out the final positions of all cutting planes in each of the 3 dimensions (as fractions of the box length). It also prints statistics about its results, including the change in "imbalance factor". This factor is defined as the maximum number of particles owned by any processor, divided by the average number of particles per processor. Thus an imbalance factor of 1.0 is perfect balance. For 10000 particles running on 10 processors, if the most heavily loaded processor has 1200 particles, then the factor is 1.2, meaning there is a 20% imbalance. The change in the maximum number of particles (on any processor) is also printed. </P> <P>IMPORTANT NOTE: This command attempts to minimize the imbalance factor, as defined above. But because of the topology constraint that only the cutting planes (lines) between processors are moved, there are many irregular distributions of particles, where this factor cannot be shrunk to 1.0, particuarly in 3d. Also, computational cost is not strictly proportional to particle count, and changing the relative size and shape of processor sub-domains may lead to additional computational and communication overheads, e.g. in the PPPM solver used via the <A HREF = "kspace_style.html">kspace_style</A> command. Thus you should benchmark the run times of your simulation before and after balancing. </P> <HR> <P>The <I>x</I>, <I>y</I>, and <I>z</I> keywords adjust the position of cutting planes between processor sub-domains in a specific dimension. The <I>uniform</I> argument spaces the planes evenly, as in the left diagram above. The <I>numeric</I> argument requires you to list Ps-1 numbers that specify the position of the cutting planes. This requires that you know Ps = Px or Py or Pz = the number of processors assigned by LAMMPS to the relevant dimension. This assignment is made (and the Px, Py, Pz values printed out) when the simulation box is created by the "create_box" or "read_data" or "read_restart" command and is influenced by the settings of the "processors" command. </P> <P>Each of the numeric values must be between 0 and 1, and they must be listed in ascending order. They represent the fractional position of the cutting place. The left (or lower) edge of the box is 0.0, and the right (or upper) edge is 1.0. Neither of these values is specified. Only the interior Ps-1 positions are specified. Thus is there are 2 procesors in the x dimension, you specify a single value such as 0.75, which would make the left processor's sub-domain 3x larger than the right processor's sub-domain. </P> <HR> <P>The <I>dynamic</I> keyword changes the cutting planes between processors in an iterative fashion, seeking to reduce the imbalance factor, similar to how the <A HREF = "fix_balance.html">fix balance</A> command operates. Note that this keyword begins its operation from the current processor partitioning, which could be uniform or the result of a previous balance command. </P> <P>The <I>dimstr</I> argument is a string of characters, each of which must be an "x" or "y" or "z". The characters can appear in any order, and can be repeated as many times as desired. These are all valid <I>dimstr</I> arguments: "x" or "xyzyx" or "yyyzzz". </P> <P>Balancing proceeds by adjusting the cutting planes in each of the dimensions listed in <I>dimstr</I>, one dimension at a time. The entire sequence of dimensions is repeated <I>Nrepeat</I> times. For a single dimension, the balancing operation (described below) is iterated on <I>Niter</I> times. After each dimension finishes, the imbalance factor is re-computed, and the balancing operation halts if the <I>thresh</I> criterion is met. </P> <P>The interplay between <I>Nrepeat</I>, <I>Niter</I>, and <I>dimstr</I> means that these commands do essentially the same thing, the only difference being how often the imbalance factor is computed and checked against the threshhold: </P> <PRE>balance y dynamic 5 10 x 1.2 balance y dynamic 1 10 xxxxx 1.2 balance y dynamic 50 1 x 1.2 </PRE> <P>A rebalance operation in a single dimension is performed using an iterative "diffusive" load-balancing algorithm <A HREF = "#Cybenko">(Cybenko)</A>. One iteration on a dimension (which is repeated <I>Niter</I> times), works as follows. Assume there are Px processors in the x dimension. This defines Px slices of the simulation, each of which contains Py*Pz processors. The task is to adjust the position of the Px-1 cuts between slices, leaving the end cuts unchanged (left and right edges of the simulation box). </P> <P>The iteration beings by calculating the number of atoms within each of the Px slices. Then for each slice, its atom count is compared to its neighbors. If a slice has more atoms than its left (or right) neighbor, the cut is moved towards the center of the slice, effectively shrinking the width of the slice and migrating atoms to the other slice. The distance to move the cut is a function of the "density" of atoms in the donor slice and the difference in counts between the 2 slices. A damping factor is also applied to avoid oscillations in the position of the cutting plane as iterations proceed. Hence the "diffusive" nature of the algorithm as work (atoms) effectively diffuses from highly loaded processors to less-loaded processors. </P> <HR> <P><B>Restrictions:</B> </P> <P>The <I>dynamic</I> keyword cannot be used with the <I>x</I>, <I>y</I>, or <I>z</I> arguments. </P> <P>For 2d simulations, the <I>z</I> keyword cannot be used. Nor can a "z" appear in <I>dimstr</I> for the <I>dynamic</I> keyword. </P> <P><B>Related commands:</B> </P> <P><A HREF = "processors.html">processors</A>, <A HREF = "fix_balance.html">fix balance</A> </P> <P><B>Default:</B> none </P> <HR> <A NAME = "Cybenko"></A> <P><B>(Cybenko)</B> Cybenko, J Par Dist Comp, 7, 279-301 (1989). </P> </HTML> diff --git a/doc/balance.txt b/doc/balance.txt index 06173dd7e..368cdab1b 100644 --- a/doc/balance.txt +++ b/doc/balance.txt @@ -1,200 +1,200 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line balance command :h3 NOTE: the fix balance command referred to here for dynamic load balancing has not yet been released. [Syntax:] -balance group-ID keyword args ... :pre +balance keyword args ... :pre one or more keyword/arg pairs may be appended :ule,l keyword = {x} or {y} or {z} or {dynamic} :l {x} args = {uniform} or Px-1 numbers between 0 and 1 {uniform} = evenly spaced cuts between processors in x dimension numbers = Px-1 ascending values between 0 and 1, Px - # of processors in x dimension {y} args = {uniform} or Py-1 numbers between 0 and 1 {uniform} = evenly spaced cuts between processors in x dimension numbers = Py-1 ascending values between 0 and 1, Py - # of processors in y dimension {z} args = {uniform} or Pz-1 numbers between 0 and 1 {uniform} = evenly spaced cuts between processors in x dimension numbers = Pz-1 ascending values between 0 and 1, Pz - # of processors in z dimension {dynamic} args = Nrepeat Niter dimstr thresh Nrepeat = # of times to repeat dimstr sequence Niter = # of times to iterate within each dimension of dimstr sequence dimstr = sequence of letters containing "x" or "y" or "z" thresh = stop balancing when this imbalance threshhold is reached :pre :ule [Examples:] balance x uniform y 0.4 0.5 0.6 balance dynamic 1 5 xzx 1.1 balance dynamic 5 10 x 1.0 :pre [Description:] This command adjusts the size of processor sub-domains within the simulation box, to attempt to balance the number of particles and thus the computational cost (load) evenly across processors. The load balancing is "static" in the sense that this command performs the balancing once, before or between simulations. The processor sub-domains will then remain static during the subsequent run. To -perform "dynammic" balancing, see the "fix balance"_fix_balance.html +perform "dynamic" balancing, see the "fix balance"_fix_balance.html command, which can adjust processor sub-domain sizes on-the-fly during a "run"_run.html. Load-balancing is only useful if the particles in the simulation box have a spatially-varying density distribution. E.g. a model of a vapor/liquid interface, or a solid with an irregular-shaped geometry containing void regions. In this case, the LAMMPS default of dividing the simulation box volume into a regular-spaced grid of processor sub-domain, with one equal-volume sub-domain per procesor, may assign very different numbers of particles per processor. This can lead to poor performance in a scalability sense, when the simulation is run in parallel. Note that the "processors"_processors.html command gives you some control over how the box volume is split across processors. Specifically, for a Px by Py by Pz grid of processors, it lets you choose Px, Py, and Pz, subject to the constraint that Px * Py * Pz = P, the total number of processors. This can be sufficient to achieve good load-balance for some models on some processor counts. However, all the processor sub-domains will still be the same shape and have the same volume. This command does not alter the topology of the Px by Py by Pz grid or processors. But it shifts the cutting planes between processors (in 3d, or lines in 2d), which adjusts the volume (area in 2d) assigned to each processor, as in the following 2d diagram. The left diagram is the default partitioning of the simulation box across processors (one sub-box for each of 16 processors); the right diagram is after balancing. :c,image(JPG/balance.jpg) When the balance command completes, it prints out the final positions of all cutting planes in each of the 3 dimensions (as fractions of the box length). It also prints statistics about its results, including the change in "imbalance factor". This factor is defined as the maximum number of particles owned by any processor, divided by the average number of particles per processor. Thus an imbalance factor of 1.0 is perfect balance. For 10000 particles running on 10 processors, if the most heavily loaded processor has 1200 particles, then the factor is 1.2, meaning there is a 20% imbalance. The change in the maximum number of particles (on any processor) is also printed. IMPORTANT NOTE: This command attempts to minimize the imbalance factor, as defined above. But because of the topology constraint that only the cutting planes (lines) between processors are moved, there are many irregular distributions of particles, where this factor cannot be shrunk to 1.0, particuarly in 3d. Also, computational cost is not strictly proportional to particle count, and changing the relative size and shape of processor sub-domains may lead to additional computational and communication overheads, e.g. in the PPPM solver used via the "kspace_style"_kspace_style.html command. Thus you should benchmark the run times of your simulation before and after balancing. :line The {x}, {y}, and {z} keywords adjust the position of cutting planes between processor sub-domains in a specific dimension. The {uniform} argument spaces the planes evenly, as in the left diagram above. The {numeric} argument requires you to list Ps-1 numbers that specify the position of the cutting planes. This requires that you know Ps = Px or Py or Pz = the number of processors assigned by LAMMPS to the relevant dimension. This assignment is made (and the Px, Py, Pz values printed out) when the simulation box is created by the "create_box" or "read_data" or "read_restart" command and is influenced by the settings of the "processors" command. Each of the numeric values must be between 0 and 1, and they must be listed in ascending order. They represent the fractional position of the cutting place. The left (or lower) edge of the box is 0.0, and the right (or upper) edge is 1.0. Neither of these values is specified. Only the interior Ps-1 positions are specified. Thus is there are 2 procesors in the x dimension, you specify a single value such as 0.75, which would make the left processor's sub-domain 3x larger than the right processor's sub-domain. :line The {dynamic} keyword changes the cutting planes between processors in an iterative fashion, seeking to reduce the imbalance factor, similar to how the "fix balance"_fix_balance.html command operates. Note that this keyword begins its operation from the current processor partitioning, which could be uniform or the result of a previous balance command. The {dimstr} argument is a string of characters, each of which must be an "x" or "y" or "z". The characters can appear in any order, and can be repeated as many times as desired. These are all valid {dimstr} arguments: "x" or "xyzyx" or "yyyzzz". Balancing proceeds by adjusting the cutting planes in each of the dimensions listed in {dimstr}, one dimension at a time. The entire sequence of dimensions is repeated {Nrepeat} times. For a single dimension, the balancing operation (described below) is iterated on {Niter} times. After each dimension finishes, the imbalance factor is re-computed, and the balancing operation halts if the {thresh} criterion is met. The interplay between {Nrepeat}, {Niter}, and {dimstr} means that these commands do essentially the same thing, the only difference being how often the imbalance factor is computed and checked against the threshhold: balance y dynamic 5 10 x 1.2 balance y dynamic 1 10 xxxxx 1.2 balance y dynamic 50 1 x 1.2 :pre A rebalance operation in a single dimension is performed using an iterative "diffusive" load-balancing algorithm "(Cybenko)"_#Cybenko. One iteration on a dimension (which is repeated {Niter} times), works as follows. Assume there are Px processors in the x dimension. This defines Px slices of the simulation, each of which contains Py*Pz processors. The task is to adjust the position of the Px-1 cuts between slices, leaving the end cuts unchanged (left and right edges of the simulation box). The iteration beings by calculating the number of atoms within each of the Px slices. Then for each slice, its atom count is compared to its neighbors. If a slice has more atoms than its left (or right) neighbor, the cut is moved towards the center of the slice, effectively shrinking the width of the slice and migrating atoms to the other slice. The distance to move the cut is a function of the "density" of atoms in the donor slice and the difference in counts between the 2 slices. A damping factor is also applied to avoid oscillations in the position of the cutting plane as iterations proceed. Hence the "diffusive" nature of the algorithm as work (atoms) effectively diffuses from highly loaded processors to less-loaded processors. :line [Restrictions:] The {dynamic} keyword cannot be used with the {x}, {y}, or {z} arguments. For 2d simulations, the {z} keyword cannot be used. Nor can a "z" appear in {dimstr} for the {dynamic} keyword. [Related commands:] "processors"_processors.html, "fix balance"_fix_balance.html [Default:] none :line :link(Cybenko) [(Cybenko)] Cybenko, J Par Dist Comp, 7, 279-301 (1989). diff --git a/doc/compute_pair_local.html b/doc/compute_pair_local.html index 41cf2f92e..bb20b7db3 100644 --- a/doc/compute_pair_local.html +++ b/doc/compute_pair_local.html @@ -1,122 +1,122 @@ <HTML> <CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> </CENTER> <HR> <H3>compute pair/local command </H3> <P><B>Syntax:</B> </P> <PRE>compute ID group-ID pair/local input1 input2 ... </PRE> <UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command <LI>pair/local = style name of this compute command <LI>zero or more keywords may be appended -<LI>keyword = <I>dist</I> or <I>eng</I> or <I>force</I> or <I>fx</I> or <I>fy</I> or <I>fz</I> or <I>fN</I> +<LI>keyword = <I>dist</I> or <I>eng</I> or <I>force</I> or <I>fx</I> or <I>fy</I> or <I>fz</I> or <I>pN</I> <PRE> <I>dist</I> = pairwise distance <I>eng</I> = pairwise energy <I>force</I> = pairwise force <I>fx</I>,<I>fy</I>,<I>fz</I> = components of pairwise force <I>pN</I> = pair style specific quantities for allowed N values </PRE> </UL> <P><B>Examples:</B> </P> <PRE>compute 1 all pair/local eng compute 1 all pair/local dist eng force compute 1 all pair/local dist eng fx fy fz compute 1 all pair/local dist fx fy fz p1 p2 p3 </PRE> <P><B>Description:</B> </P> <P>Define a computation that calculates properties of individual pairwise interactions. The number of datums generated, aggregated across all processors, equals the number of pairwise interactions in the system. </P> <P>The local data stored by this command is generated by looping over the pairwise neighbor list. Info about an individual pairwise interaction will only be included if both atoms in the pair are in the specified compute group, and if the current pairwise distance is less than the force cutoff distance for that interaction, as defined by the <A HREF = "pair_style.html">pair_style</A> and <A HREF = "pair_coeff.html">pair_coeff</A> commands. </P> <P>The output <I>dist</I> is the distance bewteen the pair of atoms. </P> <P>The output <I>eng</I> is the interaction energy for the pair of atoms. </P> <P>The output <I>force</I> is the force acting between the pair of atoms, which is positive for a repulsive force and negative for an attractive force. The outputs <I>fx</I>, <I>fy</I>, and <I>fz</I> are the xyz components of <I>force</I> on atom I. </P> <P>A pair style may define additional pairwise quantities which can be accessed as <I>p1</I> to <I>pN</I>, where N is defined by the pair style. Most pair styles do not define any additional quantities, so N = 0. An example of ones that do are the <A HREF = "pair_gran.html">granular pair styles</A> which calculate the tangential force between two particles and return its components and magnitude acting on atom I for N = 1,2,3,4. See individual pair styles for detils. </P> <P>The output <I>dist</I> will be in distance <A HREF = "units.html">units</A>. The output <I>eng</I> will be in energy <A HREF = "units.html">units</A>. The outputs <I>force</I>, <I>fx</I>, <I>fy</I>, and <I>fz</I> will be in force <A HREF = "units.html">units</A>. The output <I>pN</I> will be in whatever units the pair style defines. </P> <P>Note that as atoms migrate from processor to processor, there will be no consistent ordering of the entries within the local vector or array from one timestep to the next. The only consistency that is guaranteed is that the ordering on a particular timestep will be the same for local vectors or arrays generated by other compute commands. For example, pair output from the <A HREF = "compute_property_local.html">compute property/local</A> command can be combined with data from this command and output by the <A HREF = "dump.html">dump local</A> command in a consistent way. </P> <P>IMPORTANT NOTE: For pairs, if two atoms I,J are involved in 1-2, 1-3, 1-4 interactions within the molecular topology, their pairwise interaction may be turned off, and thus they may not appear in the neighbor list, and will not be part of the local data created by this command. More specifically, this may be true of I,J pairs with a weighting factor of 0.0; pairs with a non-zero weighting factor are included. The weighting factors for 1-2, 1-3, and 1-4 pairwise interactions are set by the <A HREF = "special_bonds.html">special_bonds</A> command. </P> <P><B>Output info:</B> </P> <P>This compute calculates a local vector or local array depending on the number of keywords. The length of the vector or number of rows in the array is the number of pairs. If a single keyword is specified, a local vector is produced. If two or more keywords are specified, a local array is produced where the number of columns = the number of keywords. The vector or array can be accessed by any command that uses local values from a compute as input. See <A HREF = "Section_howto.html#howto_15">this section</A> for an overview of LAMMPS output options. </P> <P>The output for <I>dist</I> will be in distance <A HREF = "units.html">units</A>. The output for <I>eng</I> will be in energy <A HREF = "units.html">units</A>. The output for <I>force</I> will be in force <A HREF = "units.html">units</A>. </P> <P><B>Restrictions:</B> none </P> <P><B>Related commands:</B> </P> <P><A HREF = "dump.html">dump local</A>, <A HREF = "compute_property_local.html">compute property/local</A> </P> <P><B>Default:</B> none </P> </HTML> diff --git a/doc/compute_pair_local.txt b/doc/compute_pair_local.txt index e7b5520ac..30b7a05cb 100644 --- a/doc/compute_pair_local.txt +++ b/doc/compute_pair_local.txt @@ -1,112 +1,112 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line compute pair/local command :h3 [Syntax:] compute ID group-ID pair/local input1 input2 ... :pre ID, group-ID are documented in "compute"_compute.html command :ulb,l pair/local = style name of this compute command :l zero or more keywords may be appended :l -keyword = {dist} or {eng} or {force} or {fx} or {fy} or {fz} or {fN} :l +keyword = {dist} or {eng} or {force} or {fx} or {fy} or {fz} or {pN} :l {dist} = pairwise distance {eng} = pairwise energy {force} = pairwise force {fx},{fy},{fz} = components of pairwise force {pN} = pair style specific quantities for allowed N values :pre :ule [Examples:] compute 1 all pair/local eng compute 1 all pair/local dist eng force compute 1 all pair/local dist eng fx fy fz compute 1 all pair/local dist fx fy fz p1 p2 p3 :pre [Description:] Define a computation that calculates properties of individual pairwise interactions. The number of datums generated, aggregated across all processors, equals the number of pairwise interactions in the system. The local data stored by this command is generated by looping over the pairwise neighbor list. Info about an individual pairwise interaction will only be included if both atoms in the pair are in the specified compute group, and if the current pairwise distance is less than the force cutoff distance for that interaction, as defined by the "pair_style"_pair_style.html and "pair_coeff"_pair_coeff.html commands. The output {dist} is the distance bewteen the pair of atoms. The output {eng} is the interaction energy for the pair of atoms. The output {force} is the force acting between the pair of atoms, which is positive for a repulsive force and negative for an attractive force. The outputs {fx}, {fy}, and {fz} are the xyz components of {force} on atom I. A pair style may define additional pairwise quantities which can be accessed as {p1} to {pN}, where N is defined by the pair style. Most pair styles do not define any additional quantities, so N = 0. An example of ones that do are the "granular pair styles"_pair_gran.html which calculate the tangential force between two particles and return its components and magnitude acting on atom I for N = 1,2,3,4. See individual pair styles for detils. The output {dist} will be in distance "units"_units.html. The output {eng} will be in energy "units"_units.html. The outputs {force}, {fx}, {fy}, and {fz} will be in force "units"_units.html. The output {pN} will be in whatever units the pair style defines. Note that as atoms migrate from processor to processor, there will be no consistent ordering of the entries within the local vector or array from one timestep to the next. The only consistency that is guaranteed is that the ordering on a particular timestep will be the same for local vectors or arrays generated by other compute commands. For example, pair output from the "compute property/local"_compute_property_local.html command can be combined with data from this command and output by the "dump local"_dump.html command in a consistent way. IMPORTANT NOTE: For pairs, if two atoms I,J are involved in 1-2, 1-3, 1-4 interactions within the molecular topology, their pairwise interaction may be turned off, and thus they may not appear in the neighbor list, and will not be part of the local data created by this command. More specifically, this may be true of I,J pairs with a weighting factor of 0.0; pairs with a non-zero weighting factor are included. The weighting factors for 1-2, 1-3, and 1-4 pairwise interactions are set by the "special_bonds"_special_bonds.html command. [Output info:] This compute calculates a local vector or local array depending on the number of keywords. The length of the vector or number of rows in the array is the number of pairs. If a single keyword is specified, a local vector is produced. If two or more keywords are specified, a local array is produced where the number of columns = the number of keywords. The vector or array can be accessed by any command that uses local values from a compute as input. See "this section"_Section_howto.html#howto_15 for an overview of LAMMPS output options. The output for {dist} will be in distance "units"_units.html. The output for {eng} will be in energy "units"_units.html. The output for {force} will be in force "units"_units.html. [Restrictions:] none [Related commands:] "dump local"_dump.html, "compute property/local"_compute_property_local.html [Default:] none diff --git a/doc/dump_modify.html b/doc/dump_modify.html index 37a8ebf6a..f5e313fdb 100644 --- a/doc/dump_modify.html +++ b/doc/dump_modify.html @@ -1,586 +1,604 @@ <HTML> <CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> </CENTER> <HR> <H3>dump_modify command </H3> <P><B>Syntax:</B> </P> <PRE>dump_modify dump-ID keyword values ... </PRE> <UL><LI>dump-ID = ID of dump to modify <LI>one or more keyword/value pairs may be appended <LI>keyword = <I>acolor</I> or <I>adiam</I> or <I>amap</I> or <I>append</I> or <I>bcolor</I> or <I>bdiam</I> or <I>backcolor</I> or <I>boxcolor</I> or <I>color</I> or <I>every</I> or <I>flush</I> or <I>format</I> or <I>image</I> or <I>label</I> or <I>precision</I> or <I>region</I> or <I>scale</I> or <I>sort</I> or <I>thresh</I> or <I>unwrap</I> <PRE> <I>acolor</I> args = type color type = atom type or range of types (see below) color = name of color or color1/color2/... <I>adiam</I> args = type diam type = atom type or range of types (see below) diam = diameter of atoms of that type (distance units) <I>amap</I> args = lo hi style delta N entry1 entry2 ... entryN lo = number or <I>min</I> = lower bound of range of color map hi = number or <I>max</I> = upper bound of range of color map style = 2 letters = "c" or "d" or "s" plus "a" or "f" "c" for continuous "d" for discrete "s" for sequential "a" for absolute "f" for fractional delta = binsize (only used for style "s", otherwise ignored) binsize = range is divided into bins of this width N = # of subsequent entries entry = value color (for continuous style) value = number or <I>min</I> or <I>max</I> = single value within range color = name of color used for that value entry = lo hi color (for discrete style) lo/hi = number or <I>min</I> or <I>max</I> = lower/upper bound of subset of range color = name of color used for that subset of values entry = color (for sequential style) color = name of color used for a bin of values <I>append</I> arg = <I>yes</I> or <I>no</I> <I>bcolor</I> args = type color type = bond type or range of types (see below) color = name of color or color1/color2/... <I>bdiam</I> args = type diam type = bond type or range of types (see below) diam = diameter of bonds of that type (distance units) <I>backcolor</I> arg = color color = name of color for background <I>boxcolor</I> arg = color color = name of color for box lines <I>color</I> args = name R G B name = name of color R,G,B = red/green/blue numeric values from 0.0 to 1.0 <I>element</I> args = E1 E2 ... EN, where N = # of atom types E1,...,EN = element name, e.g. C or Fe or Ga <I>every</I> arg = N N = dump every this many timesteps N can be a variable (see below) <I>first</I> arg = <I>yes</I> or <I>no</I> <I>format</I> arg = C-style format string for one line of output <I>flush</I> arg = <I>yes</I> or <I>no</I> <I>image</I> arg = <I>yes</I> or <I>no</I> <I>label</I> arg = string string = character string (e.g. BONDS) to use in header of dump local file <I>pad</I> arg = Nchar = # of characters to convert timestep to <I>precision</I> arg = power-of-10 value from 10 to 1000000 <I>region</I> arg = region-ID or "none" <I>scale</I> arg = <I>yes</I> or <I>no</I> <I>sort</I> arg = <I>off</I> or <I>id</I> or N or -N off = no sorting of per-atom lines within a snapshot id = sort per-atom lines by atom ID N = sort per-atom lines in ascending order by the Nth column -N = sort per-atom lines in descending order by the Nth column <I>thresh</I> args = attribute operation value attribute = same attributes (x,fy,etotal,sxx,etc) used by dump custom style operation = "<" or "<=" or ">" or ">=" or "==" or "!=" value = numeric value to compare to these 3 args can be replaced by the word "none" to turn off thresholding <I>unwrap</I> arg = <I>yes</I> or <I>no</I> </PRE> </UL> <P><B>Examples:</B> </P> <PRE>dump_modify 1 format "%d %d %20.15g %g %g" scale yes dump_modify myDump image yes scale no flush yes dump_modify 1 region mySphere thresh x < 0.0 thresh epair >= 3.2 dump_modify xtcdump precision 10000 dump_modify 1 every 1000 dump_modify 1 every v_myVar dump_modify 1 amap min max cf 0.0 3 min green 0.5 yellow max blue boxcolor red </PRE> <P><B>Description:</B> </P> <P>Modify the parameters of a previously defined dump command. Not all parameters are relevant to all dump styles. </P> <HR> <P>The <I>acolor</I> keyword applies only to the dump <I>image</I> style. It can be used with the <A HREF = "dump_image.html">dump image</A> command, when its atom color setting is <I>type</I>, to set the color that atoms of each type will be drawn in the image. </P> <P>The specified <I>type</I> should be an integer from 1 to Ntypes = the number of atom types. A wildcard asterisk can be used in place of or in conjunction with the <I>type</I> argument to specify a range of atom types. This takes the form "*" or "*n" or "n*" or "m*n". If N = the number of atom types, then an asterisk with no numeric values means all types from 1 to N. A leading asterisk means all types from 1 to n (inclusive). A trailing asterisk means all types from n to N (inclusive). A middle asterisk means all types from m to n (inclusive). </P> <P>The specified <I>color</I> can be a single color which is any of the 140 pre-defined colors (see below) or a color name defined by the dump_modify color option. Or it can be two or more colors separated by a "/" character, e.g. red/green/blue. In the former case, that color is assigned to all the specified atom types. In the latter case, the list of colors are assigned in a round-robin fashion to each of the specified atom types. </P> <HR> <P>The <I>adiam</I> keyword applies only to the dump <I>image</I> style. It can be used with the <A HREF = "dump_image.html">dump image</A> command, when its atom diameter setting is <I>type</I>, to set the size that atoms of each type will be drawn in the image. The specified <I>type</I> should be an integer from 1 to Ntypes. As with the <I>acolor</I> keyword, a wildcard asterisk can be used as part of the <I>type</I> argument to specify a range of atomt types. The specified <I>diam</I> is the size in whatever distance <A HREF = "units.html">units</A> the input script is using, e.g. Angstroms. </P> <HR> <P>The <I>amap</I> keyword applies only to the dump <I>image</I> style. It can be used with the <A HREF = "dump_image.html">dump image</A> command, with its <I>atom</I> keyword, when its atom setting is an atom-attribute, to setup a color map. The color map is used to assign a specific RGB (red/green/blue) color value to an individual atom when it is drawn, based on the atom's attribute, which is a numeric value, e.g. its x-component of velocity if the atom-attribute "vx" was specified. </P> <P>The basic idea of a color map is that the atom-attribute will be within a range of values, and that range is associated with a a series of colors (e.g. red, blue, green). An atom's specific value (vx = -3.2) can then mapped to the series of colors (e.g. halfway between red and blue), and a specific color is determined via an interpolation procedure. </P> <P>There are many possible options for the color map, enabled by the <I>amap</I> keyword. Here are the details. </P> <P>The <I>lo</I> and <I>hi</I> settings determine the range of values allowed for the atom attribute. If numeric values are used for <I>lo</I> and/or <I>hi</I>, then values that are lower/higher than that value are set to the value. I.e. the range is static. If <I>lo</I> is specified as <I>min</I> or <I>hi</I> as <I>max</I> then the range is dynamic, and the lower and/or upper bound will be calculated each time an image is drawn, based on the set of atoms being visualized. </P> <P>The <I>style</I> setting is two letters, such as "ca". The first letter is either "c" for continuous, "d" for discrete, or "s" for sequential. The second letter is either "a" for absolute, or "f" for fractional. </P> <P>A continuous color map is one in which the color changes continuously from value to value within the range. A discrete color map is one in which discrete colors are assigned to sub-ranges of values within the range. A sequential color map is one in which discrete colors are assigned to a sequence of sub-ranges of values covering the entire range. </P> <P>An absolute color map is one in which the values to which colors are assigned are specified explicitly as values within the range. A fractional color map is one in which the values to which colors are assigned are specified as a fractional portion of the range. For example if the range is from -10.0 to 10.0, and the color red is to be assigned to atoms with a value of 5.0, then for an absolute color map the number 5.0 would be used. But for a fractional map, the number 0.75 would be used since 5.0 is 3/4 of the way from -10.0 to 10.0. </P> <P>The <I>delta</I> setting is only specified if the style is sequential. It specifies the bin size to use within the range for assigning consecutive colors to. For example, if the range is from -10.0 to 10.0 and a <I>delta</I> of 1.0 is used, then 20 colors will be assigned to the range. The first will be from -10.0 <= color1 < -9.0, then 2nd from -9.0 <= color2 < -8.0, etc. </P> <P>The <I>N</I> setting is how many entries follow. The format of the entries depends on whether the color map style is continuous, discrete or sequential. In all cases the <I>color</I> setting can be any of the 140 pre-defined colors (see below) or a color name defined by the dump_modify color option. </P> <P>For continuous color maps, each entry has a <I>value</I> and a <I>color</I>. The <I>value</I> is either a number within the range of values or <I>min</I> or <I>max</I>. The <I>value</I> of the first entry must be <I>min</I> and the <I>value</I> of the last entry must be <I>max</I>. Any entries in between must have increasing values. Note that numeric values can be specified either as absolute numbers or as fractions (0.0 to 1.0) of the range, depending on the "a" or "f" in the style setting for the color map. </P> <P>Here is how the entries are used to determine the color of an individual atom, given the value X of its atom attribute. X will fall between 2 of the entry values. The color of the atom is linearly interpolated (in each of the RGB values) between the 2 colors associated with those entries. For example, if X = -5.0 and the 2 surrounding entries are "red" at -10.0 and "blue" at 0.0, then the atom's color will be halfway between "red" and "blue", which happens to be "purple". </P> <P>For discrete color maps, each entry has a <I>lo</I> and <I>hi</I> value and a <I>color</I>. The <I>lo</I> and <I>hi</I> settings are either numbers within the range of values or <I>lo</I> can be <I>min</I> or <I>hi</I> can be <I>max</I>. The <I>lo</I> and <I>hi</I> settings of the last entry must be <I>min</I> and <I>max</I>. Other entries can have any <I>lo</I> and <I>hi</I> values and the sub-ranges of different values can overlap. Note that numeric <I>lo</I> and <I>hi</I> values can be specified either as absolute numbers or as fractions (0.0 to 1.0) of the range, depending on the "a" or "f" in the style setting for the color map. </P> <P>Here is how the entries are used to determine the color of an individual atom, given the value X of its atom attribute. The entries are scanned from first to last. The first time that <I>lo</I> <= X <= <I>hi</I>, X is assigned the color associated with that entry. You can think of the last entry as assigning a default color (since it will always be matched by X), and the earlier entries as colors that override the default. Also note that no interpolation of a color RGB is done. All atoms will be drawn with one of the colors in the list of entries. </P> <P>For sequential color maps, each entry has only a <I>color</I>. Here is how the entries are used to determine the color of an individual atom, given the value X of its atom attribute. The range is partitioned into N bins of width <I>binsize</I>. Thus X will fall in a specific bin from 1 to N, say the Mth bin. If it falls on a boundary between 2 bins, it is considered to be in the higher of the 2 bins. Each bin is assigned a color from the E entries. If E < N, then the colors are repeated. For example if 2 entries with colors red and green are specified, then the odd numbered bins will be red and the even bins green. The color of the atom is the color of its bin. Note that the sequential color map is really a shorthand way of defining a discrete color map without having to specify where all the bin boundaries are. </P> <HR> <P>The <I>append</I> keyword applies to all dump styles except <I>cfg</I> and <I>xtc</I> and <I>dcd</I>. It also applies only to text output files, not to binary or gzipped files. If specified as <I>yes</I>, then dump snapshots are appended to the end of an existing dump file. If specified as <I>no</I>, then a new dump file will be created which will overwrite an existing file with the same name. This keyword can only take effect if the dump_modify command is used after the <A HREF = "dump.html">dump</A> command, but before the first command that causes dump snapshots to be output, e.g. a <A HREF = "run.html">run</A> or <A HREF = "minimize.html">minimize</A> command. Once the dump file has been opened, this keyword has no further effect. </P> <HR> <P>The <I>bcolor</I> keyword applies only to the dump <I>image</I> style. It can be used with the <A HREF = "dump_image.html">dump image</A> command, with its <I>bond</I> keyword, when its color setting is <I>type</I>, to set the color that bonds of each type will be drawn in the image. </P> <P>The specified <I>type</I> should be an integer from 1 to Nbondtypes = the number of bond types. A wildcard asterisk can be used in place of or in conjunction with the <I>type</I> argument to specify a range of bond types. This takes the form "*" or "*n" or "n*" or "m*n". If N = the number of bond types, then an asterisk with no numeric values means all types from 1 to N. A leading asterisk means all types from 1 to n (inclusive). A trailing asterisk means all types from n to N (inclusive). A middle asterisk means all types from m to n (inclusive). </P> <P>The specified <I>color</I> can be a single color which is any of the 140 pre-defined colors (see below) or a color name defined by the dump_modify color option. Or it can be two or more colors separated by a "/" character, e.g. red/green/blue. In the former case, that color is assigned to all the specified bond types. In the latter case, the list of colors are assigned in a round-robin fashion to each of the specified bond types. </P> <HR> <P>The <I>bdiam</I> keyword applies only to the dump <I>image</I> style. It can be used with the <A HREF = "dump_image.html">dump image</A> command, with its <I>bond</I> keyword, when its diam setting is <I>type</I>, to set the diameter that bonds of each type will be drawn in the image. The specified <I>type</I> should be an integer from 1 to Nbondtypes. As with the <I>bcolor</I> keyword, a wildcard asterisk can be used as part of the <I>type</I> argument to specify a range of bond types. The specified <I>diam</I> is the size in whatever distance <A HREF = "units.html">units</A> you are using, e.g. Angstroms. </P> <HR> <P>The <I>backcolor</I> keyword applies only to the dump <I>image</I> style. It sets the background color of the images. The color name can be any of the 140 pre-defined colors (see below) or a color name defined by the dump_modify color option. </P> <HR> <P>The <I>boxcolor</I> keyword applies only to the dump <I>image</I> style. It sets the color of the simulation box drawn around the atoms in each image. See the "dump image box" command for how to specify that a box be drawn. The color name can be any of the 140 pre-defined colors (see below) or a color name defined by the dump_modify color option. </P> <HR> <P>The <I>color</I> keyword applies only to the dump <I>image</I> style. It allows definition of a new color name, in addition to the 140-predefined colors (see below), and associates 3 red/green/blue RGB values with that color name. The color name can then be used with any other dump_modify keyword that takes a color name as a value. The RGB values should each be floating point values between 0.0 and 1.0 inclusive. </P> <P>When a color name is converted to RGB values, the user-defined color names are searched first, then the 140 pre-defined color names. This means you can also use the <I>color</I> keyword to overwrite one of the pre-defined color names with new RBG values. </P> <HR> <P>The <I>element</I> keyword applies only to the the dump <I>cfg</I> and <I>image</I> styles. It associates element names (e.g. H, C, Fe) with LAMMPS atom -types. In the case of dump <I>cfg</I>, it allows the <A HREF = "http://mt.seas.upenn.edu/Archive/Graphics/A">AtomEye</A> -visualization package to read the dump file and render atoms with the -appropriate size and color. In the case of dump <I>image</I>, the output -images will follow the same <A HREF = "http://mt.seas.upenn.edu/Archive/Graphics/A">AtomEye</A> convention. An element -name is specified for each atom type (1 to Ntype) in the simulation. -The same element name can be given to multiple atom types. +types. See the list of element names at the bottom of this page. In +the case of dump <I>cfg</I>, it allows the <A HREF = "http://mt.seas.upenn.edu/Archive/Graphics/A">AtomEye</A> visualization +package to read the dump file and render atoms with the appropriate +size and color. In the case of dump <I>image</I>, the output images will +follow the same <A HREF = "http://mt.seas.upenn.edu/Archive/Graphics/A">AtomEye</A> convention. An element name is +specified for each atom type (1 to Ntype) in the simulation. The same +element name can be given to multiple atom types. </P> <HR> <P>The <I>every</I> keyword changes the dump frequency originally specified by the <A HREF = "dump.html">dump</A> command to a new value. The every keyword can be specified in one of two ways. It can be a numeric value in which case it must be > 0. Or it can be an <A HREF = "variable.html">equal-style variable</A>, which should be specified as v_name, where name is the variable name. In this case, the variable is evaluated at the beginning of a run to determine the next timestep at which a dump snapshot will be written out. On that timestep, the variable will be evaluated again to determine the next timestep, etc. Thus the variable should return timestep values. See the stagger() and logfreq() math functions for <A HREF = "variable.html">equal-style variables</A>, as examples of useful functions to use in this context. Other similar math functions could easily be added as options for <A HREF = "variable.html">equal-style variables</A>. When using the variable option with the <I>every</I> keyword, you also need to use the <I>first</I> option if you want an initial snapshot written to the dump file. The <I>every</I> keyword cannot be used with the dump <I>dcd</I> style. </P> <P>For example, the following commands will write snapshots at timesteps 0,10,20,30,100,200,300,1000,2000,etc: </P> <PRE>variable s equal logfreq(10,3,10) dump 1 all atom 100 tmp.dump dump_modify 1 every v_s first yes </PRE> <HR> <P>The <I>first</I> keyword determines whether a dump snapshot is written on the very first timestep after the dump command is invoked. This will always occur if the current timestep is a multiple of N, the frequency specified in the <A HREF = "dump.html">dump</A> command, including timestep 0. But if this is not the case, a dump snapshot will only be written if the setting of this keyword is <I>yes</I>. If it is <I>no</I>, which is the default, then it will not be written. </P> <HR> <P>The <I>flush</I> keyword determines whether a flush operation is invoked after a dump snapshot is written to the dump file. A flush insures the output in that file is current (no buffering by the OS), even if LAMMPS halts before the simulation completes. Flushes cannot be performed with dump style <I>xtc</I>. </P> <P>The text-based dump styles have a default C-style format string which simply specifies %d for integers and %g for real values. The <I>format</I> keyword can be used to override the default with a new C-style format string. Do not include a trailing "\n" newline character in the format string. This option has no effect on the <I>dcd</I> and <I>xtc</I> dump styles since they write binary files. Note that for the <I>cfg</I> style, the first two fields (atom id and type) are not actually written into the CFG file, though you must include formats for them in the format string. </P> <HR> <P>The <I>image</I> keyword applies only to the dump <I>atom</I> style. If the image value is <I>yes</I>, 3 flags are appended to each atom's coords which are the absolute box image of the atom in each dimension. For example, an x image flag of -2 with a normalized coord of 0.5 means the atom is in the center of the box, but has passed thru the box boundary 2 times and is really 2 box lengths to the left of its current coordinate. Note that for dump style <I>custom</I> these various values can be printed in the dump file by using the appropriate atom attributes in the dump command itself. </P> <HR> <P>The <I>label</I> keyword applies only to the dump <I>local</I> style. When it writes local informatoin, such as bond or angle topology to a dump file, it will use the specified <I>label</I> to format the header. By default this includes 2 lines: </P> <PRE>ITEM: NUMBER OF ENTRIES ITEM: ENTRIES ... </PRE> <P>The word "ENTRIES" will be replaced with the string specified, e.g. BONDS or ANGLES. </P> <HR> <P>The <I>pad</I> keyword only applies when the dump filename is specified with a wildcard "*" character which becomes the timestep. If <I>pad</I> is 0, which is the default, the timestep is converted into a string of unpadded length, e.g. 100 or 12000 or 2000000. When <I>pad</I> is specified with <I>Nchar</I> > 0, the string is padded with leading zeroes so they are all the same length = <I>Nchar</I>. For example, pad 7 would yield 0000100, 0012000, 2000000. This can be useful so that post-processing programs can easily read the files in ascending timestep order. </P> <HR> <P>The <I>precision</I> keyword only applies to the dump <I>xtc</I> style. A specified value of N means that coordinates are stored to 1/N nanometer accuracy, e.g. for N = 1000, the coordinates are written to 1/1000 nanometer accuracy. </P> <HR> <P>The <I>region</I> keyword only applies to the dump <I>custom</I> and <I>cfg</I> and <I>image</I> styles. If specified, only atoms in the region will be written to the dump file or included in the image. Only one region can be applied as a filter (the last one specified). See the <A HREF = "region.html">region</A> command for more details. Note that a region can be defined as the "inside" or "outside" of a geometric shape, and it can be the "union" or "intersection" of a series of simpler regions. </P> <HR> <P>The <I>scale</I> keyword applies only to the dump <I>atom</I> style. A scale value of <I>yes</I> means atom coords are written in normalized units from 0.0 to 1.0 in each box dimension. If the simluation box is triclinic (tilted), then all atom coords will still be between 0.0 and 1.0. A value of <I>no</I> means they are written in absolute distance units (e.g. Angstroms or sigma). </P> <HR> <P>The <I>sort</I> keyword determines whether lines of per-atom output in a snapshot are sorted or not. A sort value of <I>off</I> means they will typically be written in indeterminate order, either in serial or parallel. This is the case even in serial if the <A HREF = "atom_modify.html">atom_modify sort</A> option is turned on, which it is by default, to improve performance. A sort value of <I>id</I> means sort the output by atom ID. A sort value of N or -N means sort the output by the value in the Nth column of per-atom info in either ascending or descending order. The dump <I>local</I> style cannot be sorted by atom ID, since there are typically multiple lines of output per atom. Some dump styles, such as <I>dcd</I> and <I>xtc</I>, require sorting by atom ID to format the output file correctly. </P> <P>IMPORTANT NOTE: Unless it is required by the dump style, sorting dump file output requires extra overhead in terms of CPU and communication cost, as well as memory, versus unsorted output. </P> <HR> <P>The <I>thresh</I> keyword only applies to the dump <I>custom</I> and <I>cfg</I> and <I>image</I> styles. Multiple thresholds can be specified. Specifying "none" turns off all threshold criteria. If thresholds are specified, only atoms whose attributes meet all the threshold criteria are written to the dump file or included in the image. The possible attributes that can be tested for are the same as those that can be specified in the <A HREF = "dump.html">dump custom</A> command, with the exception of the <I>element</I> attribute, since it is not a numeric value. Note that different attributes can be output by the dump custom command than are used as threshold criteria by the dump_modify command. E.g. you can output the coordinates and stress of atoms whose energy is above some threshold. </P> <HR> <P>The <I>unwrap</I> keyword only applies to the dump <I>dcd</I> and <I>xtc</I> styles. If set to <I>yes</I>, coordinates will be written "unwrapped" by the image flags for each atom. Unwrapped means that if the atom has passed thru a periodic boundary one or more times, the value is printed for what the coordinate would be if it had not been wrapped back into the periodic box. Note that these coordinates may thus be far outside the box size stored with the snapshot. </P> <HR> <P><B>Restrictions:</B> none </P> <P><B>Related commands:</B> </P> <P><A HREF = "dump.html">dump</A>, <A HREF = "dump_image.html">dump image</A>, <A HREF = "undump.html">undump</A> </P> <P><B>Default:</B> </P> <P>The option defaults are </P> <UL><LI>acolor = * red/green/blue/yellow/aqua/cyan <LI>adiam = * 1.0 <LI>amap = min max cf 2 min blue max red <LI>append = no <LI>bcolor = * red/green/blue/yellow/aqua/cyan <LI>bdiam = * 0.5 <LI>backcolor = black <LI>boxcolor = yellow <LI>color = 140 color names are pre-defined as listed below <LI>element = "C" for every atom type <LI>every = whatever it was set to via the <A HREF = "dump.html">dump</A> command <LI>first = no <LI>flush = yes <LI>format = %d and %g for each integer or floating point value <LI>image = no <LI>label = ENTRIES <LI>pad = 0 <LI>precision = 1000 <LI>region = none <LI>scale = yes <LI>sort = off for dump styles <I>atom</I>, <I>custom</I>, <I>cfg</I>, and <I>local</I> <LI>sort = id for dump styles <I>dcd</I>, <I>xtc</I>, and <I>xyz</I> <LI>thresh = none <LI>unwrap = no </UL> <HR> +<P>These are the standard 109 element names that LAMMPS pre-defines for +use with the <A HREF = "dump_image.html">dump image</A> and dump_modify commands. +</P> +<UL><LI>1-10 = "H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne" +<LI>11-20 = "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca" +<LI>21-30 = "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn" +<LI>31-40 = "Ga", "Ge", "As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "Zr" +<LI>41-50 = "Nb", "Mo", "Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn" +<LI>51-60 = "Sb", "Te", "I", "Xe", "Cs", "Ba", "La", "Ce", "Pr", "Nd" +<LI>61-70 = "Pm", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb" +<LI>71-80 = "Lu", "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hg" +<LI>81-90 = "Tl", "Pb", "Bi", "Po", "At", "Rn", "Fr", "Ra", "Ac", "Th" +<LI>91-100 = "Pa", "U", "Np", "Pu", "Am", "Cm", "Bk", "Cf", "Es", "Fm" +<LI>101-109 = "Md", "No", "Lr", "Rf", "Db", "Sg", "Bh", "Hs", "Mt" +</UL> +<HR> + <P>These are the 140 colors that LAMMPS pre-defines for use with the <A HREF = "dump_image.html">dump image</A> and dump_modify commands. Additional colors can be defined with the dump_modify color command. The 3 numbers listed for each name are the RGB (red/green/blue) values. Divide each value by 255 to get the equivalent 0.0 to 1.0 value. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR><TD >aliceblue = 240, 248, 255 </TD><TD >antiquewhite = 250, 235, 215 </TD><TD >aqua = 0, 255, 255 </TD><TD >aquamarine = 127, 255, 212 </TD><TD >azure = 240, 255, 255 </TD></TR> <TR><TD >beige = 245, 245, 220 </TD><TD >bisque = 255, 228, 196 </TD><TD >black = 0, 0, 0 </TD><TD >blanchedalmond = 255, 255, 205 </TD><TD >blue = 0, 0, 255 </TD></TR> <TR><TD >blueviolet = 138, 43, 226 </TD><TD >brown = 165, 42, 42 </TD><TD >burlywood = 222, 184, 135 </TD><TD >cadetblue = 95, 158, 160 </TD><TD >chartreuse = 127, 255, 0 </TD></TR> <TR><TD >chocolate = 210, 105, 30 </TD><TD >coral = 255, 127, 80 </TD><TD >cornflowerblue = 100, 149, 237 </TD><TD >cornsilk = 255, 248, 220 </TD><TD >crimson = 220, 20, 60 </TD></TR> <TR><TD >cyan = 0, 255, 255 </TD><TD >darkblue = 0, 0, 139 </TD><TD >darkcyan = 0, 139, 139 </TD><TD >darkgoldenrod = 184, 134, 11 </TD><TD >darkgray = 169, 169, 169 </TD></TR> <TR><TD >darkgreen = 0, 100, 0 </TD><TD >darkkhaki = 189, 183, 107 </TD><TD >darkmagenta = 139, 0, 139 </TD><TD >darkolivegreen = 85, 107, 47 </TD><TD >darkorange = 255, 140, 0 </TD></TR> <TR><TD >darkorchid = 153, 50, 204 </TD><TD >darkred = 139, 0, 0 </TD><TD >darksalmon = 233, 150, 122 </TD><TD >darkseagreen = 143, 188, 143 </TD><TD >darkslateblue = 72, 61, 139 </TD></TR> <TR><TD >darkslategray = 47, 79, 79 </TD><TD >darkturquoise = 0, 206, 209 </TD><TD >darkviolet = 148, 0, 211 </TD><TD >deeppink = 255, 20, 147 </TD><TD >deepskyblue = 0, 191, 255 </TD></TR> <TR><TD >dimgray = 105, 105, 105 </TD><TD >dodgerblue = 30, 144, 255 </TD><TD >firebrick = 178, 34, 34 </TD><TD >floralwhite = 255, 250, 240 </TD><TD >forestgreen = 34, 139, 34 </TD></TR> <TR><TD >fuchsia = 255, 0, 255 </TD><TD >gainsboro = 220, 220, 220 </TD><TD >ghostwhite = 248, 248, 255 </TD><TD >gold = 255, 215, 0 </TD><TD >goldenrod = 218, 165, 32 </TD></TR> <TR><TD >gray = 128, 128, 128 </TD><TD >green = 0, 128, 0 </TD><TD >greenyellow = 173, 255, 47 </TD><TD >honeydew = 240, 255, 240 </TD><TD >hotpink = 255, 105, 180 </TD></TR> <TR><TD >indianred = 205, 92, 92 </TD><TD >indigo = 75, 0, 130 </TD><TD >ivory = 255, 240, 240 </TD><TD >khaki = 240, 230, 140 </TD><TD >lavender = 230, 230, 250 </TD></TR> <TR><TD >lavenderblush = 255, 240, 245 </TD><TD >lawngreen = 124, 252, 0 </TD><TD >lemonchiffon = 255, 250, 205 </TD><TD >lightblue = 173, 216, 230 </TD><TD >lightcoral = 240, 128, 128 </TD></TR> <TR><TD >lightcyan = 224, 255, 255 </TD><TD >lightgoldenrodyellow = 250, 250, 210 </TD><TD >lightgreen = 144, 238, 144 </TD><TD >lightgrey = 211, 211, 211 </TD><TD >lightpink = 255, 182, 193 </TD></TR> <TR><TD >lightsalmon = 255, 160, 122 </TD><TD >lightseagreen = 32, 178, 170 </TD><TD >lightskyblue = 135, 206, 250 </TD><TD >lightslategray = 119, 136, 153 </TD><TD >lightsteelblue = 176, 196, 222 </TD></TR> <TR><TD >lightyellow = 255, 255, 224 </TD><TD >lime = 0, 255, 0 </TD><TD >limegreen = 50, 205, 50 </TD><TD >linen = 250, 240, 230 </TD><TD >magenta = 255, 0, 255 </TD></TR> <TR><TD >maroon = 128, 0, 0 </TD><TD >mediumaquamarine = 102, 205, 170 </TD><TD >mediumblue = 0, 0, 205 </TD><TD >mediumorchid = 186, 85, 211 </TD><TD >mediumpurple = 147, 112, 219 </TD></TR> <TR><TD >mediumseagreen = 60, 179, 113 </TD><TD >mediumslateblue = 123, 104, 238 </TD><TD >mediumspringgreen = 0, 250, 154 </TD><TD >mediumturquoise = 72, 209, 204 </TD><TD >mediumvioletred = 199, 21, 133 </TD></TR> <TR><TD >midnightblue = 25, 25, 112 </TD><TD >mintcream = 245, 255, 250 </TD><TD >mistyrose = 255, 228, 225 </TD><TD >moccasin = 255, 228, 181 </TD><TD >navajowhite = 255, 222, 173 </TD></TR> <TR><TD >navy = 0, 0, 128 </TD><TD >oldlace = 253, 245, 230 </TD><TD >olive = 128, 128, 0 </TD><TD >olivedrab = 107, 142, 35 </TD><TD >orange = 255, 165, 0 </TD></TR> <TR><TD >orangered = 255, 69, 0 </TD><TD >orchid = 218, 112, 214 </TD><TD >palegoldenrod = 238, 232, 170 </TD><TD >palegreen = 152, 251, 152 </TD><TD >paleturquoise = 175, 238, 238 </TD></TR> <TR><TD >palevioletred = 219, 112, 147 </TD><TD >papayawhip = 255, 239, 213 </TD><TD >peachpuff = 255, 239, 213 </TD><TD >peru = 205, 133, 63 </TD><TD >pink = 255, 192, 203 </TD></TR> <TR><TD >plum = 221, 160, 221 </TD><TD >powderblue = 176, 224, 230 </TD><TD >purple = 128, 0, 128 </TD><TD >red = 255, 0, 0 </TD><TD >rosybrown = 188, 143, 143 </TD></TR> <TR><TD >royalblue = 65, 105, 225 </TD><TD >saddlebrown = 139, 69, 19 </TD><TD >salmon = 250, 128, 114 </TD><TD >sandybrown = 244, 164, 96 </TD><TD >seagreen = 46, 139, 87 </TD></TR> <TR><TD >seashell = 255, 245, 238 </TD><TD >sienna = 160, 82, 45 </TD><TD >silver = 192, 192, 192 </TD><TD >skyblue = 135, 206, 235 </TD><TD >slateblue = 106, 90, 205 </TD></TR> <TR><TD >slategray = 112, 128, 144 </TD><TD >snow = 255, 250, 250 </TD><TD >springgreen = 0, 255, 127 </TD><TD >steelblue = 70, 130, 180 </TD><TD >tan = 210, 180, 140 </TD></TR> <TR><TD >teal = 0, 128, 128 </TD><TD >thistle = 216, 191, 216 </TD><TD >tomato = 253, 99, 71 </TD><TD >turquoise = 64, 224, 208 </TD><TD >violet = 238, 130, 238 </TD></TR> <TR><TD >wheat = 245, 222, 179 </TD><TD >white = 255, 255, 255 </TD><TD >whitesmoke = 245, 245, 245 </TD><TD >yellow = 255, 255, 0 </TD><TD >yellowgreen = 154, 205, 50 </TD></TR></TABLE></DIV> </HTML> diff --git a/doc/dump_modify.txt b/doc/dump_modify.txt index 758c54df8..7ad513327 100644 --- a/doc/dump_modify.txt +++ b/doc/dump_modify.txt @@ -1,687 +1,705 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line dump_modify command :h3 [Syntax:] dump_modify dump-ID keyword values ... :pre dump-ID = ID of dump to modify :ulb,l one or more keyword/value pairs may be appended :l keyword = {acolor} or {adiam} or {amap} or {append} or {bcolor} or {bdiam} or {backcolor} or {boxcolor} or {color} or {every} or {flush} or {format} or {image} or {label} or {precision} or {region} or {scale} or {sort} or {thresh} or {unwrap} :l {acolor} args = type color type = atom type or range of types (see below) color = name of color or color1/color2/... {adiam} args = type diam type = atom type or range of types (see below) diam = diameter of atoms of that type (distance units) {amap} args = lo hi style delta N entry1 entry2 ... entryN lo = number or {min} = lower bound of range of color map hi = number or {max} = upper bound of range of color map style = 2 letters = "c" or "d" or "s" plus "a" or "f" "c" for continuous "d" for discrete "s" for sequential "a" for absolute "f" for fractional delta = binsize (only used for style "s", otherwise ignored) binsize = range is divided into bins of this width N = # of subsequent entries entry = value color (for continuous style) value = number or {min} or {max} = single value within range color = name of color used for that value entry = lo hi color (for discrete style) lo/hi = number or {min} or {max} = lower/upper bound of subset of range color = name of color used for that subset of values entry = color (for sequential style) color = name of color used for a bin of values {append} arg = {yes} or {no} {bcolor} args = type color type = bond type or range of types (see below) color = name of color or color1/color2/... {bdiam} args = type diam type = bond type or range of types (see below) diam = diameter of bonds of that type (distance units) {backcolor} arg = color color = name of color for background {boxcolor} arg = color color = name of color for box lines {color} args = name R G B name = name of color R,G,B = red/green/blue numeric values from 0.0 to 1.0 {element} args = E1 E2 ... EN, where N = # of atom types E1,...,EN = element name, e.g. C or Fe or Ga {every} arg = N N = dump every this many timesteps N can be a variable (see below) {first} arg = {yes} or {no} {format} arg = C-style format string for one line of output {flush} arg = {yes} or {no} {image} arg = {yes} or {no} {label} arg = string string = character string (e.g. BONDS) to use in header of dump local file {pad} arg = Nchar = # of characters to convert timestep to {precision} arg = power-of-10 value from 10 to 1000000 {region} arg = region-ID or "none" {scale} arg = {yes} or {no} {sort} arg = {off} or {id} or N or -N off = no sorting of per-atom lines within a snapshot id = sort per-atom lines by atom ID N = sort per-atom lines in ascending order by the Nth column -N = sort per-atom lines in descending order by the Nth column {thresh} args = attribute operation value attribute = same attributes (x,fy,etotal,sxx,etc) used by dump custom style operation = "<" or "<=" or ">" or ">=" or "==" or "!=" value = numeric value to compare to these 3 args can be replaced by the word "none" to turn off thresholding {unwrap} arg = {yes} or {no} :pre :ule [Examples:] dump_modify 1 format "%d %d %20.15g %g %g" scale yes dump_modify myDump image yes scale no flush yes dump_modify 1 region mySphere thresh x < 0.0 thresh epair >= 3.2 dump_modify xtcdump precision 10000 dump_modify 1 every 1000 dump_modify 1 every v_myVar dump_modify 1 amap min max cf 0.0 3 min green 0.5 yellow max blue boxcolor red :pre [Description:] Modify the parameters of a previously defined dump command. Not all parameters are relevant to all dump styles. :line The {acolor} keyword applies only to the dump {image} style. It can be used with the "dump image"_dump_image.html command, when its atom color setting is {type}, to set the color that atoms of each type will be drawn in the image. The specified {type} should be an integer from 1 to Ntypes = the number of atom types. A wildcard asterisk can be used in place of or in conjunction with the {type} argument to specify a range of atom types. This takes the form "*" or "*n" or "n*" or "m*n". If N = the number of atom types, then an asterisk with no numeric values means all types from 1 to N. A leading asterisk means all types from 1 to n (inclusive). A trailing asterisk means all types from n to N (inclusive). A middle asterisk means all types from m to n (inclusive). The specified {color} can be a single color which is any of the 140 pre-defined colors (see below) or a color name defined by the dump_modify color option. Or it can be two or more colors separated by a "/" character, e.g. red/green/blue. In the former case, that color is assigned to all the specified atom types. In the latter case, the list of colors are assigned in a round-robin fashion to each of the specified atom types. :line The {adiam} keyword applies only to the dump {image} style. It can be used with the "dump image"_dump_image.html command, when its atom diameter setting is {type}, to set the size that atoms of each type will be drawn in the image. The specified {type} should be an integer from 1 to Ntypes. As with the {acolor} keyword, a wildcard asterisk can be used as part of the {type} argument to specify a range of atomt types. The specified {diam} is the size in whatever distance "units"_units.html the input script is using, e.g. Angstroms. :line The {amap} keyword applies only to the dump {image} style. It can be used with the "dump image"_dump_image.html command, with its {atom} keyword, when its atom setting is an atom-attribute, to setup a color map. The color map is used to assign a specific RGB (red/green/blue) color value to an individual atom when it is drawn, based on the atom's attribute, which is a numeric value, e.g. its x-component of velocity if the atom-attribute "vx" was specified. The basic idea of a color map is that the atom-attribute will be within a range of values, and that range is associated with a a series of colors (e.g. red, blue, green). An atom's specific value (vx = -3.2) can then mapped to the series of colors (e.g. halfway between red and blue), and a specific color is determined via an interpolation procedure. There are many possible options for the color map, enabled by the {amap} keyword. Here are the details. The {lo} and {hi} settings determine the range of values allowed for the atom attribute. If numeric values are used for {lo} and/or {hi}, then values that are lower/higher than that value are set to the value. I.e. the range is static. If {lo} is specified as {min} or {hi} as {max} then the range is dynamic, and the lower and/or upper bound will be calculated each time an image is drawn, based on the set of atoms being visualized. The {style} setting is two letters, such as "ca". The first letter is either "c" for continuous, "d" for discrete, or "s" for sequential. The second letter is either "a" for absolute, or "f" for fractional. A continuous color map is one in which the color changes continuously from value to value within the range. A discrete color map is one in which discrete colors are assigned to sub-ranges of values within the range. A sequential color map is one in which discrete colors are assigned to a sequence of sub-ranges of values covering the entire range. An absolute color map is one in which the values to which colors are assigned are specified explicitly as values within the range. A fractional color map is one in which the values to which colors are assigned are specified as a fractional portion of the range. For example if the range is from -10.0 to 10.0, and the color red is to be assigned to atoms with a value of 5.0, then for an absolute color map the number 5.0 would be used. But for a fractional map, the number 0.75 would be used since 5.0 is 3/4 of the way from -10.0 to 10.0. The {delta} setting is only specified if the style is sequential. It specifies the bin size to use within the range for assigning consecutive colors to. For example, if the range is from -10.0 to 10.0 and a {delta} of 1.0 is used, then 20 colors will be assigned to the range. The first will be from -10.0 <= color1 < -9.0, then 2nd from -9.0 <= color2 < -8.0, etc. The {N} setting is how many entries follow. The format of the entries depends on whether the color map style is continuous, discrete or sequential. In all cases the {color} setting can be any of the 140 pre-defined colors (see below) or a color name defined by the dump_modify color option. For continuous color maps, each entry has a {value} and a {color}. The {value} is either a number within the range of values or {min} or {max}. The {value} of the first entry must be {min} and the {value} of the last entry must be {max}. Any entries in between must have increasing values. Note that numeric values can be specified either as absolute numbers or as fractions (0.0 to 1.0) of the range, depending on the "a" or "f" in the style setting for the color map. Here is how the entries are used to determine the color of an individual atom, given the value X of its atom attribute. X will fall between 2 of the entry values. The color of the atom is linearly interpolated (in each of the RGB values) between the 2 colors associated with those entries. For example, if X = -5.0 and the 2 surrounding entries are "red" at -10.0 and "blue" at 0.0, then the atom's color will be halfway between "red" and "blue", which happens to be "purple". For discrete color maps, each entry has a {lo} and {hi} value and a {color}. The {lo} and {hi} settings are either numbers within the range of values or {lo} can be {min} or {hi} can be {max}. The {lo} and {hi} settings of the last entry must be {min} and {max}. Other entries can have any {lo} and {hi} values and the sub-ranges of different values can overlap. Note that numeric {lo} and {hi} values can be specified either as absolute numbers or as fractions (0.0 to 1.0) of the range, depending on the "a" or "f" in the style setting for the color map. Here is how the entries are used to determine the color of an individual atom, given the value X of its atom attribute. The entries are scanned from first to last. The first time that {lo} <= X <= {hi}, X is assigned the color associated with that entry. You can think of the last entry as assigning a default color (since it will always be matched by X), and the earlier entries as colors that override the default. Also note that no interpolation of a color RGB is done. All atoms will be drawn with one of the colors in the list of entries. For sequential color maps, each entry has only a {color}. Here is how the entries are used to determine the color of an individual atom, given the value X of its atom attribute. The range is partitioned into N bins of width {binsize}. Thus X will fall in a specific bin from 1 to N, say the Mth bin. If it falls on a boundary between 2 bins, it is considered to be in the higher of the 2 bins. Each bin is assigned a color from the E entries. If E < N, then the colors are repeated. For example if 2 entries with colors red and green are specified, then the odd numbered bins will be red and the even bins green. The color of the atom is the color of its bin. Note that the sequential color map is really a shorthand way of defining a discrete color map without having to specify where all the bin boundaries are. :line The {append} keyword applies to all dump styles except {cfg} and {xtc} and {dcd}. It also applies only to text output files, not to binary or gzipped files. If specified as {yes}, then dump snapshots are appended to the end of an existing dump file. If specified as {no}, then a new dump file will be created which will overwrite an existing file with the same name. This keyword can only take effect if the dump_modify command is used after the "dump"_dump.html command, but before the first command that causes dump snapshots to be output, e.g. a "run"_run.html or "minimize"_minimize.html command. Once the dump file has been opened, this keyword has no further effect. :line The {bcolor} keyword applies only to the dump {image} style. It can be used with the "dump image"_dump_image.html command, with its {bond} keyword, when its color setting is {type}, to set the color that bonds of each type will be drawn in the image. The specified {type} should be an integer from 1 to Nbondtypes = the number of bond types. A wildcard asterisk can be used in place of or in conjunction with the {type} argument to specify a range of bond types. This takes the form "*" or "*n" or "n*" or "m*n". If N = the number of bond types, then an asterisk with no numeric values means all types from 1 to N. A leading asterisk means all types from 1 to n (inclusive). A trailing asterisk means all types from n to N (inclusive). A middle asterisk means all types from m to n (inclusive). The specified {color} can be a single color which is any of the 140 pre-defined colors (see below) or a color name defined by the dump_modify color option. Or it can be two or more colors separated by a "/" character, e.g. red/green/blue. In the former case, that color is assigned to all the specified bond types. In the latter case, the list of colors are assigned in a round-robin fashion to each of the specified bond types. :line The {bdiam} keyword applies only to the dump {image} style. It can be used with the "dump image"_dump_image.html command, with its {bond} keyword, when its diam setting is {type}, to set the diameter that bonds of each type will be drawn in the image. The specified {type} should be an integer from 1 to Nbondtypes. As with the {bcolor} keyword, a wildcard asterisk can be used as part of the {type} argument to specify a range of bond types. The specified {diam} is the size in whatever distance "units"_units.html you are using, e.g. Angstroms. :line The {backcolor} keyword applies only to the dump {image} style. It sets the background color of the images. The color name can be any of the 140 pre-defined colors (see below) or a color name defined by the dump_modify color option. :line The {boxcolor} keyword applies only to the dump {image} style. It sets the color of the simulation box drawn around the atoms in each image. See the "dump image box" command for how to specify that a box be drawn. The color name can be any of the 140 pre-defined colors (see below) or a color name defined by the dump_modify color option. :line The {color} keyword applies only to the dump {image} style. It allows definition of a new color name, in addition to the 140-predefined colors (see below), and associates 3 red/green/blue RGB values with that color name. The color name can then be used with any other dump_modify keyword that takes a color name as a value. The RGB values should each be floating point values between 0.0 and 1.0 inclusive. When a color name is converted to RGB values, the user-defined color names are searched first, then the 140 pre-defined color names. This means you can also use the {color} keyword to overwrite one of the pre-defined color names with new RBG values. :line The {element} keyword applies only to the the dump {cfg} and {image} styles. It associates element names (e.g. H, C, Fe) with LAMMPS atom -types. In the case of dump {cfg}, it allows the "AtomEye"_atomeye -visualization package to read the dump file and render atoms with the -appropriate size and color. In the case of dump {image}, the output -images will follow the same "AtomEye"_atomeye convention. An element -name is specified for each atom type (1 to Ntype) in the simulation. -The same element name can be given to multiple atom types. +types. See the list of element names at the bottom of this page. In +the case of dump {cfg}, it allows the "AtomEye"_atomeye visualization +package to read the dump file and render atoms with the appropriate +size and color. In the case of dump {image}, the output images will +follow the same "AtomEye"_atomeye convention. An element name is +specified for each atom type (1 to Ntype) in the simulation. The same +element name can be given to multiple atom types. :link(atomeye,http://mt.seas.upenn.edu/Archive/Graphics/A) :line The {every} keyword changes the dump frequency originally specified by the "dump"_dump.html command to a new value. The every keyword can be specified in one of two ways. It can be a numeric value in which case it must be > 0. Or it can be an "equal-style variable"_variable.html, which should be specified as v_name, where name is the variable name. In this case, the variable is evaluated at the beginning of a run to determine the next timestep at which a dump snapshot will be written out. On that timestep, the variable will be evaluated again to determine the next timestep, etc. Thus the variable should return timestep values. See the stagger() and logfreq() math functions for "equal-style variables"_variable.html, as examples of useful functions to use in this context. Other similar math functions could easily be added as options for "equal-style variables"_variable.html. When using the variable option with the {every} keyword, you also need to use the {first} option if you want an initial snapshot written to the dump file. The {every} keyword cannot be used with the dump {dcd} style. For example, the following commands will write snapshots at timesteps 0,10,20,30,100,200,300,1000,2000,etc: variable s equal logfreq(10,3,10) dump 1 all atom 100 tmp.dump dump_modify 1 every v_s first yes :pre :line The {first} keyword determines whether a dump snapshot is written on the very first timestep after the dump command is invoked. This will always occur if the current timestep is a multiple of N, the frequency specified in the "dump"_dump.html command, including timestep 0. But if this is not the case, a dump snapshot will only be written if the setting of this keyword is {yes}. If it is {no}, which is the default, then it will not be written. :line The {flush} keyword determines whether a flush operation is invoked after a dump snapshot is written to the dump file. A flush insures the output in that file is current (no buffering by the OS), even if LAMMPS halts before the simulation completes. Flushes cannot be performed with dump style {xtc}. The text-based dump styles have a default C-style format string which simply specifies %d for integers and %g for real values. The {format} keyword can be used to override the default with a new C-style format string. Do not include a trailing "\n" newline character in the format string. This option has no effect on the {dcd} and {xtc} dump styles since they write binary files. Note that for the {cfg} style, the first two fields (atom id and type) are not actually written into the CFG file, though you must include formats for them in the format string. :line The {image} keyword applies only to the dump {atom} style. If the image value is {yes}, 3 flags are appended to each atom's coords which are the absolute box image of the atom in each dimension. For example, an x image flag of -2 with a normalized coord of 0.5 means the atom is in the center of the box, but has passed thru the box boundary 2 times and is really 2 box lengths to the left of its current coordinate. Note that for dump style {custom} these various values can be printed in the dump file by using the appropriate atom attributes in the dump command itself. :line The {label} keyword applies only to the dump {local} style. When it writes local informatoin, such as bond or angle topology to a dump file, it will use the specified {label} to format the header. By default this includes 2 lines: ITEM: NUMBER OF ENTRIES ITEM: ENTRIES ... :pre The word "ENTRIES" will be replaced with the string specified, e.g. BONDS or ANGLES. :line The {pad} keyword only applies when the dump filename is specified with a wildcard "*" character which becomes the timestep. If {pad} is 0, which is the default, the timestep is converted into a string of unpadded length, e.g. 100 or 12000 or 2000000. When {pad} is specified with {Nchar} > 0, the string is padded with leading zeroes so they are all the same length = {Nchar}. For example, pad 7 would yield 0000100, 0012000, 2000000. This can be useful so that post-processing programs can easily read the files in ascending timestep order. :line The {precision} keyword only applies to the dump {xtc} style. A specified value of N means that coordinates are stored to 1/N nanometer accuracy, e.g. for N = 1000, the coordinates are written to 1/1000 nanometer accuracy. :line The {region} keyword only applies to the dump {custom} and {cfg} and {image} styles. If specified, only atoms in the region will be written to the dump file or included in the image. Only one region can be applied as a filter (the last one specified). See the "region"_region.html command for more details. Note that a region can be defined as the "inside" or "outside" of a geometric shape, and it can be the "union" or "intersection" of a series of simpler regions. :line The {scale} keyword applies only to the dump {atom} style. A scale value of {yes} means atom coords are written in normalized units from 0.0 to 1.0 in each box dimension. If the simluation box is triclinic (tilted), then all atom coords will still be between 0.0 and 1.0. A value of {no} means they are written in absolute distance units (e.g. Angstroms or sigma). :line The {sort} keyword determines whether lines of per-atom output in a snapshot are sorted or not. A sort value of {off} means they will typically be written in indeterminate order, either in serial or parallel. This is the case even in serial if the "atom_modify sort"_atom_modify.html option is turned on, which it is by default, to improve performance. A sort value of {id} means sort the output by atom ID. A sort value of N or -N means sort the output by the value in the Nth column of per-atom info in either ascending or descending order. The dump {local} style cannot be sorted by atom ID, since there are typically multiple lines of output per atom. Some dump styles, such as {dcd} and {xtc}, require sorting by atom ID to format the output file correctly. IMPORTANT NOTE: Unless it is required by the dump style, sorting dump file output requires extra overhead in terms of CPU and communication cost, as well as memory, versus unsorted output. :line The {thresh} keyword only applies to the dump {custom} and {cfg} and {image} styles. Multiple thresholds can be specified. Specifying "none" turns off all threshold criteria. If thresholds are specified, only atoms whose attributes meet all the threshold criteria are written to the dump file or included in the image. The possible attributes that can be tested for are the same as those that can be specified in the "dump custom"_dump.html command, with the exception of the {element} attribute, since it is not a numeric value. Note that different attributes can be output by the dump custom command than are used as threshold criteria by the dump_modify command. E.g. you can output the coordinates and stress of atoms whose energy is above some threshold. :line The {unwrap} keyword only applies to the dump {dcd} and {xtc} styles. If set to {yes}, coordinates will be written "unwrapped" by the image flags for each atom. Unwrapped means that if the atom has passed thru a periodic boundary one or more times, the value is printed for what the coordinate would be if it had not been wrapped back into the periodic box. Note that these coordinates may thus be far outside the box size stored with the snapshot. :line [Restrictions:] none [Related commands:] "dump"_dump.html, "dump image"_dump_image.html, "undump"_undump.html [Default:] The option defaults are acolor = * red/green/blue/yellow/aqua/cyan adiam = * 1.0 amap = min max cf 2 min blue max red append = no bcolor = * red/green/blue/yellow/aqua/cyan bdiam = * 0.5 backcolor = black boxcolor = yellow color = 140 color names are pre-defined as listed below element = "C" for every atom type every = whatever it was set to via the "dump"_dump.html command first = no flush = yes format = %d and %g for each integer or floating point value image = no label = ENTRIES pad = 0 precision = 1000 region = none scale = yes sort = off for dump styles {atom}, {custom}, {cfg}, and {local} sort = id for dump styles {dcd}, {xtc}, and {xyz} thresh = none unwrap = no :ul :line +These are the standard 109 element names that LAMMPS pre-defines for +use with the "dump image"_dump_image.html and dump_modify commands. + +1-10 = "H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne" +11-20 = "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca" +21-30 = "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn" +31-40 = "Ga", "Ge", "As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "Zr" +41-50 = "Nb", "Mo", "Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn" +51-60 = "Sb", "Te", "I", "Xe", "Cs", "Ba", "La", "Ce", "Pr", "Nd" +61-70 = "Pm", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb" +71-80 = "Lu", "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hg" +81-90 = "Tl", "Pb", "Bi", "Po", "At", "Rn", "Fr", "Ra", "Ac", "Th" +91-100 = "Pa", "U", "Np", "Pu", "Am", "Cm", "Bk", "Cf", "Es", "Fm" +101-109 = "Md", "No", "Lr", "Rf", "Db", "Sg", "Bh", "Hs", "Mt" :ul + +:line + These are the 140 colors that LAMMPS pre-defines for use with the "dump image"_dump_image.html and dump_modify commands. Additional colors can be defined with the dump_modify color command. The 3 numbers listed for each name are the RGB (red/green/blue) values. Divide each value by 255 to get the equivalent 0.0 to 1.0 value. aliceblue = 240, 248, 255 | antiquewhite = 250, 235, 215 | aqua = 0, 255, 255 | aquamarine = 127, 255, 212 | azure = 240, 255, 255 | beige = 245, 245, 220 | bisque = 255, 228, 196 | black = 0, 0, 0 | blanchedalmond = 255, 255, 205 | blue = 0, 0, 255 | blueviolet = 138, 43, 226 | brown = 165, 42, 42 | burlywood = 222, 184, 135 | cadetblue = 95, 158, 160 | chartreuse = 127, 255, 0 | chocolate = 210, 105, 30 | coral = 255, 127, 80 | cornflowerblue = 100, 149, 237 | cornsilk = 255, 248, 220 | crimson = 220, 20, 60 | cyan = 0, 255, 255 | darkblue = 0, 0, 139 | darkcyan = 0, 139, 139 | darkgoldenrod = 184, 134, 11 | darkgray = 169, 169, 169 | darkgreen = 0, 100, 0 | darkkhaki = 189, 183, 107 | darkmagenta = 139, 0, 139 | darkolivegreen = 85, 107, 47 | darkorange = 255, 140, 0 | darkorchid = 153, 50, 204 | darkred = 139, 0, 0 | darksalmon = 233, 150, 122 | darkseagreen = 143, 188, 143 | darkslateblue = 72, 61, 139 | darkslategray = 47, 79, 79 | darkturquoise = 0, 206, 209 | darkviolet = 148, 0, 211 | deeppink = 255, 20, 147 | deepskyblue = 0, 191, 255 | dimgray = 105, 105, 105 | dodgerblue = 30, 144, 255 | firebrick = 178, 34, 34 | floralwhite = 255, 250, 240 | forestgreen = 34, 139, 34 | fuchsia = 255, 0, 255 | gainsboro = 220, 220, 220 | ghostwhite = 248, 248, 255 | gold = 255, 215, 0 | goldenrod = 218, 165, 32 | gray = 128, 128, 128 | green = 0, 128, 0 | greenyellow = 173, 255, 47 | honeydew = 240, 255, 240 | hotpink = 255, 105, 180 | indianred = 205, 92, 92 | indigo = 75, 0, 130 | ivory = 255, 240, 240 | khaki = 240, 230, 140 | lavender = 230, 230, 250 | lavenderblush = 255, 240, 245 | lawngreen = 124, 252, 0 | lemonchiffon = 255, 250, 205 | lightblue = 173, 216, 230 | lightcoral = 240, 128, 128 | lightcyan = 224, 255, 255 | lightgoldenrodyellow = 250, 250, 210 | lightgreen = 144, 238, 144 | lightgrey = 211, 211, 211 | lightpink = 255, 182, 193 | lightsalmon = 255, 160, 122 | lightseagreen = 32, 178, 170 | lightskyblue = 135, 206, 250 | lightslategray = 119, 136, 153 | lightsteelblue = 176, 196, 222 | lightyellow = 255, 255, 224 | lime = 0, 255, 0 | limegreen = 50, 205, 50 | linen = 250, 240, 230 | magenta = 255, 0, 255 | maroon = 128, 0, 0 | mediumaquamarine = 102, 205, 170 | mediumblue = 0, 0, 205 | mediumorchid = 186, 85, 211 | mediumpurple = 147, 112, 219 | mediumseagreen = 60, 179, 113 | mediumslateblue = 123, 104, 238 | mediumspringgreen = 0, 250, 154 | mediumturquoise = 72, 209, 204 | mediumvioletred = 199, 21, 133 | midnightblue = 25, 25, 112 | mintcream = 245, 255, 250 | mistyrose = 255, 228, 225 | moccasin = 255, 228, 181 | navajowhite = 255, 222, 173 | navy = 0, 0, 128 | oldlace = 253, 245, 230 | olive = 128, 128, 0 | olivedrab = 107, 142, 35 | orange = 255, 165, 0 | orangered = 255, 69, 0 | orchid = 218, 112, 214 | palegoldenrod = 238, 232, 170 | palegreen = 152, 251, 152 | paleturquoise = 175, 238, 238 | palevioletred = 219, 112, 147 | papayawhip = 255, 239, 213 | peachpuff = 255, 239, 213 | peru = 205, 133, 63 | pink = 255, 192, 203 | plum = 221, 160, 221 | powderblue = 176, 224, 230 | purple = 128, 0, 128 | red = 255, 0, 0 | rosybrown = 188, 143, 143 | royalblue = 65, 105, 225 | saddlebrown = 139, 69, 19 | salmon = 250, 128, 114 | sandybrown = 244, 164, 96 | seagreen = 46, 139, 87 | seashell = 255, 245, 238 | sienna = 160, 82, 45 | silver = 192, 192, 192 | skyblue = 135, 206, 235 | slateblue = 106, 90, 205 | slategray = 112, 128, 144 | snow = 255, 250, 250 | springgreen = 0, 255, 127 | steelblue = 70, 130, 180 | tan = 210, 180, 140 | teal = 0, 128, 128 | thistle = 216, 191, 216 | tomato = 253, 99, 71 | turquoise = 64, 224, 208 | violet = 238, 130, 238 | wheat = 245, 222, 179 | white = 255, 255, 255 | whitesmoke = 245, 245, 245 | yellow = 255, 255, 0 | yellowgreen = 154, 205, 50 :tb(c=5,s=|) diff --git a/doc/fix.html b/doc/fix.html index b2cac319d..1ee922ec7 100644 --- a/doc/fix.html +++ b/doc/fix.html @@ -1,270 +1,272 @@ <HTML> <CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> </CENTER> <HR> <H3>fix command </H3> <P><B>Syntax:</B> </P> <PRE>fix ID group-ID style args </PRE> <UL><LI>ID = user-assigned name for the fix <LI>group-ID = ID of the group of atoms to apply the fix to <LI>style = one of a long list of possible style names (see below) <LI>args = arguments used by a particular style </UL> <P><B>Examples:</B> </P> <PRE>fix 1 all nve fix 3 all nvt temp 300.0 300.0 0.01 fix mine top setforce 0.0 NULL 0.0 </PRE> <P><B>Description:</B> </P> <P>Set a fix that will be applied to a group of atoms. In LAMMPS, a "fix" is any operation that is applied to the system during timestepping or minimization. Examples include updating of atom positions and velocities due to time integration, controlling temperature, applying constraint forces to atoms, enforcing boundary conditions, computing diagnostics, etc. There are dozens of fixes defined in LAMMPS and new ones can be added; see <A HREF = "Section_modify.html">this section</A> for a discussion. </P> <P>Fixes perform their operations at different stages of the timestep. If 2 or more fixes operate at the same stage of the timestep, they are invoked in the order they were specified in the input script. </P> <P>The ID of a fix can only contain alphanumeric characters and underscores. </P> <P>Fixes can be deleted with the <A HREF = "unfix.html">unfix</A> command. </P> <P>IMPORTANT NOTE: The <A HREF = "unfix.html">unfix</A> command is the only way to turn off a fix; simply specifying a new fix with a similar style will not turn off the first one. This is especially important to realize for integration fixes. For example, using a <A HREF = "fix_nve.html">fix nve</A> command for a second run after using a <A HREF = "fix_nh.html">fix nvt</A> command for the first run, will not cancel out the NVT time integration invoked by the "fix nvt" command. Thus two time integrators would be in place! </P> <P>If you specify a new fix with the same ID and style as an existing fix, the old fix is deleted and the new one is created (presumably with new settings). This is the same as if an "unfix" command were first performed on the old fix, except that the new fix is kept in the same order relative to the existing fixes as the old one originally was. Note that this operation also wipes out any additional changes made to the old fix via the <A HREF = "fix_modify.html">fix_modify</A> command. </P> <P>The <A HREF = "fix_modify.html">fix modify</A> command allows settings for some fixes to be reset. See the doc page for individual fixes for details. </P> <P>Some fixes store an internal "state" which is written to binary restart files via the <A HREF = "restart.html">restart</A> or <A HREF = "write_restart.html">write_restart</A> commands. This allows the fix to continue on with its calculations in a restarted simulation. See the <A HREF = "read_restart.html">read_restart</A> command for info on how to re-specify a fix in an input script that reads a restart file. See the doc pages for individual fixes for info on which ones can be restarted. </P> <HR> <P>Some fixes calculate one of three styles of quantities: global, per-atom, or local, which can be used by other commands or output as described below. A global quantity is one or more system-wide values, e.g. the energy of a wall interacting with particles. A per-atom quantity is one or more values per atom, e.g. the displacement vector for each atom since time 0. Per-atom values are set to 0.0 for atoms not in the specified fix group. Local quantities are calculated by each processor based on the atoms it owns, but there may be zero or more per atoms. </P> <P>Note that a single fix may produces either global or per-atom or local quantities (or none at all), but never more than one of these. </P> <P>Global, per-atom, and local quantities each come in three kinds: a single scalar value, a vector of values, or a 2d array of values. The doc page for each fix describes the style and kind of values it produces, e.g. a per-atom vector. Some fixes produce more than one kind of a single style, e.g. a global scalar and a global vector. </P> <P>When a fix quantity is accessed, as in many of the output commands discussed below, it can be referenced via the following bracket notation, where ID is the ID of the fix: </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR><TD >f_ID </TD><TD > entire scalar, vector, or array</TD></TR> <TR><TD >f_ID[I] </TD><TD > one element of vector, one column of array</TD></TR> <TR><TD >f_ID[I][J] </TD><TD > one element of array </TD></TR></TABLE></DIV> <P>In other words, using one bracket reduces the dimension of the quantity once (vector -> scalar, array -> vector). Using two brackets reduces the dimension twice (array -> scalar). Thus a command that uses scalar fix values as input can also process elements of a vector or array. </P> <P>Note that commands and <A HREF = "variable.html">variables</A> which use fix quantities typically do not allow for all kinds, e.g. a command may require a vector of values, not a scalar. This means there is no ambiguity about referring to a fix quantity as f_ID even if it produces, for example, both a scalar and vector. The doc pages for various commands explain the details. </P> <HR> <P>In LAMMPS, the values generated by a fix can be used in several ways: </P> <UL><LI>Global values can be output via the <A HREF = "thermo_style.html">thermo_style custom</A> or <A HREF = "fix_ave_time.html">fix ave/time</A> command. Or the values can be referenced in a <A HREF = "variable.html">variable equal</A> or <A HREF = "variable.html">variable atom</A> command. <LI>Per-atom values can be output via the <A HREF = "dump.html">dump custom</A> command or the <A HREF = "fix_ave_spatial.html">fix ave/spatial</A> command. Or they can be time-averaged via the <A HREF = "fix_ave_atom.html">fix ave/atom</A> command or reduced by the <A HREF = "compute_reduce.html">compute reduce</A> command. Or the per-atom values can be referenced in an <A HREF = "variable.html">atom-style variable</A>. <LI>Local values can be reduced by the <A HREF = "compute_reduce.html">compute reduce</A> command, or histogrammed by the <A HREF = "fix_ave_histo.html">fix ave/histo</A> command. </UL> <P>See this <A HREF = "Section_howto.html#howto_15">howto section</A> for a summary of various LAMMPS output options, many of which involve fixes. </P> <P>The results of fixes that calculate global quantities can be either "intensive" or "extensive" values. Intensive means the value is independent of the number of atoms in the simulation, e.g. temperature. Extensive means the value scales with the number of atoms in the simulation, e.g. total rotational kinetic energy. <A HREF = "thermo_style.html">Thermodynamic output</A> will normalize extensive values by the number of atoms in the system, depending on the "thermo_modify norm" setting. It will not normalize intensive values. If a fix value is accessed in another way, e.g. by a <A HREF = "variable.html">variable</A>, you may want to know whether it is an intensive or extensive value. See the doc page for individual fixes for further info. </P> <HR> <P>Each fix style has its own documentation page which describes its arguments and what it does, as listed below. Here is an alphabetic list of fix styles available in LAMMPS: </P> <UL><LI><A HREF = "fix_adapt.html">adapt</A> - change a simulation parameter over time <LI><A HREF = "fix_addforce.html">addforce</A> - add a force to each atom +<LI><A HREF = "fix_append_atoms.html">append/atoms</A> - append atoms to a running simulation <LI><A HREF = "fix_aveforce.html">aveforce</A> - add an averaged force to each atom <LI><A HREF = "fix_ave_atom.html">ave/atom</A> - compute per-atom time-averaged quantities <LI><A HREF = "fix_ave_histo.html">ave/histo</A> - compute/output time-averaged histograms <LI><A HREF = "fix_ave_spatial.html">ave/spatial</A> - compute/output time-averaged per-atom quantities by layer <LI><A HREF = "fix_ave_time.html">ave/time</A> - compute/output global time-averaged quantities <LI><A HREF = "fix_bond_break.html">bond/break</A> - break bonds on the fly <LI><A HREF = "fix_bond_create.html">bond/create</A> - create bonds on the fly <LI><A HREF = "fix_bond_swap.html">bond/swap</A> - Monte Carlo bond swapping <LI><A HREF = "fix_box_relax.html">box/relax</A> - relax box size during energy minimization <LI><A HREF = "fix_deform.html">deform</A> - change the simulation box size/shape <LI><A HREF = "fix_deposit.html">deposit</A> - add new atoms above a surface <LI><A HREF = "fix_drag.html">drag</A> - drag atoms towards a defined coordinate <LI><A HREF = "fix_dt_reset.html">dt/reset</A> - reset the timestep based on velocity, forces <LI><A HREF = "fix_efield.html">efield</A> - impose electric field on system <LI><A HREF = "fix_enforce2d.html">enforce2d</A> - zero out z-dimension velocity and force <LI><A HREF = "fix_evaporate.html">evaporate</A> - remove atoms from simulation periodically <LI><A HREF = "fix_external.html">external</A> - callback to an external driver program <LI><A HREF = "fix_freeze.html">freeze</A> - freeze atoms in a granular simulation <LI><A HREF = "fix_gravity.html">gravity</A> - add gravity to atoms in a granular simulation <LI><A HREF = "fix_gcmc.html">gcmc</A> - grand canonical insertions/deletions <LI><A HREF = "fix_heat.html">heat</A> - add/subtract momentum-conserving heat <LI><A HREF = "fix_indent.html">indent</A> - impose force due to an indenter <LI><A HREF = "fix_langevin.html">langevin</A> - Langevin temperature control <LI><A HREF = "fix_lineforce.html">lineforce</A> - constrain atoms to move in a line <LI><A HREF = "fix_momentum.html">momentum</A> - zero the linear and/or angular momentum of a group of atoms <LI><A HREF = "fix_move.html">move</A> - move atoms in a prescribed fashion <LI><A HREF = "fix_msst.html">msst</A> - multi-scale shock technique (MSST) integration <LI><A HREF = "fix_neb.html">neb</A> - nudged elastic band (NEB) spring forces <LI><A HREF = "fix_nh.html">nph</A> - constant NPH time integration via Nose/Hoover <LI><A HREF = "fix_nph_asphere.html">nph/asphere</A> - NPH for aspherical particles <LI><A HREF = "fix_nph_sphere.html">nph/sphere</A> - NPH for spherical particles <LI><A HREF = "fix_nphug.html">nphug</A> - constant-stress Hugoniostat integration <LI><A HREF = "fix_nh.html">npt</A> - constant NPT time integration via Nose/Hoover <LI><A HREF = "fix_npt_asphere.html">npt/asphere</A> - NPT for aspherical particles <LI><A HREF = "fix_npt_sphere.html">npt/sphere</A> - NPT for spherical particles <LI><A HREF = "fix_nve.html">nve</A> - constant NVE time integration <LI><A HREF = "fix_nve_asphere.html">nve/asphere</A> - NVE for aspherical particles <LI><A HREF = "fix_nve_asphere_noforce.html">nve/asphere/noforce</A> - NVE for aspherical particles without forces<A HREF = "fix_nve_limit.html"> <LI>nve/limit</A> - NVE with limited step length <LI><A HREF = "fix_nve_line.html">nve/line</A> - NVE for line segments <LI><A HREF = "fix_nve_noforce.html">nve/noforce</A> - NVE without forces (v only) <LI><A HREF = "fix_nve_sphere.html">nve/sphere</A> - NVE for spherical particles <LI><A HREF = "fix_nve_tri.html">nve/tri</A> - NVE for triangles <LI><A HREF = "fix_nh.html">nvt</A> - constant NVT time integration via Nose/Hoover <LI><A HREF = "fix_nvt_asphere.html">nvt/asphere</A> - NVT for aspherical particles <LI><A HREF = "fix_nvt_sllod.html">nvt/sllod</A> - NVT for NEMD with SLLOD equations <LI><A HREF = "fix_nvt_sphere.html">nvt/sphere</A> - NVT for spherical particles <LI><A HREF = "fix_orient_fcc.html">orient/fcc</A> - add grain boundary migration force <LI><A HREF = "fix_planeforce.html">planeforce</A> - constrain atoms to move in a plane <LI><A HREF = "fix_poems.html">poems</A> - constrain clusters of atoms to move as coupled rigid bodies <LI><A HREF = "fix_pour.html">pour</A> - pour new atoms into a granular simulation domain <LI><A HREF = "fix_press_berendsen.html">press/berendsen</A> - pressure control by Berendsen barostat <LI><A HREF = "fix_print.html">print</A> - print text and variables during a simulation <LI><A HREF = "fix_reax_bonds.html">reax/bonds</A> - write out ReaxFF bond information <A HREF = "fix_recenter.html">recenter</A> - constrain the center-of-mass position of a group of atoms <LI><A HREF = "fix_restrain.html">restrain</A> - constrain a bond, angle, dihedral <LI><A HREF = "fix_rigid.html">rigid</A> - constrain one or more clusters of atoms to move as a rigid body with NVE integration <LI><A HREF = "fix_rigid.html">rigid/nve</A> - constrain one or more clusters of atoms to move as a rigid body with alternate NVE integration <LI><A HREF = "fix_rigid.html">rigid/nvt</A> - constrain one or more clusters of atoms to move as a rigid body with NVT integration <LI><A HREF = "fix_setforce.html">setforce</A> - set the force on each atom <LI><A HREF = "fix_shake.html">shake</A> - SHAKE constraints on bonds and/or angles <LI><A HREF = "fix_spring.html">spring</A> - apply harmonic spring force to group of atoms <LI><A HREF = "fix_spring_rg.html">spring/rg</A> - spring on radius of gyration of group of atoms <LI><A HREF = "fix_spring_self.html">spring/self</A> - spring from each atom to its origin <LI><A HREF = "fix_srd.html">srd</A> - stochastic rotation dynamics (SRD) <LI><A HREF = "fix_store_force.html">store/force</A> - store force on each atom <LI><A HREF = "fix_store_state.html">store/state</A> - store attributes for each atom <LI><A HREF = "fix_temp_berendsen.html">temp/berendsen</A> - temperature control by Berendsen thermostat <LI><A HREF = "fix_temp_rescale.html">temp/rescale</A> - temperature control by velocity rescaling <LI><A HREF = "fix_thermal_conductivity.html">thermal/conductivity</A> - Muller-Plathe kinetic energy exchange for thermal conductivity calculation <LI><A HREF = "fix_tmd.html">tmd</A> - guide a group of atoms to a new configuration <LI><A HREF = "fix_ttm.html">ttm</A> - two-temperature model for electronic/atomic coupling <LI><A HREF = "fix_viscosity.html">viscosity</A> - Muller-Plathe momentum exchange for viscosity calculation <LI><A HREF = "fix_viscous.html">viscous</A> - viscous damping for granular simulations <LI><A HREF = "fix_wall.html">wall/colloid</A> - Lennard-Jones wall interacting with finite-size particles <LI><A HREF = "fix_wall_gran.html">wall/gran</A> - frictional wall(s) for granular simulations <LI><A HREF = "fix_wall.html">wall/harmonic</A> - harmonic spring wall <LI><A HREF = "fix_wall.html">wall/lj126</A> - Lennard-Jones 12-6 wall <LI><A HREF = "fix_wall.html">wall/lj93</A> - Lennard-Jones 9-3 wall +<LI><A HREF = "fix_wall_piston.html">wall/piston</A> - moving reflective piston wall <LI><A HREF = "fix_wall_reflect.html">wall/reflect</A> - reflecting wall(s) <LI><A HREF = "fix_wall_region.html">wall/region</A> - use region surface as wall <LI><A HREF = "fix_wall_srd.html">wall/srd</A> - slip/no-slip wall for SRD particles </UL> <P>There are also additional fix styles submitted by users which are included in the LAMMPS distribution. The list of these with links to the individual styles are given in the fix section of <A HREF = "Section_commands.html#cmd_5">this page</A>. </P> <P>There are also additional accelerated fix styles included in the LAMMPS distribution for faster performance on CPUs and GPUs. The list of these with links to the individual styles are given in the pair section of <A HREF = "Section_commands.html#cmd_5">this page</A>. </P> <P><B>Restrictions:</B> </P> <P>Some fix styles are part of specific packages. They are only enabled if LAMMPS was built with that package. See the <A HREF = "Section_start.html#start_3">Making LAMMPS</A> section for more info on packages. The doc pages for individual fixes tell if it is part of a package. </P> <P><B>Related commands:</B> </P> <P><A HREF = "unfix.html">unfix</A>, <A HREF = "fix_modify.html">fix_modify</A> </P> <P><B>Default:</B> none </P> </HTML> diff --git a/doc/fix.txt b/doc/fix.txt index 4c0df45d1..c94c9a656 100644 --- a/doc/fix.txt +++ b/doc/fix.txt @@ -1,275 +1,277 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line fix command :h3 [Syntax:] fix ID group-ID style args :pre ID = user-assigned name for the fix group-ID = ID of the group of atoms to apply the fix to style = one of a long list of possible style names (see below) args = arguments used by a particular style :ul [Examples:] fix 1 all nve fix 3 all nvt temp 300.0 300.0 0.01 fix mine top setforce 0.0 NULL 0.0 :pre [Description:] Set a fix that will be applied to a group of atoms. In LAMMPS, a "fix" is any operation that is applied to the system during timestepping or minimization. Examples include updating of atom positions and velocities due to time integration, controlling temperature, applying constraint forces to atoms, enforcing boundary conditions, computing diagnostics, etc. There are dozens of fixes defined in LAMMPS and new ones can be added; see "this section"_Section_modify.html for a discussion. Fixes perform their operations at different stages of the timestep. If 2 or more fixes operate at the same stage of the timestep, they are invoked in the order they were specified in the input script. The ID of a fix can only contain alphanumeric characters and underscores. Fixes can be deleted with the "unfix"_unfix.html command. IMPORTANT NOTE: The "unfix"_unfix.html command is the only way to turn off a fix; simply specifying a new fix with a similar style will not turn off the first one. This is especially important to realize for integration fixes. For example, using a "fix nve"_fix_nve.html command for a second run after using a "fix nvt"_fix_nh.html command for the first run, will not cancel out the NVT time integration invoked by the "fix nvt" command. Thus two time integrators would be in place! If you specify a new fix with the same ID and style as an existing fix, the old fix is deleted and the new one is created (presumably with new settings). This is the same as if an "unfix" command were first performed on the old fix, except that the new fix is kept in the same order relative to the existing fixes as the old one originally was. Note that this operation also wipes out any additional changes made to the old fix via the "fix_modify"_fix_modify.html command. The "fix modify"_fix_modify.html command allows settings for some fixes to be reset. See the doc page for individual fixes for details. Some fixes store an internal "state" which is written to binary restart files via the "restart"_restart.html or "write_restart"_write_restart.html commands. This allows the fix to continue on with its calculations in a restarted simulation. See the "read_restart"_read_restart.html command for info on how to re-specify a fix in an input script that reads a restart file. See the doc pages for individual fixes for info on which ones can be restarted. :line Some fixes calculate one of three styles of quantities: global, per-atom, or local, which can be used by other commands or output as described below. A global quantity is one or more system-wide values, e.g. the energy of a wall interacting with particles. A per-atom quantity is one or more values per atom, e.g. the displacement vector for each atom since time 0. Per-atom values are set to 0.0 for atoms not in the specified fix group. Local quantities are calculated by each processor based on the atoms it owns, but there may be zero or more per atoms. Note that a single fix may produces either global or per-atom or local quantities (or none at all), but never more than one of these. Global, per-atom, and local quantities each come in three kinds: a single scalar value, a vector of values, or a 2d array of values. The doc page for each fix describes the style and kind of values it produces, e.g. a per-atom vector. Some fixes produce more than one kind of a single style, e.g. a global scalar and a global vector. When a fix quantity is accessed, as in many of the output commands discussed below, it can be referenced via the following bracket notation, where ID is the ID of the fix: f_ID | entire scalar, vector, or array f_ID\[I\] | one element of vector, one column of array f_ID\[I\]\[J\] | one element of array :tb(s=|) In other words, using one bracket reduces the dimension of the quantity once (vector -> scalar, array -> vector). Using two brackets reduces the dimension twice (array -> scalar). Thus a command that uses scalar fix values as input can also process elements of a vector or array. Note that commands and "variables"_variable.html which use fix quantities typically do not allow for all kinds, e.g. a command may require a vector of values, not a scalar. This means there is no ambiguity about referring to a fix quantity as f_ID even if it produces, for example, both a scalar and vector. The doc pages for various commands explain the details. :line In LAMMPS, the values generated by a fix can be used in several ways: Global values can be output via the "thermo_style custom"_thermo_style.html or "fix ave/time"_fix_ave_time.html command. Or the values can be referenced in a "variable equal"_variable.html or "variable atom"_variable.html command. :ulb,l Per-atom values can be output via the "dump custom"_dump.html command or the "fix ave/spatial"_fix_ave_spatial.html command. Or they can be time-averaged via the "fix ave/atom"_fix_ave_atom.html command or reduced by the "compute reduce"_compute_reduce.html command. Or the per-atom values can be referenced in an "atom-style variable"_variable.html. :l Local values can be reduced by the "compute reduce"_compute_reduce.html command, or histogrammed by the "fix ave/histo"_fix_ave_histo.html command. :l,ule See this "howto section"_Section_howto.html#howto_15 for a summary of various LAMMPS output options, many of which involve fixes. The results of fixes that calculate global quantities can be either "intensive" or "extensive" values. Intensive means the value is independent of the number of atoms in the simulation, e.g. temperature. Extensive means the value scales with the number of atoms in the simulation, e.g. total rotational kinetic energy. "Thermodynamic output"_thermo_style.html will normalize extensive values by the number of atoms in the system, depending on the "thermo_modify norm" setting. It will not normalize intensive values. If a fix value is accessed in another way, e.g. by a "variable"_variable.html, you may want to know whether it is an intensive or extensive value. See the doc page for individual fixes for further info. :line Each fix style has its own documentation page which describes its arguments and what it does, as listed below. Here is an alphabetic list of fix styles available in LAMMPS: "adapt"_fix_adapt.html - change a simulation parameter over time "addforce"_fix_addforce.html - add a force to each atom +"append/atoms"_fix_append_atoms.html - append atoms to a running simulation "aveforce"_fix_aveforce.html - add an averaged force to each atom "ave/atom"_fix_ave_atom.html - compute per-atom time-averaged quantities "ave/histo"_fix_ave_histo.html - compute/output time-averaged histograms "ave/spatial"_fix_ave_spatial.html - compute/output time-averaged per-atom quantities by layer "ave/time"_fix_ave_time.html - compute/output global time-averaged quantities "bond/break"_fix_bond_break.html - break bonds on the fly "bond/create"_fix_bond_create.html - create bonds on the fly "bond/swap"_fix_bond_swap.html - Monte Carlo bond swapping "box/relax"_fix_box_relax.html - relax box size during energy minimization "deform"_fix_deform.html - change the simulation box size/shape "deposit"_fix_deposit.html - add new atoms above a surface "drag"_fix_drag.html - drag atoms towards a defined coordinate "dt/reset"_fix_dt_reset.html - reset the timestep based on velocity, forces "efield"_fix_efield.html - impose electric field on system "enforce2d"_fix_enforce2d.html - zero out z-dimension velocity and force "evaporate"_fix_evaporate.html - remove atoms from simulation periodically "external"_fix_external.html - callback to an external driver program "freeze"_fix_freeze.html - freeze atoms in a granular simulation "gravity"_fix_gravity.html - add gravity to atoms in a granular simulation "gcmc"_fix_gcmc.html - grand canonical insertions/deletions "heat"_fix_heat.html - add/subtract momentum-conserving heat "indent"_fix_indent.html - impose force due to an indenter "langevin"_fix_langevin.html - Langevin temperature control "lineforce"_fix_lineforce.html - constrain atoms to move in a line "momentum"_fix_momentum.html - zero the linear and/or angular momentum of a group of atoms "move"_fix_move.html - move atoms in a prescribed fashion "msst"_fix_msst.html - multi-scale shock technique (MSST) integration "neb"_fix_neb.html - nudged elastic band (NEB) spring forces "nph"_fix_nh.html - constant NPH time integration via Nose/Hoover "nph/asphere"_fix_nph_asphere.html - NPH for aspherical particles "nph/sphere"_fix_nph_sphere.html - NPH for spherical particles "nphug"_fix_nphug.html - constant-stress Hugoniostat integration "npt"_fix_nh.html - constant NPT time integration via Nose/Hoover "npt/asphere"_fix_npt_asphere.html - NPT for aspherical particles "npt/sphere"_fix_npt_sphere.html - NPT for spherical particles "nve"_fix_nve.html - constant NVE time integration "nve/asphere"_fix_nve_asphere.html - NVE for aspherical particles "nve/asphere/noforce"_fix_nve_asphere_noforce.html - NVE for aspherical particles without forces" nve/limit"_fix_nve_limit.html - NVE with limited step length "nve/line"_fix_nve_line.html - NVE for line segments "nve/noforce"_fix_nve_noforce.html - NVE without forces (v only) "nve/sphere"_fix_nve_sphere.html - NVE for spherical particles "nve/tri"_fix_nve_tri.html - NVE for triangles "nvt"_fix_nh.html - constant NVT time integration via Nose/Hoover "nvt/asphere"_fix_nvt_asphere.html - NVT for aspherical particles "nvt/sllod"_fix_nvt_sllod.html - NVT for NEMD with SLLOD equations "nvt/sphere"_fix_nvt_sphere.html - NVT for spherical particles "orient/fcc"_fix_orient_fcc.html - add grain boundary migration force "planeforce"_fix_planeforce.html - constrain atoms to move in a plane "poems"_fix_poems.html - constrain clusters of atoms to move \ as coupled rigid bodies "pour"_fix_pour.html - pour new atoms into a granular simulation domain "press/berendsen"_fix_press_berendsen.html - pressure control by \ Berendsen barostat "print"_fix_print.html - print text and variables during a simulation "reax/bonds"_fix_reax_bonds.html - write out ReaxFF bond information \ "recenter"_fix_recenter.html - constrain the center-of-mass position \ of a group of atoms "restrain"_fix_restrain.html - constrain a bond, angle, dihedral "rigid"_fix_rigid.html - constrain one or more clusters of atoms to \ move as a rigid body with NVE integration "rigid/nve"_fix_rigid.html - constrain one or more clusters of atoms to \ move as a rigid body with alternate NVE integration "rigid/nvt"_fix_rigid.html - constrain one or more clusters of atoms to \ move as a rigid body with NVT integration "setforce"_fix_setforce.html - set the force on each atom "shake"_fix_shake.html - SHAKE constraints on bonds and/or angles "spring"_fix_spring.html - apply harmonic spring force to group of atoms "spring/rg"_fix_spring_rg.html - spring on radius of gyration of \ group of atoms "spring/self"_fix_spring_self.html - spring from each atom to its origin "srd"_fix_srd.html - stochastic rotation dynamics (SRD) "store/force"_fix_store_force.html - store force on each atom "store/state"_fix_store_state.html - store attributes for each atom "temp/berendsen"_fix_temp_berendsen.html - temperature control by \ Berendsen thermostat "temp/rescale"_fix_temp_rescale.html - temperature control by \ velocity rescaling "thermal/conductivity"_fix_thermal_conductivity.html - Muller-Plathe kinetic energy exchange for \ thermal conductivity calculation "tmd"_fix_tmd.html - guide a group of atoms to a new configuration "ttm"_fix_ttm.html - two-temperature model for electronic/atomic coupling "viscosity"_fix_viscosity.html - Muller-Plathe momentum exchange for \ viscosity calculation "viscous"_fix_viscous.html - viscous damping for granular simulations "wall/colloid"_fix_wall.html - Lennard-Jones wall interacting with finite-size particles "wall/gran"_fix_wall_gran.html - frictional wall(s) for granular simulations "wall/harmonic"_fix_wall.html - harmonic spring wall "wall/lj126"_fix_wall.html - Lennard-Jones 12-6 wall "wall/lj93"_fix_wall.html - Lennard-Jones 9-3 wall +"wall/piston"_fix_wall_piston.html - moving reflective piston wall "wall/reflect"_fix_wall_reflect.html - reflecting wall(s) "wall/region"_fix_wall_region.html - use region surface as wall "wall/srd"_fix_wall_srd.html - slip/no-slip wall for SRD particles :ul There are also additional fix styles submitted by users which are included in the LAMMPS distribution. The list of these with links to the individual styles are given in the fix section of "this page"_Section_commands.html#cmd_5. There are also additional accelerated fix styles included in the LAMMPS distribution for faster performance on CPUs and GPUs. The list of these with links to the individual styles are given in the pair section of "this page"_Section_commands.html#cmd_5. [Restrictions:] Some fix styles are part of specific packages. They are only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info on packages. The doc pages for individual fixes tell if it is part of a package. [Related commands:] "unfix"_unfix.html, "fix_modify"_fix_modify.html [Default:] none diff --git a/doc/fix_append_atoms.html b/doc/fix_append_atoms.html index 727c26eeb..26a69b86a 100644 --- a/doc/fix_append_atoms.html +++ b/doc/fix_append_atoms.html @@ -1,111 +1,113 @@ <HTML> <CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> </CENTER> <HR> -<H3>fix append_atoms command +<H3>fix append/atoms command </H3> <P><B>Syntax:</B> </P> -<PRE>fix ID group-ID append_atoms face ... keyword value ... +<PRE>fix ID group-ID append/atoms face ... keyword value ... </PRE> <UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command -<LI>append_atoms = style name of this fix command +<LI>append/atoms = style name of this fix command <LI>face = <I>zhi</I> <LI>zero or more keyword/value pairs may be appended <LI>keyword = <I>size</I> or <I>freq</I> or <I>temp</I> or <I>random</I> or <I>units</I> <PRE> <I>size</I> args = Lz Lz = z size of lattice region appended in a single event(distance units) <I>freq</I> args = freq freq = the number of timesteps between append events <I>temp</I> args = target damp seed extent target = target velocity for region immediately ahead of the piston damp = damping parameter (time units) seed = random number seed for langevin kicks extent = extent of thermostated region (distance units) <I>random</I> args = xmax ymax zmax seed <I>xmax</I>, <I>ymax</I>, <I>zmax</I> = maximum displacement in particular direction (distance units) <I>seed</I> = random number seed for random displacement <I>units</I> value = <I>lattice</I> or <I>box</I> <I>lattice</I> = the wall position is defined in lattice units <I>box</I> = the wall position is defined in simulation box units </PRE> </UL> <P><B>Examples:</B> </P> -<PRE>fix 1 all append_atoms zhi size 5.0 freq 295 units lattice -fix 4 all append_atoms zhi size 15.0 freq 5 units box -fix A all append_atoms zhi size 1.0 freq 1000 units lattice +<PRE>fix 1 all append/atoms zhi size 5.0 freq 295 units lattice +fix 4 all append/atoms zhi size 15.0 freq 5 units box +fix A all append/atoms zhi size 1.0 freq 1000 units lattice </PRE> <P><B>Description:</B> </P> -<P>This fix creates atoms on a lattice, appended on the zhi edge of the system box. -This can be useful when a shock or wave is propagating from zlo. This allows -the system to grow with time to accommodate an expanding wave. A simulation -box must already exist, which is typically created via the -<A HREF = "create_box.html">create_box</A> command. Before using this command, a -lattice must also be defined using the <A HREF = "lattice.html">lattice</A> command. +<P>This fix creates atoms on a lattice, appended on the zhi edge of the +system box. This can be useful when a shock or wave is propagating +from zlo. This allows the system to grow with time to accommodate an +expanding wave. A simulation box must already exist, which is +typically created via the <A HREF = "create_box.html">create_box</A> command. +Before using this command, a lattice must also be defined using the +<A HREF = "lattice.html">lattice</A> command. </P> -<P>This fix will automatically freeze atoms on the zhi edge of the system, so that -overlaps are avoided when new atoms are appended. +<P>This fix will automatically freeze atoms on the zhi edge of the +system, so that overlaps are avoided when new atoms are appended. </P> -<P>The <I>size</I> keyword defines the size in z of the chunk of material to be added. +<P>The <I>size</I> keyword defines the size in z of the chunk of material to +be added. </P> -<P>The <I>random</I> keyword will give the atoms random displacements around their -lattice points to simulate some initial temperature. +<P>The <I>random</I> keyword will give the atoms random displacements around +their lattice points to simulate some initial temperature. </P> -<P>The <I>temp</I> keyword will cause a region to be thermostated with a Langevin -thermostat on the zhi boundary. The size of the region is measured from zhi and -is set with the <I>extent</I> argument. +<P>The <I>temp</I> keyword will cause a region to be thermostated with a +Langevin thermostat on the zhi boundary. The size of the region is +measured from zhi and is set with the <I>extent</I> argument. </P> <P>The <I>units</I> keyword determines the meaning of the distance units used to define a wall position, but only when a numeric constant is used. A <I>box</I> value selects standard distance units as defined by the <A HREF = "units.html">units</A> command, e.g. Angstroms for units = real or metal. A <I>lattice</I> value means the distance units are in lattice spacings. The <A HREF = "lattice.html">lattice</A> command must have been previously used to define the lattice spacings. </P> <HR> <P><B>Restart, fix_modify, output, run start/stop, minimize info:</B> </P> <P>No information about this fix is written to <A HREF = "restart.html">binary restart files</A>. None of the <A HREF = "fix_modify.html">fix_modify</A> options are relevant to this fix. No global or per-atom quantities are stored by this fix for access by various <A HREF = "Section_howto.html#howto_15">output commands</A>. No parameter of this fix can be used with the <I>start/stop</I> keywords of the <A HREF = "run.html">run</A> command. This fix is not invoked during <A HREF = "minimize.html">energy minimization</A>. </P> <P><B>Restrictions:</B> </P> <P>This fix style is part of the SHOCK package. It is only enabled if LAMMPS was built with that package. See the <A HREF = "Section_start.html#start_3">Making LAMMPS</A> section for more info. </P> -<P>The boundary on which atoms are added with append_atoms must be -shrink/minimum. The opposite boundary may be any boundary type other than -periodic. +<P>The boundary on which atoms are added with append/atoms must be +shrink/minimum. The opposite boundary may be any boundary type other +than periodic. </P> <P><B>Related commands:</B> </P> <P><A HREF = "fix_wall_piston.html">fix wall/piston</A> command </P> -<P><B>Default:</B> <I>size</I> = 0.0, <I>freq</I> = 0, <I>units</I> = lattice. +<P><B>Default:</B> +</P> +<P>The keyword defaults are size = 0.0, freq = 0, units = lattice. </P> -<HR> - </HTML> diff --git a/doc/fix_append_atoms.txt b/doc/fix_append_atoms.txt index d3ee548ca..89f332666 100644 --- a/doc/fix_append_atoms.txt +++ b/doc/fix_append_atoms.txt @@ -1,100 +1,102 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line -fix append_atoms command :h3 +fix append/atoms command :h3 [Syntax:] -fix ID group-ID append_atoms face ... keyword value ... :pre +fix ID group-ID append/atoms face ... keyword value ... :pre ID, group-ID are documented in "fix"_fix.html command :ulb,l -append_atoms = style name of this fix command :l +append/atoms = style name of this fix command :l face = {zhi} :l zero or more keyword/value pairs may be appended :l keyword = {size} or {freq} or {temp} or {random} or {units} :l {size} args = Lz Lz = z size of lattice region appended in a single event(distance units) {freq} args = freq freq = the number of timesteps between append events {temp} args = target damp seed extent target = target velocity for region immediately ahead of the piston damp = damping parameter (time units) seed = random number seed for langevin kicks extent = extent of thermostated region (distance units) {random} args = xmax ymax zmax seed {xmax}, {ymax}, {zmax} = maximum displacement in particular direction (distance units) {seed} = random number seed for random displacement {units} value = {lattice} or {box} {lattice} = the wall position is defined in lattice units {box} = the wall position is defined in simulation box units :pre :ule [Examples:] -fix 1 all append_atoms zhi size 5.0 freq 295 units lattice -fix 4 all append_atoms zhi size 15.0 freq 5 units box -fix A all append_atoms zhi size 1.0 freq 1000 units lattice :pre +fix 1 all append/atoms zhi size 5.0 freq 295 units lattice +fix 4 all append/atoms zhi size 15.0 freq 5 units box +fix A all append/atoms zhi size 1.0 freq 1000 units lattice :pre [Description:] -This fix creates atoms on a lattice, appended on the zhi edge of the system box. -This can be useful when a shock or wave is propagating from zlo. This allows -the system to grow with time to accommodate an expanding wave. A simulation -box must already exist, which is typically created via the -"create_box"_create_box.html command. Before using this command, a -lattice must also be defined using the "lattice"_lattice.html command. +This fix creates atoms on a lattice, appended on the zhi edge of the +system box. This can be useful when a shock or wave is propagating +from zlo. This allows the system to grow with time to accommodate an +expanding wave. A simulation box must already exist, which is +typically created via the "create_box"_create_box.html command. +Before using this command, a lattice must also be defined using the +"lattice"_lattice.html command. -This fix will automatically freeze atoms on the zhi edge of the system, so that -overlaps are avoided when new atoms are appended. +This fix will automatically freeze atoms on the zhi edge of the +system, so that overlaps are avoided when new atoms are appended. -The {size} keyword defines the size in z of the chunk of material to be added. +The {size} keyword defines the size in z of the chunk of material to +be added. -The {random} keyword will give the atoms random displacements around their -lattice points to simulate some initial temperature. +The {random} keyword will give the atoms random displacements around +their lattice points to simulate some initial temperature. -The {temp} keyword will cause a region to be thermostated with a Langevin -thermostat on the zhi boundary. The size of the region is measured from zhi and -is set with the {extent} argument. +The {temp} keyword will cause a region to be thermostated with a +Langevin thermostat on the zhi boundary. The size of the region is +measured from zhi and is set with the {extent} argument. The {units} keyword determines the meaning of the distance units used to define a wall position, but only when a numeric constant is used. A {box} value selects standard distance units as defined by the "units"_units.html command, e.g. Angstroms for units = real or metal. A {lattice} value means the distance units are in lattice spacings. The "lattice"_lattice.html command must have been previously used to define the lattice spacings. :line [Restart, fix_modify, output, run start/stop, minimize info:] No information about this fix is written to "binary restart files"_restart.html. None of the "fix_modify"_fix_modify.html options are relevant to this fix. No global or per-atom quantities are stored by this fix for access by various "output commands"_Section_howto.html#howto_15. No parameter of this fix can be used with the {start/stop} keywords of the "run"_run.html command. This fix is not invoked during "energy minimization"_minimize.html. [Restrictions:] This fix style is part of the SHOCK package. It is only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. -The boundary on which atoms are added with append_atoms must be -shrink/minimum. The opposite boundary may be any boundary type other than -periodic. +The boundary on which atoms are added with append/atoms must be +shrink/minimum. The opposite boundary may be any boundary type other +than periodic. [Related commands:] "fix wall/piston"_fix_wall_piston.html command -[Default:] {size} = 0.0, {freq} = 0, {units} = lattice. +[Default:] -:line +The keyword defaults are size = 0.0, freq = 0, units = lattice. diff --git a/doc/fix_qeq_reax.html b/doc/fix_qeq_reax.html index 5f22090a0..7c53630d1 100644 --- a/doc/fix_qeq_reax.html +++ b/doc/fix_qeq_reax.html @@ -1,105 +1,106 @@ <HTML> <CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> </CENTER> <HR> <H3>fix qeq/reax command </H3> <P><B>Syntax:</B> </P> <PRE>fix ID group-ID qeq/reax Nevery cutlo cuthi tolerance params </PRE> <UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command <LI>qeq/reax = style name of this fix command <LI>Nevery = perform QEq every this many steps <LI>cutlo,cuthi = lo and hi cutoff for Taper radius <LI>tolerance = precision to which charges will be equilibrated <LI>params = reax/c or a filename </UL> <P><B>Examples:</B> </P> <PRE>fix 1 all qeq/reax 1 0.0 10.0 1.0e-6 reax/c fix 1 all qeq/reax 1 0.0 10.0 1.0e-6 param.qeq </PRE> <P><B>Description:</B> </P> -<P>Perform the charge equilibration (QEq) method as described in <A HREF = "#Rappe_1991">(Rappe -and Goddard, 1991)</A> and formulated in <A HREF = "#Nakano_1997">(Nakano, -1997)</A>. It is typically used in conjunction with the -ReaxFF force field model as implemented in the <A HREF = "pair_reax_c.html">pair_style -reax/c</A> command, but it can be used with any -potential in LAMMPS, so long as it defines and uses charges on each -atom. The <A HREF = "fix_qeq_comb.html">fix qeq/comb</A> command should be used to -perform charge equliibration with the <A HREF = "pair_comb.html">COMB potential</A>. -For more technical details about the charge equilibration performed by -fix qeq/reax, see the "(Aktulga)" paper. +<P>Perform the charge equilibration (QEq) method as described in <A HREF = "#Rappe">(Rappe +and Goddard)</A> and formulated in <A HREF = "#Nakano">(Nakano)</A>. It is +typically used in conjunction with the ReaxFF force field model as +implemented in the <A HREF = "pair_reax_c.html">pair_style reax/c</A> command, but +it can be used with any potential in LAMMPS, so long as it defines and +uses charges on each atom. The <A HREF = "fix_qeq_comb.html">fix qeq/comb</A> +command should be used to perform charge equliibration with the <A HREF = "pair_comb.html">COMB +potential</A>. For more technical details about the +charge equilibration performed by fix qeq/reax, see the +<A HREF = "#Aktulga">(Aktulga)</A> paper. </P> <P>The QEq method minimizes the electrostatic energy of the system by adjusting the partial charge on individual atoms based on interactions with their neighbors. It reqires some parameters for each atom type. If the <I>params</I> setting above is the word "reax/c", then these are extracted from the <A HREF = "pair_reax_c.html">pair_style reax/c</A> command and the ReaxFF force field file it reads in. If a file name is specified for <I>params</I>, then the parameters are taken from the specified file and the file must contain one line for each atom type. The latter form must be used when performing QeQ with a non-ReaxFF potential. Each line should be formatted as follows: </P> <PRE>itype chi eta gamma </PRE> <P>where <I>itype</I> is the atom type from 1 to Ntypes, <I>chi</I> denotes the electronegativity in eV, <I>eta</I> denotes the self-Coulomb potential in eV, and <I>gamma</I> denotes the valence orbital exponent. Note that these 3 quantities are also in the ReaxFF potential file, except that eta is defined here as twice the eta value in the ReaxFF file. Note that unlike the rest of LAMMPS, the units of this fix are hard-coded to be A, eV, and electronic charge. </P> <P><B>Restart, fix_modify, output, run start/stop, minimize info:</B> </P> <P>No information about this fix is written to <A HREF = "restart.html">binary restart files</A>. No global scalar or vector or per-atom quantities are stored by this fix for access by various <A HREF = "Section_howto.html#howto_15">output commands</A>. No parameter of this fix can be used with the <I>start/stop</I> keywords of the <A HREF = "run.html">run</A> command. </P> <P>This fix is invoked during <A HREF = "minimize.html">energy minimization</A>. </P> <P><B>Restrictions:</B> </P> <P>This fix is part of the USER-REAXC package. It is only enabled if LAMMPS was built with that package. See the <A HREF = "Section_start.html#start_3">Making LAMMPS</A> section for more info. </P> <P>This fix does not correctly handle interactions involving multiple periodic images of the same atom. Hence, it should not be used for periodic cell dimensions less than 10 angstroms. </P> <P><B>Related commands:</B> </P> <P><A HREF = "pair_reax_c.html">pair_style reax/c</A> </P> <P><B>Default:</B> none </P> <HR> -<A NAME = "Rappe_1991"></A> +<A NAME = "Rappe"></A> <P><B>(Rappe)</B> Rappe and Goddard III, Journal of Physical Chemistry, 105, 3358-3363 (1991). </P> -<A NAME = "Nakano_1997"></A> +<A NAME = "Nakano"></A> <P><B>(Nakano)</B> Nakano, Computer Physics Communications, 104, 59-69 (1997). </P> <A NAME = "Aktulga"></A> -<P><B>(Aktulga)</B> Aktulga, Fogarty, Pandit, Grama, Parallel Computing, to appear (2011). +<P><B>(Aktulga)</B> Aktulga, Fogarty, Pandit, Grama, Parallel Computing, to +appear (2011). </P> </HTML> diff --git a/doc/fix_qeq_reax.txt b/doc/fix_qeq_reax.txt index 145f4aea3..a89163d5b 100644 --- a/doc/fix_qeq_reax.txt +++ b/doc/fix_qeq_reax.txt @@ -1,97 +1,98 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line fix qeq/reax command :h3 [Syntax:] fix ID group-ID qeq/reax Nevery cutlo cuthi tolerance params :pre ID, group-ID are documented in "fix"_fix.html command qeq/reax = style name of this fix command Nevery = perform QEq every this many steps cutlo,cuthi = lo and hi cutoff for Taper radius tolerance = precision to which charges will be equilibrated params = reax/c or a filename :ul [Examples:] fix 1 all qeq/reax 1 0.0 10.0 1.0e-6 reax/c fix 1 all qeq/reax 1 0.0 10.0 1.0e-6 param.qeq :pre [Description:] Perform the charge equilibration (QEq) method as described in "(Rappe -and Goddard, 1991)"_#Rappe_1991 and formulated in "(Nakano, -1997)"_#Nakano_1997. It is typically used in conjunction with the -ReaxFF force field model as implemented in the "pair_style -reax/c"_pair_reax_c.html command, but it can be used with any -potential in LAMMPS, so long as it defines and uses charges on each -atom. The "fix qeq/comb"_fix_qeq_comb.html command should be used to -perform charge equliibration with the "COMB potential"_pair_comb.html. -For more technical details about the charge equilibration performed by -fix qeq/reax, see the "(Aktulga)" paper. +and Goddard)"_#Rappe and formulated in "(Nakano)"_#Nakano. It is +typically used in conjunction with the ReaxFF force field model as +implemented in the "pair_style reax/c"_pair_reax_c.html command, but +it can be used with any potential in LAMMPS, so long as it defines and +uses charges on each atom. The "fix qeq/comb"_fix_qeq_comb.html +command should be used to perform charge equliibration with the "COMB +potential"_pair_comb.html. For more technical details about the +charge equilibration performed by fix qeq/reax, see the +"(Aktulga)"_#Aktulga paper. The QEq method minimizes the electrostatic energy of the system by adjusting the partial charge on individual atoms based on interactions with their neighbors. It reqires some parameters for each atom type. If the {params} setting above is the word "reax/c", then these are extracted from the "pair_style reax/c"_pair_reax_c.html command and the ReaxFF force field file it reads in. If a file name is specified for {params}, then the parameters are taken from the specified file and the file must contain one line for each atom type. The latter form must be used when performing QeQ with a non-ReaxFF potential. Each line should be formatted as follows: itype chi eta gamma :pre where {itype} is the atom type from 1 to Ntypes, {chi} denotes the electronegativity in eV, {eta} denotes the self-Coulomb potential in eV, and {gamma} denotes the valence orbital exponent. Note that these 3 quantities are also in the ReaxFF potential file, except that eta is defined here as twice the eta value in the ReaxFF file. Note that unlike the rest of LAMMPS, the units of this fix are hard-coded to be A, eV, and electronic charge. [Restart, fix_modify, output, run start/stop, minimize info:] No information about this fix is written to "binary restart files"_restart.html. No global scalar or vector or per-atom quantities are stored by this fix for access by various "output commands"_Section_howto.html#howto_15. No parameter of this fix can be used with the {start/stop} keywords of the "run"_run.html command. This fix is invoked during "energy minimization"_minimize.html. [Restrictions:] This fix is part of the USER-REAXC package. It is only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. This fix does not correctly handle interactions involving multiple periodic images of the same atom. Hence, it should not be used for periodic cell dimensions less than 10 angstroms. [Related commands:] "pair_style reax/c"_pair_reax_c.html [Default:] none :line -:link(Rappe_1991) +:link(Rappe) [(Rappe)] Rappe and Goddard III, Journal of Physical Chemistry, 105, 3358-3363 (1991). -:link(Nakano_1997) +:link(Nakano) [(Nakano)] Nakano, Computer Physics Communications, 104, 59-69 (1997). :link(Aktulga) -[(Aktulga)] Aktulga, Fogarty, Pandit, Grama, Parallel Computing, to appear (2011). +[(Aktulga)] Aktulga, Fogarty, Pandit, Grama, Parallel Computing, to +appear (2011). diff --git a/doc/fix_wall_piston.html b/doc/fix_wall_piston.html index 2ad088fbd..83cc8640d 100644 --- a/doc/fix_wall_piston.html +++ b/doc/fix_wall_piston.html @@ -1,131 +1,131 @@ <HTML> <CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> </CENTER> <HR> <H3>fix wall/piston command </H3> <P><B>Syntax:</B> </P> <PRE>fix ID group-ID wall/piston face ... keyword value ... </PRE> <UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command <LI>wall/piston = style name of this fix command <LI>face = <I>zlo</I> <LI>zero or more keyword/value pairs may be appended <LI>keyword = <I>pos</I> or <I>vel</I> or <I>ramp</I> or <I>units</I> <PRE> <I>pos</I> args = z z = z coordinate at which the piston begins (distance units) <I>vel</I> args = vz vz = final velocity of the piston (velocity units) <I>ramp</I> = use a linear velocity ramp from 0 to vz <I>temp</I> args = target damp seed extent target = target velocity for region immediately ahead of the piston damp = damping paramter (time units) seed = random number seed for langevin kicks extent = extent of thermostated region (distance units) <I>units</I> value = <I>lattice</I> or <I>box</I> <I>lattice</I> = the wall position is defined in lattice units <I>box</I> = the wall position is defined in simulation box units </PRE> </UL> <P><B>Examples:</B> </P> <PRE>fix xwalls all wall/piston zlo fix walls all wall/piston zlo pos 1.0 0.0 0.0 vel 0.0 0.0 10.0 units box fix top all wall/piston zlo vel 0.0 0.0 10.0 ramp </PRE> <P><B>Description:</B> </P> -<P>Bound the simulation with a moving wall which reflect particles -in the specified group and drive the system with an effective infinite-mass -piston capable of driving shock waves. -</P> -<P>A momentum mirror technique is used, which means that if an atom (or the wall) -moves such that an atom is outside the wall on a timestep -by a distance delta (e.g. due to <A HREF = "fix_nve.html">fix nve</A>), then it is -put back inside the face by the same delta, and the velocity relative to -the moving wall is flipped in z. For instance, a stationary particle hit with a -piston wall with velocity vz, will end the timestep with a velocity of 2*vz. -</P> -<P>Currently the <I>face</I> keyword can only be <I>zlo</I>. -This creates a piston moving in the positive z direction. -Particles with z coordinate less than the wall position -are reflected to a z coordinate -greater than the wall position. -If the piston velocity is vpz and the particle velocity -before reflection is vzi, the particle velocity after -reflection is -vzi + 2*vpz. +<P>Bound the simulation with a moving wall which reflect particles in the +specified group and drive the system with an effective infinite-mass +piston capable of driving shock waves. +</P> +<P>A momentum mirror technique is used, which means that if an atom (or +the wall) moves such that an atom is outside the wall on a timestep by +a distance delta (e.g. due to <A HREF = "fix_nve.html">fix nve</A>), then it is put +back inside the face by the same delta, and the velocity relative to +the moving wall is flipped in z. For instance, a stationary particle +hit with a piston wall with velocity vz, will end the timestep with a +velocity of 2*vz. +</P> +<P>Currently the <I>face</I> keyword can only be <I>zlo</I>. This creates a piston +moving in the positive z direction. Particles with z coordinate less +than the wall position are reflected to a z coordinate greater than +the wall position. If the piston velocity is vpz and the particle +velocity before reflection is vzi, the particle velocity after +reflection is -vzi + 2*vpz. </P> <P>The initial position of the wall can be specified by the <I>pos</I> keyword. </P> <P>The final velocity of the wall can be specified by the <I>vel</I> keyword </P> -<P>The <I>ramp</I> keyword will cause the wall/piston to adjust the velocity linearly -from zero velocity to <I>vel</I> over the course of the run. If the <I>ramp</I> keyword is omitted -then the wall/piston moves at a constant velocity defined by <I>vel</I>. +<P>The <I>ramp</I> keyword will cause the wall/piston to adjust the velocity +linearly from zero velocity to <I>vel</I> over the course of the run. If +the <I>ramp</I> keyword is omitted then the wall/piston moves at a constant +velocity defined by <I>vel</I>. </P> -<P>The <I>temp</I> keyword will cause the region immediately in front of the wall/piston -to be thermostated with a Langevin thermostat. This region moves with the piston. -The damping and kicking are measured in the reference frame of the piston. -So, a temperature of zero would mean all particles were moving at exactly the speed -of the wall/piston. +<P>The <I>temp</I> keyword will cause the region immediately in front of the +wall/piston to be thermostated with a Langevin thermostat. This +region moves with the piston. The damping and kicking are measured in +the reference frame of the piston. So, a temperature of zero would +mean all particles were moving at exactly the speed of the +wall/piston. </P> <P>The <I>units</I> keyword determines the meaning of the distance units used to define a wall position, but only when a numeric constant is used. </P> <P>A <I>box</I> value selects standard distance units as defined by the <A HREF = "units.html">units</A> command, e.g. Angstroms for units = real or metal. A <I>lattice</I> value means the distance units are in lattice spacings. The <A HREF = "lattice.html">lattice</A> command must have been previously used to define the lattice spacings. </P> <HR> <P><B>Restart, fix_modify, output, run start/stop, minimize info:</B> </P> <P>No information about this fix is written to <A HREF = "restart.html">binary restart files</A>. None of the <A HREF = "fix_modify.html">fix_modify</A> options are relevant to this fix. No global or per-atom quantities are stored by this fix for access by various <A HREF = "Section_howto.html#howoto_15">output commands</A>. No parameter of this fix can be used with the <I>start/stop</I> keywords of the <A HREF = "run.html">run</A> command. This fix is not invoked during <A HREF = "minimize.html">energy minimization</A>. </P> <P><B>Restrictions:</B> </P> <P>This fix style is part of the SHOCK package. It is only enabled if LAMMPS was built with that package. See the <A HREF = "Section_start.html#start_3">Making LAMMPS</A> section for more info. </P> <P>The face that has the wall/piston must be boundary type 's' (shrink-wrapped). The opposing face can be any boundary type other than periodic. </P> <P>A wall/piston should not be used with rigid bodies such as those defined by a "fix rigid" command. This is because the wall/piston displaces atoms directly rather than exerting a force on them. </P> <P><B>Related commands:</B> </P> -<P><A HREF = "fix_wall.html">fix wall/reflect</A> command +<P><A HREF = "fix_wall.html">fix wall/reflect</A> command, <A HREF = "fix_append_atoms.html">fix +append/atoms</A> command </P> -<P><A HREF = "fix_append_atoms.html">fix append/atoms</A> command +<P><B>Default:</B> </P> -<P><B>Default:</B> <I>pos</I> = 0, <I>vel</I> = 0, <I>units</I> = lattice. +<P>The keyword defaults are pos = 0, vel = 0, units = lattice. </P> -<HR> - </HTML> diff --git a/doc/fix_wall_piston.txt b/doc/fix_wall_piston.txt index eab8b2a86..05bb474e8 100644 --- a/doc/fix_wall_piston.txt +++ b/doc/fix_wall_piston.txt @@ -1,120 +1,120 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line fix wall/piston command :h3 [Syntax:] fix ID group-ID wall/piston face ... keyword value ... :pre ID, group-ID are documented in "fix"_fix.html command :ulb,l wall/piston = style name of this fix command :l face = {zlo} :l zero or more keyword/value pairs may be appended :l keyword = {pos} or {vel} or {ramp} or {units} :l {pos} args = z z = z coordinate at which the piston begins (distance units) {vel} args = vz vz = final velocity of the piston (velocity units) {ramp} = use a linear velocity ramp from 0 to vz {temp} args = target damp seed extent target = target velocity for region immediately ahead of the piston damp = damping paramter (time units) seed = random number seed for langevin kicks extent = extent of thermostated region (distance units) {units} value = {lattice} or {box} {lattice} = the wall position is defined in lattice units {box} = the wall position is defined in simulation box units :pre :ule [Examples:] fix xwalls all wall/piston zlo fix walls all wall/piston zlo pos 1.0 0.0 0.0 vel 0.0 0.0 10.0 units box fix top all wall/piston zlo vel 0.0 0.0 10.0 ramp :pre [Description:] -Bound the simulation with a moving wall which reflect particles -in the specified group and drive the system with an effective infinite-mass -piston capable of driving shock waves. - -A momentum mirror technique is used, which means that if an atom (or the wall) -moves such that an atom is outside the wall on a timestep -by a distance delta (e.g. due to "fix nve"_fix_nve.html), then it is -put back inside the face by the same delta, and the velocity relative to -the moving wall is flipped in z. For instance, a stationary particle hit with a -piston wall with velocity vz, will end the timestep with a velocity of 2*vz. - -Currently the {face} keyword can only be {zlo}. -This creates a piston moving in the positive z direction. -Particles with z coordinate less than the wall position -are reflected to a z coordinate -greater than the wall position. -If the piston velocity is vpz and the particle velocity -before reflection is vzi, the particle velocity after -reflection is -vzi + 2*vpz. +Bound the simulation with a moving wall which reflect particles in the +specified group and drive the system with an effective infinite-mass +piston capable of driving shock waves. + +A momentum mirror technique is used, which means that if an atom (or +the wall) moves such that an atom is outside the wall on a timestep by +a distance delta (e.g. due to "fix nve"_fix_nve.html), then it is put +back inside the face by the same delta, and the velocity relative to +the moving wall is flipped in z. For instance, a stationary particle +hit with a piston wall with velocity vz, will end the timestep with a +velocity of 2*vz. + +Currently the {face} keyword can only be {zlo}. This creates a piston +moving in the positive z direction. Particles with z coordinate less +than the wall position are reflected to a z coordinate greater than +the wall position. If the piston velocity is vpz and the particle +velocity before reflection is vzi, the particle velocity after +reflection is -vzi + 2*vpz. The initial position of the wall can be specified by the {pos} keyword. The final velocity of the wall can be specified by the {vel} keyword -The {ramp} keyword will cause the wall/piston to adjust the velocity linearly -from zero velocity to {vel} over the course of the run. If the {ramp} keyword is omitted -then the wall/piston moves at a constant velocity defined by {vel}. +The {ramp} keyword will cause the wall/piston to adjust the velocity +linearly from zero velocity to {vel} over the course of the run. If +the {ramp} keyword is omitted then the wall/piston moves at a constant +velocity defined by {vel}. -The {temp} keyword will cause the region immediately in front of the wall/piston -to be thermostated with a Langevin thermostat. This region moves with the piston. -The damping and kicking are measured in the reference frame of the piston. -So, a temperature of zero would mean all particles were moving at exactly the speed -of the wall/piston. +The {temp} keyword will cause the region immediately in front of the +wall/piston to be thermostated with a Langevin thermostat. This +region moves with the piston. The damping and kicking are measured in +the reference frame of the piston. So, a temperature of zero would +mean all particles were moving at exactly the speed of the +wall/piston. The {units} keyword determines the meaning of the distance units used to define a wall position, but only when a numeric constant is used. A {box} value selects standard distance units as defined by the "units"_units.html command, e.g. Angstroms for units = real or metal. A {lattice} value means the distance units are in lattice spacings. The "lattice"_lattice.html command must have been previously used to define the lattice spacings. :line [Restart, fix_modify, output, run start/stop, minimize info:] No information about this fix is written to "binary restart files"_restart.html. None of the "fix_modify"_fix_modify.html options are relevant to this fix. No global or per-atom quantities are stored by this fix for access by various "output commands"_Section_howto.html#howoto_15. No parameter of this fix can be used with the {start/stop} keywords of the "run"_run.html command. This fix is not invoked during "energy minimization"_minimize.html. [Restrictions:] This fix style is part of the SHOCK package. It is only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. The face that has the wall/piston must be boundary type 's' (shrink-wrapped). The opposing face can be any boundary type other than periodic. A wall/piston should not be used with rigid bodies such as those defined by a "fix rigid" command. This is because the wall/piston displaces atoms directly rather than exerting a force on them. [Related commands:] -"fix wall/reflect"_fix_wall.html command +"fix wall/reflect"_fix_wall.html command, "fix +append/atoms"_fix_append_atoms.html command -"fix append/atoms"_fix_append_atoms.html command +[Default:] -[Default:] {pos} = 0, {vel} = 0, {units} = lattice. - -:line +The keyword defaults are pos = 0, vel = 0, units = lattice. diff --git a/doc/pair_meam_spline.html b/doc/pair_meam_spline.html index 7c7af6261..81f41ec5d 100644 --- a/doc/pair_meam_spline.html +++ b/doc/pair_meam_spline.html @@ -1,127 +1,124 @@ <HTML> <CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> </CENTER> <HR> <H3>pair_style meam/spline </H3> <P><B>Syntax:</B> </P> <PRE>pair_style meam/spline </PRE> <P><B>Examples:</B> </P> <PRE>pair_style meam/spline -pair_coeff * * Ti.meam.spline +pair_coeff * * Ti.meam.spline Ti +pair_coeff * * Ti.meam.spline Ti Ti Ti </PRE> <P><B>Description:</B> </P> <P>The <I>meam/spline</I> style computes pairwise interactions for metals using a variant of modified embedded-atom method (MEAM) potentials <A HREF = "#Lenosky">(Lenosky)</A>. The total energy E is given by </P> -<CENTER><IMG SRC = "Eqs/pair_meam_spline_1.png"> +<CENTER><IMG SRC = "Eqs/pair_meam_spline.jpg"> </CENTER> -<P>with the density at atom i -</P> -<CENTER><IMG SRC = "Eqs/pair_meam_spline_2.png"> -</CENTER> -<P>where theta_jik is the angle between atoms j, i, and k centered on -atom i. The five functions Phi, U, rho, f, and g are represented by -cubic splines. +<P>where rho_i is the density at atom I, theta_jik is the angle between +atoms J, I, and K centered on atom I. The five functions Phi, U, rho, +f, and g are represented by cubic splines. </P> <P>The cutoffs and the coefficients for these spline functions are listed in a parameter file which is specified by the <A HREF = "pair_coeff.html">pair_coeff</A> command. Parameter files for different elements are included in the "potentials" directory of the LAMMPS distribution and have a ".meam.spline" file suffix. All of these files are parameterized in terms of LAMMPS <A HREF = "units.html">metal units</A>. </P> <P>Note that unlike for other potentials, cutoffs for spline-based MEAM potentials are not set in the pair_style or pair_coeff command; they are specified in the potential files themselves. </P> <P>Unlike the EAM pair style, which retrieves the atomic mass from the potential file, the spline-based MEAM potentials do not include mass information; thus you need to use the <A HREF = "mass.html">mass</A> command to specify it. </P> <P>Only a single pair_coeff command is used with the <I>meam/spline</I> style which specifies a potential file with parameters for all needed elements. These are mapped to LAMMPS atom types by specifying N additional arguments after the filename in the pair_coeff command, where N is the number of LAMMPS atom types: </P> <UL><LI>filename <LI>N element names = mapping of spline-based MEAM elements to atom types </UL> <P>As an example, imagine the Ti.meam.spline file has values for Ti. If your LAMMPS simulation has 3 atoms types and they are all to be treated with this potentials, you would use the following pair_coeff command: </P> <PRE>pair_coeff * * Ti.meam.spline Ti Ti Ti </PRE> <P>The 1st 2 arguments must be * * so as to span all LAMMPS atom types. The three Ti arguments map LAMMPS atom types 1,2,3 to the Ti element in the potential file. If a mapping value is specified as NULL, the mapping is not performed. This can be used when a <I>meam/spline</I> potential is used as part of the <I>hybrid</I> pair style. The NULL values are placeholders for atom types that will be used with other potentials. </P> <P>IMPORTANT NOTE: The <I>meam/spline</I> style currently supports only single-element MEAM potentials. It may be extended for alloy systems in the future. </P> <HR> <P><B>Mixing, shift, table, tail correction, restart, rRESPA info</B>: </P> <P>The current version of this pair style does not support multiple element types or mixing. It has been designed for pure elements only. </P> <P>This pair style does not support the <A HREF = "pair_modify.html">pair_modify</A> shift, table, and tail options. </P> <P>The <I>meam/spline</I> pair style does not write its information to <A HREF = "restart.html">binary restart files</A>, since it is stored in an external potential parameter file. Thus, you need to re-specify the pair_style and pair_coeff commands in an input script that reads a restart file. </P> <P>The <I>meam/spline</I> pair style can only be used via the <I>pair</I> keyword of the <A HREF = "run_style.html">run_style respa</A> command. They do not support the <I>inner</I>, <I>middle</I>, <I>outer</I> keywords. </P> <HR> <P><B>Restrictions:</B> </P> <P>This pair style requires the <A HREF = "newton.html">newton</A> setting to be "on" for pair interactions. </P> <P>This pair style is only enabled if LAMMPS was built with the USER-MISC package. See the <A HREF = "Section_start.html#start_3">Making LAMMPS</A> section for more info. </P> <P><B>Related commands:</B> </P> <P><A HREF = "pair_coeff.html">pair_coeff</A>, <A HREF = "pair_meam.html">pair_style meam</A> </P> <P><B>Default:</B> none </P> <HR> <A NAME = "Lenosky"></A> <P><B>(Lenosky)</B> Lenosky, Sadigh, Alonso, Bulatov, de la Rubia, Kim, Voter, Kress, Modelling Simulation Materials Science Enginerring, 8, 825 (2000). </P> </HTML> diff --git a/doc/pair_meam_spline.txt b/doc/pair_meam_spline.txt index 9ce855b5f..db95c9d71 100644 --- a/doc/pair_meam_spline.txt +++ b/doc/pair_meam_spline.txt @@ -1,144 +1,141 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line pair_style meam/spline :h3 pair_style meam/spline/omp :h3 [Syntax:] pair_style meam/spline :pre [Examples:] pair_style meam/spline -pair_coeff * * Ti.meam.spline :pre +pair_coeff * * Ti.meam.spline Ti +pair_coeff * * Ti.meam.spline Ti Ti Ti :pre [Description:] The {meam/spline} style computes pairwise interactions for metals using a variant of modified embedded-atom method (MEAM) potentials "(Lenosky)"_#Lenosky. The total energy E is given by -:c,image(Eqs/pair_meam_spline_1.png) - -with the density at atom i - -:c,image(Eqs/pair_meam_spline_2.png) +:c,image(Eqs/pair_meam_spline.jpg) -where theta_jik is the angle between atoms j, i, and k centered on -atom i. The five functions Phi, U, rho, f, and g are represented by -cubic splines. +where rho_i is the density at atom I, theta_jik is the angle between +atoms J, I, and K centered on atom I. The five functions Phi, U, rho, +f, and g are represented by cubic splines. The cutoffs and the coefficients for these spline functions are listed in a parameter file which is specified by the "pair_coeff"_pair_coeff.html command. Parameter files for different elements are included in the "potentials" directory of the LAMMPS distribution and have a ".meam.spline" file suffix. All of these files are parameterized in terms of LAMMPS "metal units"_units.html. Note that unlike for other potentials, cutoffs for spline-based MEAM potentials are not set in the pair_style or pair_coeff command; they are specified in the potential files themselves. Unlike the EAM pair style, which retrieves the atomic mass from the potential file, the spline-based MEAM potentials do not include mass information; thus you need to use the "mass"_mass.html command to specify it. Only a single pair_coeff command is used with the {meam/spline} style which specifies a potential file with parameters for all needed elements. These are mapped to LAMMPS atom types by specifying N additional arguments after the filename in the pair_coeff command, where N is the number of LAMMPS atom types: filename N element names = mapping of spline-based MEAM elements to atom types :ul As an example, imagine the Ti.meam.spline file has values for Ti. If your LAMMPS simulation has 3 atoms types and they are all to be treated with this potentials, you would use the following pair_coeff command: pair_coeff * * Ti.meam.spline Ti Ti Ti :pre The 1st 2 arguments must be * * so as to span all LAMMPS atom types. The three Ti arguments map LAMMPS atom types 1,2,3 to the Ti element in the potential file. If a mapping value is specified as NULL, the mapping is not performed. This can be used when a {meam/spline} potential is used as part of the {hybrid} pair style. The NULL values are placeholders for atom types that will be used with other potentials. IMPORTANT NOTE: The {meam/spline} style currently supports only single-element MEAM potentials. It may be extended for alloy systems in the future. :line Styles with a {cuda}, {gpu}, {omp}, or {opt} suffix are functionally the same as the corresponding style without the suffix. They have been optimized to run faster, depending on your available hardware, as discussed in "Section_accelerate"_Section_accelerate.html of the manual. The accelerated styles take the same arguments and should produce the same results, except for round-off and precision issues. These accelerated styles are part of the USER-CUDA, GPU, USER-OMP and OPT packages, respectively. They are only enabled if LAMMPS was built with those packages. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. You can specify the accelerated styles explicitly in your input script by including their suffix, or you can use the "-suffix command-line switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can use the "suffix"_suffix.html command in your input script. See "Section_accelerate"_Section_accelerate.html of the manual for more instructions on how to use the accelerated styles effectively. :line [Mixing, shift, table, tail correction, restart, rRESPA info]: The current version of this pair style does not support multiple element types or mixing. It has been designed for pure elements only. This pair style does not support the "pair_modify"_pair_modify.html shift, table, and tail options. The {meam/spline} pair style does not write its information to "binary restart files"_restart.html, since it is stored in an external potential parameter file. Thus, you need to re-specify the pair_style and pair_coeff commands in an input script that reads a restart file. The {meam/spline} pair style can only be used via the {pair} keyword of the "run_style respa"_run_style.html command. They do not support the {inner}, {middle}, {outer} keywords. :line [Restrictions:] This pair style requires the "newton"_newton.html setting to be "on" for pair interactions. This pair style is only enabled if LAMMPS was built with the USER-MISC package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. [Related commands:] "pair_coeff"_pair_coeff.html, "pair_style meam"_pair_meam.html [Default:] none :line :link(Lenosky) [(Lenosky)] Lenosky, Sadigh, Alonso, Bulatov, de la Rubia, Kim, Voter, Kress, Modelling Simulation Materials Science Enginerring, 8, 825 (2000). diff --git a/src/ASPHERE/compute_erotate_asphere.h b/src/ASPHERE/compute_erotate_asphere.h index 1927d3eb2..7ca062e44 100644 --- a/src/ASPHERE/compute_erotate_asphere.h +++ b/src/ASPHERE/compute_erotate_asphere.h @@ -1,61 +1,61 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMPUTE_CLASS ComputeStyle(erotate/asphere,ComputeERotateAsphere) #else #ifndef LMP_COMPUTE_EROTATE_ASPHERE_H #define LMP_COMPUTE_EROTATE_ASPHERE_H #include "compute.h" namespace LAMMPS_NS { class ComputeERotateAsphere : public Compute { public: ComputeERotateAsphere(class LAMMPS *, int, char **); void init(); double compute_scalar(); private: double pfactor; class AtomVecEllipsoid *avec_ellipsoid; class AtomVecLine *avec_line; class AtomVecTri *avec_tri; }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Compute erotate/asphere requires atom style ellipsoid or line or tri -UNDOCUMENTED +Self-explanatory. E: Compute erotate/asphere requires extended particles This compute cannot be used with point paritlces. */ diff --git a/src/ASPHERE/compute_temp_asphere.h b/src/ASPHERE/compute_temp_asphere.h index 7f12f7f8c..21211187b 100644 --- a/src/ASPHERE/compute_temp_asphere.h +++ b/src/ASPHERE/compute_temp_asphere.h @@ -1,86 +1,86 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMPUTE_CLASS ComputeStyle(temp/asphere,ComputeTempAsphere) #else #ifndef LMP_COMPUTE_TEMP_ASPHERE_H #define LMP_COMPUTE_TEMP_ASPHERE_H #include "compute.h" namespace LAMMPS_NS { class ComputeTempAsphere : public Compute { public: ComputeTempAsphere(class LAMMPS *, int, char **); ~ComputeTempAsphere(); void init(); double compute_scalar(); void compute_vector(); void remove_bias(int, double *); void restore_bias(int, double *); private: int fix_dof,mode; double tfactor; char *id_bias; class Compute *tbias; // ptr to additional bias compute class AtomVecEllipsoid *avec; void dof_compute(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Compute temp/asphere requires atom style ellipsoid -UNDOCUMENTED +Self-explanatory. E: Compute temp/asphere requires extended particles This compute cannot be used with point paritlces. E: Could not find compute ID for temperature bias Self-explanatory. E: Bias compute does not calculate temperature The specified compute must compute temperature. E: Bias compute does not calculate a velocity bias The specified compute must compute a bias for temperature. E: Bias compute group does not match compute group The specified compute must operate on the same group as the parent compute. */ diff --git a/src/ASPHERE/fix_nh_asphere.h b/src/ASPHERE/fix_nh_asphere.h index 8b773bf9a..8f9d7798c 100644 --- a/src/ASPHERE/fix_nh_asphere.h +++ b/src/ASPHERE/fix_nh_asphere.h @@ -1,51 +1,51 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_FIX_NH_ASPHERE_H #define LMP_FIX_NH_ASPHERE_H #include "fix_nh.h" namespace LAMMPS_NS { class FixNHAsphere : public FixNH { public: FixNHAsphere(class LAMMPS *, int, char **); virtual ~FixNHAsphere() {} void init(); protected: double dtq; class AtomVecEllipsoid *avec; void nve_v(); void nve_x(); void nh_v_temp(); }; } #endif /* ERROR/WARNING messages: E: Compute nvt/nph/npt asphere requires atom style ellipsoid -UNDOCUMENTED +Self-explanatory. E: Fix nvt/nph/npt asphere requires extended particles The shape setting for a particle in the fix group has shape = 0.0, which means it is a point particle. */ diff --git a/src/ASPHERE/fix_nve_asphere.h b/src/ASPHERE/fix_nve_asphere.h index 116caf521..6498d3657 100644 --- a/src/ASPHERE/fix_nve_asphere.h +++ b/src/ASPHERE/fix_nve_asphere.h @@ -1,53 +1,53 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(nve/asphere,FixNVEAsphere) #else #ifndef LMP_FIX_NVE_ASPHERE_H #define LMP_FIX_NVE_ASPHERE_H #include "fix_nve.h" namespace LAMMPS_NS { class FixNVEAsphere : public FixNVE { public: FixNVEAsphere(class LAMMPS *, int, char **); void init(); void initial_integrate(int); void final_integrate(); private: double dtq; class AtomVecEllipsoid *avec; }; } #endif #endif /* ERROR/WARNING messages: E: Compute nve/asphere requires atom style ellipsoid -UNDOCUMENTED +Self-explanatory. E: Fix nve/asphere requires extended particles This fix can only be used for particles with a shape setting. */ diff --git a/src/ASPHERE/fix_nve_asphere_noforce.h b/src/ASPHERE/fix_nve_asphere_noforce.h index b8473e6a1..b23422991 100755 --- a/src/ASPHERE/fix_nve_asphere_noforce.h +++ b/src/ASPHERE/fix_nve_asphere_noforce.h @@ -1,59 +1,59 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(nve/asphere/noforce,FixNVEAsphereNoforce) #else #ifndef LMP_FIX_NVE_ASPHERE_NOFORCE_H #define LMP_FIX_NVE_ASPHERE_NOFORCE_H #include "fix_nve_noforce.h" namespace LAMMPS_NS { class FixNVEAsphereNoforce : public FixNVENoforce { public: FixNVEAsphereNoforce(class LAMMPS *, int, char **); void initial_integrate(int); void init(); private: double dtq; class AtomVecEllipsoid *avec; }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Fix nve/asphere/noforce requires atom style ellipsoid -UNDOCUMENTED +Self-explanatory. E: Fix nve/asphere/noforce requires extended particles -UNDOCUMENTED +One of the particles is not an ellipsoid. */ diff --git a/src/ASPHERE/fix_nve_line.h b/src/ASPHERE/fix_nve_line.h index da0673e69..b73380864 100644 --- a/src/ASPHERE/fix_nve_line.h +++ b/src/ASPHERE/fix_nve_line.h @@ -1,66 +1,66 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(nve/line,FixNVELine) #else #ifndef LMP_FIX_NVE_LINE_H #define LMP_FIX_NVE_LINE_H #include "fix_nve.h" namespace LAMMPS_NS { class FixNVELine : public FixNVE { public: FixNVELine(class LAMMPS *, int, char **); ~FixNVELine() {} int setmask(); void init(); void initial_integrate(int); void final_integrate(); private: double MINUSPI,TWOPI; class AtomVecLine *avec; }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Fix nve/line requires atom style line -UNDOCUMENTED +Self-explanatory. E: Fix nve/line can only be used for 2d simulations -UNDOCUMENTED +Self-explanatory. E: Fix nve/line requires line particles -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/ASPHERE/fix_nve_tri.cpp b/src/ASPHERE/fix_nve_tri.cpp index 92fc1320d..9048f8926 100644 --- a/src/ASPHERE/fix_nve_tri.cpp +++ b/src/ASPHERE/fix_nve_tri.cpp @@ -1,157 +1,157 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #include "math.h" #include "stdio.h" #include "string.h" #include "fix_nve_tri.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_tri.h" #include "domain.h" #include "error.h" using namespace LAMMPS_NS; using namespace FixConst; /* ---------------------------------------------------------------------- */ FixNVETri::FixNVETri(LAMMPS *lmp, int narg, char **arg) : FixNVE(lmp, narg, arg) { if (narg != 3) error->all(FLERR,"Illegal fix nve/tri command"); time_integrate = 1; // error checks avec = (AtomVecTri *) atom->style_match("tri"); if (!avec) error->all(FLERR,"Fix nve/tri requires atom style tri"); } /* ---------------------------------------------------------------------- */ int FixNVETri::setmask() { int mask = 0; mask |= INITIAL_INTEGRATE; mask |= FINAL_INTEGRATE; mask |= INITIAL_INTEGRATE_RESPA; mask |= FINAL_INTEGRATE_RESPA; return mask; } /* ---------------------------------------------------------------------- */ void FixNVETri::init() { int i,itype; if (domain->dimension != 3) - error->all(FLERR,"Fix nve/line can only be used for 3d simulations"); + error->all(FLERR,"Fix nve/tri can only be used for 3d simulations"); // check that all particles are triangles // no point particles allowed int *tri = atom->tri; int *mask = atom->mask; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) if (mask[i] & groupbit) { if (tri[i] < 0) error->one(FLERR,"Fix nve/tri requires tri particles"); } FixNVE::init(); } /* ---------------------------------------------------------------------- */ void FixNVETri::initial_integrate(int vflag) { double dtfm; double omega[3]; AtomVecTri::Bonus *bonus = avec->bonus; int *tri = atom->tri; double **x = atom->x; double **v = atom->v; double **f = atom->f; double **angmom = atom->angmom; double **torque = atom->torque; double *rmass = atom->rmass; int *mask = atom->mask; int nlocal = atom->nlocal; if (igroup == atom->firstgroup) nlocal = atom->nfirst; // set timestep here since dt may have changed or come via rRESPA dtq = 0.5 * dtv; for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { dtfm = dtf / rmass[i]; v[i][0] += dtfm * f[i][0]; v[i][1] += dtfm * f[i][1]; v[i][2] += dtfm * f[i][2]; x[i][0] += dtv * v[i][0]; x[i][1] += dtv * v[i][1]; x[i][2] += dtv * v[i][2]; // update angular momentum by 1/2 step angmom[i][0] += dtf * torque[i][0]; angmom[i][1] += dtf * torque[i][1]; angmom[i][2] += dtf * torque[i][2]; // compute omega at 1/2 step from angmom at 1/2 step and current q // update quaternion a full step via Richardson iteration // returns new normalized quaternion MathExtra::mq_to_omega(angmom[i],bonus[tri[i]].quat, bonus[tri[i]].inertia,omega); MathExtra::richardson(bonus[tri[i]].quat,angmom[i],omega, bonus[tri[i]].inertia,dtq); } } /* ---------------------------------------------------------------------- */ void FixNVETri::final_integrate() { double dtfm; double **v = atom->v; double **f = atom->f; double **angmom = atom->angmom; double **torque = atom->torque; double *rmass = atom->rmass; int *mask = atom->mask; int nlocal = atom->nlocal; if (igroup == atom->firstgroup) nlocal = atom->nfirst; // update v,omega for all particles // d_omega/dt = torque / inertia for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { dtfm = dtf / rmass[i]; v[i][0] += dtfm * f[i][0]; v[i][1] += dtfm * f[i][1]; v[i][2] += dtfm * f[i][2]; angmom[i][0] += dtf * torque[i][0]; angmom[i][1] += dtf * torque[i][1]; angmom[i][2] += dtf * torque[i][2]; } } diff --git a/src/ASPHERE/fix_nve_tri.h b/src/ASPHERE/fix_nve_tri.h index d7cfc6650..6a00e1cd4 100644 --- a/src/ASPHERE/fix_nve_tri.h +++ b/src/ASPHERE/fix_nve_tri.h @@ -1,66 +1,66 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(nve/tri,FixNVETri) #else #ifndef LMP_FIX_NVE_TRI_H #define LMP_FIX_NVE_TRI_H #include "fix_nve.h" namespace LAMMPS_NS { class FixNVETri : public FixNVE { public: FixNVETri(class LAMMPS *, int, char **); ~FixNVETri() {} int setmask(); void init(); void initial_integrate(int); void final_integrate(); private: double dtq; class AtomVecTri *avec; }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Fix nve/tri requires atom style tri -UNDOCUMENTED +Self-explanatory. -E: Fix nve/line can only be used for 3d simulations +E: Fix nve/tri can only be used for 3d simulations -UNDOCUMENTED +Self-explanatory. E: Fix nve/tri requires tri particles -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/ASPHERE/pair_gayberne.h b/src/ASPHERE/pair_gayberne.h index 55ad88304..a8ed7574c 100644 --- a/src/ASPHERE/pair_gayberne.h +++ b/src/ASPHERE/pair_gayberne.h @@ -1,106 +1,106 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(gayberne,PairGayBerne) #else #ifndef LMP_PAIR_GAYBERNE_H #define LMP_PAIR_GAYBERNE_H #include "pair.h" namespace LAMMPS_NS { class PairGayBerne : public Pair { public: PairGayBerne(LAMMPS *lmp); virtual ~PairGayBerne(); virtual void compute(int, int); virtual void settings(int, char **); void coeff(int, char **); virtual void init_style(); double init_one(int, int); void write_restart(FILE *); void read_restart(FILE *); void write_restart_settings(FILE *); void read_restart_settings(FILE *); protected: enum{SPHERE_SPHERE,SPHERE_ELLIPSE,ELLIPSE_SPHERE,ELLIPSE_ELLIPSE}; double cut_global; double **cut; double gamma,upsilon,mu; // Gay-Berne parameters double **shape1; // per-type radii in x, y and z double **shape2; // per-type radii in x, y and z SQUARED double *lshape; // precalculation based on the shape double **well; // well depth scaling along each axis ^ -1.0/mu double **epsilon,**sigma; // epsilon and sigma values for atom-type pairs int **form; double **lj1,**lj2,**lj3,**lj4; double **offset; int *setwell; class AtomVecEllipsoid *avec; void allocate(); double gayberne_analytic(const int i, const int j, double a1[3][3], double a2[3][3], double b1[3][3], double b2[3][3], double g1[3][3], double g2[3][3], double *r12, const double rsq, double *fforce, double *ttor, double *rtor); double gayberne_lj(const int i, const int j, double a1[3][3], double b1[3][3],double g1[3][3],double *r12, const double rsq, double *fforce, double *ttor); void compute_eta_torque(double m[3][3], double m2[3][3], double *s, double ans[3][3]); }; } #endif #endif /* ERROR/WARNING messages: E: Pair gayberne requires atom style ellipsoid -UNDOCUMENTED +Self-explanatory. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. E: Pair gayberne requires atoms with same type have same shape -UNDOCUMENTED +Self-explanatory. E: Pair gayberne epsilon a,b,c coeffs are not all set Each atom type involved in pair_style gayberne must have these 3 coefficients set at least once. E: Bad matrix inversion in mldivide3 -UNDOCUMENTED +This error should not occur unless the matrix is badly formed. */ diff --git a/src/ASPHERE/pair_line_lj.h b/src/ASPHERE/pair_line_lj.h index 231166efd..cf2da5f91 100644 --- a/src/ASPHERE/pair_line_lj.h +++ b/src/ASPHERE/pair_line_lj.h @@ -1,79 +1,79 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(line/lj,PairLineLJ) #else #ifndef LMP_PAIR_LINE_LJ_H #define LMP_PAIR_LINE_LJ_H #include "pair.h" namespace LAMMPS_NS { class PairLineLJ : public Pair { public: PairLineLJ(class LAMMPS *); virtual ~PairLineLJ(); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); double init_one(int, int); protected: double cut_global; double **cut; double **epsilon,**sigma; double **lj1,**lj2,**lj3,**lj4; class AtomVecLine *avec; struct Discrete { double dx,dy; double sigma; }; Discrete *discrete; // list of all discretes for all lines int ndiscrete; // number of discretes in list int dmax; // allocated size of discrete list int *dnum; // number of discretes per line, 0 if uninit int *dfirst; // index of first discrete per each line int nmax; // allocated size of dnum,dfirst vectors void allocate(); void discretize(int, double); }; } #endif #endif /* ERROR/WARNING messages: E: Pair line/lj requires atom style line -UNDOCUMENTED +Self-explanatory. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. */ diff --git a/src/ASPHERE/pair_resquared.cpp b/src/ASPHERE/pair_resquared.cpp index 9fb782b68..c2654ca7f 100644 --- a/src/ASPHERE/pair_resquared.cpp +++ b/src/ASPHERE/pair_resquared.cpp @@ -1,990 +1,990 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ #include "math.h" #include "stdio.h" #include "stdlib.h" #include "string.h" #include "pair_resquared.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" #include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "integrate.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ PairRESquared::PairRESquared(LAMMPS *lmp) : Pair(lmp), b_alpha(45.0/56.0), cr60(pow(60.0,1.0/3.0)) { avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); if (!avec) error->all(FLERR,"Pair resquared requires atom style ellipsoid"); single_enable = 0; cr60 = pow(60.0,1.0/3.0); b_alpha = 45.0/56.0; solv_f_a = 3.0/(16.0*atan(1.0)*-36.0); solv_f_r = 3.0/(16.0*atan(1.0)*2025.0); } /* ---------------------------------------------------------------------- free all arrays ------------------------------------------------------------------------- */ PairRESquared::~PairRESquared() { if (allocated) { memory->destroy(setflag); memory->destroy(cutsq); memory->destroy(form); memory->destroy(epsilon); memory->destroy(sigma); memory->destroy(shape1); memory->destroy(shape2); memory->destroy(well); memory->destroy(cut); memory->destroy(lj1); memory->destroy(lj2); memory->destroy(lj3); memory->destroy(lj4); memory->destroy(offset); delete [] lshape; delete [] setwell; } } /* ---------------------------------------------------------------------- */ void PairRESquared::compute(int eflag, int vflag) { int i,j,ii,jj,inum,jnum,itype,jtype; double evdwl,one_eng,rsq,r2inv,r6inv,forcelj,factor_lj; double fforce[3],ttor[3],rtor[3],r12[3]; int *ilist,*jlist,*numneigh,**firstneigh; RE2Vars wi,wj; evdwl = 0.0; if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; double **x = atom->x; double **f = atom->f; double **tor = atom->torque; int *type = atom->type; int nlocal = atom->nlocal; double *special_lj = force->special_lj; int newton_pair = force->newton_pair; inum = list->inum; ilist = list->ilist; numneigh = list->numneigh; firstneigh = list->firstneigh; // loop over neighbors of my atoms for (ii = 0; ii < inum; ii++) { i = ilist[ii]; itype = type[i]; // not a LJ sphere if (lshape[itype] != 0.0) precompute_i(i,wi); jlist = firstneigh[i]; jnum = numneigh[i]; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; factor_lj = special_lj[sbmask(j)]; j &= NEIGHMASK; // r12 = center to center vector r12[0] = x[j][0]-x[i][0]; r12[1] = x[j][1]-x[i][1]; r12[2] = x[j][2]-x[i][2]; rsq = MathExtra::dot3(r12,r12); jtype = type[j]; // compute if less than cutoff if (rsq < cutsq[itype][jtype]) { fforce[0] = fforce[1] = fforce[2] = 0.0; switch (form[itype][jtype]) { case SPHERE_SPHERE: r2inv = 1.0/rsq; r6inv = r2inv*r2inv*r2inv; forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]); forcelj *= -r2inv; if (eflag) one_eng = r6inv*(r6inv*lj3[itype][jtype]-lj4[itype][jtype]) - offset[itype][jtype]; fforce[0] = r12[0]*forcelj; fforce[1] = r12[1]*forcelj; fforce[2] = r12[2]*forcelj; break; case SPHERE_ELLIPSE: precompute_i(j,wj); if (newton_pair || j < nlocal) { one_eng = resquared_lj(j,i,wj,r12,rsq,fforce,rtor,true); tor[j][0] += rtor[0]*factor_lj; tor[j][1] += rtor[1]*factor_lj; tor[j][2] += rtor[2]*factor_lj; } else one_eng = resquared_lj(j,i,wj,r12,rsq,fforce,rtor,false); break; case ELLIPSE_SPHERE: one_eng = resquared_lj(i,j,wi,r12,rsq,fforce,ttor,true); tor[i][0] += ttor[0]*factor_lj; tor[i][1] += ttor[1]*factor_lj; tor[i][2] += ttor[2]*factor_lj; break; default: precompute_i(j,wj); one_eng = resquared_analytic(i,j,wi,wj,r12,rsq,fforce,ttor,rtor); tor[i][0] += ttor[0]*factor_lj; tor[i][1] += ttor[1]*factor_lj; tor[i][2] += ttor[2]*factor_lj; if (newton_pair || j < nlocal) { tor[j][0] += rtor[0]*factor_lj; tor[j][1] += rtor[1]*factor_lj; tor[j][2] += rtor[2]*factor_lj; } break; } fforce[0] *= factor_lj; fforce[1] *= factor_lj; fforce[2] *= factor_lj; f[i][0] += fforce[0]; f[i][1] += fforce[1]; f[i][2] += fforce[2]; if (newton_pair || j < nlocal) { f[j][0] -= fforce[0]; f[j][1] -= fforce[1]; f[j][2] -= fforce[2]; } if (eflag) evdwl = factor_lj*one_eng; if (evflag) ev_tally_xyz(i,j,nlocal,newton_pair, evdwl,0.0,fforce[0],fforce[1],fforce[2], -r12[0],-r12[1],-r12[2]); } } } if (vflag_fdotr) virial_fdotr_compute(); } /* ---------------------------------------------------------------------- allocate all arrays ------------------------------------------------------------------------- */ void PairRESquared::allocate() { allocated = 1; int n = atom->ntypes; memory->create(setflag,n+1,n+1,"pair:setflag"); for (int i = 1; i <= n; i++) for (int j = i; j <= n; j++) setflag[i][j] = 0; memory->create(cutsq,n+1,n+1,"pair:cutsq"); memory->create(form,n+1,n+1,"pair:form"); memory->create(epsilon,n+1,n+1,"pair:epsilon"); memory->create(sigma,n+1,n+1,"pair:sigma"); memory->create(shape1,n+1,3,"pair:shape1"); memory->create(shape2,n+1,3,"pair:shape2"); memory->create(well,n+1,3,"pair:well"); memory->create(cut,n+1,n+1,"pair:cut"); memory->create(lj1,n+1,n+1,"pair:lj1"); memory->create(lj2,n+1,n+1,"pair:lj2"); memory->create(lj3,n+1,n+1,"pair:lj3"); memory->create(lj4,n+1,n+1,"pair:lj4"); memory->create(offset,n+1,n+1,"pair:offset"); lshape = new double[n+1]; setwell = new int[n+1]; for (int i = 1; i <= n; i++) setwell[i] = 0; } /* ---------------------------------------------------------------------- global settings ------------------------------------------------------------------------- */ void PairRESquared::settings(int narg, char **arg) { if (narg != 1) error->all(FLERR,"Illegal pair_style command"); cut_global = force->numeric(arg[0]); // reset cutoffs that have been explicitly set if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) for (j = i+1; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = cut_global; } } /* ---------------------------------------------------------------------- set coeffs for one or more type pairs ------------------------------------------------------------------------- */ void PairRESquared::coeff(int narg, char **arg) { if (narg < 10 || narg > 11) error->all(FLERR,"Incorrect args for pair coefficients"); if (!allocated) allocate(); int ilo,ihi,jlo,jhi; force->bounds(arg[0],atom->ntypes,ilo,ihi); force->bounds(arg[1],atom->ntypes,jlo,jhi); double epsilon_one = force->numeric(arg[2]); double sigma_one = force->numeric(arg[3]); double eia_one = force->numeric(arg[4]); double eib_one = force->numeric(arg[5]); double eic_one = force->numeric(arg[6]); double eja_one = force->numeric(arg[7]); double ejb_one = force->numeric(arg[8]); double ejc_one = force->numeric(arg[9]); double cut_one = cut_global; if (narg == 11) cut_one = force->numeric(arg[10]); int count = 0; for (int i = ilo; i <= ihi; i++) { for (int j = MAX(jlo,i); j <= jhi; j++) { epsilon[i][j] = epsilon_one; sigma[i][j] = sigma_one; cut[i][j] = cut_one; if (eia_one != 0.0 || eib_one != 0.0 || eic_one != 0.0) { well[i][0] = eia_one; well[i][1] = eib_one; well[i][2] = eic_one; if (eia_one == 1.0 && eib_one == 1.0 && eic_one == 1.0) setwell[i] = 2; else setwell[i] = 1; } if (eja_one != 0.0 || ejb_one != 0.0 || ejc_one != 0.0) { well[j][0] = eja_one; well[j][1] = ejb_one; well[j][2] = ejc_one; if (eja_one == 1.0 && ejb_one == 1.0 && ejc_one == 1.0) setwell[j] = 2; else setwell[j] = 1; } setflag[i][j] = 1; count++; } } if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); } /* ---------------------------------------------------------------------- init specific to this pair style ------------------------------------------------------------------------- */ void PairRESquared::init_style() { neighbor->request(this); // per-type shape precalculations // require that atom shapes are identical within each type for (int i = 1; i <= atom->ntypes; i++) { if (!atom->shape_consistency(i,shape1[i][0],shape1[i][1],shape1[i][2])) - error->all(FLERR,"Pair gayberne requires atoms with same type have same shape"); + error->all(FLERR,"Pair resquared requires atoms with same type have same shape"); if (setwell[i]) { shape2[i][0] = shape1[i][0]*shape1[i][0]; shape2[i][1] = shape1[i][1]*shape1[i][1]; shape2[i][2] = shape1[i][2]*shape1[i][2]; lshape[i] = shape1[i][0]*shape1[i][1]*shape1[i][2]; } } } /* ---------------------------------------------------------------------- init for one type pair i,j and corresponding j,i ------------------------------------------------------------------------- */ double PairRESquared::init_one(int i, int j) { if (setwell[i] == 0 || setwell[j] == 0) error->all(FLERR,"Pair resquared epsilon a,b,c coeffs are not all set"); int ishape = 0; if (shape1[i][0] != 0.0 && shape1[i][1] != 0.0 && shape1[i][2] != 0.0) ishape = 1; int jshape = 0; if (shape1[j][0] != 0.0 && shape1[j][1] != 0.0 && shape1[j][2] != 0.0) jshape = 1; if (ishape == 0 && jshape == 0) { form[i][j] = SPHERE_SPHERE; form[j][i] = SPHERE_SPHERE; } else if (ishape == 0) { form[i][j] = SPHERE_ELLIPSE; form[j][i] = ELLIPSE_SPHERE; } else if (jshape == 0) { form[i][j] = ELLIPSE_SPHERE; form[j][i] = SPHERE_ELLIPSE; } else { form[i][j] = ELLIPSE_ELLIPSE; form[j][i] = ELLIPSE_ELLIPSE; } // allow mixing only for LJ spheres if (setflag[i][j] == 0) { if (setflag[j][i] == 0) { if (ishape == 0 && jshape == 0) { epsilon[i][j] = mix_energy(epsilon[i][i],epsilon[j][j], sigma[i][i],sigma[j][j]); sigma[i][j] = mix_distance(sigma[i][i],sigma[j][j]); cut[i][j] = mix_distance(cut[i][i],cut[j][j]); } else error->all(FLERR,"Pair resquared epsilon and sigma coeffs are not all set"); } epsilon[i][j] = epsilon[j][i]; sigma[i][j] = sigma[j][i]; cut[i][j] = cut[j][i]; } lj1[i][j] = 48.0 * epsilon[i][j] * pow(sigma[i][j],12.0); lj2[i][j] = 24.0 * epsilon[i][j] * pow(sigma[i][j],6.0); lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0); lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0); if (offset_flag) { double ratio = sigma[i][j] / cut[i][j]; offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0)); } else offset[i][j] = 0.0; epsilon[j][i] = epsilon[i][j]; sigma[j][i] = sigma[i][j]; cut[j][i] = cut[i][j]; lj1[j][i] = lj1[i][j]; lj2[j][i] = lj2[i][j]; lj3[j][i] = lj3[i][j]; lj4[j][i] = lj4[i][j]; offset[j][i] = offset[i][j]; return cut[i][j]; } /* ---------------------------------------------------------------------- proc 0 writes to restart file ------------------------------------------------------------------------- */ void PairRESquared::write_restart(FILE *fp) { write_restart_settings(fp); int i,j; for (i = 1; i <= atom->ntypes; i++) { fwrite(&setwell[i],sizeof(int),1,fp); if (setwell[i]) fwrite(&well[i][0],sizeof(double),3,fp); for (j = i; j <= atom->ntypes; j++) { fwrite(&setflag[i][j],sizeof(int),1,fp); if (setflag[i][j]) { fwrite(&epsilon[i][j],sizeof(double),1,fp); fwrite(&sigma[i][j],sizeof(double),1,fp); fwrite(&cut[i][j],sizeof(double),1,fp); } } } } /* ---------------------------------------------------------------------- proc 0 reads from restart file, bcasts ------------------------------------------------------------------------- */ void PairRESquared::read_restart(FILE *fp) { read_restart_settings(fp); allocate(); int i,j; int me = comm->me; for (i = 1; i <= atom->ntypes; i++) { if (me == 0) fread(&setwell[i],sizeof(int),1,fp); MPI_Bcast(&setwell[i],1,MPI_INT,0,world); if (setwell[i]) { if (me == 0) fread(&well[i][0],sizeof(double),3,fp); MPI_Bcast(&well[i][0],3,MPI_DOUBLE,0,world); } for (j = i; j <= atom->ntypes; j++) { if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); if (setflag[i][j]) { if (me == 0) { fread(&epsilon[i][j],sizeof(double),1,fp); fread(&sigma[i][j],sizeof(double),1,fp); fread(&cut[i][j],sizeof(double),1,fp); } MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world); } } } } /* ---------------------------------------------------------------------- proc 0 writes to restart file ------------------------------------------------------------------------- */ void PairRESquared::write_restart_settings(FILE *fp) { fwrite(&cut_global,sizeof(double),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- proc 0 reads from restart file, bcasts ------------------------------------------------------------------------- */ void PairRESquared::read_restart_settings(FILE *fp) { int me = comm->me; if (me == 0) { fread(&cut_global,sizeof(double),1,fp); fread(&mix_flag,sizeof(int),1,fp); } MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- Precompute per-particle temporaries for RE-squared calculation ------------------------------------------------------------------------- */ void PairRESquared::precompute_i(const int i,RE2Vars &ws) { double aTs[3][3]; // A1'*S1^2 int *ellipsoid = atom->ellipsoid; AtomVecEllipsoid::Bonus *bonus = avec->bonus; MathExtra::quat_to_mat_trans(bonus[ellipsoid[i]].quat,ws.A); MathExtra::transpose_diag3(ws.A,well[atom->type[i]],ws.aTe); MathExtra::transpose_diag3(ws.A,shape2[atom->type[i]],aTs); MathExtra::diag_times3(shape2[atom->type[i]],ws.A,ws.sa); MathExtra::times3(aTs,ws.A,ws.gamma); MathExtra::rotation_generator_x(ws.A,ws.lA[0]); MathExtra::rotation_generator_y(ws.A,ws.lA[1]); MathExtra::rotation_generator_z(ws.A,ws.lA[2]); for (int i=0; i<3; i++) { MathExtra::times3(aTs,ws.lA[i],ws.lAtwo[i]); MathExtra::transpose_times3(ws.lA[i],ws.sa,ws.lAsa[i]); MathExtra::plus3(ws.lAsa[i],ws.lAtwo[i],ws.lAsa[i]); } } /* ---------------------------------------------------------------------- Compute the derivative of the determinant of m, using m and the derivative of m (m2) ------------------------------------------------------------------------- */ double PairRESquared::det_prime(const double m[3][3], const double m2[3][3]) { double ans; ans = m2[0][0]*m[1][1]*m[2][2] - m2[0][0]*m[1][2]*m[2][1] - m[1][0]*m2[0][1]*m[2][2] + m[1][0]*m2[0][2]*m[2][1] + m[2][0]*m2[0][1]*m[1][2] - m[2][0]*m2[0][2]*m[1][1] + m[0][0]*m2[1][1]*m[2][2] - m[0][0]*m2[1][2]*m[2][1] - m2[1][0]*m[0][1]*m[2][2] + m2[1][0]*m[0][2]*m[2][1] + m[2][0]*m[0][1]*m2[1][2] - m[2][0]*m[0][2]*m2[1][1] + m[0][0]*m[1][1]*m2[2][2] - m[0][0]*m[1][2]*m2[2][1] - m[1][0]*m[0][1]*m2[2][2] + m[1][0]*m[0][2]*m2[2][1] + m2[2][0]*m[0][1]*m[1][2] - m2[2][0]*m[0][2]*m[1][1]; return ans; } /* ---------------------------------------------------------------------- Compute the energy, force, torque for a pair (INTEGRATED-INTEGRATED) ------------------------------------------------------------------------- */ double PairRESquared::resquared_analytic(const int i, const int j, const RE2Vars &wi, const RE2Vars &wj, const double *r, const double rsq, double *fforce, double *ttor, double *rtor) { int *type = atom->type; // pair computations for energy, force, torque double z1[3],z2[3]; // A1*rhat # don't need to store double v1[3],v2[3]; // inv(S1^2)*z1 # don't need to store double sigma1,sigma2; // 1/sqrt(z1'*v1) double sigma1p2,sigma2p2; // sigma1^2 double rnorm; // L2 norm of r double rhat[3]; // r/rnorm double s[3]; // inv(gamma1+gamma2)*rhat double sigma12; // 1/sqrt(0.5*s'*rhat) double H12[3][3]; // gamma1/sigma1+gamma2/sigma2 double dH; // det(H12) double lambda; // dS1/sigma1p2+dS2/sigma2p2 double nu; // sqrt(dH/(sigma1+sigma2)) double w[3]; // inv(A1'*E1*A1+A2'*E2*A2)*rhat double h12; // rnorm-sigma12; double eta; // lambda/nu double chi; // 2*rhat'*w double sprod; // dS1*dS2 double sigh; // sigma/h12 double tprod; // eta*chi*sigh double Ua,Ur; // attractive/repulsive parts of potential // pair computations for force, torque double sec; // sigma*eta*chi double sigma1p3, sigma2p3; // sigma1^3 double vsigma1[3], vsigma2[3]; // sigma1^3*v1; double sigma12p3; // sigma12^3 double gsigma1[3][3], gsigma2[3][3]; // -gamma1/sigma1^2 double tsig1sig2; // eta/(2*(sigma1+sigma2)) double tdH; // eta/(2*dH) double teta1,teta2; // 2*eta/lambda*dS1/sigma1p3 double fourw[3]; // 4*w; double spr[3]; // 0.5*sigma12^3*s double hsec; // h12+[3,b_alpha]*sec double dspu; // 1/h12 - 1/hsec + temp double pbsu; // 3*sigma/hsec double dspr; // 7/h12-1/hsec+temp double pbsr; // b_alpha*sigma/hsec; double u[3]; // (-rhat(i)*rhat+eye(:,i))/rnorm double u1[3],u2[3]; // A1*u double dsigma1,dsigma2; // u1'*vsigma1 (force) p'*vsigma1 (tor) double dH12[3][3]; // dsigma1*gsigma1 + dsigma2*gsigma2 double ddH; // derivative of det(H12) double deta,dchi,dh12; // derivatives of eta,chi,h12 double dUr,dUa; // derivatives of Ua,Ur // pair computations for torque double fwae[3]; // -fourw'*aTe double p[3]; // lA*rhat rnorm = sqrt(rsq); rhat[0] = r[0]/rnorm; rhat[1] = r[1]/rnorm; rhat[2] = r[2]/rnorm; // energy double temp[3][3]; MathExtra::plus3(wi.gamma,wj.gamma,temp); int ierror = MathExtra::mldivide3(temp,rhat,s); if (ierror) error->all(FLERR,"Bad matrix inversion in mldivide3"); sigma12 = 1.0/sqrt(0.5*MathExtra::dot3(s,rhat)); MathExtra::matvec(wi.A,rhat,z1); MathExtra::matvec(wj.A,rhat,z2); v1[0] = z1[0]/shape2[type[i]][0]; v1[1] = z1[1]/shape2[type[i]][1]; v1[2] = z1[2]/shape2[type[i]][2]; v2[0] = z2[0]/shape2[type[j]][0]; v2[1] = z2[1]/shape2[type[j]][1]; v2[2] = z2[2]/shape2[type[j]][2]; sigma1 = 1.0/sqrt(MathExtra::dot3(z1,v1)); sigma2 = 1.0/sqrt(MathExtra::dot3(z2,v2)); H12[0][0] = wi.gamma[0][0]/sigma1+wj.gamma[0][0]/sigma2; H12[0][1] = wi.gamma[0][1]/sigma1+wj.gamma[0][1]/sigma2; H12[0][2] = wi.gamma[0][2]/sigma1+wj.gamma[0][2]/sigma2; H12[1][0] = wi.gamma[1][0]/sigma1+wj.gamma[1][0]/sigma2; H12[1][1] = wi.gamma[1][1]/sigma1+wj.gamma[1][1]/sigma2; H12[1][2] = wi.gamma[1][2]/sigma1+wj.gamma[1][2]/sigma2; H12[2][0] = wi.gamma[2][0]/sigma1+wj.gamma[2][0]/sigma2; H12[2][1] = wi.gamma[2][1]/sigma1+wj.gamma[2][1]/sigma2; H12[2][2] = wi.gamma[2][2]/sigma1+wj.gamma[2][2]/sigma2; dH=MathExtra::det3(H12); sigma1p2 = sigma1*sigma1; sigma2p2 = sigma2*sigma2; lambda = lshape[type[i]]/sigma1p2 + lshape[type[j]]/sigma2p2; nu = sqrt(dH/(sigma1+sigma2)); MathExtra::times3(wi.aTe,wi.A,temp); double temp2[3][3]; MathExtra::times3(wj.aTe,wj.A,temp2); MathExtra::plus3(temp,temp2,temp); ierror = MathExtra::mldivide3(temp,rhat,w); if (ierror) error->all(FLERR,"Bad matrix inversion in mldivide3"); h12 = rnorm-sigma12; eta = lambda/nu; chi = 2.0*MathExtra::dot3(rhat,w); sprod = lshape[type[i]] * lshape[type[j]]; sigh = sigma[type[i]][type[j]]/h12; tprod = eta*chi*sigh; double stemp = h12/2.0; Ua = (shape1[type[i]][0]+stemp)*(shape1[type[i]][1]+stemp)* (shape1[type[i]][2]+stemp)*(shape1[type[j]][0]+stemp)* (shape1[type[j]][1]+stemp)*(shape1[type[j]][2]+stemp); Ua = (1.0+3.0*tprod)*sprod/Ua; Ua = epsilon[type[i]][type[j]]*Ua/-36.0; stemp = h12/cr60; Ur = (shape1[type[i]][0]+stemp)*(shape1[type[i]][1]+stemp)* (shape1[type[i]][2]+stemp)*(shape1[type[j]][0]+stemp)* (shape1[type[j]][1]+stemp)*(shape1[type[j]][2]+stemp); Ur = (1.0+b_alpha*tprod)*sprod/Ur; Ur = epsilon[type[i]][type[j]]*Ur*pow(sigh,6.0)/2025.0; // force sec = sigma[type[i]][type[j]]*eta*chi; sigma12p3 = pow(sigma12,3.0); sigma1p3 = sigma1p2*sigma1; sigma2p3 = sigma2p2*sigma2; vsigma1[0] = -sigma1p3*v1[0]; vsigma1[1] = -sigma1p3*v1[1]; vsigma1[2] = -sigma1p3*v1[2]; vsigma2[0] = -sigma2p3*v2[0]; vsigma2[1] = -sigma2p3*v2[1]; vsigma2[2] = -sigma2p3*v2[2]; gsigma1[0][0] = -wi.gamma[0][0]/sigma1p2; gsigma1[0][1] = -wi.gamma[0][1]/sigma1p2; gsigma1[0][2] = -wi.gamma[0][2]/sigma1p2; gsigma1[1][0] = -wi.gamma[1][0]/sigma1p2; gsigma1[1][1] = -wi.gamma[1][1]/sigma1p2; gsigma1[1][2] = -wi.gamma[1][2]/sigma1p2; gsigma1[2][0] = -wi.gamma[2][0]/sigma1p2; gsigma1[2][1] = -wi.gamma[2][1]/sigma1p2; gsigma1[2][2] = -wi.gamma[2][2]/sigma1p2; gsigma2[0][0] = -wj.gamma[0][0]/sigma2p2; gsigma2[0][1] = -wj.gamma[0][1]/sigma2p2; gsigma2[0][2] = -wj.gamma[0][2]/sigma2p2; gsigma2[1][0] = -wj.gamma[1][0]/sigma2p2; gsigma2[1][1] = -wj.gamma[1][1]/sigma2p2; gsigma2[1][2] = -wj.gamma[1][2]/sigma2p2; gsigma2[2][0] = -wj.gamma[2][0]/sigma2p2; gsigma2[2][1] = -wj.gamma[2][1]/sigma2p2; gsigma2[2][2] = -wj.gamma[2][2]/sigma2p2; tsig1sig2 = eta/(2.0*(sigma1+sigma2)); tdH = eta/(2.0*dH); teta1 = 2.0*eta/lambda; teta2 = teta1*lshape[type[j]]/sigma2p3; teta1 = teta1*lshape[type[i]]/sigma1p3; fourw[0] = 4.0*w[0]; fourw[1] = 4.0*w[1]; fourw[2] = 4.0*w[2]; spr[0] = 0.5*sigma12p3*s[0]; spr[1] = 0.5*sigma12p3*s[1]; spr[2] = 0.5*sigma12p3*s[2]; stemp = 1.0/(shape1[type[i]][0]*2.0+h12)+ 1.0/(shape1[type[i]][1]*2.0+h12)+ 1.0/(shape1[type[i]][2]*2.0+h12)+ 1.0/(shape1[type[j]][0]*2.0+h12)+ 1.0/(shape1[type[j]][1]*2.0+h12)+ 1.0/(shape1[type[j]][2]*2.0+h12); hsec = h12+3.0*sec; dspu = 1.0/h12-1.0/hsec+stemp; pbsu = 3.0*sigma[type[i]][type[j]]/hsec; stemp = 1.0/(shape1[type[i]][0]*cr60+h12)+ 1.0/(shape1[type[i]][1]*cr60+h12)+ 1.0/(shape1[type[i]][2]*cr60+h12)+ 1.0/(shape1[type[j]][0]*cr60+h12)+ 1.0/(shape1[type[j]][1]*cr60+h12)+ 1.0/(shape1[type[j]][2]*cr60+h12); hsec = h12+b_alpha*sec; dspr = 7.0/h12-1.0/hsec+stemp; pbsr = b_alpha*sigma[type[i]][type[j]]/hsec; for (int i=0; i<3; i++) { u[0] = -rhat[i]*rhat[0]; u[1] = -rhat[i]*rhat[1]; u[2] = -rhat[i]*rhat[2]; u[i] += 1.0; u[0] /= rnorm; u[1] /= rnorm; u[2] /= rnorm; MathExtra::matvec(wi.A,u,u1); MathExtra::matvec(wj.A,u,u2); dsigma1=MathExtra::dot3(u1,vsigma1); dsigma2=MathExtra::dot3(u2,vsigma2); dH12[0][0] = dsigma1*gsigma1[0][0]+dsigma2*gsigma2[0][0]; dH12[0][1] = dsigma1*gsigma1[0][1]+dsigma2*gsigma2[0][1]; dH12[0][2] = dsigma1*gsigma1[0][2]+dsigma2*gsigma2[0][2]; dH12[1][0] = dsigma1*gsigma1[1][0]+dsigma2*gsigma2[1][0]; dH12[1][1] = dsigma1*gsigma1[1][1]+dsigma2*gsigma2[1][1]; dH12[1][2] = dsigma1*gsigma1[1][2]+dsigma2*gsigma2[1][2]; dH12[2][0] = dsigma1*gsigma1[2][0]+dsigma2*gsigma2[2][0]; dH12[2][1] = dsigma1*gsigma1[2][1]+dsigma2*gsigma2[2][1]; dH12[2][2] = dsigma1*gsigma1[2][2]+dsigma2*gsigma2[2][2]; ddH = det_prime(H12,dH12); deta = (dsigma1+dsigma2)*tsig1sig2; deta -= ddH*tdH; deta -= dsigma1*teta1+dsigma2*teta2; dchi = MathExtra::dot3(u,fourw); dh12 = rhat[i]+MathExtra::dot3(u,spr); dUa = pbsu*(eta*dchi+deta*chi)-dh12*dspu; dUr = pbsr*(eta*dchi+deta*chi)-dh12*dspr; fforce[i]=dUr*Ur+dUa*Ua; } // torque on i MathExtra::vecmat(fourw,wi.aTe,fwae); for (int i=0; i<3; i++) { MathExtra::matvec(wi.lA[i],rhat,p); dsigma1 = MathExtra::dot3(p,vsigma1); dH12[0][0] = wi.lAsa[i][0][0]/sigma1+dsigma1*gsigma1[0][0]; dH12[0][1] = wi.lAsa[i][0][1]/sigma1+dsigma1*gsigma1[0][1]; dH12[0][2] = wi.lAsa[i][0][2]/sigma1+dsigma1*gsigma1[0][2]; dH12[1][0] = wi.lAsa[i][1][0]/sigma1+dsigma1*gsigma1[1][0]; dH12[1][1] = wi.lAsa[i][1][1]/sigma1+dsigma1*gsigma1[1][1]; dH12[1][2] = wi.lAsa[i][1][2]/sigma1+dsigma1*gsigma1[1][2]; dH12[2][0] = wi.lAsa[i][2][0]/sigma1+dsigma1*gsigma1[2][0]; dH12[2][1] = wi.lAsa[i][2][1]/sigma1+dsigma1*gsigma1[2][1]; dH12[2][2] = wi.lAsa[i][2][2]/sigma1+dsigma1*gsigma1[2][2]; ddH = det_prime(H12,dH12); deta = tsig1sig2*dsigma1-tdH*ddH; deta -= teta1*dsigma1; double tempv[3]; MathExtra::matvec(wi.lA[i],w,tempv); dchi = -MathExtra::dot3(fwae,tempv); MathExtra::matvec(wi.lAtwo[i],spr,tempv); dh12 = -MathExtra::dot3(s,tempv); dUa = pbsu*(eta*dchi + deta*chi)-dh12*dspu; dUr = pbsr*(eta*dchi + deta*chi)-dh12*dspr; ttor[i] = -(dUa*Ua+dUr*Ur); } // torque on j if (!(force->newton_pair || j < atom->nlocal)) return Ua+Ur; MathExtra::vecmat(fourw,wj.aTe,fwae); for (int i=0; i<3; i++) { MathExtra::matvec(wj.lA[i],rhat,p); dsigma2 = MathExtra::dot3(p,vsigma2); dH12[0][0] = wj.lAsa[i][0][0]/sigma2+dsigma2*gsigma2[0][0]; dH12[0][1] = wj.lAsa[i][0][1]/sigma2+dsigma2*gsigma2[0][1]; dH12[0][2] = wj.lAsa[i][0][2]/sigma2+dsigma2*gsigma2[0][2]; dH12[1][0] = wj.lAsa[i][1][0]/sigma2+dsigma2*gsigma2[1][0]; dH12[1][1] = wj.lAsa[i][1][1]/sigma2+dsigma2*gsigma2[1][1]; dH12[1][2] = wj.lAsa[i][1][2]/sigma2+dsigma2*gsigma2[1][2]; dH12[2][0] = wj.lAsa[i][2][0]/sigma2+dsigma2*gsigma2[2][0]; dH12[2][1] = wj.lAsa[i][2][1]/sigma2+dsigma2*gsigma2[2][1]; dH12[2][2] = wj.lAsa[i][2][2]/sigma2+dsigma2*gsigma2[2][2]; ddH = det_prime(H12,dH12); deta = tsig1sig2*dsigma2-tdH*ddH; deta -= teta2*dsigma2; double tempv[3]; MathExtra::matvec(wj.lA[i],w,tempv); dchi = -MathExtra::dot3(fwae,tempv); MathExtra::matvec(wj.lAtwo[i],spr,tempv); dh12 = -MathExtra::dot3(s,tempv); dUa = pbsu*(eta*dchi + deta*chi)-dh12*dspu; dUr = pbsr*(eta*dchi + deta*chi)-dh12*dspr; rtor[i] = -(dUa*Ua+dUr*Ur); } return Ua+Ur; } /* ---------------------------------------------------------------------- Compute the energy, force, torque for a pair (INTEGRATED-LJ) ------------------------------------------------------------------------- */ double PairRESquared::resquared_lj(const int i, const int j, const RE2Vars &wi, const double *r, const double rsq, double *fforce, double *ttor, bool calc_torque) { int *type = atom->type; // pair computations for energy, force, torque double rnorm; // L2 norm of r double rhat[3]; // r/rnorm double s[3]; // inv(gamma1)*rhat double sigma12; // 1/sqrt(0.5*s'*rhat) double w[3]; // inv(A1'*E1*A1+I)*rhat double h12; // rnorm-sigma12; double chi; // 2*rhat'*w double sigh; // sigma/h12 double tprod; // chi*sigh double Ua,Ur; // attractive/repulsive parts of potential // pair computations for force, torque double sec; // sigma*chi double sigma12p3; // sigma12^3 double fourw[3]; // 4*w; double spr[3]; // 0.5*sigma12^3*s double hsec; // h12+[3,b_alpha]*sec double dspu; // 1/h12 - 1/hsec + temp double pbsu; // 3*sigma/hsec double dspr; // 7/h12-1/hsec+temp double pbsr; // b_alpha*sigma/hsec; double u[3]; // (-rhat(i)*rhat+eye(:,i))/rnorm double dchi,dh12; // derivatives of chi,h12 double dUr,dUa; // derivatives of Ua,Ur double h12p3; // h12^3 // pair computations for torque double fwae[3]; // -fourw'*aTe double p[3]; // lA*rhat // distance of closest approach correction double aTs[3][3]; // A1'*S1^2 double gamma[3][3]; // A1'*S1^2*A double lAtwo[3][3][3]; // A1'*S1^2*wi.lA double scorrect[3]; double half_sigma=sigma[type[i]][type[j]] / 2.0; scorrect[0] = shape1[type[i]][0]+half_sigma; scorrect[1] = shape1[type[i]][1]+half_sigma; scorrect[2] = shape1[type[i]][2]+half_sigma; scorrect[0] = scorrect[0] * scorrect[0] / 2.0; scorrect[1] = scorrect[1] * scorrect[1] / 2.0; scorrect[2] = scorrect[2] * scorrect[2] / 2.0; MathExtra::transpose_diag3(wi.A,scorrect,aTs); MathExtra::times3(aTs,wi.A,gamma); for (int ii=0; ii<3; ii++) MathExtra::times3(aTs,wi.lA[ii],lAtwo[ii]); rnorm=sqrt(rsq); rhat[0] = r[0]/rnorm; rhat[1] = r[1]/rnorm; rhat[2] = r[2]/rnorm; // energy int ierror = MathExtra::mldivide3(gamma,rhat,s); if (ierror) error->all(FLERR,"Bad matrix inversion in mldivide3"); sigma12 = 1.0/sqrt(0.5*MathExtra::dot3(s,rhat)); double temp[3][3]; MathExtra::times3(wi.aTe,wi.A,temp); temp[0][0] += 1.0; temp[1][1] += 1.0; temp[2][2] += 1.0; ierror = MathExtra::mldivide3(temp,rhat,w); if (ierror) error->all(FLERR,"Bad matrix inversion in mldivide3"); h12 = rnorm-sigma12; chi = 2.0*MathExtra::dot3(rhat,w); sigh = sigma[type[i]][type[j]]/h12; tprod = chi*sigh; h12p3 = pow(h12,3.0); double sigmap3 = pow(sigma[type[i]][type[j]],3.0); double stemp = h12/2.0; Ua = (shape1[type[i]][0]+stemp)*(shape1[type[i]][1]+stemp)* (shape1[type[i]][2]+stemp)*h12p3/8.0; Ua = (1.0+3.0*tprod)*lshape[type[i]]/Ua; Ua = epsilon[type[i]][type[j]]*Ua*sigmap3*solv_f_a; stemp = h12/cr60; Ur = (shape1[type[i]][0]+stemp)*(shape1[type[i]][1]+stemp)* (shape1[type[i]][2]+stemp)*h12p3/60.0; Ur = (1.0+b_alpha*tprod)*lshape[type[i]]/Ur; Ur = epsilon[type[i]][type[j]]*Ur*sigmap3*pow(sigh,6.0)*solv_f_r; // force sec = sigma[type[i]][type[j]]*chi; sigma12p3 = pow(sigma12,3.0); fourw[0] = 4.0*w[0]; fourw[1] = 4.0*w[1]; fourw[2] = 4.0*w[2]; spr[0] = 0.5*sigma12p3*s[0]; spr[1] = 0.5*sigma12p3*s[1]; spr[2] = 0.5*sigma12p3*s[2]; stemp = 1.0/(shape1[type[i]][0]*2.0+h12)+ 1.0/(shape1[type[i]][1]*2.0+h12)+ 1.0/(shape1[type[i]][2]*2.0+h12)+ 3.0/h12; hsec = h12+3.0*sec; dspu = 1.0/h12-1.0/hsec+stemp; pbsu = 3.0*sigma[type[i]][type[j]]/hsec; stemp = 1.0/(shape1[type[i]][0]*cr60+h12)+ 1.0/(shape1[type[i]][1]*cr60+h12)+ 1.0/(shape1[type[i]][2]*cr60+h12)+ 3.0/h12; hsec = h12+b_alpha*sec; dspr = 7.0/h12-1.0/hsec+stemp; pbsr = b_alpha*sigma[type[i]][type[j]]/hsec; for (int i=0; i<3; i++) { u[0] = -rhat[i]*rhat[0]; u[1] = -rhat[i]*rhat[1]; u[2] = -rhat[i]*rhat[2]; u[i] += 1.0; u[0] /= rnorm; u[1] /= rnorm; u[2] /= rnorm; dchi = MathExtra::dot3(u,fourw); dh12 = rhat[i]+MathExtra::dot3(u,spr); dUa = pbsu*dchi-dh12*dspu; dUr = pbsr*dchi-dh12*dspr; fforce[i]=dUr*Ur+dUa*Ua; } // torque on i if (calc_torque) { MathExtra::vecmat(fourw,wi.aTe,fwae); for (int i=0; i<3; i++) { MathExtra::matvec(wi.lA[i],rhat,p); double tempv[3]; MathExtra::matvec(wi.lA[i],w,tempv); dchi = -MathExtra::dot3(fwae,tempv); MathExtra::matvec(lAtwo[i],spr,tempv); dh12 = -MathExtra::dot3(s,tempv); dUa = pbsu*dchi-dh12*dspu; dUr = pbsr*dchi-dh12*dspr; ttor[i] = -(dUa*Ua+dUr*Ur); } } return Ua+Ur; } diff --git a/src/ASPHERE/pair_resquared.h b/src/ASPHERE/pair_resquared.h index 12eeae6c5..3c54355ad 100644 --- a/src/ASPHERE/pair_resquared.h +++ b/src/ASPHERE/pair_resquared.h @@ -1,131 +1,131 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(resquared,PairRESquared) #else #ifndef LMP_PAIR_RESQUARED_H #define LMP_PAIR_RESQUARED_H #include "pair.h" namespace LAMMPS_NS { class PairRESquared : public Pair { public: PairRESquared(LAMMPS *lmp); virtual ~PairRESquared(); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); virtual void init_style(); double init_one(int, int); void write_restart(FILE *); void read_restart(FILE *); void write_restart_settings(FILE *); void read_restart_settings(FILE *); protected: enum{SPHERE_SPHERE,SPHERE_ELLIPSE,ELLIPSE_SPHERE,ELLIPSE_ELLIPSE}; double cut_global; double **cut; double **shape1; // per-type radii in x, y and z double **shape2; // per-type radii in x, y and z SQUARED double *lshape; // product of the radii double **well; // well depth scaling along each axis double **epsilon,**sigma; // epsilon and sigma values for atom-type pairs int **form; double **lj1,**lj2,**lj3,**lj4; double **offset; int *setwell; class AtomVecEllipsoid *avec; // per-particle temporaries for RE-squared calculation struct RE2Vars { // per particle precomputations for energy, force, torque double A[3][3]; // Rotation matrix (lab->body) double aTe[3][3]; // A'*E double gamma[3][3]; // A'*S^2*A // per particle precomputations for torque double sa[3][3]; // S^2*A; double lA[3][3][3]; // -A*rotation generator (x,y, or z) double lAtwo[3][3][3]; // A'*S^2*lA double lAsa[3][3][3]; // lAtwo+lA'*sa }; void allocate(); void precompute_i(const int i,RE2Vars &ws); double det_prime(const double m[3][3], const double m2[3][3]); double resquared_analytic(const int i, const int j, const RE2Vars &wi, const RE2Vars &wj, const double *r, const double rsq, double *fforce, double *ttor, double *rtor); double resquared_lj(const int i, const int j, const RE2Vars &wi, const double *r, const double rsq, double *fforce, double *ttor, bool calc_torque); double cr60; // 60^1/3 double b_alpha; // 45/56 double solv_f_a; // 3.0/(4.0*PI*-36) double solv_f_r; // 3.0/(4.0*PI*2025) }; } #endif #endif /* ERROR/WARNING messages: E: Pair resquared requires atom style ellipsoid -UNDOCUMENTED +Self-explanatory. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. -E: Pair gayberne requires atoms with same type have same shape +E: Pair resquared requires atoms with same type have same shape -UNDOCUMENTED +Self-explanatory. E: Pair resquared epsilon a,b,c coeffs are not all set Self-explanatory. E: Pair resquared epsilon and sigma coeffs are not all set Self-explanatory. E: Bad matrix inversion in mldivide3 -UNDOCUMENTED +This error should not occur unless the matrix is badly formed. */ diff --git a/src/ASPHERE/pair_tri_lj.h b/src/ASPHERE/pair_tri_lj.h index 520ab5463..822f4d005 100644 --- a/src/ASPHERE/pair_tri_lj.h +++ b/src/ASPHERE/pair_tri_lj.h @@ -1,79 +1,79 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(tri/lj,PairTriLJ) #else #ifndef LMP_PAIR_TRI_LJ_H #define LMP_PAIR_TRI_LJ_H #include "pair.h" namespace LAMMPS_NS { class PairTriLJ : public Pair { public: PairTriLJ(class LAMMPS *); virtual ~PairTriLJ(); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); double init_one(int, int); protected: double cut_global; double **cut; double **epsilon,**sigma; double **lj1,**lj2,**lj3,**lj4; class AtomVecTri *avec; struct Discrete { double dx,dy,dz; double sigma; }; Discrete *discrete; // list of all discretes for all lines int ndiscrete; // number of discretes in list int dmax; // allocated size of discrete list int *dnum; // number of discretes per line, 0 if uninit int *dfirst; // index of first discrete per each line int nmax; // allocated size of dnum,dfirst vectors void allocate(); void discretize(int, double, double *, double *, double *); }; } #endif #endif /* ERROR/WARNING messages: E: Pair tri/lj requires atom style tri -UNDOCUMENTED +Self-explanatory. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. */ diff --git a/src/CLASS2/dihedral_class2.h b/src/CLASS2/dihedral_class2.h index d222f75fc..bddb55860 100644 --- a/src/CLASS2/dihedral_class2.h +++ b/src/CLASS2/dihedral_class2.h @@ -1,73 +1,73 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef DIHEDRAL_CLASS DihedralStyle(class2,DihedralClass2) #else #ifndef LMP_DIHEDRAL_CLASS2_H #define LMP_DIHEDRAL_CLASS2_H #include "stdio.h" #include "dihedral.h" namespace LAMMPS_NS { class DihedralClass2 : public Dihedral { public: DihedralClass2(class LAMMPS *); virtual ~DihedralClass2(); virtual void compute(int, int); void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); protected: double *k1,*k2,*k3; double *phi1,*phi2,*phi3; double *mbt_f1,*mbt_f2,*mbt_f3,*mbt_r0; double *ebt_f1_1,*ebt_f2_1,*ebt_f3_1,*ebt_r0_1; double *ebt_f1_2,*ebt_f2_2,*ebt_f3_2,*ebt_r0_2; double *at_f1_1,*at_f2_1,*at_f3_1,*at_theta0_1; double *at_f1_2,*at_f2_2,*at_f3_2,*at_theta0_2; double *aat_k,*aat_theta0_1,*aat_theta0_2; double *bb13t_k,*bb13t_r10,*bb13t_r30; int *setflag_d,*setflag_mbt,*setflag_ebt; int *setflag_at,*setflag_aat,*setflag_bb13t; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: W: Dihedral problem: %d %ld %d %d %d %d Conformation of the 4 listed dihedral atoms is extreme; you may want -to check your simulation geometry. :dd +to check your simulation geometry. E: Invalid coeffs for this dihedral style Cannot set class 2 coeffs in data file for this dihedral style. E: Incorrect args for dihedral coefficients Self-explanatory. Check the input script or data file. */ diff --git a/src/CLASS2/improper_class2.h b/src/CLASS2/improper_class2.h index 5a85c8eb7..73930a138 100644 --- a/src/CLASS2/improper_class2.h +++ b/src/CLASS2/improper_class2.h @@ -1,64 +1,64 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef IMPROPER_CLASS ImproperStyle(class2,ImproperClass2) #else #ifndef LMP_IMPROPER_CLASS2_H #define LMP_IMPROPER_CLASS2_H #include "stdio.h" #include "improper.h" namespace LAMMPS_NS { class ImproperClass2 : public Improper { public: ImproperClass2(class LAMMPS *); virtual ~ImproperClass2(); virtual void compute(int, int); void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); protected: double *k0,*chi0; double *aa_k1,*aa_k2,*aa_k3,*aa_theta0_1,*aa_theta0_2,*aa_theta0_3; int *setflag_i,*setflag_aa; void allocate(); void angleangle(int, int); void cross(double *, double *, double *); double dot(double *, double *); }; } #endif #endif /* ERROR/WARNING messages: W: Improper problem: %d %ld %d %d %d %d Conformation of the 4 listed improper atoms is extreme; you may want -to check your simulation geometry. :dd +to check your simulation geometry. E: Incorrect args for improper coefficients Self-explanatory. Check the input script or data file. */ diff --git a/src/COLLOID/fix_wall_colloid.h b/src/COLLOID/fix_wall_colloid.h index bf23c4a58..c7b5e45a3 100644 --- a/src/COLLOID/fix_wall_colloid.h +++ b/src/COLLOID/fix_wall_colloid.h @@ -1,58 +1,58 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(wall/colloid,FixWallColloid) #else #ifndef LMP_FIX_WALL_COLLOID_H #define LMP_FIX_WALL_COLLOID_H #include "fix_wall.h" namespace LAMMPS_NS { class FixWallColloid : public FixWall { public: FixWallColloid(class LAMMPS *, int, char **); void init(); void precompute(int); void wall_particle(int, int, double); private: double coeff1[6],coeff2[6],coeff3[6],coeff4[6],offset[6]; }; } #endif #endif /* ERROR/WARNING messages: E: Fix wall/colloid requires atom style sphere -UNDOCUMENTED +Self-explanatory. E: Fix wall/colloid requires extended particles -Self-explanatory. +One of the particles has radius 0.0. E: Particle on or inside fix wall surface Particles must be "exterior" to the wall in order for energy/force to be calculated. */ diff --git a/src/COLLOID/pair_yukawa_colloid.h b/src/COLLOID/pair_yukawa_colloid.h index ff670aaff..f36c4f658 100644 --- a/src/COLLOID/pair_yukawa_colloid.h +++ b/src/COLLOID/pair_yukawa_colloid.h @@ -1,52 +1,52 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(yukawa/colloid,PairYukawaColloid) #else #ifndef LMP_PAIR_YUKAWA_COLLOID_H #define LMP_PAIR_YUKAWA_COLLOID_H #include "pair_yukawa.h" namespace LAMMPS_NS { class PairYukawaColloid : public PairYukawa { public: PairYukawaColloid(class LAMMPS *); virtual ~PairYukawaColloid() {} virtual void compute(int, int); void init_style(); double init_one(int, int); double single(int, int, int, int, double, double, double, double &); }; } #endif #endif /* ERROR/WARNING messages: E: Pair yukawa/colloid requires atom style sphere -UNDOCUMENTED +Self-explantory. E: Pair yukawa/colloid requires atoms with same type have same radius -UNDOCUMENTED +Self-explantory. */ diff --git a/src/DIPOLE/pair_dipole_cut.h b/src/DIPOLE/pair_dipole_cut.h index 78eba40fc..557206834 100644 --- a/src/DIPOLE/pair_dipole_cut.h +++ b/src/DIPOLE/pair_dipole_cut.h @@ -1,70 +1,70 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(dipole/cut,PairDipoleCut) #else #ifndef LMP_PAIR_DIPOLE_CUT_H #define LMP_PAIR_DIPOLE_CUT_H #include "pair.h" namespace LAMMPS_NS { class PairDipoleCut : public Pair { public: PairDipoleCut(class LAMMPS *); virtual ~PairDipoleCut(); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); void init_style(); double init_one(int, int); void write_restart(FILE *); void read_restart(FILE *); void write_restart_settings(FILE *); void read_restart_settings(FILE *); protected: double cut_lj_global,cut_coul_global; double **cut_lj,**cut_ljsq; double **cut_coul,**cut_coulsq; double **epsilon,**sigma; double **lj1,**lj2,**lj3,**lj4,**offset; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: E: Incorrect args in pair_style command Self-explanatory. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. E: Pair dipole/cut requires atom attributes q, mu, torque -UNDOCUMENTED +The atom style defined does not have these attributes. */ diff --git a/src/FLD/pair_brownian.h b/src/FLD/pair_brownian.h index 7b5ecb0e9..42e53cd3f 100644 --- a/src/FLD/pair_brownian.h +++ b/src/FLD/pair_brownian.h @@ -1,88 +1,88 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(brownian,PairBrownian) #else #ifndef LMP_PAIR_BROWNIAN_H #define LMP_PAIR_BROWNIAN_H #include "pair.h" namespace LAMMPS_NS { class PairBrownian : public Pair { public: PairBrownian(class LAMMPS *); virtual ~PairBrownian(); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); virtual double init_one(int, int); virtual void init_style(); void write_restart(FILE *); void read_restart(FILE *); void write_restart_settings(FILE *); void read_restart_settings(FILE *); protected: double cut_inner_global,cut_global; double t_target,mu; int flaglog,flagfld; int seed; double **cut_inner,**cut; double R0,RT0; class RanMars *random; void set_3_orthogonal_vectors(double*,double*,double*); void allocate(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. E: Pair brownian requires atom style sphere -UNDOCUMENTED +Self-explanatory. W: Pair brownian needs newton pair on for momentum conservation -UNDOCUMENTED +Self-explanatory. E: Pair brownian requires extended particles -UNDOCUMENTED +One of the particles has radius 0.0. E: Pair brownian requires monodisperse particles -UNDOCUMENTED +All particles must be the same finite size. */ diff --git a/src/FLD/pair_brownian_poly.h b/src/FLD/pair_brownian_poly.h index cf6938f2b..a55a71bee 100644 --- a/src/FLD/pair_brownian_poly.h +++ b/src/FLD/pair_brownian_poly.h @@ -1,55 +1,55 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(brownian/poly,PairBrownianPoly) #else #ifndef LMP_PAIR_BROWNIAN_POLY_H #define LMP_PAIR_BROWNIAN_POLY_H #include "pair_brownian.h" namespace LAMMPS_NS { class PairBrownianPoly : public PairBrownian { public: PairBrownianPoly(class LAMMPS *); ~PairBrownianPoly() {} void compute(int, int); double init_one(int, int); void init_style(); }; } #endif #endif /* ERROR/WARNING messages: E: Pair brownian/poly requires newton pair off -UNDOCUMENTED +Self-explanatory. E: Pair brownian/poly requires atom style sphere -UNDOCUMENTED +Self-explanatory. E: Pair brownian/poly requires extended particles -UNDOCUMENTED +One of the particles has radius 0.0. */ diff --git a/src/FLD/pair_lubricate.h b/src/FLD/pair_lubricate.h index 731709528..0d64276c0 100644 --- a/src/FLD/pair_lubricate.h +++ b/src/FLD/pair_lubricate.h @@ -1,89 +1,89 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lubricate,PairLubricate) #else #ifndef LMP_PAIR_LUBRICATE_H #define LMP_PAIR_LUBRICATE_H #include "pair.h" namespace LAMMPS_NS { class PairLubricate : public Pair { public: PairLubricate(class LAMMPS *); virtual ~PairLubricate(); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); double init_one(int, int); virtual void init_style(); void write_restart(FILE *); void read_restart(FILE *); void write_restart_settings(FILE *); void read_restart_settings(FILE *); int pre_adapt(char *, int, int, int, int); void adapt(int, int, int, int, int, double); int pack_comm(int, int *, double *, int, int *); void unpack_comm(int, int, double *); protected: double mu,cut_inner_global,cut_global; int flaglog,flagfld,shearing; double Ef[3][3]; double R0,RT0,RS0; double **cut_inner,**cut; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. E: Pair lubricate requires atom style sphere -UNDOCUMENTED +Self-explanatory. E: Pair lubricate requires ghost atoms store velocity Use the communicate vel yes command to enable this. E: Pair lubricate requires monodisperse particles -UNDOCUMENTED +All particles must be the same finite size. E: Using pair lubricate with inconsistent fix deform remap option -UNDOCUMENTED +If fix deform is used, the remap v option is required. */ diff --git a/src/FLD/pair_lubricateU.h b/src/FLD/pair_lubricateU.h index 112e73457..1d7b5c3cc 100644 --- a/src/FLD/pair_lubricateU.h +++ b/src/FLD/pair_lubricateU.h @@ -1,100 +1,100 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lubricateU,PairLubricateU) #else #ifndef LMP_PAIR_LUBRICATEU_H #define LMP_PAIR_LUBRICATEU_H #include "pair.h" namespace LAMMPS_NS { class PairLubricateU : public Pair { public: PairLubricateU(class LAMMPS *); virtual ~PairLubricateU(); virtual void compute(int, int); virtual void settings(int, char **); void coeff(int, char **); double init_one(int, int); virtual void init_style(); void write_restart(FILE *); void read_restart(FILE *); void write_restart_settings(FILE *); void read_restart_settings(FILE *); int pack_comm(int, int *, double *, int, int *); void unpack_comm(int, int, double *); protected: double cut_inner_global,cut_global; double mu; int flaglog; double gdot,Ef[3][3]; double **cut_inner,**cut; void allocate(); double R0,RT0,RS0; int nmax; double **fl,**Tl,**xl; int cgmax; double *bcg,*xcg,*rcg,*rcg1,*pcg,*RU; void compute_RE(); virtual void compute_RE(double **); void compute_RU(); virtual void compute_RU(double **); virtual void compute_Fh(double **); void stage_one(); void intermediates(int, double **); void stage_two(double **); void copy_vec_uo(int, double *, double **, double **); void copy_uo_vec(int, double **, double **, double *); double dot_vec_vec(int , double *, double *); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. E: Pair lubricateU requires atom style sphere -UNDOCUMENTED +Self-explanatory. E: Pair lubricateU requires ghost atoms store velocity -UNDOCUMENTED +Use the communicate vel yes command to enable this. E: Pair lubricateU requires monodisperse particles -UNDOCUMENTED +All particles must be the same finite size. */ diff --git a/src/FLD/pair_lubricateU_poly.h b/src/FLD/pair_lubricateU_poly.h index 344714057..4f070ab57 100644 --- a/src/FLD/pair_lubricateU_poly.h +++ b/src/FLD/pair_lubricateU_poly.h @@ -1,71 +1,71 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lubricateU/poly,PairLubricateUPoly) #else #ifndef LMP_PAIR_LUBRICATEU_POLY_H #define LMP_PAIR_LUBRICATEU_POLY_H #include "pair_lubricateU.h" namespace LAMMPS_NS { class PairLubricateUPoly : public PairLubricateU { public: PairLubricateUPoly(class LAMMPS *); ~PairLubricateUPoly() {} void compute(int, int); void settings(int, char **); void init_style(); private: void iterate(double **, int); void compute_RE(double **); void compute_RU(double **); void compute_Fh(double **); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Pair lubricateU/poly requires newton pair off -UNDOCUMENTED +Self-explanatory. E: Pair lubricateU/poly requires ghost atoms store velocity -UNDOCUMENTED +Use the communicate vel yes command to enable this. E: Pair lubricate/poly requires atom style sphere -UNDOCUMENTED +Self-explanatory. E: Pair lubricate/poly requires extended particles -UNDOCUMENTED +One of the particles has radius 0.0. */ diff --git a/src/FLD/pair_lubricate_poly.h b/src/FLD/pair_lubricate_poly.h index 6cf31dc37..104383577 100644 --- a/src/FLD/pair_lubricate_poly.h +++ b/src/FLD/pair_lubricate_poly.h @@ -1,62 +1,62 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lubricate/poly,PairLubricatePoly) #else #ifndef LMP_PAIR_LUBRICATE_POLY_H #define LMP_PAIR_LUBRICATE_POLY_H #include "pair_lubricate.h" namespace LAMMPS_NS { class PairLubricatePoly : public PairLubricate { public: PairLubricatePoly(class LAMMPS *); ~PairLubricatePoly() {} void compute(int, int); void init_style(); }; } #endif #endif /* ERROR/WARNING messages: E: Pair lubricate/poly requires newton pair off -UNDOCUMENTED +Self-explanatory. E: Pair lubricate/poly requires ghost atoms store velocity -UNDOCUMENTED +Use the communicate vel yes command to enable this. E: Pair lubricate/poly requires atom style sphere -UNDOCUMENTED +Self-explanatory. E: Pair lubricate/poly requires extended particles -UNDOCUMENTED +One of the particles has radius 0.0. E: Using pair lubricate/poly with inconsistent fix deform remap option -UNDOCUMENTED +If fix deform is used, the remap v option is required. */ diff --git a/src/GPU/fix_gpu.h b/src/GPU/fix_gpu.h index 1bf3f4244..b4ff9285f 100644 --- a/src/GPU/fix_gpu.h +++ b/src/GPU/fix_gpu.h @@ -1,87 +1,89 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(GPU,FixGPU) #else #ifndef LMP_FIX_GPU_H #define LMP_FIX_GPU_H #include "fix.h" namespace LAMMPS_NS { class FixGPU : public Fix { public: FixGPU(class LAMMPS *, int, char **); ~FixGPU(); int setmask(); void init(); void setup(int); void min_setup(int); void post_force(int); void min_post_force(int); double memory_usage(); private: int _gpu_mode; double _particle_split; }; } #endif #endif /* ERROR/WARNING messages: E: Cannot use fix GPU with USER-CUDA mode enabled -UNDOCUMENTED +You cannot use both the GPU and USER-CUDA packages +together. Use one or the other. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Cannot use force/neigh with triclinic box This is a current limitation of the GPU implementation in LAMMPS. E: Cannot use force/hybrid_neigh with triclinic box -UNDOCUMENTED +Self-explanatory. E: No OpenMP support compiled in -UNDOCUMENTED +An OpenMP flag is set, but LAMMPS was not built with +OpenMP support. E: Cannot use pair hybrid with GPU neighbor builds See documentation for fix gpu. E: Fix GPU split must be positive for hybrid pair styles -UNDOCUMENTED +Self-explanatory. E: Cannot use neigh_modify exclude with GPU neighbor builds This is a current limitation of the GPU implementation in LAMMPS. */ diff --git a/src/GPU/gpu_extra.h b/src/GPU/gpu_extra.h index e3bba9764..2f4cdcb2c 100755 --- a/src/GPU/gpu_extra.h +++ b/src/GPU/gpu_extra.h @@ -1,63 +1,107 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- Contributing author: Mike Brown (ORNL) ------------------------------------------------------------------------- */ #ifndef LMP_GPU_EXTRA_H #define LMP_GPU_EXTRA_H #include "modify.h" #include "error.h" namespace GPU_EXTRA { inline void check_flag(int error_flag, LAMMPS_NS::Error *error, MPI_Comm &world) { int all_success; MPI_Allreduce(&error_flag, &all_success, 1, MPI_INT, MPI_MIN, world); if (all_success != 0) { if (all_success == -1) error->all(FLERR,"Accelerated style in input script but no fix gpu"); else if (all_success == -2) error->all(FLERR, "Could not find/initialize a specified accelerator device"); else if (all_success == -3) error->all(FLERR,"Insufficient memory on accelerator"); else if (all_success == -4) error->all(FLERR,"GPU library not compiled for this accelerator"); else if (all_success == -5) error->all(FLERR, "Double precision is not supported on this accelerator"); else if (all_success == -6) error->all(FLERR,"Unable to initialize accelerator for use"); else if (all_success == -7) error->all(FLERR, "Accelerator sharing is not currently supported on system"); else if (all_success == -8) error->all(FLERR, "GPU particle split must be set to 1 for this pair style."); else error->all(FLERR,"Unknown error in GPU library"); } }; inline void gpu_ready(LAMMPS_NS::Modify *modify, LAMMPS_NS::Error *error) { int ifix = modify->find_fix("package_gpu"); if (ifix < 0) - error->all(FLERR,"The 'package gpu' command is required for /gpu styles"); + error->all(FLERR,"The package gpu command is required for gpu styles"); }; } #endif + +/* ERROR/WARNING messages: + +E: Accelerated style in input script but no fix gpu + +UNDOCUMENTED + +E: Could not find/initialize a specified accelerator device + +UNDOCUMENTED + +E: Insufficient memory on accelerator + +UNDOCUMENTED + +E: GPU library not compiled for this accelerator + +UNDOCUMENTED + +E: Double precision is not supported on this accelerator + +UNDOCUMENTED + +E: Unable to initialize accelerator for use + +UNDOCUMENTED + +E: Accelerator sharing is not currently supported on system + +UNDOCUMENTED + +E: GPU particle split must be set to 1 for this pair style. + +UNDOCUMENTED + +E: Unknown error in GPU library + +UNDOCUMENTED + +E: The package gpu command is required for gpu styles + +UNDOCUMENTED + +*/ diff --git a/src/GPU/pair_buck_coul_cut_gpu.h b/src/GPU/pair_buck_coul_cut_gpu.h index a92860d88..1f482e113 100644 --- a/src/GPU/pair_buck_coul_cut_gpu.h +++ b/src/GPU/pair_buck_coul_cut_gpu.h @@ -1,62 +1,59 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(buck/coul/cut/gpu,PairBuckCoulCutGPU) #else #ifndef LMP_PAIR_BUCK_COUL_CUT_GPU_H #define LMP_PAIR_BUCK_COUL_CUT_GPU_H #include "pair_buck_coul_cut.h" namespace LAMMPS_NS { class PairBuckCoulCutGPU : public PairBuckCoulCut { public: PairBuckCoulCutGPU(LAMMPS *lmp); ~PairBuckCoulCutGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Cannot use newton pair with buck/coul/cut/gpu pair style -UNDOCUMENTED - -U: Pair style buck/coul/cut/gpu requires atom attribute q - -The atom style defined does not have this attribute. +Self-explanatory. */ diff --git a/src/GPU/pair_buck_coul_long_gpu.h b/src/GPU/pair_buck_coul_long_gpu.h index ae3931439..92918cede 100644 --- a/src/GPU/pair_buck_coul_long_gpu.h +++ b/src/GPU/pair_buck_coul_long_gpu.h @@ -1,66 +1,68 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(buck/coul/long/gpu,PairBuckCoulLongGPU) #else #ifndef LMP_PAIR_BUCK_COUL_LONG_GPU_H #define LMP_PAIR_BUCK_COUL_LONG_GPU_H #include "pair_buck_coul_long.h" namespace LAMMPS_NS { class PairBuckCoulLongGPU : public PairBuckCoulLong { public: PairBuckCoulLongGPU(LAMMPS *lmp); ~PairBuckCoulLongGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Pair style buck/coul/long/gpu requires atom attribute q The atom style defined does not have this attribute. E: Cannot use newton pair with buck/coul/long/gpu pair style -UNDOCUMENTED +Self-explanatory. E: Pair style is incompatible with KSpace style -UNDOCUMENTED +If a pair style with a long-range Coulombic component is selected, +then a kspace style must also be used. */ diff --git a/src/GPU/pair_buck_gpu.h b/src/GPU/pair_buck_gpu.h index cef24eecc..0498755ca 100644 --- a/src/GPU/pair_buck_gpu.h +++ b/src/GPU/pair_buck_gpu.h @@ -1,58 +1,59 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(buck/gpu,PairBuckGPU) #else #ifndef LMP_PAIR_BUCK_GPU_H #define LMP_PAIR_BUCK_GPU_H #include "pair_buck.h" namespace LAMMPS_NS { class PairBuckGPU : public PairBuck { public: PairBuckGPU(LAMMPS *lmp); ~PairBuckGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Cannot use newton pair with buck/gpu pair style -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/GPU/pair_coul_long_gpu.h b/src/GPU/pair_coul_long_gpu.h index 7b736939b..b663c52bd 100644 --- a/src/GPU/pair_coul_long_gpu.h +++ b/src/GPU/pair_coul_long_gpu.h @@ -1,67 +1,68 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(coul/long/gpu,PairCoulLongGPU) #else #ifndef LMP_PAIR_COUL_LONG_GPU_H #define LMP_PAIR_COUL_LONG_GPU_H #include "pair_coul_long.h" namespace LAMMPS_NS { class PairCoulLongGPU : public PairCoulLong { public: PairCoulLongGPU(LAMMPS *lmp); ~PairCoulLongGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Pair style coul/long/gpu requires atom attribute q -UNDOCUMENTED +The atom style defined does not have these attributes. E: Cannot use newton pair with coul/long/gpu pair style -UNDOCUMENTED +Self-explanatory. E: Pair style is incompatible with KSpace style If a pair style with a long-range Coulombic component is selected, then a kspace style must also be used. */ diff --git a/src/GPU/pair_eam_alloy_gpu.h b/src/GPU/pair_eam_alloy_gpu.h index ffa2af76a..3305a4ea2 100644 --- a/src/GPU/pair_eam_alloy_gpu.h +++ b/src/GPU/pair_eam_alloy_gpu.h @@ -1,61 +1,63 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(eam/alloy/gpu,PairEAMAlloyGPU) #else #ifndef LMP_PAIR_EAM_ALLOY_GPU_H #define LMP_PAIR_EAM_ALLOY_GPU_H #include "pair_eam_gpu.h" namespace LAMMPS_NS { class PairEAMAlloyGPU : public PairEAMGPU { public: PairEAMAlloyGPU(class LAMMPS *); virtual ~PairEAMAlloyGPU() {} void coeff(int, char **); protected: void read_file(char *); void file2array(); }; } #endif #endif /* ERROR/WARNING messages: E: Incorrect args for pair coefficients -UNDOCUMENTED +Self-explanatory. Check the input script or data file. E: No matching element in EAM potential file -UNDOCUMENTED +The EAM potential file does not contain elements that match the +requested elements. E: Cannot open EAM potential file %s -UNDOCUMENTED +The specified EAM potential file cannot be opened. Check that the +path and name are correct. E: Incorrect element names in EAM potential file -UNDOCUMENTED +The element names in the EAM file do not match those requested. */ diff --git a/src/GPU/pair_eam_fs_gpu.h b/src/GPU/pair_eam_fs_gpu.h index c46226bcb..49733e573 100644 --- a/src/GPU/pair_eam_fs_gpu.h +++ b/src/GPU/pair_eam_fs_gpu.h @@ -1,61 +1,63 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(eam/fs/gpu,PairEAMFSGPU) #else #ifndef LMP_PAIR_EAM_FS_GPU_H #define LMP_PAIR_EAM_FS_GPU_H #include "pair_eam_gpu.h" namespace LAMMPS_NS { class PairEAMFSGPU : public PairEAMGPU { public: PairEAMFSGPU(class LAMMPS *); virtual ~PairEAMFSGPU() {} void coeff(int, char **); protected: void read_file(char *); void file2array(); }; } #endif #endif /* ERROR/WARNING messages: E: Incorrect args for pair coefficients -UNDOCUMENTED +Self-explanatory. Check the input script or data file. E: No matching element in EAM potential file -UNDOCUMENTED +The EAM potential file does not contain elements that match the +requested elements. E: Cannot open EAM potential file %s -UNDOCUMENTED +The specified EAM potential file cannot be opened. Check that the +path and name are correct. E: Incorrect element names in EAM potential file -UNDOCUMENTED +The element names in the EAM file do not match those requested. */ diff --git a/src/GPU/pair_eam_gpu.h b/src/GPU/pair_eam_gpu.h index 3415f9791..686f276e8 100644 --- a/src/GPU/pair_eam_gpu.h +++ b/src/GPU/pair_eam_gpu.h @@ -1,69 +1,70 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(eam/gpu,PairEAMGPU) #else #ifndef LMP_PAIR_EAM_GPU_H #define LMP_PAIR_EAM_GPU_H #include "stdio.h" #include "pair_eam.h" namespace LAMMPS_NS { class PairEAMGPU : public PairEAM { public: PairEAMGPU(class LAMMPS *); virtual ~PairEAMGPU(); void compute(int, int); void init_style(); double memory_usage(); int pack_comm(int, int *, double *, int, int *); void unpack_comm(int, int, double *); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; protected: int gpu_mode; double cpu_time; int *gpulist; void *fp_pinned; bool fp_single; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Cannot use newton pair with eam/gpu pair style -UNDOCUMENTED +Self-explanatory. E: Not allocate memory eam/gpu pair style UNDOCUMENTED */ diff --git a/src/GPU/pair_gayberne_gpu.cpp b/src/GPU/pair_gayberne_gpu.cpp index 18c9f6356..8447169ab 100644 --- a/src/GPU/pair_gayberne_gpu.cpp +++ b/src/GPU/pair_gayberne_gpu.cpp @@ -1,342 +1,342 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ #include "lmptype.h" #include "math.h" #include "stdio.h" #include "stdlib.h" #include "pair_gayberne_gpu.h" #include "math_extra.h" #include "atom.h" #include "atom_vec.h" #include "atom_vec_ellipsoid.h" #include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "integrate.h" #include "memory.h" #include "error.h" #include "neigh_request.h" #include "universe.h" #include "domain.h" #include "update.h" #include "string.h" #include "gpu_extra.h" // External functions from cuda library for atom decomposition int gb_gpu_init(const int ntypes, const double gamma, const double upsilon, const double mu, double **shape, double **well, double **cutsq, double **sigma, double **epsilon, double *host_lshape, int **form, double **host_lj1, double **host_lj2, double **host_lj3, double **host_lj4, double **offset, double *special_lj, const int nlocal, const int nall, const int max_nbors, const int maxspecial, const double cell_size, int &gpu_mode, FILE *screen); void gb_gpu_clear(); int ** gb_gpu_compute_n(const int ago, const int inum, const int nall, double **host_x, int *host_type, double *sublo, double *subhi, int *tag, int **nspecial, int **special, const bool eflag, const bool vflag, const bool eatom, const bool vatom, int &host_start, int **ilist, int **jnum, const double cpu_time, bool &success, double **host_quat); int * gb_gpu_compute(const int ago, const int inum, const int nall, double **host_x, int *host_type, int *ilist, int *numj, int **firstneigh, const bool eflag, const bool vflag, const bool eatom, const bool vatom, int &host_start, const double cpu_time, bool &success, double **host_quat); double gb_gpu_bytes(); using namespace LAMMPS_NS; enum{SPHERE_SPHERE,SPHERE_ELLIPSE,ELLIPSE_SPHERE,ELLIPSE_ELLIPSE}; /* ---------------------------------------------------------------------- */ PairGayBerneGPU::PairGayBerneGPU(LAMMPS *lmp) : PairGayBerne(lmp), gpu_mode(GPU_FORCE) { avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); if (!avec) - error->all(FLERR,"Pair gayberne requires atom style ellipsoid"); + error->all(FLERR,"Pair gayberne/gpu requires atom style ellipsoid"); quat_nmax = 0; quat = NULL; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } /* ---------------------------------------------------------------------- free all arrays ------------------------------------------------------------------------- */ PairGayBerneGPU::~PairGayBerneGPU() { gb_gpu_clear(); cpu_time = 0.0; memory->destroy(quat); } /* ---------------------------------------------------------------------- */ void PairGayBerneGPU::compute(int eflag, int vflag) { if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; int nall = atom->nlocal + atom->nghost; int inum, host_start; bool success = true; int *ilist, *numneigh, **firstneigh; if (nall > quat_nmax) { quat_nmax = static_cast<int>(1.1 * nall); memory->grow(quat, quat_nmax, 4, "pair:quat"); } AtomVecEllipsoid::Bonus *bonus = avec->bonus; int *ellipsoid = atom->ellipsoid; for (int i=0; i<nall; i++) { int qi = ellipsoid[i]; if (qi > -1) { quat[i][0] = bonus[qi].quat[0]; quat[i][1] = bonus[qi].quat[1]; quat[i][2] = bonus[qi].quat[2]; quat[i][3] = bonus[qi].quat[3]; } } if (gpu_mode != GPU_FORCE) { inum = atom->nlocal; firstneigh = gb_gpu_compute_n(neighbor->ago, inum, nall, atom->x, atom->type, domain->sublo, domain->subhi, atom->tag, atom->nspecial, atom->special, eflag, vflag, eflag_atom, vflag_atom, host_start, &ilist, &numneigh, cpu_time, success, quat); } else { inum = list->inum; numneigh = list->numneigh; firstneigh = list->firstneigh; ilist = gb_gpu_compute(neighbor->ago, inum, nall, atom->x, atom->type, list->ilist, numneigh, firstneigh, eflag, vflag, eflag_atom, vflag_atom, host_start, cpu_time, success, quat); } if (!success) error->one(FLERR,"Out of memory on GPGPU"); if (host_start < inum) { cpu_time = MPI_Wtime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); cpu_time = MPI_Wtime() - cpu_time; } } /* ---------------------------------------------------------------------- init specific to this pair style ------------------------------------------------------------------------- */ void PairGayBerneGPU::init_style() { if (force->newton_pair) error->all(FLERR,"Cannot use newton pair with gayberne/gpu pair style"); if (!atom->ellipsoid_flag) error->all(FLERR,"Pair gayberne/gpu requires atom style ellipsoid"); // per-type shape precalculations // require that atom shapes are identical within each type // if shape = 0 for point particle, set shape = 1 as required by Gay-Berne for (int i = 1; i <= atom->ntypes; i++) { if (!atom->shape_consistency(i,shape1[i][0],shape1[i][1],shape1[i][2])) error->all(FLERR,"Pair gayberne/gpu requires atoms with same type have same shape"); if (shape1[i][0] == 0.0) shape1[i][0] = shape1[i][1] = shape1[i][2] = 1.0; shape2[i][0] = shape1[i][0]*shape1[i][0]; shape2[i][1] = shape1[i][1]*shape1[i][1]; shape2[i][2] = shape1[i][2]*shape1[i][2]; lshape[i] = (shape1[i][0]*shape1[i][1]+shape1[i][2]*shape1[i][2]) * sqrt(shape1[i][0]*shape1[i][1]); } // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; double cut; for (int i = 1; i <= atom->ntypes; i++) { for (int j = i; j <= atom->ntypes; j++) { if (setflag[i][j] != 0 || (setflag[i][i] != 0 && setflag[j][j] != 0)) { cut = init_one(i,j); cut *= cut; if (cut > maxcut) maxcut = cut; cutsq[i][j] = cutsq[j][i] = cut; } else cutsq[i][j] = cutsq[j][i] = 0.0; } } double cell_size = sqrt(maxcut) + neighbor->skin; int maxspecial=0; if (atom->molecular) maxspecial=atom->maxspecial; int success = gb_gpu_init(atom->ntypes+1, gamma, upsilon, mu, shape2, well, cutsq, sigma, epsilon, lshape, form, lj1, lj2, lj3, lj4, offset, force->special_lj, atom->nlocal, atom->nlocal+atom->nghost, 300, maxspecial, cell_size, gpu_mode, screen); GPU_EXTRA::check_flag(success,error,world); if (gpu_mode == GPU_FORCE) { int irequest = neighbor->request(this); neighbor->requests[irequest]->half = 0; neighbor->requests[irequest]->full = 1; } quat_nmax = static_cast<int>(1.1 * (atom->nlocal + atom->nghost)); memory->grow(quat, quat_nmax, 4, "pair:quat"); } /* ---------------------------------------------------------------------- */ double PairGayBerneGPU::memory_usage() { double bytes = Pair::memory_usage(); return bytes + memory->usage(quat,quat_nmax)+gb_gpu_bytes(); } /* ---------------------------------------------------------------------- */ void PairGayBerneGPU::cpu_compute(int start, int inum, int eflag, int vflag, int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double evdwl,one_eng,rsq,r2inv,r6inv,forcelj,factor_lj; double fforce[3],ttor[3],rtor[3],r12[3]; double a1[3][3],b1[3][3],g1[3][3],a2[3][3],b2[3][3],g2[3][3],temp[3][3]; int *jlist; double *iquat,*jquat; AtomVecEllipsoid::Bonus *bonus = avec->bonus; int *ellipsoid = atom->ellipsoid; double **x = atom->x; double **f = atom->f; double **tor = atom->torque; int *type = atom->type; double *special_lj = force->special_lj; // loop over neighbors of my atoms for (ii = start; ii < inum; ii++) { i = ilist[ii]; itype = type[i]; if (form[itype][itype] == ELLIPSE_ELLIPSE) { iquat = bonus[ellipsoid[i]].quat; MathExtra::quat_to_mat_trans(iquat,a1); MathExtra::diag_times3(well[itype],a1,temp); MathExtra::transpose_times3(a1,temp,b1); MathExtra::diag_times3(shape2[itype],a1,temp); MathExtra::transpose_times3(a1,temp,g1); } jlist = firstneigh[i]; jnum = numneigh[i]; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; factor_lj = special_lj[sbmask(j)]; j &= NEIGHMASK; // r12 = center to center vector r12[0] = x[j][0]-x[i][0]; r12[1] = x[j][1]-x[i][1]; r12[2] = x[j][2]-x[i][2]; rsq = MathExtra::dot3(r12,r12); jtype = type[j]; // compute if less than cutoff if (rsq < cutsq[itype][jtype]) { switch (form[itype][jtype]) { case SPHERE_SPHERE: r2inv = 1.0/rsq; r6inv = r2inv*r2inv*r2inv; forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]); forcelj *= -r2inv; if (eflag) one_eng = r6inv*(r6inv*lj3[itype][jtype]-lj4[itype][jtype]) - offset[itype][jtype]; fforce[0] = r12[0]*forcelj; fforce[1] = r12[1]*forcelj; fforce[2] = r12[2]*forcelj; ttor[0] = ttor[1] = ttor[2] = 0.0; rtor[0] = rtor[1] = rtor[2] = 0.0; break; case SPHERE_ELLIPSE: jquat = bonus[ellipsoid[j]].quat; MathExtra::quat_to_mat_trans(jquat,a2); MathExtra::diag_times3(well[jtype],a2,temp); MathExtra::transpose_times3(a2,temp,b2); MathExtra::diag_times3(shape2[jtype],a2,temp); MathExtra::transpose_times3(a2,temp,g2); one_eng = gayberne_lj(j,i,a2,b2,g2,r12,rsq,fforce,rtor); ttor[0] = ttor[1] = ttor[2] = 0.0; break; case ELLIPSE_SPHERE: one_eng = gayberne_lj(i,j,a1,b1,g1,r12,rsq,fforce,ttor); rtor[0] = rtor[1] = rtor[2] = 0.0; break; default: jquat = bonus[ellipsoid[j]].quat; MathExtra::quat_to_mat_trans(jquat,a2); MathExtra::diag_times3(well[jtype],a2,temp); MathExtra::transpose_times3(a2,temp,b2); MathExtra::diag_times3(shape2[jtype],a2,temp); MathExtra::transpose_times3(a2,temp,g2); one_eng = gayberne_analytic(i,j,a1,a2,b1,b2,g1,g2,r12,rsq, fforce,ttor,rtor); break; } fforce[0] *= factor_lj; fforce[1] *= factor_lj; fforce[2] *= factor_lj; ttor[0] *= factor_lj; ttor[1] *= factor_lj; ttor[2] *= factor_lj; f[i][0] += fforce[0]; f[i][1] += fforce[1]; f[i][2] += fforce[2]; tor[i][0] += ttor[0]; tor[i][1] += ttor[1]; tor[i][2] += ttor[2]; if (eflag) evdwl = factor_lj*one_eng; if (evflag) ev_tally_xyz_full(i,evdwl,0.0,fforce[0],fforce[1],fforce[2], -r12[0],-r12[1],-r12[2]); } } } } diff --git a/src/GPU/pair_gayberne_gpu.h b/src/GPU/pair_gayberne_gpu.h index 006d644e3..d0fa91e61 100644 --- a/src/GPU/pair_gayberne_gpu.h +++ b/src/GPU/pair_gayberne_gpu.h @@ -1,72 +1,69 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(gayberne/gpu,PairGayBerneGPU) #else #ifndef LMP_PAIR_GAYBERNE_GPU_H #define LMP_PAIR_GAYBERNE_GPU_H #include "pair_gayberne.h" namespace LAMMPS_NS { class PairGayBerneGPU : public PairGayBerne { public: PairGayBerneGPU(LAMMPS *lmp); ~PairGayBerneGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; int quat_nmax; double **quat; }; } #endif #endif /* ERROR/WARNING messages: -E: Pair gayberne requires atom style ellipsoid +E: Pair gayberne/gpu requires atom style ellipsoid -UNDOCUMENTED +Self-explanatory. E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Cannot use newton pair with gayberne/gpu pair style -UNDOCUMENTED - -E: Pair gayberne/gpu requires atom style ellipsoid - -UNDOCUMENTED +Self-explanatory. E: Pair gayberne/gpu requires atoms with same type have same shape -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/GPU/pair_lj96_cut_gpu.h b/src/GPU/pair_lj96_cut_gpu.h index 527b10034..bdf06c7fc 100644 --- a/src/GPU/pair_lj96_cut_gpu.h +++ b/src/GPU/pair_lj96_cut_gpu.h @@ -1,58 +1,59 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lj96/cut/gpu,PairLJ96CutGPU) #else #ifndef LMP_PAIR_LJ_96_GPU_H #define LMP_PAIR_LJ_96_GPU_H #include "pair_lj96_cut.h" namespace LAMMPS_NS { class PairLJ96CutGPU : public PairLJ96Cut { public: PairLJ96CutGPU(LAMMPS *lmp); ~PairLJ96CutGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Cannot use newton pair with lj96/cut/gpu pair style -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/GPU/pair_lj_charmm_coul_long_gpu.h b/src/GPU/pair_lj_charmm_coul_long_gpu.h index 889d98600..159d6d990 100644 --- a/src/GPU/pair_lj_charmm_coul_long_gpu.h +++ b/src/GPU/pair_lj_charmm_coul_long_gpu.h @@ -1,67 +1,68 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lj/charmm/coul/long/gpu,PairLJCharmmCoulLongGPU) #else #ifndef LMP_PAIR_LJ_CHARMM_COUL_LONG_GPU_H #define LMP_PAIR_LJ_CHARMM_COUL_LONG_GPU_H #include "pair_lj_charmm_coul_long.h" namespace LAMMPS_NS { class PairLJCharmmCoulLongGPU : public PairLJCharmmCoulLong { public: PairLJCharmmCoulLongGPU(LAMMPS *lmp); ~PairLJCharmmCoulLongGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Pair style lj/charmm/coul/long/gpu requires atom attribute q -UNDOCUMENTED +The atom style defined does not have this attribute. E: Cannot use newton pair with lj/charmm/coul/long/gpu pair style -UNDOCUMENTED +Self-explanatory. E: Pair style is incompatible with KSpace style If a pair style with a long-range Coulombic component is selected, then a kspace style must also be used. */ diff --git a/src/GPU/pair_lj_class2_coul_long_gpu.h b/src/GPU/pair_lj_class2_coul_long_gpu.h index 981240094..6d56ea6e3 100644 --- a/src/GPU/pair_lj_class2_coul_long_gpu.h +++ b/src/GPU/pair_lj_class2_coul_long_gpu.h @@ -1,67 +1,68 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lj/class2/coul/long/gpu,PairLJClass2CoulLongGPU) #else #ifndef LMP_PAIR_LJ_CLASS2_COUL_LONG_GPU_H #define LMP_PAIR_LJ_CLASS2_COUL_LONG_GPU_H #include "pair_lj_class2_coul_long.h" namespace LAMMPS_NS { class PairLJClass2CoulLongGPU : public PairLJClass2CoulLong { public: PairLJClass2CoulLongGPU(LAMMPS *lmp); ~PairLJClass2CoulLongGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Pair style lj/class2/coul/long/gpu requires atom attribute q -UNDOCUMENTED +The atom style defined does not have this attribute. E: Cannot use newton pair with lj/class2/coul/long/gpu pair style -UNDOCUMENTED +Self-explanatory. E: Pair style is incompatible with KSpace style If a pair style with a long-range Coulombic component is selected, then a kspace style must also be used. */ diff --git a/src/GPU/pair_lj_class2_gpu.h b/src/GPU/pair_lj_class2_gpu.h index 111fa2f64..a9fbc2c72 100644 --- a/src/GPU/pair_lj_class2_gpu.h +++ b/src/GPU/pair_lj_class2_gpu.h @@ -1,58 +1,59 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lj/class2/gpu,PairLJClass2GPU) #else #ifndef LMP_PAIR_LJ_CLASS2_GPU_H #define LMP_PAIR_LJ_CLASS2_GPU_H #include "pair_lj_class2.h" namespace LAMMPS_NS { class PairLJClass2GPU : public PairLJClass2 { public: PairLJClass2GPU(LAMMPS *lmp); ~PairLJClass2GPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Cannot use newton pair with lj/class2/gpu pair style -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/GPU/pair_lj_cut_coul_cut_gpu.h b/src/GPU/pair_lj_cut_coul_cut_gpu.h index d29e39590..ed54112e9 100644 --- a/src/GPU/pair_lj_cut_coul_cut_gpu.h +++ b/src/GPU/pair_lj_cut_coul_cut_gpu.h @@ -1,62 +1,63 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lj/cut/coul/cut/gpu,PairLJCutCoulCutGPU) #else #ifndef LMP_PAIR_LJ_CUT_COUL_CUT_GPU_H #define LMP_PAIR_LJ_CUT_COUL_CUT_GPU_H #include "pair_lj_cut_coul_cut.h" namespace LAMMPS_NS { class PairLJCutCoulCutGPU : public PairLJCutCoulCut { public: PairLJCutCoulCutGPU(LAMMPS *lmp); ~PairLJCutCoulCutGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Pair style lj/cut/coul/cut/gpu requires atom attribute q -UNDOCUMENTED +The atom style defined does not have this attribute. E: Cannot use newton pair with lj/cut/coul/cut/gpu pair style -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/GPU/pair_lj_cut_coul_long_gpu.h b/src/GPU/pair_lj_cut_coul_long_gpu.h index 3e8b6a11d..2a7a59510 100644 --- a/src/GPU/pair_lj_cut_coul_long_gpu.h +++ b/src/GPU/pair_lj_cut_coul_long_gpu.h @@ -1,67 +1,68 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lj/cut/coul/long/gpu,PairLJCutCoulLongGPU) #else #ifndef LMP_PAIR_LJ_CUT_COUL_LONG_GPU_H #define LMP_PAIR_LJ_CUT_COUL_LONG_GPU_H #include "pair_lj_cut_coul_long.h" namespace LAMMPS_NS { class PairLJCutCoulLongGPU : public PairLJCutCoulLong { public: PairLJCutCoulLongGPU(LAMMPS *lmp); ~PairLJCutCoulLongGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Pair style lj/cut/coul/long/gpu requires atom attribute q -UNDOCUMENTED +The atom style defined does not have this attribute. E: Cannot use newton pair with lj/cut/coul/long/gpu pair style -UNDOCUMENTED +Self-explanatory. E: Pair style is incompatible with KSpace style If a pair style with a long-range Coulombic component is selected, then a kspace style must also be used. */ diff --git a/src/GPU/pair_lj_cut_gpu.h b/src/GPU/pair_lj_cut_gpu.h index b6d41269d..a1bec69cf 100644 --- a/src/GPU/pair_lj_cut_gpu.h +++ b/src/GPU/pair_lj_cut_gpu.h @@ -1,58 +1,59 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lj/cut/gpu,PairLJCutGPU) #else #ifndef LMP_PAIR_LJ_LIGHT_GPU_H #define LMP_PAIR_LJ_LIGHT_GPU_H #include "pair_lj_cut.h" namespace LAMMPS_NS { class PairLJCutGPU : public PairLJCut { public: PairLJCutGPU(LAMMPS *lmp); ~PairLJCutGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Cannot use newton pair with lj/cut/gpu pair style -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/GPU/pair_lj_expand_gpu.h b/src/GPU/pair_lj_expand_gpu.h index fb928cf26..8c7cc8bb1 100644 --- a/src/GPU/pair_lj_expand_gpu.h +++ b/src/GPU/pair_lj_expand_gpu.h @@ -1,58 +1,59 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lj/expand/gpu,PairLJExpandGPU) #else #ifndef LMP_PAIR_LJE_LIGHT_GPU_H #define LMP_PAIR_LJE_LIGHT_GPU_H #include "pair_lj_expand.h" namespace LAMMPS_NS { class PairLJExpandGPU : public PairLJExpand { public: PairLJExpandGPU(LAMMPS *lmp); ~PairLJExpandGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Cannot use newton pair with lj/expand/gpu pair style -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/GPU/pair_lj_sdk_coul_long_gpu.h b/src/GPU/pair_lj_sdk_coul_long_gpu.h index 2e5d928fb..ab1ac9e09 100644 --- a/src/GPU/pair_lj_sdk_coul_long_gpu.h +++ b/src/GPU/pair_lj_sdk_coul_long_gpu.h @@ -1,68 +1,70 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lj/sdk/coul/long/gpu,PairLJSDKCoulLongGPU) PairStyle(cg/cmm/coul/long/gpu,PairLJSDKCoulLongGPU) #else #ifndef LMP_PAIR_LJ_SDK_COUL_LONG_GPU_H #define LMP_PAIR_LJ_SDK_COUL_LONG_GPU_H #include "pair_lj_sdk_coul_long.h" namespace LAMMPS_NS { class PairLJSDKCoulLongGPU : public PairLJSDKCoulLong { public: PairLJSDKCoulLongGPU(LAMMPS *lmp); ~PairLJSDKCoulLongGPU(); template <int, int> void cpu_compute(int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Pair style lj/sdk/coul/long/gpu requires atom attribute q -UNDOCUMENTED +The atom style defined does not have this attribute. E: Cannot use newton pair with lj/sdk/coul/long/gpu pair style -UNDOCUMENTED +Self-explanatory. E: Pair style is incompatible with KSpace style -UNDOCUMENTED +If a pair style with a long-range Coulombic component is selected, +then a kspace style must also be used. */ diff --git a/src/GPU/pair_lj_sdk_gpu.h b/src/GPU/pair_lj_sdk_gpu.h index 34df1dd14..6138d40e7 100644 --- a/src/GPU/pair_lj_sdk_gpu.h +++ b/src/GPU/pair_lj_sdk_gpu.h @@ -1,60 +1,61 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lj/sdk/gpu,PairLJSDKGPU) PairStyle(cg/cmm/gpu,PairLJSDKGPU) #else #ifndef LMP_PAIR_LJ_SDK_GPU_H #define LMP_PAIR_LJ_SDK_GPU_H #include "pair_lj_sdk.h" namespace LAMMPS_NS { class PairLJSDKGPU : public PairLJSDK { public: PairLJSDKGPU(LAMMPS *lmp); ~PairLJSDKGPU(); template <int, int> void cpu_compute(int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Cannot use newton pair with lj/sdk/gpu pair style -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/GPU/pair_morse_gpu.h b/src/GPU/pair_morse_gpu.h index a1b544e5a..7936854f2 100644 --- a/src/GPU/pair_morse_gpu.h +++ b/src/GPU/pair_morse_gpu.h @@ -1,58 +1,59 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(morse/gpu,PairMorseGPU) #else #ifndef LMP_PAIR_MORSE_GPU_H #define LMP_PAIR_MORSE_GPU_H #include "pair_morse.h" namespace LAMMPS_NS { class PairMorseGPU : public PairMorse { public: PairMorseGPU(LAMMPS *lmp); ~PairMorseGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Cannot use newton pair with morse/gpu pair style -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/GPU/pair_resquared_gpu.cpp b/src/GPU/pair_resquared_gpu.cpp index 566712ec4..56359c631 100644 --- a/src/GPU/pair_resquared_gpu.cpp +++ b/src/GPU/pair_resquared_gpu.cpp @@ -1,317 +1,317 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ #include "lmptype.h" #include "math.h" #include "stdio.h" #include "stdlib.h" #include "pair_resquared_gpu.h" #include "math_extra.h" #include "atom.h" #include "atom_vec.h" #include "atom_vec_ellipsoid.h" #include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "integrate.h" #include "memory.h" #include "error.h" #include "neigh_request.h" #include "universe.h" #include "domain.h" #include "update.h" #include "string.h" #include "gpu_extra.h" // External functions from cuda library for atom decomposition int re_gpu_init(const int ntypes, double **shape, double **well, double **cutsq, double **sigma, double **epsilon, int **form, double **host_lj1, double **host_lj2, double **host_lj3, double **host_lj4, double **offset, double *special_lj, const int nlocal, const int nall, const int max_nbors, const int maxspecial, const double cell_size, int &gpu_mode, FILE *screen); void re_gpu_clear(); int ** re_gpu_compute_n(const int ago, const int inum, const int nall, double **host_x, int *host_type, double *sublo, double *subhi, int *tag, int **nspecial, int **special, const bool eflag, const bool vflag, const bool eatom, const bool vatom, int &host_start, int **ilist, int **jnum, const double cpu_time, bool &success, double **host_quat); int * re_gpu_compute(const int ago, const int inum, const int nall, double **host_x, int *host_type, int *ilist, int *numj, int **firstneigh, const bool eflag, const bool vflag, const bool eatom, const bool vatom, int &host_start, const double cpu_time, bool &success, double **host_quat); double re_gpu_bytes(); using namespace LAMMPS_NS; enum{SPHERE_SPHERE,SPHERE_ELLIPSE,ELLIPSE_SPHERE,ELLIPSE_ELLIPSE}; /* ---------------------------------------------------------------------- */ PairRESquaredGPU::PairRESquaredGPU(LAMMPS *lmp) : PairRESquared(lmp), gpu_mode(GPU_FORCE) { avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); if (!avec) - error->all(FLERR,"Pair gayberne requires atom style ellipsoid"); + error->all(FLERR,"Pair resquared/gpu requires atom style ellipsoid"); quat_nmax = 0; quat = NULL; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } /* ---------------------------------------------------------------------- free all arrays ------------------------------------------------------------------------- */ PairRESquaredGPU::~PairRESquaredGPU() { re_gpu_clear(); cpu_time = 0.0; memory->destroy(quat); } /* ---------------------------------------------------------------------- */ void PairRESquaredGPU::compute(int eflag, int vflag) { if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; int nall = atom->nlocal + atom->nghost; int inum, host_start; bool success = true; int *ilist, *numneigh, **firstneigh; if (nall > quat_nmax) { quat_nmax = static_cast<int>(1.1 * nall); memory->grow(quat, quat_nmax, 4, "pair:quat"); } AtomVecEllipsoid::Bonus *bonus = avec->bonus; int *ellipsoid = atom->ellipsoid; for (int i=0; i<nall; i++) { int qi = ellipsoid[i]; if (qi > -1) { quat[i][0] = bonus[qi].quat[0]; quat[i][1] = bonus[qi].quat[1]; quat[i][2] = bonus[qi].quat[2]; quat[i][3] = bonus[qi].quat[3]; } } if (gpu_mode != GPU_FORCE) { inum = atom->nlocal; firstneigh = re_gpu_compute_n(neighbor->ago, inum, nall, atom->x, atom->type, domain->sublo, domain->subhi, atom->tag, atom->nspecial, atom->special, eflag, vflag, eflag_atom, vflag_atom, host_start, &ilist, &numneigh, cpu_time, success, quat); } else { inum = list->inum; numneigh = list->numneigh; firstneigh = list->firstneigh; ilist = re_gpu_compute(neighbor->ago, inum, nall, atom->x, atom->type, list->ilist, numneigh, firstneigh, eflag, vflag, eflag_atom, vflag_atom, host_start, cpu_time, success, quat); } if (!success) error->one(FLERR,"Out of memory on GPGPU"); if (host_start < inum) { cpu_time = MPI_Wtime(); cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh); cpu_time = MPI_Wtime() - cpu_time; } } /* ---------------------------------------------------------------------- init specific to this pair style ------------------------------------------------------------------------- */ void PairRESquaredGPU::init_style() { if (force->newton_pair) error->all(FLERR,"Cannot use newton pair with resquared/gpu pair style"); if (!atom->ellipsoid_flag) error->all(FLERR,"Pair resquared/gpu requires atom style ellipsoid"); // per-type shape precalculations // require that atom shapes are identical within each type // if shape = 0 for point particle, set shape = 1 as required by Gay-Berne for (int i = 1; i <= atom->ntypes; i++) { if (!atom->shape_consistency(i,shape1[i][0],shape1[i][1],shape1[i][2])) error->all(FLERR,"Pair resquared/gpu requires atoms with same type have same shape"); if (setwell[i]) { shape2[i][0] = shape1[i][0]*shape1[i][0]; shape2[i][1] = shape1[i][1]*shape1[i][1]; shape2[i][2] = shape1[i][2]*shape1[i][2]; lshape[i] = shape1[i][0]*shape1[i][1]*shape1[i][2]; } } // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; double cut; for (int i = 1; i <= atom->ntypes; i++) { for (int j = i; j <= atom->ntypes; j++) { if (setflag[i][j] != 0 || (setflag[i][i] != 0 && setflag[j][j] != 0)) { cut = init_one(i,j); cut *= cut; if (cut > maxcut) maxcut = cut; cutsq[i][j] = cutsq[j][i] = cut; } else cutsq[i][j] = cutsq[j][i] = 0.0; } } double cell_size = sqrt(maxcut) + neighbor->skin; int maxspecial=0; if (atom->molecular) maxspecial=atom->maxspecial; int success = re_gpu_init(atom->ntypes+1, shape1, well, cutsq, sigma, epsilon, form, lj1, lj2, lj3, lj4, offset, force->special_lj, atom->nlocal, atom->nlocal+atom->nghost, 300, maxspecial, cell_size, gpu_mode, screen); GPU_EXTRA::check_flag(success,error,world); if (gpu_mode == GPU_FORCE) { int irequest = neighbor->request(this); neighbor->requests[irequest]->half = 0; neighbor->requests[irequest]->full = 1; } quat_nmax = static_cast<int>(1.1 * (atom->nlocal + atom->nghost)); memory->grow(quat, quat_nmax, 4, "pair:quat"); } /* ---------------------------------------------------------------------- */ double PairRESquaredGPU::memory_usage() { double bytes = Pair::memory_usage(); return bytes + memory->usage(quat,quat_nmax)+re_gpu_bytes(); } /* ---------------------------------------------------------------------- */ void PairRESquaredGPU::cpu_compute(int start, int inum, int eflag, int vflag, int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double evdwl,one_eng,rsq,r2inv,r6inv,forcelj,factor_lj; double fforce[3],ttor[3],rtor[3],r12[3]; int *jlist; RE2Vars wi,wj; double **x = atom->x; double **f = atom->f; double **tor = atom->torque; int *type = atom->type; double *special_lj = force->special_lj; // loop over neighbors of my atoms for (ii = start; ii < inum; ii++) { i = ilist[ii]; itype = type[i]; // not a LJ sphere if (lshape[itype] != 0.0) precompute_i(i,wi); jlist = firstneigh[i]; jnum = numneigh[i]; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; factor_lj = special_lj[sbmask(j)]; j &= NEIGHMASK; // r12 = center to center vector r12[0] = x[j][0]-x[i][0]; r12[1] = x[j][1]-x[i][1]; r12[2] = x[j][2]-x[i][2]; rsq = MathExtra::dot3(r12,r12); jtype = type[j]; // compute if less than cutoff if (rsq < cutsq[itype][jtype]) { switch (form[itype][jtype]) { case SPHERE_SPHERE: r2inv = 1.0/rsq; r6inv = r2inv*r2inv*r2inv; forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]); forcelj *= -r2inv; if (eflag) one_eng = r6inv*(r6inv*lj3[itype][jtype]-lj4[itype][jtype]) - offset[itype][jtype]; fforce[0] = r12[0]*forcelj; fforce[1] = r12[1]*forcelj; fforce[2] = r12[2]*forcelj; break; case SPHERE_ELLIPSE: precompute_i(j,wj); one_eng = resquared_lj(j,i,wj,r12,rsq,fforce,rtor,false); break; case ELLIPSE_SPHERE: one_eng = resquared_lj(i,j,wi,r12,rsq,fforce,ttor,true); tor[i][0] += ttor[0]*factor_lj; tor[i][1] += ttor[1]*factor_lj; tor[i][2] += ttor[2]*factor_lj; break; default: precompute_i(j,wj); one_eng = resquared_analytic(i,j,wi,wj,r12,rsq,fforce,ttor,rtor); tor[i][0] += ttor[0]*factor_lj; tor[i][1] += ttor[1]*factor_lj; tor[i][2] += ttor[2]*factor_lj; break; } fforce[0] *= factor_lj; fforce[1] *= factor_lj; fforce[2] *= factor_lj; f[i][0] += fforce[0]; f[i][1] += fforce[1]; f[i][2] += fforce[2]; if (eflag) evdwl = factor_lj*one_eng; if (evflag) ev_tally_xyz_full(i,evdwl,0.0,fforce[0],fforce[1], fforce[2],-r12[0],-r12[1],-r12[2]); } } } } diff --git a/src/GPU/pair_resquared_gpu.h b/src/GPU/pair_resquared_gpu.h index 3a44e0381..dd697a004 100644 --- a/src/GPU/pair_resquared_gpu.h +++ b/src/GPU/pair_resquared_gpu.h @@ -1,72 +1,69 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(resquared/gpu,PairRESquaredGPU) #else #ifndef LMP_PAIR_RESQUARED_GPU_H #define LMP_PAIR_RESQUARED_GPU_H #include "pair_resquared.h" namespace LAMMPS_NS { class PairRESquaredGPU : public PairRESquared { public: PairRESquaredGPU(LAMMPS *lmp); ~PairRESquaredGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; int quat_nmax; double **quat; }; } #endif #endif /* ERROR/WARNING messages: -E: Pair gayberne requires atom style ellipsoid +E: Pair resquared/gpu requires atom style ellipsoid -UNDOCUMENTED +Self-explanatory. E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Cannot use newton pair with resquared/gpu pair style -UNDOCUMENTED - -E: Pair resquared/gpu requires atom style ellipsoid - -UNDOCUMENTED +Self-explanatory. E: Pair resquared/gpu requires atoms with same type have same shape -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/GPU/pair_table_gpu.h b/src/GPU/pair_table_gpu.h index efe0edbb3..b1a2de2a4 100644 --- a/src/GPU/pair_table_gpu.h +++ b/src/GPU/pair_table_gpu.h @@ -1,66 +1,67 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(table/gpu,PairTableGPU) #else #ifndef LMP_PAIR_TABLE_GPU_H #define LMP_PAIR_TABLE_GPU_H #include "pair_table.h" namespace LAMMPS_NS { class PairTableGPU : public PairTable { public: PairTableGPU(LAMMPS *lmp); ~PairTableGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Cannot use newton pair with table/gpu pair style -UNDOCUMENTED +Self-explanatory. E: Pair distance < table inner cutoff -UNDOCUMENTED +Two atoms are closer together than the pairwise table allows. E: Pair distance > table outer cutoff Two atoms are further apart than the pairwise table allows. */ diff --git a/src/GPU/pair_yukawa_gpu.h b/src/GPU/pair_yukawa_gpu.h index d6f04fc2b..b95d89834 100644 --- a/src/GPU/pair_yukawa_gpu.h +++ b/src/GPU/pair_yukawa_gpu.h @@ -1,58 +1,59 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(yukawa/gpu,PairYukawaGPU) #else #ifndef LMP_PAIR_YUKAWA_GPU_H #define LMP_PAIR_YUKAWA_GPU_H #include "pair_yukawa.h" namespace LAMMPS_NS { class PairYukawaGPU : public PairYukawa { public: PairYukawaGPU(LAMMPS *lmp); ~PairYukawaGPU(); void cpu_compute(int, int, int, int, int *, int *, int **); void compute(int, int); void init_style(); double memory_usage(); enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH }; private: int gpu_mode; double cpu_time; int *gpulist; }; } #endif #endif /* ERROR/WARNING messages: E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Cannot use newton pair with yukawa/gpu pair style -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/GPU/pppm_gpu.h b/src/GPU/pppm_gpu.h index 6340ad6a8..17d3c924e 100644 --- a/src/GPU/pppm_gpu.h +++ b/src/GPU/pppm_gpu.h @@ -1,92 +1,93 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef KSPACE_CLASS KSpaceStyle(pppm/gpu,PPPMGPU) #else #ifndef LMP_PPPM_GPU_H #define LMP_PPPM_GPU_H #include "pppm.h" namespace LAMMPS_NS { class PPPMGPU : public PPPM { public: PPPMGPU(class LAMMPS *, int, char **); virtual ~PPPMGPU(); virtual void init(); virtual void setup(); virtual void compute(int, int); virtual void timing(int, double &, double &); virtual double memory_usage(); protected: FFT_SCALAR ***density_brick_gpu, ***vd_brick; bool kspace_split, im_real_space; virtual void allocate(); virtual void deallocate(); virtual void brick2fft(); virtual void fillbrick(); virtual void poisson(int, int); double poisson_time; FFT_SCALAR ***create_3d_offset(int, int, int, int, int, int, const char *, FFT_SCALAR *, int); void destroy_3d_offset(FFT_SCALAR ***, int, int); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Cannot use order greater than 8 with pppm/gpu. -UNDOCUMENTED +Self-explanatory. E: Out of memory on GPGPU -UNDOCUMENTED +GPU memory is limited. Reduce the size of the problem or increase the +number of GPUs. E: Out of range atoms - cannot compute PPPM One or more atoms are attempting to map their charge to a PPPM grid point that is not owned by a processor. This is likely for one of two reasons, both of them bad. First, it may mean that an atom near the boundary of a processor's sub-domain has moved more than 1/2 the "neighbor skin distance"_neighbor.html without neighbor lists being rebuilt and atoms being migrated to new processors. This also means you may be missing pairwise interactions that need to be computed. The solution is to change the re-neighboring criteria via the "neigh_modify"_neigh_modify command. The safest settings are "delay 0 every 1 check yes". Second, it may mean that an atom has moved far outside a processor's sub-domain or even the entire simulation box. This indicates bad physics, e.g. due to highly overlapping atoms, too large a timestep, etc. */ diff --git a/src/GRANULAR/fix_wall_gran.h b/src/GRANULAR/fix_wall_gran.h index 029091d84..3c2665b29 100644 --- a/src/GRANULAR/fix_wall_gran.h +++ b/src/GRANULAR/fix_wall_gran.h @@ -1,111 +1,111 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(wall/gran,FixWallGran) #else #ifndef LMP_FIX_WALL_GRAN_H #define LMP_FIX_WALL_GRAN_H #include "fix.h" namespace LAMMPS_NS { class FixWallGran : public Fix { public: FixWallGran(class LAMMPS *, int, char **); virtual ~FixWallGran(); int setmask(); void init(); void setup(int); virtual void post_force(int); virtual void post_force_respa(int, int, int); double memory_usage(); void grow_arrays(int); void copy_arrays(int, int); void set_arrays(int); int pack_exchange(int, double *); int unpack_exchange(int, double *); int pack_restart(int, double *); void unpack_restart(int, int); int size_restart(int); int maxsize_restart(); void reset_dt(); protected: int wallstyle,pairstyle,wiggle,wshear,axis; double kn,kt,gamman,gammat,xmu; double lo,hi,cylradius; double amplitude,period,omega,vshear; double dt; int nlevels_respa; int time_origin; bigint laststep; int *touch; double **shear; int shearupdate; void hooke(double, double, double, double, double *, double *, double *, double *, double *, double, double); void hooke_history(double, double, double, double, double *, double *, double *, double *, double *, double, double, double *); void hertz_history(double, double, double, double, double *, double *, double *, double *, double *, double, double, double *); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Fix wall/gran requires atom style sphere -UNDOCUMENTED +Self-explanatory. E: Cannot use wall in periodic dimension Self-explanatory. E: Cannot wiggle and shear fix wall/gran Cannot specify both options at the same time. E: Invalid wiggle direction for fix wall/gran Self-explanatory. E: Invalid shear direction for fix wall/gran Self-explanatory. E: Fix wall/gran is incompatible with Pair style Must use a granular pair style to define the parameters needed for this fix. */ diff --git a/src/GRANULAR/pair_gran_hooke_history.h b/src/GRANULAR/pair_gran_hooke_history.h index 94acce052..99a077409 100644 --- a/src/GRANULAR/pair_gran_hooke_history.h +++ b/src/GRANULAR/pair_gran_hooke_history.h @@ -1,94 +1,94 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(gran/hooke/history,PairGranHookeHistory) #else #ifndef LMP_PAIR_GRAN_HOOKE_HISTORY_H #define LMP_PAIR_GRAN_HOOKE_HISTORY_H #include "pair.h" namespace LAMMPS_NS { class PairGranHookeHistory : public Pair { public: PairGranHookeHistory(class LAMMPS *); virtual ~PairGranHookeHistory(); virtual void compute(int, int); virtual void settings(int, char **); void coeff(int, char **); void init_style(); void init_list(int, class NeighList *); double init_one(int, int); void write_restart(FILE *); void read_restart(FILE *); void write_restart_settings(FILE *); void read_restart_settings(FILE *); double single(int, int, int, int, double, double, double, double &); void reset_dt(); protected: double kn,kt,gamman,gammat,xmu; int dampflag; double dt; int freeze_group_bit; int history; bigint laststep; class FixShearHistory *fix_history; char *suffix; double *onerad_dynamic,*onerad_frozen; double *maxrad_dynamic,*maxrad_frozen; int neighprev; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. E: Pair granular requires atom style sphere -UNDOCUMENTED +Self-explanatory. E: Pair granular requires ghost atoms store velocity Use the communicate vel yes command to enable this. E: Pair granular with shear history requires newton pair off This is a current restriction of the implementation of pair granular styles with history. */ diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index e210c67cd..465461ea9 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -1,942 +1,939 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- Contributing authors: Valeriu Smirichinski, Ryan Elliott, Ellad Tadmor (U Minn) ------------------------------------------------------------------------- */ #include "math.h" #include "stdio.h" #include "stdlib.h" #include "string.h" #include "pair_kim.h" #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" #include "memory.h" #include "error.h" #include "KIMservice.h" using namespace LAMMPS_NS; - - /* ---------------------------------------------------------------------- */ PairKIM::PairKIM(LAMMPS *lmp) : Pair(lmp) { nelements = 0; elements = NULL; single_enable = 0; restartinfo = 0; one_coeff = 1; no_virial_fdotr_compute = 1; virialGlobal_ind = -1; virialPerAtom_ind = -1; process_d1Edr_ind = -1; modelname = NULL; testname = NULL; maxall = 0; kimtype = NULL; fcopy = NULL; onebuf = NULL; pointsto = 0; memory->create(Rij,3*KIM_API_MAX_NEIGHBORS,"pair:Rij"); // reverse comm even if newton off comm_reverse_off = 9; } /* ---------------------------------------------------------------------- */ PairKIM::~PairKIM() { if (elements) for (int i = 0; i < nelements; i++) delete [] elements[i]; delete [] elements; delete [] modelname; delete [] testname; memory->destroy(kimtype); memory->destroy(fcopy); memory->destroy(onebuf); if (allocated) { memory->destroy(setflag); memory->destroy(cutsq); delete [] map; } memory->destroy(Rij); kim_free(); } /* ---------------------------------------------------------------------- */ void PairKIM::compute(int eflag , int vflag) { int kimerr; if (eflag || vflag) ev_setup(eflag,vflag); else evflag = eflag_global = eflag_atom = vflag_global = vflag_atom = 0; // grow kimtype array if necessary // needs to be atom->nmax in length if (atom->nmax > maxall) { memory->destroy(kimtype); memory->destroy(fcopy); maxall = atom->nmax; memory->create(kimtype,maxall,"pair:kimtype"); memory->create(fcopy,maxall,3,"pair:fcopy"); } // kimtype = KIM atom type for each LAMMPS atom // set ielement to valid 0 if map[] stores an un-used -1 int *type = atom->type; int nall = atom->nlocal + atom->nghost; int ielement; for (int i = 0; i < nall; i++) { ielement = map[type[i]]; ielement = MAX(ielement,0); kimtype[i] = atypeMapKIM[2*ielement+1]; } // pass current atom pointers to KIM set_volatiles(); // set callback for virial tallying if necessary int process_d1Edr_flag = 0; if (process_d1Edr_ind >= 0 && (vflag_atom || vflag_global)) process_d1Edr_flag = 1; pkim->set_compute_byI_multiple(&kimerr,12, energyPerAtom_ind, eflag_atom,1, virialPerAtom_ind,vflag_atom,1, virialGlobal_ind,vflag_global,1, process_d1Edr_ind,process_d1Edr_flag,1); kim_error(__LINE__,"set_compute_byI_multiple",kimerr); // KIM initialization init2zero(pkim,&kimerr); kim_error(__LINE__,"PairKIM::init2zero(..)",kimerr); // compute energy, forces, virial via KIM model pkim->model_compute(&kimerr); kim_error(__LINE__,"PairKIM::pkim->model_compute() error",kimerr); // reverse comm for ghost atoms // required even when newton flag is off comm->reverse_comm_pair(this); // sum fcopy to f if running in hybrid mode if (hybrid) { double **f = atom->f; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) { f[i][0] += fcopy[i][0]; f[i][1] += fcopy[i][1]; f[i][2] += fcopy[i][2]; } } // flip sign of virial if (vflag_global && !pkim->virialGlobal_need2add) for (int i = 0; i < 6; i++) virial[i] = -1.0*virial[i]; if (vflag_atom && !pkim->virialPerAtom_need2add) for (int i = 0; i < atom->nlocal; i++) for (int j = 0; j < 6; j++) vatom[i][j] = -1.0*vatom[i][j]; } /* ---------------------------------------------------------------------- allocate all arrays ------------------------------------------------------------------------- */ void PairKIM::allocate() { allocated = 1; int n = atom->ntypes; memory->create(setflag,n+1,n+1,"pair:setflag"); memory->create(cutsq,n+1,n+1,"pair:cutsq"); map = new int[n+1]; } /* ---------------------------------------------------------------------- global settings ------------------------------------------------------------------------- */ void PairKIM::settings(int narg, char **arg) { if (narg != 1) error->all(FLERR,"Illegal pair_style command"); delete [] modelname; int n = strlen(arg[0]) + 1; modelname = new char[n]; strcpy(modelname,arg[0]); delete [] testname; const char *test = "test_LAMMPS"; n = strlen(test) + 1; testname = new char[n]; strcpy(testname,test); ev_setup(3,6); } /* ---------------------------------------------------------------------- set coeffs for one or more type pairs ------------------------------------------------------------------------- */ void PairKIM::coeff(int narg, char **arg) { int i,j,n; if (!allocated) allocate(); if (narg != 2 + atom->ntypes) error->all(FLERR,"Incorrect args for pair coefficients"); // insure I,J args are * * if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to KIM elements // map[i] = which element the Ith atom type is, -1 if NULL // nelements = # of unique elements // elements = list of element names if (elements) { for (i = 0; i < nelements; i++) delete [] elements[i]; delete [] elements; } elements = new char*[atom->ntypes]; for (i = 0; i < atom->ntypes; i++) elements[i] = NULL; nelements = 0; for (i = 2; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { map[i-1] = -1; continue; } for (j = 0; j < nelements; j++) if (strcmp(arg[i],elements[j]) == 0) break; map[i-1] = j; if (j == nelements) { n = strlen(arg[i]) + 1; elements[j] = new char[n]; strcpy(elements[j],arg[i]); nelements++; } } // KIM initialization kim_init(); if (!pkim->model_init()) kim_error(__LINE__,"KIM API:model_init() failed",-1); // clear setflag since coeff() called once with I,J = * * n = atom->ntypes; for (int i = 1; i <= n; i++) for (int j = i; j <= n; j++) setflag[i][j] = 0; // set setflag i,j for type pairs where both are mapped to elements int count = 0; for (int i = 1; i <= n; i++) for (int j = i; j <= n; j++) if (map[i] >= 0 && map[j] >= 0) { setflag[i][j] = 1; count++; } if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); } /* ---------------------------------------------------------------------- init specific to this pair style ------------------------------------------------------------------------- */ void PairKIM::init_style() { if (force->newton_pair != 0) - error->all(FLERR,"Pair style pair_KIM requires newton pair Off"); + error->all(FLERR,"Pair style kim requires newton pair off"); // setup onebuf for neighbors of one atom if needed molecular = atom->molecular; if (molecular) { memory->destroy(onebuf); memory->create(onebuf,neighbor->oneatom,"pair:onebuf"); } // hybrid = 1 if running with pair hybrid hybrid = 0; if (force->pair_match("hybrid",0)) hybrid = 1; // request half or full neighbor list depending on KIM model requirement int irequest = neighbor->request(this); if (pkim->requiresFullNeighbors()) { neighbor->requests[irequest]->half = 0; neighbor->requests[irequest]->full = 1; } } /* ---------------------------------------------------------------------- init for one type pair i,j and corresponding j,i ------------------------------------------------------------------------- */ double PairKIM::init_one(int i, int j) { if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); return cut_global; } /* ---------------------------------------------------------------------- */ int PairKIM::pack_reverse_comm(int n, int first, double *buf) { int i,m,last; double *fp; if (hybrid) fp = &(fcopy[0][0]); else fp = &(atom->f[0][0]); double *va=&(vatom[0][0]); m = 0; last = first + n; if (vflag_atom == 1) { for (i = first; i < last; i++) { buf[m++] = fp[3*i+0]; buf[m++] = fp[3*i+1]; buf[m++] = fp[3*i+2]; buf[m++] = va[6*i+0]; buf[m++] = va[6*i+1]; buf[m++] = va[6*i+2]; buf[m++] = va[6*i+3]; buf[m++] = va[6*i+4]; buf[m++] = va[6*i+5]; } return 9; } else { for (i = first; i < last; i++){ buf[m++] = fp[3*i+0]; buf[m++] = fp[3*i+1]; buf[m++] = fp[3*i+2]; } return 3; } } /* ---------------------------------------------------------------------- */ void PairKIM::unpack_reverse_comm(int n, int *list, double *buf) { int i,j,m; double *fp; if (hybrid) fp = &(fcopy[0][0]); else fp = &(atom->f[0][0]); double *va=&(vatom[0][0]); m = 0; if (vflag_atom == 1) { for (i = 0; i < n; i++) { j = list[i]; fp[3*j+0]+= buf[m++]; fp[3*j+1]+= buf[m++]; fp[3*j+2]+= buf[m++]; va[j*6+0]+=buf[m++]; va[j*6+1]+=buf[m++]; va[j*6+2]+=buf[m++]; va[j*6+3]+=buf[m++]; va[j*6+4]+=buf[m++]; va[j*6+5]+=buf[m++]; } } else { for (i = 0; i < n; i++) { j = list[i]; fp[3*j+0]+= buf[m++]; fp[3*j+1]+= buf[m++]; fp[3*j+2]+= buf[m++]; } } } /* ---------------------------------------------------------------------- memory usage of local atom-based arrays ------------------------------------------------------------------------- */ double PairKIM::memory_usage() { double bytes = maxall * sizeof(int); return bytes; } /* ---------------------------------------------------------------------- KIM-specific interface ------------------------------------------------------------------------- */ void PairKIM::kim_error(int ln, const char* msg, int errcode) { if (errcode == 1) return; KIM_API_model::report_error(ln,(char *) __FILE__, (char *) msg,errcode); error->all(__FILE__,ln,"Internal KIM error"); } /* ---------------------------------------------------------------------- */ int PairKIM::get_neigh(void **kimmdl,int *mode,int *request, int *atom, int *numnei, int **nei1atom, double **pRij) { double * x; KIM_API_model *pkim = (KIM_API_model *) *kimmdl; // get neighObj from KIM API obj // this block will be changed in case of hybride/composite KIM potential int kimerr; PairKIM *self = (PairKIM *) pkim->get_test_buffer(&kimerr); *pRij = &(self->Rij[0]); NeighList * neiobj = (NeighList * ) (*pkim)[self->neighObject_ind].data; int * pnAtoms = (int *)(*pkim)[self->numberOfAtoms_ind].data; if(pkim->support_Rij) x = (double *)(*pkim)[self->coordinates_ind].data; int nAtoms = *pnAtoms; int j,jj,inum,*ilist,*numneigh,**firstneigh; inum = neiobj->inum; //# of I atoms neighbors are stored for ilist =neiobj->ilist ; //local indices of I atoms numneigh =neiobj-> numneigh ; // # of J neighbors for each I atom firstneigh =neiobj->firstneigh ;// ptr to 1st J int value of each I atom if (*mode==0){ //iterator mode if (*request== 0){ //restart iterator self->pointsto =0; *numnei=0; return KIM_STATUS_NEIGH_ITER_INIT_OK; //succsesful restart - } else if(*request==1){//increment iterator - if (self->pointsto > inum || inum <0){ + } else if (*request==1) { //increment iterator + if (self->pointsto > inum || inum <0) { self->error->one(FLERR,"KIM neighbor iterator exceeded range"); - }else if(self->pointsto == inum) { + } else if (self->pointsto == inum) { self->pointsto ==0; *numnei=0; return KIM_STATUS_NEIGH_ITER_PAST_END; //reached end by iterator - }else{ + } else{ *atom = ilist[self->pointsto]; *numnei = numneigh[*atom]; // strip off neighbor mask for molecular systems if (self->molecular) { int n = *numnei; int *ptr = firstneigh[*atom]; int *onebuf = self->onebuf; for (int i = 0; i < n; i++) onebuf[i] = *(ptr++) & NEIGHMASK; *nei1atom = onebuf; } else *nei1atom = firstneigh[*atom]; self->pointsto++; if (*numnei > KIM_API_MAX_NEIGHBORS) return KIM_STATUS_NEIGH_TOO_MANY_NEIGHBORS; if (pkim->support_Rij){ - for( jj=0; jj < *numnei; jj++){ + for (jj=0; jj < *numnei; jj++){ int i = *atom; j = (*nei1atom)[jj]; self->Rij[jj*3 +0] = -x[i*3+0] + x[j*3+0]; self->Rij[jj*3 +1] = -x[i*3+1] + x[j*3+1]; self->Rij[jj*3 +2] = -x[i*3+2] + x[j*3+2]; } } return KIM_STATUS_OK;//successful increment } } }else if (*mode ==1){//locator mode //... if (*request >= nAtoms || inum <0) return -1; if (*request >= inum) { *atom=*request; *numnei=0; return KIM_STATUS_OK;//successfull but no neighbors in the list } *atom = *request; *numnei = numneigh[*atom]; // strip off neighbor mask for molecular systems if (self->molecular) { int n = *numnei; int *ptr = firstneigh[*atom]; int *onebuf = self->onebuf; for (int i = 0; i < n; i++) onebuf[i] = *(ptr++) & NEIGHMASK; *nei1atom = onebuf; } else *nei1atom = firstneigh[*atom]; if (*numnei > KIM_API_MAX_NEIGHBORS) return KIM_STATUS_NEIGH_TOO_MANY_NEIGHBORS; if (pkim->support_Rij){ for(int jj=0; jj < *numnei; jj++){ int i = *atom; int j = (*nei1atom)[jj]; self->Rij[jj*3 +0]=-x[i*3+0] + x[j*3+0]; self->Rij[jj*3 +1]=-x[i*3+1] + x[j*3+1]; self->Rij[jj*3 +2]=-x[i*3+2] + x[j*3+2]; } } return KIM_STATUS_OK;//successful end - }else{ - return KIM_STATUS_NEIGH_INVALID_MODE;//invalid mode - } - return -16;//should not get here: unspecified error + } else return KIM_STATUS_NEIGH_INVALID_MODE;//invalid mode + + return -16; //should not get here: unspecified error } /* ---------------------------------------------------------------------- */ void PairKIM::kim_free() { int kimerr; pkim->model_destroy(&kimerr); pkim->free(); delete pkim; delete [] atypeMapKIM; } /* ---------------------------------------------------------------------- */ void PairKIM::kim_init() { support_atypes = true; strcpy(modelfile,""); strcpy(testfile,""); char * kim_dir =getenv("KIM_DIR"); char * kim_models_dir = getenv("KIM_MODELS_DIR"); char * current_path = getenv("PWD"); if (kim_dir == NULL) error->all(FLERR,"KIM_DIR environement variable is unset"); if (current_path == NULL) error->all(FLERR,"PWD environement variable is unset"); if (kim_models_dir == NULL) { strcat(modelfile,kim_dir);strcat(modelfile,"MODELs/"); strcat(modelfile,modelname); strcat(modelfile,"/"); strcat(modelfile,modelname); strcat(modelfile,".kim"); } else { strcat(modelfile,kim_models_dir);strcat(modelfile,modelname); strcat(modelfile,"/"); strcat(modelfile,modelname); strcat(modelfile,".kim"); } strcat(testfile,current_path); strcat(testfile,"/"); strcat(testfile,testname);strcat(testfile,".kim"); // now testfile and modelfile are set int kimerr; if (!(strcmp(update->unit_style,"metal")==0)) this->kim_error(__LINE__, "LAMMPS unit_style must be metal to " "work with KIM models",-12); // create temporary kim file test_descriptor_string = new char[80*60]; for (int i=50;i<80*60;i++) test_descriptor_string[i]='\0'; // 1. write atomic header and atomic type spec int i_s; sprintf(test_descriptor_string, "# This file is automatically generated from LAMMPS " "pair_style PairKIM command\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"TEST_NAME :=%s\n" ,testname); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"#Unit_Handling := flexible\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"Unit_length := A\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"Unit_energy := eV \n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"Unit_charge := e\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"Unit_temperature := K\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"Unit_time := fs\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"SUPPORTED_ATOM/PARTICLES_TYPES:\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "# Simbol/name Type code\n"); int code=1; for (int i=0; i < nelements; i++){ i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"%s\t\t\tspec\t\t%d\n", elements[i],code++); } i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"\n"); // 2. conventions i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], \ "CONVENTIONS:\n# Name Type\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "ZeroBasedLists flag\n\n"); i_s=strlen(test_descriptor_string); // can use iterator or locator neighbor mode, unless hybrid int iterator_only = 0; if (force->pair_match("hybrid",0)) iterator_only = 1; if (iterator_only) sprintf(&test_descriptor_string[i_s],"Neigh_IterAccess flag\n\n"); else sprintf(&test_descriptor_string[i_s],"Neigh_BothAccess flag\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"NEIGH-PURE-H flag\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"NEIGH-PURE-F flag\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"NEIGH-RVEC-F flag\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"CLUSTER flag\n\n"); // 3. input-output i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s],"MODEL_INPUT:\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "# Name Type Unit Shape\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "numberOfAtoms integer none []\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "numberContributingAtoms integer none []\n\n"); if (support_atypes){ i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "numberAtomTypes integer none []\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "atomTypes integer none [numberOfAtoms]\n\n"); } i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "coordinates real*8 length " "[numberOfAtoms,3]\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "neighObject pointer none []\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "get_half_neigh method none []\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "get_full_neigh method none []\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "MODEL_OUPUT:\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "# Name Type Unit Shape\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "compute method none []\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "destroy method none []\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "cutoff real*8 length []\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "energy real*8 energy []\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "forces real*8 force " "[numberOfAtoms,3]\n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "energyPerAtom real*8 energy " "[numberOfAtoms]\n\n"); //virial and virial per atom will be added here // i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "virialGlobal real*8 pressure [6] \n\n\0"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "process_d1Edr method none [] \n\n"); i_s=strlen(test_descriptor_string); sprintf(&test_descriptor_string[i_s], "virialPerAtom real*8 pressure " "[numberOfAtoms,6] \n\n\0"); // kim file created now init and maptypes pkim = new KIM_API_model(); if (!pkim->init_str_testname(test_descriptor_string,modelname)) error->all(FLERR,"KIM initialization failed"); delete [] test_descriptor_string; // get correct index of each variable in kim_api object pkim->get_index_multiple(&kimerr,36, "coordinates", &coordinates_ind,1, "cutoff", &cutoff_ind,1, "energyPerAtom",&energyPerAtom_ind,1, "energy", &energy_ind,1, "forces", &forces_ind,1, "neighObject", &neighObject_ind,1, "numberOfAtoms",&numberOfAtoms_ind,1, "get_half_neigh", &get_half_neigh_ind,1, "get_full_neigh",&get_full_neigh_ind,1, "virialPerAtom", &virialPerAtom_ind,1, "virialGlobal", &virialGlobal_ind,1, "process_d1Edr",&process_d1Edr_ind,1 ); this->kim_error(__LINE__,"get_index_multiple",kimerr); if(support_atypes){ numberAtomTypes_ind = pkim->get_index((char *) "numberAtomTypes",&kimerr); this->kim_error(__LINE__,"numberAtomTypes",kimerr); atomTypes_ind = pkim->get_index((char *) "atomTypes",&kimerr); this->kim_error(__LINE__,"atomTypes",kimerr); } set_statics(); // setup mapping between LAMMPS and KIM atom types atypeMapKIM = new int[2*nelements]; for(int i = 0; i < nelements; i++){ atypeMapKIM[i*2 + 0] = i; int kimerr; atypeMapKIM[i*2 + 1] = pkim->get_aTypeCode(elements[i],&kimerr); this->kim_error(__LINE__,"create_atypeMapKIM: symbol not found ",kimerr); } // check if Rij needed for get_neigh // get_NBC_method mallocs a string, so free it here char *NBC_method = (char *) pkim->get_NBC_method(&kimerr); this->kim_error(__LINE__,"NBC method not set",kimerr); support_Rij = false; if (strcmp(NBC_method,"NEIGH-RVEC-F")==0) support_Rij = true; memory->sfree(NBC_method); } /* ---------------------------------------------------------------------- */ void PairKIM::set_statics() { if(support_atypes) pkim->set_data_byi(numberAtomTypes_ind,1,(void *) &(atom->ntypes )) ; if ( process_d1Edr_ind >= 0 ) pkim->set_data((char *) "process_d1Edr",1, (void*) &process_d1Edr); localnall = (int) (atom->nghost + atom->nlocal); int kimerr; pkim->set_data_byI_multiple(&kimerr,24, energy_ind,1, (void *)&(this->eng_vdwl),1, cutoff_ind,1, (void *)&(this->cut_global),1, get_half_neigh_ind,1,(void *) &get_neigh,1, get_full_neigh_ind,1,(void *) &get_neigh,1, numberOfAtoms_ind,1, (void *) &localnall,1, virialGlobal_ind,1,(void *)&(virial[0]),1); this->kim_error(__LINE__,"set_data_byI_multiple",kimerr); pkim->set_data((char *) "numberContributingAtoms",1,(void *)&(atom->nlocal)); pkim->set_test_buffer( (void *)this, &kimerr); this->kim_error(__LINE__,"set_test_buffer",kimerr); } /* ---------------------------------------------------------------------- */ void PairKIM::set_volatiles() { localnall = (int) (atom->nghost + atom->nlocal); bigint nall = (bigint) localnall; pkim->set_data_byi(coordinates_ind,nall*3,(void *) &(atom->x[0][0]) ); if (hybrid) pkim->set_data_byi(forces_ind,nall*3,(void *) &(fcopy[0][0]) ) ; else pkim->set_data_byi(forces_ind,nall*3,(void *) &(atom->f[0][0]) ) ; pkim->set_data_byi(energyPerAtom_ind,nall, (void *)this->eatom) ; pkim->set_data_byi(neighObject_ind,1, (void *)this->list) ; if (support_atypes) pkim->set_data_byi(atomTypes_ind,nall, (void *) kimtype) ; if(vflag_atom != 1) { (*pkim)[virialPerAtom_ind].flag->calculate = 0; } else { (*pkim)[virialPerAtom_ind].flag->calculate = 1; pkim->set_data_byi(virialPerAtom_ind,(intptr_t)nall, (void *)&vatom[0][0]) ; } if (vflag_global != 1) { (*pkim)[virialGlobal_ind].flag->calculate = 0; } else { (*pkim)[virialGlobal_ind].flag->calculate = 1; } } /* ---------------------------------------------------------------------- */ void PairKIM::init2zero(KIM_API_model *pkim, int *kimerr) { // fetch pointer to this = PairKIM, so that callbacks can access class members // if error, have no ptr to PairKIM, so let KIM generate error message PairKIM *self = (PairKIM *) pkim->get_test_buffer(kimerr); if (*kimerr < 1) KIM_API_model::report_error(__LINE__,(char *) __FILE__, (char *) "Self ptr to PairKIM is invalid", *kimerr); int p1_ind=-1;bool process_d1=false; self->process_dE.virialGlobal_flag = 0; self->process_dE.virialPerAtom_flag =0; int ierGlobal,ierPerAtom; self->process_dE.virialGlobal = (double *) pkim->get_data((char *) "virialGlobal",&ierGlobal); self->process_dE.virialPerAtom = (double *) pkim->get_data((char *) "virialPerAtom", &ierPerAtom); self->process_dE.numberOfAtoms = (int *) pkim->get_data((char *) "numberOfAtoms",kimerr); //halfNeighbors = !pkim->requiresFullNeighbors(); p1_ind = pkim->get_index((char *) "process_d1Edr"); if (*kimerr !=KIM_STATUS_OK) return; if (ierGlobal == KIM_STATUS_OK && self->process_dE.virialGlobal != NULL) { self->process_dE.virialGlobal_flag = pkim->isit_compute((char *) "virialGlobal"); if (self->process_dE.virialGlobal_flag==1 && pkim->virialGlobal_need2add){ self->process_dE.virialGlobal[0] =0.0; self->process_dE.virialGlobal[1] =0.0; self->process_dE.virialGlobal[2] =0.0; self->process_dE.virialGlobal[3] =0.0; self->process_dE.virialGlobal[4] =0.0; self->process_dE.virialGlobal[5] =0.0; process_d1=true; } } if (ierPerAtom == KIM_STATUS_OK && self->process_dE.virialPerAtom != NULL) { self->process_dE.virialPerAtom_flag = pkim->isit_compute((char *) "virialPerAtom"); if (self->process_dE.virialPerAtom_flag==1 && pkim->virialPerAtom_need2add) { for (int i =0;i<(*self->process_dE.numberOfAtoms)*6 ;i++) self->process_dE.virialPerAtom[i]=0.0; process_d1=true; } } if (p1_ind >= 0) { if (process_d1) pkim->set2_compute((char *) "process_d1Edr"); else pkim->set2_donotcompute((char *) "process_d1Edr"); } } /* ---------------------------------------------------------------------- */ void PairKIM::process_d1Edr(KIM_API_model **ppkim, double *de,double *r,double ** pdx, int *i,int *j,int *ier) { KIM_API_model *pkim = *ppkim; PairKIM *self = (PairKIM *) pkim->get_test_buffer(ier); *ier=KIM_STATUS_FAIL; double vir[6],v; double *dx = *pdx; //v=(*de)/((*r)*(*r))/3.0; //v=(*de)/((*r)*(*r)); v=-(*de)/(*r); if (self->process_dE.virialGlobal_flag ==1 && pkim->virialGlobal_need2add) { vir[0] = v * dx[0] * dx[0]; vir[1] = v * dx[1] * dx[1]; vir[2] = v * dx[2] * dx[2]; vir[3] = v * dx[1] * dx[2]; vir[4] = v * dx[0] * dx[2]; vir[5] = v * dx[0] * dx[1]; self->process_dE.virialGlobal[0] += vir[0]; self->process_dE.virialGlobal[1] += vir[1]; self->process_dE.virialGlobal[2] += vir[2]; self->process_dE.virialGlobal[3] += vir[3]; self->process_dE.virialGlobal[4] += vir[4]; self->process_dE.virialGlobal[5] += vir[5]; } if (self->process_dE.virialPerAtom_flag==1 && pkim->virialPerAtom_need2add ){ vir[0] =0.5 * v * dx[0] * dx[0]; vir[1] =0.5 * v * dx[1] * dx[1]; vir[2] =0.5 * v * dx[2] * dx[2]; vir[3] =0.5 * v * dx[1] * dx[2]; vir[4] =0.5 * v * dx[0] * dx[2]; vir[5] =0.5 * v * dx[0] * dx[1]; self->process_dE.virialPerAtom[(*i)*6 + 0] += vir[0]; self->process_dE.virialPerAtom[(*i)*6 + 1] += vir[1]; self->process_dE.virialPerAtom[(*i)*6 + 2] += vir[2]; self->process_dE.virialPerAtom[(*i)*6 + 3] += vir[3]; self->process_dE.virialPerAtom[(*i)*6 + 4] += vir[4]; self->process_dE.virialPerAtom[(*i)*6 + 5] += vir[5]; self->process_dE.virialPerAtom[(*j)*6 + 0] += vir[0]; self->process_dE.virialPerAtom[(*j)*6 + 1] += vir[1]; self->process_dE.virialPerAtom[(*j)*6 + 2] += vir[2]; self->process_dE.virialPerAtom[(*j)*6 + 3] += vir[3]; self->process_dE.virialPerAtom[(*j)*6 + 4] += vir[4]; self->process_dE.virialPerAtom[(*j)*6 + 5] += vir[5]; } *ier = KIM_STATUS_OK; } diff --git a/src/KIM/pair_kim.h b/src/KIM/pair_kim.h index aac9ad9be..024c48982 100644 --- a/src/KIM/pair_kim.h +++ b/src/KIM/pair_kim.h @@ -1,150 +1,156 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(kim,PairKIM) #else #ifndef LMP_PAIR_KIM_H #define LMP_PAIR_KIM_H class KIM_API_model; #include "pair.h" namespace LAMMPS_NS { class PairKIM : public Pair { public: PairKIM(class LAMMPS *); ~PairKIM(); void compute(int, int); void settings(int, char **); void coeff(int, char **); void init_style(); double init_one(int, int); int pack_reverse_comm(int, int, double *); void unpack_reverse_comm(int, int *, double *); double memory_usage(); private: double cut_global; // returned from KIM model char **elements; // names of unique elements int *map; // mapping from atom types to elements int nelements; // # of unique elements int maxall; int *kimtype; // KIM atom types for each LAMMPS atom double **fcopy; // copy of f, when running with pair hybrid int hybrid; // 1 if running with pair hybrid int *onebuf; // neighbors of one atom int molecular; void allocate(); // KIM data // static PairKIM *self; KIM_API_model *pkim; int coordinates_ind,numberOfAtoms_ind,numberAtomTypes_ind; int atomTypes_ind,compute_ind; int get_half_neigh_ind,get_full_neigh_ind,neighObject_ind; int cutoff_ind,energy_ind; int energyPerAtom_ind,force_ind,forces_ind,virialGlobal_ind; int virialPerAtom_ind,process_d1Edr_ind; int localnall; int pointsto; //get_neigh iterator index double *Rij;//size of [3*KIM_API_MAX_NEIGHBORS] struct process_fij_4_pair_KIM{ double *virialGlobal; double *virialPerAtom; int virialGlobal_flag; int virialPerAtom_flag; int *numberOfAtoms; bool halfNeighbors; }; process_fij_4_pair_KIM process_dE; bool support_atypes; bool support_Rij; char *testname; char *modelname; char testfile[160]; char modelfile[160]; char *test_descriptor_string; int *atypeMapKIM; // one pair of values per KIM element used // 1st value = element index // 2nd value = KIM atom type void kim_error(int, const char *, int); void kim_init(); void kim_free(); void set_statics(); void set_volatiles(); void init2zero(KIM_API_model *, int *); // static methods used as callbacks from KIM static int get_neigh(void **,int *, int *, int *, int *, int **, double **); static void process_d1Edr(KIM_API_model **, double *, double *, double **, int *, int *, int *); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command -UNDOCUMENTED +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients -UNDOCUMENTED +Self-explanatory. Check the input script or data file. -E: Pair style pair_KIM requires newton pair Off +E: Pair style kim requires newton pair off -UNDOCUMENTED +Self-explanatory. E: All pair coeffs are not set -UNDOCUMENTED +All pair coefficients must be set in the data file or by the +pair_coeff command before running a simulation. E: KIM neighbor iterator exceeded range -UNDOCUMENTED +This error should not normally occur if the KIM library is working +correctly. E: KIM_DIR environement variable is unset -UNDOCUMENTED +The KIM library requires that this environment variable be set before +running LAMMPS> E: PWD environement variable is unset -UNDOCUMENTED +The KIM library requires that this environment variable be set before +running LAMMPS> E: KIM initialization failed -UNDOCUMENTED +This is an error return from the KIM library. */ diff --git a/src/KSPACE/pppm_tip4p.h b/src/KSPACE/pppm_tip4p.h index 93cc2c68e..3a300f862 100644 --- a/src/KSPACE/pppm_tip4p.h +++ b/src/KSPACE/pppm_tip4p.h @@ -1,79 +1,79 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef KSPACE_CLASS KSpaceStyle(pppm/tip4p,PPPMTIP4P) #else #ifndef LMP_PPPM_TIP4P_H #define LMP_PPPM_TIP4P_H #include "pppm.h" namespace LAMMPS_NS { class PPPMTIP4P : public PPPM { public: PPPMTIP4P(class LAMMPS *, int, char **); virtual ~PPPMTIP4P () {}; void init(); protected: virtual void particle_map(); virtual void make_rho(); virtual void fieldforce(); private: void find_M(int, int &, int &, double *); }; } #endif #endif /* ERROR/WARNING messages: E: Kspace style pppm/tip4p requires newton on -UNDOCUMENTED +Self-explanatory. E: Out of range atoms - cannot compute PPPM One or more atoms are attempting to map their charge to a PPPM grid point that is not owned by a processor. This is likely for one of two reasons, both of them bad. First, it may mean that an atom near the boundary of a processor's sub-domain has moved more than 1/2 the "neighbor skin distance"_neighbor.html without neighbor lists being rebuilt and atoms being migrated to new processors. This also means you may be missing pairwise interactions that need to be computed. The solution is to change the re-neighboring criteria via the "neigh_modify"_neigh_modify command. The safest settings are "delay 0 every 1 check yes". Second, it may mean that an atom has moved far outside a processor's sub-domain or even the entire simulation box. This indicates bad physics, e.g. due to highly overlapping atoms, too large a timestep, etc. E: TIP4P hydrogen is missing The TIP4P pairwise computation failed to find the correct H atom within a water molecule. E: TIP4P hydrogen has incorrect atom type The TIP4P pairwise computation found an H atom whose type does not agree with the specified H type. */ diff --git a/src/MANYBODY/pair_adp.h b/src/MANYBODY/pair_adp.h index 60b0ebf01..e240f5963 100644 --- a/src/MANYBODY/pair_adp.h +++ b/src/MANYBODY/pair_adp.h @@ -1,120 +1,122 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(adp,PairADP) #else #ifndef LMP_PAIR_ADP_H #define LMP_PAIR_ADP_H #include "pair.h" namespace LAMMPS_NS { class PairADP : public Pair { public: PairADP(class LAMMPS *); virtual ~PairADP(); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); void init_style(); double init_one(int, int); int pack_comm(int, int *, double *, int, int *); void unpack_comm(int, int, double *); int pack_reverse_comm(int, int, double *); void unpack_reverse_comm(int, int *, double *); double memory_usage(); protected: int nmax; // allocated size of per-atom arrays double cutforcesq,cutmax; // per-atom arrays double *rho,*fp; double **mu, **lambda; // potentials as array data int nrho,nr; int nfrho,nrhor,nz2r; int nu2r, nw2r; double **frho,**rhor,**z2r; double **u2r, **w2r; int *type2frho,**type2rhor,**type2z2r; int **type2u2r,**type2w2r; // potentials in spline form used for force computation double dr,rdr,drho,rdrho; double ***rhor_spline,***frho_spline,***z2r_spline; double ***u2r_spline, ***w2r_spline; // potentials as file data int *map; // which element each atom type maps to struct Setfl { char **elements; int nelements,nrho,nr; double drho,dr,cut; double *mass; double **frho,**rhor,***z2r; double ***u2r, ***w2r; }; Setfl *setfl; void allocate(); void array2spline(); void interpolate(int, double, double *, double **); void grab(FILE *, int, double *); void read_file(char *); void file2array(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. E: No matching element in ADP potential file -UNDOCUMENTED +The ADP potential file does not contain elements that match the +requested elements. E: Cannot open ADP potential file %s -UNDOCUMENTED +The specified ADP potential file cannot be opened. Check that the +path and name are correct. E: Incorrect element names in ADP potential file -UNDOCUMENTED +The element names in the ADP file do not match those requested. */ diff --git a/src/MOLECULE/bond_fene.h b/src/MOLECULE/bond_fene.h index 90ad2d59e..2ae9ded07 100644 --- a/src/MOLECULE/bond_fene.h +++ b/src/MOLECULE/bond_fene.h @@ -1,77 +1,77 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef BOND_CLASS BondStyle(fene,BondFENE) #else #ifndef LMP_BOND_FENE_H #define LMP_BOND_FENE_H #include "stdio.h" #include "bond.h" namespace LAMMPS_NS { class BondFENE : public Bond { public: BondFENE(class LAMMPS *); virtual ~BondFENE(); virtual void compute(int, int); void coeff(int, char **); void init_style(); double equilibrium_distance(int); void write_restart(FILE *); void read_restart(FILE *); double single(int, double, int, int); protected: double TWO_1_3; double *k,*r0,*epsilon,*sigma; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: W: FENE bond too long: %ld %d %d %g A FENE bond has stretched dangerously far. It's interaction strength -will be truncated to attempt to prevent the bond from blowing up. :dd +will be truncated to attempt to prevent the bond from blowing up. E: Bad FENE bond Two atoms in a FENE bond have become so far apart that the bond cannot be computed. E: Incorrect args for bond coefficients Self-explanatory. Check the input script or data file. W: Use special bonds = 0,1,1 with bond style fene Most FENE models need this setting for the special_bonds command. W: FENE bond too long: %ld %g A FENE bond has stretched dangerously far. It's interaction strength -will be truncated to attempt to prevent the bond from blowing up. :dd +will be truncated to attempt to prevent the bond from blowing up. */ diff --git a/src/MOLECULE/bond_fene_expand.h b/src/MOLECULE/bond_fene_expand.h index 9a79f7a52..80d246284 100644 --- a/src/MOLECULE/bond_fene_expand.h +++ b/src/MOLECULE/bond_fene_expand.h @@ -1,77 +1,77 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef BOND_CLASS BondStyle(fene/expand,BondFENEExpand) #else #ifndef LMP_BOND_FENE_EXPAND_H #define LMP_BOND_FENE_EXPAND_H #include "stdio.h" #include "bond.h" namespace LAMMPS_NS { class BondFENEExpand : public Bond { public: BondFENEExpand(class LAMMPS *); virtual ~BondFENEExpand(); virtual void compute(int, int); void coeff(int, char **); void init_style(); double equilibrium_distance(int); void write_restart(FILE *); void read_restart(FILE *); double single(int, double, int, int); protected: double TWO_1_3; double *k,*r0,*epsilon,*sigma,*shift; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: W: FENE bond too long: %ld %d %d %g A FENE bond has stretched dangerously far. It's interaction strength -will be truncated to attempt to prevent the bond from blowing up. :dd +will be truncated to attempt to prevent the bond from blowing up. E: Bad FENE bond Two atoms in a FENE bond have become so far apart that the bond cannot be computed. E: Incorrect args for bond coefficients Self-explanatory. Check the input script or data file. W: Use special bonds = 0,1,1 with bond style fene/expand Most FENE models need this setting for the special_bonds command. W: FENE bond too long: %ld %g A FENE bond has stretched dangerously far. It's interaction strength -will be truncated to attempt to prevent the bond from blowing up. :dd +will be truncated to attempt to prevent the bond from blowing up. */ diff --git a/src/MOLECULE/dihedral_charmm.h b/src/MOLECULE/dihedral_charmm.h index 905c650e7..697c926db 100644 --- a/src/MOLECULE/dihedral_charmm.h +++ b/src/MOLECULE/dihedral_charmm.h @@ -1,76 +1,76 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef DIHEDRAL_CLASS DihedralStyle(charmm,DihedralCharmm) #else #ifndef LMP_DIHEDRAL_CHARMM_H #define LMP_DIHEDRAL_CHARMM_H #include "stdio.h" #include "dihedral.h" namespace LAMMPS_NS { class DihedralCharmm : public Dihedral { public: DihedralCharmm(class LAMMPS *); virtual ~DihedralCharmm(); virtual void compute(int, int); void coeff(int, char **); void init_style(); void write_restart(FILE *); void read_restart(FILE *); protected: double *k,*weight,*cos_shift,*sin_shift; int *multiplicity,*shift; double **lj14_1,**lj14_2,**lj14_3,**lj14_4; int implicit,weightflag; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: W: Dihedral problem: %d %ld %d %d %d %d Conformation of the 4 listed dihedral atoms is extreme; you may want -to check your simulation geometry. :dd +to check your simulation geometry. E: Incorrect args for dihedral coefficients Self-explanatory. Check the input script or data file. E: Incorrect multiplicity arg for dihedral coefficients Self-explanatory. Check the input script or data file. E: Incorrect weight arg for dihedral coefficients Self-explanatory. Check the input script or data file. E: Dihedral charmm is incompatible with Pair style Dihedral style charmm must be used with a pair style charmm in order for the 1-4 epsilon/sigma parameters to be defined. */ diff --git a/src/MOLECULE/dihedral_harmonic.h b/src/MOLECULE/dihedral_harmonic.h index bf7f04b58..c941147ea 100644 --- a/src/MOLECULE/dihedral_harmonic.h +++ b/src/MOLECULE/dihedral_harmonic.h @@ -1,68 +1,68 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef DIHEDRAL_CLASS DihedralStyle(harmonic,DihedralHarmonic) #else #ifndef LMP_DIHEDRAL_HARMONIC_H #define LMP_DIHEDRAL_HARMONIC_H #include "stdio.h" #include "dihedral.h" namespace LAMMPS_NS { class DihedralHarmonic : public Dihedral { public: DihedralHarmonic(class LAMMPS *); virtual ~DihedralHarmonic(); virtual void compute(int, int); void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); protected: double *k,*cos_shift,*sin_shift; int *sign,*multiplicity; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: W: Dihedral problem: %d %ld %d %d %d %d Conformation of the 4 listed dihedral atoms is extreme; you may want -to check your simulation geometry. :dd +to check your simulation geometry. E: Incorrect args for dihedral coefficients Self-explanatory. Check the input script or data file. E: Incorrect sign arg for dihedral coefficients Self-explanatory. Check the input script or data file. E: Incorrect multiplicity arg for dihedral coefficients Self-explanatory. Check the input script or data file. */ diff --git a/src/MOLECULE/dihedral_helix.h b/src/MOLECULE/dihedral_helix.h index efebb3f57..d5f803287 100644 --- a/src/MOLECULE/dihedral_helix.h +++ b/src/MOLECULE/dihedral_helix.h @@ -1,59 +1,59 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef DIHEDRAL_CLASS DihedralStyle(helix,DihedralHelix) #else #ifndef LMP_DIHEDRAL_HELIX_H #define LMP_DIHEDRAL_HELIX_H #include "stdio.h" #include "dihedral.h" namespace LAMMPS_NS { class DihedralHelix : public Dihedral { public: DihedralHelix(class LAMMPS *); virtual ~DihedralHelix(); virtual void compute(int, int); void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); protected: double *aphi,*bphi,*cphi; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: W: Dihedral problem: %d %ld %d %d %d %d Conformation of the 4 listed dihedral atoms is extreme; you may want -to check your simulation geometry. :dd +to check your simulation geometry. E: Incorrect args for dihedral coefficients Self-explanatory. Check the input script or data file. */ diff --git a/src/MOLECULE/dihedral_multi_harmonic.h b/src/MOLECULE/dihedral_multi_harmonic.h index 8d283f693..d3bc7678c 100644 --- a/src/MOLECULE/dihedral_multi_harmonic.h +++ b/src/MOLECULE/dihedral_multi_harmonic.h @@ -1,59 +1,59 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef DIHEDRAL_CLASS DihedralStyle(multi/harmonic,DihedralMultiHarmonic) #else #ifndef LMP_DIHEDRAL_MULTI_HARMONIC_H #define LMP_DIHEDRAL_MULTI_HARMONIC_H #include "stdio.h" #include "dihedral.h" namespace LAMMPS_NS { class DihedralMultiHarmonic : public Dihedral { public: DihedralMultiHarmonic(class LAMMPS *); virtual ~DihedralMultiHarmonic(); virtual void compute(int, int); void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); protected: double *a1,*a2,*a3,*a4,*a5; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: W: Dihedral problem: %d %ld %d %d %d %d Conformation of the 4 listed dihedral atoms is extreme; you may want -to check your simulation geometry. :dd +to check your simulation geometry. E: Incorrect args for dihedral coefficients Self-explanatory. Check the input script or data file. */ diff --git a/src/MOLECULE/dihedral_opls.h b/src/MOLECULE/dihedral_opls.h index f32027da8..81c9bca3c 100644 --- a/src/MOLECULE/dihedral_opls.h +++ b/src/MOLECULE/dihedral_opls.h @@ -1,59 +1,59 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef DIHEDRAL_CLASS DihedralStyle(opls,DihedralOPLS) #else #ifndef LMP_DIHEDRAL_OPLS_H #define LMP_DIHEDRAL_OPLS_H #include "stdio.h" #include "dihedral.h" namespace LAMMPS_NS { class DihedralOPLS : public Dihedral { public: DihedralOPLS(class LAMMPS *); virtual ~DihedralOPLS(); virtual void compute(int, int); void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); protected: double *k1,*k2,*k3,*k4; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: W: Dihedral problem: %d %ld %d %d %d %d Conformation of the 4 listed dihedral atoms is extreme; you may want -to check your simulation geometry. :dd +to check your simulation geometry. E: Incorrect args for dihedral coefficients Self-explanatory. Check the input script or data file. */ diff --git a/src/MOLECULE/improper_cvff.h b/src/MOLECULE/improper_cvff.h index 595350501..d52f3abeb 100644 --- a/src/MOLECULE/improper_cvff.h +++ b/src/MOLECULE/improper_cvff.h @@ -1,60 +1,60 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef IMPROPER_CLASS ImproperStyle(cvff,ImproperCvff) #else #ifndef LMP_IMPROPER_CVFF_H #define LMP_IMPROPER_CVFF_H #include "stdio.h" #include "improper.h" namespace LAMMPS_NS { class ImproperCvff : public Improper { public: ImproperCvff(class LAMMPS *); virtual ~ImproperCvff(); virtual void compute(int, int); void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); protected: double *k; int *sign,*multiplicity; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: W: Improper problem: %d %ld %d %d %d %d Conformation of the 4 listed improper atoms is extreme; you may want -to check your simulation geometry. :dd +to check your simulation geometry. E: Incorrect args for improper coefficients Self-explanatory. Check the input script or data file. */ diff --git a/src/MOLECULE/improper_harmonic.h b/src/MOLECULE/improper_harmonic.h index 37e72eba2..32a59e545 100644 --- a/src/MOLECULE/improper_harmonic.h +++ b/src/MOLECULE/improper_harmonic.h @@ -1,59 +1,59 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef IMPROPER_CLASS ImproperStyle(harmonic,ImproperHarmonic) #else #ifndef LMP_IMPROPER_HARMONIC_H #define LMP_IMPROPER_HARMONIC_H #include "stdio.h" #include "improper.h" namespace LAMMPS_NS { class ImproperHarmonic : public Improper { public: ImproperHarmonic(class LAMMPS *); virtual ~ImproperHarmonic(); virtual void compute(int, int); void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); protected: double *k,*chi; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: W: Improper problem: %d %ld %d %d %d %d Conformation of the 4 listed improper atoms is extreme; you may want -to check your simulation geometry. :dd +to check your simulation geometry. E: Incorrect args for improper coefficients Self-explanatory. Check the input script or data file. */ diff --git a/src/MOLECULE/improper_umbrella.h b/src/MOLECULE/improper_umbrella.h index f3c7809e3..72685313b 100644 --- a/src/MOLECULE/improper_umbrella.h +++ b/src/MOLECULE/improper_umbrella.h @@ -1,59 +1,59 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef IMPROPER_CLASS ImproperStyle(umbrella,ImproperUmbrella) #else #ifndef LMP_IMPROPER_UMBRELLA_H #define LMP_IMPROPER_UMBRELLA_H #include "stdio.h" #include "improper.h" namespace LAMMPS_NS { class ImproperUmbrella : public Improper { public: ImproperUmbrella(class LAMMPS *); virtual ~ImproperUmbrella(); virtual void compute(int, int); void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); protected: double *kw, *w0, *C; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: W: Improper problem: %d %ld %d %d %d %d Conformation of the 4 listed improper atoms is extreme; you may want -to check your simulation geometry. :dd +to check your simulation geometry. E: Incorrect args for improper coefficients Self-explanatory. Check the input script or data file. */ diff --git a/src/PERI/pair_peri_lps.h b/src/PERI/pair_peri_lps.h index bb5aefb84..a1a50f329 100644 --- a/src/PERI/pair_peri_lps.h +++ b/src/PERI/pair_peri_lps.h @@ -1,110 +1,110 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(peri/lps,PairPeriLPS) #else #ifndef LMP_PAIR_PERI_LPS_H #define LMP_PAIR_PERI_LPS_H #include "pair.h" namespace LAMMPS_NS { class PairPeriLPS : public Pair { public: PairPeriLPS(class LAMMPS *); virtual ~PairPeriLPS(); int pack_comm(int, int *, double *, int, int *); void unpack_comm(int, int, double *); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); double init_one(int, int); void init_style(); void write_restart(FILE *); void read_restart(FILE *); void write_restart_settings(FILE *) {} void read_restart_settings(FILE *) {} double single(int, int, int, int, double, double, double, double &); double memory_usage(); double influence_function(double, double, double); void compute_dilatation(); protected: int ifix_peri; double **bulkmodulus; double **shearmodulus; double **s00, **alpha; double **cut; double *s0_new; double *theta; int nmax; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. E: All pair coeffs are not set All pair coefficients must be set in the data file or by the pair_coeff command before running a simulation. E: Pair style peri requires atom style peri -UNDOCUMENTED +Self-explanatory. E: Pair peri requires an atom map, see atom_modify Even for atomic systems, an atom map is required to find Peridynamic bonds. Use the atom_modify command to define one. E: Pair peri requires a lattice be defined Use the lattice command for this purpose. E: Pair peri lattice is not identical in x, y, and z The lattice defined by the lattice command must be cubic. E: Fix peri neigh does not exist Somehow a fix that the pair style defines has been deleted. E: Divide by 0 in influence function of pair peri/lps This should not normally occur. It is likely a problem with your model. */ diff --git a/src/PERI/pair_peri_pmb.h b/src/PERI/pair_peri_pmb.h index 628aaaaaa..1b3eab736 100644 --- a/src/PERI/pair_peri_pmb.h +++ b/src/PERI/pair_peri_pmb.h @@ -1,98 +1,98 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(peri/pmb,PairPeriPMB) #else #ifndef LMP_PAIR_PERI_PMB_H #define LMP_PAIR_PERI_PMB_H #include "pair.h" namespace LAMMPS_NS { class PairPeriPMB : public Pair { public: PairPeriPMB(class LAMMPS *); virtual ~PairPeriPMB(); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); double init_one(int, int); void init_style(); void write_restart(FILE *); void read_restart(FILE *); void write_restart_settings(FILE *) {} void read_restart_settings(FILE *) {} double single(int, int, int, int, double, double, double, double &); virtual double memory_usage(); protected: int ifix_peri; double **kspring; double **s00, **alpha; double **cut; double *s0_new; int nmax; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. E: All pair coeffs are not set All pair coefficients must be set in the data file or by the pair_coeff command before running a simulation. E: Pair style peri requires atom style peri -UNDOCUMENTED +Self-explanatory. E: Pair peri requires an atom map, see atom_modify Even for atomic systems, an atom map is required to find Peridynamic bonds. Use the atom_modify command to define one. E: Pair peri requires a lattice be defined Use the lattice command for this purpose. E: Pair peri lattice is not identical in x, y, and z The lattice defined by the lattice command must be cubic. E: Fix peri neigh does not exist Somehow a fix that the pair style defines has been deleted. */ diff --git a/src/REPLICA/neb.h b/src/REPLICA/neb.h index f89bea865..e34884d09 100644 --- a/src/REPLICA/neb.h +++ b/src/REPLICA/neb.h @@ -1,125 +1,125 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMMAND_CLASS CommandStyle(neb,NEB) #else #ifndef LMP_NEB_H #define LMP_NEB_H #include "stdio.h" #include "pointers.h" namespace LAMMPS_NS { class NEB : protected Pointers { public: NEB(class LAMMPS *); NEB(class LAMMPS *, double, double, int, int, int, double *, double *); ~NEB(); void command(int, char **); // process neb command void run(); // run NEB double ebf,ebr; // forward and reverse energy barriers private: int me,me_universe; // my proc ID in world and universe int ireplica,nreplica; MPI_Comm uworld; MPI_Comm roots; // MPI comm with 1 root proc from each world FILE *fp; int compressed; double etol; // energy tolerance convergence criterion double ftol; // force tolerance convergence criterion int n1steps, n2steps; // number of steps in stage 1 and 2 int nevery; // output interval char *infile; // name of file containing final state class FixNEB *fneb; int nall; // per-replica dimension of array all double **all; // PE,plen,nlen,gradvnorm from each replica double *rdist; // normalize reaction distance, 0 to 1 void readfile(char *); void open(char *); void print_status(); }; } #endif #endif /* ERROR/WARNING messages: E: NEB command before simulation box is defined Self-explanatory. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Cannot use NEB with a single replica Self-explanatory. E: Can only use NEB with 1-processor replicas This is current restriction for NEB as implemented in LAMMPS. E: Cannot use NEB with atom_modify sort enabled This is current restriction for NEB implemented in LAMMPS. E: Cannot use NEB unless atom map exists Use the atom_modify command to create an atom map. E: NEB requires use of fix neb Self-explanatory. E: NEB requires damped dynamics minimizer Use a different minimization style. E: Too many timesteps for NEB You must use a number of timesteps that fit in a 32-bit integer for NEB. E: Too many timesteps -UNDOCUMENTED +The cummulative timesteps must fit in a 64-bit integer. E: Incorrect format in NEB coordinate file Self-explanatory. E: Cannot open gzipped file LAMMPS is attempting to open a gzipped version of the specified file but was unsuccessful. Check that the path and name are correct. E: Cannot open file %s The specified file cannot be opened. Check that the path and name are correct. */ diff --git a/src/REPLICA/prd.h b/src/REPLICA/prd.h index 96314aa0d..5eaa18632 100644 --- a/src/REPLICA/prd.h +++ b/src/REPLICA/prd.h @@ -1,143 +1,143 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMMAND_CLASS CommandStyle(prd,PRD) #else #ifndef LMP_PRD_H #define LMP_PRD_H #include "pointers.h" namespace LAMMPS_NS { class PRD : protected Pointers { public: PRD(class LAMMPS *); ~PRD() {} void command(int, char **); private: int me,nprocs; int nsteps,t_event,n_dephase,t_dephase,t_corr; double etol,ftol,temp_dephase; int maxiter,maxeval,temp_flag; char *loop_setting,*dist_setting; int equal_size_replicas,natoms; int neigh_every,neigh_delay,neigh_dist_check; int nbuild,ndanger; int quench_reneighbor; double time_dephase,time_dynamics,time_quench,time_comm,time_output; double time_start; MPI_Comm comm_replica; int *tagall,*displacements,*imageall; double **xall; int ncoincident; class RanPark *random_select; class RanMars *random_dephase; class Compute *compute_event; class FixEventPRD *fix_event; class Velocity *velocity; class Compute *temperature; class Finish *finish; void dephase(); void dynamics(); void quench(); int check_event(int replica = -1); void share_event(int, int); void log_event(); void replicate(int); void options(int, char **); }; } #endif #endif /* ERROR/WARNING messages: E: PRD command before simulation box is defined The prd command cannot be used before a read_data, read_restart, or create_box command. E: Cannot use PRD with multi-processor replicas unless atom map exists Use the atom_modify command to create an atom map. W: Running PRD with only one replica This is allowed, but you will get no parallel speed-up. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Invalid t_event in prd command Self-explanatory. E: PRD nsteps must be multiple of t_event Self-explanatory. E: PRD t_corr must be multiple of t_event Self-explanatory. E: Could not find compute ID for PRD Self-explanatory. W: Resetting reneighboring criteria during PRD A PRD simulation requires that neigh_modify settings be delay = 0, every = 1, check = yes. Since these settings were not in place, LAMMPS changed them and will restore them to their original values after the PRD simulation. E: Too many timesteps -UNDOCUMENTED +The cummulative timesteps must fit in a 64-bit integer. E: Cannot use PRD with a time-dependent fix defined PRD alters the timestep in ways that will mess up these fixes. E: Cannot use PRD with a time-dependent region defined PRD alters the timestep in ways that will mess up these regions. E: Cannot use PRD with atom_modify sort enabled This is a current restriction of PRD. You must turn off sorting, which is enabled by default, via the atom_modify command. E: Too many iterations You must use a number of iterations that fit in a 32-bit integer for minimization. */ diff --git a/src/REPLICA/tad.h b/src/REPLICA/tad.h index ec6cc2959..de7123321 100644 --- a/src/REPLICA/tad.h +++ b/src/REPLICA/tad.h @@ -1,154 +1,154 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMMAND_CLASS CommandStyle(tad,TAD) #else #ifndef LMP_TAD_H #define LMP_TAD_H #include "pointers.h" namespace LAMMPS_NS { class TAD : protected Pointers { public: TAD(class LAMMPS *); ~TAD(); void command(int, char **); private: int me,nprocs; int nsteps,t_event; double templo,temphi,delta_conf,tmax; double etol,ftol,etol_neb,ftol_neb; int maxiter,maxeval,n1steps_neb,n2steps_neb,nevery_neb; char *min_style, *min_style_neb; double delta_beta,ratio_beta; double deltconf,deltstop,deltfirst; // Times since last event int event_first; int neigh_every,neigh_delay,neigh_dist_check; int nbuild,ndanger; int quench_reneighbor; double time_dynamics,time_quench,time_neb,time_comm,time_output; double time_start; class NEB *neb; // NEB object class Fix *fix_neb; // FixNEB object class Compute *compute_event; // compute to detect event class FixEventTAD *fix_event; // current event/state class FixStoreState *fix_revert; // revert state FixEventTAD **fix_event_list; // list of possible events int n_event_list; // number of events int nmax_event_list; // allocated events int nmin_event_list; // minimum allocation char *neb_logfilename; // filename for ulogfile_neb FILE *uscreen_neb; // neb universe screen output FILE *ulogfile_neb; // neb universe logfile FILE *uscreen_lammps; // lammps universe screen output FILE *ulogfile_lammps; // lammps universe logfile class Finish *finish; void dynamics(); void quench(); int check_event(); int check_confidence(); void perform_neb(int); void log_event(int); void options(int, char **); void revert(); void add_event(); void perform_event(int); void compute_tlo(int); void grow_event_list(int); void initialize_event_list(); void delete_event_list(); }; } #endif #endif /* ERROR/WARNING messages: E: Tad command before simulation box is defined Self-explanatory. E: Cannot use TAD with a single replica for NEB NEB requires multiple replicas. E: Can only use TAD with 1-processor replicas for NEB This is current restriction for NEB as implemented in LAMMPS. E: Cannot use TAD with atom_modify sort enabled for NEB This is a current restriction of NEB. E: Cannot use TAD unless atom map exists for NEB See atom_modify map command to set this. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Invalid t_event in tad command The value must be greater than 0. E: TAD nsteps must be multiple of t_event Self-explanatory. E: Invalid delta_conf in tad command The value must be between 0 and 1 inclusive. E: Invalid tmax in tad command The value must be greater than 0.0. E: Could not find compute ID for TAD Self-explanatory. W: Resetting reneighboring criteria during TAD A TAD simulation requires that neigh_modify settings be delay = 0, every = 1, check = yes. Since these settings were not in place, LAMMPS changed them and will restore them to their original values after the PRD simulation. E: Too many timesteps -UNDOCUMENTED +The cummulative timesteps must fit in a 64-bit integer. E: Too many iterations You must use a number of iterations that fit in a 32-bit integer for minimization. */ diff --git a/src/REPLICA/temper.h b/src/REPLICA/temper.h index aa588befd..b0f4015fd 100644 --- a/src/REPLICA/temper.h +++ b/src/REPLICA/temper.h @@ -1,106 +1,106 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMMAND_CLASS CommandStyle(temper,Temper) #else #ifndef LMP_TEMPER_H #define LMP_TEMPER_H #include "pointers.h" namespace LAMMPS_NS { class Temper : protected Pointers { public: Temper(class LAMMPS *); ~Temper(); void command(int, char **); private: int me,me_universe; // my proc ID in world and universe int iworld,nworlds; // world info double boltz; // copy from output->boltz MPI_Comm roots; // MPI comm with 1 root proc from each world class RanPark *ranswap,*ranboltz; // RNGs for swapping and Boltz factor int nevery; // # of timesteps between swaps int nswaps; // # of tempering swaps to perform int seed_swap; // 0 = toggle swaps, n = RNG for swap direction int seed_boltz; // seed for Boltz factor comparison int whichfix; // index of temperature fix to use int fixstyle; // what kind of temperature fix is used int my_set_temp; // which set temp I am simulating double *set_temp; // static list of replica set temperatures int *temp2world; // temp2world[i] = world simulating set temp i int *world2temp; // world2temp[i] = temp simulated by world i int *world2root; // world2root[i] = root proc of world i void scale_velocities(int, int); void print_status(); }; } #endif #endif /* ERROR/WARNING messages: E: Must have more than one processor partition to temper Cannot use the temper command with only one processor partition. Use the -partition command-line option. E: Temper command before simulation box is defined The temper command cannot be used before a read_data, read_restart, or create_box command. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Tempering fix ID is not defined The fix ID specified by the temper command does not exist. E: Invalid frequency in temper command Nevery must be > 0. E: Non integer # of swaps in temper command Swap frequency in temper command must evenly divide the total # of timesteps. E: Tempering temperature fix is not valid The fix specified by the temper command is not one that controls temperature (nvt or langevin). E: Too many timesteps -UNDOCUMENTED +The cummulative timesteps must fit in a 64-bit integer. E: Tempering could not find thermo_pe compute This compute is created by the thermo command. It must have been explicitly deleted by a uncompute command. */ diff --git a/src/REPLICA/verlet_split.h b/src/REPLICA/verlet_split.h index 9328dd690..3acbae19f 100644 --- a/src/REPLICA/verlet_split.h +++ b/src/REPLICA/verlet_split.h @@ -1,74 +1,76 @@ /* -*- c++ -*- ------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef INTEGRATE_CLASS IntegrateStyle(verlet/split,VerletSplit) #else #ifndef LMP_VERLET_SPLIT_H #define LMP_VERLET_SPLIT_H #include "verlet.h" namespace LAMMPS_NS { class VerletSplit : public Verlet { public: VerletSplit(class LAMMPS *, int, char **); ~VerletSplit(); void init(); void run(int); bigint memory_usage(); private: int master; // 1 if an Rspace proc, 0 if Kspace int me_block; // proc ID within Rspace/Kspace block int ratio; // ratio of Rspace procs to Kspace procs int *qsize,*qdisp,*xsize,*xdisp; // MPI gather/scatter params for block comm MPI_Comm block; // communicator within one block int tip4p_flag; // 1 if PPPM/tip4p so do extra comm double **f_kspace; // copy of Kspace forces on Rspace procs int maxatom; void rk_setup(); void r2k_comm(); void k2r_comm(); }; } #endif #endif /* ERROR/WARNING messages: E: Verlet/split requires 2 partitions -UNDOCUMENTED +See the -partition command-line switch. E: Verlet/split requires Rspace partition size be multiple of Kspace partition size -UNDOCUMENTED +This is so there is an equal number of Rspace processors for every +Kspace processor. E: Verlet/split requires Rspace partition layout be multiple of Kspace partition layout in each dim -UNDOCUMENTED +This is controlled by the processors command. W: No Kspace calculation with verlet/split -UNDOCUMENTED +The 2nd partition performs a kspace calculation so the kspace_style +command must be used. */ diff --git a/src/SHOCK/fix_append_atoms.cpp b/src/SHOCK/fix_append_atoms.cpp index b2bd280db..c68cd6e69 100644 --- a/src/SHOCK/fix_append_atoms.cpp +++ b/src/SHOCK/fix_append_atoms.cpp @@ -1,496 +1,496 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #include "math.h" #include "string.h" #include "stdlib.h" #include "fix_append_atoms.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" #include "modify.h" #include "domain.h" #include "lattice.h" #include "update.h" #include "random_mars.h" #include "error.h" #include "force.h" using namespace LAMMPS_NS; using namespace FixConst; #define BIG 1.0e30 #define EPSILON 1.0e-6 /* ---------------------------------------------------------------------- */ FixAppendAtoms::FixAppendAtoms(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { force_reneighbor = 1; next_reneighbor = -1; box_change = 1; time_depend = 1; - if (narg < 4) error->all(FLERR,"Illegal fix append_atoms command"); + if (narg < 4) error->all(FLERR,"Illegal fix append/atoms command"); // default settings scaleflag = 1; spatflag=0; xloflag = xhiflag = yloflag = yhiflag = zloflag = zhiflag = 0; tempflag = 0; ranflag = 0; ranx = 0.0; rany = 0.0; ranz = 0.0; randomx = NULL; randomt = NULL; int iarg = 0; iarg = 3; while (iarg < narg) { if (strcmp(arg[iarg],"xlo") == 0) { - error->all(FLERR,"Only zhi currently implemented for append_atoms"); + error->all(FLERR,"Only zhi currently implemented for fix append/atoms"); xloflag = 1; iarg++; if (domain->boundary[0][0] != 3) error->all(FLERR,"Append boundary must be shrink/minimum"); } else if (strcmp(arg[iarg],"xhi") == 0) { - error->all(FLERR,"Only zhi currently implemented for append_atoms"); + error->all(FLERR,"Only zhi currently implemented for fix append/atoms"); xhiflag = 1; iarg++; if (domain->boundary[0][1] != 3) error->all(FLERR,"Append boundary must be shrink/minimum"); } else if (strcmp(arg[iarg],"ylo") == 0) { - error->all(FLERR,"Only zhi currently implemented for append_atom"); + error->all(FLERR,"Only zhi currently implemented for fix append/atoms"); yloflag = 1; iarg++; if (domain->boundary[1][0] != 3) error->all(FLERR,"Append boundary must be shrink/minimum"); } else if (strcmp(arg[iarg],"yhi") == 0) { - error->all(FLERR,"Only zhi currently implemented for append_atom"); + error->all(FLERR,"Only zhi currently implemented for fix append/atoms"); yhiflag = 1; iarg++; if (domain->boundary[1][1] != 3) error->all(FLERR,"Append boundary must be shrink/minimum"); } else if (strcmp(arg[iarg],"zlo") == 0) { - error->all(FLERR,"Only zhi currently implemented for append_atom"); + error->all(FLERR,"Only zhi currently implemented for fix append/atoms"); zloflag = 1; iarg++; if (domain->boundary[2][0] != 3) error->all(FLERR,"Append boundary must be shrink/minimum"); } else if (strcmp(arg[iarg],"zhi") == 0) { zhiflag = 1; iarg++; if (domain->boundary[2][1] != 3) error->all(FLERR,"Append boundary must be shrink/minimum"); } else if (strcmp(arg[iarg],"freq") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal fix append_atoms command"); + if (iarg+2 > narg) error->all(FLERR,"Illegal fix append/atoms command"); freq = atoi(arg[iarg+1]); iarg += 2; } else if (strcmp(arg[iarg],"spatial") == 0) { - if (iarg+3 > narg) error->all(FLERR,"Illegal fix append_atoms command"); + if (iarg+3 > narg) error->all(FLERR,"Illegal fix append/atoms command"); if (strcmp(arg[iarg+1],"f_") == 0) error->all(FLERR, - "Bad fix ID in fix append_atoms command"); + "Bad fix ID in fix append/atoms command"); spatflag = 1; int n = strlen(arg[iarg+1]); spatlead = atof(arg[iarg+2]); char *suffix = new char[n]; strcpy(suffix,&arg[iarg+1][2]); n = strlen(suffix) + 1; spatialid = new char[n]; strcpy(spatialid,suffix); delete [] suffix; iarg += 3; } else if (strcmp(arg[iarg],"size") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal fix append_atoms command"); + if (iarg+2 > narg) error->all(FLERR,"Illegal fix append/atoms command"); size = atof(arg[iarg+1]); iarg += 2; } else if (strcmp(arg[iarg],"units") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal fix append_atoms command"); + if (iarg+2 > narg) error->all(FLERR,"Illegal fix append/atoms command"); if (strcmp(arg[iarg+1],"box") == 0) scaleflag = 0; else if (strcmp(arg[iarg+1],"lattice") == 0) scaleflag = 1; - else error->all(FLERR,"Illegal fix append_atoms command"); + else error->all(FLERR,"Illegal fix append/atoms command"); iarg += 2; } else if (strcmp(arg[iarg],"random") == 0) { - if (iarg+5 > narg) error->all(FLERR,"Illegal fix append_atoms command"); + if (iarg+5 > narg) error->all(FLERR,"Illegal fix append/atoms command"); ranflag = 1; ranx = atof(arg[iarg+1]); rany = atof(arg[iarg+2]); ranz = atof(arg[iarg+3]); xseed = atoi(arg[iarg+4]); - if (xseed <= 0) error->all(FLERR,"Illegal fix append_atoms command"); + if (xseed <= 0) error->all(FLERR,"Illegal fix append/atoms command"); randomx = new RanMars(lmp,xseed + comm->me); iarg += 5; } else if (strcmp(arg[iarg],"temp") == 0) { - if (iarg+5 > narg) error->all(FLERR,"Illegal fix append_atoms command"); + if (iarg+5 > narg) error->all(FLERR,"Illegal fix append/atoms command"); tempflag = 1; t_target = atof(arg[iarg+1]); t_period = atof(arg[iarg+2]); tseed = atoi(arg[iarg+3]); t_extent = atof(arg[iarg+4]); - if (t_target <= 0) error->all(FLERR,"Illegal fix append_atoms command"); - if (t_period <= 0) error->all(FLERR,"Illegal fix append_atoms command"); - if (t_extent <= 0) error->all(FLERR,"Illegal fix append_atoms command"); - if (tseed <= 0) error->all(FLERR,"Illegal fix append_atoms command"); + if (t_target <= 0) error->all(FLERR,"Illegal fix append/atoms command"); + if (t_period <= 0) error->all(FLERR,"Illegal fix append/atoms command"); + if (t_extent <= 0) error->all(FLERR,"Illegal fix append/atoms command"); + if (tseed <= 0) error->all(FLERR,"Illegal fix append/atoms command"); randomt = new RanMars(lmp,tseed + comm->me); gfactor1 = new double[atom->ntypes+1]; gfactor2 = new double[atom->ntypes+1]; iarg += 5; - } else error->all(FLERR,"Illegal fix append_atoms command"); + } else error->all(FLERR,"Illegal fix append/atoms command"); } if ((xloflag || xhiflag) && domain->xperiodic) - error->all(FLERR,"Cannot use append_atoms in periodic dimension"); + error->all(FLERR,"Cannot use append/atoms in periodic dimension"); if ((yloflag || yhiflag) && domain->yperiodic) - error->all(FLERR,"Cannot use append_atoms in periodic dimension"); + error->all(FLERR,"Cannot use append/atoms in periodic dimension"); if ((zloflag || zhiflag) && domain->zperiodic) - error->all(FLERR,"Cannot use append_atoms in periodic dimension"); + error->all(FLERR,"Cannot use append/atoms in periodic dimension"); if (domain->triclinic == 1) error->all(FLERR,"Cannot append atoms to a triclinic box"); // setup scaling if (scaleflag && domain->lattice == NULL) - error->all(FLERR,"Use of fix append_atoms with undefined lattice"); + error->all(FLERR,"Use of fix append/atoms with undefined lattice"); double xscale,yscale,zscale; if (scaleflag) { xscale = domain->lattice->xlattice; yscale = domain->lattice->ylattice; zscale = domain->lattice->zlattice; } else xscale = yscale = zscale = 1.0; if (xloflag || xhiflag) size *= xscale; if (yloflag || yhiflag) size *= yscale; if (zloflag || zhiflag) size *= zscale; if (ranflag) { ranx *= xscale; rany *= yscale; ranz *= zscale; } } /* ---------------------------------------------------------------------- */ FixAppendAtoms::~FixAppendAtoms() { if (ranflag) delete randomx; if (tempflag) { delete randomt; delete [] gfactor1; delete [] gfactor2; } } /* ---------------------------------------------------------------------- */ int FixAppendAtoms::setmask() { int mask = 0; mask |= PRE_EXCHANGE; mask |= INITIAL_INTEGRATE; mask |= POST_FORCE; return mask; } /* ---------------------------------------------------------------------- */ void FixAppendAtoms::initial_integrate(int vflag) { if (update->ntimestep % freq == 0) { next_reneighbor = update->ntimestep; } } /* ---------------------------------------------------------------------- */ void FixAppendAtoms::setup(int vflag) { /*** CALL TO CREATE GROUP? SEE POST_FORCE ***/ post_force(vflag); } /* ---------------------------------------------------------------------- */ int FixAppendAtoms::get_spatial() { if (update->ntimestep % freq == 0) { int ifix = modify->find_fix(spatialid); if (ifix < 0) error->all(FLERR,"Fix ID for fix ave/spatial does not exist"); Fix *fix = modify->fix[ifix]; int failed = 0; int count = 0; while (failed < 2) { double tmp = fix->compute_vector(2*count); if (tmp == 0.0) failed++; else failed = 0; count++; } double pos[count-2]; double val[count-2]; for (int loop=0; loop < count-2; loop++) { pos[loop] = fix->compute_vector(2*loop); val[loop] = fix->compute_vector(2*loop+1); } // Always ignore the first and last double binsize = 2.0; double min_energy=0.0; double max_energy=0.0; int header = static_cast<int> (size / binsize); advance = 0; for (int loop=1; loop <= header; loop++) { max_energy += val[loop]; } for (int loop=count-2-2*header; loop <=count-3-header; loop++) { min_energy += val[loop]; } max_energy /= header; min_energy /= header; double shockfront_min = 0.0; double shockfront_max = 0.0; double shockfront_loc = 0.0; int front_found1 = 0; for (int loop=count-3-header; loop > header; loop--) { if (front_found1 == 1) continue; if (val[loop] > min_energy + 0.1*(max_energy - min_energy)) { shockfront_max = pos[loop]; front_found1=1; } } int front_found2 = 0; for (int loop=header+1; loop <=count-3-header; loop++) { if (val[loop] > min_energy + 0.6*(max_energy - min_energy)) { shockfront_min = pos[loop]; front_found2=1; } } if (front_found1 + front_found2 == 0) shockfront_loc = 0.0; else if (front_found1 + front_found2 == 1) shockfront_loc = shockfront_max + shockfront_min; else if (front_found1 == 1 && front_found2 == 1 && shockfront_max-shockfront_min > spatlead/2.0) shockfront_loc = shockfront_max; else shockfront_loc = (shockfront_max + shockfront_min) / 2.0; if (comm->me == 0) printf("SHOCK: %g %g %g %g %g\n", shockfront_loc, shockfront_min, shockfront_max, domain->boxlo[2], domain->boxhi[2]); if (domain->boxhi[2] - shockfront_loc < spatlead) advance = 1; } advance_sum = 0; MPI_Allreduce(&advance,&advance_sum,1,MPI_INT,MPI_SUM,world); if (advance_sum > 0) return 1; else return 0; } /* ---------------------------------------------------------------------- */ void FixAppendAtoms::post_force(int vflag) { double **f = atom->f; double **v = atom->v; double **x = atom->x; int *type = atom->type; int nlocal = atom->nlocal; double gamma1,gamma2; double tsqrt = sqrt(t_target); if (atom->mass) { if (tempflag) { for (int i = 1; i <= atom->ntypes; i++) { gfactor1[i] = -atom->mass[i] / t_period / force->ftm2v; gfactor2[i] = sqrt(atom->mass[i]) * sqrt(24.0*force->boltz/t_period/update->dt/force->mvv2e) / force->ftm2v; } } for (int i = 0; i < nlocal; i++) { // SET TEMP AHEAD OF SHOCK if (tempflag && x[i][2] >= domain->boxhi[2] - t_extent ) { gamma1 = gfactor1[type[i]]; gamma2 = gfactor2[type[i]] * tsqrt; f[i][0] += gamma1*v[i][0] + gamma2*(randomt->uniform()-0.5); f[i][1] += gamma1*v[i][1] + gamma2*(randomt->uniform()-0.5); f[i][2] += gamma1*v[i][2] + gamma2*(randomt->uniform()-0.5); } // FREEZE ATOMS AT BOUNDARY if (x[i][2] >= domain->boxhi[2] - size) { f[i][0] = 0.0; f[i][1] = 0.0; f[i][2] = 0.0; v[i][0] = 0.0; v[i][1] = 0.0; v[i][2] = 0.0; } } } else { double *rmass = atom->rmass; double boltz = force->boltz; double dt = update->dt; double mvv2e = force->mvv2e; double ftm2v = force->ftm2v; for (int i = 0; i < nlocal; i++) { // set temp ahead of shock if (tempflag && x[i][2] >= domain->boxhi[2] - t_extent ) { gamma1 = -rmass[i] / t_period / ftm2v; gamma2 = sqrt(rmass[i]) * sqrt(24.0*boltz/t_period/dt/mvv2e) / ftm2v; gamma2 *= tsqrt; f[i][0] += gamma1*v[i][0] + gamma2*(randomt->uniform()-0.5); f[i][1] += gamma1*v[i][1] + gamma2*(randomt->uniform()-0.5); f[i][2] += gamma1*v[i][2] + gamma2*(randomt->uniform()-0.5); } // freeze atoms at boundary if (x[i][2] >= domain->boxhi[2] - size) { f[i][0] = 0.0; f[i][1] = 0.0; f[i][2] = 0.0; v[i][0] = 0.0; v[i][1] = 0.0; v[i][2] = 0.0; } } } } /* ---------------------------------------------------------------------- */ void FixAppendAtoms::pre_exchange() { int ntimestep = update->ntimestep; int addnode = 0; if (ntimestep % freq == 0) { if (spatflag==1) if (get_spatial()==0) return; if (comm->myloc[2] == comm->procgrid[2]-1) { if (domain->lattice) { nbasis = domain->lattice->nbasis; basistype = new int[nbasis]; for (int i = 0; i < nbasis; i++) basistype[i] = 1; - } else error->all(FLERR,"Must define lattice to append_atoms"); + } else error->all(FLERR,"Must define lattice to append/atoms"); double bboxlo[3],bboxhi[3]; bboxlo[0] = domain->sublo[0]; bboxhi[0] = domain->subhi[0]; bboxlo[1] = domain->sublo[1]; bboxhi[1] = domain->subhi[1]; bboxlo[2] = domain->subhi[2]; bboxhi[2] = domain->subhi[2]+size; double xmin,ymin,zmin,xmax,ymax,zmax; xmin = ymin = zmin = BIG; xmax = ymax = zmax = -BIG; domain->lattice->bbox(1,bboxlo[0],bboxlo[1],bboxlo[2], xmin,ymin,zmin,xmax,ymax,zmax); domain->lattice->bbox(1,bboxhi[0],bboxlo[1],bboxlo[2], xmin,ymin,zmin,xmax,ymax,zmax); domain->lattice->bbox(1,bboxlo[0],bboxhi[1],bboxlo[2], xmin,ymin,zmin,xmax,ymax,zmax); domain->lattice->bbox(1,bboxhi[0],bboxhi[1],bboxlo[2], xmin,ymin,zmin,xmax,ymax,zmax); domain->lattice->bbox(1,bboxlo[0],bboxlo[1],bboxhi[2], xmin,ymin,zmin,xmax,ymax,zmax); domain->lattice->bbox(1,bboxhi[0],bboxlo[1],bboxhi[2], xmin,ymin,zmin,xmax,ymax,zmax); domain->lattice->bbox(1,bboxlo[0],bboxhi[1],bboxhi[2], xmin,ymin,zmin,xmax,ymax,zmax); domain->lattice->bbox(1,bboxhi[0],bboxhi[1],bboxhi[2], xmin,ymin,zmin,xmax,ymax,zmax); int ilo,ihi,jlo,jhi,klo,khi; ilo = static_cast<int> (xmin); jlo = static_cast<int> (ymin); klo = static_cast<int> (zmin); ihi = static_cast<int> (xmax); jhi = static_cast<int> (ymax); khi = static_cast<int> (zmax); if (xmin < 0.0) ilo--; if (ymin < 0.0) jlo--; if (zmin < 0.0) klo--; double **basis = domain->lattice->basis; double x[3]; double *sublo = domain->sublo; double *subhi = domain->subhi; double *mass = atom->mass; int i,j,k,m; for (k = klo; k <= khi; k++) { for (j = jlo; j <= jhi; j++) { for (i = ilo; i <= ihi; i++) { for (m = 0; m < nbasis; m++) { x[0] = i + basis[m][0]; x[1] = j + basis[m][1]; x[2] = k + basis[m][2]; int flag = 0; // convert from lattice coords to box coords domain->lattice->lattice2box(x[0],x[1],x[2]); if (x[0] >= sublo[0] && x[0] < subhi[0] && x[1] >= sublo[1] && x[1] < subhi[1] && x[2] >= subhi[2] && x[2] < subhi[2]+size) flag = 1; else if (domain->dimension == 2 && x[1] >= domain->boxhi[1] && comm->myloc[1] == comm->procgrid[1]-1 && x[0] >= sublo[0] && x[0] < subhi[0]) flag = 1; if (flag) { if (ranflag) { x[0] += ranx * 2.0*(randomx->uniform()-0.5); x[1] += rany * 2.0*(randomx->uniform()-0.5); x[2] += ranz * 2.0*(randomx->uniform()-0.5); } addnode++; atom->avec->create_atom(basistype[m],x); } } } } } } int addtotal = 0; MPI_Barrier(world); MPI_Allreduce(&addnode,&addtotal,1,MPI_INT,MPI_SUM,world); if (addtotal) { domain->reset_box(); if (atom->tag_enable) { atom->tag_extend(); atom->natoms += addtotal; if (atom->map_style) { atom->nghost = 0; atom->map_init(); atom->map_set(); } } } } } diff --git a/src/SHOCK/fix_append_atoms.h b/src/SHOCK/fix_append_atoms.h index 15064d0fc..aaa8948d4 100644 --- a/src/SHOCK/fix_append_atoms.h +++ b/src/SHOCK/fix_append_atoms.h @@ -1,107 +1,102 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(append_atoms,FixAppendAtoms) #else #ifndef FIX_APPEND_ATOMS_H #define FIX_APPEND_ATOMS_H #include "fix.h" namespace LAMMPS_NS { class FixAppendAtoms : public Fix { public: FixAppendAtoms(class LAMMPS *, int, char **); ~FixAppendAtoms(); int setmask(); void setup(int); void pre_exchange(); void initial_integrate(int); void post_force(int); private: int get_spatial(); int spatflag, xloflag, xhiflag, yloflag, yhiflag, zloflag, zhiflag; int ranflag, tempflag, xseed, tseed; double ranx, rany, ranz, t_target, t_period, t_extent; class RanMars *randomx; class RanMars *randomt; int scaleflag, freq; int *basistype, nbasis; int advance, advance_sum; double size, spatlead; char *spatialid; double tfactor; double *gfactor1,*gfactor2; }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. -E: Only zhi currently implemented for append_atoms +E: Only zhi currently implemented for fix append/atoms -The face keyword must be zhi. +Self-explanatory. E: Append boundary must be shrink/minimum The boundary style of the face where atoms are added must be of type m (shrink/minimum). -E: Bad fix ID in fix append_atoms command +E: Bad fix ID in fix append/atoms command -The value of the fix_id for keyword spatial -must start with the suffix f_. +The value of the fix_id for keyword spatial must start with the suffix +f_. -E: Cannot use append_atoms in periodic dimension +E: Cannot use append/atoms in periodic dimension -The boundary style of the face where atoms are added -can not be of type p (periodic). +The boundary style of the face where atoms are added can not be of +type p (periodic). E: Cannot append atoms to a triclinic box -The simulation box must be defined with edges alligned -with the Cartesian axes. +The simulation box must be defined with edges alligned with the +Cartesian axes. -E: Use of fix append_atoms with undefined lattice +E: Use of fix append/atoms with undefined lattice A lattice must be defined before using this fix. E: Fix ID for fix ave/spatial does not exist -The fix_id value for the spatial keyword does -not correspond to any defined fix. +Self-explanatory. -E: Must define lattice to append_atoms +E: Must define lattice to append/atoms A lattice must be defined before using this fix. -U: must define lattice to append_atoms - -UNDOCUMENTED - */ diff --git a/src/SHOCK/fix_nphug.h b/src/SHOCK/fix_nphug.h index 39e931dfb..775c67ac2 100644 --- a/src/SHOCK/fix_nphug.h +++ b/src/SHOCK/fix_nphug.h @@ -1,96 +1,97 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(nphug,FixNPHug) #else #ifndef LMP_FIX_NPHUG_H #define LMP_FIX_NPHUG_H #include "fix_nh.h" namespace LAMMPS_NS { class FixNPHug : public FixNH { public: FixNPHug(class LAMMPS *, int, char **); ~FixNPHug(); void init(); void setup(int); int modify_param(int, char **); int pack_restart_data(double *); // pack restart data void restart(char *); private: class Compute *pe; // PE compute pointer void compute_temp_target(); double compute_vector(int); double compute_etotal(); double compute_vol(); double compute_hugoniot(); double compute_us(); double compute_up(); char *id_pe; int peflag; int v0_set,p0_set,e0_set; double v0,p0,e0,rho0; int idir; int uniaxial; int size_restart_global(); }; } #endif #endif /* ERROR/WARNING messages: E: Pstart and Pstop must have the same value -Self-explanatory +Self-explanatory. E: Specified target stress must be uniaxial or hydrostatic -Self-explanatory +Self-explanatory. E: For triclinic deformation, specified target stress must be hydrostatic Triclinic pressure control is allowed using the tri keyword, but non-hydrostatic pressure control can not be used in this case. E: Temperature control must be used with fix nphug The temp keyword must be provided. E: Pressure control must be used with fix nphug -A pressure control keyword (iso, aniso, tri, x, y, or z) must be provided. +A pressure control keyword (iso, aniso, tri, x, y, or z) must be +provided. E: Potential energy ID for fix nvt/nph/npt does not exist A compute for potential energy must be defined. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. */ diff --git a/src/SHOCK/fix_wall_piston.h b/src/SHOCK/fix_wall_piston.h index cf68e742f..5539fd00f 100644 --- a/src/SHOCK/fix_wall_piston.h +++ b/src/SHOCK/fix_wall_piston.h @@ -1,83 +1,81 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(wall/piston,FixWallPiston) #else #ifndef LMP_FIX_WALL_PISTON_H #define LMP_FIX_WALL_PISTON_H #include "fix.h" namespace LAMMPS_NS { class FixWallPiston : public Fix { public: FixWallPiston(class LAMMPS *, int, char **); int setmask(); void post_integrate(); void initial_integrate(int); private: int xloflag,xhiflag,yloflag,yhiflag,zloflag,zhiflag; int scaleflag, roughflag, rampflag, rampNL1flag, rampNL2flag, rampNL3flag, rampNL4flag, rampNL5flag; double roughdist,roughoff,x0,y0,z0,vx,vy,vz,maxvx,maxvy,maxvz,paccelx,paccely,paccelz, angfreq; int tempflag, tseed; double t_target, t_period, t_extent; class RanMars *randomt; double *gfactor1,*gfactor2; }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Fix wall/piston command only available at zlo The face keyword must be zlo. E: Must shrink-wrap piston boundary -The boundary style of the face where the piston is -applied must be of type s (shrink-wrapped). +The boundary style of the face where the piston is applied must be of +type s (shrink-wrapped). E: Illegal fix wall/piston velocity The piston velocity must be positive. E: Cannot use wall in periodic dimension -The boundary style of the face where atoms are added -can not be of type p (periodic). +Self-explanatory. E: Use of fix wall/piston with undefined lattice A lattice must be defined before using this fix. E: NL ramp in wall/piston only implemented in zlo for now -The ramp keyword can only be used for piston applied -to face zlo. +The ramp keyword can only be used for piston applied to face zlo. */ diff --git a/src/SRD/fix_srd.cpp b/src/SRD/fix_srd.cpp index d18f2bab9..7cbb604a4 100644 --- a/src/SRD/fix_srd.cpp +++ b/src/SRD/fix_srd.cpp @@ -1,3924 +1,3924 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- Contributing authors: Jeremy Lechman (SNL), Pieter in 't Veld (BASF) ------------------------------------------------------------------------- */ #include "math.h" #include "string.h" #include "stdlib.h" #include "fix_srd.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" #include "atom_vec_line.h" #include "atom_vec_tri.h" #include "group.h" #include "update.h" #include "force.h" #include "pair.h" #include "domain.h" #include "neighbor.h" #include "comm.h" #include "modify.h" #include "fix_deform.h" #include "fix_wall_srd.h" #include "random_mars.h" #include "random_park.h" #include "math_const.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; using namespace FixConst; using namespace MathConst; enum{SLIP,NOSLIP}; enum{SPHERE,ELLIPSOID,LINE,TRIANGLE,WALL}; enum{INSIDE_ERROR,INSIDE_WARN,INSIDE_IGNORE}; enum{BIG_MOVE,SRD_MOVE,SRD_ROTATE}; enum{CUBIC_ERROR,CUBIC_WARN}; enum{SHIFT_NO,SHIFT_YES,SHIFT_POSSIBLE}; enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp #define EINERTIA 0.2 // moment of inertia prefactor for ellipsoid #define ATOMPERBIN 30 #define BIG 1.0e20 #define VBINSIZE 5 #define TOLERANCE 0.00001 #define MAXITER 20 //#define SRD_DEBUG 1 //#define SRD_DEBUG_ATOMID 58 //#define SRD_DEBUG_TIMESTEP 449 /* ---------------------------------------------------------------------- */ FixSRD::FixSRD(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { if (narg < 8) error->all(FLERR,"Illegal fix srd command"); restart_pbc = 1; vector_flag = 1; size_vector = 12; global_freq = 1; extvector = 0; nevery = atoi(arg[3]); bigexist = 1; if (strcmp(arg[4],"NULL") == 0) bigexist = 0; else biggroup = group->find(arg[4]); temperature_srd = atof(arg[5]); gridsrd = atof(arg[6]); int seed = atoi(arg[7]); // parse options lamdaflag = 0; collidestyle = NOSLIP; overlap = 0; insideflag = INSIDE_ERROR; exactflag = 1; radfactor = 1.0; maxbounceallow = 0; gridsearch = gridsrd; cubicflag = CUBIC_ERROR; cubictol = 0.01; shiftuser = SHIFT_NO; shiftseed = 0; tstat = 0; int iarg = 8; while (iarg < narg) { if (strcmp(arg[iarg],"lamda") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix srd command"); lamda = atof(arg[iarg+1]); lamdaflag = 1; iarg += 2; } else if (strcmp(arg[iarg],"collision") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix srd command"); if (strcmp(arg[iarg+1],"slip") == 0) collidestyle = SLIP; else if (strcmp(arg[iarg+1],"noslip") == 0) collidestyle = NOSLIP; else error->all(FLERR,"Illegal fix srd command"); iarg += 2; } else if (strcmp(arg[iarg],"overlap") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix srd command"); if (strcmp(arg[iarg+1],"yes") == 0) overlap = 1; else if (strcmp(arg[iarg+1],"no") == 0) overlap = 0; else error->all(FLERR,"Illegal fix srd command"); iarg += 2; } else if (strcmp(arg[iarg],"inside") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix srd command"); if (strcmp(arg[iarg+1],"error") == 0) insideflag = INSIDE_ERROR; else if (strcmp(arg[iarg+1],"warn") == 0) insideflag = INSIDE_WARN; else if (strcmp(arg[iarg+1],"ignore") == 0) insideflag = INSIDE_IGNORE; else error->all(FLERR,"Illegal fix srd command"); iarg += 2; } else if (strcmp(arg[iarg],"exact") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix srd command"); if (strcmp(arg[iarg+1],"yes") == 0) exactflag = 1; else if (strcmp(arg[iarg+1],"no") == 0) exactflag = 0; else error->all(FLERR,"Illegal fix srd command"); iarg += 2; } else if (strcmp(arg[iarg],"radius") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix srd command"); radfactor = atof(arg[iarg+1]); iarg += 2; } else if (strcmp(arg[iarg],"bounce") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix srd command"); maxbounceallow = atoi(arg[iarg+1]); iarg += 2; } else if (strcmp(arg[iarg],"search") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix srd command"); gridsearch = atof(arg[iarg+1]); iarg += 2; } else if (strcmp(arg[iarg],"cubic") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal fix srd command"); if (strcmp(arg[iarg+1],"error") == 0) cubicflag = CUBIC_ERROR; else if (strcmp(arg[iarg+1],"warn") == 0) cubicflag = CUBIC_WARN; else error->all(FLERR,"Illegal fix srd command"); cubictol = atof(arg[iarg+2]); iarg += 3; } else if (strcmp(arg[iarg],"shift") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal fix srd command"); else if (strcmp(arg[iarg+1],"no") == 0) shiftuser = SHIFT_NO; else if (strcmp(arg[iarg+1],"yes") == 0) shiftuser = SHIFT_YES; else if (strcmp(arg[iarg+1],"possible") == 0) shiftuser = SHIFT_POSSIBLE; else error->all(FLERR,"Illegal fix srd command"); shiftseed = atoi(arg[iarg+2]); iarg += 3; } else if (strcmp(arg[iarg],"tstat") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix srd command"); if (strcmp(arg[iarg+1],"no") == 0) tstat = 0; else if (strcmp(arg[iarg+1],"yes") == 0) tstat = 1; else error->all(FLERR,"Illegal fix srd command"); iarg += 2; } else error->all(FLERR,"Illegal fix srd command"); } // error check if (nevery <= 0) error->all(FLERR,"Illegal fix srd command"); if (bigexist && biggroup < 0) error->all(FLERR,"Could not find fix srd group ID"); if (gridsrd <= 0.0) error->all(FLERR,"Illegal fix srd command"); if (temperature_srd <= 0.0) error->all(FLERR,"Illegal fix srd command"); if (seed <= 0) error->all(FLERR,"Illegal fix srd command"); if (radfactor <= 0.0) error->all(FLERR,"Illegal fix srd command"); if (maxbounceallow < 0) error->all(FLERR,"Illegal fix srd command"); if (lamdaflag && lamda <= 0.0) error->all(FLERR,"Illegal fix srd command"); if (gridsearch <= 0.0) error->all(FLERR,"Illegal fix srd command"); if (cubictol < 0.0 || cubictol > 1.0) error->all(FLERR,"Illegal fix srd command"); if ((shiftuser == SHIFT_YES || shiftuser == SHIFT_POSSIBLE) && shiftseed <= 0) error->all(FLERR,"Illegal fix srd command"); // initialize Marsaglia RNG with processor-unique seed me = comm->me; nprocs = comm->nprocs; random = new RanMars(lmp,seed + me); // if requested, initialize shift RNG, same on every proc if (shiftuser == SHIFT_YES || shiftuser == SHIFT_POSSIBLE) randomshift = new RanPark(lmp,shiftseed); else randomshift = NULL; // initialize data structs and flags if (bigexist) biggroupbit = group->bitmask[biggroup]; else biggroupbit = 0; nmax = 0; binhead = NULL; maxbin1 = 0; binnext = NULL; maxbuf = 0; sbuf1 = sbuf2 = rbuf1 = rbuf2 = NULL; shifts[0].maxvbin = shifts[1].maxvbin = 0; shifts[0].vbin = shifts[1].vbin = NULL; shifts[0].maxbinsq = shifts[1].maxbinsq = 0; for (int ishift = 0; ishift < 2; ishift++) for (int iswap = 0; iswap < 6; iswap++) shifts[ishift].bcomm[iswap].sendlist = shifts[ishift].bcomm[iswap].recvlist = NULL; maxbin2 = 0; nbinbig = NULL; binbig = NULL; binsrd = NULL; nstencil = maxstencil = 0; stencil = NULL; maxbig = 0; biglist = NULL; stats_flag = 1; for (int i = 0; i < size_vector; i++) stats_all[i] = 0.0; initflag = 0; srd_bin_temp = 0.0; srd_bin_count = 0; // atom style pointers to particles that store bonus info avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); avec_line = (AtomVecLine *) atom->style_match("line"); avec_tri = (AtomVecTri *) atom->style_match("tri"); // fix parameters if (collidestyle == SLIP) comm_reverse = 3; else comm_reverse = 6; force_reneighbor = 1; } /* ---------------------------------------------------------------------- */ FixSRD::~FixSRD() { delete random; delete randomshift; memory->destroy(binhead); memory->destroy(binnext); memory->destroy(sbuf1); memory->destroy(sbuf2); memory->destroy(rbuf1); memory->destroy(rbuf2); memory->sfree(shifts[0].vbin); memory->sfree(shifts[1].vbin); for (int ishift = 0; ishift < 2; ishift++) for (int iswap = 0; iswap < 6; iswap++) { memory->destroy(shifts[ishift].bcomm[iswap].sendlist); memory->destroy(shifts[ishift].bcomm[iswap].recvlist); } memory->destroy(nbinbig); memory->destroy(binbig); memory->destroy(binsrd); memory->destroy(stencil); memory->sfree(biglist); } /* ---------------------------------------------------------------------- */ int FixSRD::setmask() { int mask = 0; mask |= PRE_NEIGHBOR; mask |= POST_FORCE; return mask; } /* ---------------------------------------------------------------------- */ void FixSRD::init() { // error checks if (force->newton_pair == 0) error->all(FLERR,"Fix srd requires newton pair on"); if (bigexist && comm->ghost_velocity == 0) error->all(FLERR,"Fix srd requires ghost atoms store velocity"); if (bigexist && collidestyle == NOSLIP && !atom->torque_flag) error->all(FLERR,"Fix SRD no-slip requires atom attribute torque"); if (initflag && update->dt != dt_big) error->all(FLERR,"Cannot change timestep once fix srd is setup"); // orthogonal vs triclinic simulation box // could be static or shearing box triclinic = domain->triclinic; // wallexist = 1 if SRD wall(s) are defined wallexist = 0; for (int m = 0; m < modify->nfix; m++) { if (strcmp(modify->fix[m]->style,"wall/srd") == 0) { if (wallexist) error->all(FLERR,"Cannot use fix wall/srd more than once"); wallexist = 1; wallfix = (FixWallSRD *) modify->fix[m]; nwall = wallfix->nwall; wallvarflag = wallfix->varflag; wallwhich = wallfix->wallwhich; xwall = wallfix->xwall; xwallhold = wallfix->xwallhold; vwall = wallfix->vwall; fwall = wallfix->fwall; walltrigger = 0.5 * neighbor->skin; if (wallfix->overlap && overlap == 0 && me == 0) error->warning(FLERR, "Fix SRD walls overlap but fix srd overlap not set"); } } // set change_flags if box size or shape changes change_size = change_shape = deformflag = 0; if (domain->nonperiodic == 2) change_size = 1; for (int i = 0; i < modify->nfix; i++) if (modify->fix[i]->box_change) { if (modify->fix[i]->box_change_size) change_size = 1; if (modify->fix[i]->box_change_shape) change_shape = 1; if (strcmp(modify->fix[i]->style,"deform") == 0) { deformflag = 1; FixDeform *deform = (FixDeform *) modify->fix[i]; if (deform->box_change_shape && deform->remapflag != V_REMAP) error->all(FLERR,"Using fix srd with inconsistent " "fix deform remap option"); } } if (deformflag && tstat == 0 && me == 0) error->warning(FLERR, "Using fix srd with box deformation but no SRD thermostat"); // parameterize based on current box volume dimension = domain->dimension; parameterize(); // limit initial SRD velocities if necessary double **v = atom->v; int *mask = atom->mask; int nlocal = atom->nlocal; double vsq; nrescale = 0; for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { vsq = v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]; if (vsq > vmaxsq) { nrescale++; MathExtra::scale3(vmax/sqrt(vsq),v[i]); } } int all; MPI_Allreduce(&nrescale,&all,1,MPI_INT,MPI_SUM,world); if (me == 0) { if (screen) fprintf(screen," # of rescaled SRD velocities = %d\n",all); if (logfile) fprintf(logfile," # of rescaled SRD velocities = %d\n",all); } velocity_stats(igroup); if (bigexist) velocity_stats(biggroup); // zero per-run stats bouncemaxnum = 0; bouncemax = 0; reneighcount = 0; initflag = 1; next_reneighbor = -1; } /* ---------------------------------------------------------------------- */ void FixSRD::setup(int vflag) { setup_bounds(); if (dist_srd_reneigh < nevery*dt_big*vmax && me == 0) error->warning(FLERR, "Fix srd SRD moves may trigger frequent reneighboring"); // setup search bins and search stencil based on these distances if (bigexist || wallexist) { setup_search_bins(); setup_search_stencil(); } else nbins2 = 0; // perform first bining of SRD and big particles and walls // set reneighflag to turn off SRD rotation // don't do SRD rotation in setup, only during timestepping reneighflag = BIG_MOVE; pre_neighbor(); } /* ---------------------------------------------------------------------- assign SRD particles to bins assign big particles to all bins they overlap ------------------------------------------------------------------------- */ void FixSRD::pre_neighbor() { int i,j,m,ix,iy,iz,jx,jy,jz,ibin,jbin,lo,hi; double rsq,cutbinsq; double xlamda[3]; // grow SRD per-atom bin arrays if necessary if (atom->nlocal > nmax) { nmax = atom->nmax; memory->destroy(binsrd); memory->destroy(binnext); memory->create(binsrd,nmax,"fix/srd:binsrd"); memory->create(binnext,nmax,"fix/srd:binnext"); } // setup and grow BIG info list if necessary // set index ptrs to BIG particles and to WALLS // big_static() adds static properties to info list if (bigexist || wallexist) { if (bigexist) { if (biggroup == atom->firstgroup) nbig = atom->nfirst + atom->nghost; else { int *mask = atom->mask; int nlocal = atom->nlocal; nbig = atom->nghost; for (i = 0; i < nlocal; i++) if (mask[i] & biggroupbit) nbig++; } } else nbig = 0; int ninfo = nbig; if (wallexist) ninfo += nwall; if (ninfo > maxbig) { maxbig = ninfo; memory->destroy(biglist); biglist = (Big *) memory->smalloc(maxbig*sizeof(Big),"fix/srd:biglist"); } if (bigexist) { int *mask = atom->mask; int nlocal = atom->nlocal; if (biggroup == atom->firstgroup) nlocal = atom->nfirst; nbig = 0; for (i = 0; i < nlocal; i++) if (mask[i] & biggroupbit) biglist[nbig++].index = i; int nall = atom->nlocal + atom->nghost; for (i = atom->nlocal; i < nall; i++) if (mask[i] & biggroupbit) biglist[nbig++].index = i; big_static(); } if (wallexist) { for (m = 0; m < nwall; m++) { biglist[nbig+m].index = m; biglist[nbig+m].type = WALL; } wallfix->wall_params(1); } } // if simulation box size changes, reset velocity bins // if big particles exist, reset search bins if box size or shape changes, // b/c finite-size particles will overlap different bins as the box tilts if (change_size) setup_bounds(); if (change_size) setup_velocity_bins(); if ((change_size || change_shape) && (bigexist || wallexist)) { setup_search_bins(); setup_search_stencil(); } // map each owned & ghost big particle to search bins it overlaps // zero out bin counters for big particles // if firstgroup is defined, only loop over first and ghost particles // for each big particle: loop over stencil to find overlap bins int *mask = atom->mask; double **x = atom->x; int nlocal = atom->nlocal; int nall = nlocal + atom->nghost; int nfirst = nlocal; if (bigexist && biggroup == atom->firstgroup) nfirst = atom->nfirst; if (bigexist || wallexist) for (i = 0; i < nbins2; i++) nbinbig[i] = 0; if (bigexist) { i = nbig = 0; while (i < nall) { if (mask[i] & biggroupbit) { ix = static_cast<int> ((x[i][0]-xblo2)*bininv2x); iy = static_cast<int> ((x[i][1]-yblo2)*bininv2y); iz = static_cast<int> ((x[i][2]-zblo2)*bininv2z); ibin = iz*nbin2y*nbin2x + iy*nbin2x + ix; if (ix < 0 || ix >= nbin2x || iy < 0 || iy >= nbin2y || iz < 0 || iz >= nbin2z) error->one(FLERR,"Fix SRD: bad search bin assignment"); cutbinsq = biglist[nbig].cutbinsq; for (j = 0; j < nstencil; j++) { jx = ix + stencil[j][0]; jy = iy + stencil[j][1]; jz = iz + stencil[j][2]; if (jx < 0 || jx >= nbin2x || jy < 0 || jy >= nbin2y || jz < 0 || jz >= nbin2z) { printf("Big particle %d %d %g %g %g\n", atom->tag[i],i,x[i][0],x[i][1],x[i][2]); printf("Bin indices: %d %d %d, %d %d %d, %d %d %d\n", ix,iy,iz,jx,jy,jz,nbin2x,nbin2y,nbin2z); error->one(FLERR,"Fix SRD: bad stencil bin for big particle"); } rsq = point_bin_distance(x[i],jx,jy,jz); if (rsq < cutbinsq) { jbin = ibin + stencil[j][3]; if (nbinbig[jbin] == ATOMPERBIN) error->one(FLERR,"Fix SRD: too many big particles in bin"); binbig[jbin][nbinbig[jbin]++] = nbig; } } nbig++; } i++; if (i == nfirst) i = nlocal; } } // map each wall to search bins it covers, up to non-periodic boundary // if wall moves, add walltrigger to its position // this insures it is added to all search bins it may move into // may not overlap any of my search bins if (wallexist) { double delta = 0.0; if (wallvarflag) delta = walltrigger; for (m = 0; m < nwall; m++) { int dim = wallwhich[m] / 2; int side = wallwhich[m] % 2; if (dim == 0) { if (side == 0) { hi = static_cast<int> ((xwall[m]+delta-xblo2)*bininv2x); if (hi < 0) continue; if (hi >= nbin2x) error->all(FLERR, "Fix SRD: bad search bin assignment"); lo = 0; } else { lo = static_cast<int> ((xwall[m]-delta-xblo2)*bininv2x); if (lo >= nbin2x) continue; if (lo < 0) error->all(FLERR,"Fix SRD: bad search bin assignment"); hi = nbin2x-1; } for (ix = lo; ix <= hi; ix++) for (iy = 0; iy < nbin2y; iy++) for (iz = 0; iz < nbin2z; iz++) { ibin = iz*nbin2y*nbin2x + iy*nbin2x + ix; if (nbinbig[ibin] == ATOMPERBIN) error->all(FLERR,"Fix SRD: too many walls in bin"); binbig[ibin][nbinbig[ibin]++] = nbig+m; } } else if (dim == 1) { if (side == 0) { hi = static_cast<int> ((xwall[m]+delta-yblo2)*bininv2y); if (hi < 0) continue; if (hi >= nbin2y) error->all(FLERR, "Fix SRD: bad search bin assignment"); lo = 0; } else { lo = static_cast<int> ((xwall[m]-delta-yblo2)*bininv2y); if (lo >= nbin2y) continue; if (lo < 0) error->all(FLERR,"Fix SRD: bad search bin assignment"); hi = nbin2y-1; } for (iy = lo; iy <= hi; iy++) for (ix = 0; ix < nbin2x; ix++) for (iz = 0; iz < nbin2z; iz++) { ibin = iz*nbin2y*nbin2x + iy*nbin2x + ix; if (nbinbig[ibin] == ATOMPERBIN) error->all(FLERR,"Fix SRD: too many walls in bin"); binbig[ibin][nbinbig[ibin]++] = nbig+m; } } else if (dim == 2) { if (side == 0) { hi = static_cast<int> ((xwall[m]+delta-zblo2)*bininv2z); if (hi < 0) continue; if (hi >= nbin2z) error->all(FLERR, "Fix SRD: bad search bin assignment"); lo = 0; } else { lo = static_cast<int> ((xwall[m]-delta-zblo2)*bininv2z); if (lo >= nbin2z) continue; if (lo < 0) error->all(FLERR,"Fix SRD: bad search bin assignment"); hi = nbin2z-1; } for (iz = lo; iz < hi; iz++) for (ix = 0; ix < nbin2x; ix++) for (iy = 0; iy < nbin2y; iy++) { ibin = iz*nbin2y*nbin2x + iy*nbin2x + ix; if (nbinbig[ibin] == ATOMPERBIN) error->all(FLERR,"Fix SRD: too many walls in bin"); binbig[ibin][nbinbig[ibin]++] = nbig+m; } } } } // rotate SRD velocities on SRD timestep // done now since all SRDs are currently inside my sub-domain if (reneighflag == SRD_ROTATE) reset_velocities(); // log stats if reneighboring occurred b/c SRDs moved too far if (reneighflag == SRD_MOVE) reneighcount++; reneighflag = BIG_MOVE; } /* ---------------------------------------------------------------------- advect SRD particles and detect collisions between SRD and BIG particles when collision occurs, change x,v of SRD, force,torque of BIG particle ------------------------------------------------------------------------- */ void FixSRD::post_force(int vflag) { int i,m,ix,iy,iz; double xlamda[3]; // zero per-timestep stats stats_flag = 0; ncheck = ncollide = nbounce = ninside = nrescale = 0; // zero ghost forces & torques on BIG particles double **f = atom->f; double **torque = atom->torque; int nlocal = atom->nlocal; int nall = nlocal + atom->nghost; if (bigexist == 0) nall = 0; for (i = nlocal; i < nall; i++) f[i][0] = f[i][1] = f[i][2] = 0.0; if (collidestyle == NOSLIP) for (i = nlocal; i < nall; i++) torque[i][0] = torque[i][1] = torque[i][2] = 0.0; // advect SRD particles // assign to search bins if big particles or walls exist int *mask = atom->mask; double **x = atom->x; double **v = atom->v; if (bigexist || wallexist) { for (i = 0; i < nlocal; i++) if (mask[i] & groupbit) { x[i][0] += dt_big*v[i][0]; x[i][1] += dt_big*v[i][1]; x[i][2] += dt_big*v[i][2]; ix = static_cast<int> ((x[i][0]-xblo2)*bininv2x); iy = static_cast<int> ((x[i][1]-yblo2)*bininv2y); iz = static_cast<int> ((x[i][2]-zblo2)*bininv2z); binsrd[i] = iz*nbin2y*nbin2x + iy*nbin2x + ix; if (ix < 0 || ix >= nbin2x || iy < 0 || iy >= nbin2y || iz < 0 || iz >= nbin2z) { if (screen) { fprintf(screen,"SRD particle %d on step " BIGINT_FORMAT "\n", atom->tag[i],update->ntimestep); fprintf(screen,"v = %g %g %g\n",v[i][0],v[i][1],v[i][2]); fprintf(screen,"x = %g %g %g\n",x[i][0],x[i][1],x[i][2]); fprintf(screen,"ix,iy,iz nx,ny,nz = %d %d %d %d %d %d\n", ix,iy,iz,nbin2x,nbin2y,nbin2z); } error->one(FLERR,"Fix SRD: bad bin assignment for SRD advection"); } } } else { for (i = 0; i < nlocal; i++) if (mask[i] & groupbit) { x[i][0] += dt_big*v[i][0]; x[i][1] += dt_big*v[i][1]; x[i][2] += dt_big*v[i][2]; } } // detect collision of SRDs with BIG particles or walls if (bigexist || wallexist) { if (bigexist) big_dynamic(); if (wallexist) wallfix->wall_params(0); if (overlap) collisions_multi(); else collisions_single(); } // reverse communicate forces & torques on BIG particles if (bigexist) { flocal = f; tlocal = torque; comm->reverse_comm_fix(this); } // if any SRD particle has moved too far, trigger reneigh on next step // for triclinic, perform check in lamda units int flag = 0; if (triclinic) domain->x2lamda(nlocal); for (i = 0; i < nlocal; i++) if (mask[i] & groupbit) { if (x[i][0] < srdlo_reneigh[0] || x[i][0] > srdhi_reneigh[0] || x[i][1] < srdlo_reneigh[1] || x[i][1] > srdhi_reneigh[1] || x[i][2] < srdlo_reneigh[2] || x[i][2] > srdhi_reneigh[2]) flag = 1; } if (triclinic) domain->lamda2x(nlocal); int flagall; MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world); if (flagall) { next_reneighbor = update->ntimestep + 1; reneighflag = SRD_MOVE; } // if wall has moved too far, trigger reneigh on next step // analagous to neighbor check for big particle moving 1/2 of skin distance if (wallexist) { for (m = 0; m < nwall; m++) if (fabs(xwall[m]-xwallhold[m]) > walltrigger) next_reneighbor = update->ntimestep + 1; } // if next timestep is SRD timestep, trigger reneigh if ((update->ntimestep+1) % nevery == 0) { next_reneighbor = update->ntimestep + 1; reneighflag = SRD_ROTATE; } } /* ---------------------------------------------------------------------- reset SRD velocities may perform random shifting by up to 1/2 bin in each dimension called at pre-neighbor stage when all SRDs are now inside my sub-domain if tstat, then thermostat SRD particles as well, including streaming effects ------------------------------------------------------------------------- */ void FixSRD::reset_velocities() { int i,j,n,ix,iy,iz,ibin,axis,sign,irandom; double u[3],vsum[3]; double vx,vy,vz,vsq,tbin,scale; double *vave,*vnew,*xlamda; double vstream[3]; // if requested, perform a dynamic shift of bin positions if (shiftflag) { double *boxlo; if (triclinic == 0) boxlo = domain->boxlo; else boxlo = domain->boxlo_lamda; shifts[1].corner[0] = boxlo[0] - binsize1x*randomshift->uniform(); shifts[1].corner[1] = boxlo[1] - binsize1y*randomshift->uniform(); if (dimension == 3) shifts[1].corner[2] = boxlo[2] - binsize1z*randomshift->uniform(); else shifts[1].corner[2] = boxlo[2]; setup_velocity_shift(1,1); } double *corner = shifts[shiftflag].corner; int *binlo = shifts[shiftflag].binlo; int *binhi = shifts[shiftflag].binhi; int nbins = shifts[shiftflag].nbins; int nbinx = shifts[shiftflag].nbinx; int nbiny = shifts[shiftflag].nbiny; BinAve *vbin = shifts[shiftflag].vbin; // binhead = 1st SRD particle in each bin // binnext = index of next particle in bin // bin assignment is done in lamda units for triclinic int *mask = atom->mask; double **x = atom->x; double **v = atom->v; int nlocal = atom->nlocal; if (triclinic) domain->x2lamda(nlocal); for (i = 0; i < nbins; i++) binhead[i] = -1; for (i = 0; i < nlocal; i++) if (mask[i] & groupbit) { ix = static_cast<int> ((x[i][0]-corner[0])*bininv1x); ix = MAX(ix,binlo[0]); ix = MIN(ix,binhi[0]); iy = static_cast<int> ((x[i][1]-corner[1])*bininv1y); iy = MAX(iy,binlo[1]); iy = MIN(iy,binhi[1]); iz = static_cast<int> ((x[i][2]-corner[2])*bininv1z); iz = MAX(iz,binlo[2]); iz = MIN(iz,binhi[2]); ibin = (iz-binlo[2])*nbiny*nbinx + (iy-binlo[1])*nbinx + (ix-binlo[0]); binnext[i] = binhead[ibin]; binhead[ibin] = i; } if (triclinic) domain->lamda2x(nlocal); // for each bin I have particles contributing to: // compute summed v of particles in that bin // if I own the bin, set its random value, else set to 0.0 for (i = 0; i < nbins; i++) { n = 0; vsum[0] = vsum[1] = vsum[2] = 0.0; for (j = binhead[i]; j >= 0; j = binnext[j]) { vsum[0] += v[j][0]; vsum[1] += v[j][1]; vsum[2] += v[j][2]; n++; } vbin[i].vsum[0] = vsum[0]; vbin[i].vsum[1] = vsum[1]; vbin[i].vsum[2] = vsum[2]; vbin[i].n = n; if (vbin[i].owner) vbin[i].random = random->uniform(); else vbin[i].random = 0.0; } // communicate bin info for bins which more than 1 proc contribute to if (shifts[shiftflag].commflag) vbin_comm(shiftflag); // for each bin I have particles contributing to: // compute vave over particles in bin // thermal velocity of each particle = v - vave // rotate thermal vel of each particle around one of 6 random axes // add vave back to each particle // thermostat if requested: // if no deformation, rescale thermal vel to temperature // if deformation, rescale thermal vel and change vave to vstream // these are settings for extra dof_temp, dof_tstat to subtract // (not sure why these settings work best) // no deformation, no tstat: dof_temp = 1 // yes deformation, no tstat: doesn't matter, system will not equilibrate // no deformation, yes tstat: dof_temp = dof_tstat = 1 // yes deformation, yes tstat: dof_temp = dof_tstat = 0 // accumulate final T_srd for each bin I own double tfactor = force->mvv2e * mass_srd / (dimension * force->boltz); int dof_temp = 1; int dof_tstat; if (tstat) { if (deformflag) dof_tstat = dof_temp = 0; else dof_tstat = 1; } srd_bin_temp = 0.0; srd_bin_count = 0; if (dimension == 2) axis = 2; double *h_rate = domain->h_rate; double *h_ratelo = domain->h_ratelo; for (i = 0; i < nbins; i++) { n = vbin[i].n; if (n == 0) continue; vave = vbin[i].vsum; vave[0] /= n; vave[1] /= n; vave[2] /= n; irandom = static_cast<int> (6.0*vbin[i].random); sign = irandom % 2; if (dimension == 3) axis = irandom / 2; vsq = 0.0; for (j = binhead[i]; j >= 0; j = binnext[j]) { if (axis == 0) { u[0] = v[j][0]-vave[0]; u[1] = sign ? v[j][2]-vave[2] : vave[2]-v[j][2]; u[2] = sign ? vave[1]-v[j][1] : v[j][1]-vave[1]; } else if (axis == 1) { u[1] = v[j][1]-vave[1]; u[0] = sign ? v[j][2]-vave[2] : vave[2]-v[j][2]; u[2] = sign ? vave[0]-v[j][0] : v[j][0]-vave[0]; } else { u[2] = v[j][2]-vave[2]; u[1] = sign ? v[j][0]-vave[0] : vave[0]-v[j][0]; u[0] = sign ? vave[1]-v[j][1] : v[j][1]-vave[1]; } vsq += u[0]*u[0] + u[1]*u[1] + u[2]*u[2]; v[j][0] = u[0] + vave[0]; v[j][1] = u[1] + vave[1]; v[j][2] = u[2] + vave[2]; } if (tstat && n > 1) { if (deformflag) { xlamda = vbin[i].xctr; vstream[0] = h_rate[0]*xlamda[0] + h_rate[5]*xlamda[1] + h_rate[4]*xlamda[2] + h_ratelo[0]; vstream[1] = h_rate[1]*xlamda[1] + h_rate[3]*xlamda[2] + h_ratelo[1]; vstream[2] = h_rate[2]*xlamda[2] + h_ratelo[2]; } else { vstream[0] = vave[0]; vstream[1] = vave[1]; vstream[2] = vave[2]; } // tbin = thermal temperature of particles in bin // scale = scale factor for thermal velocity tbin = vsq/(n-dof_tstat) * tfactor; scale = sqrt(temperature_srd/tbin); vsq = 0.0; for (j = binhead[i]; j >= 0; j = binnext[j]) { u[0] = (v[j][0] - vave[0]) * scale; u[1] = (v[j][1] - vave[1]) * scale; u[2] = (v[j][2] - vave[2]) * scale; vsq += u[0]*u[0] + u[1]*u[1] + u[2]*u[2]; v[j][0] = u[0] + vstream[0]; v[j][1] = u[1] + vstream[1]; v[j][2] = u[2] + vstream[2]; } } // sum partial contribution of my particles to T even if I don't own bin // but only count bin if I own it, so each bin is counted exactly once if (n > 1) srd_bin_temp += vsq/(n-dof_temp); if (vbin[i].owner) srd_bin_count++; } srd_bin_temp *= tfactor; // rescale any too-large velocities for (i = 0; i < nlocal; i++) if (mask[i] & groupbit) { vsq = v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]; if (vsq > vmaxsq) { nrescale++; MathExtra::scale3(vmax/sqrt(vsq),v[i]); } } } /* ---------------------------------------------------------------------- communicate summed particle info for bins that overlap 1 or more procs ------------------------------------------------------------------------- */ void FixSRD::vbin_comm(int ishift) { BinComm *bcomm1,*bcomm2; MPI_Request request1,request2; MPI_Status status; // send/recv bins in both directions in each dimension // don't send if nsend = 0 // due to static bins aliging with proc boundary // due to dynamic bins across non-periodic global boundary // copy to self if sendproc = me // MPI send to another proc if sendproc != me // don't recv if nrecv = 0 // copy from self if recvproc = me // MPI recv from another proc if recvproc != me BinAve *vbin = shifts[ishift].vbin; int *procgrid = comm->procgrid; int iswap = 0; for (int idim = 0; idim < dimension; idim++) { bcomm1 = &shifts[ishift].bcomm[iswap++]; bcomm2 = &shifts[ishift].bcomm[iswap++]; if (procgrid[idim] == 1) { if (bcomm1->nsend) vbin_pack(vbin,bcomm1->nsend,bcomm1->sendlist,sbuf1); if (bcomm2->nsend) vbin_pack(vbin,bcomm2->nsend,bcomm2->sendlist,sbuf2); if (bcomm1->nrecv) vbin_unpack(sbuf1,vbin,bcomm1->nrecv,bcomm1->recvlist); if (bcomm2->nrecv) vbin_unpack(sbuf2,vbin,bcomm2->nrecv,bcomm2->recvlist); } else { if (bcomm1->nrecv) MPI_Irecv(rbuf1,bcomm1->nrecv*VBINSIZE,MPI_DOUBLE,bcomm1->recvproc,0, world,&request1); if (bcomm2->nrecv) MPI_Irecv(rbuf2,bcomm2->nrecv*VBINSIZE,MPI_DOUBLE,bcomm2->recvproc,0, world,&request2); if (bcomm1->nsend) { vbin_pack(vbin,bcomm1->nsend,bcomm1->sendlist,sbuf1); MPI_Send(sbuf1,bcomm1->nsend*VBINSIZE,MPI_DOUBLE, bcomm1->sendproc,0,world); } if (bcomm2->nsend) { vbin_pack(vbin,bcomm2->nsend,bcomm2->sendlist,sbuf2); MPI_Send(sbuf2,bcomm2->nsend*VBINSIZE,MPI_DOUBLE, bcomm2->sendproc,0,world); } if (bcomm1->nrecv) { MPI_Wait(&request1,&status); vbin_unpack(rbuf1,vbin,bcomm1->nrecv,bcomm1->recvlist); } if (bcomm2->nrecv) { MPI_Wait(&request2,&status); vbin_unpack(rbuf2,vbin,bcomm2->nrecv,bcomm2->recvlist); } } } } /* ---------------------------------------------------------------------- pack velocity bin data into a message buffer for sending ------------------------------------------------------------------------- */ void FixSRD::vbin_pack(BinAve *vbin, int n, int *list, double *buf) { int j; int m = 0; for (int i = 0; i < n; i++) { j = list[i]; buf[m++] = vbin[j].n; buf[m++] = vbin[j].vsum[0]; buf[m++] = vbin[j].vsum[1]; buf[m++] = vbin[j].vsum[2]; buf[m++] = vbin[j].random; } } /* ---------------------------------------------------------------------- unpack velocity bin data from a message buffer and sum values to my bins ------------------------------------------------------------------------- */ void FixSRD::vbin_unpack(double *buf, BinAve *vbin, int n, int *list) { int j; int m = 0; for (int i = 0; i < n; i++) { j = list[i]; vbin[j].n += static_cast<int> (buf[m++]); vbin[j].vsum[0] += buf[m++]; vbin[j].vsum[1] += buf[m++]; vbin[j].vsum[2] += buf[m++]; vbin[j].random += buf[m++]; } } /* ---------------------------------------------------------------------- detect all collisions between SRD and BIG particles or WALLS assume SRD can be inside at most one BIG particle or WALL at a time unoverlap SRDs for each collision ------------------------------------------------------------------------- */ void FixSRD::collisions_single() { int i,j,k,m,type,nbig,ibin,ibounce,inside,collide_flag,lineside; double dt,t_remain; double norm[3],xscoll[3],xbcoll[3],vsnew[3]; Big *big; // outer loop over SRD particles // inner loop over BIG particles or WALLS that overlap SRD particle bin // if overlap between SRD and BIG particle or wall: // for exact, compute collision pt in time // for inexact, push SRD to surf of BIG particle or WALL // update x,v of SRD and f,torque on BIG particle // re-bin SRD particle after collision // iterate until the SRD particle has no overlaps with BIG particles or WALLS double **x = atom->x; double **v = atom->v; double **f = atom->f; double **torque = atom->torque; int *mask = atom->mask; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) { if (!(mask[i] & groupbit)) continue; ibin = binsrd[i]; if (nbinbig[ibin] == 0) continue; ibounce = 0; collide_flag = 1; dt = dt_big; while (collide_flag) { nbig = nbinbig[ibin]; if (ibounce == 0) ncheck += nbig; collide_flag = 0; for (m = 0; m < nbig; m++) { k = binbig[ibin][m]; big = &biglist[k]; j = big->index; type = big->type; if (type == SPHERE) inside = inside_sphere(x[i],x[j],big); else if (type == ELLIPSOID) inside = inside_ellipsoid(x[i],x[j],big); else inside = inside_wall(x[i],j); if (inside) { if (exactflag) { if (type == SPHERE) t_remain = collision_sphere_exact(x[i],x[j],v[i],v[j],big, xscoll,xbcoll,norm); else if (type == ELLIPSOID) t_remain = collision_ellipsoid_exact(x[i],x[j],v[i],v[j],big, xscoll,xbcoll,norm); else t_remain = collision_wall_exact(x[i],j,v[i],xscoll,xbcoll,norm); } else { t_remain = 0.5*dt; if (type == SPHERE) collision_sphere_inexact(x[i],x[j],big,xscoll,xbcoll,norm); else if (type == ELLIPSOID) collision_ellipsoid_inexact(x[i],x[j],big,xscoll,xbcoll,norm); else collision_wall_inexact(x[i],j,xscoll,xbcoll,norm); } #ifdef SRD_DEBUG if (update->ntimestep == SRD_DEBUG_TIMESTEP && atom->tag[i] == SRD_DEBUG_ATOMID) print_collision(i,j,ibounce,t_remain,dt,xscoll,xbcoll,norm,type); #endif if (t_remain > dt) { ninside++; if (insideflag == INSIDE_ERROR || insideflag == INSIDE_WARN) { char str[128]; if (type != WALL) sprintf(str, "SRD particle %d started " "inside big particle %d on step " BIGINT_FORMAT - " bounce %d\n", + " bounce %d", atom->tag[i],atom->tag[j],update->ntimestep,ibounce+1); else sprintf(str, "SRD particle %d started " "inside big particle %d on step " BIGINT_FORMAT - " bounce %d\n", + " bounce %d", atom->tag[i],atom->tag[j],update->ntimestep,ibounce+1); if (insideflag == INSIDE_ERROR) error->one(FLERR,str); error->warning(FLERR,str); } break; } if (collidestyle == SLIP) { if (type != WALL) slip(v[i],v[j],x[j],big,xscoll,norm,vsnew); else slip_wall(v[i],j,norm,vsnew); } else { if (type != WALL) noslip(v[i],v[j],x[j],big,-1, xscoll,norm,vsnew); else noslip(v[i],NULL,x[j],big,j,xscoll,norm,vsnew); } if (dimension == 2) vsnew[2] = 0.0; // check on rescaling of vsnew double vsq = vsnew[0]*vsnew[0] + vsnew[1]*vsnew[1] + vsnew[2]*vsnew[2]; if (vsq > vmaxsq) { nrescale++; MathExtra::scale3(vmax/sqrt(vsq),vsnew); } // update BIG particle and WALL and SRD // BIG particle is not torqued if sphere and SLIP collision if (collidestyle == SLIP && type == SPHERE) force_torque(v[i],vsnew,xscoll,xbcoll,f[j],NULL); else if (type != WALL) force_torque(v[i],vsnew,xscoll,xbcoll,f[j],torque[j]); else if (type == WALL) force_wall(v[i],vsnew,j); ibin = binsrd[i] = update_srd(i,t_remain,xscoll,vsnew,x[i],v[i]); if (ibounce == 0) ncollide++; ibounce++; if (ibounce < maxbounceallow || maxbounceallow == 0) collide_flag = 1; dt = t_remain; break; } } } nbounce += ibounce; if (maxbounceallow && ibounce >= maxbounceallow) bouncemaxnum++; if (ibounce > bouncemax) bouncemax = ibounce; } } /* ---------------------------------------------------------------------- detect all collisions between SRD and big particles an SRD can be inside more than one big particle at a time requires finding which big particle SRD collided with first unoverlap SRDs for each collision ------------------------------------------------------------------------- */ void FixSRD::collisions_multi() { int i,j,k,m,type,nbig,ibin,ibounce,inside,jfirst,typefirst,jlast; double dt,t_remain,t_first; double norm[3],xscoll[3],xbcoll[3],vsnew[3]; double normfirst[3],xscollfirst[3],xbcollfirst[3]; Big *big; // outer loop over SRD particles // inner loop over BIG particles or WALLS that overlap SRD particle bin // loop over all BIG and WALLS to find which one SRD collided with first // if overlap between SRD and BIG particle or wall: // compute collision pt in time // update x,v of SRD and f,torque on BIG particle // re-bin SRD particle after collision // iterate until the SRD particle has no overlaps with BIG particles or WALLS double **x = atom->x; double **v = atom->v; double **f = atom->f; double **torque = atom->torque; int *mask = atom->mask; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) { if (!(mask[i] & groupbit)) continue; ibin = binsrd[i]; if (nbinbig[ibin] == 0) continue; ibounce = 0; jlast = -1; dt = dt_big; while (1) { nbig = nbinbig[ibin]; if (ibounce == 0) ncheck += nbig; t_first = 0.0; for (m = 0; m < nbig; m++) { k = binbig[ibin][m]; big = &biglist[k]; j = big->index; if (j == jlast) continue; type = big->type; if (type == SPHERE) inside = inside_sphere(x[i],x[j],big); else if (type == ELLIPSOID) inside = inside_ellipsoid(x[i],x[j],big); else if (type == LINE) inside = inside_line(x[i],x[j],v[i],v[j],big,dt); else if (type == TRIANGLE) inside = inside_tri(x[i],x[j],v[i],v[j],big,dt); else inside = inside_wall(x[i],j); if (inside) { if (type == SPHERE) t_remain = collision_sphere_exact(x[i],x[j],v[i],v[j],big, xscoll,xbcoll,norm); else if (type == ELLIPSOID) t_remain = collision_ellipsoid_exact(x[i],x[j],v[i],v[j],big, xscoll,xbcoll,norm); else if (type == LINE) t_remain = collision_line_exact(x[i],x[j],v[i],v[j],big,dt, xscoll,xbcoll,norm); else if (type == TRIANGLE) t_remain = collision_tri_exact(x[i],x[j],v[i],v[j],big,dt, xscoll,xbcoll,norm); else t_remain = collision_wall_exact(x[i],j,v[i],xscoll,xbcoll,norm); #ifdef SRD_DEBUG if (update->ntimestep == SRD_DEBUG_TIMESTEP && atom->tag[i] == SRD_DEBUG_ATOMID) print_collision(i,j,ibounce,t_remain,dt,xscoll,xbcoll,norm,type); #endif if (t_remain > dt || t_remain < 0.0) { ninside++; if (insideflag == INSIDE_ERROR || insideflag == INSIDE_WARN) { char str[128]; sprintf(str, "SRD particle %d started " "inside big particle %d on step " BIGINT_FORMAT - " bounce %d\n", + " bounce %d", atom->tag[i],atom->tag[j],update->ntimestep,ibounce+1); if (insideflag == INSIDE_ERROR) error->one(FLERR,str); error->warning(FLERR,str); } t_first = 0.0; break; } if (t_remain > t_first) { t_first = t_remain; jfirst = j; typefirst = type; xscollfirst[0] = xscoll[0]; xscollfirst[1] = xscoll[1]; xscollfirst[2] = xscoll[2]; xbcollfirst[0] = xbcoll[0]; xbcollfirst[1] = xbcoll[1]; xbcollfirst[2] = xbcoll[2]; normfirst[0] = norm[0]; normfirst[1] = norm[1]; normfirst[2] = norm[2]; } } } if (t_first == 0.0) break; j = jlast = jfirst; type = typefirst; xscoll[0] = xscollfirst[0]; xscoll[1] = xscollfirst[1]; xscoll[2] = xscollfirst[2]; xbcoll[0] = xbcollfirst[0]; xbcoll[1] = xbcollfirst[1]; xbcoll[2] = xbcollfirst[2]; norm[0] = normfirst[0]; norm[1] = normfirst[1]; norm[2] = normfirst[2]; if (collidestyle == SLIP) { if (type != WALL) slip(v[i],v[j],x[j],big,xscoll,norm,vsnew); else slip_wall(v[i],j,norm,vsnew); } else { if (type != WALL) noslip(v[i],v[j],x[j],big,-1,xscoll,norm,vsnew); else noslip(v[i],NULL,x[j],big,j,xscoll,norm,vsnew); } if (dimension == 2) vsnew[2] = 0.0; // check on rescaling of vsnew double vsq = vsnew[0]*vsnew[0] + vsnew[1]*vsnew[1] + vsnew[2]*vsnew[2]; if (vsq > vmaxsq) { nrescale++; MathExtra::scale3(vmax/sqrt(vsq),vsnew); } // update BIG particle and WALL and SRD // BIG particle is not torqued if sphere and SLIP collision if (collidestyle == SLIP && type == SPHERE) force_torque(v[i],vsnew,xscoll,xbcoll,f[j],NULL); else if (type != WALL) force_torque(v[i],vsnew,xscoll,xbcoll,f[j],torque[j]); else if (type == WALL) force_wall(v[i],vsnew,j); ibin = binsrd[i] = update_srd(i,t_first,xscoll,vsnew,x[i],v[i]); if (ibounce == 0) ncollide++; ibounce++; if (ibounce == maxbounceallow) break; dt = t_first; } nbounce += ibounce; if (maxbounceallow && ibounce >= maxbounceallow) bouncemaxnum++; if (ibounce > bouncemax) bouncemax = ibounce; } } /* ---------------------------------------------------------------------- check if SRD particle S is inside spherical big particle B ------------------------------------------------------------------------- */ int FixSRD::inside_sphere(double *xs, double *xb, Big *big) { double dx,dy,dz; dx = xs[0] - xb[0]; dy = xs[1] - xb[1]; dz = xs[2] - xb[2]; if (dx*dx + dy*dy + dz*dz <= big->radsq) return 1; return 0; } /* ---------------------------------------------------------------------- check if SRD particle S is inside ellipsoidal big particle B ------------------------------------------------------------------------- */ int FixSRD::inside_ellipsoid(double *xs, double *xb, Big *big) { double x,y,z; double *ex = big->ex; double *ey = big->ey; double *ez = big->ez; double xs_xb[3]; xs_xb[0] = xs[0] - xb[0]; xs_xb[1] = xs[1] - xb[1]; xs_xb[2] = xs[2] - xb[2]; x = xs_xb[0]*ex[0] + xs_xb[1]*ex[1] + xs_xb[2]*ex[2]; y = xs_xb[0]*ey[0] + xs_xb[1]*ey[1] + xs_xb[2]*ey[2]; z = xs_xb[0]*ez[0] + xs_xb[1]*ez[1] + xs_xb[2]*ez[2]; if (x*x*big->aradsqinv + y*y*big->bradsqinv + z*z*big->cradsqinv <= 1.0) return 1; return 0; } /* ---------------------------------------------------------------------- check if SRD particle S is inside line big particle B collision only possible if: S starts on positive side of infinite line, which means it will collide with outside of rigid body made of lines since line segments have outward normals, when vector from first to last point is crossed with +z axis S ends on negative side of infinite line unlike most other inside() routines, then calculate exact collision: solve for collision pt along infinite line collision if pt is within endpoints of B ------------------------------------------------------------------------- */ int FixSRD::inside_line(double *xs, double *xb, double *vs, double *vb, Big *big, double dt_step) { double pmc0[2],pmc1[2],n0[2],n1[2]; double n1_n0[2],pmc1_pmc0[2]; // 1 and 2 = start and end of timestep // pmc = P - C, where P = position of S, C = position of B // n = normal to line = [-sin(theta),cos(theta)], theta = orientation of B // (P-C) dot N = side of line that S is on // side0 = -1,0,1 for which side of line B that S is on at start of step // side1 = -1,0,1 for which side of line B that S is on at end of step xs1[0] = xs[0]; xs1[1] = xs[1]; xb1[0] = xb[0]; xb1[1] = xb[1]; xs0[0] = xs1[0] - dt_step*vs[0]; xs0[1] = xs1[1] - dt_step*vs[1]; xb0[0] = xb1[0] - dt_step*vb[0]; xb0[1] = xb1[1] - dt_step*vb[1]; theta1 = big->theta; theta0 = theta1 - dt_step*big->omega[2]; pmc0[0] = xs0[0] - xb0[0]; pmc0[1] = xs0[1] - xb0[1]; n0[0] = sin(theta0); n0[1] = -cos(theta0); pmc1[0] = xs1[0] - xb1[0]; pmc1[1] = xs1[1] - xb1[1]; n1[0] = sin(theta1); n1[1] = -cos(theta1); double side0 = pmc0[0]*n0[0] + pmc0[1]*n0[1]; double side1 = pmc1[0]*n1[0] + pmc1[1]*n1[1]; if (side0 <= 0.0 || side1 >= 0.0) return 0; // solve for time t (0 to 1) at which moving particle // crosses infinite moving/rotating line // Newton-Raphson solve of full non-linear parametric equation tfraction = newton_raphson(0.0,1.0); // quadratic equation solve of approximate parametric equation /* n1_n0[0] = n1[0]-n0[0]; n1_n0[1] = n1[1]-n0[1]; pmc1_pmc0[0] = pmc1[0]-pmc0[0]; pmc1_pmc0[1] = pmc1[1]-pmc0[1]; double a = pmc1_pmc0[0]*n1_n0[0] + pmc1_pmc0[1]*n1_n0[1]; double b = pmc1_pmc0[0]*n0[0] + pmc1_pmc0[1]*n0[1] + n1_n0[0]*pmc0[0] + n1_n0[1]*pmc0[1]; double c = pmc0[0]*n0[0] + pmc0[1]*n0[1]; if (a == 0.0) { double dot0 = pmc0[0]*n0[0] + pmc0[1]*n0[1]; double dot1 = pmc1[0]*n0[0] + pmc1[1]*n0[1]; double root = -dot0 / (dot1 - dot0); //printf("Linear root: %g %g\n",root,tfraction); tfraction = root; } else { double term = sqrt(b*b - 4.0*a*c); double root1 = (-b + term) / (2.0*a); double root2 = (-b - term) / (2.0*a); //printf("ABC vecs: %g %g: %g %g\n", // pmc1_pmc0[0],pmc1_pmc0[1],n1_n0[0],n1_n0[1]); //printf("ABC vecs: %g %g: %g %g: %g %g %g\n", // n0[0],n0[1],n1[0],n1[1],theta0,theta1,big->omega[2]); //printf("ABC root: %g %g %g: %g %g %g\n",a,b,c,root1,root2,tfraction); if (0.0 <= root1 && root1 <= 1.0) tfraction = root1; else if (0.0 <= root2 && root2 <= 1.0) tfraction = root2; else error->one(FLERR,"Bad quadratic solve for particle/line collision"); } */ // check if collision pt is within line segment at collision time xsc[0] = xs0[0] + tfraction*(xs1[0]-xs0[0]); xsc[1] = xs0[1] + tfraction*(xs1[1]-xs0[1]); xbc[0] = xb0[0] + tfraction*(xb1[0]-xb0[0]); xbc[1] = xb0[1] + tfraction*(xb1[1]-xb0[1]); double delx = xsc[0] - xbc[0]; double dely = xsc[1] - xbc[1]; double rsq = delx*delx + dely*dely; if (rsq > 0.25*big->length*big->length) return 0; //nbc[0] = n0[0] + tfraction*(n1[0]-n0[0]); //nbc[1] = n0[1] + tfraction*(n1[1]-n0[1]); nbc[0] = sin(theta0 + tfraction*(theta1-theta0)); nbc[1] = -cos(theta0 + tfraction*(theta1-theta0)); return 1; } /* ---------------------------------------------------------------------- check if SRD particle S is inside triangle big particle B collision only possible if: S starts on positive side of triangle plane, which means it will collide with outside of rigid body made of tris since triangles have outward normals, S ends on negative side of triangle plane unlike most other inside() routines, then calculate exact collision: solve for collision pt on triangle plane collision if pt is inside triangle B ------------------------------------------------------------------------- */ int FixSRD::inside_tri(double *xs, double *xb, double *vs, double *vb, Big *big, double dt_step) { double pmc0[3],pmc1[3],n0[3]; double n1_n0[3],pmc1_pmc0[3]; double excoll[3],eycoll[3],ezcoll[3]; double dc1[3],dc2[3],dc3[3]; double c1[3],c2[3],c3[3]; double c2mc1[3],c3mc2[3],c1mc3[3]; double pvec[3],xproduct[3]; // 1 and 2 = start and end of timestep // pmc = P - C, where P = position of S, C = position of B // n = normal to triangle // (P-C) dot N = side of tri that S is on // side0 = -1,0,1 for which side of tri B that S is on at start of step // side1 = -1,0,1 for which side of tri B that S is on at end of step double *omega = big->omega; double *n1 = big->norm; n0[0] = n1[0] - dt_step*(omega[1]*n1[2] - omega[2]*n1[1]); n0[1] = n1[1] - dt_step*(omega[2]*n1[0] - omega[0]*n1[2]); n0[2] = n1[2] - dt_step*(omega[0]*n1[1] - omega[1]*n1[0]); pmc0[0] = xs[0] - dt_step*vs[0] - xb[0] + dt_step*vb[0]; pmc0[1] = xs[1] - dt_step*vs[1] - xb[1] + dt_step*vb[1]; pmc0[2] = xs[2] - dt_step*vs[2] - xb[2] + dt_step*vb[2]; pmc1[0] = xs[0] - xb[0]; pmc1[1] = xs[1] - xb[1]; pmc1[2] = xs[2] - xb[2]; double side0 = MathExtra::dot3(pmc0,n0); double side1 = MathExtra::dot3(pmc1,n1); if (side0 <= 0.0 || side1 >= 0.0) return 0; // solve for time t (0 to 1) at which moving particle // crosses moving/rotating tri // quadratic equation solve of approximate parametric equation n1_n0[0] = n1[0]-n0[0]; n1_n0[1] = n1[1]-n0[1]; n1_n0[2] = n1[2]-n0[2]; pmc1_pmc0[0] = pmc1[0]-pmc0[0]; pmc1_pmc0[1] = pmc1[1]-pmc0[1]; pmc1_pmc0[2] = pmc1[2]-pmc0[2]; double a = MathExtra::dot3(pmc1_pmc0,n1_n0); double b = MathExtra::dot3(pmc1_pmc0,n0) + MathExtra::dot3(n1_n0,pmc0); double c = MathExtra::dot3(pmc0,n0); if (a == 0.0) { double dot0 = MathExtra::dot3(pmc0,n0); double dot1 = MathExtra::dot3(pmc1,n0); double root = -dot0 / (dot1 - dot0); tfraction = root; } else { double term = sqrt(b*b - 4.0*a*c); double root1 = (-b + term) / (2.0*a); double root2 = (-b - term) / (2.0*a); if (0.0 <= root1 && root1 <= 1.0) tfraction = root1; else if (0.0 <= root2 && root2 <= 1.0) tfraction = root2; else error->one(FLERR,"Bad quadratic solve for particle/tri collision"); } // calculate position/orientation of S and B at collision time // dt = time previous to now at which collision occurs // point = S position in plane of triangle at collision time // Excoll,Eycoll,Ezcoll = orientation of tri at collision time // c1,c2,c3 = corner points of triangle at collision time // nbc = normal to plane of triangle at collision time AtomVecTri::Bonus *tbonus; tbonus = avec_tri->bonus; double *ex = big->ex; double *ey = big->ey; double *ez = big->ez; int index = atom->tri[big->index]; double *c1body = tbonus[index].c1; double *c2body = tbonus[index].c2; double *c3body = tbonus[index].c3; double dt = (1.0-tfraction)*dt_step; xsc[0] = xs[0] - dt*vs[0]; xsc[1] = xs[1] - dt*vs[1]; xsc[2] = xs[2] - dt*vs[2]; xbc[0] = xb[0] - dt*vb[0]; xbc[1] = xb[1] - dt*vb[1]; xbc[2] = xb[2] - dt*vb[2]; excoll[0] = ex[0] - dt*(omega[1]*ex[2] - omega[2]*ex[1]); excoll[1] = ex[1] - dt*(omega[2]*ex[0] - omega[0]*ex[2]); excoll[2] = ex[2] - dt*(omega[0]*ex[1] - omega[1]*ex[0]); eycoll[0] = ey[0] - dt*(omega[1]*ey[2] - omega[2]*ey[1]); eycoll[1] = ey[1] - dt*(omega[2]*ey[0] - omega[0]*ey[2]); eycoll[2] = ey[2] - dt*(omega[0]*ey[1] - omega[1]*ey[0]); ezcoll[0] = ez[0] - dt*(omega[1]*ez[2] - omega[2]*ez[1]); ezcoll[1] = ez[1] - dt*(omega[2]*ez[0] - omega[0]*ez[2]); ezcoll[2] = ez[2] - dt*(omega[0]*ez[1] - omega[1]*ez[0]); MathExtra::matvec(excoll,eycoll,ezcoll,c1body,dc1); MathExtra::matvec(excoll,eycoll,ezcoll,c2body,dc2); MathExtra::matvec(excoll,eycoll,ezcoll,c3body,dc3); MathExtra::add3(xbc,dc1,c1); MathExtra::add3(xbc,dc2,c2); MathExtra::add3(xbc,dc3,c3); MathExtra::sub3(c2,c1,c2mc1); MathExtra::sub3(c3,c2,c3mc2); MathExtra::sub3(c1,c3,c1mc3); MathExtra::cross3(c2mc1,c3mc2,nbc); MathExtra::norm3(nbc); // check if collision pt is within triangle // pvec = vector from tri vertex to intersection point // xproduct = cross product of edge vec with pvec // if dot product of xproduct with nbc < 0.0 for any of 3 edges, // intersection point is outside tri MathExtra::sub3(xsc,c1,pvec); MathExtra::cross3(c2mc1,pvec,xproduct); if (MathExtra::dot3(xproduct,nbc) < 0.0) return 0; MathExtra::sub3(xsc,c2,pvec); MathExtra::cross3(c3mc2,pvec,xproduct); if (MathExtra::dot3(xproduct,nbc) < 0.0) return 0; MathExtra::sub3(xsc,c3,pvec); MathExtra::cross3(c1mc3,pvec,xproduct); if (MathExtra::dot3(xproduct,nbc) < 0.0) return 0; return 1; } /* ---------------------------------------------------------------------- check if SRD particle S is inside wall IWALL ------------------------------------------------------------------------- */ int FixSRD::inside_wall(double *xs, int iwall) { int dim = wallwhich[iwall] / 2; int side = wallwhich[iwall] % 2; if (side == 0 && xs[dim] < xwall[iwall]) return 1; if (side && xs[dim] > xwall[iwall]) return 1; return 0; } /* ---------------------------------------------------------------------- collision of SRD particle S with surface of spherical big particle B exact because compute time of collision dt = time previous to now at which collision occurs xscoll = collision pt = position of SRD at time of collision xbcoll = position of big particle at time of collision norm = surface normal of collision pt at time of collision ------------------------------------------------------------------------- */ double FixSRD::collision_sphere_exact(double *xs, double *xb, double *vs, double *vb, Big *big, double *xscoll, double *xbcoll, double *norm) { double vs_dot_vs,vb_dot_vb,vs_dot_vb; double vs_dot_xb,vb_dot_xs,vs_dot_xs,vb_dot_xb; double xs_dot_xs,xb_dot_xb,xs_dot_xb; double a,b,c,scale; vs_dot_vs = vs[0]*vs[0] + vs[1]*vs[1] + vs[2]*vs[2]; vb_dot_vb = vb[0]*vb[0] + vb[1]*vb[1] + vb[2]*vb[2]; vs_dot_vb = vs[0]*vb[0] + vs[1]*vb[1] + vs[2]*vb[2]; vs_dot_xb = vs[0]*xb[0] + vs[1]*xb[1] + vs[2]*xb[2]; vb_dot_xs = vb[0]*xs[0] + vb[1]*xs[1] + vb[2]*xs[2]; vs_dot_xs = vs[0]*xs[0] + vs[1]*xs[1] + vs[2]*xs[2]; vb_dot_xb = vb[0]*xb[0] + vb[1]*xb[1] + vb[2]*xb[2]; xs_dot_xs = xs[0]*xs[0] + xs[1]*xs[1] + xs[2]*xs[2]; xb_dot_xb = xb[0]*xb[0] + xb[1]*xb[1] + xb[2]*xb[2]; xs_dot_xb = xs[0]*xb[0] + xs[1]*xb[1] + xs[2]*xb[2]; a = vs_dot_vs + vb_dot_vb - 2.0*vs_dot_vb; b = 2.0 * (vs_dot_xb + vb_dot_xs - vs_dot_xs - vb_dot_xb); c = xs_dot_xs + xb_dot_xb - 2.0*xs_dot_xb - big->radsq; double dt = (-b + sqrt(b*b - 4.0*a*c)) / (2.0*a); xscoll[0] = xs[0] - dt*vs[0]; xscoll[1] = xs[1] - dt*vs[1]; xscoll[2] = xs[2] - dt*vs[2]; xbcoll[0] = xb[0] - dt*vb[0]; xbcoll[1] = xb[1] - dt*vb[1]; xbcoll[2] = xb[2] - dt*vb[2]; norm[0] = xscoll[0] - xbcoll[0]; norm[1] = xscoll[1] - xbcoll[1]; norm[2] = xscoll[2] - xbcoll[2]; scale = 1.0/sqrt(norm[0]*norm[0] + norm[1]*norm[1] + norm[2]*norm[2]); norm[0] *= scale; norm[1] *= scale; norm[2] *= scale; return dt; } /* ---------------------------------------------------------------------- collision of SRD particle S with surface of spherical big particle B inexact because just push SRD to surface of big particle at end of step time of collision = end of step xscoll = collision pt = position of SRD at time of collision xbcoll = xb = position of big particle at time of collision norm = surface normal of collision pt at time of collision ------------------------------------------------------------------------- */ void FixSRD::collision_sphere_inexact(double *xs, double *xb, Big *big, double *xscoll, double *xbcoll, double *norm) { double scale; norm[0] = xs[0] - xb[0]; norm[1] = xs[1] - xb[1]; norm[2] = xs[2] - xb[2]; scale = 1.0/sqrt(norm[0]*norm[0] + norm[1]*norm[1] + norm[2]*norm[2]); norm[0] *= scale; norm[1] *= scale; norm[2] *= scale; xscoll[0] = xb[0] + big->radius*norm[0]; xscoll[1] = xb[1] + big->radius*norm[1]; xscoll[2] = xb[2] + big->radius*norm[2]; xbcoll[0] = xb[0]; xbcoll[1] = xb[1]; xbcoll[2] = xb[2]; } /* ---------------------------------------------------------------------- collision of SRD particle S with surface of ellipsoidal big particle B exact because compute time of collision dt = time previous to now at which collision occurs xscoll = collision pt = position of SRD at time of collision xbcoll = position of big particle at time of collision norm = surface normal of collision pt at time of collision ------------------------------------------------------------------------- */ double FixSRD::collision_ellipsoid_exact(double *xs, double *xb, double *vs, double *vb, Big *big, double *xscoll, double *xbcoll, double *norm) { double vs_vb[3],xs_xb[3],omega_ex[3],omega_ey[3],omega_ez[3]; double excoll[3],eycoll[3],ezcoll[3],delta[3],xbody[3],nbody[3]; double ax,bx,cx,ay,by,cy,az,bz,cz; double a,b,c,scale; double *omega = big->omega; double *ex = big->ex; double *ey = big->ey; double *ez = big->ez; vs_vb[0] = vs[0]-vb[0]; vs_vb[1] = vs[1]-vb[1]; vs_vb[2] = vs[2]-vb[2]; xs_xb[0] = xs[0]-xb[0]; xs_xb[1] = xs[1]-xb[1]; xs_xb[2] = xs[2]-xb[2]; MathExtra::cross3(omega,ex,omega_ex); MathExtra::cross3(omega,ey,omega_ey); MathExtra::cross3(omega,ez,omega_ez); ax = vs_vb[0]*omega_ex[0] + vs_vb[1]*omega_ex[1] + vs_vb[2]*omega_ex[2]; bx = -(vs_vb[0]*ex[0] + vs_vb[1]*ex[1] + vs_vb[2]*ex[2]); bx -= xs_xb[0]*omega_ex[0] + xs_xb[1]*omega_ex[1] + xs_xb[2]*omega_ex[2]; cx = xs_xb[0]*ex[0] + xs_xb[1]*ex[1] + xs_xb[2]*ex[2]; ay = vs_vb[0]*omega_ey[0] + vs_vb[1]*omega_ey[1] + vs_vb[2]*omega_ey[2]; by = -(vs_vb[0]*ey[0] + vs_vb[1]*ey[1] + vs_vb[2]*ey[2]); by -= xs_xb[0]*omega_ey[0] + xs_xb[1]*omega_ey[1] + xs_xb[2]*omega_ey[2]; cy = xs_xb[0]*ey[0] + xs_xb[1]*ey[1] + xs_xb[2]*ey[2]; az = vs_vb[0]*omega_ez[0] + vs_vb[1]*omega_ez[1] + vs_vb[2]*omega_ez[2]; bz = -(vs_vb[0]*ez[0] + vs_vb[1]*ez[1] + vs_vb[2]*ez[2]); bz -= xs_xb[0]*omega_ez[0] + xs_xb[1]*omega_ez[1] + xs_xb[2]*omega_ez[2]; cz = xs_xb[0]*ez[0] + xs_xb[1]*ez[1] + xs_xb[2]*ez[2]; a = (bx*bx + 2.0*ax*cx)*big->aradsqinv + (by*by + 2.0*ay*cy)*big->bradsqinv + (bz*bz + 2.0*az*cz)*big->cradsqinv; b = 2.0 * (bx*cx*big->aradsqinv + by*cy*big->bradsqinv + bz*cz*big->cradsqinv); c = cx*cx*big->aradsqinv + cy*cy*big->bradsqinv + cz*cz*big->cradsqinv - 1.0; double dt = (-b + sqrt(b*b - 4.0*a*c)) / (2.0*a); xscoll[0] = xs[0] - dt*vs[0]; xscoll[1] = xs[1] - dt*vs[1]; xscoll[2] = xs[2] - dt*vs[2]; xbcoll[0] = xb[0] - dt*vb[0]; xbcoll[1] = xb[1] - dt*vb[1]; xbcoll[2] = xb[2] - dt*vb[2]; // calculate normal to ellipsoid at collision pt // Excoll,Eycoll,Ezcoll = orientation of ellipsoid at collision time // nbody = normal in body frame of ellipsoid (Excoll,Eycoll,Ezcoll) // norm = normal in space frame // only worry about normalizing final norm vector excoll[0] = ex[0] - dt*(omega[1]*ex[2] - omega[2]*ex[1]); excoll[1] = ex[1] - dt*(omega[2]*ex[0] - omega[0]*ex[2]); excoll[2] = ex[2] - dt*(omega[0]*ex[1] - omega[1]*ex[0]); eycoll[0] = ey[0] - dt*(omega[1]*ey[2] - omega[2]*ey[1]); eycoll[1] = ey[1] - dt*(omega[2]*ey[0] - omega[0]*ey[2]); eycoll[2] = ey[2] - dt*(omega[0]*ey[1] - omega[1]*ey[0]); ezcoll[0] = ez[0] - dt*(omega[1]*ez[2] - omega[2]*ez[1]); ezcoll[1] = ez[1] - dt*(omega[2]*ez[0] - omega[0]*ez[2]); ezcoll[2] = ez[2] - dt*(omega[0]*ez[1] - omega[1]*ez[0]); MathExtra::sub3(xscoll,xbcoll,delta); MathExtra::transpose_matvec(excoll,eycoll,ezcoll,delta,xbody); nbody[0] = xbody[0]*big->aradsqinv; nbody[1] = xbody[1]*big->bradsqinv; nbody[2] = xbody[2]*big->cradsqinv; MathExtra::matvec(excoll,eycoll,ezcoll,nbody,norm); MathExtra::norm3(norm); return dt; } /* ---------------------------------------------------------------------- collision of SRD particle S with surface of ellipsoidal big particle B inexact because just push SRD to surface of big particle at end of step time of collision = end of step xscoll = collision pt = position of SRD at time of collision xbcoll = xb = position of big particle at time of collision norm = surface normal of collision pt at time of collision ------------------------------------------------------------------------- */ void FixSRD::collision_ellipsoid_inexact(double *xs, double *xb, Big *big, double *xscoll, double *xbcoll, double *norm) { double xs_xb[3],delta[3],xbody[3],nbody[3]; double *ex = big->ex; double *ey = big->ey; double *ez = big->ez; MathExtra::sub3(xs,xb,xs_xb); double x = MathExtra::dot3(xs_xb,ex); double y = MathExtra::dot3(xs_xb,ey); double z = MathExtra::dot3(xs_xb,ez); double scale = 1.0/sqrt(x*x*big->aradsqinv + y*y*big->bradsqinv + z*z*big->cradsqinv); x *= scale; y *= scale; z *= scale; xscoll[0] = x*ex[0] + y*ey[0] + z*ez[0] + xb[0]; xscoll[1] = x*ex[1] + y*ey[1] + z*ez[1] + xb[1]; xscoll[2] = x*ex[2] + y*ey[2] + z*ez[2] + xb[2]; xbcoll[0] = xb[0]; xbcoll[1] = xb[1]; xbcoll[2] = xb[2]; // calculate normal to ellipsoid at collision pt // nbody = normal in body frame of ellipsoid // norm = normal in space frame // only worry about normalizing final norm vector MathExtra::sub3(xscoll,xbcoll,delta); MathExtra::transpose_matvec(ex,ey,ez,delta,xbody); nbody[0] = xbody[0]*big->aradsqinv; nbody[1] = xbody[1]*big->bradsqinv; nbody[2] = xbody[2]*big->cradsqinv; MathExtra::matvec(ex,ey,ez,nbody,norm); MathExtra::norm3(norm); } /* ---------------------------------------------------------------------- collision of SRD particle S with surface of line big particle B exact because compute time of collision dt = time previous to now at which collision occurs xscoll = collision pt = position of SRD at time of collision xbcoll = position of big particle at time of collision norm = surface normal of collision pt at time of collision ------------------------------------------------------------------------- */ double FixSRD::collision_line_exact(double *xs, double *xb, double *vs, double *vb, Big *big, double dt_step, double *xscoll, double *xbcoll, double *norm) { xscoll[0] = xsc[0]; xscoll[1] = xsc[1]; xscoll[2] = 0.0; xbcoll[0] = xbc[0]; xbcoll[1] = xbc[1]; xbcoll[2] = 0.0; norm[0] = nbc[0]; norm[1] = nbc[1]; norm[2] = 0.0; return (1.0-tfraction)*dt_step; } /* ---------------------------------------------------------------------- collision of SRD particle S with surface of triangle big particle B exact because compute time of collision dt = time previous to now at which collision occurs xscoll = collision pt = position of SRD at time of collision xbcoll = position of big particle at time of collision norm = surface normal of collision pt at time of collision ------------------------------------------------------------------------- */ double FixSRD::collision_tri_exact(double *xs, double *xb, double *vs, double *vb, Big *big, double dt_step, double *xscoll, double *xbcoll, double *norm) { xscoll[0] = xsc[0]; xscoll[1] = xsc[1]; xscoll[2] = xsc[2]; xbcoll[0] = xbc[0]; xbcoll[1] = xbc[1]; xbcoll[2] = xbc[2]; norm[0] = nbc[0]; norm[1] = nbc[1]; norm[2] = nbc[2]; return (1.0-tfraction)*dt_step; } /* ---------------------------------------------------------------------- collision of SRD particle S with wall IWALL exact because compute time of collision dt = time previous to now at which collision occurs xscoll = collision pt = position of SRD at time of collision xbcoll = position of wall at time of collision norm = surface normal of collision pt at time of collision ------------------------------------------------------------------------- */ double FixSRD::collision_wall_exact(double *xs, int iwall, double *vs, double *xscoll, double *xbcoll, double *norm) { int dim = wallwhich[iwall] / 2; double dt = (xs[dim] - xwall[iwall]) / (vs[dim] - vwall[iwall]); xscoll[0] = xs[0] - dt*vs[0]; xscoll[1] = xs[1] - dt*vs[1]; xscoll[2] = xs[2] - dt*vs[2]; xbcoll[0] = xbcoll[1] = xbcoll[2] = 0.0; xbcoll[dim] = xwall[iwall] - dt*vwall[iwall]; int side = wallwhich[iwall] % 2; norm[0] = norm[1] = norm[2] = 0.0; if (side == 0) norm[dim] = 1.0; else norm[dim] = -1.0; return dt; } /* ---------------------------------------------------------------------- collision of SRD particle S with wall IWALL inexact because just push SRD to surface of wall at end of step time of collision = end of step xscoll = collision pt = position of SRD at time of collision xbcoll = position of wall at time of collision norm = surface normal of collision pt at time of collision ------------------------------------------------------------------------- */ void FixSRD::collision_wall_inexact(double *xs, int iwall, double *xscoll, double *xbcoll, double *norm) { int dim = wallwhich[iwall] / 2; xscoll[0] = xs[0]; xscoll[1] = xs[1]; xscoll[2] = xs[2]; xscoll[dim] = xwall[iwall]; xbcoll[0] = xbcoll[1] = xbcoll[2] = 0.0; xbcoll[dim] = xwall[iwall]; int side = wallwhich[iwall] % 2; norm[0] = norm[1] = norm[2] = 0.0; if (side == 0) norm[dim] = 1.0; else norm[dim] = -1.0; } /* ---------------------------------------------------------------------- SLIP collision with BIG particle with omega vs = velocity of SRD, vb = velocity of BIG xb = position of BIG, omega = rotation of BIG xsurf = collision pt on surf of BIG norm = unit normal from surface of BIG at collision pt v of BIG particle in direction of surf normal is added to v of SRD includes component due to rotation of BIG return vsnew of SRD ------------------------------------------------------------------------- */ void FixSRD::slip(double *vs, double *vb, double *xb, Big *big, double *xsurf, double *norm, double *vsnew) { double r1,r2,vnmag,vs_dot_n,vsurf_dot_n; double tangent[3],vsurf[3]; double *omega = big->omega; while (1) { r1 = sigma * random->gaussian(); r2 = sigma * random->gaussian(); vnmag = sqrt(r1*r1 + r2*r2); if (vnmag*vnmag <= vmaxsq) break; } vs_dot_n = vs[0]*norm[0] + vs[1]*norm[1] + vs[2]*norm[2]; tangent[0] = vs[0] - vs_dot_n*norm[0]; tangent[1] = vs[1] - vs_dot_n*norm[1]; tangent[2] = vs[2] - vs_dot_n*norm[2]; // vsurf = velocity of collision pt = translation/rotation of BIG particle // NOTE: for sphere could just use vsurf = vb, since w x (xsurf-xb) // is orthogonal to norm and thus doesn't contribute to vsurf_dot_n vsurf[0] = vb[0] + omega[1]*(xsurf[2]-xb[2]) - omega[2]*(xsurf[1]-xb[1]); vsurf[1] = vb[1] + omega[2]*(xsurf[0]-xb[0]) - omega[0]*(xsurf[2]-xb[2]); vsurf[2] = vb[2] + omega[0]*(xsurf[1]-xb[1]) - omega[1]*(xsurf[0]-xb[0]); vsurf_dot_n = vsurf[0]*norm[0] + vsurf[1]*norm[1] + vsurf[2]*norm[2]; vsnew[0] = (vnmag+vsurf_dot_n)*norm[0] + tangent[0]; vsnew[1] = (vnmag+vsurf_dot_n)*norm[1] + tangent[1]; vsnew[2] = (vnmag+vsurf_dot_n)*norm[2] + tangent[2]; } /* ---------------------------------------------------------------------- SLIP collision with wall IWALL vs = velocity of SRD norm = unit normal from WALL at collision pt v of WALL in direction of surf normal is added to v of SRD return vsnew of SRD ------------------------------------------------------------------------- */ void FixSRD::slip_wall(double *vs, int iwall, double *norm, double *vsnew) { double vs_dot_n,scale,r1,r2,vnmag,vtmag1,vtmag2; double tangent1[3],tangent2[3]; vs_dot_n = vs[0]*norm[0] + vs[1]*norm[1] + vs[2]*norm[2]; tangent1[0] = vs[0] - vs_dot_n*norm[0]; tangent1[1] = vs[1] - vs_dot_n*norm[1]; tangent1[2] = vs[2] - vs_dot_n*norm[2]; scale = 1.0/sqrt(tangent1[0]*tangent1[0] + tangent1[1]*tangent1[1] + tangent1[2]*tangent1[2]); tangent1[0] *= scale; tangent1[1] *= scale; tangent1[2] *= scale; tangent2[0] = norm[1]*tangent1[2] - norm[2]*tangent1[1]; tangent2[1] = norm[2]*tangent1[0] - norm[0]*tangent1[2]; tangent2[2] = norm[0]*tangent1[1] - norm[1]*tangent1[0]; while (1) { r1 = sigma * random->gaussian(); r2 = sigma * random->gaussian(); vnmag = sqrt(r1*r1 + r2*r2); vtmag1 = sigma * random->gaussian(); vtmag2 = sigma * random->gaussian(); if (vnmag*vnmag + vtmag1*vtmag1 + vtmag2*vtmag2 <= vmaxsq) break; } vsnew[0] = vnmag*norm[0] + vtmag1*tangent1[0] + vtmag2*tangent2[0]; vsnew[1] = vnmag*norm[1] + vtmag1*tangent1[1] + vtmag2*tangent2[1]; vsnew[2] = vnmag*norm[2] + vtmag1*tangent1[2] + vtmag2*tangent2[2]; // add in velocity of collision pt = velocity of wall int dim = wallwhich[iwall] / 2; vsnew[dim] += vwall[iwall]; } /* ---------------------------------------------------------------------- NO-SLIP collision with BIG particle including WALL vs = velocity of SRD, vb = velocity of BIG xb = position of BIG, omega = rotation of BIG xsurf = collision pt on surf of BIG norm = unit normal from surface of BIG at collision pt v of collision pt is added to v of SRD includes component due to rotation of BIG return vsnew of SRD ------------------------------------------------------------------------- */ void FixSRD::noslip(double *vs, double *vb, double *xb, Big *big, int iwall, double *xsurf, double *norm, double *vsnew) { double vs_dot_n,scale,r1,r2,vnmag,vtmag1,vtmag2; double tangent1[3],tangent2[3]; vs_dot_n = vs[0]*norm[0] + vs[1]*norm[1] + vs[2]*norm[2]; tangent1[0] = vs[0] - vs_dot_n*norm[0]; tangent1[1] = vs[1] - vs_dot_n*norm[1]; tangent1[2] = vs[2] - vs_dot_n*norm[2]; scale = 1.0/sqrt(tangent1[0]*tangent1[0] + tangent1[1]*tangent1[1] + tangent1[2]*tangent1[2]); tangent1[0] *= scale; tangent1[1] *= scale; tangent1[2] *= scale; tangent2[0] = norm[1]*tangent1[2] - norm[2]*tangent1[1]; tangent2[1] = norm[2]*tangent1[0] - norm[0]*tangent1[2]; tangent2[2] = norm[0]*tangent1[1] - norm[1]*tangent1[0]; while (1) { r1 = sigma * random->gaussian(); r2 = sigma * random->gaussian(); vnmag = sqrt(r1*r1 + r2*r2); vtmag1 = sigma * random->gaussian(); vtmag2 = sigma * random->gaussian(); if (vnmag*vnmag + vtmag1*vtmag1 + vtmag2*vtmag2 <= vmaxsq) break; } vsnew[0] = vnmag*norm[0] + vtmag1*tangent1[0] + vtmag2*tangent2[0]; vsnew[1] = vnmag*norm[1] + vtmag1*tangent1[1] + vtmag2*tangent2[1]; vsnew[2] = vnmag*norm[2] + vtmag1*tangent1[2] + vtmag2*tangent2[2]; // add in velocity of collision pt // for WALL: velocity of wall in one dim // else: translation/rotation of BIG particle if (big->type == WALL) { int dim = wallwhich[iwall] / 2; vsnew[dim] += vwall[iwall]; } else { double *omega = big->omega; vsnew[0] += vb[0] + omega[1]*(xsurf[2]-xb[2]) - omega[2]*(xsurf[1]-xb[1]); vsnew[1] += vb[1] + omega[2]*(xsurf[0]-xb[0]) - omega[0]*(xsurf[2]-xb[2]); vsnew[2] += vb[2] + omega[0]*(xsurf[1]-xb[1]) - omega[1]*(xsurf[0]-xb[0]); } } /* ---------------------------------------------------------------------- impart force and torque to BIG particle force on BIG particle = -dp/dt of SRD particle torque on BIG particle = r cross (-dp/dt) ------------------------------------------------------------------------- */ void FixSRD::force_torque(double *vsold, double *vsnew, double *xs, double *xb, double *fb, double *tb) { double dpdt[3],xs_xb[3]; double factor = mass_srd / dt_big / force->ftm2v; dpdt[0] = factor * (vsnew[0] - vsold[0]); dpdt[1] = factor * (vsnew[1] - vsold[1]); dpdt[2] = factor * (vsnew[2] - vsold[2]); fb[0] -= dpdt[0]; fb[1] -= dpdt[1]; fb[2] -= dpdt[2]; // no torque if SLIP collision and BIG is a sphere if (tb) { xs_xb[0] = xs[0]-xb[0]; xs_xb[1] = xs[1]-xb[1]; xs_xb[2] = xs[2]-xb[2]; tb[0] -= xs_xb[1]*dpdt[2] - xs_xb[2]*dpdt[1]; tb[1] -= xs_xb[2]*dpdt[0] - xs_xb[0]*dpdt[2]; tb[2] -= xs_xb[0]*dpdt[1] - xs_xb[1]*dpdt[0]; } } /* ---------------------------------------------------------------------- impart force to WALL force on WALL = -dp/dt of SRD particle ------------------------------------------------------------------------- */ void FixSRD::force_wall(double *vsold, double *vsnew, int iwall) { double dpdt[3]; double factor = mass_srd / dt_big / force->ftm2v; dpdt[0] = factor * (vsnew[0] - vsold[0]); dpdt[1] = factor * (vsnew[1] - vsold[1]); dpdt[2] = factor * (vsnew[2] - vsold[2]); fwall[iwall][0] -= dpdt[0]; fwall[iwall][1] -= dpdt[1]; fwall[iwall][2] -= dpdt[2]; } /* ---------------------------------------------------------------------- update SRD particle position & velocity & search bin assignment check if SRD moved outside of valid region if so, may overlap off-processor BIG particle ------------------------------------------------------------------------- */ int FixSRD::update_srd(int i, double dt, double *xscoll, double *vsnew, double *xs, double *vs) { int ix,iy,iz; vs[0] = vsnew[0]; vs[1] = vsnew[1]; vs[2] = vsnew[2]; xs[0] = xscoll[0] + dt*vsnew[0]; xs[1] = xscoll[1] + dt*vsnew[1]; xs[2] = xscoll[2] + dt*vsnew[2]; if (triclinic) domain->x2lamda(xs,xs); if (xs[0] < srdlo[0] || xs[0] > srdhi[0] || xs[1] < srdlo[1] || xs[1] > srdhi[1] || xs[2] < srdlo[2] || xs[2] > srdhi[2]) { if (screen) { error->warning(FLERR,"Fix srd particle moved outside valid domain"); fprintf(screen," particle %d on proc %d at timestep " BIGINT_FORMAT, atom->tag[i],me,update->ntimestep); fprintf(screen," xnew %g %g %g\n",xs[0],xs[1],xs[2]); fprintf(screen," srdlo/hi x %g %g\n",srdlo[0],srdhi[0]); fprintf(screen," srdlo/hi y %g %g\n",srdlo[1],srdhi[1]); fprintf(screen," srdlo/hi z %g %g\n",srdlo[2],srdhi[2]); } } if (triclinic) domain->lamda2x(xs,xs); ix = static_cast<int> ((xs[0]-xblo2)*bininv2x); iy = static_cast<int> ((xs[1]-yblo2)*bininv2y); iz = static_cast<int> ((xs[2]-zblo2)*bininv2z); return iz*nbin2y*nbin2x + iy*nbin2x + ix; } /* ---------------------------------------------------------------------- setup all SRD parameters with big particles ------------------------------------------------------------------------- */ void FixSRD::parameterize() { // timesteps dt_big = update->dt; dt_srd = nevery * update->dt; // maxbigdiam,minbigdiam = max/min diameter of any big particle // big particle must either have radius > 0 or shape > 0 defined // apply radfactor at end AtomVecEllipsoid::Bonus *ebonus; if (avec_ellipsoid) ebonus = avec_ellipsoid->bonus; AtomVecLine::Bonus *lbonus; if (avec_line) lbonus = avec_line->bonus; AtomVecTri::Bonus *tbonus; if (avec_tri) tbonus = avec_tri->bonus; double *radius = atom->radius; int *ellipsoid = atom->ellipsoid; int *line = atom->line; int *tri = atom->tri; int *mask = atom->mask; int nlocal = atom->nlocal; int any_ellipsoids = 0; int any_lines = 0; int any_tris = 0; maxbigdiam = 0.0; minbigdiam = BIG; for (int i = 0; i < nlocal; i++) if (mask[i] & biggroupbit) { if (radius && radius[i] > 0.0) { maxbigdiam = MAX(maxbigdiam,2.0*radius[i]); minbigdiam = MIN(minbigdiam,2.0*radius[i]); } else if (ellipsoid && ellipsoid[i] >= 0) { any_ellipsoids = 1; double *shape = ebonus[ellipsoid[i]].shape; maxbigdiam = MAX(maxbigdiam,2.0*shape[0]); maxbigdiam = MAX(maxbigdiam,2.0*shape[1]); maxbigdiam = MAX(maxbigdiam,2.0*shape[2]); minbigdiam = MIN(minbigdiam,2.0*shape[0]); minbigdiam = MIN(minbigdiam,2.0*shape[1]); minbigdiam = MIN(minbigdiam,2.0*shape[2]); } else if (line && line[i] >= 0) { any_lines = 1; double length = lbonus[line[i]].length; maxbigdiam = MAX(maxbigdiam,length); minbigdiam = MIN(minbigdiam,length); } else if (tri && tri[i] >= 0) { any_tris = 1; double length1 = MathExtra::len3(tbonus[tri[i]].c1); double length2 = MathExtra::len3(tbonus[tri[i]].c2); double length3 = MathExtra::len3(tbonus[tri[i]].c3); double length = MAX(length1,length2); length = MAX(length,length3); maxbigdiam = MAX(maxbigdiam,length); minbigdiam = MIN(minbigdiam,length); } else error->one(FLERR,"Big particle in fix srd cannot be point particle"); } double tmp = maxbigdiam; MPI_Allreduce(&tmp,&maxbigdiam,1,MPI_DOUBLE,MPI_MAX,world); tmp = minbigdiam; MPI_Allreduce(&tmp,&minbigdiam,1,MPI_DOUBLE,MPI_MIN,world); maxbigdiam *= radfactor; minbigdiam *= radfactor; int itmp = any_ellipsoids; MPI_Allreduce(&itmp,&any_ellipsoids,1,MPI_INT,MPI_MAX,world); itmp = any_lines; MPI_Allreduce(&itmp,&any_lines,1,MPI_INT,MPI_MAX,world); itmp = any_tris; MPI_Allreduce(&itmp,&any_tris,1,MPI_INT,MPI_MAX,world); if (any_lines && overlap == 0) error->all(FLERR,"Cannot use lines with fix srd unless overlap is set"); if (any_tris && overlap == 0) error->all(FLERR,"Cannot use tris with fix srd unless overlap is set"); // big particles are only torqued if ellipsoids/lines/tris or NOSLIP if (any_ellipsoids == 0 && any_lines == 0 && any_tris == 0 && collidestyle == SLIP) torqueflag = 0; else torqueflag = 1; // mass of SRD particles, require monodispersity double *rmass = atom->rmass; double *mass = atom->mass; int *type = atom->type; int flag = 0; mass_srd = 0.0; for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { if (rmass) { if (mass_srd == 0.0) mass_srd = rmass[i]; else if (rmass[i] != mass_srd) flag = 1; } else { if (mass_srd == 0.0) mass_srd = mass[type[i]]; else if (mass[type[i]] != mass_srd) flag = 1; } } int flagall; MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_MAX,world); if (flagall) error->all(FLERR,"Fix srd requires SRD particles all have same mass"); // set temperature and lamda of SRD particles from each other // lamda = dt_srd * sqrt(boltz * temperature_srd / mass_srd); if (lamdaflag == 0) lamda = dt_srd * sqrt(force->boltz*temperature_srd/mass_srd/force->mvv2e); else temperature_srd = force->mvv2e * (lamda/dt_srd)*(lamda/dt_srd) * mass_srd/force->boltz; // vmax = maximum velocity of an SRD particle // dmax = maximum distance an SRD can move = 4*lamda = vmax * dt_srd sigma = lamda/dt_srd; dmax = 4.0*lamda; vmax = dmax/dt_srd; vmaxsq = vmax*vmax; // volbig = total volume of all big particles // LINE/TRI particles have no volume // incorrect if part of rigid particles, so add fudge factor with WIDTH // apply radfactor to reduce final volume double volbig = 0.0; double WIDTH = 1.0; if (dimension == 3) { for (int i = 0; i < nlocal; i++) if (mask[i] & biggroupbit) { if (radius && radius[i] > 0.0) { double r = radfactor * radius[i]; volbig += 4.0/3.0*MY_PI * r*r*r;; } else if (ellipsoid && ellipsoid[i] >= 0) { double *shape = ebonus[ellipsoid[i]].shape; volbig += 4.0/3.0*MY_PI * shape[0]*shape[1]*shape[2] * radfactor*radfactor*radfactor; } else if (tri && tri[i] >= 0) { double *c1 = tbonus[tri[i]].c1; double *c2 = tbonus[tri[i]].c2; double *c3 = tbonus[tri[i]].c3; double c2mc1[3],c3mc1[3],cross[3]; MathExtra::sub3(c2,c1,c2mc1); MathExtra::sub3(c3,c1,c3mc1); MathExtra::cross3(c2mc1,c3mc1,cross); volbig += 0.5 * MathExtra::len3(cross); } } } else { for (int i = 0; i < nlocal; i++) if (mask[i] & biggroupbit) { if (radius && radius[i] > 0.0) { double r = radfactor * radius[i]; volbig += MY_PI * r*r; } else if (ellipsoid && ellipsoid[i] >= 0) { double *shape = ebonus[ellipsoid[i]].shape; volbig += MY_PI * shape[0]*shape[1] * radfactor*radfactor; } else if (line && line[i] >= 0) { double length = lbonus[line[i]].length; volbig += length * WIDTH; } } } tmp = volbig; MPI_Allreduce(&tmp,&volbig,1,MPI_DOUBLE,MPI_SUM,world); // particle counts bigint mbig = 0; if (bigexist) mbig = group->count(biggroup); bigint nsrd = group->count(igroup); // mass_big = total mass of all big particles mass_big = 0.0; for (int i = 0; i < nlocal; i++) if (mask[i] & biggroupbit) { if (rmass) mass_big += rmass[i]; else mass_big += mass[type[i]]; } tmp = mass_big; MPI_Allreduce(&tmp,&mass_big,1,MPI_DOUBLE,MPI_SUM,world); // mass density ratio = big / SRD double density_big = 0.0; if (bigexist) density_big = mass_big / volbig; double volsrd,density_srd; if (dimension == 3) { volsrd = (domain->xprd * domain->yprd * domain->zprd) - volbig; density_srd = nsrd * mass_srd / (domain->xprd*domain->yprd*domain->zprd - volbig); } else { volsrd = (domain->xprd * domain->yprd) - volbig; density_srd = nsrd * mass_srd / (domain->xprd*domain->yprd - volbig); } double mdratio = density_big/density_srd; // create grid for binning/rotating SRD particles from gridsrd setup_velocity_bins(); // binsize3 = binsize1 in box units (not lamda units for triclinic) double binsize3x = binsize1x; double binsize3y = binsize1y; double binsize3z = binsize1z; if (triclinic) { binsize3x = binsize1x * domain->xprd; binsize3y = binsize1y * domain->yprd; binsize3z = binsize1z * domain->zprd; } // srd_per_grid = # of SRD particles per SRD grid cell double ncell; if (dimension == 3) ncell = volsrd / (binsize3x*binsize3y*binsize3z); else ncell = volsrd / (binsize3x*binsize3y); srd_per_cell = (double) nsrd / ncell; // kinematic viscosity of SRD fluid // output in cm^2/sec units, converted by xxt2kmu double viscosity; if (dimension == 3) viscosity = gridsrd*gridsrd/(18.0*dt_srd) * (1.0-(1.0-exp(-srd_per_cell))/srd_per_cell) + (force->boltz*temperature_srd*dt_srd/(4.0*mass_srd*force->mvv2e)) * ((srd_per_cell+2.0)/(srd_per_cell-1.0)); else viscosity = (force->boltz*temperature_srd*dt_srd/(2.0*mass_srd*force->mvv2e)) * (srd_per_cell/(srd_per_cell-1.0 + exp(-srd_per_cell)) - 1.0) + (gridsrd*gridsrd)/(12.0*dt_srd) * ((srd_per_cell-1.0 + exp(-srd_per_cell))/srd_per_cell); viscosity *= force->xxt2kmu; // print SRD parameters if (me == 0) { if (screen) { fprintf(screen,"SRD info:\n"); fprintf(screen, " SRD/big particles = " BIGINT_FORMAT " " BIGINT_FORMAT "\n", nsrd,mbig); fprintf(screen," big particle diameter max/min = %g %g\n", maxbigdiam,minbigdiam); fprintf(screen," SRD temperature & lamda = %g %g\n", temperature_srd,lamda); fprintf(screen," SRD max distance & max velocity = %g %g\n",dmax,vmax); fprintf(screen," SRD grid counts: %d %d %d\n",nbin1x,nbin1y,nbin1z); fprintf(screen," SRD grid size: request, actual (xyz) = %g, %g %g %g\n", gridsrd,binsize3x,binsize3y,binsize3z); fprintf(screen," SRD per actual grid cell = %g\n",srd_per_cell); fprintf(screen," SRD viscosity = %g\n",viscosity); fprintf(screen," big/SRD mass density ratio = %g\n",mdratio); } if (logfile) { fprintf(logfile,"SRD info:\n"); fprintf(logfile, " SRD/big particles = " BIGINT_FORMAT " " BIGINT_FORMAT "\n", nsrd,mbig); fprintf(logfile," big particle diameter max/min = %g %g\n", maxbigdiam,minbigdiam); fprintf(logfile," SRD temperature & lamda = %g %g\n", temperature_srd,lamda); fprintf(logfile," SRD max distance & max velocity = %g %g\n",dmax,vmax); fprintf(logfile," SRD grid counts: %d %d %d\n",nbin1x,nbin1y,nbin1z); fprintf(logfile," SRD grid size: request, actual (xyz) = %g, %g %g %g\n", gridsrd,binsize3x,binsize3y,binsize3z); fprintf(logfile," SRD per actual grid cell = %g\n",srd_per_cell); fprintf(logfile," SRD viscosity = %g\n",viscosity); fprintf(logfile," big/SRD mass density ratio = %g\n",mdratio); } } // error if less than 1 SRD bin per processor in some dim if (nbin1x < comm->procgrid[0] || nbin1y < comm->procgrid[1] || nbin1z < comm->procgrid[2]) error->all(FLERR,"Fewer SRD bins than processors in some dimension"); // check if SRD bins are within tolerance for shape and size int tolflag = 0; if (binsize3y/binsize3x > 1.0+cubictol || binsize3x/binsize3y > 1.0+cubictol) tolflag = 1; if (dimension == 3) { if (binsize3z/binsize3x > 1.0+cubictol || binsize3x/binsize3z > 1.0+cubictol) tolflag = 1; } if (tolflag) { if (cubicflag == CUBIC_ERROR) error->all(FLERR,"SRD bins for fix srd are not cubic enough"); if (me == 0) error->warning(FLERR,"SRD bins for fix srd are not cubic enough"); } tolflag = 0; if (binsize3x/gridsrd > 1.0+cubictol || gridsrd/binsize3x > 1.0+cubictol) tolflag = 1; if (binsize3y/gridsrd > 1.0+cubictol || gridsrd/binsize3y > 1.0+cubictol) tolflag = 1; if (dimension == 3) { if (binsize3z/gridsrd > 1.0+cubictol || gridsrd/binsize3z > 1.0+cubictol) tolflag = 1; } if (tolflag) { if (cubicflag == CUBIC_ERROR) error->all(FLERR,"SRD bin size for fix srd differs from user request"); if (me == 0) error->warning(FLERR, "SRD bin size for fix srd differs from user request"); } // error if lamda < 0.6 of SRD grid size and no shifting allowed // turn on shifting in this case if allowed double maxgridsrd = MAX(binsize3x,binsize3y); if (dimension == 3) maxgridsrd = MAX(maxgridsrd,binsize3z); shiftflag = 0; if (lamda < 0.6*maxgridsrd && shiftuser == SHIFT_NO) error->all(FLERR,"Fix srd lamda must be >= 0.6 of SRD grid size"); else if (lamda < 0.6*maxgridsrd && shiftuser == SHIFT_POSSIBLE) { shiftflag = 1; if (me == 0) error->warning(FLERR,"SRD bin shifting turned on due to small lamda"); } else if (shiftuser == SHIFT_YES) shiftflag = 1; // warnings if (bigexist && maxgridsrd > 0.25 * minbigdiam && me == 0) error->warning(FLERR,"Fix srd grid size > 1/4 of big particle diameter"); if (viscosity < 0.0 && me == 0) error->warning(FLERR,"Fix srd viscosity < 0.0 due to low SRD density"); if (bigexist && dt_big*vmax > minbigdiam && me == 0) error->warning(FLERR,"Fix srd particles may move > big particle diameter"); } /* ---------------------------------------------------------------------- set static parameters of each big particle, owned and ghost called each reneighboring use radfactor in distance parameters as appropriate ------------------------------------------------------------------------- */ void FixSRD::big_static() { int i; double rad,arad,brad,crad,length,length1,length2,length3; double *shape,*c1,*c2,*c3; double c2mc1[3],c3mc1[3]; AtomVecEllipsoid::Bonus *ebonus; if (avec_ellipsoid) ebonus = avec_ellipsoid->bonus; AtomVecLine::Bonus *lbonus; if (avec_line) lbonus = avec_line->bonus; AtomVecTri::Bonus *tbonus; if (avec_tri) tbonus = avec_tri->bonus; double *radius = atom->radius; int *ellipsoid = atom->ellipsoid; int *line = atom->line; int *tri = atom->tri; int *type = atom->type; double skinhalf = 0.5 * neighbor->skin; for (int k = 0; k < nbig; k++) { i = biglist[k].index; // sphere // set radius and radsq and cutoff based on radius if (radius && radius[i] > 0.0) { biglist[k].type = SPHERE; rad = radfactor*radius[i]; biglist[k].radius = rad; biglist[k].radsq = rad*rad; biglist[k].cutbinsq = (rad+skinhalf) * (rad+skinhalf); // ellipsoid // set abc radsqinv and cutoff based on max radius } else if (ellipsoid && ellipsoid[i] >= 0) { shape = ebonus[ellipsoid[i]].shape; biglist[k].type = ELLIPSOID; arad = radfactor*shape[0]; brad = radfactor*shape[1]; crad = radfactor*shape[2]; biglist[k].aradsqinv = 1.0/(arad*arad); biglist[k].bradsqinv = 1.0/(brad*brad); biglist[k].cradsqinv = 1.0/(crad*crad); rad = MAX(arad,brad); rad = MAX(rad,crad); biglist[k].cutbinsq = (rad+skinhalf) * (rad+skinhalf); // line // set length and cutoff based on 1/2 length } else if (line && line[i] >= 0) { length = lbonus[line[i]].length; biglist[k].type = LINE; biglist[k].length = length; rad = 0.5*length; biglist[k].cutbinsq = (rad+skinhalf) * (rad+skinhalf); // tri // set normbody based on c1,c2,c3 // set cutoff based on point furthest from centroid } else if (tri && tri[i] >= 0) { biglist[k].type = TRIANGLE; c1 = tbonus[tri[i]].c1; c2 = tbonus[tri[i]].c2; c3 = tbonus[tri[i]].c3; MathExtra::sub3(c2,c1,c2mc1); MathExtra::sub3(c3,c1,c3mc1); MathExtra::cross3(c2mc1,c3mc1,biglist[k].normbody); length1 = MathExtra::len3(c1); length2 = MathExtra::len3(c2); length3 = MathExtra::len3(c3); rad = MAX(length1,length2); rad = MAX(rad,length3); biglist[k].cutbinsq = (rad+skinhalf) * (rad+skinhalf); } } } /* ---------------------------------------------------------------------- set dynamic parameters of each big particle, owned and ghost called each timestep ------------------------------------------------------------------------- */ void FixSRD::big_dynamic() { int i; double *shape,*quat,*inertia; double inertiaone[3]; AtomVecEllipsoid::Bonus *ebonus; if (avec_ellipsoid) ebonus = avec_ellipsoid->bonus; AtomVecLine::Bonus *lbonus; if (avec_line) lbonus = avec_line->bonus; AtomVecTri::Bonus *tbonus; if (avec_tri) tbonus = avec_tri->bonus; double **omega = atom->omega; double **angmom = atom->angmom; double *rmass = atom->rmass; int *ellipsoid = atom->ellipsoid; int *line = atom->line; int *tri = atom->tri; for (int k = 0; k < nbig; k++) { i = biglist[k].index; // sphere // set omega from atom->omega directly if (biglist[k].type == SPHERE) { biglist[k].omega[0] = omega[i][0]; biglist[k].omega[1] = omega[i][1]; biglist[k].omega[2] = omega[i][2]; // ellipsoid // set ex,ey,ez from quaternion // set omega from angmom & ex,ey,ez } else if (biglist[k].type == ELLIPSOID) { quat = ebonus[ellipsoid[i]].quat; MathExtra::q_to_exyz(quat,biglist[k].ex,biglist[k].ey,biglist[k].ez); shape = ebonus[ellipsoid[i]].shape; inertiaone[0] = EINERTIA*rmass[i] * (shape[1]*shape[1]+shape[2]*shape[2]); inertiaone[1] = EINERTIA*rmass[i] * (shape[0]*shape[0]+shape[2]*shape[2]); inertiaone[2] = EINERTIA*rmass[i] * (shape[0]*shape[0]+shape[1]*shape[1]); MathExtra::angmom_to_omega(angmom[i], biglist[k].ex,biglist[k].ey,biglist[k].ez, inertiaone,biglist[k].omega); // line // set omega from atom->omega directly } else if (biglist[k].type == LINE) { biglist[k].theta = lbonus[line[i]].theta; biglist[k].omega[0] = omega[i][0]; biglist[k].omega[1] = omega[i][1]; biglist[k].omega[2] = omega[i][2]; // tri // set ex,ey,ez from quaternion // set omega from angmom & ex,ey,ez // set unit space-frame norm from body-frame norm } else if (biglist[k].type == TRIANGLE) { quat = tbonus[tri[i]].quat; MathExtra::q_to_exyz(quat,biglist[k].ex,biglist[k].ey,biglist[k].ez); inertia = tbonus[tri[i]].inertia; MathExtra::angmom_to_omega(angmom[i], biglist[k].ex,biglist[k].ey,biglist[k].ez, inertia,biglist[k].omega); MathExtra::matvec(biglist[k].ex,biglist[k].ey,biglist[k].ez, biglist[k].normbody,biglist[k].norm); MathExtra::norm3(biglist[k].norm); } } } /* ---------------------------------------------------------------------- set bounds for big and SRD particle movement called at setup() and when box size changes (but not shape) ------------------------------------------------------------------------- */ void FixSRD::setup_bounds() { // triclinic scale factors // convert a real distance (perpendicular to box face) to a lamda distance double length0,length1,length2; if (triclinic) { double *h_inv = domain->h_inv; length0 = sqrt(h_inv[0]*h_inv[0] + h_inv[5]*h_inv[5] + h_inv[4]*h_inv[4]); length1 = sqrt(h_inv[1]*h_inv[1] + h_inv[3]*h_inv[3]); length2 = h_inv[2]; } // collision object = CO = big particle or wall // big particles can be owned or ghost or unknown, walls are all owned // dist_ghost = distance from sub-domain (SD) that // owned/ghost CO may move to before reneigh, // used to bound search bins in setup_search_bins() // dist_srd = distance from SD at which SRD could collide with unknown CO, // used to error check bounds of SRD movement after collisions via srdlo/hi // dist_srd_reneigh = distance from SD at which an SRD should trigger // a reneigh, b/c next SRD move might overlap with unknown CO, // used for SRD triggering of reneighboring via srdlo/hi_reneigh // onemove = max distance an SRD can move in one step // if big_particles (and possibly walls): // dist_ghost = cut + 1/2 skin due to moving away before reneigh // dist_srd = cut - 1/2 skin - 1/2 diam due to ghost CO moving towards // dist_reneigh = dist_srd - onemove // if walls and no big particles: // dist_ghost = 0.0, since not used // if no big particles or walls: // dist_ghost and dist_srd = 0.0, since not used since no search bins // dist_srd_reneigh = subsize - onemove = // max distance to move without being lost during comm->exchange() // subsize = perp distance between sub-domain faces (orthog or triclinic) double cut = MAX(neighbor->cutneighmax,comm->cutghostuser); double onemove = dt_big*vmax; if (bigexist) { dist_ghost = cut + 0.5*neighbor->skin; dist_srd = cut - 0.5*neighbor->skin - 0.5*maxbigdiam; dist_srd_reneigh = dist_srd - onemove; } else if (wallexist) { dist_ghost = 4*onemove; dist_srd = 4*onemove; dist_srd_reneigh = 4*onemove - onemove; } else { dist_ghost = dist_srd = 0.0; double subsize; if (triclinic == 0) { subsize = domain->prd[0]/comm->procgrid[0]; subsize = MIN(subsize,domain->prd[1]/comm->procgrid[1]); if (dimension == 3) subsize = MIN(subsize,domain->prd[2]/comm->procgrid[2]); } else { subsize = 1.0/comm->procgrid[0]/length0; subsize = MIN(subsize,1.0/comm->procgrid[1]/length1); if (dimension == 3) subsize = MIN(subsize,1.0/comm->procgrid[2]/length2); } dist_srd_reneigh = subsize - onemove; } // lo/hi = bbox on this proc which SRD particles must stay inside // lo/hi reneigh = bbox on this proc outside of which SRDs trigger a reneigh // for triclinic, these bbox are in lamda units if (triclinic == 0) { srdlo[0] = domain->sublo[0] - dist_srd; srdhi[0] = domain->subhi[0] + dist_srd; srdlo[1] = domain->sublo[1] - dist_srd; srdhi[1] = domain->subhi[1] + dist_srd; srdlo[2] = domain->sublo[2] - dist_srd; srdhi[2] = domain->subhi[2] + dist_srd; srdlo_reneigh[0] = domain->sublo[0] - dist_srd_reneigh; srdhi_reneigh[0] = domain->subhi[0] + dist_srd_reneigh; srdlo_reneigh[1] = domain->sublo[1] - dist_srd_reneigh; srdhi_reneigh[1] = domain->subhi[1] + dist_srd_reneigh; srdlo_reneigh[2] = domain->sublo[2] - dist_srd_reneigh; srdhi_reneigh[2] = domain->subhi[2] + dist_srd_reneigh; } else { srdlo[0] = domain->sublo_lamda[0] - dist_srd*length0; srdhi[0] = domain->subhi_lamda[0] + dist_srd*length0; srdlo[1] = domain->sublo_lamda[1] - dist_srd*length1; srdhi[1] = domain->subhi_lamda[1] + dist_srd*length1; srdlo[2] = domain->sublo_lamda[2] - dist_srd*length2; srdhi[2] = domain->subhi_lamda[2] + dist_srd*length2; srdlo_reneigh[0] = domain->sublo_lamda[0] - dist_srd_reneigh*length0; srdhi_reneigh[0] = domain->subhi_lamda[0] + dist_srd_reneigh*length0; srdlo_reneigh[1] = domain->sublo_lamda[1] - dist_srd_reneigh*length1; srdhi_reneigh[1] = domain->subhi_lamda[1] + dist_srd_reneigh*length1; srdlo_reneigh[2] = domain->sublo_lamda[2] - dist_srd_reneigh*length2; srdhi_reneigh[2] = domain->subhi_lamda[2] + dist_srd_reneigh*length2; } } /* ---------------------------------------------------------------------- setup bins used for binning SRD particles for velocity reset gridsrd = desired bin size also setup bin shifting parameters also setup comm of bins that straddle processor boundaries called at beginning of each run called every reneighbor if box size changes, but not if box shape changes ------------------------------------------------------------------------- */ void FixSRD::setup_velocity_bins() { // require integer # of bins across global domain nbin1x = static_cast<int> (domain->xprd/gridsrd + 0.5); nbin1y = static_cast<int> (domain->yprd/gridsrd + 0.5); nbin1z = static_cast<int> (domain->zprd/gridsrd + 0.5); if (dimension == 2) nbin1z = 1; if (nbin1x == 0) nbin1x = 1; if (nbin1y == 0) nbin1y = 1; if (nbin1z == 0) nbin1z = 1; if (triclinic == 0) { binsize1x = domain->xprd / nbin1x; binsize1y = domain->yprd / nbin1y; binsize1z = domain->zprd / nbin1z; bininv1x = 1.0/binsize1x; bininv1y = 1.0/binsize1y; bininv1z = 1.0/binsize1z; } else { binsize1x = 1.0 / nbin1x; binsize1y = 1.0 / nbin1y; binsize1z = 1.0 / nbin1z; bininv1x = nbin1x; bininv1y = nbin1y; bininv1z = nbin1z; } nbins1 = nbin1x*nbin1y*nbin1z; // setup two shifts, 0 = no shift, 1 = shift // initialize no shift case since static // shift case is dynamic, has to be initialized each time shift occurs // setup_velocity_shift allocates memory for vbin and sendlist/recvlist double *boxlo; if (triclinic == 0) boxlo = domain->boxlo; else boxlo = domain->boxlo_lamda; shifts[0].corner[0] = boxlo[0]; shifts[0].corner[1] = boxlo[1]; shifts[0].corner[2] = boxlo[2]; setup_velocity_shift(0,0); shifts[1].corner[0] = boxlo[0]; shifts[1].corner[1] = boxlo[1]; shifts[1].corner[2] = boxlo[2]; setup_velocity_shift(1,0); // allocate binhead based on max # of bins in either shift int max = shifts[0].nbins; max = MAX(max,shifts[1].nbins); if (max > maxbin1) { memory->destroy(binhead); maxbin1 = max; memory->create(binhead,max,"fix/srd:binhead"); } // allocate sbuf,rbuf based on biggest bin message max = 0; for (int ishift = 0; ishift < 2; ishift++) for (int iswap = 0; iswap < 2*dimension; iswap++) { max = MAX(max,shifts[ishift].bcomm[iswap].nsend); max = MAX(max,shifts[ishift].bcomm[iswap].nrecv); } if (max > maxbuf) { memory->destroy(sbuf1); memory->destroy(sbuf2); memory->destroy(rbuf1); memory->destroy(rbuf2); maxbuf = max; memory->create(sbuf1,max*VBINSIZE,"fix/srd:sbuf"); memory->create(sbuf2,max*VBINSIZE,"fix/srd:sbuf"); memory->create(rbuf1,max*VBINSIZE,"fix/srd:rbuf"); memory->create(rbuf2,max*VBINSIZE,"fix/srd:rbuf"); } // commflag = 1 if any comm required due to bins overlapping proc boundaries shifts[0].commflag = 0; if (nbin1x % comm->procgrid[0]) shifts[0].commflag = 1; if (nbin1y % comm->procgrid[1]) shifts[0].commflag = 1; if (nbin1z % comm->procgrid[2]) shifts[0].commflag = 1; shifts[1].commflag = 1; } /* ---------------------------------------------------------------------- setup velocity shift parameters set binlo[]/binhi[] and nbins,nbinx,nbiny,nbinz for this proc set bcomm[6] params based on bin overlaps with proc boundaries no comm of bins across non-periodic global boundaries set vbin owner flags for bins I am owner of ishift = 0, dynamic = 0: set all settings since are static allocate and set bcomm params and vbins do not comm bins that align with proc boundaries ishift = 1, dynamic = 0: set max bounds on bin counts and message sizes allocate and set bcomm params and vbins based on max bounds other settings will later change dynamically ishift = 1, dynamic = 1: set actual bin bounds and counts for specific shift set bcomm params and vbins (already allocated) called by setup_velocity_bins() and reset_velocities() ------------------------------------------------------------------------- */ void FixSRD::setup_velocity_shift(int ishift, int dynamic) { int i,j,k,m,id,nsend; int *sendlist; BinComm *first,*second; BinAve *vbin; double *sublo,*subhi; if (triclinic == 0) { sublo = domain->sublo; subhi = domain->subhi; } else { sublo = domain->sublo_lamda; subhi = domain->subhi_lamda; } int *binlo = shifts[ishift].binlo; int *binhi = shifts[ishift].binhi; double *corner = shifts[ishift].corner; int *procgrid = comm->procgrid; int *myloc = comm->myloc; binlo[0] = static_cast<int> ((sublo[0]-corner[0])*bininv1x); binlo[1] = static_cast<int> ((sublo[1]-corner[1])*bininv1y); binlo[2] = static_cast<int> ((sublo[2]-corner[2])*bininv1z); if (dimension == 2) shifts[ishift].binlo[2] = 0; binhi[0] = static_cast<int> ((subhi[0]-corner[0])*bininv1x); binhi[1] = static_cast<int> ((subhi[1]-corner[1])*bininv1y); binhi[2] = static_cast<int> ((subhi[2]-corner[2])*bininv1z); if (dimension == 2) shifts[ishift].binhi[2] = 0; if (ishift == 0) { if (myloc[0]*nbin1x % procgrid[0] == 0) binlo[0] = myloc[0]*nbin1x/procgrid[0]; if (myloc[1]*nbin1y % procgrid[1] == 0) binlo[1] = myloc[1]*nbin1y/procgrid[1]; if (myloc[2]*nbin1z % procgrid[2] == 0) binlo[2] = myloc[2]*nbin1z/procgrid[2]; if ((myloc[0]+1)*nbin1x % procgrid[0] == 0) binhi[0] = (myloc[0]+1)*nbin1x/procgrid[0] - 1; if ((myloc[1]+1)*nbin1y % procgrid[1] == 0) binhi[1] = (myloc[1]+1)*nbin1y/procgrid[1] - 1; if ((myloc[2]+1)*nbin1z % procgrid[2] == 0) binhi[2] = (myloc[2]+1)*nbin1z/procgrid[2] - 1; } int nbinx = binhi[0] - binlo[0] + 1; int nbiny = binhi[1] - binlo[1] + 1; int nbinz = binhi[2] - binlo[2] + 1; // allow for one extra bin if shifting will occur if (ishift == 1 && dynamic == 0) { nbinx++; nbiny++; if (dimension == 3) nbinz++; } int nbins = nbinx*nbiny*nbinz; int nbinxy = nbinx*nbiny; int nbinsq = nbinx*nbiny; nbinsq = MAX(nbiny*nbinz,nbinsq); nbinsq = MAX(nbinx*nbinz,nbinsq); shifts[ishift].nbins = nbins; shifts[ishift].nbinx = nbinx; shifts[ishift].nbiny = nbiny; shifts[ishift].nbinz = nbinz; int reallocflag = 0; if (dynamic == 0 && nbinsq > shifts[ishift].maxbinsq) { shifts[ishift].maxbinsq = nbinsq; reallocflag = 1; } // bcomm neighbors // first = send in lo direction, recv from hi direction // second = send in hi direction, recv from lo direction if (dynamic == 0) { shifts[ishift].bcomm[0].sendproc = comm->procneigh[0][0]; shifts[ishift].bcomm[0].recvproc = comm->procneigh[0][1]; shifts[ishift].bcomm[1].sendproc = comm->procneigh[0][1]; shifts[ishift].bcomm[1].recvproc = comm->procneigh[0][0]; shifts[ishift].bcomm[2].sendproc = comm->procneigh[1][0]; shifts[ishift].bcomm[2].recvproc = comm->procneigh[1][1]; shifts[ishift].bcomm[3].sendproc = comm->procneigh[1][1]; shifts[ishift].bcomm[3].recvproc = comm->procneigh[1][0]; shifts[ishift].bcomm[4].sendproc = comm->procneigh[2][0]; shifts[ishift].bcomm[4].recvproc = comm->procneigh[2][1]; shifts[ishift].bcomm[5].sendproc = comm->procneigh[2][1]; shifts[ishift].bcomm[5].recvproc = comm->procneigh[2][0]; } // set nsend,nrecv and sendlist,recvlist for each swap in x,y,z // set nsend,nrecv = 0 if static bins align with proc boundary // or to prevent dynamic bin swapping across non-periodic global boundary // allocate sendlist,recvlist only for dynamic = 0 first = &shifts[ishift].bcomm[0]; second = &shifts[ishift].bcomm[1]; first->nsend = first->nrecv = second->nsend = second->nrecv = nbiny*nbinz; if (ishift == 0) { if (myloc[0]*nbin1x % procgrid[0] == 0) first->nsend = second->nrecv = 0; if ((myloc[0]+1)*nbin1x % procgrid[0] == 0) second->nsend = first->nrecv = 0; } else { if (domain->xperiodic == 0) { if (myloc[0] == 0) first->nsend = second->nrecv = 0; if (myloc[0] == procgrid[0]-1) second->nsend = first->nrecv = 0; } } if (reallocflag) { memory->destroy(first->sendlist); memory->destroy(first->recvlist); memory->destroy(second->sendlist); memory->destroy(second->recvlist); memory->create(first->sendlist,nbinsq,"fix/srd:sendlist"); memory->create(first->recvlist,nbinsq,"fix/srd:sendlist"); memory->create(second->sendlist,nbinsq,"fix/srd:sendlist"); memory->create(second->recvlist,nbinsq,"fix/srd:sendlist"); } m = 0; i = 0; for (j = 0; j < nbiny; j++) for (k = 0; k < nbinz; k++) { id = k*nbinxy + j*nbinx + i; first->sendlist[m] = second->recvlist[m] = id; m++; } m = 0; i = nbinx-1; for (j = 0; j < nbiny; j++) for (k = 0; k < nbinz; k++) { id = k*nbinxy + j*nbinx + i; second->sendlist[m] = first->recvlist[m] = id; m++; } first = &shifts[ishift].bcomm[2]; second = &shifts[ishift].bcomm[3]; first->nsend = first->nrecv = second->nsend = second->nrecv = nbinx*nbinz; if (ishift == 0) { if (myloc[1]*nbin1y % procgrid[1] == 0) first->nsend = second->nrecv = 0; if ((myloc[1]+1)*nbin1y % procgrid[1] == 0) second->nsend = first->nrecv = 0; } else { if (domain->yperiodic == 0) { if (myloc[1] == 0) first->nsend = second->nrecv = 0; if (myloc[1] == procgrid[1]-1) second->nsend = first->nrecv = 0; } } if (reallocflag) { memory->destroy(first->sendlist); memory->destroy(first->recvlist); memory->destroy(second->sendlist); memory->destroy(second->recvlist); memory->create(first->sendlist,nbinsq,"fix/srd:sendlist"); memory->create(first->recvlist,nbinsq,"fix/srd:sendlist"); memory->create(second->sendlist,nbinsq,"fix/srd:sendlist"); memory->create(second->recvlist,nbinsq,"fix/srd:sendlist"); } m = 0; j = 0; for (i = 0; i < nbinx; i++) for (k = 0; k < nbinz; k++) { id = k*nbinxy + j*nbinx + i; first->sendlist[m] = second->recvlist[m] = id; m++; } m = 0; j = nbiny-1; for (i = 0; i < nbinx; i++) for (k = 0; k < nbinz; k++) { id = k*nbinxy + j*nbinx + i; second->sendlist[m] = first->recvlist[m] = id; m++; } if (dimension == 3) { first = &shifts[ishift].bcomm[4]; second = &shifts[ishift].bcomm[5]; first->nsend = first->nrecv = second->nsend = second->nrecv = nbinx*nbiny; if (ishift == 0) { if (myloc[2]*nbin1z % procgrid[2] == 0) first->nsend = second->nrecv = 0; if ((myloc[2]+1)*nbin1z % procgrid[2] == 0) second->nsend = first->nrecv = 0; } else { if (domain->zperiodic == 0) { if (myloc[2] == 0) first->nsend = second->nrecv = 0; if (myloc[2] == procgrid[2]-1) second->nsend = first->nrecv = 0; } } if (reallocflag) { memory->destroy(first->sendlist); memory->destroy(first->recvlist); memory->destroy(second->sendlist); memory->destroy(second->recvlist); memory->create(first->sendlist,nbinx*nbiny,"fix/srd:sendlist"); memory->create(first->recvlist,nbinx*nbiny,"fix/srd:sendlist"); memory->create(second->sendlist,nbinx*nbiny,"fix/srd:sendlist"); memory->create(second->recvlist,nbinx*nbiny,"fix/srd:sendlist"); } m = 0; k = 0; for (i = 0; i < nbinx; i++) for (j = 0; j < nbiny; j++) { id = k*nbinxy + j*nbinx + i; first->sendlist[m] = second->recvlist[m] = id; m++; } m = 0; k = nbinz-1; for (i = 0; i < nbinx; i++) for (j = 0; j < nbiny; j++) { id = k*nbinxy + j*nbinx + i; second->sendlist[m] = first->recvlist[m] = id; m++; } } // allocate vbins, only for dynamic = 0 if (dynamic == 0 && nbins > shifts[ishift].maxvbin) { memory->destroy(shifts[ishift].vbin); shifts[ishift].maxvbin = nbins; shifts[ishift].vbin = (BinAve *) memory->smalloc(nbins*sizeof(BinAve),"fix/srd:vbin"); } // for vbins I own, set owner = 1 // if bin never sent to anyone, I own it // if bin sent to lower numbered proc, I do not own it // if bin sent to self, I do not own it on even swap (avoids double counting) vbin = shifts[ishift].vbin; for (i = 0; i < nbins; i++) vbin[i].owner = 1; for (int iswap = 0; iswap < 2*dimension; iswap++) { if (shifts[ishift].bcomm[iswap].sendproc > me) continue; if (shifts[ishift].bcomm[iswap].sendproc == me && iswap % 2 == 0) continue; nsend = shifts[ishift].bcomm[iswap].nsend; sendlist = shifts[ishift].bcomm[iswap].sendlist; for (m = 0; m < nsend; m++) vbin[sendlist[m]].owner = 0; } // if tstat and deformflag: // set xctr for all nbins in lamda units so can later compute vstream of bin if (tstat && deformflag) { m = 0; for (k = 0; k < nbinz; k++) for (j = 0; j < nbiny; j++) for (i = 0; i < nbinx; i++) { vbin[m].xctr[0] = corner[0] + (i+binlo[0]+0.5)/nbin1x; vbin[m].xctr[1] = corner[1] + (j+binlo[1]+0.5)/nbin1y; vbin[m].xctr[2] = corner[2] + (k+binlo[2]+0.5)/nbin1z; m++; } } } /* ---------------------------------------------------------------------- setup bins used for big and SRD particle searching gridsearch = desired bin size bins are orthogonal whether simulation box is orthogonal or triclinic for orthogonal boxes, called at each setup since cutghost may change for triclinic boxes, called at every reneigh, since tilt may change sets the following: nbin2 xyz = # of bins in each dim binsize2 and bininv2 xyz = size of bins in each dim xyz blo2 = origin of bins ------------------------------------------------------------------------- */ void FixSRD::setup_search_bins() { // subboxlo/hi = real space bbox which // owned/ghost big particles or walls can be in // start with bounding box for my sub-domain, add dist_ghost // for triclinic, need to: // a) convert dist_ghost to lamda space via length012 // b) lo/hi = sub-domain big particle bbox in lamda space // c) convert lo/hi to real space bounding box via domain->bbox() // similar to neighbor::setup_bins() and comm::cutghost[] calculation double subboxlo[3],subboxhi[3]; if (triclinic == 0) { subboxlo[0] = domain->sublo[0] - dist_ghost; subboxlo[1] = domain->sublo[1] - dist_ghost; subboxlo[2] = domain->sublo[2] - dist_ghost; subboxhi[0] = domain->subhi[0] + dist_ghost; subboxhi[1] = domain->subhi[1] + dist_ghost; subboxhi[2] = domain->subhi[2] + dist_ghost; } else { double *h_inv = domain->h_inv; double length0,length1,length2; length0 = sqrt(h_inv[0]*h_inv[0] + h_inv[5]*h_inv[5] + h_inv[4]*h_inv[4]); length1 = sqrt(h_inv[1]*h_inv[1] + h_inv[3]*h_inv[3]); length2 = h_inv[2]; double lo[3],hi[3]; lo[0] = domain->sublo_lamda[0] - dist_ghost*length0; lo[1] = domain->sublo_lamda[1] - dist_ghost*length1; lo[2] = domain->sublo_lamda[2] - dist_ghost*length2; hi[0] = domain->subhi_lamda[0] + dist_ghost*length0; hi[1] = domain->subhi_lamda[1] + dist_ghost*length1; hi[2] = domain->subhi_lamda[2] + dist_ghost*length2; domain->bbox(lo,hi,subboxlo,subboxhi); } // require integer # of bins for that volume nbin2x = static_cast<int> ((subboxhi[0] - subboxlo[0]) / gridsearch); nbin2y = static_cast<int> ((subboxhi[1] - subboxlo[1]) / gridsearch); nbin2z = static_cast<int> ((subboxhi[2] - subboxlo[2]) / gridsearch); if (dimension == 2) nbin2z = 1; if (nbin2x == 0) nbin2x = 1; if (nbin2y == 0) nbin2y = 1; if (nbin2z == 0) nbin2z = 1; binsize2x = (subboxhi[0] - subboxlo[0]) / nbin2x; binsize2y = (subboxhi[1] - subboxlo[1]) / nbin2y; binsize2z = (subboxhi[2] - subboxlo[2]) / nbin2z; bininv2x = 1.0/binsize2x; bininv2y = 1.0/binsize2y; bininv2z = 1.0/binsize2z; // add bins on either end due to extent of big particles // radmax = max distance from central bin that biggest particle overlaps // includes skin movement // nx,ny,nz = max # of bins to search away from central bin double radmax = 0.5*maxbigdiam + 0.5*neighbor->skin; int nx = static_cast<int> (radmax/binsize2x) + 1; int ny = static_cast<int> (radmax/binsize2y) + 1; int nz = static_cast<int> (radmax/binsize2z) + 1; if (dimension == 2) nz = 0; nbin2x += 2*nx; nbin2y += 2*ny; nbin2z += 2*nz; xblo2 = subboxlo[0] - nx*binsize2x; yblo2 = subboxlo[1] - ny*binsize2y; zblo2 = subboxlo[2] - nz*binsize2z; if (dimension == 2) zblo2 = domain->boxlo[2]; // allocate bins // first deallocate previous bins if necessary nbins2 = nbin2x*nbin2y*nbin2z; if (nbins2 > maxbin2) { memory->destroy(nbinbig); memory->destroy(binbig); maxbin2 = nbins2; memory->create(nbinbig,nbins2,"fix/srd:nbinbig"); memory->create(binbig,nbins2,ATOMPERBIN,"fix/srd:binbig"); } } /* ---------------------------------------------------------------------- compute stencil of bin offsets for a big particle overlapping search bins ------------------------------------------------------------------------- */ void FixSRD::setup_search_stencil() { // radmax = max distance from central bin that any big particle overlaps // includes skin movement // nx,ny,nz = max # of bins to search away from central bin double radmax = 0.5*maxbigdiam + 0.5*neighbor->skin; double radsq = radmax*radmax; int nx = static_cast<int> (radmax/binsize2x) + 1; int ny = static_cast<int> (radmax/binsize2y) + 1; int nz = static_cast<int> (radmax/binsize2z) + 1; if (dimension == 2) nz = 0; // allocate stencil array // deallocate previous stencil if necessary int max = (2*nx+1) * (2*ny+1) * (2*nz+1); if (max > maxstencil) { memory->destroy(stencil); maxstencil = max; memory->create(stencil,max,4,"fix/srd:stencil"); } // loop over all bins // add bin to stencil: // if distance of closest corners of bin and central bin is within cutoff nstencil = 0; for (int k = -nz; k <= nz; k++) for (int j = -ny; j <= ny; j++) for (int i = -nx; i <= nx; i++) if (bin_bin_distance(i,j,k) < radsq) { stencil[nstencil][0] = i; stencil[nstencil][1] = j; stencil[nstencil][2] = k; stencil[nstencil][3] = k*nbin2y*nbin2x + j*nbin2x + i; nstencil++; } } /* ---------------------------------------------------------------------- compute closest squared distance between point x and bin ibin ------------------------------------------------------------------------- */ double FixSRD::point_bin_distance(double *x, int i, int j, int k) { double delx,dely,delz; double xlo = xblo2 + i*binsize2x; double xhi = xlo + binsize2x; double ylo = yblo2 + j*binsize2y; double yhi = ylo + binsize2y; double zlo = zblo2 + k*binsize2z; double zhi = zlo + binsize2z; if (x[0] < xlo) delx = xlo - x[0]; else if (x[0] > xhi) delx = x[0] - xhi; else delx = 0.0; if (x[1] < ylo) dely = ylo - x[1]; else if (x[1] > yhi) dely = x[1] - yhi; else dely = 0.0; if (x[2] < zlo) delz = zlo - x[2]; else if (x[2] > zhi) delz = x[2] - zhi; else delz = 0.0; return (delx*delx + dely*dely + delz*delz); } /* ---------------------------------------------------------------------- compute closest squared distance between 2 bins central bin (0,0,0) and bin (i,j,k) ------------------------------------------------------------------------- */ double FixSRD::bin_bin_distance(int i, int j, int k) { double delx,dely,delz; if (i > 0) delx = (i-1)*binsize2x; else if (i == 0) delx = 0.0; else delx = (i+1)*binsize2x; if (j > 0) dely = (j-1)*binsize2y; else if (j == 0) dely = 0.0; else dely = (j+1)*binsize2y; if (k > 0) delz = (k-1)*binsize2z; else if (k == 0) delz = 0.0; else delz = (k+1)*binsize2z; return (delx*delx + dely*dely + delz*delz); } /* ---------------------------------------------------------------------- */ int FixSRD::pack_reverse_comm(int n, int first, double *buf) { int i,m,last; m = 0; last = first + n; if (torqueflag) { for (i = first; i < last; i++) { buf[m++] = flocal[i][0]; buf[m++] = flocal[i][1]; buf[m++] = flocal[i][2]; buf[m++] = tlocal[i][0]; buf[m++] = tlocal[i][1]; buf[m++] = tlocal[i][2]; } } else { for (i = first; i < last; i++) { buf[m++] = flocal[i][0]; buf[m++] = flocal[i][1]; buf[m++] = flocal[i][2]; } } return comm_reverse; } /* ---------------------------------------------------------------------- */ void FixSRD::unpack_reverse_comm(int n, int *list, double *buf) { int i,j,m; m = 0; if (torqueflag) { for (i = 0; i < n; i++) { j = list[i]; flocal[j][0] += buf[m++]; flocal[j][1] += buf[m++]; flocal[j][2] += buf[m++]; tlocal[j][0] += buf[m++]; tlocal[j][1] += buf[m++]; tlocal[j][2] += buf[m++]; } } else { for (i = 0; i < n; i++) { j = list[i]; flocal[j][0] += buf[m++]; flocal[j][1] += buf[m++]; flocal[j][2] += buf[m++]; } } } /* ---------------------------------------------------------------------- SRD stats ------------------------------------------------------------------------- */ double FixSRD::compute_vector(int n) { // only sum across procs one time if (stats_flag == 0) { stats[0] = ncheck; stats[1] = ncollide; stats[2] = nbounce; stats[3] = ninside; stats[4] = nrescale; stats[5] = nbins2; stats[6] = nbins1; stats[7] = srd_bin_count; stats[8] = srd_bin_temp; stats[9] = bouncemaxnum; stats[10] = bouncemax; stats[11] = reneighcount; MPI_Allreduce(stats,stats_all,10,MPI_DOUBLE,MPI_SUM,world); MPI_Allreduce(&stats[10],&stats_all[10],1,MPI_DOUBLE,MPI_MAX,world); if (stats_all[7] != 0.0) stats_all[8] /= stats_all[7]; stats_all[6] /= nprocs; stats_flag = 1; } return stats_all[n]; } /* ---------------------------------------------------------------------- */ void FixSRD::velocity_stats(int groupnum) { int bitmask = group->bitmask[groupnum]; double **v = atom->v; int *mask = atom->mask; int nlocal = atom->nlocal; double vone; double vave = 0.0; double vmax = 0.0; for (int i = 0; i < nlocal; i++) if (mask[i] & bitmask) { vone = sqrt(v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]); vave += vone; if (vone > vmax) vmax = vone; } double all; MPI_Allreduce(&vave,&all,1,MPI_DOUBLE,MPI_SUM,world); double count = group->count(groupnum); if (count != 0.0) vave = all/count; else vave = 0.0; MPI_Allreduce(&vmax,&all,1,MPI_DOUBLE,MPI_MAX,world); vmax = all; if (me == 0) { if (screen) fprintf(screen," ave/max %s velocity = %g %g\n", group->names[groupnum],vave,vmax); if (logfile) fprintf(logfile," ave/max %s velocity = %g %g\n", group->names[groupnum],vave,vmax); } } /* ---------------------------------------------------------------------- */ double FixSRD::newton_raphson(double t1, double t2) { double f1,f2,df,tlo,thi; lineside(t1,f1,df); if (f1 < 0.0) { tlo = t1; thi = t2; } else { thi = t1; tlo = t2; } double f; double t = 0.5*(t1+t2); double dtold = fabs(t2-t1); double dt = dtold; lineside(t,f,df); double temp; for (int i = 0; i < MAXITER; i++) { if ((((t-thi)*df - f)*((t-tlo)*df - f) > 0.0) || (fabs(2.0*f) > fabs(dtold*df))) { dtold = dt; dt = 0.5 * (thi-tlo); t = tlo + dt; if (tlo == t) return t; } else { dtold = dt; dt = f / df; temp = t; t -= dt; if (temp == t) return t; } if (fabs(dt) < TOLERANCE) return t; lineside(t,f,df); if (f < 0.0) tlo = t; else thi = t; } return t; } /* ---------------------------------------------------------------------- */ void FixSRD::lineside(double t, double &f, double &df) { double p[2],c[2]; p[0] = xs0[0] + (xs1[0]-xs0[0])*t; p[1] = xs0[1] + (xs1[1]-xs0[1])*t; c[0] = xb0[0] + (xb1[0]-xb0[0])*t; c[1] = xb0[1] + (xb1[1]-xb0[1])*t; double dtheta = theta1 - theta0; double theta = theta0 + dtheta*t; double cosT = cos(theta); double sinT = sin(theta); f = (p[1]-c[1]) * cosT - (p[0]-c[0]) * sinT; df = ((xs1[1]-xs0[1]) - (xb1[1]-xb0[1]))*cosT - (p[1]-c[1])*sinT*dtheta - ((xs1[0]-xs0[0]) - (xb1[0]-xb0[0]))*sinT - (p[0]-c[0])*cosT*dtheta; } /* ---------------------------------------------------------------------- */ void FixSRD::triside(double t, double &f, double &df) { double p[2],c[2]; p[0] = xs0[0] + (xs1[0]-xs0[0])*t; p[1] = xs0[1] + (xs1[1]-xs0[1])*t; c[0] = xb0[0] + (xb1[0]-xb0[0])*t; c[1] = xb0[1] + (xb1[1]-xb0[1])*t; double dtheta = theta1 - theta0; double theta = theta0 + dtheta*t; double cosT = cos(theta); double sinT = sin(theta); f = (p[1]-c[1]) * cosT - (p[0]-c[0]) * sinT; df = ((xs1[1]-xs0[1]) - (xb1[1]-xb0[1]))*cosT - (p[1]-c[1])*sinT*dtheta - ((xs1[0]-xs0[0]) - (xb1[0]-xb0[0]))*sinT - (p[0]-c[0])*cosT*dtheta; } /* ---------------------------------------------------------------------- */ double FixSRD::memory_usage() { double bytes = 0.0; bytes += (shifts[0].nbins + shifts[1].nbins) * sizeof(BinAve); bytes += nmax * sizeof(int); if (bigexist) { bytes += nbins2 * sizeof(int); bytes += nbins2*ATOMPERBIN * sizeof(int); } bytes += nmax * sizeof(int); return bytes; } /* ---------------------------------------------------------------------- useful debugging functions ------------------------------------------------------------------------- */ double FixSRD::distance(int i, int j) { double dx = atom->x[i][0] - atom->x[j][0]; double dy = atom->x[i][1] - atom->x[j][1]; double dz = atom->x[i][2] - atom->x[j][2]; return sqrt(dx*dx + dy*dy + dz*dz); } /* ---------------------------------------------------------------------- */ void FixSRD::print_collision(int i, int j, int ibounce, double t_remain, double dt, double *xscoll, double *xbcoll, double *norm, int type) { double xsstart[3],xbstart[3]; double **x = atom->x; double **v = atom->v; if (type != WALL) { printf("COLLISION between SRD %d and BIG %d\n",atom->tag[i],atom->tag[j]); printf(" bounce # = %d\n",ibounce+1); printf(" local indices: %d %d\n",i,j); printf(" timestep = %g\n",dt); printf(" time remaining post-collision = %g\n",t_remain); xsstart[0] = x[i][0] - dt*v[i][0]; xsstart[1] = x[i][1] - dt*v[i][1]; xsstart[2] = x[i][2] - dt*v[i][2]; xbstart[0] = x[j][0] - dt*v[j][0]; xbstart[1] = x[j][1] - dt*v[j][1]; xbstart[2] = x[j][2] - dt*v[j][2]; printf(" SRD start position = %g %g %g\n", xsstart[0],xsstart[1],xsstart[2]); printf(" BIG start position = %g %g %g\n", xbstart[0],xbstart[1],xbstart[2]); printf(" SRD coll position = %g %g %g\n", xscoll[0],xscoll[1],xscoll[2]); printf(" BIG coll position = %g %g %g\n", xbcoll[0],xbcoll[1],xbcoll[2]); printf(" SRD end position = %g %g %g\n",x[i][0],x[i][1],x[i][2]); printf(" BIG end position = %g %g %g\n",x[j][0],x[j][1],x[j][2]); printf(" SRD vel = %g %g %g\n",v[i][0],v[i][1],v[i][2]); printf(" BIG vel = %g %g %g\n",v[j][0],v[j][1],v[j][2]); printf(" surf norm = %g %g %g\n",norm[0],norm[1],norm[2]); double rstart = sqrt((xsstart[0]-xbstart[0])*(xsstart[0]-xbstart[0]) + (xsstart[1]-xbstart[1])*(xsstart[1]-xbstart[1]) + (xsstart[2]-xbstart[2])*(xsstart[2]-xbstart[2])); double rcoll = sqrt((xscoll[0]-xbcoll[0])*(xscoll[0]-xbcoll[0]) + (xscoll[1]-xbcoll[1])*(xscoll[1]-xbcoll[1]) + (xscoll[2]-xbcoll[2])*(xscoll[2]-xbcoll[2])); double rend = sqrt((x[i][0]-x[j][0])*(x[i][0]-x[j][0]) + (x[i][1]-x[j][1])*(x[i][1]-x[j][1]) + (x[i][2]-x[j][2])*(x[i][2]-x[j][2])); printf(" separation at start = %g\n",rstart); printf(" separation at coll = %g\n",rcoll); printf(" separation at end = %g\n",rend); } else { int dim = wallwhich[j] / 2; printf("COLLISION between SRD %d and WALL %d\n",atom->tag[i],j); printf(" bounce # = %d\n",ibounce+1); printf(" local indices: %d %d\n",i,j); printf(" timestep = %g\n",dt); printf(" time remaining post-collision = %g\n",t_remain); xsstart[0] = x[i][0] - dt*v[i][0]; xsstart[1] = x[i][1] - dt*v[i][1]; xsstart[2] = x[i][2] - dt*v[i][2]; xbstart[0] = xbstart[1] = xbstart[2] = 0.0; xbstart[dim] = xwall[j] - dt*vwall[j]; printf(" SRD start position = %g %g %g\n", xsstart[0],xsstart[1],xsstart[2]); printf(" WALL start position = %g\n",xbstart[dim]); printf(" SRD coll position = %g %g %g\n", xscoll[0],xscoll[1],xscoll[2]); printf(" WALL coll position = %g\n",xbcoll[dim]); printf(" SRD end position = %g %g %g\n",x[i][0],x[i][1],x[i][2]); printf(" WALL end position = %g\n",xwall[j]); printf(" SRD vel = %g %g %g\n",v[i][0],v[i][1],v[i][2]); printf(" WALL vel = %g\n",vwall[j]); printf(" surf norm = %g %g %g\n",norm[0],norm[1],norm[2]); double rstart = xsstart[dim]-xbstart[dim]; double rcoll = xscoll[dim]-xbcoll[dim]; double rend = x[dim][0]-xwall[j]; printf(" separation at start = %g\n",rstart); printf(" separation at coll = %g\n",rcoll); printf(" separation at end = %g\n",rend); } } diff --git a/src/SRD/fix_srd.h b/src/SRD/fix_srd.h index 512524af3..1f5a25fd8 100644 --- a/src/SRD/fix_srd.h +++ b/src/SRD/fix_srd.h @@ -1,395 +1,414 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(srd,FixSRD) #else #ifndef LMP_FIX_SRD_H #define LMP_FIX_SRD_H #include "fix.h" namespace LAMMPS_NS { class FixSRD : public Fix { public: FixSRD(class LAMMPS *, int, char **); ~FixSRD(); int setmask(); void init(); void setup(int); void pre_neighbor(); void post_force(int); double compute_vector(int); double memory_usage(); int pack_reverse_comm(int, int, double *); void unpack_reverse_comm(int, int *, double *); private: int me,nprocs; int bigexist,biggroup,biggroupbit; int collidestyle,lamdaflag,overlap,insideflag,exactflag,maxbounceallow; int cubicflag,shiftuser,shiftseed,shiftflag,tstat; double gridsrd,gridsearch,lamda,radfactor,cubictol; int triclinic,change_size,change_shape,deformflag; double dt_big,dt_srd; double mass_big,mass_srd; double temperature_srd; double sigma; double srd_per_cell; double dmax,vmax,vmaxsq; double maxbigdiam,minbigdiam; double dist_ghost,dist_srd,dist_srd_reneigh; // explained in code int wallexist,nwall,wallvarflag; class FixWallSRD *wallfix; int *wallwhich; double *xwall,*xwallhold,*vwall; double **fwall; double walltrigger; class AtomVecEllipsoid *avec_ellipsoid; class AtomVecLine *avec_line; class AtomVecTri *avec_tri; // for orthogonal box, these are in box units // for triclinic box, these are in lamda units double srdlo[3],srdhi[3]; // SRDs must stay inside double srdlo_reneigh[3],srdhi_reneigh[3]; // SRDs trigger a reneigh int dimension; int initflag,setupflag,reneighflag; class RanMars *random; class RanPark *randomshift; // stats int ncheck,ncollide,ninside,nrescale,reneighcount; int nbounce,bouncemaxnum,bouncemax; int stats_flag; int srd_bin_count; double srd_bin_temp; double stats[12],stats_all[12]; double **flocal; // local ptrs to atom force and torque double **tlocal; // info to store for each owned and ghost big particle and wall struct Big { int index; // local index of particle/wall int type; // SPHERE or ELLIPSOID or LINE or TRI or WALL double radius,radsq; // radius of sphere double aradsqinv; // 3 ellipsoid radii double bradsqinv; double cradsqinv; double length; // length of line segment double normbody[3]; // normal of tri in body-frame double cutbinsq; // add big to bin if within this distance double omega[3]; // current omega for sphere/ellipsoid/tri/line double ex[3],ey[3],ez[3]; // current orientation vecs for ellipsoid/tri double norm[3]; // current unit normal of tri in space-frame double theta; // current orientation of line }; Big *biglist; // list of info for each owned & ghost big and wall int torqueflag; // 1 if any big particle is torqued // current size of particle-based arrays int nbig; // # of owned/ghost big particles and walls int maxbig; // max number of owned/ghost big particles and walls int nmax; // max number of SRD particles // bins for SRD velocity remap, shifting and communication // binsize and inv are in lamda units for triclinic int nbins1,nbin1x,nbin1y,nbin1z; double binsize1x,binsize1y,binsize1z; double bininv1x,bininv1y,bininv1z; struct BinAve { int owner; // 1 if I am owner of this bin, 0 if not int n; // # of SRD particles in bin double xctr[3]; // center point of bin, only used for triclinic double vsum[3]; // sum of v components for SRD particles in bin double random; // random value if I am owner }; struct BinComm { int nsend,nrecv; // # of bins to send/recv int sendproc,recvproc; // who to send/recv to/from int *sendlist,*recvlist; // list of bins to send/recv }; struct BinShift { int commflag; // 1 if this shift requires any comm int nbins,nbinx,nbiny,nbinz; // extent of my bins int maxbinsq,maxvbin; int binlo[3],binhi[3]; // extent of my bins in global array double corner[3]; // lower,left corner to offset from // corner is in lamda units for triclinic BinAve *vbin; // my bins BinComm bcomm[6]; // bin communication pattern for overlaps }; BinShift shifts[2]; // 0 = no shift, 1 = shift int maxbin1; int *binhead; // 1st SRD particle in each bin int *binnext; // next SRD particle in same bin int maxbuf; double *sbuf1,*sbuf2; // buffers for send/recv of velocity bin data double *rbuf1,*rbuf2; // bins and stencil for collision searching for SRDs & big particles int nbins2,nbin2x,nbin2y,nbin2z; int maxbin2; double binsize2x,binsize2y,binsize2z; double bininv2x,bininv2y,bininv2z; double xblo2,yblo2,zblo2; int *nbinbig; // # of big particles overlapping each bin int **binbig; // indices of big particles overlapping each bin int *binsrd; // which bin each SRD particle is in int nstencil; // # of bins in stencil int maxstencil; // max # of bins stencil array can hold int **stencil; // list of 3d bin offsets a big particle can overlap // persistent data for line/tri collision calculations double tfraction,theta0,theta1; double xs0[3],xs1[3],xsc[3]; double xb0[3],xb1[3],xbc[3]; double nbc[3]; // shared data for triangle collision calculations // private functions void reset_velocities(); void vbin_comm(int); void vbin_pack(BinAve *, int, int *, double *); void vbin_unpack(double *, BinAve *, int, int *); void collisions_single(); void collisions_multi(); int inside_sphere(double *, double *, Big *); int inside_ellipsoid(double *, double *, Big *); int inside_line(double *, double *, double *, double *, Big *, double); int inside_tri(double *, double *, double *, double *, Big *, double); int inside_wall(double *, int); double collision_sphere_exact(double *, double *, double *, double *, Big *, double *, double *, double *); void collision_sphere_inexact(double *, double *, Big *, double *, double *, double *); double collision_ellipsoid_exact(double *, double *, double *, double *, Big *, double *, double *, double *); void collision_ellipsoid_inexact(double *, double *, Big *, double *, double *, double *); double collision_line_exact(double *, double *, double *, double *, Big *, double, double *, double *, double *); double collision_tri_exact(double *, double *, double *, double *, Big *, double, double *, double *, double *); double collision_wall_exact(double *, int, double *, double *, double *, double *); void collision_wall_inexact(double *, int, double *, double *, double *); void slip(double *, double *, double *, Big *, double *, double *, double *); void slip_wall(double *, int, double *, double *); void noslip(double *, double *, double *, Big *, int, double *, double *, double *); void force_torque(double *, double *, double *, double *, double *, double *); void force_wall(double *, double *, int); int update_srd(int, double, double *, double *, double *, double *); void parameterize(); void setup_bounds(); void setup_velocity_bins(); void setup_velocity_shift(int, int); void setup_search_bins(); void setup_search_stencil(); void big_static(); void big_dynamic(); double point_bin_distance(double *, int, int, int); double bin_bin_distance(int, int, int); void velocity_stats(int); double newton_raphson(double, double); void lineside(double, double &, double &); void triside(double, double &, double &); double distance(int, int); void print_collision(int, int, int, double, double, double *, double *, double *, int); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Could not find fix srd group ID Self-explanatory. E: Fix srd requires newton pair on Self-explanatory. E: Fix srd requires ghost atoms store velocity Use the communicate vel yes command to enable this. E: Fix SRD no-slip requires atom attribute torque This is because the SRD collisions will impart torque to the solute particles. E: Cannot change timestep once fix srd is setup This is because various SRD properties depend on the timestep size. E: Cannot use fix wall/srd more than once Nor is their a need to since multiple walls can be specified in one command. W: Fix SRD walls overlap but fix srd overlap not set You likely want to set this in your input script. E: Using fix srd with inconsistent fix deform remap option When shearing the box in an SRD simulation, the remap v option for fix deform needs to be used. W: Using fix srd with box deformation but no SRD thermostat -UNDOCUMENTED +The deformation will heat the SRD particles so this can +be dangerous. W: Fix srd SRD moves may trigger frequent reneighboring This is because the SRD particles may move long distances. E: Fix SRD: bad search bin assignment Something has gone wrong in your SRD model; try using more conservative settings. E: Fix SRD: bad stencil bin for big particle Something has gone wrong in your SRD model; try using more conservative settings. E: Fix SRD: too many big particles in bin Reset the ATOMPERBIN parameter at the top of fix_srd.cpp to a larger value, and re-compile the code. E: Fix SRD: too many walls in bin This should not happen unless your system has been setup incorrectly. E: Fix SRD: bad bin assignment for SRD advection Something has gone wrong in your SRD model; try using more conservative settings. -E: SRD particle %d started inside big particle %d on step %ld bounce %d\n +E: SRD particle %d started inside big particle %d on step %ld bounce %d -UNDOCUMENTED +See the inside keyword if you want this message to be an error vs +warning. + +W: SRD particle %d started inside big particle %d on step %ld bounce %d + +See the inside keyword if you want this message to be an error vs +warning. E: Bad quadratic solve for particle/line collision -UNDOCUMENTED +This is an internal error. It should nornally not occur. E: Bad quadratic solve for particle/tri collision -UNDOCUMENTED +This is an internal error. It should nornally not occur. W: Fix srd particle moved outside valid domain This may indicate a problem with your simulation parameters. E: Big particle in fix srd cannot be point particle Big particles must be extended spheriods or ellipsoids. E: Cannot use lines with fix srd unless overlap is set -UNDOCUMENTED +This is because line segements are connected to each other. E: Cannot use tris with fix srd unless overlap is set -UNDOCUMENTED +This is because triangles are connected to each other. E: Fix srd requires SRD particles all have same mass Self-explanatory. E: Fewer SRD bins than processors in some dimension This is not allowed. Make your SRD bin size smaller. E: SRD bins for fix srd are not cubic enough -The bin shape is not within tolerance of cubic. +The bin shape is not within tolerance of cubic. See the cubic +keyword if you want this message to be an error vs warning. + +W: SRD bins for fix srd are not cubic enough + +The bin shape is not within tolerance of cubic. See the cubic +keyword if you want this message to be an error vs warning. E: SRD bin size for fix srd differs from user request -Fix SRD had to adjust the bin size to fit the simulation box. +Fix SRD had to adjust the bin size to fit the simulation box. See the +cubic keyword if you want this message to be an error vs warning. + +W: SRD bin size for fix srd differs from user request + +Fix SRD had to adjust the bin size to fit the simulation box. See the +cubic keyword if you want this message to be an error vs warning. E: Fix srd lamda must be >= 0.6 of SRD grid size This is a requirement for accuracy reasons. W: SRD bin shifting turned on due to small lamda This is done to try to preserve accuracy. W: Fix srd grid size > 1/4 of big particle diameter This may cause accuracy problems. W: Fix srd viscosity < 0.0 due to low SRD density This may cause accuracy problems. W: Fix srd particles may move > big particle diameter This may cause accuracy problems. */ diff --git a/src/atom.h b/src/atom.h index 2d7af0d33..fc8379e89 100644 --- a/src/atom.h +++ b/src/atom.h @@ -1,367 +1,369 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_ATOM_H #define LMP_ATOM_H #include "pointers.h" namespace LAMMPS_NS { class Atom : protected Pointers { public: char *atom_style; class AtomVec *avec; // atom counts bigint natoms; // total # of atoms in system, could be 0 // natoms may not be current if atoms lost int nlocal,nghost; // # of owned and ghost atoms on this proc int nmax; // max # of owned+ghost in arrays on this proc int tag_enable; // 0/1 if atom ID tags are defined int molecular; // 0 = atomic, 1 = molecular system bigint nbonds,nangles,ndihedrals,nimpropers; int ntypes,nbondtypes,nangletypes,ndihedraltypes,nimpropertypes; int bond_per_atom,angle_per_atom,dihedral_per_atom,improper_per_atom; int extra_bond_per_atom; int firstgroup; // store atoms in this group first, -1 if unset int nfirst; // # of atoms in first group on this proc char *firstgroupname; // group-ID to store first, NULL if unset // per-atom arrays // customize by adding new array int *tag,*type,*mask,*image; double **x,**v,**f; int *molecule; double *q,**mu; double **omega,**angmom,**torque; double *radius,*rmass,*vfrac,*s0; double **x0; int *ellipsoid,*line,*tri; int *spin; double *eradius,*ervel,*erforce,*ervelforce; double *cs,*csforce,*vforce; int *etag; double *rho, *drho; double *e, *de; double **vest; double *cv; int **nspecial; // 0,1,2 = cummulative # of 1-2,1-3,1-4 neighs int **special; // IDs of 1-2,1-3,1-4 neighs of each atom int maxspecial; // special[nlocal][maxspecial] int *num_bond; int **bond_type; int **bond_atom; int *num_angle; int **angle_type; int **angle_atom1,**angle_atom2,**angle_atom3; int *num_dihedral; int **dihedral_type; int **dihedral_atom1,**dihedral_atom2,**dihedral_atom3,**dihedral_atom4; int *num_improper; int **improper_type; int **improper_atom1,**improper_atom2,**improper_atom3,**improper_atom4; // atom style and per-atom array existence flags // customize by adding new flag int sphere_flag,ellipsoid_flag,line_flag,tri_flag,peri_flag,electron_flag; int wavepacket_flag,sph_flag; int molecule_flag,q_flag,mu_flag; int rmass_flag,radius_flag,omega_flag,torque_flag,angmom_flag; int vfrac_flag,spin_flag,eradius_flag,ervel_flag,erforce_flag; int cs_flag,csforce_flag,vforce_flag,ervelforce_flag,etag_flag; int rho_flag,e_flag,cv_flag,vest_flag; // extra peratom info in restart file destined for fix & diag double **extra; // per-type arrays double *mass; int *mass_setflag; // callback ptrs for atom arrays managed by fix classes int nextra_grow,nextra_restart; // # of callbacks of each type int *extra_grow,*extra_restart; // index of fix to callback to int nextra_grow_max,nextra_restart_max; // size of callback lists int nextra_store; int map_style; // default or user-specified style of map // 0 = none, 1 = array, 2 = hash // spatial sorting of atoms int sortfreq; // sort atoms every this many steps, 0 = off bigint nextsort; // next timestep to sort on // functions Atom(class LAMMPS *); ~Atom(); void settings(class Atom *); void create_avec(const char *, int, char **, char *suffix = NULL); class AtomVec *new_avec(const char *, int, char **, char *, int &); void init(); void setup(); class AtomVec *style_match(const char *); void modify_params(int, char **); void tag_extend(); int tag_consecutive(); int parse_data(const char *); int count_words(const char *); void data_atoms(int, char *); void data_vels(int, char *); void data_bonus(int, char *, class AtomVec *); void data_bonds(int, char *); void data_angles(int, char *); void data_dihedrals(int, char *); void data_impropers(int, char *); void allocate_type_arrays(); void set_mass(const char *); void set_mass(int, double); void set_mass(int, char **); void set_mass(double *); void check_mass(); int radius_consistency(int, double &); int shape_consistency(int, double &, double &, double &); void first_reorder(); void sort(); void add_callback(int); void delete_callback(const char *, int); void update_callback(int); void *extract(char *); inline int* get_map_array() {return map_array;}; inline int get_map_size() {return map_tag_max+1;}; bigint memory_usage(); int memcheck(const char *); // functions for global to local ID mapping // map lookup function inlined for efficiency inline int map(int global) { if (map_style == 1) return map_array[global]; else return map_find_hash(global); }; void map_init(); void map_clear(); void map_set(); void map_one(int, int); void map_delete(); int map_find_hash(int); private: // global to local ID mapping int map_tag_max; int *map_array; struct HashElem { int global; // key to search on = global ID int local; // value associated with key = local index int next; // next entry in this bucket, -1 if last }; int map_nhash; // # of entries hash table can hold int map_nused; // # of actual entries in hash table int map_free; // ptr to 1st unused entry in hash table int map_nbucket; // # of hash buckets int *map_bucket; // ptr to 1st entry in each bucket HashElem *map_hash; // hash table int *primes; // table of prime #s for hashing int nprimes; // # of primes // spatial sorting of atoms int nbins; // # of sorting bins int nbinx,nbiny,nbinz; // bins in each dimension int maxbin; // max # of bins int maxnext; // max size of next,permute int *binhead; // 1st atom in each bin int *next; // next atom in bin int *permute; // permutation vector double userbinsize; // requested sort bin size double bininvx,bininvy,bininvz; // inverse actual bin sizes double bboxlo[3],bboxhi[3]; // bounding box of my sub-domain int memlength; // allocated size of memstr char *memstr; // string of array names already counted void setup_sort_bins(); }; } #endif /* ERROR/WARNING messages: E: Invalid atom style The choice of atom style is unknown. E: Could not find atom_modify first group ID Self-explanatory. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Atom_modify map command after simulation box is defined The atom_modify map command cannot be used after a read_data, read_restart, or create_box command. E: Atom_modify sort and first options cannot be used together Self-explanatory. E: Cannot create an atom map unless atoms have IDs The simulation requires a mapping from global atom IDs to local atoms, but the atoms that have been defined have no IDs. E: Incorrect atom format in data file Number of values per atom line in the data file is not consistent with the atom style. E: Incorrect velocity format in data file Each atom style defines a format for the Velocity section of the data file. The read-in lines do not match. E: Invalid atom ID in Velocities section of data file Atom IDs must be positive integers and within range of defined atoms. E: Incorrect bonus data format in data file -UNDOCUMENTED +See the read_data doc page for a description of how various kinds of +bonus data must be formatted for certain atom styles. E: Invalid atom ID in Bonus section of data file -UNDOCUMENTED +Atom IDs must be positive integers and within range of defined +atoms. E: Invalid atom ID in Bonds section of data file Atom IDs must be positive integers and within range of defined atoms. E: Invalid bond type in Bonds section of data file Bond type must be positive integer and within range of specified bond types. E: Invalid atom ID in Angles section of data file Atom IDs must be positive integers and within range of defined atoms. E: Invalid angle type in Angles section of data file Angle type must be positive integer and within range of specified angle types. E: Invalid atom ID in Dihedrals section of data file Atom IDs must be positive integers and within range of defined atoms. E: Invalid dihedral type in Dihedrals section of data file Dihedral type must be positive integer and within range of specified dihedral types. E: Invalid atom ID in Impropers section of data file Atom IDs must be positive integers and within range of defined atoms. E: Invalid improper type in Impropers section of data file Improper type must be positive integer and within range of specified improper types. E: Cannot set mass for this atom style This atom style does not support mass settings for each atom type. Instead they are defined on a per-atom basis in the data file. E: Invalid mass line in data file Self-explanatory. E: Invalid type for mass set Mass command must set a type from 1-N where N is the number of atom types. E: Invalid mass value Self-explanatory. E: All masses are not set For atom styles that define masses for each atom type, all masses must be set in the data file or by the mass command before running a simulation. They must also be set before using the velocity command. E: Atom sort did not operate correctly This is an internal LAMMPS error. Please report it to the developers. E: Atom sorting has bin size = 0.0 The neighbor cutoff is being used as the bin size, but it is zero. Thus you must explicitly list a bin size in the atom_modify sort command or turn off sorting. E: Too many atom sorting bins This is likely due to an immense simulation box that has blown up to a large size. */ diff --git a/src/atom_vec_ellipsoid.h b/src/atom_vec_ellipsoid.h index 935d2ff4f..944e5d100 100755 --- a/src/atom_vec_ellipsoid.h +++ b/src/atom_vec_ellipsoid.h @@ -1,123 +1,123 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef ATOM_CLASS AtomStyle(ellipsoid,AtomVecEllipsoid) #else #ifndef LMP_ATOM_VEC_ELLIPSOID_H #define LMP_ATOM_VEC_ELLIPSOID_H #include "atom_vec.h" namespace LAMMPS_NS { class AtomVecEllipsoid : public AtomVec { public: struct Bonus { double shape[3]; double quat[4]; int ilocal; }; struct Bonus *bonus; AtomVecEllipsoid(class LAMMPS *, int, char **); ~AtomVecEllipsoid(); void grow(int); void grow_reset(); void copy(int, int, int); int pack_comm(int, int *, double *, int, int *); int pack_comm_vel(int, int *, double *, int, int *); int pack_comm_hybrid(int, int *, double *); void unpack_comm(int, int, double *); void unpack_comm_vel(int, int, double *); int unpack_comm_hybrid(int, int, double *); int pack_reverse(int, int, double *); int pack_reverse_hybrid(int, int, double *); void unpack_reverse(int, int *, double *); int unpack_reverse_hybrid(int, int *, double *); int pack_border(int, int *, double *, int, int *); int pack_border_vel(int, int *, double *, int, int *); int pack_border_hybrid(int, int *, double *); void unpack_border(int, int, double *); void unpack_border_vel(int, int, double *); int unpack_border_hybrid(int, int, double *); int pack_exchange(int, double *); int unpack_exchange(double *); int size_restart(); int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); void data_atom(double *, int, char **); int data_atom_hybrid(int, char **); void data_vel(int, char **); int data_vel_hybrid(int, char **); bigint memory_usage(); // manipulate Bonus data structure for extra atom info void clear_bonus(); void data_atom_bonus(int, char **); // unique to AtomVecEllipsoid void set_shape(int, double, double, double); private: int *tag,*type,*mask,*image; double **x,**v,**f; double *rmass; double **angmom,**torque; int *ellipsoid; int nlocal_bonus,nghost_bonus,nmax_bonus; void grow_bonus(); void copy_bonus(int, int); }; } #endif #endif /* ERROR/WARNING messages: E: Per-processor system is too big The number of owned atoms plus ghost atoms on a single processor must fit in 32-bit integer. E: Invalid atom ID in Atoms section of data file Atom IDs must be positive integers. E: Invalid atom type in Atoms section of data file Atom types must range from 1 to specified # of types. E: Invalid density in Atoms section of data file Density value cannot be <= 0.0. E: Assigning ellipsoid parameters to non-ellipsoid atom -UNDOCUMENTED +Self-explanatory. E: Invalid shape in Ellipsoids section of data file -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/atom_vec_line.cpp b/src/atom_vec_line.cpp index c49cd6b6a..f98170533 100644 --- a/src/atom_vec_line.cpp +++ b/src/atom_vec_line.cpp @@ -1,1170 +1,1169 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #include "lmptype.h" #include "math.h" #include "stdlib.h" #include "string.h" #include "atom_vec_line.h" #include "atom.h" #include "comm.h" #include "domain.h" #include "modify.h" #include "force.h" #include "fix.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; #define DELTA 10000 #define DELTA_BONUS 10000 #define EPSILON 0.001 /* ---------------------------------------------------------------------- */ AtomVecLine::AtomVecLine(LAMMPS *lmp, int narg, char **arg) : AtomVec(lmp, narg, arg) { molecular = 0; comm_x_only = comm_f_only = 0; size_forward = 4; size_reverse = 6; size_border = 10; size_velocity = 6; size_data_atom = 8; size_data_vel = 7; size_data_bonus = 5; xcol_data = 6; atom->line_flag = 1; atom->molecule_flag = atom->rmass_flag = 1; atom->omega_flag = atom->torque_flag = 1; nlocal_bonus = nghost_bonus = nmax_bonus = 0; bonus = NULL; } /* ---------------------------------------------------------------------- */ AtomVecLine::~AtomVecLine() { memory->sfree(bonus); } /* ---------------------------------------------------------------------- */ void AtomVecLine::init() { AtomVec::init(); if (domain->dimension != 2) error->all(FLERR,"Atom_style line can only be used in 2d simulations"); } /* ---------------------------------------------------------------------- grow atom arrays n = 0 grows arrays by DELTA n > 0 allocates arrays to size n ------------------------------------------------------------------------- */ void AtomVecLine::grow(int n) { if (n == 0) nmax += DELTA; else nmax = n; atom->nmax = nmax; if (nmax < 0 || nmax > MAXSMALLINT) error->one(FLERR,"Per-processor system is too big"); tag = memory->grow(atom->tag,nmax,"atom:tag"); type = memory->grow(atom->type,nmax,"atom:type"); mask = memory->grow(atom->mask,nmax,"atom:mask"); image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); rmass = memory->grow(atom->rmass,nmax,"atom:rmass"); omega = memory->grow(atom->omega,nmax,3,"atom:omega"); torque = memory->grow(atom->torque,nmax*comm->nthreads,3,"atom:torque"); line = memory->grow(atom->line,nmax,"atom:line"); if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); } /* ---------------------------------------------------------------------- reset local array ptrs ------------------------------------------------------------------------- */ void AtomVecLine::grow_reset() { tag = atom->tag; type = atom->type; mask = atom->mask; image = atom->image; x = atom->x; v = atom->v; f = atom->f; molecule = atom->molecule; rmass = atom->rmass; omega = atom->omega; torque = atom->torque; } /* ---------------------------------------------------------------------- grow bonus data structure ------------------------------------------------------------------------- */ void AtomVecLine::grow_bonus() { nmax_bonus += DELTA_BONUS; if (nmax_bonus < 0 || nmax_bonus > MAXSMALLINT) error->one(FLERR,"Per-processor system is too big"); bonus = (Bonus *) memory->srealloc(bonus,nmax_bonus*sizeof(Bonus), "atom:bonus"); } /* ---------------------------------------------------------------------- copy atom I info to atom J ------------------------------------------------------------------------- */ void AtomVecLine::copy(int i, int j, int delflag) { tag[j] = tag[i]; type[j] = type[i]; mask[j] = mask[i]; image[j] = image[i]; x[j][0] = x[i][0]; x[j][1] = x[i][1]; x[j][2] = x[i][2]; v[j][0] = v[i][0]; v[j][1] = v[i][1]; v[j][2] = v[i][2]; molecule[j] = molecule[i]; rmass[j] = rmass[i]; omega[j][0] = omega[i][0]; omega[j][1] = omega[i][1]; omega[j][2] = omega[i][2]; // if delflag and atom J has bonus data, then delete it if (delflag && line[j] >= 0) { copy_bonus(nlocal_bonus-1,line[j]); nlocal_bonus--; } // if atom I has bonus data and not deleting I, repoint I's bonus to J if (line[i] >= 0 && i != j) bonus[line[i]].ilocal = j; line[j] = line[i]; if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j); } /* ---------------------------------------------------------------------- copy bonus data from I to J, effectively deleting the J entry insure index pointers between per-atom and bonus data are updated ------------------------------------------------------------------------- */ void AtomVecLine::copy_bonus(int i, int j) { memcpy(&bonus[j],&bonus[i],sizeof(Bonus)); line[bonus[j].ilocal] = j; } /* ---------------------------------------------------------------------- clear ghost info in bonus data called before ghosts are recommunicated in comm and irregular ------------------------------------------------------------------------- */ void AtomVecLine::clear_bonus() { nghost_bonus = 0; } /* ---------------------------------------------------------------------- set length value in bonus data for particle I oriented along x axis this may create or delete entry in bonus data ------------------------------------------------------------------------- */ void AtomVecLine::set_length(int i, double value) { if (line[i] < 0) { if (value == 0.0) return; if (nlocal_bonus == nmax_bonus) grow_bonus(); bonus[nlocal_bonus].length = value; bonus[nlocal_bonus].theta = 0.0; bonus[nlocal_bonus].ilocal = i; line[i] = nlocal_bonus++; } else if (value == 0.0) { copy_bonus(nlocal_bonus-1,line[i]); nlocal_bonus--; line[i] = -1; } else bonus[line[i]].length = value; } /* ---------------------------------------------------------------------- */ int AtomVecLine::pack_comm(int n, int *list, double *buf, int pbc_flag, int *pbc) { int i,j,m; double dx,dy,dz; m = 0; if (pbc_flag == 0) { for (i = 0; i < n; i++) { j = list[i]; buf[m++] = x[j][0]; buf[m++] = x[j][1]; buf[m++] = x[j][2]; if (line[j] >= 0) buf[m++] = bonus[line[j]].theta; } } else { if (domain->triclinic == 0) { dx = pbc[0]*domain->xprd; dy = pbc[1]*domain->yprd; dz = pbc[2]*domain->zprd; } else { dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; dz = pbc[2]*domain->zprd; } for (i = 0; i < n; i++) { j = list[i]; buf[m++] = x[j][0] + dx; buf[m++] = x[j][1] + dy; buf[m++] = x[j][2] + dz; if (line[j] >= 0) buf[m++] = bonus[line[j]].theta; } } return m; } /* ---------------------------------------------------------------------- */ int AtomVecLine::pack_comm_vel(int n, int *list, double *buf, int pbc_flag, int *pbc) { int i,j,m; double dx,dy,dz,dvx,dvy,dvz; m = 0; if (pbc_flag == 0) { for (i = 0; i < n; i++) { j = list[i]; buf[m++] = x[j][0]; buf[m++] = x[j][1]; buf[m++] = x[j][2]; if (line[j] >= 0) buf[m++] = bonus[line[j]].theta; buf[m++] = v[j][0]; buf[m++] = v[j][1]; buf[m++] = v[j][2]; buf[m++] = omega[j][0]; buf[m++] = omega[j][1]; buf[m++] = omega[j][2]; } } else { if (domain->triclinic == 0) { dx = pbc[0]*domain->xprd; dy = pbc[1]*domain->yprd; dz = pbc[2]*domain->zprd; } else { dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; dz = pbc[2]*domain->zprd; } if (!deform_vremap) { for (i = 0; i < n; i++) { j = list[i]; buf[m++] = x[j][0] + dx; buf[m++] = x[j][1] + dy; buf[m++] = x[j][2] + dz; if (line[j] >= 0) buf[m++] = bonus[line[j]].theta; buf[m++] = v[j][0]; buf[m++] = v[j][1]; buf[m++] = v[j][2]; buf[m++] = omega[j][0]; buf[m++] = omega[j][1]; buf[m++] = omega[j][2]; } } else { dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; dvz = pbc[2]*h_rate[2]; for (i = 0; i < n; i++) { j = list[i]; buf[m++] = x[j][0] + dx; buf[m++] = x[j][1] + dy; buf[m++] = x[j][2] + dz; if (line[j] >= 0) buf[m++] = bonus[line[j]].theta; if (mask[i] & deform_groupbit) { buf[m++] = v[j][0] + dvx; buf[m++] = v[j][1] + dvy; buf[m++] = v[j][2] + dvz; } else { buf[m++] = v[j][0]; buf[m++] = v[j][1]; buf[m++] = v[j][2]; } buf[m++] = omega[j][0]; buf[m++] = omega[j][1]; buf[m++] = omega[j][2]; } } } return m; } /* ---------------------------------------------------------------------- */ int AtomVecLine::pack_comm_hybrid(int n, int *list, double *buf) { int i,j,m; m = 0; for (i = 0; i < n; i++) { j = list[i]; if (line[j] >= 0) buf[m++] = bonus[line[j]].theta; } return m; } /* ---------------------------------------------------------------------- */ void AtomVecLine::unpack_comm(int n, int first, double *buf) { int i,m,last; m = 0; last = first + n; for (i = first; i < last; i++) { x[i][0] = buf[m++]; x[i][1] = buf[m++]; x[i][2] = buf[m++]; if (line[i] >= 0) bonus[line[i]].theta = buf[m++]; } } /* ---------------------------------------------------------------------- */ void AtomVecLine::unpack_comm_vel(int n, int first, double *buf) { int i,m,last; m = 0; last = first + n; for (i = first; i < last; i++) { x[i][0] = buf[m++]; x[i][1] = buf[m++]; x[i][2] = buf[m++]; if (line[i] >= 0) bonus[line[i]].theta = buf[m++]; v[i][0] = buf[m++]; v[i][1] = buf[m++]; v[i][2] = buf[m++]; omega[i][0] = buf[m++]; omega[i][1] = buf[m++]; omega[i][2] = buf[m++]; } } /* ---------------------------------------------------------------------- */ int AtomVecLine::unpack_comm_hybrid(int n, int first, double *buf) { int i,m,last; m = 0; last = first + n; for (i = first; i < last; i++) if (line[i] >= 0) bonus[line[i]].theta = buf[m++]; return m; } /* ---------------------------------------------------------------------- */ int AtomVecLine::pack_reverse(int n, int first, double *buf) { int i,m,last; m = 0; last = first + n; for (i = first; i < last; i++) { buf[m++] = f[i][0]; buf[m++] = f[i][1]; buf[m++] = f[i][2]; buf[m++] = torque[i][0]; buf[m++] = torque[i][1]; buf[m++] = torque[i][2]; } return m; } /* ---------------------------------------------------------------------- */ int AtomVecLine::pack_reverse_hybrid(int n, int first, double *buf) { int i,m,last; m = 0; last = first + n; for (i = first; i < last; i++) { buf[m++] = torque[i][0]; buf[m++] = torque[i][1]; buf[m++] = torque[i][2]; } return m; } /* ---------------------------------------------------------------------- */ void AtomVecLine::unpack_reverse(int n, int *list, double *buf) { int i,j,m; m = 0; for (i = 0; i < n; i++) { j = list[i]; f[j][0] += buf[m++]; f[j][1] += buf[m++]; f[j][2] += buf[m++]; torque[j][0] += buf[m++]; torque[j][1] += buf[m++]; torque[j][2] += buf[m++]; } } /* ---------------------------------------------------------------------- */ int AtomVecLine::unpack_reverse_hybrid(int n, int *list, double *buf) { int i,j,m; m = 0; for (i = 0; i < n; i++) { j = list[i]; torque[j][0] += buf[m++]; torque[j][1] += buf[m++]; torque[j][2] += buf[m++]; } return m; } /* ---------------------------------------------------------------------- */ int AtomVecLine::pack_border(int n, int *list, double *buf, int pbc_flag, int *pbc) { int i,j,m; double dx,dy,dz; m = 0; if (pbc_flag == 0) { for (i = 0; i < n; i++) { j = list[i]; buf[m++] = x[j][0]; buf[m++] = x[j][1]; buf[m++] = x[j][2]; buf[m++] = tag[j]; buf[m++] = type[j]; buf[m++] = mask[j]; buf[m++] = molecule[j]; if (line[j] < 0) buf[m++] = 0; else { buf[m++] = 1; buf[m++] = bonus[line[j]].length; buf[m++] = bonus[line[j]].theta; } } } else { if (domain->triclinic == 0) { dx = pbc[0]*domain->xprd; dy = pbc[1]*domain->yprd; dz = pbc[2]*domain->zprd; } else { dx = pbc[0]; dy = pbc[1]; dz = pbc[2]; } for (i = 0; i < n; i++) { j = list[i]; buf[m++] = x[j][0] + dx; buf[m++] = x[j][1] + dy; buf[m++] = x[j][2] + dz; buf[m++] = tag[j]; buf[m++] = type[j]; buf[m++] = mask[j]; buf[m++] = molecule[j]; if (line[j] < 0) buf[m++] = 0; else { buf[m++] = 1; buf[m++] = bonus[line[j]].length; buf[m++] = bonus[line[j]].theta; } } } return m; } /* ---------------------------------------------------------------------- */ int AtomVecLine::pack_border_vel(int n, int *list, double *buf, int pbc_flag, int *pbc) { int i,j,m; double dx,dy,dz,dvx,dvy,dvz; m = 0; if (pbc_flag == 0) { for (i = 0; i < n; i++) { j = list[i]; buf[m++] = x[j][0]; buf[m++] = x[j][1]; buf[m++] = x[j][2]; buf[m++] = tag[j]; buf[m++] = type[j]; buf[m++] = mask[j]; buf[m++] = molecule[j]; if (line[j] < 0) buf[m++] = 0; else { buf[m++] = 1; buf[m++] = bonus[line[j]].length; buf[m++] = bonus[line[j]].theta; } buf[m++] = v[j][0]; buf[m++] = v[j][1]; buf[m++] = v[j][2]; buf[m++] = omega[j][0]; buf[m++] = omega[j][1]; buf[m++] = omega[j][2]; } } else { if (domain->triclinic == 0) { dx = pbc[0]*domain->xprd; dy = pbc[1]*domain->yprd; dz = pbc[2]*domain->zprd; } else { dx = pbc[0]; dy = pbc[1]; dz = pbc[2]; } if (!deform_vremap) { for (i = 0; i < n; i++) { j = list[i]; buf[m++] = x[j][0] + dx; buf[m++] = x[j][1] + dy; buf[m++] = x[j][2] + dz; buf[m++] = tag[j]; buf[m++] = type[j]; buf[m++] = mask[j]; buf[m++] = molecule[j]; if (line[j] < 0) buf[m++] = 0; else { buf[m++] = 1; buf[m++] = bonus[line[j]].length; buf[m++] = bonus[line[j]].theta; } buf[m++] = v[j][0]; buf[m++] = v[j][1]; buf[m++] = v[j][2]; buf[m++] = omega[j][0]; buf[m++] = omega[j][1]; buf[m++] = omega[j][2]; } } else { dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; dvz = pbc[2]*h_rate[2]; for (i = 0; i < n; i++) { j = list[i]; buf[m++] = x[j][0] + dx; buf[m++] = x[j][1] + dy; buf[m++] = x[j][2] + dz; buf[m++] = tag[j]; buf[m++] = type[j]; buf[m++] = mask[j]; buf[m++] = molecule[j]; if (line[j] < 0) buf[m++] = 0; else { buf[m++] = 1; buf[m++] = bonus[line[j]].length; buf[m++] = bonus[line[j]].theta; } if (mask[i] & deform_groupbit) { buf[m++] = v[j][0] + dvx; buf[m++] = v[j][1] + dvy; buf[m++] = v[j][2] + dvz; } else { buf[m++] = v[j][0]; buf[m++] = v[j][1]; buf[m++] = v[j][2]; } buf[m++] = omega[j][0]; buf[m++] = omega[j][1]; buf[m++] = omega[j][2]; } } } return m; } /* ---------------------------------------------------------------------- */ int AtomVecLine::pack_border_hybrid(int n, int *list, double *buf) { int i,j,m; m = 0; for (i = 0; i < n; i++) { j = list[i]; buf[m++] = molecule[j]; if (line[j] < 0) buf[m++] = 0; else { buf[m++] = 1; buf[m++] = bonus[line[j]].length; buf[m++] = bonus[line[j]].theta; } } return m; } /* ---------------------------------------------------------------------- */ void AtomVecLine::unpack_border(int n, int first, double *buf) { int i,j,m,last; m = 0; last = first + n; for (i = first; i < last; i++) { if (i == nmax) grow(0); x[i][0] = buf[m++]; x[i][1] = buf[m++]; x[i][2] = buf[m++]; tag[i] = static_cast<int> (buf[m++]); type[i] = static_cast<int> (buf[m++]); mask[i] = static_cast<int> (buf[m++]); molecule[i] = static_cast<int> (buf[m++]); line[i] = static_cast<int> (buf[m++]); if (line[i] == 0) line[i] = -1; else { j = nlocal_bonus + nghost_bonus; if (j == nmax_bonus) grow_bonus(); bonus[j].length = buf[m++]; bonus[j].theta = buf[m++]; bonus[j].ilocal = i; line[i] = j; nghost_bonus++; } } } /* ---------------------------------------------------------------------- */ void AtomVecLine::unpack_border_vel(int n, int first, double *buf) { int i,j,m,last; m = 0; last = first + n; for (i = first; i < last; i++) { if (i == nmax) grow(0); x[i][0] = buf[m++]; x[i][1] = buf[m++]; x[i][2] = buf[m++]; tag[i] = static_cast<int> (buf[m++]); type[i] = static_cast<int> (buf[m++]); mask[i] = static_cast<int> (buf[m++]); molecule[i] = static_cast<int> (buf[m++]); line[i] = static_cast<int> (buf[m++]); if (line[i] == 0) line[i] = -1; else { j = nlocal_bonus + nghost_bonus; if (j == nmax_bonus) grow_bonus(); bonus[j].length = buf[m++]; bonus[j].theta = buf[m++]; bonus[j].ilocal = i; line[i] = j; nghost_bonus++; } v[i][0] = buf[m++]; v[i][1] = buf[m++]; v[i][2] = buf[m++]; omega[i][0] = buf[m++]; omega[i][1] = buf[m++]; omega[i][2] = buf[m++]; } } /* ---------------------------------------------------------------------- */ int AtomVecLine::unpack_border_hybrid(int n, int first, double *buf) { int i,j,m,last; m = 0; last = first + n; for (i = first; i < last; i++) { molecule[i] = static_cast<int> (buf[m++]); line[i] = static_cast<int> (buf[m++]); if (line[i] == 0) line[i] = -1; else { j = nlocal_bonus + nghost_bonus; if (j == nmax_bonus) grow_bonus(); bonus[j].length = buf[m++]; bonus[j].theta = buf[m++]; bonus[j].ilocal = i; line[i] = j; nghost_bonus++; } } return m; } /* ---------------------------------------------------------------------- pack data for atom I for sending to another proc xyz must be 1st 3 values, so comm::exchange() can test on them ------------------------------------------------------------------------- */ int AtomVecLine::pack_exchange(int i, double *buf) { int m = 1; buf[m++] = x[i][0]; buf[m++] = x[i][1]; buf[m++] = x[i][2]; buf[m++] = v[i][0]; buf[m++] = v[i][1]; buf[m++] = v[i][2]; buf[m++] = tag[i]; buf[m++] = type[i]; buf[m++] = mask[i]; buf[m++] = image[i]; buf[m++] = molecule[i]; buf[m++] = rmass[i]; buf[m++] = omega[i][0]; buf[m++] = omega[i][1]; buf[m++] = omega[i][2]; if (line[i] < 0) buf[m++] = 0; else { buf[m++] = 1; int j = line[i]; buf[m++] = bonus[j].length; buf[m++] = bonus[j].theta; } if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); buf[0] = m; return m; } /* ---------------------------------------------------------------------- */ int AtomVecLine::unpack_exchange(double *buf) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); int m = 1; x[nlocal][0] = buf[m++]; x[nlocal][1] = buf[m++]; x[nlocal][2] = buf[m++]; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; tag[nlocal] = static_cast<int> (buf[m++]); type[nlocal] = static_cast<int> (buf[m++]); mask[nlocal] = static_cast<int> (buf[m++]); image[nlocal] = static_cast<int> (buf[m++]); molecule[nlocal] = static_cast<int> (buf[m++]); rmass[nlocal] = buf[m++]; omega[nlocal][0] = buf[m++]; omega[nlocal][1] = buf[m++]; omega[nlocal][2] = buf[m++]; line[nlocal] = static_cast<int> (buf[m++]); if (line[nlocal] == 0) line[nlocal] = -1; else { if (nlocal_bonus == nmax_bonus) grow_bonus(); bonus[nlocal_bonus].length = buf[m++]; bonus[nlocal_bonus].theta = buf[m++]; bonus[nlocal_bonus].ilocal = nlocal; line[nlocal] = nlocal_bonus++; } if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) m += modify->fix[atom->extra_grow[iextra]]-> unpack_exchange(nlocal,&buf[m]); atom->nlocal++; return m; } /* ---------------------------------------------------------------------- size of restart data for all atoms owned by this proc include extra data stored by fixes ------------------------------------------------------------------------- */ int AtomVecLine::size_restart() { int i; int n = 0; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) if (line[i] >= 0) n += 19; else n += 17; if (atom->nextra_restart) for (int iextra = 0; iextra < atom->nextra_restart; iextra++) for (i = 0; i < nlocal; i++) n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); return n; } /* ---------------------------------------------------------------------- pack atom I's data for restart file including extra quantities xyz must be 1st 3 values, so that read_restart can test on them molecular types may be negative, but write as positive ------------------------------------------------------------------------- */ int AtomVecLine::pack_restart(int i, double *buf) { int m = 1; buf[m++] = x[i][0]; buf[m++] = x[i][1]; buf[m++] = x[i][2]; buf[m++] = tag[i]; buf[m++] = type[i]; buf[m++] = mask[i]; buf[m++] = image[i]; buf[m++] = v[i][0]; buf[m++] = v[i][1]; buf[m++] = v[i][2]; buf[m++] = molecule[i]; buf[m++] = rmass[i]; buf[m++] = omega[i][0]; buf[m++] = omega[i][1]; buf[m++] = omega[i][2]; if (line[i] < 0) buf[m++] = 0; else { buf[m++] = 1; int j = line[i]; buf[m++] = bonus[j].length; buf[m++] = bonus[j].theta; } if (atom->nextra_restart) for (int iextra = 0; iextra < atom->nextra_restart; iextra++) m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); buf[0] = m; return m; } /* ---------------------------------------------------------------------- unpack data for one atom from restart file including extra quantities ------------------------------------------------------------------------- */ int AtomVecLine::unpack_restart(double *buf) { int nlocal = atom->nlocal; if (nlocal == nmax) { grow(0); if (atom->nextra_store) memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); } int m = 1; x[nlocal][0] = buf[m++]; x[nlocal][1] = buf[m++]; x[nlocal][2] = buf[m++]; tag[nlocal] = static_cast<int> (buf[m++]); type[nlocal] = static_cast<int> (buf[m++]); mask[nlocal] = static_cast<int> (buf[m++]); image[nlocal] = static_cast<int> (buf[m++]); v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; molecule[nlocal] = static_cast<int> (buf[m++]); rmass[nlocal] = buf[m++]; omega[nlocal][0] = buf[m++]; omega[nlocal][1] = buf[m++]; omega[nlocal][2] = buf[m++]; line[nlocal] = static_cast<int> (buf[m++]); if (line[nlocal] == 0) line[nlocal] = -1; else { if (nlocal_bonus == nmax_bonus) grow_bonus(); bonus[nlocal_bonus].length = buf[m++]; bonus[nlocal_bonus].theta = buf[m++]; bonus[nlocal_bonus].ilocal = nlocal; line[nlocal] = nlocal_bonus++; } double **extra = atom->extra; if (atom->nextra_store) { int size = static_cast<int> (buf[0]) - m; for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; } atom->nlocal++; return m; } /* ---------------------------------------------------------------------- create one atom of itype at coord set other values to defaults ------------------------------------------------------------------------- */ void AtomVecLine::create_atom(int itype, double *coord) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); tag[nlocal] = 0; type[nlocal] = itype; x[nlocal][0] = coord[0]; x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; image[nlocal] = (512 << 20) | (512 << 10) | 512; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; molecule[nlocal] = 0; rmass[nlocal] = 1.0; omega[nlocal][0] = 0.0; omega[nlocal][1] = 0.0; omega[nlocal][2] = 0.0; line[nlocal] = -1; atom->nlocal++; } /* ---------------------------------------------------------------------- unpack one line from Atoms section of data file initialize other atom quantities ------------------------------------------------------------------------- */ void AtomVecLine::data_atom(double *coord, int imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); tag[nlocal] = atoi(values[0]); if (tag[nlocal] <= 0) error->one(FLERR,"Invalid atom ID in Atoms section of data file"); molecule[nlocal] = atoi(values[1]); type[nlocal] = atoi(values[2]); if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) error->one(FLERR,"Invalid atom type in Atoms section of data file"); line[nlocal] = atoi(values[3]); if (line[nlocal] == 0) line[nlocal] = -1; else if (line[nlocal] == 1) line[nlocal] = 0; else error->one(FLERR,"Invalid atom type in Atoms section of data file"); rmass[nlocal] = atof(values[4]); if (rmass[nlocal] <= 0.0) error->one(FLERR,"Invalid density in Atoms section of data file"); x[nlocal][0] = coord[0]; x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; image[nlocal] = imagetmp; mask[nlocal] = 1; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; omega[nlocal][0] = 0.0; omega[nlocal][1] = 0.0; omega[nlocal][2] = 0.0; atom->nlocal++; } /* ---------------------------------------------------------------------- unpack hybrid quantities from one line in Atoms section of data file initialize other atom quantities for this sub-style ------------------------------------------------------------------------- */ int AtomVecLine::data_atom_hybrid(int nlocal, char **values) { molecule[nlocal] = atoi(values[0]); line[nlocal] = atoi(values[1]); if (line[nlocal] == 0) line[nlocal] = -1; else if (line[nlocal] == 1) line[nlocal] = 0; else error->one(FLERR,"Invalid atom type in Atoms section of data file"); rmass[nlocal] = atof(values[2]); if (rmass[nlocal] <= 0.0) error->one(FLERR,"Invalid density in Atoms section of data file"); return 3; } /* ---------------------------------------------------------------------- unpack one line from Lines section of data file ------------------------------------------------------------------------- */ void AtomVecLine::data_atom_bonus(int m, char **values) { if (line[m]) error->one(FLERR,"Assigning line parameters to non-line atom"); if (nlocal_bonus == nmax_bonus) grow_bonus(); double x1 = atof(values[0]); double y1 = atof(values[1]); double x2 = atof(values[2]); double y2 = atof(values[3]); double dx = x2 - x1; double dy = y2 - y1; double length = sqrt(dx*dx + dy*dy); bonus[nlocal_bonus].length = length; if (dy >= 0.0) bonus[nlocal_bonus].theta = acos(dx/length); else bonus[nlocal_bonus].theta = -acos(dx/length); double xc = 0.5*(x1+x2); double yc = 0.5*(y1+y2); dx = xc - x[m][0]; dy = yc - x[m][1]; double delta = sqrt(dx*dx + dy*dy); if (delta/length > EPSILON) error->one(FLERR,"Inconsistent line segment in data file"); x[m][0] = xc; x[m][1] = yc; // reset line mass // previously stored density in rmass rmass[m] *= length; bonus[nlocal_bonus].ilocal = m; line[m] = nlocal_bonus++; } /* ---------------------------------------------------------------------- unpack one line from Velocities section of data file ------------------------------------------------------------------------- */ void AtomVecLine::data_vel(int m, char **values) { v[m][0] = atof(values[0]); v[m][1] = atof(values[1]); v[m][2] = atof(values[2]); omega[m][0] = atof(values[3]); omega[m][1] = atof(values[4]); omega[m][2] = atof(values[5]); } /* ---------------------------------------------------------------------- unpack hybrid quantities from one line in Velocities section of data file ------------------------------------------------------------------------- */ int AtomVecLine::data_vel_hybrid(int m, char **values) { omega[m][0] = atof(values[0]); omega[m][1] = atof(values[1]); omega[m][2] = atof(values[2]); return 3; } /* ---------------------------------------------------------------------- return # of bytes of allocated memory ------------------------------------------------------------------------- */ bigint AtomVecLine::memory_usage() { bigint bytes = 0; if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); if (atom->memcheck("type")) bytes += memory->usage(type,nmax); if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); if (atom->memcheck("rmass")) bytes += memory->usage(rmass,nmax); if (atom->memcheck("omega")) bytes += memory->usage(omega,nmax,3); if (atom->memcheck("torque")) bytes += memory->usage(torque,nmax*comm->nthreads,3); if (atom->memcheck("line")) bytes += memory->usage(line,nmax); bytes += nmax_bonus*sizeof(Bonus); return bytes; } /* ---------------------------------------------------------------------- check consistency of internal Bonus data structure n = # of atoms in regular structure to check against ------------------------------------------------------------------------- */ /* void AtomVecLine::consistency_check(int n, char *str) { int iflag = 0; int count = 0; for (int i = 0; i < n; i++) { if (line[i] >= 0) { count++; if (line[i] >= nlocal_bonus) iflag++; if (bonus[line[i]].ilocal != i) iflag++; //if (comm->me == 1 && update->ntimestep == 873) // printf("CCHK %s: %d %d: %d %d: %d %d\n", // str,i,n,line[i],nlocal_bonus,bonus[line[i]].ilocal,iflag); } } if (iflag) { - char msg[128]; - sprintf(msg,"BAD VECLINE PTRS: %s: %d %d: %d\n",str,comm->me, - update->ntimestep,iflag); - error->one(FLERR,msg); + printf("BAD vecline ptrs: %s: %d %d: %d\n",str,comm->me, + update->ntimestep,iflag); + MPI_Abort(world,1); } if (count != nlocal_bonus) { char msg[128]; - sprintf(msg,"BAD VECLINE COUNT: %s: %d %d: %d %d\n", - str,comm->me,update->ntimestep,count,nlocal_bonus); - error->one(FLERR,msg); + printf("BAD vecline count: %s: %d %d: %d %d\n", + str,comm->me,update->ntimestep,count,nlocal_bonus); + MPI_Abort(world,1); } } */ diff --git a/src/atom_vec_line.h b/src/atom_vec_line.h index 6e100bba9..6b09933cb 100644 --- a/src/atom_vec_line.h +++ b/src/atom_vec_line.h @@ -1,137 +1,130 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef ATOM_CLASS AtomStyle(line,AtomVecLine) #else #ifndef LMP_ATOM_VEC_LINE_H #define LMP_ATOM_VEC_LINE_H #include "atom_vec.h" namespace LAMMPS_NS { class AtomVecLine : public AtomVec { public: struct Bonus { double length,theta; int ilocal; }; struct Bonus *bonus; AtomVecLine(class LAMMPS *, int, char **); ~AtomVecLine(); void init(); void grow(int); void grow_reset(); void copy(int, int, int); int pack_comm(int, int *, double *, int, int *); int pack_comm_vel(int, int *, double *, int, int *); int pack_comm_hybrid(int, int *, double *); void unpack_comm(int, int, double *); void unpack_comm_vel(int, int, double *); int unpack_comm_hybrid(int, int, double *); int pack_reverse(int, int, double *); int pack_reverse_hybrid(int, int, double *); void unpack_reverse(int, int *, double *); int unpack_reverse_hybrid(int, int *, double *); int pack_border(int, int *, double *, int, int *); int pack_border_vel(int, int *, double *, int, int *); int pack_border_hybrid(int, int *, double *); void unpack_border(int, int, double *); void unpack_border_vel(int, int, double *); int unpack_border_hybrid(int, int, double *); int pack_exchange(int, double *); int unpack_exchange(double *); int size_restart(); int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); void data_atom(double *, int, char **); int data_atom_hybrid(int, char **); void data_vel(int, char **); int data_vel_hybrid(int, char **); bigint memory_usage(); // manipulate Bonus data structure for extra atom info void clear_bonus(); void data_atom_bonus(int, char **); // unique to AtomVecLine void set_length(int, double); private: int *tag,*type,*mask,*image; double **x,**v,**f; int *molecule; double *rmass; double **omega,**torque; int *line; int nlocal_bonus,nghost_bonus,nmax_bonus; void grow_bonus(); void copy_bonus(int, int); // void consistency_check(int, char *); }; } #endif #endif /* ERROR/WARNING messages: E: Atom_style line can only be used in 2d simulations -UNDOCUMENTED +Self-explanatory. E: Per-processor system is too big The number of owned atoms plus ghost atoms on a single processor must fit in 32-bit integer. E: Invalid atom ID in Atoms section of data file Atom IDs must be positive integers. E: Invalid atom type in Atoms section of data file Atom types must range from 1 to specified # of types. E: Invalid density in Atoms section of data file Density value cannot be <= 0.0. E: Assigning line parameters to non-line atom -UNDOCUMENTED +Self-explanatory. E: Inconsistent line segment in data file -UNDOCUMENTED - -E: BAD VECLINE PTRS: %s: %d %d: %d\n - -UNDOCUMENTED - -E: BAD VECLINE COUNT: %s: %d %d: %d %d\n - -UNDOCUMENTED +The end points of the line segment are not equal distances from the +center point which is the atom coordinate. */ diff --git a/src/atom_vec_tri.h b/src/atom_vec_tri.h index 3bf14d3e2..e2f73b751 100644 --- a/src/atom_vec_tri.h +++ b/src/atom_vec_tri.h @@ -1,138 +1,140 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef ATOM_CLASS AtomStyle(tri,AtomVecTri) #else #ifndef LMP_ATOM_VEC_TRI_H #define LMP_ATOM_VEC_TRI_H #include "atom_vec.h" namespace LAMMPS_NS { class AtomVecTri : public AtomVec { public: struct Bonus { double quat[4]; double c1[3],c2[3],c3[3]; double inertia[3]; int ilocal; }; struct Bonus *bonus; AtomVecTri(class LAMMPS *, int, char **); ~AtomVecTri(); void init(); void grow(int); void grow_reset(); void copy(int, int, int); int pack_comm(int, int *, double *, int, int *); int pack_comm_vel(int, int *, double *, int, int *); int pack_comm_hybrid(int, int *, double *); void unpack_comm(int, int, double *); void unpack_comm_vel(int, int, double *); int unpack_comm_hybrid(int, int, double *); int pack_reverse(int, int, double *); int pack_reverse_hybrid(int, int, double *); void unpack_reverse(int, int *, double *); int unpack_reverse_hybrid(int, int *, double *); int pack_border(int, int *, double *, int, int *); int pack_border_vel(int, int *, double *, int, int *); int pack_border_hybrid(int, int *, double *); void unpack_border(int, int, double *); void unpack_border_vel(int, int, double *); int unpack_border_hybrid(int, int, double *); int pack_exchange(int, double *); int unpack_exchange(double *); int size_restart(); int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); void data_atom(double *, int, char **); int data_atom_hybrid(int, char **); void data_vel(int, char **); int data_vel_hybrid(int, char **); bigint memory_usage(); // manipulate Bonus data structure for extra atom info void clear_bonus(); void data_atom_bonus(int, char **); // unique to AtomVecTri void set_equilateral(int, double); private: int *tag,*type,*mask,*image; double **x,**v,**f; int *molecule; double *rmass; double **angmom,**torque; int *tri; int nlocal_bonus,nghost_bonus,nmax_bonus; void grow_bonus(); void copy_bonus(int, int); }; } #endif #endif /* ERROR/WARNING messages: E: Atom_style tri can only be used in 3d simulations -UNDOCUMENTED +Self-explanatory. E: Per-processor system is too big The number of owned atoms plus ghost atoms on a single processor must fit in 32-bit integer. E: Invalid atom ID in Atoms section of data file Atom IDs must be positive integers. E: Invalid atom type in Atoms section of data file Atom types must range from 1 to specified # of types. E: Invalid density in Atoms section of data file Density value cannot be <= 0.0. E: Assigning tri parameters to non-tri atom -UNDOCUMENTED +Self-explanatory. E: Invalid shape in Triangles section of data file -UNDOCUMENTED +Two or more of the triangle corners are duplicate points. E: Inconsistent triangle in data file -UNDOCUMENTED +The centroid of the triangle as defined by the corner points is not +the atom coordinate. E: Insufficient Jacobi rotations for triangle -UNDOCUMENTED +The calculation of the intertia tensor of the triangle failed. This +should not happen if it is a reasonably shaped triangle. */ diff --git a/src/balance.cpp b/src/balance.cpp index 45e64ef48..977addb67 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -1,730 +1,812 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #include "mpi.h" #include "math.h" #include "stdlib.h" #include "string.h" #include "balance.h" #include "atom.h" #include "comm.h" #include "irregular.h" #include "domain.h" #include "force.h" #include "update.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; enum{NONE,UNIFORM,USER,DYNAMIC}; enum{X,Y,Z}; enum{EXPAND,CONTRACT}; +#define BIG + +#define BALANCE_DEBUG 1 + /* ---------------------------------------------------------------------- */ Balance::Balance(LAMMPS *lmp) : Pointers(lmp) { MPI_Comm_rank(world,&me); MPI_Comm_size(world,&nprocs); memory->create(pcount,nprocs,"balance:pcount"); memory->create(allcount,nprocs,"balance:allcount"); user_xsplit = user_ysplit = user_zsplit = NULL; dflag = 0; fp = NULL; } /* ---------------------------------------------------------------------- */ Balance::~Balance() { memory->destroy(pcount); memory->destroy(allcount); delete [] user_xsplit; delete [] user_ysplit; delete [] user_zsplit; if (dflag) { delete [] bstr; delete [] ops; delete [] counts[0]; delete [] counts[1]; delete [] counts[2]; delete [] cuts; delete [] onecount; //MPI_Comm_free(&commslice[0]); //MPI_Comm_free(&commslice[1]); //MPI_Comm_free(&commslice[2]); } if (fp) fclose(fp); } /* ---------------------------------------------------------------------- called as balance command in input script ------------------------------------------------------------------------- */ void Balance::command(int narg, char **arg) { if (domain->box_exist == 0) error->all(FLERR,"Balance command before simulation box is defined"); if (comm->me == 0 && screen) fprintf(screen,"Balancing ...\n"); // parse arguments - if (narg < 1) error->all(FLERR,"Illegal balance command"); - int dimension = domain->dimension; int *procgrid = comm->procgrid; xflag = yflag = zflag = NONE; dflag = 0; int iarg = 0; while (iarg < narg) { if (strcmp(arg[iarg],"x") == 0) { if (xflag == DYNAMIC) error->all(FLERR,"Illegal balance command"); if (strcmp(arg[iarg+1],"uniform") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal balance command"); xflag = UNIFORM; iarg += 2; } else { if (1 + procgrid[0]-1 > narg) error->all(FLERR,"Illegal balance command"); xflag = USER; delete [] user_xsplit; user_xsplit = new double[procgrid[0]+1]; user_xsplit[0] = 0.0; iarg++; for (int i = 1; i < procgrid[0]; i++) user_xsplit[i] = force->numeric(arg[iarg++]); user_xsplit[procgrid[0]] = 1.0; } } else if (strcmp(arg[iarg],"y") == 0) { if (yflag == DYNAMIC) error->all(FLERR,"Illegal balance command"); if (strcmp(arg[iarg+1],"uniform") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal balance command"); yflag = UNIFORM; iarg += 2; } else { if (1 + procgrid[1]-1 > narg) error->all(FLERR,"Illegal balance command"); yflag = USER; delete [] user_ysplit; user_ysplit = new double[procgrid[1]+1]; user_ysplit[0] = 0.0; iarg++; for (int i = 1; i < procgrid[1]; i++) user_ysplit[i] = force->numeric(arg[iarg++]); user_ysplit[procgrid[1]] = 1.0; } } else if (strcmp(arg[iarg],"z") == 0) { if (zflag == DYNAMIC) error->all(FLERR,"Illegal balance command"); if (strcmp(arg[iarg+1],"uniform") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal balance command"); zflag = UNIFORM; iarg += 2; } else { if (1 + procgrid[2]-1 > narg) error->all(FLERR,"Illegal balance command"); zflag = USER; delete [] user_zsplit; user_zsplit = new double[procgrid[2]+1]; user_zsplit[0] = 0.0; iarg++; for (int i = 1; i < procgrid[2]; i++) user_zsplit[i] = force->numeric(arg[iarg++]); user_zsplit[procgrid[2]] = 1.0; } } else if (strcmp(arg[iarg],"dynamic") == 0) { if (xflag != NONE || yflag != NONE || zflag != NONE) error->all(FLERR,"Illegal balance command"); if (iarg+5 > narg) error->all(FLERR,"Illegal balance command"); dflag = 1; xflag = yflag = DYNAMIC; if (dimension == 3) zflag = DYNAMIC; nrepeat = atoi(arg[iarg+1]); niter = atoi(arg[iarg+2]); if (nrepeat <= 0 || niter <= 0) error->all(FLERR,"Illegal balance command"); int n = strlen(arg[iarg+3]) + 1; bstr = new char[n]; strcpy(bstr,arg[iarg+3]); thresh = atof(arg[iarg+4]); if (thresh < 1.0) error->all(FLERR,"Illegal balance command"); iarg += 5; } else error->all(FLERR,"Illegal balance command"); } // error check if (zflag && dimension == 2) error->all(FLERR,"Cannot balance in z dimension for 2d simulation"); if (xflag == USER) for (int i = 1; i <= procgrid[0]; i++) if (user_xsplit[i-1] >= user_xsplit[i]) error->all(FLERR,"Illegal balance command"); if (yflag == USER) for (int i = 1; i <= procgrid[1]; i++) if (user_ysplit[i-1] >= user_ysplit[i]) error->all(FLERR,"Illegal balance command"); if (zflag == USER) for (int i = 1; i <= procgrid[2]; i++) if (user_zsplit[i-1] >= user_zsplit[i]) error->all(FLERR,"Illegal balance command"); if (dflag) { for (int i = 0; i < strlen(bstr); i++) { if (bstr[i] != 'x' && bstr[i] != 'y' && bstr[i] != 'z') error->all(FLERR,"Balance dynamic string is invalid"); if (bstr[i] == 'z' && dimension == 2) error->all(FLERR,"Balance dynamic string is invalid for 2d simulation"); } } // insure atoms are in current box & update box via shrink-wrap // no exchange() since doesn't matter if atoms are assigned to correct procs if (domain->triclinic) domain->x2lamda(atom->nlocal); domain->pbc(); domain->reset_box(); if (domain->triclinic) domain->lamda2x(atom->nlocal); // imbinit = initial imbalance // use current splits instead of nlocal since atoms may not be in sub-box domain->x2lamda(atom->nlocal); int maxinit; double imbinit = imbalance_splits(maxinit); domain->lamda2x(atom->nlocal); // debug output of initial state - //dumpout(update->ntimestep); +#ifdef BALANCE_DEBUG + dumpout(update->ntimestep); +#endif // explicit setting of sub-domain sizes if (xflag == UNIFORM) { for (int i = 0; i < procgrid[0]; i++) comm->xsplit[i] = i * 1.0/procgrid[0]; comm->xsplit[procgrid[0]] = 1.0; } if (yflag == UNIFORM) { for (int i = 0; i < procgrid[1]; i++) comm->ysplit[i] = i * 1.0/procgrid[1]; comm->ysplit[procgrid[1]] = 1.0; } if (zflag == UNIFORM) { for (int i = 0; i < procgrid[2]; i++) comm->zsplit[i] = i * 1.0/procgrid[2]; comm->zsplit[procgrid[2]] = 1.0; } if (xflag == USER) for (int i = 0; i <= procgrid[0]; i++) comm->xsplit[i] = user_xsplit[i]; if (yflag == USER) for (int i = 0; i <= procgrid[1]; i++) comm->ysplit[i] = user_ysplit[i]; if (zflag == USER) for (int i = 0; i <= procgrid[2]; i++) comm->zsplit[i] = user_zsplit[i]; - // dynamic load-balance of sub-domain sizes + // static load-balance of sub-domain sizes + int count = 0; if (dflag) { dynamic_setup(bstr); - dynamic(); - } else count = 0; + count = dynamic_once(); + } // debug output of final result - //dumpout(-1); +#ifdef BALANCE_DEBUG + dumpout(-1); +#endif // reset comm->uniform flag if necessary if (comm->uniform) { if (xflag == USER || xflag == DYNAMIC) comm->uniform = 0; if (yflag == USER || yflag == DYNAMIC) comm->uniform = 0; if (zflag == USER || zflag == DYNAMIC) comm->uniform = 0; } else { if (dimension == 3) { if (xflag == UNIFORM && yflag == UNIFORM && zflag == UNIFORM) comm->uniform = 1; } else { if (xflag == UNIFORM && yflag == UNIFORM) comm->uniform = 1; } } // reset proc sub-domains if (domain->triclinic) domain->set_lamda_box(); domain->set_local_box(); // move atoms to new processors via irregular() if (domain->triclinic) domain->x2lamda(atom->nlocal); Irregular *irregular = new Irregular(lmp); irregular->migrate_atoms(); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); // check if any atoms were lost bigint natoms; bigint nblocal = atom->nlocal; MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world); if (natoms != atom->natoms) { char str[128]; sprintf(str,"Lost atoms via balance: original " BIGINT_FORMAT " current " BIGINT_FORMAT,atom->natoms,natoms); error->all(FLERR,str); } // imbfinal = final imbalance based on final nlocal int maxfinal; double imbfinal = imbalance_nlocal(maxfinal); if (me == 0) { if (screen) { fprintf(screen," iteration count = %d\n",count); fprintf(screen," initial/final max atoms/proc = %d %d\n", maxinit,maxfinal); fprintf(screen," initial/final imbalance factor = %g %g\n", imbinit,imbfinal); } if (logfile) { fprintf(logfile," iteration count = %d\n",count); fprintf(logfile," initial/final max atoms/proc = %d %d\n", maxinit,maxfinal); fprintf(logfile," initial/final imbalance factor = %g %g\n", imbinit,imbfinal); } } if (me == 0) { if (screen) { fprintf(screen," x cuts:"); for (int i = 0; i <= comm->procgrid[0]; i++) fprintf(screen," %g",comm->xsplit[i]); fprintf(screen,"\n"); fprintf(screen," y cuts:"); for (int i = 0; i <= comm->procgrid[1]; i++) fprintf(screen," %g",comm->ysplit[i]); fprintf(screen,"\n"); fprintf(screen," z cuts:"); for (int i = 0; i <= comm->procgrid[2]; i++) fprintf(screen," %g",comm->zsplit[i]); fprintf(screen,"\n"); } if (logfile) { fprintf(logfile," x cuts:"); for (int i = 0; i <= comm->procgrid[0]; i++) fprintf(logfile," %g",comm->xsplit[i]); fprintf(logfile,"\n"); fprintf(logfile," y cuts:"); for (int i = 0; i <= comm->procgrid[1]; i++) fprintf(logfile," %g",comm->ysplit[i]); fprintf(logfile,"\n"); fprintf(logfile," z cuts:"); for (int i = 0; i <= comm->procgrid[2]; i++) fprintf(logfile," %g",comm->zsplit[i]); fprintf(logfile,"\n"); } } } /* ---------------------------------------------------------------------- calculate imbalance based on nlocal return max = max atom per proc return imbalance factor = max atom per proc / ave atom per proc ------------------------------------------------------------------------- */ double Balance::imbalance_nlocal(int &max) { MPI_Allreduce(&atom->nlocal,&max,1,MPI_INT,MPI_MAX,world); double imbalance = max / (1.0 * atom->natoms / nprocs); return imbalance; } /* ---------------------------------------------------------------------- calculate imbalance based on processor splits in 3 dims atoms must be in lamda coords (0-1) before called map atoms to 3d grid of procs return max = max atom per proc return imbalance factor = max atom per proc / ave atom per proc ------------------------------------------------------------------------- */ double Balance::imbalance_splits(int &max) { double *xsplit = comm->xsplit; double *ysplit = comm->ysplit; double *zsplit = comm->zsplit; int nx = comm->procgrid[0]; int ny = comm->procgrid[1]; int nz = comm->procgrid[2]; for (int i = 0; i < nprocs; i++) pcount[i] = 0; double **x = atom->x; int nlocal = atom->nlocal; int ix,iy,iz; for (int i = 0; i < nlocal; i++) { ix = binary(x[i][0],nx,xsplit); iy = binary(x[i][1],ny,ysplit); iz = binary(x[i][2],nz,zsplit); pcount[iz*nx*ny + iy*nx + ix]++; } MPI_Allreduce(pcount,allcount,nprocs,MPI_INT,MPI_SUM,world); max = 0; for (int i = 0; i < nprocs; i++) max = MAX(max,allcount[i]); double imbalance = max / (1.0 * atom->natoms / nprocs); return imbalance; } /* ---------------------------------------------------------------------- - setup dynamic load balance operations - called from command & fix balance + setup static load balance operations + called from command ------------------------------------------------------------------------- */ void Balance::dynamic_setup(char *str) { nops = strlen(str); ops = new int[nops]; for (int i = 0; i < strlen(str); i++) { if (str[i] == 'x') ops[i] = X; if (str[i] == 'y') ops[i] = Y; if (str[i] == 'z') ops[i] = Z; } splits[0] = comm->xsplit; splits[1] = comm->ysplit; splits[2] = comm->zsplit; counts[0] = new bigint[comm->procgrid[0]]; counts[1] = new bigint[comm->procgrid[1]]; counts[2] = new bigint[comm->procgrid[2]]; int max = MAX(comm->procgrid[0],comm->procgrid[1]); max = MAX(max,comm->procgrid[2]); cuts = new double[max+1]; onecount = new bigint[max]; //MPI_Comm_split(world,comm->myloc[0],0,&commslice[0]); //MPI_Comm_split(world,comm->myloc[1],0,&commslice[1]); //MPI_Comm_split(world,comm->myloc[2],0,&commslice[2]); } +/* ---------------------------------------------------------------------- + setup dynamic load balance operations + called from fix balance +------------------------------------------------------------------------- */ + +void Balance::dynamic_setup(int nrepeat_in, int niter_in, + char *str, double thresh_in) +{ + nrepeat = nrepeat_in; + niter = niter_in; + thresh = thresh_in; + + dynamic_setup(str); +} + +/* ---------------------------------------------------------------------- + perform static load balance by changing xyz split proc boundaries in Comm + called from command + return actual iteration count +------------------------------------------------------------------------- */ + +int Balance::dynamic_once() +{ + int i,m,max; + double imbfactor; + + int *procgrid = comm->procgrid; + + domain->x2lamda(atom->nlocal); + + int count = 0; + for (int irepeat = 0; irepeat < nrepeat; irepeat++) { + for (i = 0; i < nops; i++) { + for (m = 0; m < niter; m++) { + stats(ops[i],procgrid[ops[i]],splits[ops[i]],counts[ops[i]]); + adjust(procgrid[ops[i]],counts[ops[i]],splits[ops[i]]); + count++; + +#ifdef BALANCE_DEBUG + dumpout(-1); +#endif + } + imbfactor = imbalance_splits(max); + if (imbfactor <= thresh) break; + } + if (i < nops) break; + } + + domain->lamda2x(atom->nlocal); + + return count; +} + /* ---------------------------------------------------------------------- perform dynamic load balance by changing xyz split proc boundaries in Comm called from command and fix balance + return actual iteration count ------------------------------------------------------------------------- */ -void Balance::dynamic() +int Balance::dynamic() { int i,m,max; double imbfactor; +#ifdef BALANCE_DEBUG + dumpout(update->ntimestep); +#endif + int *procgrid = comm->procgrid; domain->x2lamda(atom->nlocal); - count = 0; + int count = 0; for (int irepeat = 0; irepeat < nrepeat; irepeat++) { for (i = 0; i < nops; i++) { for (m = 0; m < niter; m++) { stats(ops[i],procgrid[ops[i]],splits[ops[i]],counts[ops[i]]); adjust(procgrid[ops[i]],counts[ops[i]],splits[ops[i]]); count++; - // debug output of intermediate result - //dumpout(-1); + +#ifdef BALANCE_DEBUG + dumpout(-1); +#endif } imbfactor = imbalance_splits(max); if (imbfactor <= thresh) break; } if (i < nops) break; } domain->lamda2x(atom->nlocal); + +#ifdef BALANCE_DEBUG + dumpout(-1); +#endif + + return count; } /* ---------------------------------------------------------------------- count atoms in each slice current cuts may be very different than original cuts, so use binary search to find which slice each atom is in ------------------------------------------------------------------------- */ void Balance::stats(int dim, int n, double *split, bigint *count) { for (int i = 0; i < n; i++) onecount[i] = 0; double **x = atom->x; int nlocal = atom->nlocal; int index; for (int i = 0; i < nlocal; i++) { index = binary(x[i][dim],n,split); onecount[index]++; } MPI_Allreduce(onecount,count,n,MPI_LMP_BIGINT,MPI_SUM,world); } /* ---------------------------------------------------------------------- adjust cuts between N slices in a dim via diffusive method count = atoms per slice split = current N+1 cuts, with 0.0 and 1.0 at end points overwrite split with new cuts diffusion means slices with more atoms than their neighbors "send" them atoms by moving cut closer to sender, further from receiver ------------------------------------------------------------------------- */ void Balance::adjust(int n, bigint *count, double *split) { // damping factor double damp = 0.5; - // loop over slices from 1 to N-2 inclusive (not end slices 0 and N-1) + // maxcount = max atoms in any slice + + bigint maxcount = 0; + for (int i = 0; i < n; i++) + maxcount = MAX(maxcount,count[i]); + + // loop over slices // cut I is between 2 slices (I-1 and I) with counts // cut I+1 is between 2 slices (I and I+1) with counts // for a cut between 2 slices, only slice with larger count adjusts it + // special treatment of end slices with only 1 neighbor bigint leftcount,mycount,rightcount; double rho,target,targetleft,targetright; - for (int i = 1; i < n-1; i++) { - leftcount = count[i-1]; + for (int i = 0; i < n; i++) { + if (i == 0) leftcount = maxcount; + else leftcount = count[i-1]; mycount = count[i]; - rightcount = count[i+1]; + if (i == n-1) rightcount = maxcount; + else rightcount = count[i+1]; // middle slice is <= both left and right, so do nothing // special case if 2 slices both have count = 0, no change in cut if (mycount <= leftcount && mycount <= rightcount) { if (leftcount == 0) cuts[i] = split[i]; if (rightcount == 0) cuts[i+1] = split[i+1]; continue; } // rho = density of atoms in the slice rho = mycount / (split[i+1] - split[i]); // middle slice has more atoms then left or right slice // if delta from middle to top slice > delta between top and bottom slice // then send atoms both dirs to bring all 3 slices to same count // else bottom slice is very low, so send atoms only in that dir if (mycount > leftcount && mycount > rightcount) { if (mycount-MAX(leftcount,rightcount) >= fabs(leftcount-rightcount)) { if (leftcount <= rightcount) { targetleft = damp * (rightcount-leftcount + (mycount-rightcount)/3.0); targetright = damp * (mycount-rightcount)/3.0; cuts[i] = split[i] + targetleft/rho; cuts[i+1] = split[i+1] - targetright/rho; } else { targetleft = damp * (mycount-leftcount)/3.0; targetright = damp * (leftcount-rightcount + (mycount-leftcount)/3.0); cuts[i] = split[i] + targetleft/rho; cuts[i+1] = split[i+1] - targetright/rho; } } else if (leftcount < rightcount) { target = damp * 0.5*(mycount-leftcount); cuts[i] = split[i] + target/rho; cuts[i+1] = split[i+1]; } else if (rightcount < leftcount) { target = damp * 0.5*(mycount-rightcount); cuts[i+1] = split[i+1] - target/rho; cuts[i] = split[i]; } // middle slice has more atoms than only left or right slice // send atoms only in that dir } else if (mycount > leftcount) { target = damp * 0.5*(mycount-leftcount); cuts[i] = split[i] + target/rho; } else if (mycount > rightcount) { target = damp * 0.5*(mycount-rightcount); cuts[i+1] = split[i+1] - target/rho; } } // overwrite adjustable splits with new cuts for (int i = 1; i < n; i++) split[i] = cuts[i]; } /* ---------------------------------------------------------------------- binary search for value in N-length ascending vec value may be outside range of vec limits always return index from 0 to N-1 inclusive return 0 if value < vec[0] reutrn N-1 if value >= vec[N-1] return index = 1 to N-2 if vec[index] <= value < vec[index+1] ------------------------------------------------------------------------- */ int Balance::binary(double value, int n, double *vec) { int lo = 0; int hi = n-1; if (value < vec[lo]) return lo; if (value >= vec[hi]) return hi; // insure vec[lo] <= value < vec[hi] at every iteration // done when lo,hi are adjacent int index = (lo+hi)/2; while (lo < hi-1) { if (value < vec[index]) hi = index; else if (value >= vec[index]) lo = index; index = (lo+hi)/2; } return index; } /* ---------------------------------------------------------------------- create dump file of line segments in Pizza.py mdump mesh format just for debug/viz purposes write to tmp.mdump.*, open first time if necessary write xy lines around each proc's sub-domain for 2d write xyz cubes around each proc's sub-domain for 3d all procs but 0 just return ------------------------------------------------------------------------- */ void Balance::dumpout(bigint tstamp) { if (me) return; bigint tstep; if (tstamp >= 0) tstep = tstamp; else tstep = laststep + 1; laststep = tstep; if (fp == NULL) { char file[32]; sprintf(file,"tmp.mdump.%ld",tstep); fp = fopen(file,"w"); if (!fp) error->one(FLERR,"Cannot open balance output file"); // write out one square/cute per processor for 2d/3d // only write once since topology is static fprintf(fp,"ITEM: TIMESTEP\n"); fprintf(fp,"%ld\n",tstep); fprintf(fp,"ITEM: NUMBER OF SQUARES\n"); fprintf(fp,"%d\n",nprocs); fprintf(fp,"ITEM: SQUARES\n"); int nx = comm->procgrid[0] + 1; int ny = comm->procgrid[1] + 1; int nz = comm->procgrid[2] + 1; if (domain->dimension == 2) { int m = 0; for (int j = 0; j < comm->procgrid[1]; j++) for (int i = 0; i < comm->procgrid[0]; i++) { int c1 = j*nx + i + 1; int c2 = c1 + 1; int c3 = c2 + nx; int c4 = c3 - 1; fprintf(fp,"%d %d %d %d %d %d\n",m+1,m+1,c1,c2,c3,c4); m++; } } else { int m = 0; for (int k = 0; k < comm->procgrid[2]; k++) for (int j = 0; j < comm->procgrid[1]; j++) for (int i = 0; i < comm->procgrid[0]; i++) { int c1 = k*ny*nx + j*nx + i + 1; int c2 = c1 + 1; int c3 = c2 + nx; int c4 = c3 - 1; int c5 = c1 + ny*nx; int c6 = c2 + ny*nx; int c7 = c3 + ny*nx; int c8 = c4 + ny*nx; fprintf(fp,"%d %d %d %d %d %d %d %d %d %d\n", m+1,m+1,c1,c2,c3,c4,c5,c6,c7,c8); m++; } } } // write out nodal coords, can be different every call // scale xsplit,ysplit,zsplit values to full box // only implmented for orthogonal boxes, not triclinic int nx = comm->procgrid[0] + 1; int ny = comm->procgrid[1] + 1; int nz = comm->procgrid[2] + 1; double *boxlo = domain->boxlo; double *boxhi = domain->boxhi; double *prd = domain->prd; fprintf(fp,"ITEM: TIMESTEP\n"); fprintf(fp,"%ld\n",tstep); fprintf(fp,"ITEM: NUMBER OF NODES\n"); if (domain->dimension == 2) fprintf(fp,"%d\n",nx*ny); else fprintf(fp,"%d\n",nx*ny*nz); fprintf(fp,"ITEM: BOX BOUNDS\n"); fprintf(fp,"%g %g\n",boxlo[0],boxhi[0]); fprintf(fp,"%g %g\n",boxlo[1],boxhi[1]); fprintf(fp,"%g %g\n",boxlo[2],boxhi[2]); fprintf(fp,"ITEM: NODES\n"); if (domain->dimension == 2) { int m = 0; for (int j = 0; j < ny; j++) for (int i = 0; i < nx; i++) { fprintf(fp,"%d %d %g %g %g\n",m+1,1, boxlo[0] + prd[0]*comm->xsplit[i], boxlo[1] + prd[1]*comm->ysplit[j], 0.0); m++; } } else { int m = 0; for (int k = 0; k < nz; k++) for (int j = 0; j < ny; j++) for (int i = 0; i < nx; i++) { fprintf(fp,"%d %d %g %g %g\n",m+1,1, boxlo[0] + prd[0]*comm->xsplit[i], boxlo[1] + prd[1]*comm->ysplit[j], boxlo[2] + prd[2]*comm->zsplit[j]); m++; } } } diff --git a/src/balance.h b/src/balance.h index c85a4b65c..f2a3376b4 100644 --- a/src/balance.h +++ b/src/balance.h @@ -1,103 +1,108 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMMAND_CLASS CommandStyle(balance,Balance) #else #ifndef LMP_BALANCE_H #define LMP_BALANCE_H #include "mpi.h" #include "stdio.h" #include "pointers.h" namespace LAMMPS_NS { class Balance : protected Pointers { public: Balance(class LAMMPS *); ~Balance(); void command(int, char **); + void dynamic_setup(int, int, char *, double); + int dynamic(); + double imbalance_nlocal(int &); private: int me,nprocs; int xflag,yflag,zflag,dflag; int nrepeat,niter; double thresh; char *bstr; double *user_xsplit,*user_ysplit,*user_zsplit; int *ops; int nops; double *splits[3]; bigint *counts[3]; double *cuts; bigint *onecount; MPI_Comm commslice[3]; - int count; int *pcount,*allcount; FILE *fp; // for debug output bigint laststep; - double imbalance_splits(int &); - double imbalance_nlocal(int &); void dynamic_setup(char *); - void dynamic(); + int dynamic_once(); + double imbalance_splits(int &); void stats(int, int, double *, bigint *); void adjust(int, bigint *, double *); int binary(double, int, double *); void dumpout(bigint); // for debug output }; } #endif #endif /* ERROR/WARNING messages: E: Balance command before simulation box is defined -UNDOCUMENTED +The balance command cannot be used before a read_data, read_restart, +or create_box command. E: Illegal ... command -UNDOCUMENTED +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. E: Cannot balance in z dimension for 2d simulation -UNDOCUMENTED +Self-explanatory. E: Balance dynamic string is invalid -UNDOCUMENTED +The string can only contain the characters "x", "y", or "z". E: Balance dynamic string is invalid for 2d simulation -UNDOCUMENTED +The string cannot contain the letter "z". E: Lost atoms via balance: original %ld current %ld -UNDOCUMENTED +This should not occur. Report the problem to the developers. E: Cannot open balance output file -UNDOCUMENTED +This error message can only occur if debug options +are uncommented in src/balance.cpp. */ diff --git a/src/change_box.cpp b/src/change_box.cpp index a47be3666..2b629812c 100644 --- a/src/change_box.cpp +++ b/src/change_box.cpp @@ -1,456 +1,457 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #include "lmptype.h" #include "mpi.h" #include "math.h" #include "stdlib.h" #include "string.h" #include "change_box.h" #include "atom.h" #include "modify.h" #include "fix.h" #include "domain.h" #include "lattice.h" #include "comm.h" #include "irregular.h" #include "output.h" #include "group.h" #include "error.h" using namespace LAMMPS_NS; enum{XYZ,TILT,BOUNDARY,ORTHO,TRICLINIC,SET,REMAP}; enum{FINAL,DELTA,SCALE}; enum{X,Y,Z,YZ,XZ,XY}; /* ---------------------------------------------------------------------- */ ChangeBox::ChangeBox(LAMMPS *lmp) : Pointers(lmp) {} /* ---------------------------------------------------------------------- */ void ChangeBox::command(int narg, char **arg) { int i; if (domain->box_exist == 0) error->all(FLERR,"Change_box command before simulation box is defined"); if (narg < 2) error->all(FLERR,"Illegal change_box command"); if (modify->nfix_restart_peratom) error->all(FLERR,"Cannot change_box after " "reading restart file with per-atom info"); if (comm->me == 0 && screen) fprintf(screen,"Changing box ...\n"); // group int igroup = group->find(arg[0]); if (igroup == -1) error->all(FLERR,"Could not find change_box group ID"); int groupbit = group->bitmask[igroup]; // parse operation arguments // allocate ops to max possible length // volume option does not increment nops int dimension = domain->dimension; ops = new Operation[narg-1]; nops = 0; int index; int iarg = 1; while (iarg < narg) { if (strcmp(arg[iarg],"x") == 0 || strcmp(arg[iarg],"y") == 0 || strcmp(arg[iarg],"z") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal change_box command"); ops[nops].style = XYZ; if (strcmp(arg[iarg],"x") == 0) ops[nops].dim = X; else if (strcmp(arg[iarg],"y") == 0) ops[nops].dim = Y; else if (strcmp(arg[iarg],"z") == 0) ops[nops].dim = Z; if (dimension == 2 && ops[nops].dim == Z) error->all(FLERR,"Cannot change_box in z dimension for 2d simulation"); if (strcmp(arg[iarg+1],"final") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal change_box command"); ops[nops].flavor = FINAL; ops[nops].flo = atof(arg[iarg+2]); ops[nops].fhi = atof(arg[iarg+3]); ops[nops].vdim1 = ops[nops].vdim2 = -1; nops++; iarg += 4; } else if (strcmp(arg[iarg+1],"delta") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal change_box command"); ops[nops].flavor = DELTA; ops[nops].dlo = atof(arg[iarg+2]); ops[nops].dhi = atof(arg[iarg+3]); ops[nops].vdim1 = ops[nops].vdim2 = -1; nops++; iarg += 4; } else if (strcmp(arg[iarg+1],"scale") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal change_box command"); ops[nops].flavor = SCALE; ops[nops].scale = atof(arg[iarg+2]); ops[nops].vdim1 = ops[nops].vdim2 = -1; nops++; iarg += 3; } else if (strcmp(arg[iarg+1],"volume") == 0) { if (nops == 0 || ops[nops-1].style != XYZ || ops[nops].dim == ops[nops-1].dim) error->all(FLERR,"Change_box volume used incorrectly"); if (ops[nops-1].vdim2 >= 0) error->all(FLERR,"Change_box volume used incorrectly"); else if (ops[nops-1].vdim1 >= 0) ops[nops-1].vdim2 = ops[nops].dim; else ops[nops-1].vdim1 = ops[nops].dim; iarg += 2; } else error->all(FLERR,"Illegal change_box command"); } else if (strcmp(arg[iarg],"xy") == 0 || strcmp(arg[iarg],"xz") == 0 || strcmp(arg[iarg],"yz") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal change_box command"); ops[nops].style = TILT; if (strcmp(arg[iarg],"xy") == 0) ops[nops].dim = XY; else if (strcmp(arg[iarg],"xz") == 0) ops[nops].dim = XZ; else if (strcmp(arg[iarg],"yz") == 0) ops[nops].dim = YZ; if (dimension == 2 && (ops[nops].dim == XZ || ops[nops].dim == YZ)) error->all(FLERR,"Cannot change_box in xz or yz for 2d simulation"); if (strcmp(arg[iarg+1],"final") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal change_box command"); ops[nops].flavor = FINAL; ops[nops].ftilt = atof(arg[iarg+2]); nops++; iarg += 3; } else if (strcmp(arg[iarg+1],"delta") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal change_box command"); ops[nops].flavor = DELTA; ops[nops].dtilt = atof(arg[iarg+2]); nops++; iarg += 3; } else error->all(FLERR,"Illegal change_box command"); } else if (strcmp(arg[iarg],"boundary") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal change_box command"); ops[nops].style = BOUNDARY; ops[nops].boundindex = iarg+1; nops++; iarg += 4; } else if (strcmp(arg[iarg],"ortho") == 0) { if (iarg+1 > narg) error->all(FLERR,"Illegal change_box command"); ops[nops].style = ORTHO; nops++; iarg += 1; } else if (strcmp(arg[iarg],"triclinic") == 0) { if (iarg+1 > narg) error->all(FLERR,"Illegal change_box command"); ops[nops].style = TRICLINIC; nops++; iarg += 1; } else if (strcmp(arg[iarg],"set") == 0) { if (iarg+1 > narg) error->all(FLERR,"Illegal change_box command"); ops[nops].style = SET; nops++; iarg += 1; } else if (strcmp(arg[iarg],"remap") == 0) { if (iarg+1 > narg) error->all(FLERR,"Illegal change_box command"); ops[nops].style = REMAP; nops++; iarg += 1; } else break; } if (nops == 0) error->all(FLERR,"Illegal change_box command"); // read options from end of input line options(narg-iarg,&arg[iarg]); // compute scale factors if FINAL,DELTA used since they have distance units int flag = 0; for (int i = 0; i < nops; i++) if (ops[i].style == FINAL || ops[i].style == DELTA) flag = 1; if (flag && scaleflag && domain->lattice == NULL) error->all(FLERR,"Use of change_box with undefined lattice"); if (flag && scaleflag) { scale[0] = domain->lattice->xlattice; scale[1] = domain->lattice->ylattice; scale[2] = domain->lattice->zlattice; } else scale[0] = scale[1] = scale[2] = 1.0; // perform sequence of operations // first insure atoms are in current box & update box via shrink-wrap // no exchange() since doesn't matter if atoms are assigned to correct procs // save current box state so can remap atoms from it, if requested if (domain->triclinic) domain->x2lamda(atom->nlocal); domain->pbc(); domain->reset_box(); if (domain->triclinic) domain->lamda2x(atom->nlocal); save_box_state(); for (int i = 0; i < nops; i++) { if (ops[i].style == XYZ) { double volume; if (domain->dimension == 2) volume = domain->xprd * domain->yprd; else volume = domain->xprd * domain->yprd * domain->zprd; if (ops[i].flavor == FINAL) { domain->boxlo[ops[i].dim] = scale[ops[i].dim]*ops[i].flo; domain->boxhi[ops[i].dim] = scale[ops[i].dim]*ops[i].fhi; if (ops[i].vdim1) volume_preserve(ops[i].vdim1,ops[i].vdim2,volume); domain->set_initial_box(); domain->set_global_box(); domain->set_local_box(); domain->print_box(" "); } else if (ops[i].flavor == DELTA) { domain->boxlo[ops[i].dim] += scale[ops[i].dim]*ops[i].dlo; domain->boxhi[ops[i].dim] += scale[ops[i].dim]*ops[i].dhi; if (ops[i].vdim1) volume_preserve(ops[i].vdim1,ops[i].vdim2,volume); domain->set_initial_box(); domain->set_global_box(); domain->set_local_box(); domain->print_box(" "); } else if (ops[i].flavor == SCALE) { double mid = 0.5 * (domain->boxlo[ops[i].dim] + domain->boxhi[ops[i].dim]); double delta = domain->boxlo[ops[i].dim] - mid; domain->boxlo[ops[i].dim] = mid + ops[i].scale*delta; delta = domain->boxhi[ops[i].dim] - mid; domain->boxhi[ops[i].dim] = mid + ops[i].scale*delta; if (ops[i].vdim1) volume_preserve(ops[i].vdim1,ops[i].vdim2,volume); domain->set_initial_box(); domain->set_global_box(); domain->set_local_box(); domain->print_box(" "); } } else if (ops[i].style == TILT) { if (domain->triclinic == 0) error->all(FLERR,"Cannot change box tilt factors for orthogonal box"); if (ops[i].flavor == FINAL) { if (ops[i].dim == XY) domain->xy = scale[X]*ops[i].ftilt; else if (ops[i].dim == XZ) domain->xz = scale[X]*ops[i].ftilt; else if (ops[i].dim == YZ) domain->yz = scale[Y]*ops[i].ftilt; domain->set_initial_box(); domain->set_global_box(); domain->set_local_box(); domain->print_box(" "); } else if (ops[i].flavor == DELTA) { if (ops[i].dim == XY) domain->xy += scale[X]*ops[i].dtilt; else if (ops[i].dim == XZ) domain->xz += scale[X]*ops[i].dtilt; else if (ops[i].dim == YZ) domain->yz += scale[Y]*ops[i].dtilt; domain->set_initial_box(); domain->set_global_box(); domain->set_local_box(); domain->print_box(" "); } } else if (ops[i].style == BOUNDARY) { domain->set_boundary(3,&arg[ops[i].boundindex],1); if (domain->dimension == 2 && domain->zperiodic == 0) error->all(FLERR, - "Cannot run 2d simulation with nonperiodic Z dimension"); + "Cannot change box z boundary to " + "nonperiodic for a 2d simulation"); domain->set_initial_box(); domain->set_global_box(); domain->set_local_box(); } else if (ops[i].style == ORTHO) { if (domain->xy != 0.0 || domain->yz != 0.0 || domain->xz != 0.0) error->all(FLERR, "Cannot change box to orthogonal when tilt is non-zero"); if (output->ndump) error->all(FLERR, "Cannot change box ortho/triclinic with dumps defined"); for (int i = 0; i < modify->nfix; i++) if (modify->fix[i]->no_change_box) error->all(FLERR, "Cannot change box ortho/triclinic with " "certain fixes defined"); domain->triclinic = 0; domain->set_initial_box(); domain->set_global_box(); domain->set_local_box(); domain->print_box(" "); } else if (ops[i].style == TRICLINIC) { if (output->ndump) error->all(FLERR, "Cannot change box ortho/triclinic with dumps defined"); for (int i = 0; i < modify->nfix; i++) if (modify->fix[i]->no_change_box) error->all(FLERR, "Cannot change box ortho/triclinic with " "certain fixes defined"); domain->triclinic = 1; domain->set_lamda_box(); domain->set_initial_box(); domain->set_global_box(); domain->set_local_box(); domain->print_box(" "); } else if (ops[i].style == SET) { save_box_state(); } else if (ops[i].style == REMAP) { // convert atoms to lamda coords, using last box state // convert atoms back to box coords, using current box state // save current box state double **x = atom->x; int *mask = atom->mask; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) if (mask[i] & groupbit) domain->x2lamda(x[i],x[i],boxlo,h_inv); for (i = 0; i < nlocal; i++) if (mask[i] & groupbit) domain->lamda2x(x[i],x[i]); save_box_state(); } } // clean up delete [] ops; // apply shrink-wrap boundary conditions if (domain->nonperiodic == 2) domain->reset_box(); // move atoms back inside simulation box and to new processors // use remap() instead of pbc() // in case box moved a long distance relative to atoms // use irregular() in case box moved a long distance relative to atoms double **x = atom->x; int *image = atom->image; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) domain->remap(x[i],image[i]); if (domain->triclinic) domain->x2lamda(atom->nlocal); domain->reset_box(); Irregular *irregular = new Irregular(lmp); irregular->migrate_atoms(); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); // check if any atoms were lost bigint natoms; bigint nblocal = atom->nlocal; MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world); - if (natoms != atom->natoms) { + if (natoms != atom->natoms && comm->me == 0) { char str[128]; sprintf(str,"Lost atoms via change_box: original " BIGINT_FORMAT " current " BIGINT_FORMAT,atom->natoms,natoms); error->warning(FLERR,str); } } /* ---------------------------------------------------------------------- parse optional parameters ------------------------------------------------------------------------- */ void ChangeBox::options(int narg, char **arg) { if (narg < 0) error->all(FLERR,"Illegal change_box command"); scaleflag = 1; int iarg = 0; while (iarg < narg) { if (strcmp(arg[iarg],"units") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal change_box command"); if (strcmp(arg[iarg+1],"box") == 0) scaleflag = 0; else if (strcmp(arg[iarg+1],"lattice") == 0) scaleflag = 1; else error->all(FLERR,"Illegal change_box command"); iarg += 2; } else error->all(FLERR,"Illegal change_box command"); } } /* ---------------------------------------------------------------------- save current box state for converting atoms to lamda coords ------------------------------------------------------------------------- */ void ChangeBox::save_box_state() { boxlo[0] = domain->boxlo[0]; boxlo[1] = domain->boxlo[1]; boxlo[2] = domain->boxlo[2]; for (int i = 0; i < 6; i++) h_inv[i] = domain->h_inv[i]; } /* ---------------------------------------------------------------------- reset box lengths of dim1/2 to preserve old volume which changed due to change in 3rd dim ------------------------------------------------------------------------- */ void ChangeBox::volume_preserve(int dim1, int dim2, double oldvol) { double newvol; if (domain->dimension == 2) newvol = domain->xprd * domain->yprd; else newvol = domain->xprd * domain->yprd * domain->zprd; double scale = oldvol/newvol; double mid,delta; // change dim1 only if (dim2 < 0) { mid = 0.5 * (domain->boxlo[dim1] + domain->boxhi[dim1]); delta = domain->boxlo[dim1] - mid; domain->boxlo[dim1] = mid + scale*delta; delta = domain->boxhi[dim1] - mid; domain->boxhi[dim1] = mid + scale*delta; // change dim1 and dim2, keeping their relative aspect constant // means both are scaled by sqrt(scale) } else { mid = 0.5 * (domain->boxlo[dim1] + domain->boxhi[dim1]); delta = domain->boxlo[dim1] - mid; domain->boxlo[dim1] = mid + sqrt(scale)*delta; delta = domain->boxhi[dim1] - mid; domain->boxhi[dim1] = mid + sqrt(scale)*delta; mid = 0.5 * (domain->boxlo[dim2] + domain->boxhi[dim2]); delta = domain->boxlo[dim2] - mid; domain->boxlo[dim2] = mid + sqrt(scale)*delta; delta = domain->boxhi[dim2] - mid; domain->boxhi[dim2] = mid + sqrt(scale)*delta; } } diff --git a/src/change_box.h b/src/change_box.h index efac4bfba..5bfdde2fa 100644 --- a/src/change_box.h +++ b/src/change_box.h @@ -1,161 +1,129 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMMAND_CLASS CommandStyle(change_box,ChangeBox) #else #ifndef LMP_CHANGE_BOX_H #define LMP_CHANGE_BOX_H #include "pointers.h" namespace LAMMPS_NS { class ChangeBox : protected Pointers { public: ChangeBox(class LAMMPS *); void command(int, char **); private: int scaleflag; double scale[3]; struct Operation { int style,flavor; int dim,boundindex; int vdim1,vdim2; double flo,fhi,ftilt; double dlo,dhi,dtilt; double scale; }; Operation *ops; int nops; double boxlo[3],h_inv[6]; void options(int, char **); void save_box_state(); void volume_preserve(int, int, double); }; } #endif #endif /* ERROR/WARNING messages: E: Change_box command before simulation box is defined -UNDOCUMENTED +Self-explanatory. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Cannot change_box after reading restart file with per-atom info -UNDOCUMENTED +This is because the restart file info cannot be migrated with the +atoms. You can get around this by performing a 0-timestep run which +will assign the restart file info to actual atoms. E: Could not find change_box group ID -UNDOCUMENTED +Group ID used in the change_box command does not exist. E: Cannot change_box in z dimension for 2d simulation -UNDOCUMENTED +Self-explanatory. E: Change_box volume used incorrectly -UNDOCUMENTED +The "dim volume" option must be used immediately following one or two +settings for "dim1 ..." (and optionally "dim2 ...") and must be for a +different dimension, i.e. dim != dim1 and dim != dim2. E: Cannot change_box in xz or yz for 2d simulation -UNDOCUMENTED +Self-explanatory. E: Use of change_box with undefined lattice -UNDOCUMENTED +Must use lattice command with displace_box command if units option is +set to lattice. E: Cannot change box tilt factors for orthogonal box -UNDOCUMENTED +Cannot use tilt factors unless the simulation box is non-orthogonal. -E: Cannot run 2d simulation with nonperiodic Z dimension +E: Cannot change box z boundary to nonperiodic for a 2d simulation -UNDOCUMENTED +Self-explanatory. E: Cannot change box to orthogonal when tilt is non-zero -UNDOCUMENTED +Self-explanatory. E: Cannot change box ortho/triclinic with dumps defined -UNDOCUMENTED +This is because some dumps store the shape of the box. You need to +use undump to discard the dump, change the box, then redefine a new +dump. E: Cannot change box ortho/triclinic with certain fixes defined -UNDOCUMENTED +This is because those fixes store the shape of the box. You need to +use unfix to discard the fix, change the box, then redefine a new +fix. W: Lost atoms via change_box: original %ld current %ld -UNDOCUMENTED - -U: Displace_box command before simulation box is defined - -Self-explanatory. - -U: Cannot displace_box after reading restart file with per-atom info - -This is because the restart file info cannot be migrated with the -atoms. You can get around this by performing a 0-timestep run which -will assign the restart file info to actual atoms. - -U: Could not find displace_box group ID - -Group ID used in the displace_box command does not exist. - -U: Displace_box tilt factors require triclinic box - -Cannot use tilt factors unless the simulation box is -non-orthogonal. - -U: Cannot displace_box on a non-periodic boundary - -Self-explanatory. - -U: Use of displace_box with undefined lattice - -Must use lattice command with displace_box command if units option is -set to lattice. - -U: Fix deform volume setting is invalid - -Cannot use volume style unless other dimensions are being controlled. - -U: Induced tilt by displace_box is too large - -The final tilt value must be between -1/2 and 1/2 of the perpendicular -box length. - -U: Lost atoms via displace_box: original %ld current %ld - -UNDOCUMENTED +The command options you have used caused atoms to be lost. */ diff --git a/src/comm.h b/src/comm.h index be48e4ef3..13c37997e 100644 --- a/src/comm.h +++ b/src/comm.h @@ -1,186 +1,189 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_COMM_H #define LMP_COMM_H #include "pointers.h" namespace LAMMPS_NS { class Comm : protected Pointers { public: int me,nprocs; // proc info int procgrid[3]; // procs assigned in each dim of 3d grid int user_procgrid[3]; // user request for procs in each dim int myloc[3]; // which proc I am in each dim int procneigh[3][2]; // my 6 neighboring procs, 0/1 = left/right int ghost_velocity; // 1 if ghost atoms have velocity, 0 if not int uniform; // 1 = equal subdomains, 0 = load-balanced double *xsplit,*ysplit,*zsplit; // fractional (0-1) sub-domain sizes double cutghost[3]; // cutoffs used for acquiring ghost atoms double cutghostuser; // user-specified ghost cutoff int ***grid2proc; // which proc owns i,j,k loc in 3d grid int recv_from_partition; // recv proc layout from this partition int send_to_partition; // send my proc layout to this partition // -1 if no recv or send int other_partition_style; // 0 = recv layout dims must be multiple of // my layout dims int nthreads; // OpenMP threads per MPI process Comm(class LAMMPS *); virtual ~Comm(); virtual void init(); virtual void set_proc_grid(); // setup 3d grid of procs virtual void setup(); // setup 3d comm pattern virtual void forward_comm(int dummy = 0); // forward comm of atom coords virtual void reverse_comm(); // reverse comm of forces virtual void exchange(); // move atoms to new procs virtual void borders(); // setup list of atoms to comm virtual void forward_comm_pair(class Pair *); // forward comm from a Pair virtual void reverse_comm_pair(class Pair *); // reverse comm from a Pair virtual void forward_comm_fix(class Fix *); // forward comm from a Fix virtual void reverse_comm_fix(class Fix *); // reverse comm from a Fix virtual void forward_comm_compute(class Compute *); // forward from a Compute virtual void reverse_comm_compute(class Compute *); // reverse from a Compute virtual void forward_comm_dump(class Dump *); // forward comm from a Dump virtual void reverse_comm_dump(class Dump *); // reverse comm from a Dump virtual void set(int, char **); // set communication style void set_processors(int, char **); // set 3d processor grid attributes virtual bigint memory_usage(); protected: int style; // single vs multi-type comm int nswap; // # of swaps to perform = sum of maxneed int recvneed[3][2]; // # of procs away I recv atoms from int sendneed[3][2]; // # of procs away I send atoms to int maxneed[3]; // max procs away any proc needs, per dim int triclinic; // 0 if domain is orthog, 1 if triclinic int maxswap; // max # of swaps memory is allocated for int size_forward; // # of per-atom datums in forward comm int size_reverse; // # of datums in reverse comm int size_border; // # of datums in forward border comm int *sendnum,*recvnum; // # of atoms to send/recv in each swap int *sendproc,*recvproc; // proc to send/recv to/from at each swap int *size_forward_recv; // # of values to recv in each forward comm int *size_reverse_send; // # to send in each reverse comm int *size_reverse_recv; // # to recv in each reverse comm double *slablo,*slabhi; // bounds of slab to send at each swap double **multilo,**multihi; // bounds of slabs for multi-type swap double **cutghostmulti; // cutghost on a per-type basis int *pbc_flag; // general flag for sending atoms thru PBC int **pbc; // dimension flags for PBC adjustments int comm_x_only,comm_f_only; // 1 if only exchange x,f in for/rev comm int map_style; // non-0 if global->local mapping is done int bordergroup; // only communicate this group in borders int gridflag; // option for creating 3d grid int mapflag; // option for mapping procs to 3d grid char xyz[4]; // xyz mapping of procs to 3d grid char *customfile; // file with custom proc map char *outfile; // proc grid/map output file int otherflag; // 1 if this partition dependent on another int other_style; // style of dependency int other_procgrid[3]; // proc layout of another partition int other_coregrid[3]; // core layout of another partition int ncores; // # of cores per node int coregrid[3]; // 3d grid of cores within a node int user_coregrid[3]; // user request for cores in each dim int *firstrecv; // where to put 1st recv atom in each swap int **sendlist; // list of atoms to send in each swap int *maxsendlist; // max size of send list for each swap double *buf_send; // send buffer for all comm double *buf_recv; // recv buffer for all comm int maxsend,maxrecv; // current size of send/recv buffer int maxforward,maxreverse; // max # of datums in forward/reverse comm int updown(int, int, int, double, int, double *); // compare cutoff to procs virtual void grow_send(int,int); // reallocate send buffer virtual void grow_recv(int); // free/allocate recv buffer virtual void grow_list(int, int); // reallocate one sendlist virtual void grow_swap(int); // grow swap and multi arrays virtual void allocate_swap(int); // allocate swap arrays virtual void allocate_multi(int); // allocate multi arrays virtual void free_swap(); // free swap arrays virtual void free_multi(); // free multi arrays }; } #endif /* ERROR/WARNING messages: E: Bad grid of processors The 3d grid of processors defined by the processors command does not match the number of processors LAMMPS is being run on. E: Processor count in z must be 1 for 2d simulation Self-explanatory. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Invalid group in communicate command Self-explanatory. E: Communicate group != atom_modify first group Self-explanatory. E: Invalid cutoff in communicate command Specified cutoff must be >= 0.0. E: Specified processors != physical processors -UNDOCUMENTED +The 3d grid of processors defined by the processors command does not +match the number of processors LAMMPS is being run on. E: Cannot use processors part command without using partitions -UNDOCUMENTED +See the command-line -partition switch. E: Invalid partitions in processors part command -UNDOCUMENTED +Valid partitions are numbered 1 to N and the sender and receiver +cannot be the same partition. E: Sending partition in processors part command is already a sender -UNDOCUMENTED +Cannot specify a partition to be a sender twice. E: Receiving partition in processors part command is already a receiver -UNDOCUMENTED +Cannot specify a partition to be a receiver twice. E: Processors grid numa and map style are incompatible -UNDOCUMENTED +Using numa for gstyle in the processors command requires using +cart for the map option. E: Processors part option and grid style are incompatible -UNDOCUMENTED +Cannot use gstyle numa or custom with the part option. */ diff --git a/src/compute_erotate_sphere.h b/src/compute_erotate_sphere.h index 5bf54cf5b..33f2a80a5 100644 --- a/src/compute_erotate_sphere.h +++ b/src/compute_erotate_sphere.h @@ -1,55 +1,55 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMPUTE_CLASS ComputeStyle(erotate/sphere,ComputeERotateSphere) #else #ifndef LMP_COMPUTE_EROTATE_SPHERE_H #define LMP_COMPUTE_EROTATE_SPHERE_H #include "compute.h" namespace LAMMPS_NS { class ComputeERotateSphere : public Compute { public: ComputeERotateSphere(class LAMMPS *, int, char **); ~ComputeERotateSphere() {} void init(); double compute_scalar(); private: double pfactor; }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Compute erotate/sphere requires atom style sphere -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/compute_pair_local.cpp b/src/compute_pair_local.cpp index af1c415e7..a33232db1 100644 --- a/src/compute_pair_local.cpp +++ b/src/compute_pair_local.cpp @@ -1,267 +1,267 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #include "math.h" #include "string.h" #include "stdlib.h" #include "compute_pair_local.h" #include "atom.h" #include "update.h" #include "force.h" #include "pair.h" #include "neighbor.h" #include "neigh_request.h" #include "neigh_list.h" #include "group.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; #define DELTA 10000 enum{DIST,ENG,FORCE,FX,FY,FZ,PN}; /* ---------------------------------------------------------------------- */ ComputePairLocal::ComputePairLocal(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg) { if (narg < 4) error->all(FLERR,"Illegal compute pair/local command"); local_flag = 1; nvalues = narg - 3; if (nvalues == 1) size_local_cols = 0; else size_local_cols = nvalues; pstyle = new int[nvalues]; pindex = new int[nvalues]; nvalues = 0; for (int iarg = 3; iarg < narg; iarg++) { if (strcmp(arg[iarg],"dist") == 0) pstyle[nvalues++] = DIST; else if (strcmp(arg[iarg],"eng") == 0) pstyle[nvalues++] = ENG; else if (strcmp(arg[iarg],"force") == 0) pstyle[nvalues++] = FORCE; else if (strcmp(arg[iarg],"fx") == 0) pstyle[nvalues++] = FX; else if (strcmp(arg[iarg],"fy") == 0) pstyle[nvalues++] = FY; else if (strcmp(arg[iarg],"fz") == 0) pstyle[nvalues++] = FZ; else if (arg[iarg][0] == 'p') { int n = atoi(&arg[iarg][1]); if (n <= 0) error->all(FLERR, "Invalid keyword in compute pair/local command"); pstyle[nvalues] = PN; pindex[nvalues++] = n-1; } else error->all(FLERR,"Invalid keyword in compute pair/local command"); } // set singleflag if need to call pair->single() singleflag = 0; for (int i = 0; i < nvalues; i++) if (pstyle[i] != DIST) singleflag = 1; nmax = 0; vector = NULL; array = NULL; } /* ---------------------------------------------------------------------- */ ComputePairLocal::~ComputePairLocal() { memory->destroy(vector); memory->destroy(array); delete [] pstyle; delete [] pindex; } /* ---------------------------------------------------------------------- */ void ComputePairLocal::init() { if (singleflag && force->pair == NULL) error->all(FLERR,"No pair style is defined for compute pair/local"); if (singleflag && force->pair->single_enable == 0) error->all(FLERR,"Pair style does not support compute pair/local"); for (int i = 0; i < nvalues; i++) if (pstyle[i] == PN && pindex[i] >= force->pair->single_extra) - error->all(FLERR,"Pair style does not have single field" + error->all(FLERR,"Pair style does not have extra field" " requested by compute pair/local"); // need an occasional half neighbor list int irequest = neighbor->request((void *) this); neighbor->requests[irequest]->pair = 0; neighbor->requests[irequest]->compute = 1; neighbor->requests[irequest]->occasional = 1; } /* ---------------------------------------------------------------------- */ void ComputePairLocal::init_list(int id, NeighList *ptr) { list = ptr; } /* ---------------------------------------------------------------------- */ void ComputePairLocal::compute_local() { invoked_local = update->ntimestep; // count local entries and compute pair info ncount = compute_pairs(0); if (ncount > nmax) reallocate(ncount); size_local_rows = ncount; compute_pairs(1); } /* ---------------------------------------------------------------------- count pairs and compute pair info on this proc only count pair once if newton_pair is off both atom I,J must be in group if flag is set, compute requested info about pair ------------------------------------------------------------------------- */ int ComputePairLocal::compute_pairs(int flag) { int i,j,m,n,ii,jj,inum,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz; double rsq,eng,fpair,factor_coul,factor_lj; int *ilist,*jlist,*numneigh,**firstneigh; double *ptr; double **x = atom->x; int *type = atom->type; int *mask = atom->mask; int nlocal = atom->nlocal; double *special_coul = force->special_coul; double *special_lj = force->special_lj; int newton_pair = force->newton_pair; // invoke half neighbor list (will copy or build if necessary) if (flag == 0) neighbor->build_one(list->index); inum = list->inum; ilist = list->ilist; numneigh = list->numneigh; firstneigh = list->firstneigh; // loop over neighbors of my atoms // skip if I or J are not in group // for flag = 0, just count pair interactions within force cutoff // for flag = 1, calculate requested output fields Pair *pair = force->pair; double **cutsq = force->pair->cutsq; m = 0; for (ii = 0; ii < inum; ii++) { i = ilist[ii]; if (!(mask[i] & groupbit)) continue; xtmp = x[i][0]; ytmp = x[i][1]; ztmp = x[i][2]; itype = type[i]; jlist = firstneigh[i]; jnum = numneigh[i]; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; factor_lj = special_lj[sbmask(j)]; factor_coul = special_coul[sbmask(j)]; j &= NEIGHMASK; if (!(mask[j] & groupbit)) continue; if (newton_pair == 0 && j >= nlocal) continue; delx = xtmp - x[j][0]; dely = ytmp - x[j][1]; delz = ztmp - x[j][2]; rsq = delx*delx + dely*dely + delz*delz; jtype = type[j]; if (rsq >= cutsq[itype][jtype]) continue; if (flag) { if (singleflag) eng = pair->single(i,j,itype,jtype,rsq,factor_coul,factor_lj,fpair); if (nvalues == 1) ptr = &vector[m]; else ptr = array[m]; for (n = 0; n < nvalues; n++) { switch (pstyle[n]) { case DIST: ptr[n] = sqrt(rsq); break; case ENG: ptr[n] = eng; break; case FORCE: ptr[n] = sqrt(rsq)*fpair; break; case FX: ptr[n] = delx*fpair; break; case FY: ptr[n] = dely*fpair; break; case FZ: ptr[n] = delz*fpair; break; case PN: ptr[n] = pair->svector[pindex[n]]; break; } } } m++; } } return m; } /* ---------------------------------------------------------------------- */ void ComputePairLocal::reallocate(int n) { // grow vector or array and indices array while (nmax < n) nmax += DELTA; if (nvalues == 1) { memory->destroy(vector); memory->create(vector,nmax,"pair/local:vector"); vector_local = vector; } else { memory->destroy(array); memory->create(array,nmax,nvalues,"pair/local:array"); array_local = array; } } /* ---------------------------------------------------------------------- memory usage of local data ------------------------------------------------------------------------- */ double ComputePairLocal::memory_usage() { double bytes = nmax*nvalues * sizeof(double); return bytes; } diff --git a/src/compute_pair_local.h b/src/compute_pair_local.h index 3a6c204d9..b606fbdf2 100644 --- a/src/compute_pair_local.h +++ b/src/compute_pair_local.h @@ -1,84 +1,85 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMPUTE_CLASS ComputeStyle(pair/local,ComputePairLocal) #else #ifndef LMP_COMPUTE_PAIR_LOCAL_H #define LMP_COMPUTE_PAIR_LOCAL_H #include "compute.h" namespace LAMMPS_NS { class ComputePairLocal : public Compute { public: ComputePairLocal(class LAMMPS *, int, char **); ~ComputePairLocal(); void init(); void init_list(int, class NeighList *); void compute_local(); double memory_usage(); private: int nvalues,dflag,eflag,fflag; int ncount; int *pstyle; // style of each requested output int *pindex; // for pI, index of the output (0 to M-1) int singleflag; int nmax; double *vector; double **array; class NeighList *list; int compute_pairs(int); void reallocate(int); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Invalid keyword in compute pair/local command Self-explanatory. E: No pair style is defined for compute pair/local Self-explanatory. E: Pair style does not support compute pair/local The pair style does not have a single() function, so it can -not be invoked by fix bond/swap. +not be invoked by compute pair/local. -E: Pair style does not have single field requested by compute pair/local +E: Pair style does not have extra field requested by compute pair/local -UNDOCUMENTED +The pair style does not support the pN value requested by the compute +pair/local command. */ diff --git a/src/compute_reduce.h b/src/compute_reduce.h index 02cb567f0..3e7cb2dc3 100644 --- a/src/compute_reduce.h +++ b/src/compute_reduce.h @@ -1,154 +1,154 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMPUTE_CLASS ComputeStyle(reduce,ComputeReduce) #else #ifndef LMP_COMPUTE_REDUCE_H #define LMP_COMPUTE_REDUCE_H #include "compute.h" namespace LAMMPS_NS { class ComputeReduce : public Compute { public: ComputeReduce(class LAMMPS *, int, char **); virtual ~ComputeReduce(); void init(); double compute_scalar(); void compute_vector(); double memory_usage(); protected: int me; int mode,nvalues,iregion; int *which,*argindex,*flavor,*value2index; char **ids; double *onevec; int *replace,*indices,*owner; int index; char *idregion; int maxatom; double *varatom; struct Pair { double value; int proc; }; Pair pairme,pairall; virtual double compute_one(int, int); virtual bigint count(int); void combine(double &, double, int); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Region ID for compute reduce/region does not exist Self-explanatory. E: Compute reduce replace requires min or max mode Self-explanatory. E: Invalid replace values in compute reduce Self-explanatory. E: Compute ID for compute reduce does not exist Self-explanatory. E: Compute reduce compute does not calculate a per-atom vector Self-explanatory. E: Compute reduce compute does not calculate a per-atom array Self-explanatory. E: Compute reduce compute array is accessed out-of-range -Self-explanatory. +An index for the array is out of bounds. E: Compute reduce compute does not calculate a local vector Self-explanatory. E: Compute reduce compute does not calculate a local array Self-explanatory. E: Compute reduce compute calculates global values A compute that calculates peratom or local values is required. E: Fix ID for compute reduce does not exist Self-explanatory. E: Compute reduce fix does not calculate a per-atom vector Self-explanatory. E: Compute reduce fix does not calculate a per-atom array Self-explanatory. E: Compute reduce fix array is accessed out-of-range -Self-explanatory. +An index for the array is out of bounds. E: Compute reduce fix does not calculate a local vector Self-explanatory. E: Compute reduce fix does not calculate a local array Self-explanatory. E: Compute reduce fix calculates global values A fix that calculates peratom or local values is required. E: Variable name for compute reduce does not exist Self-explanatory. E: Compute reduce variable is not atom-style variable Self-explanatory. E: Fix used in compute reduce not computed at compatible time -Fixes generate their values on specific timesteps. Compute sum is +Fixes generate their values on specific timesteps. Compute reduce is requesting a value on a non-allowed timestep. */ diff --git a/src/compute_reduce_region.h b/src/compute_reduce_region.h index c5ca5717d..b144aa860 100644 --- a/src/compute_reduce_region.h +++ b/src/compute_reduce_region.h @@ -1,49 +1,49 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMPUTE_CLASS ComputeStyle(reduce/region,ComputeReduceRegion) #else #ifndef LMP_COMPUTE_REDUCE_REGION_H #define LMP_COMPUTE_REDUCE_REGION_H #include "compute_reduce.h" namespace LAMMPS_NS { class ComputeReduceRegion : public ComputeReduce { public: ComputeReduceRegion(class LAMMPS *, int, char **); ~ComputeReduceRegion() {} private: double compute_one(int, int); bigint count(int); }; } #endif #endif /* ERROR/WARNING messages: E: Fix used in compute reduce not computed at compatible time -Fixes generate their values on specific timesteps. Compute sum is +Fixes generate their values on specific timesteps. Compute reduce is requesting a value on a non-allowed timestep. */ diff --git a/src/compute_slice.h b/src/compute_slice.h index fa48ef5dd..9e22a29fd 100644 --- a/src/compute_slice.h +++ b/src/compute_slice.h @@ -1,109 +1,110 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMPUTE_CLASS ComputeStyle(slice,ComputeSlice) #else #ifndef LMP_COMPUTE_SLICE_H #define LMP_COMPUTE_SLICE_H #include "compute.h" namespace LAMMPS_NS { class ComputeSlice : public Compute { public: ComputeSlice(class LAMMPS *, int, char **); virtual ~ComputeSlice(); void init(); void compute_vector(); void compute_array(); private: int me; int nstart,nstop,nskip,nvalues; int *which,*argindex,*value2index; char **ids; void extract_one(int, double *, int); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Compute ID for compute slice does not exist -UNDOCUMENTED +Self-explanatory. E: Compute slice compute does not calculate a global array -UNDOCUMENTED +Self-explanatory. E: Compute slice compute vector is accessed out-of-range -UNDOCUMENTED +The index for the vector is out of bounds. E: Compute slice compute does not calculate a global vector -UNDOCUMENTED +Self-explanatory. E: Compute slice compute array is accessed out-of-range -UNDOCUMENTED +An index for the array is out of bounds. E: Compute slice compute does not calculate global vector or array -UNDOCUMENTED +Self-explanatory. E: Fix ID for compute slice does not exist -UNDOCUMENTED +Self-explanatory. E: Compute slice fix does not calculate a global array -UNDOCUMENTED +Self-explanatory. E: Compute slice fix vector is accessed out-of-range -UNDOCUMENTED +The index for the vector is out of bounds. E: Compute slice fix does not calculate a global vector -UNDOCUMENTED +Self-explanatory. E: Compute slice fix array is accessed out-of-range -UNDOCUMENTED +An index for the array is out of bounds. E: Compute slice fix does not calculate global vector or array -UNDOCUMENTED +Self-explanatory. E: Fix used in compute slice not computed at compatible time -UNDOCUMENTED +Fixes generate their values on specific timesteps. Compute slice is +requesting a value on a non-allowed timestep. */ diff --git a/src/compute_temp_sphere.h b/src/compute_temp_sphere.h index 1f8ef883d..a947051c4 100644 --- a/src/compute_temp_sphere.h +++ b/src/compute_temp_sphere.h @@ -1,82 +1,82 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMPUTE_CLASS ComputeStyle(temp/sphere,ComputeTempSphere) #else #ifndef LMP_COMPUTE_TEMP_SPHERE_H #define LMP_COMPUTE_TEMP_SPHERE_H #include "compute.h" namespace LAMMPS_NS { class ComputeTempSphere : public Compute { public: ComputeTempSphere(class LAMMPS *, int, char **); ~ComputeTempSphere(); void init(); double compute_scalar(); void compute_vector(); void remove_bias(int, double *); void restore_bias(int, double *); private: int fix_dof,mode; double tfactor; double *inertia; char *id_bias; Compute *tbias; // ptr to additional bias compute void dof_compute(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Compute temp/sphere requires atom style sphere -UNDOCUMENTED +Self-explanatory. E: Could not find compute ID for temperature bias Self-explanatory. E: Bias compute does not calculate temperature The specified compute must compute temperature. E: Bias compute does not calculate a velocity bias The specified compute must compute a bias for temperature. E: Bias compute group does not match compute group The specified compute must operate on the same group as the parent compute. */ diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index 1793a5e19..a46547078 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -1,240 +1,240 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #include "lmptype.h" #include "mpi.h" #include "stdlib.h" #include "string.h" #include "displace_atoms.h" #include "atom.h" #include "modify.h" #include "domain.h" #include "lattice.h" #include "comm.h" #include "irregular.h" #include "group.h" #include "random_park.h" #include "error.h" using namespace LAMMPS_NS; enum{MOVE,RAMP,RANDOM}; /* ---------------------------------------------------------------------- */ DisplaceAtoms::DisplaceAtoms(LAMMPS *lmp) : Pointers(lmp) {} /* ---------------------------------------------------------------------- */ void DisplaceAtoms::command(int narg, char **arg) { int i; if (domain->box_exist == 0) error->all(FLERR,"Displace_atoms command before simulation box is defined"); if (narg < 2) error->all(FLERR,"Illegal displace_atoms command"); if (modify->nfix_restart_peratom) error->all(FLERR,"Cannot displace_atoms after " "reading restart file with per-atom info"); if (comm->me == 0 && screen) fprintf(screen,"Displacing atoms ...\n"); // group and style int igroup = group->find(arg[0]); if (igroup == -1) error->all(FLERR,"Could not find displace_atoms group ID"); int groupbit = group->bitmask[igroup]; int style; if (strcmp(arg[1],"move") == 0) style = MOVE; else if (strcmp(arg[1],"ramp") == 0) style = RAMP; else if (strcmp(arg[1],"random") == 0) style = RANDOM; else error->all(FLERR,"Illegal displace_atoms command"); // set option defaults scaleflag = 1; // read options from end of input line if (style == MOVE) options(narg-5,&arg[5]); else if (style == RAMP) options(narg-8,&arg[8]); else if (style == RANDOM) options(narg-6,&arg[6]); // setup scaling if (scaleflag && domain->lattice == NULL) error->all(FLERR,"Use of displace_atoms with undefined lattice"); double xscale,yscale,zscale; if (scaleflag) { xscale = domain->lattice->xlattice; yscale = domain->lattice->ylattice; zscale = domain->lattice->zlattice; } else xscale = yscale = zscale = 1.0; // move atoms by 3-vector if (style == MOVE) { double delx = xscale*atof(arg[2]); double dely = yscale*atof(arg[3]); double delz = zscale*atof(arg[4]); double **x = atom->x; int *mask = atom->mask; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { x[i][0] += delx; x[i][1] += dely; x[i][2] += delz; } } } // move atoms in ramped fashion if (style == RAMP) { int d_dim; if (strcmp(arg[2],"x") == 0) d_dim = 0; else if (strcmp(arg[2],"y") == 0) d_dim = 1; else if (strcmp(arg[2],"z") == 0) d_dim = 2; else error->all(FLERR,"Illegal displace_atoms ramp command"); double d_lo,d_hi; if (d_dim == 0) { d_lo = xscale*atof(arg[3]); d_hi = xscale*atof(arg[4]); } else if (d_dim == 1) { d_lo = yscale*atof(arg[3]); d_hi = yscale*atof(arg[4]); } else if (d_dim == 2) { d_lo = zscale*atof(arg[3]); d_hi = zscale*atof(arg[4]); } int coord_dim; if (strcmp(arg[5],"x") == 0) coord_dim = 0; else if (strcmp(arg[5],"y") == 0) coord_dim = 1; else if (strcmp(arg[5],"z") == 0) coord_dim = 2; else error->all(FLERR,"Illegal displace_atoms ramp command"); double coord_lo,coord_hi; if (coord_dim == 0) { coord_lo = xscale*atof(arg[6]); coord_hi = xscale*atof(arg[7]); } else if (coord_dim == 1) { coord_lo = yscale*atof(arg[6]); coord_hi = yscale*atof(arg[7]); } else if (coord_dim == 2) { coord_lo = zscale*atof(arg[6]); coord_hi = zscale*atof(arg[7]); } double **x = atom->x; int *mask = atom->mask; int nlocal = atom->nlocal; double fraction,dramp; for (i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { fraction = (x[i][coord_dim] - coord_lo) / (coord_hi - coord_lo); fraction = MAX(fraction,0.0); fraction = MIN(fraction,1.0); dramp = d_lo + fraction*(d_hi - d_lo); x[i][d_dim] += dramp; } } } // move atoms randomly // makes atom result independent of what proc owns it via random->reset() if (style == RANDOM) { RanPark *random = new RanPark(lmp,1); double dx = xscale*atof(arg[2]); double dy = yscale*atof(arg[3]); double dz = zscale*atof(arg[4]); int seed = atoi(arg[5]); if (seed <= 0) error->all(FLERR,"Illegal displace_atoms random command"); double **x = atom->x; int *mask = atom->mask; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { random->reset(seed,x[i]); x[i][0] += dx * 2.0*(random->uniform()-0.5); x[i][1] += dy * 2.0*(random->uniform()-0.5); x[i][2] += dz * 2.0*(random->uniform()-0.5); } } delete random; } // move atoms back inside simulation box and to new processors // use remap() instead of pbc() in case atoms moved a long distance // use irregular() in case atoms moved a long distance double **x = atom->x; int *image = atom->image; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) domain->remap(x[i],image[i]); if (domain->triclinic) domain->x2lamda(atom->nlocal); domain->reset_box(); Irregular *irregular = new Irregular(lmp); irregular->migrate_atoms(); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); // check if any atoms were lost bigint natoms; bigint nblocal = atom->nlocal; MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world); - if (natoms != atom->natoms) { + if (natoms != atom->natoms && comm->me == 0) { char str[128]; sprintf(str,"Lost atoms via displace_atoms: original " BIGINT_FORMAT " current " BIGINT_FORMAT,atom->natoms,natoms); - error->all(FLERR,str); + error->warning(FLERR,str); } } /* ---------------------------------------------------------------------- parse optional parameters at end of displace_atoms input line ------------------------------------------------------------------------- */ void DisplaceAtoms::options(int narg, char **arg) { if (narg < 0) error->all(FLERR,"Illegal displace_atoms command"); int iarg = 0; while (iarg < narg) { if (strcmp(arg[iarg],"units") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal displace_atoms command"); if (strcmp(arg[iarg+1],"box") == 0) scaleflag = 0; else if (strcmp(arg[iarg+1],"lattice") == 0) scaleflag = 1; else error->all(FLERR,"Illegal displace_atoms command"); iarg += 2; } else error->all(FLERR,"Illegal displace_atoms command"); } } diff --git a/src/displace_atoms.h b/src/displace_atoms.h index b84cdc4c7..344981039 100644 --- a/src/displace_atoms.h +++ b/src/displace_atoms.h @@ -1,74 +1,74 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMMAND_CLASS CommandStyle(displace_atoms,DisplaceAtoms) #else #ifndef LMP_DISPLACE_ATOMS_H #define LMP_DISPLACE_ATOMS_H #include "pointers.h" namespace LAMMPS_NS { class DisplaceAtoms : protected Pointers { public: DisplaceAtoms(class LAMMPS *); void command(int, char **); private: int scaleflag; void options(int, char **); }; } #endif #endif /* ERROR/WARNING messages: E: Displace_atoms command before simulation box is defined The displace_atoms command cannot be used before a read_data, read_restart, or create_box command. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Cannot displace_atoms after reading restart file with per-atom info This is because the restart file info cannot be migrated with the atoms. You can get around this by performing a 0-timestep run which will assign the restart file info to actual atoms. E: Could not find displace_atoms group ID Group ID used in the displace_atoms command does not exist. E: Use of displace_atoms with undefined lattice Must use lattice command with displace_atoms command if units option is set to lattice. -E: Lost atoms via displace_atoms: original %ld current %ld +W: Lost atoms via displace_atoms: original %ld current %ld -UNDOCUMENTED +The command options you have used caused atoms to be lost. */ diff --git a/src/domain.h b/src/domain.h index cd1fa4b1c..ae573f2ac 100644 --- a/src/domain.h +++ b/src/domain.h @@ -1,178 +1,173 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_DOMAIN_H #define LMP_DOMAIN_H #include "pointers.h" namespace LAMMPS_NS { class Domain : protected Pointers { public: int box_exist; // 0 = not yet created, 1 = exists int dimension; // 2 = 2d, 3 = 3d int nonperiodic; // 0 = periodic in all 3 dims // 1 = periodic or fixed in all 6 // 2 = shrink-wrap in any of 6 int xperiodic,yperiodic,zperiodic; // 0 = non-periodic, 1 = periodic int periodicity[3]; // xyz periodicity as array int boundary[3][2]; // settings for 6 boundaries // 0 = periodic // 1 = fixed non-periodic // 2 = shrink-wrap non-periodic // 3 = shrink-wrap non-per w/ min int triclinic; // 0 = orthog box, 1 = triclinic // orthogonal box double xprd,yprd,zprd; // global box dimensions double xprd_half,yprd_half,zprd_half; // half dimensions double prd[3]; // array form of dimensions double prd_half[3]; // array form of half dimensions // triclinic box // xprd,xprd_half,prd,prd_half = // same as if untilted double prd_lamda[3]; // lamda box = (1,1,1) double prd_half_lamda[3]; // lamda half box = (0.5,0.5,0.5) double boxlo[3],boxhi[3]; // orthogonal box global bounds // triclinic box // boxlo/hi = same as if untilted double boxlo_lamda[3],boxhi_lamda[3]; // lamda box = (0,1) double boxlo_bound[3],boxhi_bound[3]; // bounding box of tilted domain double corners[8][3]; // 8 corner points // orthogonal box & triclinic box double minxlo,minxhi; // minimum size of global box double minylo,minyhi; // when shrink-wrapping double minzlo,minzhi; // tri only possible for non-skew dims // orthogonal box double sublo[3],subhi[3]; // sub-box bounds on this proc // triclinic box // sublo/hi = undefined double sublo_lamda[3],subhi_lamda[3]; // bounds of subbox in lamda // triclinic box double xy,xz,yz; // 3 tilt factors double h[6],h_inv[6]; // shape matrix in Voigt notation double h_rate[6],h_ratelo[3]; // rate of box size/shape change int box_change; // 1 if box bounds ever change, 0 if fixed int deform_flag; // 1 if fix deform exist, else 0 int deform_vremap; // 1 if fix deform remaps v, else 0 int deform_groupbit; // atom group to perform v remap for class Lattice *lattice; // user-defined lattice int nregion; // # of defined Regions int maxregion; // max # list can hold class Region **regions; // list of defined Regions Domain(class LAMMPS *); virtual ~Domain(); virtual void init(); void set_initial_box(); virtual void set_global_box(); virtual void set_lamda_box(); virtual void set_local_box(); virtual void reset_box(); virtual void pbc(); void remap(double *, int &); void remap(double *); void remap_near(double *, double *); void unmap(double *, int); void unmap(double *, int, double *); int minimum_image_check(double, double, double); void minimum_image(double &, double &, double &); void minimum_image(double *); void closest_image(const double * const, const double * const, double * const); void set_lattice(int, char **); void add_region(int, char **); void delete_region(int, char **); int find_region(char *); void set_boundary(int, char **, int); void print_box(const char *); virtual void lamda2x(int); virtual void x2lamda(int); void lamda2x(double *, double *); void x2lamda(double *, double *); void x2lamda(double *, double *, double *, double *); void bbox(double *, double *, double *, double *); void box_corners(); private: double small[3]; // fractions of box lengths }; } #endif /* ERROR/WARNING messages: E: Box bounds are invalid The box boundaries specified in the read_data file are invalid. The lo value must be less than the hi value for all 3 dimensions. E: Cannot skew triclinic box in z for 2d simulation Self-explanatory. E: Triclinic box skew is too large The displacement in a skewed direction must be less than half the box length in that dimension. E.g. the xy tilt must be between -half and +half of the x box length. E: Illegal simulation box The lower bound of the simulation box is greater than the upper bound. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Reuse of region ID A region ID cannot be used twice. E: Invalid region style The choice of region style is unknown. E: Delete region ID does not exist Self-explanatory. E: Both sides of boundary must be periodic Cannot specify a boundary as periodic only on the lo or hi side. Must be periodic on both sides. -U: Triclinic box must be periodic in skewed dimensions - -This is a requirement for using a non-orthogonal box. E.g. to set a -non-zero xy tilt, both x and y must be periodic dimensions. - */ diff --git a/src/dump_cfg.h b/src/dump_cfg.h index d309c698a..4d3107aa7 100644 --- a/src/dump_cfg.h +++ b/src/dump_cfg.h @@ -1,67 +1,67 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef DUMP_CLASS DumpStyle(cfg,DumpCFG) #else #ifndef LMP_DUMP_CFG_H #define LMP_DUMP_CFG_H #include "dump_custom.h" namespace LAMMPS_NS { class DumpCFG : public DumpCustom { public: DumpCFG(class LAMMPS *, int, char **); ~DumpCFG(); private: char **auxname; // name strings of auxiliary properties int nchosen; // # of lines to be written on a writing proc int nlines; // # of lines transferred from buf to rbuf double **rbuf; // buf of data lines for data lines rearrangement int unwrapflag; // 1 if unwrapped coordinates are requested void init_style(); void write_header(bigint); void write_data(int, double *); }; } #endif #endif /* ERROR/WARNING messages: E: Dump cfg arguments must start with 'id type xs ys zs' or 'id type xsu ysu zsu' -This is a requirement of the CFG output format. :dd +This is a requirement of the CFG output format. E: Dump cfg arguments can not mix xs|ys|zs with xsu|ysu|zsu -UNDOCUMENTED +Self-explanatory. E: Invalid keyword in dump cfg command Self-explanatory. E: Dump cfg requires one snapshot per file Use the wildcard "*" character in the filename. */ diff --git a/src/dump_image.h b/src/dump_image.h index 978061eb3..e40ff092b 100644 --- a/src/dump_image.h +++ b/src/dump_image.h @@ -1,196 +1,183 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef DUMP_CLASS DumpStyle(image,DumpImage) #else #ifndef LMP_DUMP_IMAGE_H #define LMP_DUMP_IMAGE_H #include "dump_custom.h" namespace LAMMPS_NS { class DumpImage : public DumpCustom { public: DumpImage(class LAMMPS *, int, char**); ~DumpImage(); int pack_comm(int, int *, double *, int, int *); void unpack_comm(int, int, double *); private: int filetype; int acolor,adiam; // what determines color/diam of atoms double adiamvalue; // atom diameter value int atomflag,bondflag; // 0/1 for draw atoms,bonds int bcolor,bdiam; // what determines color/diam of bonds double bdiamvalue; // bond diameter value char *thetastr,*phistr; // variables for view theta,phi int thetavar,phivar; // index to theta,phi vars int cflag; // static/dynamic box center double cx,cy,cz; // fractional box center char *cxstr,*cystr,*czstr; // variables for box center int cxvar,cyvar,czvar; // index to box center vars char *upxstr,*upystr,*upzstr; // view up vector variables int upxvar,upyvar,upzvar; // index to up vector vars char *zoomstr,*perspstr; // view zoom and perspective variables int zoomvar,perspvar; // index to zoom,persp vars int boxflag,axesflag; // 0/1 for draw box and axes double boxdiam,axeslen,axesdiam; // params for drawing box and axes int viewflag; // overall view is static or dynamic double *diamtype,*diamelement,*bdiamtype; // per-type diameters double **colortype,**colorelement,**bcolortype; // per-type colors class Image *image; // class that renders each image double **bufcopy; // buffer for communicating bond/atom info int maxbufcopy; void init_style(); int modify_param(int, char **); void write(); void box_center(); void view_params(); void box_bounds(); void create_image(); }; } #endif #endif /* ERROR/WARNING messages: E: Invalid dump image filename -UNDOCUMENTED +The file produced by dump image cannot be binary and must +be for a single processor. E: Cannot dump JPG file -UNDOCUMENTED +LAMMPS was not built with the -DLAMMPS_JPEG switch in the Makefile. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Dump image bond not allowed with no bond types -UNDOCUMENTED +Self-explanatory. E: Invalid dump image theta value -UNDOCUMENTED +Theta must be between 0.0 and 180.0 inclusive. E: Dump image persp option is not yet supported -UNDOCUMENTED +Self-explanatory. E: Dump image requires one snapshot per file -UNDOCUMENTED +Use a "*" in the filename. E: Dump image cannot perform sorting -UNDOCUMENTED +Self-explanatory. E: Variable name for dump image theta does not exist -UNDOCUMENTED +Self-explanatory. E: Variable for dump image theta is invalid style -UNDOCUMENTED +Must be an equal-style variable. E: Variable name for dump image phi does not exist -UNDOCUMENTED +Self-explanatory. E: Variable for dump image phi is invalid style -UNDOCUMENTED +Must be an equal-style variable. E: Variable name for dump image center does not exist -UNDOCUMENTED +Self-explanatory. E: Variable for dump image center is invalid style -UNDOCUMENTED +Must be an equal-style variable. E: Variable name for dump image zoom does not exist -UNDOCUMENTED +Self-explanatory. E: Variable for dump image zoom is invalid style -UNDOCUMENTED +Must be an equal-style variable. E: Variable name for dump image persp does not exist -UNDOCUMENTED +Self-explanatory. E: Variable for dump image persp is invalid style -UNDOCUMENTED +Must be an equal-style variable. E: Invalid dump image element name -UNDOCUMENTED +The specified element name was not in the standard list of elements. +See the dump_modify doc page. E: Invalid dump image zoom value -UNDOCUMENTED +Zoom value must be > 0.0. E: Invalid dump image persp value -UNDOCUMENTED +Persp value must be >= 0.0. E: Invalid color in dump_modify command -UNDOCUMENTED +The specified color name was not in the list of recognized colors. +See the dump_modify doc page. E: Dump modify bcolor not allowed with no bond types -UNDOCUMENTED +Self-explanatory. E: Dump modify bdiam not allowed with no bond types -UNDOCUMENTED - -U: Invalid dump image up vector - -UNDOCUMENTED - -U: Invalid dump image color range - -UNDOCUMENTED - -U: Illega dump_modify command - -UNDOCUMENTED - -U: Invalid color map in dump_modify command - -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/fix_ave_correlate.h b/src/fix_ave_correlate.h index c9cf84aff..7d4a87854 100644 --- a/src/fix_ave_correlate.h +++ b/src/fix_ave_correlate.h @@ -1,128 +1,128 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(ave/correlate,FixAveCorrelate) #else #ifndef LMP_FIX_AVE_CORRELATE_H #define LMP_FIX_AVE_CORRELATE_H #include "stdio.h" #include "fix.h" namespace LAMMPS_NS { class FixAveCorrelate : public Fix { public: FixAveCorrelate(class LAMMPS *, int, char **); ~FixAveCorrelate(); int setmask(); void init(); void setup(int); void end_of_step(); double compute_array(int,int); private: int me,nvalues; int nrepeat,nfreq; bigint nvalid; int *which,*argindex,*value2index; char **ids; FILE *fp; int type,ave,startstep; double prefactor; char *title1,*title2,*title3; int firstindex; // index in values ring of earliest time sample int lastindex; // index in values ring of latest time sample int nsample; // number of time samples in values ring int npair; // number of correlation pairs to calculate int *count; double **values,**corr; int *save_count; // saved values at Nfreq for output via compute_array() double **save_corr; void accumulate(); bigint nextvalid(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Cannot open fix ave/correlate file %s The specified file cannot be opened. Check that the path and name are correct. E: Compute ID for fix ave/correlate does not exist Self-explanatory. E: Fix ave/correlate compute does not calculate a scalar -UNDOCUMENTED +Self-explanatory. E: Fix ave/correlate compute does not calculate a vector -UNDOCUMENTED +Self-explanatory. E: Fix ave/correlate compute vector is accessed out-of-range -UNDOCUMENTED +The index for the vector is out of bounds. E: Fix ID for fix ave/correlate does not exist Self-explanatory. E: Fix ave/correlate fix does not calculate a scalar -UNDOCUMENTED +Self-explanatory. E: Fix ave/correlate fix does not calculate a vector -UNDOCUMENTED +Self-explanatory. E: Fix ave/correlate fix vector is accessed out-of-range -UNDOCUMENTED +The index for the vector is out of bounds. E: Fix for fix ave/correlate not computed at compatible time Fixes generate their values on specific timesteps. Fix ave/correlate is requesting a value on a non-allowed timestep. E: Variable name for fix ave/correlate does not exist Self-explanatory. E: Fix ave/correlate variable is not equal-style variable -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/fix_ave_time.h b/src/fix_ave_time.h index 7004b4955..7e55528b8 100644 --- a/src/fix_ave_time.h +++ b/src/fix_ave_time.h @@ -1,169 +1,167 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(ave/time,FixAveTime) #else #ifndef LMP_FIX_AVE_TIME_H #define LMP_FIX_AVE_TIME_H #include "stdio.h" #include "fix.h" namespace LAMMPS_NS { class FixAveTime : public Fix { public: FixAveTime(class LAMMPS *, int, char **); ~FixAveTime(); int setmask(); void init(); void setup(int); void end_of_step(); double compute_scalar(); double compute_vector(int); double compute_array(int,int); private: int me,nvalues; int nrepeat,nfreq,irepeat; bigint nvalid; int *which,*argindex,*value2index,*offcol; char **ids; FILE *fp; int nrows; int ave,nwindow,nsum,startstep,mode; int noff; int *offlist; char *title1,*title2,*title3; int norm,iwindow,window_limit; double *vector; double *vector_total; double **vector_list; double *column; double **array; double **array_total; double ***array_list; void invoke_scalar(bigint); void invoke_vector(bigint); void options(int, char **); void allocate_values(int); bigint nextvalid(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Compute ID for fix ave/time does not exist Self-explanatory. E: Fix ID for fix ave/time does not exist Self-explanatory. E: Invalid fix ave/time off column Self-explantory. E: Fix ave/time compute does not calculate a scalar -Only computes that calculate a scalar or vector quantity (not a -per-atom quantity) can be used with fix ave/time. +Self-explantory. E: Fix ave/time compute does not calculate a vector -Only computes that calculate a scalar or vector quantity (not a -per-atom quantity) can be used with fix ave/time. +Self-explantory. E: Fix ave/time compute vector is accessed out-of-range The index for the vector is out of bounds. E: Fix ave/time compute does not calculate an array Self-explanatory. E: Fix ave/time compute array is accessed out-of-range -Self-explanatory. +An index for the array is out of bounds. E: Fix ave/time fix does not calculate a scalar -A fix used by fix ave/time must generate global values. +Self-explanatory. E: Fix ave/time fix does not calculate a vector -A fix used by fix ave/time must generate global values. +Self-explanatory. E: Fix ave/time fix vector is accessed out-of-range The index for the vector is out of bounds. E: Fix for fix ave/time not computed at compatible time Fixes generate their values on specific timesteps. Fix ave/time is requesting a value on a non-allowed timestep. E: Fix ave/time fix does not calculate an array Self-explanatory. E: Fix ave/time fix array is accessed out-of-range -Self-explanatory. +An index for the array is out of bounds. E: Variable name for fix ave/time does not exist Self-explanatory. E: Fix ave/time variable is not equal-style variable -A variable used by fix ave/time must generate a global value. +Self-explanatory. E: Fix ave/time cannot use variable with vector mode Variables produce scalar values. E: Fix ave/time columns are inconsistent lengths Self-explanatory. E: Fix ave/time cannot set output array intensive/extensive from these inputs One of more of the vector inputs has individual elements which are flagged as intensive or extensive. Such an input cannot be flagged as all intensive/extensive when turned into an array by fix ave/time. E: Cannot open fix ave/time file %s The specified file cannot be opened. Check that the path and name are correct. */ diff --git a/src/fix_deform.h b/src/fix_deform.h index 9be469004..3d3efebe5 100644 --- a/src/fix_deform.h +++ b/src/fix_deform.h @@ -1,150 +1,139 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(deform,FixDeform) #else #ifndef LMP_FIX_DEFORM_H #define LMP_FIX_DEFORM_H #include "fix.h" namespace LAMMPS_NS { class FixDeform : public Fix { public: int remapflag; // whether x,v are remapped across PBC int dimflag[6]; // which dims are deformed FixDeform(class LAMMPS *, int, char **); ~FixDeform(); int setmask(); void init(); void pre_exchange(); void end_of_step(); private: int triclinic,scaleflag; int flip,flipx,flipy; double *h_rate,*h_ratelo; int varflag; // 1 if VARIABLE option is used, 0 if not int kspace_flag; // 1 if KSpace invoked, 0 if not int nrigid; // number of rigid fixes int *rfix; // indices of rigid fixes class Irregular *irregular; // for migrating atoms after box flips double TWOPI; struct Set { int style,substyle; double flo,fhi,ftilt; double dlo,dhi,dtilt; double scale,vel,rate; double amplitude,tperiod; double lo_initial,hi_initial; double lo_start,hi_start,lo_stop,hi_stop,lo_target,hi_target; double tilt_initial,tilt_start,tilt_stop,tilt_target,tilt_flip; double tilt_min,tilt_max; double vol_initial,vol_start; int fixed,dynamic1,dynamic2; char *hstr,*hratestr; int hvar,hratevar; }; Set *set; void options(int, char **); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Fix deform tilt factors require triclinic box Cannot deform the tilt factors of a simulation box unless it is a triclinic (non-orthogonal) box. E: Cannot use fix deform on a shrink-wrapped boundary -UNDOCUMENTED +The x, y, z options cannot be applied to shrink-wrapped +dimensions. E: Cannot use fix deform tilt on a shrink-wrapped 2nd dim -UNDOCUMENTED +This is because the shrink-wrapping will change the value +of the strain implied by the tilt factor. E: Use of fix deform with undefined lattice A lattice must be defined to use fix deform with units = lattice. E: Fix deform volume setting is invalid Cannot use volume style unless other dimensions are being controlled. E: More than one fix deform Only one fix deform can be defined at a time. E: Variable name for fix deform does not exist -UNDOCUMENTED +Self-explantory. E: Variable for fix deform is invalid style -UNDOCUMENTED +The variable must be an equal-style variable. E: Final box dimension due to fix deform is < 0.0 Self-explanatory. E: Cannot use fix deform trate on a box with zero tilt The trate style alters the current strain. E: Fix deform cannot use yz variable with xy -UNDOCUMENTED +The yz setting cannot be a variable if xy deformation is also +specified. This is because LAMMPS cannot determine if the yz setting +will induce a box flip which would be invalid if xy is also changing. E: Fix deform is changing yz too much with xy -UNDOCUMENTED - -U: Cannot use fix deform on a non-periodic boundary - -When specifying a change is a box dimension, the dimension must be -periodic. - -U: Cannot use fix deform on a 2nd non-periodic boundary - -When specifying a tilt factor change, the 2nd of the two dimensions -must be periodic. E.g. if the xy tilt is specified, then the y -dimension must be periodic. - -U: Fix deform is changing yz by too much with changing xy - When both yz and xy are changing, it induces changes in xz if the box must flip from one tilt extreme to another. Thus it is not allowed for yz to grow so much that a flip is induced. */ diff --git a/src/fix_evaporate.h b/src/fix_evaporate.h index 556d336ea..0d454aace 100644 --- a/src/fix_evaporate.h +++ b/src/fix_evaporate.h @@ -1,79 +1,80 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(evaporate,FixEvaporate) #else #ifndef LMP_FIX_EVAPORATE_H #define LMP_FIX_EVAPORATE_H #include "fix.h" namespace LAMMPS_NS { class FixEvaporate : public Fix { public: FixEvaporate(class LAMMPS *, int, char **); ~FixEvaporate(); int setmask(); void init(); void pre_exchange(); double compute_scalar(); double memory_usage(); private: int nevery,nflux,iregion; int molflag; int ndeleted; char *idregion; int nmax; int *list,*mark; class RanPark *random; }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Region ID for fix evaporate does not exist Self-explanatory. E: Cannot evaporate atoms in atom_modify first group This is a restriction due to the way atoms are organized in a list to enable the atom_modify first command. W: Fix evaporate may delete atom with non-zero molecule ID -UNDOCUMENTED +This is probably an error, since you should not delete only one atom +of a molecule. E: Fix evaporate molecule requires atom attribute molecule The atom style being used does not define a molecule ID. */ diff --git a/src/fix_langevin.cpp b/src/fix_langevin.cpp index 60d18a510..5d910be46 100644 --- a/src/fix_langevin.cpp +++ b/src/fix_langevin.cpp @@ -1,811 +1,811 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- Contributing author: Carolyn Phillips (U Mich), reservoir energy tally ------------------------------------------------------------------------- */ #include "mpi.h" #include "math.h" #include "string.h" #include "stdlib.h" #include "fix_langevin.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" #include "force.h" #include "update.h" #include "modify.h" #include "compute.h" #include "domain.h" #include "region.h" #include "respa.h" #include "comm.h" #include "input.h" #include "variable.h" #include "random_mars.h" #include "memory.h" #include "error.h" #include "group.h" using namespace LAMMPS_NS; using namespace FixConst; enum{NOBIAS,BIAS}; enum{CONSTANT,EQUAL,ATOM}; #define SINERTIA 0.4 // moment of inertia prefactor for sphere #define EINERTIA 0.2 // moment of inertia prefactor for ellipsoid /* ---------------------------------------------------------------------- */ FixLangevin::FixLangevin(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { if (narg < 7) error->all(FLERR,"Illegal fix langevin command"); scalar_flag = 1; global_freq = 1; extscalar = 1; nevery = 1; tstr = NULL; if (strstr(arg[3],"v_") == arg[3]) { int n = strlen(&arg[3][2]) + 1; tstr = new char[n]; strcpy(tstr,&arg[3][2]); } else { t_start = atof(arg[3]); tstyle = CONSTANT; } t_stop = atof(arg[4]); t_period = atof(arg[5]); int seed = atoi(arg[6]); if (t_period <= 0.0) error->all(FLERR,"Fix langevin period must be > 0.0"); if (seed <= 0) error->all(FLERR,"Illegal fix langevin command"); // initialize Marsaglia RNG with processor-unique seed random = new RanMars(lmp,seed + comm->me); // allocate per-type arrays for force prefactors gfactor1 = new double[atom->ntypes+1]; gfactor2 = new double[atom->ntypes+1]; ratio = new double[atom->ntypes+1]; // optional args for (int i = 1; i <= atom->ntypes; i++) ratio[i] = 1.0; oflag = aflag = 0; tally = 0; zeroflag = 0; int iarg = 7; while (iarg < narg) { if (strcmp(arg[iarg],"angmom") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix langevin command"); if (strcmp(arg[iarg+1],"no") == 0) aflag = 0; else if (strcmp(arg[iarg+1],"yes") == 0) aflag = 1; else error->all(FLERR,"Illegal fix langevin command"); iarg += 2; } else if (strcmp(arg[iarg],"omega") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix langevin command"); if (strcmp(arg[iarg+1],"no") == 0) oflag = 0; else if (strcmp(arg[iarg+1],"yes") == 0) oflag = 1; else error->all(FLERR,"Illegal fix langevin command"); iarg += 2; } else if (strcmp(arg[iarg],"scale") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal fix langevin command"); int itype = atoi(arg[iarg+1]); double scale = atof(arg[iarg+2]); if (itype <= 0 || itype > atom->ntypes) error->all(FLERR,"Illegal fix langevin command"); ratio[itype] = scale; iarg += 3; } else if (strcmp(arg[iarg],"tally") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix langevin command"); if (strcmp(arg[iarg+1],"no") == 0) tally = 0; else if (strcmp(arg[iarg+1],"yes") == 0) tally = 1; else error->all(FLERR,"Illegal fix langevin command"); iarg += 2; } else if (strcmp(arg[iarg],"zero") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix langevin command"); if (strcmp(arg[iarg+1],"no") == 0) zeroflag = 0; else if (strcmp(arg[iarg+1],"yes") == 0) zeroflag = 1; else error->all(FLERR,"Illegal fix langevin command"); iarg += 2; } else error->all(FLERR,"Illegal fix langevin command"); } // error check if (aflag) { avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); if (!avec) error->all(FLERR,"Fix langevin angmom requires atom style ellipsoid"); } // set temperature = NULL, user can override via fix_modify if wants bias id_temp = NULL; temperature = NULL; // flangevin is unallocated until first call to setup() // compute_scalar checks for this and returns 0.0 if flangevin is NULL energy = 0.0; flangevin = NULL; tforce = NULL; maxatom1 = maxatom2 = 0; } /* ---------------------------------------------------------------------- */ FixLangevin::~FixLangevin() { delete random; delete [] tstr; delete [] gfactor1; delete [] gfactor2; delete [] ratio; delete [] id_temp; memory->destroy(flangevin); memory->destroy(tforce); } /* ---------------------------------------------------------------------- */ int FixLangevin::setmask() { int mask = 0; mask |= POST_FORCE; mask |= POST_FORCE_RESPA; mask |= END_OF_STEP; mask |= THERMO_ENERGY; return mask; } /* ---------------------------------------------------------------------- */ void FixLangevin::init() { if (oflag && !atom->sphere_flag) - error->all(FLERR,"Fix langevin omega require atom style sphere"); + error->all(FLERR,"Fix langevin omega requires atom style sphere"); if (aflag && !atom->ellipsoid_flag) - error->all(FLERR,"Fix langevin angmom require atom style ellipsoid"); + error->all(FLERR,"Fix langevin angmom requires atom style ellipsoid"); // check variable if (tstr) { tvar = input->variable->find(tstr); if (tvar < 0) error->all(FLERR,"Variable name for fix langevin does not exist"); if (input->variable->equalstyle(tvar)) tstyle = EQUAL; else if (input->variable->atomstyle(tvar)) tstyle = ATOM; else error->all(FLERR,"Variable for fix langevin is invalid style"); } // if oflag or aflag set, check that all group particles are finite-size if (oflag) { double *radius = atom->radius; int *mask = atom->mask; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) if (radius[i] == 0.0) error->one(FLERR,"Fix langevin omega requires extended particles"); } if (aflag) { int *ellipsoid = atom->ellipsoid; int *mask = atom->mask; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) if (ellipsoid[i] < 0) error->one(FLERR,"Fix langevin angmom requires extended particles"); } // set force prefactors if (!atom->rmass) { for (int i = 1; i <= atom->ntypes; i++) { gfactor1[i] = -atom->mass[i] / t_period / force->ftm2v; gfactor2[i] = sqrt(atom->mass[i]) * sqrt(24.0*force->boltz/t_period/update->dt/force->mvv2e) / force->ftm2v; gfactor1[i] *= 1.0/ratio[i]; gfactor2[i] *= 1.0/sqrt(ratio[i]); } } if (temperature && temperature->tempbias) which = BIAS; else which = NOBIAS; if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } /* ---------------------------------------------------------------------- */ void FixLangevin::setup(int vflag) { if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); } } /* ---------------------------------------------------------------------- */ void FixLangevin::post_force(int vflag) { if (tally) post_force_tally(); else post_force_no_tally(); } /* ---------------------------------------------------------------------- */ void FixLangevin::post_force_respa(int vflag, int ilevel, int iloop) { if (ilevel == nlevels_respa-1) post_force(vflag); } /* ---------------------------------------------------------------------- */ void FixLangevin::post_force_no_tally() { double gamma1,gamma2,t_target; double **v = atom->v; double **f = atom->f; double *rmass = atom->rmass; int *type = atom->type; int *mask = atom->mask; int nlocal = atom->nlocal; double delta = update->ntimestep - update->beginstep; delta /= update->endstep - update->beginstep; // set current t_target and t_sqrt // if variable temp, evaluate variable, wrap with clear/add // reallocate tforce array if necessary if (tstyle == CONSTANT) { t_target = t_start + delta * (t_stop-t_start); tsqrt = sqrt(t_target); } else { modify->clearstep_compute(); if (tstyle == EQUAL) { t_target = input->variable->compute_equal(tvar); if (t_target < 0.0) error->one(FLERR,"Fix langevin variable returned negative temperature"); tsqrt = sqrt(t_target); } else { if (nlocal > maxatom2) { maxatom2 = atom->nmax; memory->destroy(tforce); memory->create(tforce,maxatom2,"langevin:tforce"); } input->variable->compute_atom(tvar,igroup,tforce,1,0); for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) if (tforce[i] < 0.0) error->one(FLERR, "Fix langevin variable returned negative temperature"); } modify->addstep_compute(update->ntimestep + 1); } // apply damping and thermostat to atoms in group // for BIAS: // calculate temperature since some computes require temp // computed on current nlocal atoms to remove bias // test v = 0 since some computes mask non-participating atoms via v = 0 // and added force has extra term not multiplied by v = 0 // for ZEROFLAG: // sum random force over all atoms in group // subtract sum/count from each atom in group double fran[3],fsum[3],fsumall[3]; fsum[0] = fsum[1] = fsum[2] = 0.0; bigint count; double boltz = force->boltz; double dt = update->dt; double mvv2e = force->mvv2e; double ftm2v = force->ftm2v; if (zeroflag) { count = group->count(igroup); if (count == 0) error->all(FLERR,"Cannot zero Langevin force of 0 atoms"); } if (rmass) { if (which == NOBIAS) { for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { if (tstyle == ATOM) tsqrt = sqrt(tforce[i]); gamma1 = -rmass[i] / t_period / ftm2v; gamma2 = sqrt(rmass[i]) * sqrt(24.0*boltz/t_period/dt/mvv2e) / ftm2v; gamma1 *= 1.0/ratio[type[i]]; gamma2 *= 1.0/sqrt(ratio[type[i]]) * tsqrt; fran[0] = gamma2*(random->uniform()-0.5); fran[1] = gamma2*(random->uniform()-0.5); fran[2] = gamma2*(random->uniform()-0.5); f[i][0] += gamma1*v[i][0] + fran[0]; f[i][1] += gamma1*v[i][1] + fran[1]; f[i][2] += gamma1*v[i][2] + fran[2]; fsum[0] += fran[0]; fsum[1] += fran[1]; fsum[2] += fran[2]; } } } else if (which == BIAS) { temperature->compute_scalar(); for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { if (tstyle == ATOM) tsqrt = sqrt(tforce[i]); gamma1 = -rmass[i] / t_period / ftm2v; gamma2 = sqrt(rmass[i]) * sqrt(24.0*boltz/t_period/dt/mvv2e) / ftm2v; gamma1 *= 1.0/ratio[type[i]]; gamma2 *= 1.0/sqrt(ratio[type[i]]) * tsqrt; temperature->remove_bias(i,v[i]); fran[0] = gamma2*(random->uniform()-0.5); fran[1] = gamma2*(random->uniform()-0.5); fran[2] = gamma2*(random->uniform()-0.5); if (v[i][0] != 0.0) f[i][0] += gamma1*v[i][0] + fran[0]; if (v[i][1] != 0.0) f[i][1] += gamma1*v[i][1] + fran[1]; if (v[i][2] != 0.0) f[i][2] += gamma1*v[i][2] + fran[2]; fsum[0] += fran[0]; fsum[1] += fran[1]; fsum[2] += fran[2]; temperature->restore_bias(i,v[i]); } } } } else { if (which == NOBIAS) { for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { if (tstyle == ATOM) tsqrt = sqrt(tforce[i]); gamma1 = gfactor1[type[i]]; gamma2 = gfactor2[type[i]] * tsqrt; fran[0] = gamma2*(random->uniform()-0.5); fran[1] = gamma2*(random->uniform()-0.5); fran[2] = gamma2*(random->uniform()-0.5); f[i][0] += gamma1*v[i][0] + fran[0]; f[i][1] += gamma1*v[i][1] + fran[1]; f[i][2] += gamma1*v[i][2] + fran[2]; fsum[0] += fran[0]; fsum[1] += fran[1]; fsum[2] += fran[2]; } } } else if (which == BIAS) { temperature->compute_scalar(); for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { if (tstyle == ATOM) tsqrt = sqrt(tforce[i]); gamma1 = gfactor1[type[i]]; gamma2 = gfactor2[type[i]] * tsqrt; temperature->remove_bias(i,v[i]); fran[0] = gamma2*(random->uniform()-0.5); fran[1] = gamma2*(random->uniform()-0.5); fran[2] = gamma2*(random->uniform()-0.5); if (v[i][0] != 0.0) f[i][0] += gamma1*v[i][0] + fran[0]; if (v[i][1] != 0.0) f[i][1] += gamma1*v[i][1] + fran[1]; if (v[i][2] != 0.0) f[i][2] += gamma1*v[i][2] + fran[2]; fsum[0] += fran[0]; fsum[1] += fran[1]; fsum[2] += fran[2]; temperature->restore_bias(i,v[i]); } } } } // set total force to zero if (zeroflag) { MPI_Allreduce(fsum,fsumall,3,MPI_DOUBLE,MPI_SUM,world); fsumall[0] /= count; fsumall[1] /= count; fsumall[2] /= count; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { f[i][0] -= fsumall[0]; f[i][1] -= fsumall[1]; f[i][2] -= fsumall[2]; } } } // thermostat omega and angmom if (oflag) omega_thermostat(); if (aflag) angmom_thermostat(); } /* ---------------------------------------------------------------------- */ void FixLangevin::post_force_tally() { double gamma1,gamma2,t_target; // reallocate flangevin if necessary if (atom->nlocal > maxatom1) { memory->destroy(flangevin); maxatom1 = atom->nmax; memory->create(flangevin,maxatom1,3,"langevin:flangevin"); } double **v = atom->v; double **f = atom->f; double *rmass = atom->rmass; int *type = atom->type; int *mask = atom->mask; int nlocal = atom->nlocal; double delta = update->ntimestep - update->beginstep; delta /= update->endstep - update->beginstep; // set current t_target and t_sqrt // if variable temp, evaluate variable, wrap with clear/add // reallocate tforce array if necessary if (tstyle == CONSTANT) { t_target = t_start + delta * (t_stop-t_start); tsqrt = sqrt(t_target); } else { modify->clearstep_compute(); if (tstyle == EQUAL) { t_target = input->variable->compute_equal(tvar); if (t_target < 0.0) error->one(FLERR,"Fix langevin variable returned negative temperature"); tsqrt = sqrt(t_target); } else { if (nlocal > maxatom2) { maxatom2 = atom->nmax; memory->destroy(tforce); memory->create(tforce,maxatom2,"langevin:tforce"); } input->variable->compute_atom(tvar,igroup,tforce,1,0); for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) if (tforce[i] < 0.0) error->one(FLERR, "Fix langevin variable returned negative temperature"); } modify->addstep_compute(update->ntimestep + 1); } // apply damping and thermostat to appropriate atoms // for BIAS: // calculate temperature since some computes require temp // computed on current nlocal atoms to remove bias // test v = 0 since some computes mask non-participating atoms via v = 0 // and added force has extra term not multiplied by v = 0 double boltz = force->boltz; double dt = update->dt; double mvv2e = force->mvv2e; double ftm2v = force->ftm2v; if (rmass) { if (which == NOBIAS) { for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { if (tstyle == ATOM) tsqrt = sqrt(tforce[i]); gamma1 = -rmass[i] / t_period / ftm2v; gamma2 = sqrt(rmass[i]) * sqrt(24.0*boltz/t_period/dt/mvv2e) / ftm2v; gamma1 *= 1.0/ratio[type[i]]; gamma2 *= 1.0/sqrt(ratio[type[i]]) * tsqrt; flangevin[i][0] = gamma1*v[i][0] + gamma2*(random->uniform()-0.5); flangevin[i][1] = gamma1*v[i][1] + gamma2*(random->uniform()-0.5); flangevin[i][2] = gamma1*v[i][2] + gamma2*(random->uniform()-0.5); f[i][0] += flangevin[i][0]; f[i][1] += flangevin[i][1]; f[i][2] += flangevin[i][2]; } } } else if (which == BIAS) { temperature->compute_scalar(); for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { if (tstyle == ATOM) tsqrt = sqrt(tforce[i]); gamma1 = -rmass[i] / t_period / ftm2v; gamma2 = sqrt(rmass[i]) * sqrt(24.0*boltz/t_period/dt/mvv2e) / ftm2v; gamma1 *= 1.0/ratio[type[i]]; gamma2 *= 1.0/sqrt(ratio[type[i]]) * tsqrt; temperature->remove_bias(i,v[i]); flangevin[i][0] = gamma1*v[i][0] + gamma2*(random->uniform()-0.5); flangevin[i][1] = gamma1*v[i][1] + gamma2*(random->uniform()-0.5); flangevin[i][2] = gamma1*v[i][2] + gamma2*(random->uniform()-0.5); if (v[i][0] != 0.0) f[i][0] += flangevin[i][0]; else flangevin[i][0] = 0; if (v[i][1] != 0.0) f[i][1] += flangevin[i][1]; else flangevin[i][1] = 0; if (v[i][2] != 0.0) f[i][2] += flangevin[i][2]; else flangevin[i][2] = 0; temperature->restore_bias(i,v[i]); } } } } else { if (which == NOBIAS) { for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { if (tstyle == ATOM) tsqrt = sqrt(tforce[i]); gamma1 = gfactor1[type[i]]; gamma2 = gfactor2[type[i]] * tsqrt; flangevin[i][0] = gamma1*v[i][0] + gamma2*(random->uniform()-0.5); flangevin[i][1] = gamma1*v[i][1] + gamma2*(random->uniform()-0.5); flangevin[i][2] = gamma1*v[i][2] + gamma2*(random->uniform()-0.5); f[i][0] += flangevin[i][0]; f[i][1] += flangevin[i][1]; f[i][2] += flangevin[i][2]; } } } else if (which == BIAS) { temperature->compute_scalar(); for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { if (tstyle == ATOM) tsqrt = sqrt(tforce[i]); gamma1 = gfactor1[type[i]]; gamma2 = gfactor2[type[i]] * tsqrt; temperature->remove_bias(i,v[i]); flangevin[i][0] = gamma1*v[i][0] + gamma2*(random->uniform()-0.5); flangevin[i][1] = gamma1*v[i][1] + gamma2*(random->uniform()-0.5); flangevin[i][2] = gamma1*v[i][2] + gamma2*(random->uniform()-0.5); if (v[i][0] != 0.0) f[i][0] += flangevin[i][0]; else flangevin[i][0] = 0.0; if (v[i][1] != 0.0) f[i][1] += flangevin[i][1]; else flangevin[i][1] = 0.0; if (v[i][2] != 0.0) f[i][2] += flangevin[i][2]; else flangevin[i][2] = 0.0; temperature->restore_bias(i,v[i]); } } } } // thermostat omega and angmom if (oflag) omega_thermostat(); if (aflag) angmom_thermostat(); } /* ---------------------------------------------------------------------- thermostat rotational dof via omega ------------------------------------------------------------------------- */ void FixLangevin::omega_thermostat() { double gamma1,gamma2; double boltz = force->boltz; double dt = update->dt; double mvv2e = force->mvv2e; double ftm2v = force->ftm2v; double **torque = atom->torque; double **omega = atom->omega; double *radius = atom->radius; double *rmass = atom->rmass; int *mask = atom->mask; int *type = atom->type; int nlocal = atom->nlocal; double tran[3]; double inertiaone; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { inertiaone = SINERTIA*radius[i]*radius[i]*rmass[i]; if (tstyle == ATOM) tsqrt = sqrt(tforce[i]); gamma1 = -inertiaone / t_period / ftm2v; gamma2 = sqrt(inertiaone) * sqrt(24.0*boltz/t_period/dt/mvv2e) / ftm2v; gamma1 *= 1.0/ratio[type[i]]; gamma2 *= 1.0/sqrt(ratio[type[i]]) * tsqrt; tran[0] = gamma2*(random->uniform()-0.5); tran[1] = gamma2*(random->uniform()-0.5); tran[2] = gamma2*(random->uniform()-0.5); torque[i][0] += gamma1*omega[i][0] + tran[0]; torque[i][1] += gamma1*omega[i][1] + tran[1]; torque[i][2] += gamma1*omega[i][2] + tran[2]; } } } /* ---------------------------------------------------------------------- thermostat rotational dof via angmom ------------------------------------------------------------------------- */ void FixLangevin::angmom_thermostat() { double gamma1,gamma2; double boltz = force->boltz; double dt = update->dt; double mvv2e = force->mvv2e; double ftm2v = force->ftm2v; AtomVecEllipsoid::Bonus *bonus = avec->bonus; double **torque = atom->torque; double **angmom = atom->angmom; double *rmass = atom->rmass; int *ellipsoid = atom->ellipsoid; int *mask = atom->mask; int *type = atom->type; int nlocal = atom->nlocal; double inertia[3],omega[3],tran[3]; double *shape,*quat; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { shape = bonus[ellipsoid[i]].shape; inertia[0] = EINERTIA*rmass[i] * (shape[1]*shape[1]+shape[2]*shape[2]); inertia[1] = EINERTIA*rmass[i] * (shape[0]*shape[0]+shape[2]*shape[2]); inertia[2] = EINERTIA*rmass[i] * (shape[0]*shape[0]+shape[1]*shape[1]); quat = bonus[ellipsoid[i]].quat; MathExtra::mq_to_omega(angmom[i],quat,inertia,omega); if (tstyle == ATOM) tsqrt = sqrt(tforce[i]); gamma1 = -1.0 / t_period / ftm2v; gamma2 = sqrt(24.0*boltz/t_period/dt/mvv2e) / ftm2v; gamma1 *= 1.0/ratio[type[i]]; gamma2 *= 1.0/sqrt(ratio[type[i]]) * tsqrt; tran[0] = sqrt(inertia[0])*gamma2*(random->uniform()-0.5); tran[1] = sqrt(inertia[1])*gamma2*(random->uniform()-0.5); tran[2] = sqrt(inertia[2])*gamma2*(random->uniform()-0.5); torque[i][0] += inertia[0]*gamma1*omega[0] + tran[0]; torque[i][1] += inertia[1]*gamma1*omega[1] + tran[1]; torque[i][2] += inertia[2]*gamma1*omega[2] + tran[2]; } } } /* ---------------------------------------------------------------------- tally energy transfer to thermal reservoir ------------------------------------------------------------------------- */ void FixLangevin::end_of_step() { if (!tally) return; double **v = atom->v; int *mask = atom->mask; int nlocal = atom->nlocal; energy_onestep = 0.0; for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) energy_onestep += flangevin[i][0]*v[i][0] + flangevin[i][1]*v[i][1] + flangevin[i][2]*v[i][2]; energy += energy_onestep*update->dt; } /* ---------------------------------------------------------------------- */ void FixLangevin::reset_target(double t_new) { t_start = t_stop = t_new; } /* ---------------------------------------------------------------------- */ void FixLangevin::reset_dt() { if (atom->mass) { for (int i = 1; i <= atom->ntypes; i++) { gfactor2[i] = sqrt(atom->mass[i]) * sqrt(24.0*force->boltz/t_period/update->dt/force->mvv2e) / force->ftm2v; gfactor2[i] *= 1.0/sqrt(ratio[i]); } } } /* ---------------------------------------------------------------------- */ int FixLangevin::modify_param(int narg, char **arg) { if (strcmp(arg[0],"temp") == 0) { if (narg < 2) error->all(FLERR,"Illegal fix_modify command"); delete [] id_temp; int n = strlen(arg[1]) + 1; id_temp = new char[n]; strcpy(id_temp,arg[1]); int icompute = modify->find_compute(id_temp); if (icompute < 0) error->all(FLERR,"Could not find fix_modify temperature ID"); temperature = modify->compute[icompute]; if (temperature->tempflag == 0) error->all(FLERR, "Fix_modify temperature ID does not compute temperature"); if (temperature->igroup != igroup && comm->me == 0) error->warning(FLERR,"Group for fix_modify temp != fix group"); return 2; } return 0; } /* ---------------------------------------------------------------------- */ double FixLangevin::compute_scalar() { if (!tally || flangevin == NULL) return 0.0; // capture the very first energy transfer to thermal reservoir double **v = atom->v; int *mask = atom->mask; int nlocal = atom->nlocal; if (update->ntimestep == update->beginstep) { energy_onestep = 0.0; for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) energy_onestep += flangevin[i][0]*v[i][0] + flangevin[i][1]*v[i][1] + flangevin[i][2]*v[i][2]; energy = 0.5*energy_onestep*update->dt; } double energy_me = energy - 0.5*energy_onestep*update->dt; double energy_all; MPI_Allreduce(&energy_me,&energy_all,1,MPI_DOUBLE,MPI_SUM,world); return -energy_all; } /* ---------------------------------------------------------------------- memory usage of tally array ------------------------------------------------------------------------- */ double FixLangevin::memory_usage() { double bytes = 0.0; if (tally) double bytes = atom->nmax*3 * sizeof(double); if (tforce) bytes = atom->nmax * sizeof(double); return bytes; } diff --git a/src/fix_langevin.h b/src/fix_langevin.h index fa7a7e04e..3db3a2456 100644 --- a/src/fix_langevin.h +++ b/src/fix_langevin.h @@ -1,137 +1,134 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(langevin,FixLangevin) #else #ifndef LMP_FIX_LANGEVIN_H #define LMP_FIX_LANGEVIN_H #include "fix.h" namespace LAMMPS_NS { class FixLangevin : public Fix { public: FixLangevin(class LAMMPS *, int, char **); virtual ~FixLangevin(); int setmask(); void init(); void setup(int); void post_force(int); void post_force_respa(int, int, int); virtual void end_of_step(); void reset_target(double); void reset_dt(); int modify_param(int, char **); virtual double compute_scalar(); double memory_usage(); protected: int which,tally,zeroflag,oflag,aflag; double t_start,t_stop,t_period; double *gfactor1,*gfactor2,*ratio; double energy,energy_onestep; double tsqrt; int tstyle,tvar; char *tstr; class AtomVecEllipsoid *avec; int maxatom1,maxatom2; double **flangevin; double *tforce; char *id_temp; class Compute *temperature; int nlevels_respa; class RanMars *random; virtual void post_force_no_tally(); virtual void post_force_tally(); void omega_thermostat(); void angmom_thermostat(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Fix langevin period must be > 0.0 The time window for temperature relaxation must be > 0 E: Fix langevin angmom requires atom style ellipsoid -UNDOCUMENTED +Self-explanatory. -E: Fix langevin omega require atom style sphere +E: Fix langevin omega requires atom style sphere -UNDOCUMENTED - -E: Fix langevin angmom require atom style ellipsoid - -UNDOCUMENTED +Self-explanatory. E: Variable name for fix langevin does not exist -UNDOCUMENTED +Self-explanatory. E: Variable for fix langevin is invalid style -UNDOCUMENTED +It must be an equal-style variable. E: Fix langevin omega requires extended particles -UNDOCUMENTED +One of the particles has radius 0.0. E: Fix langevin angmom requires extended particles -UNDOCUMENTED +This fix option cannot be used with point paritlces. E: Fix langevin variable returned negative temperature -UNDOCUMENTED +Self-explanatory. E: Cannot zero Langevin force of 0 atoms -UNDOCUMENTED +The group has zero atoms, so you cannot request its force +be zeroed. E: Could not find fix_modify temperature ID The compute ID for computing temperature does not exist. E: Fix_modify temperature ID does not compute temperature The compute ID assigned to the fix must compute temperature. W: Group for fix_modify temp != fix group The fix_modify command is specifying a temperature computation that computes a temperature on a different group of atoms than the fix itself operates on. This is probably not what you want to do. */ diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index 403d17f68..0eb550592 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -1,2195 +1,2194 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- Contributing authors: Mark Stevens (SNL), Aidan Thompson (SNL) ------------------------------------------------------------------------- */ #include "string.h" #include "stdlib.h" #include "math.h" #include "fix_nh.h" #include "math_extra.h" #include "atom.h" #include "force.h" #include "comm.h" #include "irregular.h" #include "modify.h" #include "fix_deform.h" #include "compute.h" #include "kspace.h" #include "update.h" #include "respa.h" #include "domain.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; using namespace FixConst; #define DELTAFLIP 0.1 #define TILTMAX 1.5 enum{NOBIAS,BIAS}; enum{NONE,XYZ,XY,YZ,XZ}; enum{ISO,ANISO,TRICLINIC}; /* ---------------------------------------------------------------------- NVT,NPH,NPT integrators for improved Nose-Hoover equations of motion ---------------------------------------------------------------------- */ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { if (narg < 4) error->all(FLERR,"Illegal fix nvt/npt/nph command"); restart_global = 1; time_integrate = 1; scalar_flag = 1; vector_flag = 1; global_freq = 1; extscalar = 1; extvector = 0; // default values pcouple = NONE; drag = 0.0; allremap = 1; mtchain = mpchain = 3; nc_tchain = nc_pchain = 1; mtk_flag = 1; deviatoric_flag = 0; nreset_h0 = 0; eta_mass_flag = 1; omega_mass_flag = 0; etap_mass_flag = 0; // turn on tilt factor scaling, whenever applicable dimension = domain->dimension; scaleyz = scalexz = scalexy = 0; if (domain->yperiodic && domain->xy != 0.0) scalexy = 1; if (domain->zperiodic && dimension == 3) { if (domain->yz != 0.0) scaleyz = 1; if (domain->xz != 0.0) scalexz = 1; } // Used by FixNVTSllod to preserve non-default value mtchain_default_flag = 1; tstat_flag = 0; double t_period = 0.0; double p_period[6]; for (int i = 0; i < 6; i++) { p_start[i] = p_stop[i] = p_period[i] = p_target[i] = 0.0; p_flag[i] = 0; } // process keywords int iarg = 3; while (iarg < narg) { if (strcmp(arg[iarg],"temp") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); tstat_flag = 1; t_start = atof(arg[iarg+1]); t_stop = atof(arg[iarg+2]); t_period = atof(arg[iarg+3]); if (t_start < 0.0 || t_stop <= 0.0) error->all(FLERR,"Target temperature for fix nvt/npt/nph cannot be 0.0"); iarg += 4; } else if (strcmp(arg[iarg],"iso") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); pcouple = XYZ; p_start[0] = p_start[1] = p_start[2] = atof(arg[iarg+1]); p_stop[0] = p_stop[1] = p_stop[2] = atof(arg[iarg+2]); p_period[0] = p_period[1] = p_period[2] = atof(arg[iarg+3]); p_flag[0] = p_flag[1] = p_flag[2] = 1; if (dimension == 2) { p_start[2] = p_stop[2] = p_period[2] = 0.0; p_flag[2] = 0; } iarg += 4; } else if (strcmp(arg[iarg],"aniso") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); pcouple = NONE; p_start[0] = p_start[1] = p_start[2] = atof(arg[iarg+1]); p_stop[0] = p_stop[1] = p_stop[2] = atof(arg[iarg+2]); p_period[0] = p_period[1] = p_period[2] = atof(arg[iarg+3]); p_flag[0] = p_flag[1] = p_flag[2] = 1; if (dimension == 2) { p_start[2] = p_stop[2] = p_period[2] = 0.0; p_flag[2] = 0; } iarg += 4; } else if (strcmp(arg[iarg],"tri") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); pcouple = NONE; scalexy = scalexz = scaleyz = 0; p_start[0] = p_start[1] = p_start[2] = atof(arg[iarg+1]); p_stop[0] = p_stop[1] = p_stop[2] = atof(arg[iarg+2]); p_period[0] = p_period[1] = p_period[2] = atof(arg[iarg+3]); p_flag[0] = p_flag[1] = p_flag[2] = 1; p_start[3] = p_start[4] = p_start[5] = 0.0; p_stop[3] = p_stop[4] = p_stop[5] = 0.0; p_period[3] = p_period[4] = p_period[5] = atof(arg[iarg+3]); p_flag[3] = p_flag[4] = p_flag[5] = 1; if (dimension == 2) { p_start[2] = p_stop[2] = p_period[2] = 0.0; p_flag[2] = 0; p_start[3] = p_stop[3] = p_period[3] = 0.0; p_flag[3] = 0; p_start[4] = p_stop[4] = p_period[4] = 0.0; p_flag[4] = 0; } iarg += 4; } else if (strcmp(arg[iarg],"x") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); p_start[0] = atof(arg[iarg+1]); p_stop[0] = atof(arg[iarg+2]); p_period[0] = atof(arg[iarg+3]); p_flag[0] = 1; deviatoric_flag = 1; iarg += 4; } else if (strcmp(arg[iarg],"y") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); p_start[1] = atof(arg[iarg+1]); p_stop[1] = atof(arg[iarg+2]); p_period[1] = atof(arg[iarg+3]); p_flag[1] = 1; deviatoric_flag = 1; iarg += 4; } else if (strcmp(arg[iarg],"z") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); p_start[2] = atof(arg[iarg+1]); p_stop[2] = atof(arg[iarg+2]); p_period[2] = atof(arg[iarg+3]); p_flag[2] = 1; deviatoric_flag = 1; iarg += 4; if (dimension == 2) error->all(FLERR,"Invalid fix nvt/npt/nph command for a 2d simulation"); } else if (strcmp(arg[iarg],"yz") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); scaleyz = 0; p_start[3] = atof(arg[iarg+1]); p_stop[3] = atof(arg[iarg+2]); p_period[3] = atof(arg[iarg+3]); p_flag[3] = 1; deviatoric_flag = 1; iarg += 4; if (dimension == 2) error->all(FLERR,"Invalid fix nvt/npt/nph command for a 2d simulation"); } else if (strcmp(arg[iarg],"xz") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); scalexz = 0; p_start[4] = atof(arg[iarg+1]); p_stop[4] = atof(arg[iarg+2]); p_period[4] = atof(arg[iarg+3]); p_flag[4] = 1; deviatoric_flag = 1; iarg += 4; if (dimension == 2) error->all(FLERR,"Invalid fix nvt/npt/nph command for a 2d simulation"); } else if (strcmp(arg[iarg],"xy") == 0) { scalexy = 0; if (iarg+4 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); p_start[5] = atof(arg[iarg+1]); p_stop[5] = atof(arg[iarg+2]); p_period[5] = atof(arg[iarg+3]); p_flag[5] = 1; deviatoric_flag = 1; iarg += 4; } else if (strcmp(arg[iarg],"couple") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); if (strcmp(arg[iarg+1],"xyz") == 0) pcouple = XYZ; else if (strcmp(arg[iarg+1],"xy") == 0) pcouple = XY; else if (strcmp(arg[iarg+1],"yz") == 0) pcouple = YZ; else if (strcmp(arg[iarg+1],"xz") == 0) pcouple = XZ; else if (strcmp(arg[iarg+1],"none") == 0) pcouple = NONE; else error->all(FLERR,"Illegal fix nvt/npt/nph command"); iarg += 2; } else if (strcmp(arg[iarg],"drag") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); drag = atof(arg[iarg+1]); if (drag < 0.0) error->all(FLERR,"Illegal fix nvt/npt/nph command"); iarg += 2; } else if (strcmp(arg[iarg],"dilate") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); if (strcmp(arg[iarg+1],"all") == 0) allremap = 1; else if (strcmp(arg[iarg+1],"partial") == 0) allremap = 0; else error->all(FLERR,"Illegal fix nvt/npt/nph command"); iarg += 2; } else if (strcmp(arg[iarg],"tchain") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); mtchain = atoi(arg[iarg+1]); // used by FixNVTSllod to preserve non-default value mtchain_default_flag = 0; if (mtchain < 1) error->all(FLERR,"Illegal fix nvt/npt/nph command"); iarg += 2; } else if (strcmp(arg[iarg],"pchain") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); mpchain = atoi(arg[iarg+1]); if (mpchain < 0) error->all(FLERR,"Illegal fix nvt/npt/nph command"); iarg += 2; } else if (strcmp(arg[iarg],"mtk") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); if (strcmp(arg[iarg+1],"yes") == 0) mtk_flag = 1; else if (strcmp(arg[iarg+1],"no") == 0) mtk_flag = 0; else error->all(FLERR,"Illegal fix nvt/npt/nph command"); iarg += 2; } else if (strcmp(arg[iarg],"tloop") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); nc_tchain = atoi(arg[iarg+1]); if (nc_tchain < 0) error->all(FLERR,"Illegal fix nvt/npt/nph command"); iarg += 2; } else if (strcmp(arg[iarg],"ploop") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); nc_pchain = atoi(arg[iarg+1]); if (nc_pchain < 0) error->all(FLERR,"Illegal fix nvt/npt/nph command"); iarg += 2; } else if (strcmp(arg[iarg],"nreset") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); nreset_h0 = atoi(arg[iarg+1]); if (nreset_h0 < 0) error->all(FLERR,"Illegal fix nvt/npt/nph command"); iarg += 2; } else if (strcmp(arg[iarg],"scalexy") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); if (strcmp(arg[iarg+1],"yes") == 0) scalexy = 1; else if (strcmp(arg[iarg+1],"no") == 0) scalexy = 0; else error->all(FLERR,"Illegal fix nvt/npt/nph command"); iarg += 2; } else if (strcmp(arg[iarg],"scalexz") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); if (strcmp(arg[iarg+1],"yes") == 0) scalexz = 1; else if (strcmp(arg[iarg+1],"no") == 0) scalexz = 0; else error->all(FLERR,"Illegal fix nvt/npt/nph command"); iarg += 2; } else if (strcmp(arg[iarg],"scaleyz") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); if (strcmp(arg[iarg+1],"yes") == 0) scaleyz = 1; else if (strcmp(arg[iarg+1],"no") == 0) scaleyz = 0; else error->all(FLERR,"Illegal fix nvt/npt/nph command"); iarg += 2; } else error->all(FLERR,"Illegal fix nvt/npt/nph command"); } // error checks if (dimension == 2 && (p_flag[2] || p_flag[3] || p_flag[4])) error->all(FLERR,"Invalid fix nvt/npt/nph command for a 2d simulation"); if (dimension == 2 && (pcouple == YZ || pcouple == XZ)) error->all(FLERR,"Invalid fix nvt/npt/nph command for a 2d simulation"); if (dimension == 2 && (scalexz == 1 || scaleyz == 1 )) error->all(FLERR,"Invalid fix nvt/npt/nph command for a 2d simulation"); if (pcouple == XYZ && (p_flag[0] == 0 || p_flag[1] == 0)) error->all(FLERR,"Invalid fix nvt/npt/nph command pressure settings"); if (pcouple == XYZ && dimension == 3 && p_flag[2] == 0) error->all(FLERR,"Invalid fix nvt/npt/nph command pressure settings"); if (pcouple == XY && (p_flag[0] == 0 || p_flag[1] == 0)) error->all(FLERR,"Invalid fix nvt/npt/nph command pressure settings"); if (pcouple == YZ && (p_flag[1] == 0 || p_flag[2] == 0)) error->all(FLERR,"Invalid fix nvt/npt/nph command pressure settings"); if (pcouple == XZ && (p_flag[0] == 0 || p_flag[2] == 0)) error->all(FLERR,"Invalid fix nvt/npt/nph command pressure settings"); // require periodicity in tensile dimension if (p_flag[0] && domain->xperiodic == 0) error->all(FLERR,"Cannot use fix nvt/npt/nph on a non-periodic dimension"); if (p_flag[1] && domain->yperiodic == 0) error->all(FLERR,"Cannot use fix nvt/npt/nph on a non-periodic dimension"); if (p_flag[2] && domain->zperiodic == 0) error->all(FLERR,"Cannot use fix nvt/npt/nph on a non-periodic dimension"); // require periodicity in 2nd dim of off-diagonal tilt component if (p_flag[3] && domain->zperiodic == 0) error->all(FLERR, "Cannot use fix nvt/npt/nph on a 2nd non-periodic dimension"); if (p_flag[4] && domain->zperiodic == 0) error->all(FLERR, "Cannot use fix nvt/npt/nph on a 2nd non-periodic dimension"); if (p_flag[5] && domain->yperiodic == 0) error->all(FLERR, "Cannot use fix nvt/npt/nph on a 2nd non-periodic dimension"); if (scaleyz == 1 && domain->zperiodic == 0) error->all(FLERR,"Cannot use fix nvt/npt/nph " "with yz dynamics when z is non-periodic dimension"); if (scalexz == 1 && domain->zperiodic == 0) error->all(FLERR,"Cannot use fix nvt/npt/nph " "with xz dynamics when z is non-periodic dimension"); if (scalexy == 1 && domain->yperiodic == 0) error->all(FLERR,"Cannot use fix nvt/npt/nph " "with xy dynamics when y is non-periodic dimension"); if (p_flag[3] && scaleyz == 1) - error->all(FLERR,"Cannot use fix nvt/npt/nph with" + error->all(FLERR,"Cannot use fix nvt/npt/nph with " "both yz dynamics and yz scaling"); if (p_flag[4] && scalexz == 1) error->all(FLERR,"Cannot use fix nvt/npt/nph with " "both xz dynamics and xz scaling"); if (p_flag[5] && scalexy == 1) error->all(FLERR,"Cannot use fix nvt/npt/nph with " "both xy dynamics and xy scaling"); if (!domain->triclinic && (p_flag[3] || p_flag[4] || p_flag[5])) error->all(FLERR,"Can not specify Pxy/Pxz/Pyz in " "fix nvt/npt/nph with non-triclinic box"); if (pcouple == XYZ && dimension == 3 && (p_start[0] != p_start[1] || p_start[0] != p_start[2] || p_stop[0] != p_stop[1] || p_stop[0] != p_stop[2] || p_period[0] != p_period[1] || p_period[0] != p_period[2])) error->all(FLERR,"Invalid fix nvt/npt/nph pressure settings"); if (pcouple == XYZ && dimension == 2 && (p_start[0] != p_start[1] || p_stop[0] != p_stop[1] || p_period[0] != p_period[1])) error->all(FLERR,"Invalid fix nvt/npt/nph pressure settings"); if (pcouple == XY && (p_start[0] != p_start[1] || p_stop[0] != p_stop[1] || p_period[0] != p_period[1])) error->all(FLERR,"Invalid fix nvt/npt/nph pressure settings"); if (pcouple == YZ && (p_start[1] != p_start[2] || p_stop[1] != p_stop[2] || p_period[1] != p_period[2])) error->all(FLERR,"Invalid fix nvt/npt/nph pressure settings"); if (pcouple == XZ && (p_start[0] != p_start[2] || p_stop[0] != p_stop[2] || p_period[0] != p_period[2])) error->all(FLERR,"Invalid fix nvt/npt/nph pressure settings"); if ((tstat_flag && t_period <= 0.0) || (p_flag[0] && p_period[0] <= 0.0) || (p_flag[1] && p_period[1] <= 0.0) || (p_flag[2] && p_period[2] <= 0.0) || (p_flag[3] && p_period[3] <= 0.0) || (p_flag[4] && p_period[4] <= 0.0) || (p_flag[5] && p_period[5] <= 0.0)) error->all(FLERR,"Fix nvt/npt/nph damping parameters must be > 0.0"); // set pstat_flag and box change and restart_pbc variables pstat_flag = 0; for (int i = 0; i < 6; i++) if (p_flag[i]) pstat_flag = 1; if (pstat_flag) { box_change = 1; if (p_flag[0] || p_flag[1] || p_flag[2]) box_change_size = 1; if (p_flag[3] || p_flag[4] || p_flag[5]) box_change_shape = 1; no_change_box = 1; if (allremap == 0) restart_pbc = 1; } // pstyle = TRICLINIC if any off-diagonal term is controlled -> 6 dof // else pstyle = ISO if XYZ coupling or XY coupling in 2d -> 1 dof // else pstyle = ANISO -> 3 dof if (p_flag[3] || p_flag[4] || p_flag[5]) pstyle = TRICLINIC; else if (pcouple == XYZ || (dimension == 2 && pcouple == XY)) pstyle = ISO; else pstyle = ANISO; // reneighboring only forced if flips will occur due to shape changes if (p_flag[3] || p_flag[4] || p_flag[5]) force_reneighbor = 1; if (scaleyz || scalexz || scalexy) force_reneighbor = 1; // convert input periods to frequencies t_freq = 0.0; p_freq[0] = p_freq[1] = p_freq[2] = p_freq[3] = p_freq[4] = p_freq[5] = 0.0; if (tstat_flag) t_freq = 1.0 / t_period; if (p_flag[0]) p_freq[0] = 1.0 / p_period[0]; if (p_flag[1]) p_freq[1] = 1.0 / p_period[1]; if (p_flag[2]) p_freq[2] = 1.0 / p_period[2]; if (p_flag[3]) p_freq[3] = 1.0 / p_period[3]; if (p_flag[4]) p_freq[4] = 1.0 / p_period[4]; if (p_flag[5]) p_freq[5] = 1.0 / p_period[5]; // Nose/Hoover temp and pressure init size_vector = 0; if (tstat_flag) { int ich; eta = new double[mtchain]; // add one extra dummy thermostat, set to zero eta_dot = new double[mtchain+1]; eta_dot[mtchain] = 0.0; eta_dotdot = new double[mtchain]; for (ich = 0; ich < mtchain; ich++) { eta[ich] = eta_dot[ich] = eta_dotdot[ich] = 0.0; } eta_mass = new double[mtchain]; size_vector += 2*2*mtchain; } if (pstat_flag) { omega[0] = omega[1] = omega[2] = 0.0; omega_dot[0] = omega_dot[1] = omega_dot[2] = 0.0; omega_mass[0] = omega_mass[1] = omega_mass[2] = 0.0; omega[3] = omega[4] = omega[5] = 0.0; omega_dot[3] = omega_dot[4] = omega_dot[5] = 0.0; omega_mass[3] = omega_mass[4] = omega_mass[5] = 0.0; if (pstyle == ISO) size_vector += 2*2*1; else if (pstyle == ANISO) size_vector += 2*2*3; else if (pstyle == TRICLINIC) size_vector += 2*2*6; if (mpchain) { int ich; etap = new double[mpchain]; // add one extra dummy thermostat, set to zero etap_dot = new double[mpchain+1]; etap_dot[mpchain] = 0.0; etap_dotdot = new double[mpchain]; for (ich = 0; ich < mpchain; ich++) { etap[ich] = etap_dot[ich] = etap_dotdot[ich] = 0.0; } etap_mass = new double[mpchain]; size_vector += 2*2*mpchain; } if (deviatoric_flag) size_vector += 1; } nrigid = 0; rfix = NULL; if (force_reneighbor) irregular = new Irregular(lmp); else irregular = NULL; // initialize vol0,t0 to zero to signal uninitialized // values then assigned in init(), if necessary vol0 = t0 = 0.0; } /* ---------------------------------------------------------------------- */ FixNH::~FixNH() { delete [] rfix; delete irregular; // delete temperature and pressure if fix created them if (tflag) modify->delete_compute(id_temp); delete [] id_temp; if (tstat_flag) { delete [] eta; delete [] eta_dot; delete [] eta_dotdot; delete [] eta_mass; } if (pstat_flag) { if (pflag) modify->delete_compute(id_press); delete [] id_press; if (mpchain) { delete [] etap; delete [] etap_dot; delete [] etap_dotdot; delete [] etap_mass; } } } /* ---------------------------------------------------------------------- */ int FixNH::setmask() { int mask = 0; mask |= INITIAL_INTEGRATE; mask |= FINAL_INTEGRATE; mask |= THERMO_ENERGY; mask |= INITIAL_INTEGRATE_RESPA; mask |= FINAL_INTEGRATE_RESPA; if (force_reneighbor) mask |= PRE_EXCHANGE; return mask; } /* ---------------------------------------------------------------------- */ void FixNH::init() { // ensure no conflict with fix deform if (pstat_flag) for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { int *dimflag = ((FixDeform *) modify->fix[i])->dimflag; if ((p_flag[0] && dimflag[0]) || (p_flag[1] && dimflag[1]) || (p_flag[2] && dimflag[2]) || (p_flag[3] && dimflag[3]) || (p_flag[4] && dimflag[4]) || (p_flag[5] && dimflag[5])) error->all(FLERR,"Cannot use fix npt and fix deform on " "same component of stress tensor"); } // set temperature and pressure ptrs int icompute = modify->find_compute(id_temp); if (icompute < 0) error->all(FLERR,"Temperature ID for fix nvt/nph/npt does not exist"); temperature = modify->compute[icompute]; if (temperature->tempbias) which = BIAS; else which = NOBIAS; if (pstat_flag) { icompute = modify->find_compute(id_press); if (icompute < 0) error->all(FLERR,"Pressure ID for fix npt/nph does not exist"); pressure = modify->compute[icompute]; } // set timesteps and frequencies dtv = update->dt; dtf = 0.5 * update->dt * force->ftm2v; dthalf = 0.5 * update->dt; dt4 = 0.25 * update->dt; dt8 = 0.125 * update->dt; dto = dthalf; p_freq_max = 0.0; if (pstat_flag) { p_freq_max = MAX(p_freq[0],p_freq[1]); p_freq_max = MAX(p_freq_max,p_freq[2]); if (pstyle == TRICLINIC) { p_freq_max = MAX(p_freq_max,p_freq[3]); p_freq_max = MAX(p_freq_max,p_freq[4]); p_freq_max = MAX(p_freq_max,p_freq[5]); } pdrag_factor = 1.0 - (update->dt * p_freq_max * drag / nc_pchain); } if (tstat_flag) tdrag_factor = 1.0 - (update->dt * t_freq * drag / nc_tchain); // tally the number of dimensions that are barostatted // set initial volume and reference cell, if not already done if (pstat_flag) { pdim = p_flag[0] + p_flag[1] + p_flag[2]; if (vol0 == 0.0) { if (dimension == 3) vol0 = domain->xprd * domain->yprd * domain->zprd; else vol0 = domain->xprd * domain->yprd; h0_inv[0] = domain->h_inv[0]; h0_inv[1] = domain->h_inv[1]; h0_inv[2] = domain->h_inv[2]; h0_inv[3] = domain->h_inv[3]; h0_inv[4] = domain->h_inv[4]; h0_inv[5] = domain->h_inv[5]; } } boltz = force->boltz; nktv2p = force->nktv2p; if (force->kspace) kspace_flag = 1; else kspace_flag = 0; if (strstr(update->integrate_style,"respa")) { nlevels_respa = ((Respa *) update->integrate)->nlevels; step_respa = ((Respa *) update->integrate)->step; dto = 0.5*step_respa[0]; } // detect if any rigid fixes exist so rigid bodies move when box is remapped // rfix[] = indices to each fix rigid delete [] rfix; nrigid = 0; rfix = NULL; for (int i = 0; i < modify->nfix; i++) if (modify->fix[i]->rigid_flag) nrigid++; if (nrigid) { rfix = new int[nrigid]; nrigid = 0; for (int i = 0; i < modify->nfix; i++) if (modify->fix[i]->rigid_flag) rfix[nrigid++] = i; } } /* ---------------------------------------------------------------------- compute T,P before integrator starts ------------------------------------------------------------------------- */ void FixNH::setup(int vflag) { // initialize some quantities that were not available earlier tdof = temperature->dof; // t_target is needed by NPH and NPT in compute_scalar() // If no thermostat or using fix nphug, // t_target must be defined by other means. if (tstat_flag && strcmp(style,"nphug") != 0) { compute_temp_target(); } else if (pstat_flag) { // t0 = reference temperature for masses // cannot be done in init() b/c temperature cannot be called there // is b/c Modify::init() inits computes after fixes due to dof dependence // guesstimate a unit-dependent t0 if actual T = 0.0 // if it was read in from a restart file, leave it be if (t0 == 0.0) { t0 = temperature->compute_scalar(); if (t0 == 0.0) { if (strcmp(update->unit_style,"lj") == 0) t0 = 1.0; else t0 = 300.0; } } t_target = t0; } if (pstat_flag) compute_press_target(); t_current = temperature->compute_scalar(); if (pstat_flag) { if (pstyle == ISO) pressure->compute_scalar(); else pressure->compute_vector(); couple(); pressure->addstep(update->ntimestep+1); } // masses and initial forces on thermostat variables if (tstat_flag) { eta_mass[0] = tdof * boltz * t_target / (t_freq*t_freq); for (int ich = 1; ich < mtchain; ich++) eta_mass[ich] = boltz * t_target / (t_freq*t_freq); for (int ich = 1; ich < mtchain; ich++) { eta_dotdot[ich] = (eta_mass[ich-1]*eta_dot[ich-1]*eta_dot[ich-1] - boltz * t_target) / eta_mass[ich]; } } // masses and initial forces on barostat variables if (pstat_flag) { double kt = boltz * t_target; double nkt = atom->natoms * kt; for (int i = 0; i < 3; i++) if (p_flag[i]) omega_mass[i] = nkt/(p_freq[i]*p_freq[i]); if (pstyle == TRICLINIC) { for (int i = 3; i < 6; i++) if (p_flag[i]) omega_mass[i] = nkt/(p_freq[i]*p_freq[i]); } // masses and initial forces on barostat thermostat variables if (mpchain) { etap_mass[0] = boltz * t_target / (p_freq_max*p_freq_max); for (int ich = 1; ich < mpchain; ich++) etap_mass[ich] = boltz * t_target / (p_freq_max*p_freq_max); for (int ich = 1; ich < mpchain; ich++) etap_dotdot[ich] = (etap_mass[ich-1]*etap_dot[ich-1]*etap_dot[ich-1] - boltz * t_target) / etap_mass[ich]; } } } /* ---------------------------------------------------------------------- 1st half of Verlet update ------------------------------------------------------------------------- */ void FixNH::initial_integrate(int vflag) { // update eta_press_dot if (pstat_flag && mpchain) nhc_press_integrate(); // update eta_dot if (tstat_flag) { compute_temp_target(); nhc_temp_integrate(); } // need to recompute pressure to account for change in KE // t_current is up-to-date, but compute_temperature is not // compute appropriately coupled elements of mvv_current if (pstat_flag) { if (pstyle == ISO) { temperature->compute_scalar(); pressure->compute_scalar(); } else { temperature->compute_vector(); pressure->compute_vector(); } couple(); pressure->addstep(update->ntimestep+1); } if (pstat_flag) { compute_press_target(); nh_omega_dot(); nh_v_press(); } nve_v(); // remap simulation box by 1/2 step if (pstat_flag) remap(); nve_x(); // remap simulation box by 1/2 step // redo KSpace coeffs since volume has changed if (pstat_flag) { remap(); if (kspace_flag) force->kspace->setup(); } } /* ---------------------------------------------------------------------- 2nd half of Verlet update ------------------------------------------------------------------------- */ void FixNH::final_integrate() { nve_v(); if (pstat_flag) nh_v_press(); // compute new T,P // compute appropriately coupled elements of mvv_current t_current = temperature->compute_scalar(); if (pstat_flag) { if (pstyle == ISO) pressure->compute_scalar(); else pressure->compute_vector(); couple(); pressure->addstep(update->ntimestep+1); } if (pstat_flag) nh_omega_dot(); // update eta_dot // update eta_press_dot if (tstat_flag) nhc_temp_integrate(); if (pstat_flag && mpchain) nhc_press_integrate(); } /* ---------------------------------------------------------------------- */ void FixNH::initial_integrate_respa(int vflag, int ilevel, int iloop) { // set timesteps by level dtv = step_respa[ilevel]; dtf = 0.5 * step_respa[ilevel] * force->ftm2v; dthalf = 0.5 * step_respa[ilevel]; // outermost level - update eta_dot and omega_dot, apply to v // all other levels - NVE update of v // x,v updates only performed for atoms in group if (ilevel == nlevels_respa-1) { // update eta_press_dot if (pstat_flag && mpchain) nhc_press_integrate(); // update eta_dot if (tstat_flag) { compute_temp_target(); nhc_temp_integrate(); } // recompute pressure to account for change in KE // t_current is up-to-date, but compute_temperature is not // compute appropriately coupled elements of mvv_current if (pstat_flag) { if (pstyle == ISO) { temperature->compute_scalar(); pressure->compute_scalar(); } else { temperature->compute_vector(); pressure->compute_vector(); } couple(); pressure->addstep(update->ntimestep+1); } if (pstat_flag) { compute_press_target(); nh_omega_dot(); nh_v_press(); } nve_v(); } else nve_v(); // innermost level - also update x only for atoms in group // if barostat, perform 1/2 step remap before and after if (ilevel == 0) { if (pstat_flag) remap(); nve_x(); if (pstat_flag) remap(); } // if barostat, redo KSpace coeffs at outermost level, // since volume has changed if (ilevel == nlevels_respa-1 && kspace_flag && pstat_flag) force->kspace->setup(); } /* ---------------------------------------------------------------------- */ void FixNH::final_integrate_respa(int ilevel, int iloop) { // set timesteps by level dtf = 0.5 * step_respa[ilevel] * force->ftm2v; dthalf = 0.5 * step_respa[ilevel]; // outermost level - update eta_dot and omega_dot, apply via final_integrate // all other levels - NVE update of v if (ilevel == nlevels_respa-1) final_integrate(); else nve_v(); } /* ---------------------------------------------------------------------- */ void FixNH::couple() { double *tensor = pressure->vector; if (pstyle == ISO) p_current[0] = p_current[1] = p_current[2] = pressure->scalar; else if (pcouple == XYZ) { double ave = 1.0/3.0 * (tensor[0] + tensor[1] + tensor[2]); p_current[0] = p_current[1] = p_current[2] = ave; } else if (pcouple == XY) { double ave = 0.5 * (tensor[0] + tensor[1]); p_current[0] = p_current[1] = ave; p_current[2] = tensor[2]; } else if (pcouple == YZ) { double ave = 0.5 * (tensor[1] + tensor[2]); p_current[1] = p_current[2] = ave; p_current[0] = tensor[0]; } else if (pcouple == XZ) { double ave = 0.5 * (tensor[0] + tensor[2]); p_current[0] = p_current[2] = ave; p_current[1] = tensor[1]; } else { p_current[0] = tensor[0]; p_current[1] = tensor[1]; p_current[2] = tensor[2]; } // switch order from xy-xz-yz to Voigt if (pstyle == TRICLINIC) { p_current[3] = tensor[5]; p_current[4] = tensor[4]; p_current[5] = tensor[3]; } } /* ---------------------------------------------------------------------- change box size remap all atoms or fix group atoms depending on allremap flag if rigid bodies exist, scale rigid body centers-of-mass ------------------------------------------------------------------------- */ void FixNH::remap() { int i; double oldlo,oldhi,ctr; double expfac; double **x = atom->x; int *mask = atom->mask; int nlocal = atom->nlocal; double *h = domain->h; // omega is not used, except for book-keeping for (int i = 0; i < 6; i++) omega[i] += dto*omega_dot[i]; // convert pertinent atoms and rigid bodies to lamda coords if (allremap) domain->x2lamda(nlocal); else { for (i = 0; i < nlocal; i++) if (mask[i] & groupbit) domain->x2lamda(x[i],x[i]); } if (nrigid) for (i = 0; i < nrigid; i++) modify->fix[rfix[i]]->deform(0); // reset global and local box to new size/shape // this operation corresponds to applying the // translate and scale operations // corresponding to the solution of the following ODE: // // h_dot = omega_dot * h // // where h_dot, omega_dot and h are all upper-triangular // 3x3 tensors. In Voigt notation, the elements of the // RHS product tensor are: // h_dot = [0*0, 1*1, 2*2, 1*3+3*2, 0*4+5*3+4*2, 0*5+5*1] // // Ordering of operations preserves time symmetry. double dto2 = dto/2.0; double dto4 = dto/4.0; double dto8 = dto/8.0; // off-diagonal components, first half if (pstyle == TRICLINIC) { if (p_flag[4]) { expfac = exp(dto8*omega_dot[0]); h[4] *= expfac; h[4] += dto4*(omega_dot[5]*h[3]+omega_dot[4]*h[2]); h[4] *= expfac; } if (p_flag[3]) { expfac = exp(dto4*omega_dot[1]); h[3] *= expfac; h[3] += dto2*(omega_dot[3]*h[2]); h[3] *= expfac; } if (p_flag[5]) { expfac = exp(dto4*omega_dot[0]); h[5] *= expfac; h[5] += dto2*(omega_dot[5]*h[1]); h[5] *= expfac; } if (p_flag[4]) { expfac = exp(dto8*omega_dot[0]); h[4] *= expfac; h[4] += dto4*(omega_dot[5]*h[3]+omega_dot[4]*h[2]); h[4] *= expfac; } } // scale diagonal components // scale tilt factors with cell, if set if (p_flag[0]) { oldlo = domain->boxlo[0]; oldhi = domain->boxhi[0]; ctr = 0.5 * (oldlo + oldhi); expfac = exp(dto*omega_dot[0]); domain->boxlo[0] = (oldlo-ctr)*expfac + ctr; domain->boxhi[0] = (oldhi-ctr)*expfac + ctr; } if (p_flag[1]) { oldlo = domain->boxlo[1]; oldhi = domain->boxhi[1]; ctr = 0.5 * (oldlo + oldhi); expfac = exp(dto*omega_dot[1]); domain->boxlo[1] = (oldlo-ctr)*expfac + ctr; domain->boxhi[1] = (oldhi-ctr)*expfac + ctr; if (scalexy) h[5] *= expfac; } if (p_flag[2]) { oldlo = domain->boxlo[2]; oldhi = domain->boxhi[2]; ctr = 0.5 * (oldlo + oldhi); expfac = exp(dto*omega_dot[2]); domain->boxlo[2] = (oldlo-ctr)*expfac + ctr; domain->boxhi[2] = (oldhi-ctr)*expfac + ctr; if (scalexz) h[4] *= expfac; if (scaleyz) h[3] *= expfac; } // off-diagonal components, second half if (pstyle == TRICLINIC) { if (p_flag[4]) { expfac = exp(dto8*omega_dot[0]); h[4] *= expfac; h[4] += dto4*(omega_dot[5]*h[3]+omega_dot[4]*h[2]); h[4] *= expfac; } if (p_flag[3]) { expfac = exp(dto4*omega_dot[1]); h[3] *= expfac; h[3] += dto2*(omega_dot[3]*h[2]); h[3] *= expfac; } if (p_flag[5]) { expfac = exp(dto4*omega_dot[0]); h[5] *= expfac; h[5] += dto2*(omega_dot[5]*h[1]); h[5] *= expfac; } if (p_flag[4]) { expfac = exp(dto8*omega_dot[0]); h[4] *= expfac; h[4] += dto4*(omega_dot[5]*h[3]+omega_dot[4]*h[2]); h[4] *= expfac; } } domain->yz = h[3]; domain->xz = h[4]; domain->xy = h[5]; - // tilt factor to cell length ratio can not exceed TILTMAX - // in one step + // tilt factor to cell length ratio can not exceed TILTMAX in one step if (domain->yz < -TILTMAX*domain->yprd || domain->yz > TILTMAX*domain->yprd || domain->xz < -TILTMAX*domain->xprd || domain->xz > TILTMAX*domain->xprd || domain->xy < -TILTMAX*domain->xprd || domain->xy > TILTMAX*domain->xprd) error->all(FLERR,"Fix npt/nph has tilted box too far in one step - " "periodic cell is too far from equilibrium state"); domain->set_global_box(); domain->set_local_box(); // convert pertinent atoms and rigid bodies back to box coords if (allremap) domain->lamda2x(nlocal); else { for (i = 0; i < nlocal; i++) if (mask[i] & groupbit) domain->lamda2x(x[i],x[i]); } if (nrigid) for (i = 0; i < nrigid; i++) modify->fix[rfix[i]]->deform(1); } /* ---------------------------------------------------------------------- pack entire state of Fix into one write ------------------------------------------------------------------------- */ void FixNH::write_restart(FILE *fp) { int nsize = size_restart_global(); double *list; memory->create(list,nsize,"nh:list"); int n = pack_restart_data(list); if (comm->me == 0) { int size = nsize * sizeof(double); fwrite(&size,sizeof(int),1,fp); fwrite(list,sizeof(double),nsize,fp); } memory->destroy(list); } /* ---------------------------------------------------------------------- calculate the number of data to be packed ------------------------------------------------------------------------- */ int FixNH::size_restart_global() { int nsize = 2; if (tstat_flag) nsize += 1 + 2*mtchain; if (pstat_flag) { nsize += 16 + 2*mpchain; if (deviatoric_flag) nsize += 6; } return nsize; } /* ---------------------------------------------------------------------- pack restart data ------------------------------------------------------------------------- */ int FixNH::pack_restart_data(double *list) { int n = 0; list[n++] = tstat_flag; if (tstat_flag) { list[n++] = mtchain; for (int ich = 0; ich < mtchain; ich++) list[n++] = eta[ich]; for (int ich = 0; ich < mtchain; ich++) list[n++] = eta_dot[ich]; } list[n++] = pstat_flag; if (pstat_flag) { list[n++] = omega[0]; list[n++] = omega[1]; list[n++] = omega[2]; list[n++] = omega[3]; list[n++] = omega[4]; list[n++] = omega[5]; list[n++] = omega_dot[0]; list[n++] = omega_dot[1]; list[n++] = omega_dot[2]; list[n++] = omega_dot[3]; list[n++] = omega_dot[4]; list[n++] = omega_dot[5]; list[n++] = vol0; list[n++] = t0; list[n++] = mpchain; if (mpchain) { for (int ich = 0; ich < mpchain; ich++) list[n++] = etap[ich]; for (int ich = 0; ich < mpchain; ich++) list[n++] = etap_dot[ich]; } list[n++] = deviatoric_flag; if (deviatoric_flag) { list[n++] = h0_inv[0]; list[n++] = h0_inv[1]; list[n++] = h0_inv[2]; list[n++] = h0_inv[3]; list[n++] = h0_inv[4]; list[n++] = h0_inv[5]; } } return n; } /* ---------------------------------------------------------------------- use state info from restart file to restart the Fix ------------------------------------------------------------------------- */ void FixNH::restart(char *buf) { int n = 0; double *list = (double *) buf; int flag = static_cast<int> (list[n++]); if (flag) { int m = static_cast<int> (list[n++]); if (tstat_flag && m == mtchain) { for (int ich = 0; ich < mtchain; ich++) eta[ich] = list[n++]; for (int ich = 0; ich < mtchain; ich++) eta_dot[ich] = list[n++]; } else n += 2*m; } flag = static_cast<int> (list[n++]); if (flag) { omega[0] = list[n++]; omega[1] = list[n++]; omega[2] = list[n++]; omega[3] = list[n++]; omega[4] = list[n++]; omega[5] = list[n++]; omega_dot[0] = list[n++]; omega_dot[1] = list[n++]; omega_dot[2] = list[n++]; omega_dot[3] = list[n++]; omega_dot[4] = list[n++]; omega_dot[5] = list[n++]; vol0 = list[n++]; t0 = list[n++]; int m = static_cast<int> (list[n++]); if (pstat_flag && m == mpchain) { for (int ich = 0; ich < mpchain; ich++) etap[ich] = list[n++]; for (int ich = 0; ich < mpchain; ich++) etap_dot[ich] = list[n++]; } else n+=2*m; flag = static_cast<int> (list[n++]); if (flag) { h0_inv[0] = list[n++]; h0_inv[1] = list[n++]; h0_inv[2] = list[n++]; h0_inv[3] = list[n++]; h0_inv[4] = list[n++]; h0_inv[5] = list[n++]; } } } /* ---------------------------------------------------------------------- */ int FixNH::modify_param(int narg, char **arg) { if (strcmp(arg[0],"temp") == 0) { if (narg < 2) error->all(FLERR,"Illegal fix_modify command"); if (tflag) { modify->delete_compute(id_temp); tflag = 0; } delete [] id_temp; int n = strlen(arg[1]) + 1; id_temp = new char[n]; strcpy(id_temp,arg[1]); int icompute = modify->find_compute(arg[1]); if (icompute < 0) error->all(FLERR,"Could not find fix_modify temperature ID"); temperature = modify->compute[icompute]; if (temperature->tempflag == 0) error->all(FLERR,"Fix_modify temperature ID does not compute temperature"); if (temperature->igroup != 0 && comm->me == 0) error->warning(FLERR,"Temperature for fix modify is not for group all"); // reset id_temp of pressure to new temperature ID if (pstat_flag) { icompute = modify->find_compute(id_press); if (icompute < 0) error->all(FLERR,"Pressure ID for fix modify does not exist"); modify->compute[icompute]->reset_extra_compute_fix(id_temp); } return 2; } else if (strcmp(arg[0],"press") == 0) { if (narg < 2) error->all(FLERR,"Illegal fix_modify command"); if (!pstat_flag) error->all(FLERR,"Illegal fix_modify command"); if (pflag) { modify->delete_compute(id_press); pflag = 0; } delete [] id_press; int n = strlen(arg[1]) + 1; id_press = new char[n]; strcpy(id_press,arg[1]); int icompute = modify->find_compute(arg[1]); if (icompute < 0) error->all(FLERR,"Could not find fix_modify pressure ID"); pressure = modify->compute[icompute]; if (pressure->pressflag == 0) error->all(FLERR,"Fix_modify pressure ID does not compute pressure"); return 2; } return 0; } /* ---------------------------------------------------------------------- */ double FixNH::compute_scalar() { int i; double volume; double energy; double kt = boltz * t_target; double lkt_press = kt; int ich; if (dimension == 3) volume = domain->xprd * domain->yprd * domain->zprd; else volume = domain->xprd * domain->yprd; energy = 0.0; // thermostat chain energy is equivalent to Eq. (2) in // Martyna, Tuckerman, Tobias, Klein, Mol Phys, 87, 1117 // Sum(0.5*p_eta_k^2/Q_k,k=1,M) + L*k*T*eta_1 + Sum(k*T*eta_k,k=2,M), // where L = tdof // M = mtchain // p_eta_k = Q_k*eta_dot[k-1] // Q_1 = L*k*T/t_freq^2 // Q_k = k*T/t_freq^2, k > 1 if (tstat_flag) { energy += ke_target * eta[0] + 0.5*eta_mass[0]*eta_dot[0]*eta_dot[0]; for (ich = 1; ich < mtchain; ich++) energy += kt * eta[ich] + 0.5*eta_mass[ich]*eta_dot[ich]*eta_dot[ich]; } // barostat energy is equivalent to Eq. (8) in // Martyna, Tuckerman, Tobias, Klein, Mol Phys, 87, 1117 // Sum(0.5*p_omega^2/W + P*V), // where N = natoms // p_omega = W*omega_dot // W = N*k*T/p_freq^2 // sum is over barostatted dimensions if (pstat_flag) { for (i = 0; i < 3; i++) if (p_flag[i]) energy += 0.5*omega_dot[i]*omega_dot[i]*omega_mass[i] + p_hydro*(volume-vol0) / (pdim*nktv2p); if (pstyle == TRICLINIC) { for (i = 3; i < 6; i++) if (p_flag[i]) energy += 0.5*omega_dot[i]*omega_dot[i]*omega_mass[i]; } // extra contributions from thermostat chain for barostat if (mpchain) { energy += lkt_press * etap[0] + 0.5*etap_mass[0]*etap_dot[0]*etap_dot[0]; for (ich = 1; ich < mpchain; ich++) energy += kt * etap[ich] + 0.5*etap_mass[ich]*etap_dot[ich]*etap_dot[ich]; } // extra contribution from strain energy if (deviatoric_flag) energy += compute_strain_energy(); } return energy; } /* ---------------------------------------------------------------------- return a single element of the following vectors, in this order: eta[tchain], eta_dot[tchain], omega[ndof], omega_dot[ndof] etap[pchain], etap_dot[pchain], PE_eta[tchain], KE_eta_dot[tchain] PE_omega[ndof], KE_omega_dot[ndof], PE_etap[pchain], KE_etap_dot[pchain] PE_strain[1] if no thermostat exists, related quantities are omitted from the list if no barostat exists, related quantities are omitted from the list ndof = 1,3,6 degrees of freedom for pstyle = ISO,ANISO,TRI ------------------------------------------------------------------------- */ double FixNH::compute_vector(int n) { int ilen; if (tstat_flag) { ilen = mtchain; if (n < ilen) return eta[n]; n -= ilen; ilen = mtchain; if (n < ilen) return eta_dot[n]; n -= ilen; } if (pstat_flag) { if (pstyle == ISO) { ilen = 1; if (n < ilen) return omega[n]; n -= ilen; } else if (pstyle == ANISO) { ilen = 3; if (n < ilen) return omega[n]; n -= ilen; } else { ilen = 6; if (n < ilen) return omega[n]; n -= ilen; } if (pstyle == ISO) { ilen = 1; if (n < ilen) return omega_dot[n]; n -= ilen; } else if (pstyle == ANISO) { ilen = 3; if (n < ilen) return omega_dot[n]; n -= ilen; } else { ilen = 6; if (n < ilen) return omega_dot[n]; n -= ilen; } if (mpchain) { ilen = mpchain; if (n < ilen) return etap[n]; n -= ilen; ilen = mpchain; if (n < ilen) return etap_dot[n]; n -= ilen; } } double volume; double kt = boltz * t_target; double lkt_press = kt; int ich; if (dimension == 3) volume = domain->xprd * domain->yprd * domain->zprd; else volume = domain->xprd * domain->yprd; if (tstat_flag) { ilen = mtchain; if (n < ilen) { ich = n; if (ich == 0) return ke_target * eta[0]; else return kt * eta[ich]; } n -= ilen; ilen = mtchain; if (n < ilen) { ich = n; if (ich == 0) return 0.5*eta_mass[0]*eta_dot[0]*eta_dot[0]; else return 0.5*eta_mass[ich]*eta_dot[ich]*eta_dot[ich]; } n -= ilen; } if (pstat_flag) { if (pstyle == ISO) { ilen = 1; if (n < ilen) return p_hydro*(volume-vol0) / nktv2p; n -= ilen; } else if (pstyle == ANISO) { ilen = 3; if (n < ilen) if (p_flag[n]) return p_hydro*(volume-vol0) / (pdim*nktv2p); else return 0.0; n -= ilen; } else { ilen = 6; if (n < ilen) if (n > 2) return 0.0; else if (p_flag[n]) return p_hydro*(volume-vol0) / (pdim*nktv2p); else return 0.0; n -= ilen; } if (pstyle == ISO) { ilen = 1; if (n < ilen) return pdim*0.5*omega_dot[n]*omega_dot[n]*omega_mass[n]; n -= ilen; } else if (pstyle == ANISO) { ilen = 3; if (n < ilen) if (p_flag[n]) return 0.5*omega_dot[n]*omega_dot[n]*omega_mass[n]; else return 0.0; n -= ilen; } else { ilen = 6; if (n < ilen) if (p_flag[n]) return 0.5*omega_dot[n]*omega_dot[n]*omega_mass[n]; else return 0.0; n -= ilen; } if (mpchain) { ilen = mpchain; if (n < ilen) { ich = n; if (ich == 0) return lkt_press * etap[0]; else return kt * etap[ich]; } n -= ilen; ilen = mpchain; if (n < ilen) { ich = n; if (ich == 0) return 0.5*etap_mass[0]*etap_dot[0]*etap_dot[0]; else return 0.5*etap_mass[ich]*etap_dot[ich]*etap_dot[ich]; } n -= ilen; } if (deviatoric_flag) { ilen = 1; if (n < ilen) return compute_strain_energy(); n -= ilen; } } return 0.0; } /* ---------------------------------------------------------------------- */ void FixNH::reset_target(double t_new) { t_start = t_stop = t_new; } /* ---------------------------------------------------------------------- */ void FixNH::reset_dt() { dtv = update->dt; dtf = 0.5 * update->dt * force->ftm2v; dthalf = 0.5 * update->dt; dt4 = 0.25 * update->dt; dt8 = 0.125 * update->dt; dto = dthalf; // If using respa, then remap is performed in innermost level if (strstr(update->integrate_style,"respa")) dto = 0.5*step_respa[0]; if (pstat_flag) pdrag_factor = 1.0 - (update->dt * p_freq_max * drag / nc_pchain); if (tstat_flag) tdrag_factor = 1.0 - (update->dt * t_freq * drag / nc_tchain); } /* ---------------------------------------------------------------------- perform half-step update of chain thermostat variables ------------------------------------------------------------------------- */ void FixNH::nhc_temp_integrate() { int ich; double expfac; double kecurrent = tdof * boltz * t_current; // Update masses, to preserve initial freq, if flag set if (eta_mass_flag) { eta_mass[0] = tdof * boltz * t_target / (t_freq*t_freq); for (int ich = 1; ich < mtchain; ich++) eta_mass[ich] = boltz * t_target / (t_freq*t_freq); } if (eta_mass[0] > 0.0) eta_dotdot[0] = (kecurrent - ke_target)/eta_mass[0]; else eta_dotdot[0] = 0.0; double ncfac = 1.0/nc_tchain; for (int iloop = 0; iloop < nc_tchain; iloop++) { for (ich = mtchain-1; ich > 0; ich--) { expfac = exp(-ncfac*dt8*eta_dot[ich+1]); eta_dot[ich] *= expfac; eta_dot[ich] += eta_dotdot[ich] * ncfac*dt4; eta_dot[ich] *= tdrag_factor; eta_dot[ich] *= expfac; } expfac = exp(-ncfac*dt8*eta_dot[1]); eta_dot[0] *= expfac; eta_dot[0] += eta_dotdot[0] * ncfac*dt4; eta_dot[0] *= tdrag_factor; eta_dot[0] *= expfac; factor_eta = exp(-ncfac*dthalf*eta_dot[0]); nh_v_temp(); // rescale temperature due to velocity scaling // should not be necessary to explicitly recompute the temperature t_current *= factor_eta*factor_eta; kecurrent = tdof * boltz * t_current; if (eta_mass[0] > 0.0) eta_dotdot[0] = (kecurrent - ke_target)/eta_mass[0]; else eta_dotdot[0] = 0.0; for (ich = 0; ich < mtchain; ich++) eta[ich] += ncfac*dthalf*eta_dot[ich]; eta_dot[0] *= expfac; eta_dot[0] += eta_dotdot[0] * ncfac*dt4; eta_dot[0] *= expfac; for (ich = 1; ich < mtchain; ich++) { expfac = exp(-ncfac*dt8*eta_dot[ich+1]); eta_dot[ich] *= expfac; eta_dotdot[ich] = (eta_mass[ich-1]*eta_dot[ich-1]*eta_dot[ich-1] - boltz * t_target)/eta_mass[ich]; eta_dot[ich] += eta_dotdot[ich] * ncfac*dt4; eta_dot[ich] *= expfac; } } } /* ---------------------------------------------------------------------- perform half-step update of chain thermostat variables for barostat scale barostat velocities ------------------------------------------------------------------------- */ void FixNH::nhc_press_integrate() { int ich,i; double expfac,factor_etap,kecurrent; double kt = boltz * t_target; double lkt_press = kt; // Update masses, to preserve initial freq, if flag set if (omega_mass_flag) { double nkt = atom->natoms * kt; for (int i = 0; i < 3; i++) if (p_flag[i]) omega_mass[i] = nkt/(p_freq[i]*p_freq[i]); if (pstyle == TRICLINIC) { for (int i = 3; i < 6; i++) if (p_flag[i]) omega_mass[i] = nkt/(p_freq[i]*p_freq[i]); } } if (etap_mass_flag) { if (mpchain) { etap_mass[0] = boltz * t_target / (p_freq_max*p_freq_max); for (int ich = 1; ich < mpchain; ich++) etap_mass[ich] = boltz * t_target / (p_freq_max*p_freq_max); for (int ich = 1; ich < mpchain; ich++) etap_dotdot[ich] = (etap_mass[ich-1]*etap_dot[ich-1]*etap_dot[ich-1] - boltz * t_target) / etap_mass[ich]; } } kecurrent = 0.0; for (i = 0; i < 3; i++) if (p_flag[i]) kecurrent += omega_mass[i]*omega_dot[i]*omega_dot[i]; if (pstyle == TRICLINIC) { for (i = 3; i < 6; i++) if (p_flag[i]) kecurrent += omega_mass[i]*omega_dot[i]*omega_dot[i]; } etap_dotdot[0] = (kecurrent - lkt_press)/etap_mass[0]; double ncfac = 1.0/nc_pchain; for (int iloop = 0; iloop < nc_pchain; iloop++) { for (ich = mpchain-1; ich > 0; ich--) { expfac = exp(-ncfac*dt8*etap_dot[ich+1]); etap_dot[ich] *= expfac; etap_dot[ich] += etap_dotdot[ich] * ncfac*dt4; etap_dot[ich] *= pdrag_factor; etap_dot[ich] *= expfac; } expfac = exp(-ncfac*dt8*etap_dot[1]); etap_dot[0] *= expfac; etap_dot[0] += etap_dotdot[0] * ncfac*dt4; etap_dot[0] *= pdrag_factor; etap_dot[0] *= expfac; for (ich = 0; ich < mpchain; ich++) etap[ich] += ncfac*dthalf*etap_dot[ich]; factor_etap = exp(-ncfac*dthalf*etap_dot[0]); for (i = 0; i < 3; i++) if (p_flag[i]) omega_dot[i] *= factor_etap; if (pstyle == TRICLINIC) { for (i = 3; i < 6; i++) if (p_flag[i]) omega_dot[i] *= factor_etap; } kecurrent = 0.0; for (i = 0; i < 3; i++) if (p_flag[i]) kecurrent += omega_mass[i]*omega_dot[i]*omega_dot[i]; if (pstyle == TRICLINIC) { for (i = 3; i < 6; i++) if (p_flag[i]) kecurrent += omega_mass[i]*omega_dot[i]*omega_dot[i]; } etap_dotdot[0] = (kecurrent - lkt_press)/etap_mass[0]; etap_dot[0] *= expfac; etap_dot[0] += etap_dotdot[0] * ncfac*dt4; etap_dot[0] *= expfac; for (ich = 1; ich < mpchain; ich++) { expfac = exp(-ncfac*dt8*etap_dot[ich+1]); etap_dot[ich] *= expfac; etap_dotdot[ich] = (etap_mass[ich-1]*etap_dot[ich-1]*etap_dot[ich-1] - boltz*t_target) / etap_mass[ich]; etap_dot[ich] += etap_dotdot[ich] * ncfac*dt4; etap_dot[ich] *= expfac; } } } /* ---------------------------------------------------------------------- perform half-step barostat scaling of velocities -----------------------------------------------------------------------*/ void FixNH::nh_v_press() { double factor[3]; double **v = atom->v; int *mask = atom->mask; int nlocal = atom->nlocal; if (igroup == atom->firstgroup) nlocal = atom->nfirst; factor[0] = exp(-dt4*(omega_dot[0]+mtk_term2)); factor[1] = exp(-dt4*(omega_dot[1]+mtk_term2)); factor[2] = exp(-dt4*(omega_dot[2]+mtk_term2)); if (which == NOBIAS) { for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { v[i][0] *= factor[0]; v[i][1] *= factor[1]; v[i][2] *= factor[2]; if (pstyle == TRICLINIC) { v[i][0] += -dthalf*(v[i][1]*omega_dot[5] + v[i][2]*omega_dot[4]); v[i][1] += -dthalf*v[i][2]*omega_dot[3]; } v[i][0] *= factor[0]; v[i][1] *= factor[1]; v[i][2] *= factor[2]; } } } else if (which == BIAS) { for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { temperature->remove_bias(i,v[i]); v[i][0] *= factor[0]; v[i][1] *= factor[1]; v[i][2] *= factor[2]; if (pstyle == TRICLINIC) { v[i][0] += -dthalf*(v[i][1]*omega_dot[5] + v[i][2]*omega_dot[4]); v[i][1] += -dthalf*v[i][2]*omega_dot[3]; } v[i][0] *= factor[0]; v[i][1] *= factor[1]; v[i][2] *= factor[2]; temperature->restore_bias(i,v[i]); } } } } /* ---------------------------------------------------------------------- perform half-step update of velocities -----------------------------------------------------------------------*/ void FixNH::nve_v() { double dtfm; double **v = atom->v; double **f = atom->f; double *rmass = atom->rmass; double *mass = atom->mass; int *type = atom->type; int *mask = atom->mask; int nlocal = atom->nlocal; if (igroup == atom->firstgroup) nlocal = atom->nfirst; if (rmass) { for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { dtfm = dtf / rmass[i]; v[i][0] += dtfm*f[i][0]; v[i][1] += dtfm*f[i][1]; v[i][2] += dtfm*f[i][2]; } } } else { for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { dtfm = dtf / mass[type[i]]; v[i][0] += dtfm*f[i][0]; v[i][1] += dtfm*f[i][1]; v[i][2] += dtfm*f[i][2]; } } } } /* ---------------------------------------------------------------------- perform full-step update of positions -----------------------------------------------------------------------*/ void FixNH::nve_x() { double **x = atom->x; double **v = atom->v; int *mask = atom->mask; int nlocal = atom->nlocal; if (igroup == atom->firstgroup) nlocal = atom->nfirst; // x update by full step only for atoms in group for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { x[i][0] += dtv * v[i][0]; x[i][1] += dtv * v[i][1]; x[i][2] += dtv * v[i][2]; } } } /* ---------------------------------------------------------------------- perform half-step thermostat scaling of velocities -----------------------------------------------------------------------*/ void FixNH::nh_v_temp() { double **v = atom->v; int *mask = atom->mask; int nlocal = atom->nlocal; if (igroup == atom->firstgroup) nlocal = atom->nfirst; if (which == NOBIAS) { for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { v[i][0] *= factor_eta; v[i][1] *= factor_eta; v[i][2] *= factor_eta; } } } else if (which == BIAS) { for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { temperature->remove_bias(i,v[i]); v[i][0] *= factor_eta; v[i][1] *= factor_eta; v[i][2] *= factor_eta; temperature->restore_bias(i,v[i]); } } } } /* ---------------------------------------------------------------------- compute sigma tensor needed whenever p_target or h0_inv changes -----------------------------------------------------------------------*/ void FixNH::compute_sigma() { // if nreset_h0 > 0, reset vol0 and h0_inv // every nreset_h0 timesteps if (nreset_h0 > 0) { int delta = update->ntimestep - update->beginstep; if (delta % nreset_h0 == 0) { if (dimension == 3) vol0 = domain->xprd * domain->yprd * domain->zprd; else vol0 = domain->xprd * domain->yprd; h0_inv[0] = domain->h_inv[0]; h0_inv[1] = domain->h_inv[1]; h0_inv[2] = domain->h_inv[2]; h0_inv[3] = domain->h_inv[3]; h0_inv[4] = domain->h_inv[4]; h0_inv[5] = domain->h_inv[5]; } } // generate upper-triangular half of // sigma = vol0*h0inv*(p_target-p_hydro)*h0inv^t // units of sigma are are PV/L^2 e.g. atm.A // // [ 0 5 4 ] [ 0 5 4 ] [ 0 5 4 ] [ 0 - - ] // [ 5 1 3 ] = [ - 1 3 ] [ 5 1 3 ] [ 5 1 - ] // [ 4 3 2 ] [ - - 2 ] [ 4 3 2 ] [ 4 3 2 ] sigma[0] = vol0*(h0_inv[0]*((p_target[0]-p_hydro)*h0_inv[0] + p_target[5]*h0_inv[5]+p_target[4]*h0_inv[4]) + h0_inv[5]*(p_target[5]*h0_inv[0] + (p_target[1]-p_hydro)*h0_inv[5]+p_target[3]*h0_inv[4]) + h0_inv[4]*(p_target[4]*h0_inv[0]+p_target[3]*h0_inv[5] + (p_target[2]-p_hydro)*h0_inv[4])); sigma[1] = vol0*(h0_inv[1]*((p_target[1]-p_hydro)*h0_inv[1] + p_target[3]*h0_inv[3]) + h0_inv[3]*(p_target[3]*h0_inv[1] + (p_target[2]-p_hydro)*h0_inv[3])); sigma[2] = vol0*(h0_inv[2]*((p_target[2]-p_hydro)*h0_inv[2])); sigma[3] = vol0*(h0_inv[1]*(p_target[3]*h0_inv[2]) + h0_inv[3]*((p_target[2]-p_hydro)*h0_inv[2])); sigma[4] = vol0*(h0_inv[0]*(p_target[4]*h0_inv[2]) + h0_inv[5]*(p_target[3]*h0_inv[2]) + h0_inv[4]*((p_target[2]-p_hydro)*h0_inv[2])); sigma[5] = vol0*(h0_inv[0]*(p_target[5]*h0_inv[1]+p_target[4]*h0_inv[3]) + h0_inv[5]*((p_target[1]-p_hydro)*h0_inv[1]+p_target[3]*h0_inv[3]) + h0_inv[4]*(p_target[3]*h0_inv[1]+(p_target[2]-p_hydro)*h0_inv[3])); } /* ---------------------------------------------------------------------- compute strain energy -----------------------------------------------------------------------*/ double FixNH::compute_strain_energy() { // compute strain energy = 0.5*Tr(sigma*h*h^t) in energy units double* h = domain->h; double d0,d1,d2; d0 = sigma[0]*(h[0]*h[0]+h[5]*h[5]+h[4]*h[4]) + sigma[5]*( h[1]*h[5]+h[3]*h[4]) + sigma[4]*( h[2]*h[4]); d1 = sigma[5]*( h[5]*h[1]+h[4]*h[3]) + sigma[1]*( h[1]*h[1]+h[3]*h[3]) + sigma[3]*( h[2]*h[3]); d2 = sigma[4]*( h[4]*h[2]) + sigma[3]*( h[3]*h[2]) + sigma[2]*( h[2]*h[2]); double energy = 0.5*(d0+d1+d2)/nktv2p; return energy; } /* ---------------------------------------------------------------------- compute deviatoric barostat force = h*sigma*h^t -----------------------------------------------------------------------*/ void FixNH::compute_deviatoric() { // generate upper-triangular part of h*sigma*h^t // units of fdev are are PV, e.g. atm*A^3 // [ 0 5 4 ] [ 0 5 4 ] [ 0 5 4 ] [ 0 - - ] // [ 5 1 3 ] = [ - 1 3 ] [ 5 1 3 ] [ 5 1 - ] // [ 4 3 2 ] [ - - 2 ] [ 4 3 2 ] [ 4 3 2 ] double* h = domain->h; fdev[0] = h[0]*(sigma[0]*h[0]+sigma[5]*h[5]+sigma[4]*h[4]) + h[5]*(sigma[5]*h[0]+sigma[1]*h[5]+sigma[3]*h[4]) + h[4]*(sigma[4]*h[0]+sigma[3]*h[5]+sigma[2]*h[4]); fdev[1] = h[1]*( sigma[1]*h[1]+sigma[3]*h[3]) + h[3]*( sigma[3]*h[1]+sigma[2]*h[3]); fdev[2] = h[2]*( sigma[2]*h[2]); fdev[3] = h[1]*( sigma[3]*h[2]) + h[3]*( sigma[2]*h[2]); fdev[4] = h[0]*( sigma[4]*h[2]) + h[5]*( sigma[3]*h[2]) + h[4]*( sigma[2]*h[2]); fdev[5] = h[0]*( sigma[5]*h[1]+sigma[4]*h[3]) + h[5]*( sigma[1]*h[1]+sigma[3]*h[3]) + h[4]*( sigma[3]*h[1]+sigma[2]*h[3]); } /* ---------------------------------------------------------------------- compute target temperature and kinetic energy -----------------------------------------------------------------------*/ void FixNH::compute_temp_target() { double delta = update->ntimestep - update->beginstep; if (update->endstep > update->beginstep) delta /= update->endstep - update->beginstep; else delta = 0.0; t_target = t_start + delta * (t_stop-t_start); ke_target = tdof * boltz * t_target; } /* ---------------------------------------------------------------------- compute hydrostatic target pressure -----------------------------------------------------------------------*/ void FixNH::compute_press_target() { double delta = update->ntimestep - update->beginstep; if (update->endstep > update->beginstep) delta /= update->endstep - update->beginstep; else delta = 0.0; p_hydro = 0.0; for (int i = 0; i < 3; i++) if (p_flag[i]) { p_target[i] = p_start[i] + delta * (p_stop[i]-p_start[i]); p_hydro += p_target[i]; } p_hydro /= pdim; if (pstyle == TRICLINIC) for (int i = 3; i < 6; i++) p_target[i] = p_start[i] + delta * (p_stop[i]-p_start[i]); // if deviatoric, recompute sigma each time p_target changes if (deviatoric_flag) compute_sigma(); } /* ---------------------------------------------------------------------- update omega_dot, omega -----------------------------------------------------------------------*/ void FixNH::nh_omega_dot() { double f_omega,volume; if (dimension == 3) volume = domain->xprd*domain->yprd*domain->zprd; else volume = domain->xprd*domain->yprd; if (deviatoric_flag) compute_deviatoric(); mtk_term1 = 0.0; if (mtk_flag) if (pstyle == ISO) { mtk_term1 = tdof * boltz * t_current; mtk_term1 /= pdim * atom->natoms; } else { double *mvv_current = temperature->vector; for (int i = 0; i < 3; i++) if (p_flag[i]) mtk_term1 += mvv_current[i]; mtk_term1 /= pdim * atom->natoms; } for (int i = 0; i < 3; i++) if (p_flag[i]) { f_omega = (p_current[i]-p_hydro)*volume / (omega_mass[i] * nktv2p) + mtk_term1 / omega_mass[i]; if (deviatoric_flag) f_omega -= fdev[i]/(omega_mass[i] * nktv2p); omega_dot[i] += f_omega*dthalf; omega_dot[i] *= pdrag_factor; } mtk_term2 = 0.0; if (mtk_flag) { for (int i = 0; i < 3; i++) if (p_flag[i]) mtk_term2 += omega_dot[i]; mtk_term2 /= pdim * atom->natoms; } if (pstyle == TRICLINIC) { for (int i = 3; i < 6; i++) { if (p_flag[i]) { f_omega = p_current[i]*volume/(omega_mass[i] * nktv2p); if (deviatoric_flag) f_omega -= fdev[i]/(omega_mass[i] * nktv2p); omega_dot[i] += f_omega*dthalf; omega_dot[i] *= pdrag_factor; } } } } /* ---------------------------------------------------------------------- if any tilt ratios exceed 0.5, set flip = 1 & compute new tilt_flip values do not flip in x or y if non-periodic when yz flips and xy is non-zero, xz must also change this is to keep the edge vectors of the flipped shape matrix an integer combination of the edge vectors of the unflipped shape matrix perform irregular on atoms in lamda coords to get atoms to new procs ------------------------------------------------------------------------- */ void FixNH::pre_exchange() { double xprd = domain->xprd; double yprd = domain->yprd; // flip is triggered when tilt exceeds 0.5 by an amount DELTAFLIP // this avoids immediate re-flipping due to tilt oscillations double xtiltmax = (0.5+DELTAFLIP)*xprd; double ytiltmax = (0.5+DELTAFLIP)*yprd; int flip = 0; if (domain->yperiodic) { if (domain->yz < -ytiltmax) { flip = 1; domain->yz += yprd; domain->xz += domain->xy; } else if (domain->yz >= ytiltmax) { flip = 1; domain->yz -= yprd; domain->xz -= domain->xy; } } if (domain->xperiodic) { if (domain->xz < -xtiltmax) { flip = 1; domain->xz += xprd; } else if (domain->xz >= xtiltmax) { flip = 1; domain->xz -= xprd; } if (domain->xy < -xtiltmax) { flip = 1; domain->xy += xprd; } else if (domain->xy >= xtiltmax) { flip = 1; domain->xy -= xprd; } } if (flip) { domain->set_global_box(); domain->set_local_box(); double **x = atom->x; int *image = atom->image; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) domain->remap(x[i],image[i]); domain->x2lamda(atom->nlocal); irregular->migrate_atoms(); domain->lamda2x(atom->nlocal); } } diff --git a/src/fix_nh.h b/src/fix_nh.h index dd216b356..91ae395dc 100644 --- a/src/fix_nh.h +++ b/src/fix_nh.h @@ -1,247 +1,247 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_FIX_NH_H #define LMP_FIX_NH_H #include "fix.h" namespace LAMMPS_NS { class FixNH : public Fix { public: FixNH(class LAMMPS *, int, char **); virtual ~FixNH(); int setmask(); virtual void init(); virtual void setup(int); virtual void initial_integrate(int); virtual void final_integrate(); void initial_integrate_respa(int, int, int); void final_integrate_respa(int, int); void pre_exchange(); double compute_scalar(); virtual double compute_vector(int); void write_restart(FILE *); virtual int pack_restart_data(double *); // pack restart data virtual void restart(char *); int modify_param(int, char **); void reset_target(double); void reset_dt(); protected: int dimension,which; double dtv,dtf,dthalf,dt4,dt8,dto; double boltz,nktv2p,tdof; double vol0; // reference volume double t0; // reference temperature // used for barostat mass - double t_start,t_stop; double t_current,t_target,ke_target; double t_freq; int tstat_flag; // 1 if control T int pstat_flag; // 1 if control P int pstyle,pcouple,allremap; int p_flag[6]; // 1 if control P on this dim, 0 if not double p_start[6],p_stop[6]; double p_freq[6],p_target[6]; double omega[6],omega_dot[6]; double omega_mass[6]; double p_current[6]; double drag,tdrag_factor; // drag factor on particle thermostat double pdrag_factor; // drag factor on barostat int kspace_flag; // 1 if KSpace invoked, 0 if not int nrigid; // number of rigid fixes int *rfix; // indices of rigid fixes class Irregular *irregular; // for migrating atoms after box flips int nlevels_respa; double *step_respa; char *id_temp,*id_press; class Compute *temperature,*pressure; int tflag,pflag; double *eta,*eta_dot; // chain thermostat for particles double *eta_dotdot; double *eta_mass; int mtchain; // length of chain int mtchain_default_flag; // 1 = mtchain is default double *etap; // chain thermostat for barostat double *etap_dot; double *etap_dotdot; double *etap_mass; int mpchain; // length of chain int mtk_flag; // 0 if using Hoover barostat int pdim; // number of barostatted dims double p_freq_max; // maximum barostat frequency double p_hydro; // hydrostatic target pressure int nc_tchain,nc_pchain; double factor_eta; double sigma[6]; // scaled target stress double fdev[6]; // deviatoric force on barostat int deviatoric_flag; // 0 if target stress tensor is hydrostatic double h0_inv[6]; // h_inv of reference (zero strain) box int nreset_h0; // interval for resetting h0 double mtk_term1,mtk_term2; // Martyna-Tobias-Klein corrections int eta_mass_flag; // 1 if eta_mass updated, 0 if not. int omega_mass_flag; // 1 if omega_mass updated, 0 if not. int etap_mass_flag; // 1 if etap_mass updated, 0 if not. int scaleyz; // 1 if yz scaled with lz int scalexz; // 1 if xz scaled with lz int scalexy; // 1 if xy scaled with ly void couple(); void remap(); void nhc_temp_integrate(); void nhc_press_integrate(); virtual void nve_x(); // may be overwritten by child classes virtual void nve_v(); virtual void nh_v_press(); virtual void nh_v_temp(); virtual void compute_temp_target(); virtual int size_restart_global(); void compute_sigma(); void compute_deviatoric(); double compute_strain_energy(); void compute_press_target(); void nh_omega_dot(); }; } #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Target temperature for fix nvt/npt/nph cannot be 0.0 Self-explanatory. E: Invalid fix nvt/npt/nph command for a 2d simulation Cannot control z dimension in a 2d model. E: Invalid fix nvt/npt/nph command pressure settings If multiple dimensions are coupled, those dimensions must be specified. E: Cannot use fix nvt/npt/nph on a non-periodic dimension When specifying a diagonal pressure component, the dimension must be periodic. E: Cannot use fix nvt/npt/nph on a 2nd non-periodic dimension When specifying an off-diagonal pressure component, the 2nd of the two dimensions must be periodic. E.g. if the xy component is specified, then the y dimension must be periodic. E: Cannot use fix nvt/npt/nph with yz dynamics when z is non-periodic dimension -UNDOCUMENTED +The 2nd dimension in the barostatted tilt factor must be periodic. E: Cannot use fix nvt/npt/nph with xz dynamics when z is non-periodic dimension -UNDOCUMENTED +The 2nd dimension in the barostatted tilt factor must be periodic. E: Cannot use fix nvt/npt/nph with xy dynamics when y is non-periodic dimension -UNDOCUMENTED +The 2nd dimension in the barostatted tilt factor must be periodic. -E: Cannot use fix nvt/npt/nph withboth yz dynamics and yz scaling +E: Cannot use fix nvt/npt/nph with both yz dynamics and yz scaling -UNDOCUMENTED +Self-explanatory. E: Cannot use fix nvt/npt/nph with both xz dynamics and xz scaling -UNDOCUMENTED +Self-explanatory. E: Cannot use fix nvt/npt/nph with both xy dynamics and xy scaling -UNDOCUMENTED +Self-explanatory. E: Can not specify Pxy/Pxz/Pyz in fix nvt/npt/nph with non-triclinic box Only triclinic boxes can be used with off-diagonal pressure components. See the region prism command for details. E: Invalid fix nvt/npt/nph pressure settings Settings for coupled dimensions must be the same. E: Fix nvt/npt/nph damping parameters must be > 0.0 Self-explanatory. E: Cannot use fix npt and fix deform on same component of stress tensor This would be changing the same box dimension twice. E: Temperature ID for fix nvt/nph/npt does not exist Self-explanatory. E: Pressure ID for fix npt/nph does not exist Self-explanatory. E: Fix npt/nph has tilted box too far in one step - periodic cell is too far from equilibrium state -UNDOCUMENTED +Self-explanatory. The change in the box tilt is too extreme +on a short timescale. E: Could not find fix_modify temperature ID The compute ID for computing temperature does not exist. E: Fix_modify temperature ID does not compute temperature The compute ID assigned to the fix must compute temperature. W: Temperature for fix modify is not for group all The temperature compute is being used with a pressure calculation which does operate on group all, so this may be inconsistent. E: Pressure ID for fix modify does not exist Self-explanatory. E: Could not find fix_modify pressure ID The compute ID for computing pressure does not exist. E: Fix_modify pressure ID does not compute pressure The compute ID assigned to the fix must compute pressure. */ diff --git a/src/fix_nh_sphere.h b/src/fix_nh_sphere.h index d07ab2b5b..50b242256 100644 --- a/src/fix_nh_sphere.h +++ b/src/fix_nh_sphere.h @@ -1,46 +1,46 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_FIX_NH_SPHERE_H #define LMP_FIX_NH_SPHERE_H #include "fix_nh.h" namespace LAMMPS_NS { class FixNHSphere : public FixNH { public: FixNHSphere(class LAMMPS *, int, char **); virtual ~FixNHSphere() {} void init(); protected: void nve_v(); void nh_v_temp(); }; } #endif /* ERROR/WARNING messages: E: Fix nvt/nph/npt sphere requires atom style sphere -UNDOCUMENTED +Self-explanatory. E: Fix nvt/sphere requires extended particles This fix can only be used for particles of a finite size. */ diff --git a/src/fix_nve_sphere.h b/src/fix_nve_sphere.h index 20dbaf71c..ac339ba7e 100644 --- a/src/fix_nve_sphere.h +++ b/src/fix_nve_sphere.h @@ -1,64 +1,64 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(nve/sphere,FixNVESphere) #else #ifndef LMP_FIX_NVE_SPHERE_H #define LMP_FIX_NVE_SPHERE_H #include "fix_nve.h" namespace LAMMPS_NS { class FixNVESphere : public FixNVE { public: FixNVESphere(class LAMMPS *, int, char **); virtual ~FixNVESphere() {} void init(); virtual void initial_integrate(int); virtual void final_integrate(); protected: int extra; }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Fix nve/sphere requires atom style sphere -UNDOCUMENTED +Self-explanatory. E: Fix nve/sphere requires atom attribute mu An atom style with this attribute is needed. E: Fix nve/sphere requires extended particles This fix can only be used for particles of a finite size. */ diff --git a/src/fix_restrain.cpp b/src/fix_restrain.cpp index 723f15628..8c5f2d499 100644 --- a/src/fix_restrain.cpp +++ b/src/fix_restrain.cpp @@ -1,403 +1,403 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- Contributing author: Craig Tenney (University of Notre Dame) ------------------------------------------------------------------------- */ #include "math.h" #include "string.h" #include "stdlib.h" #include "fix_restrain.h" #include "atom.h" #include "force.h" #include "update.h" #include "domain.h" #include "comm.h" #include "respa.h" #include "input.h" #include "math_const.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; using namespace FixConst; using namespace MathConst; enum{DIHEDRAL}; #define TOLERANCE 0.05 /* ---------------------------------------------------------------------- */ FixRestrain::FixRestrain(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { int iarg = 6; if (narg < iarg) error->all(FLERR,"Illegal fix restrain command"); scalar_flag = 1; global_freq = 1; extscalar = 1; time_depend = 1; // parse standard arguments int n_atoms; k_start = force->numeric(arg[3]); k_stop = force->numeric(arg[4]); if (strcmp(arg[5], "dihedral") == 0) { rstyle = DIHEDRAL; n_atoms = 4; } else error->all(FLERR,"Illegal fix restrain command"); n_bonds = (narg - iarg) / (n_atoms + 1); if (narg != iarg + n_bonds * (n_atoms + 1)) error->all(FLERR,"Illegal fix restrain command"); // allocate arrays memory->create(atom_id,n_bonds,n_atoms,"restrain:atom_id"); memory->create(target,n_bonds,"restrain:taret"); // grab atom_ids and restraint target values int ibond = 0; while (iarg < narg) { for (int i = 0; i < n_atoms; i++) { atom_id[ibond][i] = force->inumeric(arg[iarg]); iarg++; } target[ibond] = force->numeric(arg[iarg]); iarg++; ibond++; } // special treatment for dihedral restraints if (rstyle == DIHEDRAL) { cos_shift = (double *) - memory->smalloc(n_bonds * sizeof(double), "restrain:cos_shift"); + memory->smalloc(n_bonds * sizeof(double),"restrain:cos_shift"); sin_shift = (double *) - memory->smalloc(n_bonds * sizeof(double), "restrain:sin_shift"); + memory->smalloc(n_bonds * sizeof(double),"restrain:sin_shift"); for (ibond = 0; ibond < n_bonds; ibond++) { double my_arg = MY_PI * (180.0 + target[ibond]) / 180.0; cos_shift[ibond] = cos(my_arg); sin_shift[ibond] = sin(my_arg); } } // require atom map to lookup atom IDs if (atom->map_style == 0) error->all(FLERR,"Fix restrain requires an atom map, see atom_modify"); } /* ---------------------------------------------------------------------- */ FixRestrain::~FixRestrain() { memory->destroy(atom_id); memory->destroy(target); if (rstyle == DIHEDRAL) { memory->sfree(cos_shift); memory->sfree(sin_shift); } } /* ---------------------------------------------------------------------- */ int FixRestrain::setmask() { int mask = 0; mask |= POST_FORCE; mask |= THERMO_ENERGY; mask |= POST_FORCE_RESPA; mask |= MIN_POST_FORCE; return mask; } /* ---------------------------------------------------------------------- */ void FixRestrain::init() { if (strcmp(update->integrate_style,"respa") == 0) nlevels_respa = ((Respa *) update->integrate)->nlevels; } /* ---------------------------------------------------------------------- */ void FixRestrain::setup(int vflag) { if (strcmp(update->integrate_style,"verlet") == 0) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); } } /* ---------------------------------------------------------------------- */ void FixRestrain::min_setup(int vflag) { post_force(vflag); } /* ---------------------------------------------------------------------- */ void FixRestrain::post_force(int vflag) { energy = 0.0; if (rstyle == DIHEDRAL) restrain_dihedral(); } /* ---------------------------------------------------------------------- */ void FixRestrain::post_force_respa(int vflag, int ilevel, int iloop) { if (ilevel == nlevels_respa-1) post_force(vflag); } /* ---------------------------------------------------------------------- */ void FixRestrain::min_post_force(int vflag) { post_force(vflag); } /* ---------------------------------------------------------------------- apply dihedral restraints adopted from dihedral_charmm ---------------------------------------------------------------------- */ void FixRestrain::restrain_dihedral() { int i1,i2,i3,i4,i,m,n; double vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z,vb2xm,vb2ym,vb2zm; double f1[3],f2[3],f3[3],f4[3]; double ax,ay,az,bx,by,bz,rasq,rbsq,rgsq,rg,rginv,ra2inv,rb2inv,rabinv; double df,df1,ddf1,fg,hg,fga,hgb,gaa,gbb; double dtfx,dtfy,dtfz,dtgx,dtgy,dtgz,dthx,dthy,dthz; double c,s,p,sx2,sy2,sz2; double **x = atom->x; double **f = atom->f; int nlocal = atom->nlocal; int newton_bond = force->newton_bond; double delta = update->ntimestep - update->beginstep; delta /= update->endstep - update->beginstep; double k_step = k_start + delta * (k_stop - k_start); for (n = 0; n < n_bonds; n++) { i1 = atom->map(atom_id[n][0]); i2 = atom->map(atom_id[n][1]); i3 = atom->map(atom_id[n][2]); i4 = atom->map(atom_id[n][3]); // insure exactly one processor computes restraint if (newton_bond) { if (i2 == -1 || i2 >= nlocal) continue; if (i1 == -1 || i3 == -1 || i4 == -1) { char str[128]; sprintf(str, "Restrain atoms %d %d %d %d missing on proc %d at step " BIGINT_FORMAT, atom_id[n][0],atom_id[n][1],atom_id[n][2],atom_id[n][3], comm->me,update->ntimestep); error->one(FLERR,str); } } else { if ((i1 == -1 || i1 >= nlocal) && (i2 == -1 || i2 >= nlocal) && (i3 == -1 || i3 >= nlocal) && (i4 == -1 || i3 >= nlocal)) continue; if (i1 == -1 || i2 == -1 || i3 == -1 || i4 == -1) { char str[128]; sprintf(str, "Restrain atoms %d %d %d %d missing on proc %d at step " BIGINT_FORMAT, atom_id[n][0],atom_id[n][1],atom_id[n][2],atom_id[n][3], comm->me,update->ntimestep); error->one(FLERR,str); } } // 1st bond vb1x = x[i1][0] - x[i2][0]; vb1y = x[i1][1] - x[i2][1]; vb1z = x[i1][2] - x[i2][2]; domain->minimum_image(vb1x,vb1y,vb1z); // 2nd bond vb2x = x[i3][0] - x[i2][0]; vb2y = x[i3][1] - x[i2][1]; vb2z = x[i3][2] - x[i2][2]; domain->minimum_image(vb2x,vb2y,vb2z); vb2xm = -vb2x; vb2ym = -vb2y; vb2zm = -vb2z; domain->minimum_image(vb2xm,vb2ym,vb2zm); // 3rd bond vb3x = x[i4][0] - x[i3][0]; vb3y = x[i4][1] - x[i3][1]; vb3z = x[i4][2] - x[i3][2]; domain->minimum_image(vb3x,vb3y,vb3z); ax = vb1y*vb2zm - vb1z*vb2ym; ay = vb1z*vb2xm - vb1x*vb2zm; az = vb1x*vb2ym - vb1y*vb2xm; bx = vb3y*vb2zm - vb3z*vb2ym; by = vb3z*vb2xm - vb3x*vb2zm; bz = vb3x*vb2ym - vb3y*vb2xm; rasq = ax*ax + ay*ay + az*az; rbsq = bx*bx + by*by + bz*bz; rgsq = vb2xm*vb2xm + vb2ym*vb2ym + vb2zm*vb2zm; rg = sqrt(rgsq); rginv = ra2inv = rb2inv = 0.0; if (rg > 0) rginv = 1.0/rg; if (rasq > 0) ra2inv = 1.0/rasq; if (rbsq > 0) rb2inv = 1.0/rbsq; rabinv = sqrt(ra2inv*rb2inv); c = (ax*bx + ay*by + az*bz)*rabinv; s = rg*rabinv*(ax*vb3x + ay*vb3y + az*vb3z); // error check if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { int me; MPI_Comm_rank(world,&me); if (screen) { char str[128]; sprintf(str,"Restrain problem: %d " BIGINT_FORMAT " %d %d %d %d", me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); error->warning(FLERR,str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", me,x[i2][0],x[i2][1],x[i2][2]); fprintf(screen," 3rd atom: %d %g %g %g\n", me,x[i3][0],x[i3][1],x[i3][2]); fprintf(screen," 4th atom: %d %g %g %g\n", me,x[i4][0],x[i4][1],x[i4][2]); } } if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; m = 1; //multiplicity p = 1.0; df1 = 0.0; for (i = 0; i < m; i++) { ddf1 = p*c - df1*s; df1 = p*s + df1*c; p = ddf1; } p = p*cos_shift[n] + df1*sin_shift[n]; df1 = df1*cos_shift[n] - ddf1*sin_shift[n]; df1 *= -m; p += 1.0; energy = k_step * p; fg = vb1x*vb2xm + vb1y*vb2ym + vb1z*vb2zm; hg = vb3x*vb2xm + vb3y*vb2ym + vb3z*vb2zm; fga = fg*ra2inv*rginv; hgb = hg*rb2inv*rginv; gaa = -ra2inv*rg; gbb = rb2inv*rg; dtfx = gaa*ax; dtfy = gaa*ay; dtfz = gaa*az; dtgx = fga*ax - hgb*bx; dtgy = fga*ay - hgb*by; dtgz = fga*az - hgb*bz; dthx = gbb*bx; dthy = gbb*by; dthz = gbb*bz; df = -k_step * df1; sx2 = df*dtgx; sy2 = df*dtgy; sz2 = df*dtgz; f1[0] = df*dtfx; f1[1] = df*dtfy; f1[2] = df*dtfz; f2[0] = sx2 - f1[0]; f2[1] = sy2 - f1[1]; f2[2] = sz2 - f1[2]; f4[0] = df*dthx; f4[1] = df*dthy; f4[2] = df*dthz; f3[0] = -sx2 - f4[0]; f3[1] = -sy2 - f4[1]; f3[2] = -sz2 - f4[2]; // apply force to each of 4 atoms if (newton_bond || i1 < nlocal) { f[i1][0] += f1[0]; f[i1][1] += f1[1]; f[i1][2] += f1[2]; } if (newton_bond || i2 < nlocal) { f[i2][0] += f2[0]; f[i2][1] += f2[1]; f[i2][2] += f2[2]; } if (newton_bond || i3 < nlocal) { f[i3][0] += f3[0]; f[i3][1] += f3[1]; f[i3][2] += f3[2]; } if (newton_bond || i4 < nlocal) { f[i4][0] += f4[0]; f[i4][1] += f4[1]; f[i4][2] += f4[2]; } } } /* ---------------------------------------------------------------------- potential energy of added force ------------------------------------------------------------------------- */ double FixRestrain::compute_scalar() { MPI_Allreduce(&energy,&energy_all,1,MPI_DOUBLE,MPI_SUM,world); return energy_all; } diff --git a/src/fix_restrain.h b/src/fix_restrain.h index 8c15306c2..260497984 100644 --- a/src/fix_restrain.h +++ b/src/fix_restrain.h @@ -1,75 +1,78 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(restrain,FixRestrain) #else #ifndef LMP_FIX_RESTRAIN_H #define LMP_FIX_RESTRAIN_H #include "fix.h" namespace LAMMPS_NS { class FixRestrain : public Fix { public: FixRestrain(class LAMMPS *, int, char **); ~FixRestrain(); int setmask(); void init(); void setup(int); void min_setup(int); void post_force(int); void post_force_respa(int, int, int); void min_post_force(int); double compute_scalar(); private: int nlevels_respa; int n_bonds, rstyle; double k_start, k_stop, energy, energy_all; int **atom_id; double *target, *cos_shift, *sin_shift; void restrain_dihedral(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Fix restrain requires an atom map, see atom_modify -UNDOCUMENTED +Self-explanatory. E: Restrain atoms %d %d %d %d missing on proc %d at step %ld -UNDOCUMENTED +The 4 atoms in a restrain dihedral specified by the fix restrain +command are not all accessible to a processor. This probably means an +atom has moved too far. W: Restrain problem: %d %ld %d %d %d %d -UNDOCUMENTED +Conformation of the 4 listed dihedral atoms is extreme; you may want +to check your simulation geometry. */ diff --git a/src/fix_rigid.h b/src/fix_rigid.h index 191acbe0d..d0135e586 100644 --- a/src/fix_rigid.h +++ b/src/fix_rigid.h @@ -1,196 +1,196 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(rigid,FixRigid) #else #ifndef LMP_FIX_RIGID_H #define LMP_FIX_RIGID_H #include "fix.h" namespace LAMMPS_NS { class FixRigid : public Fix { public: FixRigid(class LAMMPS *, int, char **); virtual ~FixRigid(); virtual int setmask(); virtual void init(); virtual void setup(int); virtual void initial_integrate(int); void post_force(int); virtual void final_integrate(); void initial_integrate_respa(int, int, int); void final_integrate_respa(int, int); virtual double compute_scalar(); double memory_usage(); void grow_arrays(int); void copy_arrays(int, int); void set_arrays(int); int pack_exchange(int, double *); int unpack_exchange(int, double *); void pre_neighbor(); int dof(int); void deform(int); void reset_dt(); double compute_array(int, int); protected: int me,nprocs; double dtv,dtf,dtq; double *step_respa; int triclinic; double MINUSPI,TWOPI; int nbody; // # of rigid bodies int *nrigid; // # of atoms in each rigid body double *masstotal; // total mass of each rigid body double **xcm; // coords of center-of-mass of each rigid body double **vcm; // velocity of center-of-mass of each double **fcm; // force on center-of-mass of each double **inertia; // 3 principal components of inertia of each double **ex_space,**ey_space,**ez_space; // principal axes of each in space coords double **angmom; // angular momentum of each in space coords double **omega; // angular velocity of each in space coords double **torque; // torque on each rigid body in space coords double **quat; // quaternion of each rigid body int *imagebody; // image flags of xcm of each rigid body double **fflag; // flag for on/off of center-of-mass force double **tflag; // flag for on/off of center-of-mass torque double **langextra; // Langevin thermostat forces and torques int *body; // which body each atom is part of (-1 if none) double **displace; // displacement of each atom in body coords double **sum,**all; // work vectors for each rigid body int **remapflag; // PBC remap flags for each rigid body int extended; // 1 if any particles have extended attributes int orientflag; // 1 if particles store spatial orientation int dorientflag; // 1 if particles store dipole orientation int *eflags; // flags for extended particles double **orient; // orientation vector of particle wrt rigid body double **dorient; // orientation of dipole mu wrt rigid body double tfactor; // scale factor on temperature of rigid bodies int langflag; // 0/1 = no/yes Langevin thermostat int tempflag; // NVT settings double t_start,t_stop; double t_period,t_freq; int t_chain,t_iter,t_order; int pressflag; // NPT settings double p_start,p_stop; double p_period,p_freq; int p_chain; class RanMars *random; class AtomVecEllipsoid *avec_ellipsoid; class AtomVecLine *avec_line; class AtomVecTri *avec_tri; int POINT,SPHERE,ELLIPSOID,LINE,TRIANGLE,DIPOLE; // bitmasks for eflags int OMEGA,ANGMOM,TORQUE; void no_squish_rotate(int, double *, double *, double *, double); void set_xv(); void set_v(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Fix rigid molecule requires atom attribute molecule Self-explanatory. E: Could not find fix rigid group ID A group ID used in the fix rigid command does not exist. E: One or more atoms belong to multiple rigid bodies Two or more rigid bodies defined by the fix rigid command cannot contain the same atom. E: No rigid bodies defined The fix specification did not end up defining any rigid bodies. E: Fix rigid z force cannot be on for 2d simulation -UNDOCUMENTED +Self-explanatory. E: Fix rigid xy torque cannot be on for 2d simulation -UNDOCUMENTED +Self-explanatory. E: Fix rigid langevin period must be > 0.0 -UNDOCUMENTED +Self-explanatory. E: One or zero atoms in rigid body Any rigid body defined by the fix rigid command must contain 2 or more atoms. W: More than one fix rigid It is not efficient to use fix rigid more than once. E: Rigid fix must come before NPT/NPH fix NPT/NPH fix must be defined in input script after all rigid fixes, else the rigid fix contribution to the pressure virial is incorrect. E: Fix rigid atom has non-zero image flag in a non-periodic dimension You cannot set image flags for non-periodic dimensions. E: Insufficient Jacobi rotations for rigid body Eigensolve for rigid body was not sufficiently accurate. E: Fix rigid: Bad principal moments The principal moments of inertia computed for a rigid body are not within the required tolerances. W: Computing temperature of portions of rigid bodies The group defined by the temperature compute does not encompass all the atoms in one or more rigid bodies, so the change in degrees-of-freedom for the atoms in those partial rigid bodies will not be accounted for. */ diff --git a/src/fix_shake.h b/src/fix_shake.h index 190c14e52..8d3973f23 100644 --- a/src/fix_shake.h +++ b/src/fix_shake.h @@ -1,226 +1,226 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(shake,FixShake) #else #ifndef LMP_FIX_SHAKE_H #define LMP_FIX_SHAKE_H #include "fix.h" namespace LAMMPS_NS { class FixShake : public Fix { public: FixShake(class LAMMPS *, int, char **); ~FixShake(); int setmask(); void init(); void setup(int); void pre_neighbor(); void post_force(int); void post_force_respa(int, int, int); double memory_usage(); void grow_arrays(int); void copy_arrays(int, int); void set_arrays(int); int pack_exchange(int, double *); int unpack_exchange(int, double *); int pack_comm(int, int *, double *, int, int *); void unpack_comm(int, int, double *); int dof(int); void reset_dt(); private: int me,nprocs; double tolerance; // SHAKE tolerance int max_iter; // max # of SHAKE iterations int output_every; // SHAKE stat output every so often bigint next_output; // timestep for next output // settings from input command int *bond_flag,*angle_flag; // bond/angle types to constrain int *type_flag; // constrain bonds to these types double *mass_list; // constrain bonds to these masses int nmass; // # of masses in mass_list double *bond_distance,*angle_distance; // constraint distances int ifix_respa; // rRESPA fix needed by SHAKE int nlevels_respa; // copies of needed rRESPA variables int *loop_respa; double *step_respa; double **x,**v,**f; // local ptrs to atom class quantities double *mass,*rmass; int *type; int nlocal; // atom-based arrays int *shake_flag; // 0 if atom not in SHAKE cluster // 1 = size 3 angle cluster // 2,3,4 = size of bond-only cluster int **shake_atom; // global IDs of atoms in cluster // central atom is 1st // lowest global ID is 1st for size 2 int **shake_type; // bondtype of each bond in cluster // for angle cluster, 3rd value // is angletype double **xshake; // unconstrained atom coords int vflag; // virial flag double dtv,dtfsq; // timesteps for trial move double dtf_inner,dtf_innerhalf; // timesteps for rRESPA trial move int *list; // list of clusters to SHAKE int nlist,maxlist; // size and max-size of list // stat quantities int *b_count,*b_count_all; // counts for each bond type double *b_ave,*b_max,*b_min; // ave/max/min dist for each bond type double *b_ave_all,*b_max_all,*b_min_all; // MPI summing arrays int *a_count,*a_count_all; // ditto for angle types double *a_ave,*a_max,*a_min; double *a_ave_all,*a_max_all,*a_min_all; void find_clusters(); int masscheck(double); void unconstrained_update(); void unconstrained_update_respa(int); void shake2(int); void shake3(int); void shake4(int); void shake3angle(int); void stats(); int bondfind(int, int, int); int anglefind(int, int, int); }; } #endif #endif /* ERROR/WARNING messages: E: Cannot use fix shake with non-molecular system Your choice of atom style does not have bonds. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Invalid bond type index for fix shake Self-explanatory. Check the fix shake command in the input script. E: Invalid angle type index for fix shake Self-explanatory. E: Invalid atom type index for fix shake Atom types must range from 1 to Ntypes inclusive. E: Invalid atom mass for fix shake Mass specified in fix shake command must be > 0.0. E: Too many masses for fix shake The fix shake command cannot list more masses than there are atom types. E: More than one fix shake Only one fix shake can be defined. E: Fix shake cannot be used with minimization Cannot use fix shake while doing an energy minimization since it turns off bonds that should contribute to the energy. E: Shake fix must come before NPT/NPH fix NPT fix must be defined in input script after SHAKE fix, else the SHAKE fix contribution to the pressure virial is incorrect. E: Bond potential must be defined for SHAKE Cannot use fix shake unless bond potential is defined. E: Angle potential must be defined for SHAKE When shaking angles, an angle_style potential must be used. E: Shake angles have different bond types All 3-atom angle-constrained SHAKE clusters specified by the fix shake command that are the same angle type, must also have the same bond types for the 2 bonds in the angle. E: Shake atoms %d %d missing on proc %d at step %ld The 2 atoms in a single shake cluster specified by the fix shake command are not all accessible to a processor. This probably means -an atom has moved too far. :dd +an atom has moved too far. E: Shake atoms %d %d %d missing on proc %d at step %ld The 3 atoms in a single shake cluster specified by the fix shake command are not all accessible to a processor. This probably means -an atom has moved too far. :dd +an atom has moved too far. E: Shake atoms %d %d %d %d missing on proc %d at step %ld The 4 atoms in a single shake cluster specified by the fix shake command are not all accessible to a processor. This probably means -an atom has moved too far. :dd +an atom has moved too far. E: Did not find fix shake partner info Could not find bond partners implied by fix shake command. This error can be triggered if the delete_bonds command was used before fix shake, and it removed bonds without resetting the 1-2, 1-3, 1-4 weighting list via the special keyword. E: Shake cluster of more than 4 atoms A single cluster specified by the fix shake command can have no more than 4 atoms. E: Shake clusters are connected A single cluster specified by the fix shake command must have a single central atom with up to 3 other atoms bonded to it. W: Shake determinant < 0.0 The determinant of the quadratic equation being solved for a single cluster specified by the fix shake command is numerically suspect. LAMMPS will set it to 0.0 and continue. E: Shake determinant = 0.0 The determinant of the matrix being solved for a single cluster specified by the fix shake command is numerically invalid. */ diff --git a/src/fix_wall_region.h b/src/fix_wall_region.h index f13b89247..7580ccaaf 100644 --- a/src/fix_wall_region.h +++ b/src/fix_wall_region.h @@ -1,93 +1,93 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS FixStyle(wall/region,FixWallRegion) #else #ifndef LMP_FIX_WALL_REGION_H #define LMP_FIX_WALL_REGION_H #include "fix.h" namespace LAMMPS_NS { class FixWallRegion : public Fix { public: FixWallRegion(class LAMMPS *, int, char **); ~FixWallRegion(); int setmask(); void init(); void setup(int); void min_setup(int); void post_force(int); void post_force_respa(int, int, int); void min_post_force(int); double compute_scalar(); double compute_vector(int); private: int style,iregion; double epsilon,sigma,cutoff; int eflag; double ewall[4],ewall_all[4]; int nlevels_respa; double dt; char *idregion; double coeff1,coeff2,coeff3,coeff4,offset; double eng,fwall; void lj93(double); void lj126(double); void colloid(double, double); void harmonic(double); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Region ID for fix wall/region does not exist Self-explanatory. E: Fix wall/region cutoff <= 0.0 Self-explanatory. E: Fix wall/region colloid requires atom style sphere -UNDOCUMENTED +Self-explanatory. E: Fix wall/region colloid requires extended particles -Self-explanatory. +One of the particles has radius 0.0. E: Particle on or inside surface of region used in fix wall/region Particles must be "exterior" to the region surface in order for energy/force to be calculated. */ diff --git a/src/force.h b/src/force.h index ce197d91c..b13ddc108 100644 --- a/src/force.h +++ b/src/force.h @@ -1,148 +1,150 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_FORCE_H #define LMP_FORCE_H #include "pointers.h" namespace LAMMPS_NS { class Force : protected Pointers { public: double boltz; // Boltzmann constant (eng/degree-K) double hplanck; // Planck's constant (energy-time) double mvv2e; // conversion of mv^2 to energy double ftm2v; // conversion of ft/m to velocity double mv2d; // conversion of mass/volume to density double nktv2p; // conversion of NkT/V to pressure double qqr2e; // conversion of q^2/r to energy double qe2f; // conversion of qE to force double vxmu2f; // conversion of vx dynamic-visc to force double xxt2kmu; // conversion of xx/t to kinematic-visc double dielectric; // dielectric constant double qqrd2e; // q^2/r to energy w/ dielectric constant double e_mass; // electron mass double hhmrr2e; // conversion of (hbar)^2/(mr^2) to energy double mvh2r; // conversion of mv/hbar to distance // hbar = h/(2*pi) int newton,newton_pair,newton_bond; // Newton's 3rd law settings class Pair *pair; char *pair_style; class Bond *bond; char *bond_style; class Angle *angle; char *angle_style; class Dihedral *dihedral; char *dihedral_style; class Improper *improper; char *improper_style; class KSpace *kspace; char *kspace_style; // index [0] is not used in these arrays double special_lj[4]; // 1-2, 1-3, 1-4 prefactors for LJ double special_coul[4]; // 1-2, 1-3, 1-4 prefactors for Coulombics int special_angle; // 0 if defined angles are ignored // 1 if only weight 1,3 atoms if in an angle int special_dihedral; // 0 if defined dihedrals are ignored // 1 if only weight 1,4 atoms if in a dihedral int special_extra; // extra space for added bonds Force(class LAMMPS *); ~Force(); void init(); void create_pair(const char *, const char *suffix = NULL); class Pair *new_pair(const char *, const char *, int &); class Pair *pair_match(const char *, int); void create_bond(const char *, const char *suffix = NULL); class Bond *new_bond(const char *, const char *, int &); class Bond *bond_match(const char *); void create_angle(const char *, const char *suffix = NULL); class Angle *new_angle(const char *, const char *, int &); void create_dihedral(const char *, const char *suffix = NULL); class Dihedral *new_dihedral(const char *, const char *, int &); void create_improper(const char *, const char *suffix = NULL); class Improper *new_improper(const char *, const char *, int &); void create_kspace(int, char **, const char *suffix = NULL); class KSpace *new_kspace(int, char **, const char *, int &); class KSpace *kspace_match(const char *, int); void set_special(int, char **); void bounds(char *, int, int &, int &); double numeric(char *); int inumeric(char *); bigint memory_usage(); }; } #endif /* ERROR/WARNING messages: E: Invalid pair style The choice of pair style is unknown. E: Invalid bond style The choice of bond style is unknown. E: Invalid angle style The choice of angle style is unknown. E: Invalid dihedral style The choice of dihedral style is unknown. E: Invalid improper style The choice of improper style is unknown. E: Invalid kspace style The choice of kspace style is unknown. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Numeric index is out of bounds -UNDOCUMENTED +A command with an argument that specifies an integer or range of +integers is using a value that is less than 1 or greater than the +maximum allowed limit. E: Expected floating point parameter in input script or data file The quantity being read is an integer on non-numeric value. E: Expected integer parameter in input script or data file The quantity being read is a floating point or non-numeric value. */ diff --git a/src/image.h b/src/image.h index 7116294e1..3474fcee9 100644 --- a/src/image.h +++ b/src/image.h @@ -1,165 +1,165 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_IMAGE_H #define LMP_IMAGE_H #include "math.h" #include "stdio.h" #include "pointers.h" namespace LAMMPS_NS { class Image : protected Pointers { public: int width,height; // size of image double theta,phi; // view image from theta,phi double xctr,yctr,zctr; // center of image in user coords double up[3]; // up direction in image double zoom; // zoom factor double persp; // perspective factor double shiny; // shininess of objects int ssao; // SSAO on or off int seed; // RN seed for SSAO double ssaoint; // strength of shading from 0 to 1 double *boxcolor; // color to draw box outline with int background[3]; // RGB values of background Image(class LAMMPS *); ~Image(); void buffers(); void clear(); void merge(); void write_JPG(FILE *); void write_PPM(FILE *); void view_params(double, double, double, double, double, double); void color_minmax(int, double *, int); void draw_sphere(double *, double *, double); void draw_cube(double *, double *, double); void draw_cylinder(double *, double *, double *, double, int); void draw_triangle(double *, double *, double *, double *); void draw_box(double (*)[3], double); void draw_axes(double (*)[3], double); int colormap(int, char **); int addcolor(char *, double, double, double); double *element2color(char *); double element2diam(char *); double *value2color(double); double *color2rgb(const char *, int index=0); int default_colors(); private: int me,nprocs; int npixels; double *depthBuffer,*surfaceBuffer; double *depthcopy,*surfacecopy; char *imageBuffer,*rgbcopy,*writeBuffer; // constant view params double FOV; double ambientColor[3]; double keyLightTheta; double keyLightPhi; double keyLightColor[3]; double fillLightTheta; double fillLightPhi; double fillLightColor[3]; double backLightTheta; double backLightPhi; double backLightColor[3]; double specularHardness; double specularIntensity; double SSAORadius; int SSAOSamples; double SSAOJitter; // dynamic view params double zdist; double tanPerPixel; double camDir[3],camUp[3],camRight[4],camPos[3]; double keyLightDir[3],fillLightDir[3],backLightDir[3]; double keyHalfDir[3]; // color values int ncolors; char **username; double **userrgb; // color map int mstyle,mrange; // 2-letter style/range of color map int mlo,mhi; // bounds = NUMERIC or MINVALUE or MAXVALUE double mlovalue,mhivalue; // user bounds if NUMERIC double locurrent,hicurrent; // current bounds for this snapshot double mbinsize,mbinsizeinv; // bin size for sequential color map struct MapEntry { int single,lo,hi; // NUMERIC or MINVALUE or MAXVALUE double svalue,lvalue,hvalue; // actual value double *color; // RGB values }; MapEntry *mentry; int nentry; double interpolate[3]; // SSAO RNG class RanMars *random; // internal methods void draw_pixel(int, int, double, double *, double*); void compute_SSAO(); // inline functions inline double saturate(double v) { if (v < 0.0) return 0.0; else if (v > 1.0) return 1.0; else return v; } inline double distance(double* a, double* b) { return sqrt((a[0] - b[0]) * (a[0] - b[0]) + (a[1] - b[1]) * (a[1] - b[1]) + (a[2] - b[2]) * (a[2] - b[2])); } }; } #endif /* ERROR/WARNING messages: E: Invalid image up vector -UNDOCUMENTED +Up vector cannot be (0,0,0). E: Invalid image color range -UNDOCUMENTED +The lo value in the range is larger than the hi value. */ diff --git a/src/input.h b/src/input.h index e3c8b6e4f..86f9a9f78 100644 --- a/src/input.h +++ b/src/input.h @@ -1,320 +1,322 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_INPUT_H #define LMP_INPUT_H #include "stdio.h" #include "pointers.h" namespace LAMMPS_NS { class Input : protected Pointers { public: int narg; // # of command args char **arg; // parsed args for command class Variable *variable; // defined variables Input(class LAMMPS *, int, char **); ~Input(); void file(); // process all input void file(const char *); // process an input script char *one(const char *); // process a single command void substitute(char *, int); // substitute for variables in a string private: int me; // proc ID char *command; // ptr to current command int maxarg; // max # of args in arg char *line,*copy,*work; // input line & copy of it int echo_screen; // 0 = no, 1 = yes int echo_log; // 0 = no, 1 = yes int nfile,maxfile; // current # and max # of open input files int label_active; // 0 = no label, 1 = looking for label char *labelstr; // label string being looked for int jump_skip; // 1 if skipping next jump, 0 otherwise FILE **infiles; // list of open input files void parse(); // parse an input text line int execute_command(); // execute a single command void clear(); // input script commands void echo(); void ifthenelse(); void include(); void jump(); void label(); void log(); void next_command(); void partition(); void print(); void quit(); void shell(); void variable_command(); void angle_coeff(); // LAMMPS commands void angle_style(); void atom_modify(); void atom_style(); void bond_coeff(); void bond_style(); void boundary(); void communicate(); void compute(); void compute_modify(); void dielectric(); void dihedral_coeff(); void dihedral_style(); void dimension(); void dump(); void dump_modify(); void fix(); void fix_modify(); void group_command(); void improper_coeff(); void improper_style(); void kspace_modify(); void kspace_style(); void lattice(); void mass(); void min_modify(); void min_style(); void neigh_modify(); void neighbor_command(); void newton(); void package(); void pair_coeff(); void pair_modify(); void pair_style(); void pair_write(); void processors(); void region(); void reset_timestep(); void restart(); void run_style(); void special_bonds(); void suffix(); void thermo(); void thermo_modify(); void thermo_style(); void timestep(); void uncompute(); void undump(); void unfix(); void units(); }; } #endif /* ERROR/WARNING messages: E: Label wasn't found in input script Self-explanatory. E: Input line too long: %s This is a hard (very large) limit defined in the input.cpp file. E: Unknown command: %s The command is not known to LAMMPS. Check the input script. E: Another input script is already being processed Cannot attempt to open a 2nd input script, when the original file is still being processed. E: Cannot open input script %s Self-explanatory. E: Unbalanced quotes in input line No matching end double quote was found following a leading double quote. E: Invalid variable name Variable name used in an input script line is invalid. E: Substitution for illegal variable Input script line contained a variable that could not be substituted for. E: Input line too long after variable substitution This is a hard (very large) limit defined in the input.cpp file. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Cannot open logfile %s The LAMMPS log file specified in the input script cannot be opened. Check that the path and name are correct. E: Angle_coeff command before simulation box is defined The angle_coeff command cannot be used before a read_data, read_restart, or create_box command. E: Angle_coeff command before angle_style is defined Coefficients cannot be set in the data file or via the angle_coeff command until an angle_style has been assigned. E: Angle_coeff command when no angles allowed The chosen atom style does not allow for angles to be defined. E: Angle_style command when no angles allowed The chosen atom style does not allow for angles to be defined. E: Atom_style command after simulation box is defined The atom_style command cannot be used after a read_data, read_restart, or create_box command. E: Bond_coeff command before simulation box is defined The bond_coeff command cannot be used before a read_data, read_restart, or create_box command. E: Bond_coeff command before bond_style is defined Coefficients cannot be set in the data file or via the bond_coeff command until an bond_style has been assigned. E: Bond_coeff command when no bonds allowed The chosen atom style does not allow for bonds to be defined. E: Bond_style command when no bonds allowed The chosen atom style does not allow for bonds to be defined. E: Boundary command after simulation box is defined The boundary command cannot be used after a read_data, read_restart, or create_box command. E: Dihedral_coeff command before simulation box is defined The dihedral_coeff command cannot be used before a read_data, read_restart, or create_box command. E: Dihedral_coeff command before dihedral_style is defined Coefficients cannot be set in the data file or via the dihedral_coeff command until an dihedral_style has been assigned. E: Dihedral_coeff command when no dihedrals allowed The chosen atom style does not allow for dihedrals to be defined. E: Dihedral_style command when no dihedrals allowed The chosen atom style does not allow for dihedrals to be defined. E: Dimension command after simulation box is defined The dimension command cannot be used after a read_data, read_restart, or create_box command. E: Improper_coeff command before simulation box is defined The improper_coeff command cannot be used before a read_data, read_restart, or create_box command. E: Improper_coeff command before improper_style is defined Coefficients cannot be set in the data file or via the improper_coeff command until an improper_style has been assigned. E: Improper_coeff command when no impropers allowed The chosen atom style does not allow for impropers to be defined. E: Improper_style command when no impropers allowed The chosen atom style does not allow for impropers to be defined. E: KSpace style has not yet been set Cannot use kspace_modify command until a kspace style is set. E: Mass command before simulation box is defined The mass command cannot be used before a read_data, read_restart, or create_box command. E: Min_style command before simulation box is defined The min_style command cannot be used before a read_data, read_restart, or create_box command. E: Newton bond change after simulation box is defined The newton command cannot be used to change the newton bond value after a read_data, read_restart, or create_box command. E: Package command after simulation box is defined -UNDOCUMENTED +The package command cannot be used afer a read_data, read_restart, or +create_box command. E: Package cuda command without USER-CUDA installed -UNDOCUMENTED +The USER-CUDA package must be installed via "make yes-user-cuda" +before LAMMPS is built. E: Pair_coeff command before simulation box is defined The pair_coeff command cannot be used before a read_data, read_restart, or create_box command. E: Pair_coeff command before pair_style is defined Self-explanatory. E: Pair_modify command before pair_style is defined Self-explanatory. E: Pair_write command before pair_style is defined Self-explanatory. E: Processors command after simulation box is defined The processors command cannot be used after a read_data, read_restart, or create_box command. E: Run_style command before simulation box is defined The run_style command cannot be used before a read_data, read_restart, or create_box command. E: Units command after simulation box is defined The units command cannot be used after a read_data, read_restart, or create_box command. */ diff --git a/src/lammps.h b/src/lammps.h index dea9bd28c..577e676c5 100644 --- a/src/lammps.h +++ b/src/lammps.h @@ -1,156 +1,157 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_LAMMPS_H #define LMP_LAMMPS_H #include "stdio.h" namespace LAMMPS_NS { class LAMMPS { public: // ptrs to fundamental LAMMPS classes class Memory *memory; // memory allocation functions class Error *error; // error handling class Universe *universe; // universe of processors class Input *input; // input script processing // ptrs to top-level LAMMPS-specific classes class Atom *atom; // atom-based quantities class Update *update; // integrators/minimizers class Neighbor *neighbor; // neighbor lists class Comm *comm; // inter-processor communication class Domain *domain; // simulation box class Force *force; // inter-particle forces class Modify *modify; // fixes and computes class Group *group; // groups of atoms class Output *output; // thermo/dump/restart class Timer *timer; // CPU timing info MPI_Comm world; // MPI communicator FILE *infile; // infile FILE *screen; // screen output FILE *logfile; // logfile char *suffix; // suffix to add to input script style names int suffix_enable; // 1 if suffix enabled, 0 if disabled class Cuda *cuda; // CUDA accelerator class LAMMPS(int, char **, MPI_Comm); ~LAMMPS(); void create(); void post_create(); void init(); void destroy(); void print_styles(); }; } #endif /* ERROR/WARNING messages: E: Invalid command-line argument One or more command-line arguments is invalid. Check the syntax of the command you are using to launch LAMMPS. E: Cannot use -reorder after -partition -UNDOCUMENTED +Self-explanatory. See doc page discussion of command-line switches. E: Processor partitions are inconsistent The total number of processors in all partitions must match the number of processors LAMMPS is running on. E: Must use -in switch with multiple partitions A multi-partition simulation cannot read the input script from stdin. The -in command-line option must be used to specify a file. E: Can only use -pscreen with multiple partitions -UNDOCUMENTED +Self-explanatory. See doc page discussion of command-line switches. E: Can only use -plog with multiple partitions -UNDOCUMENTED +Self-explanatory. See doc page discussion of command-line switches. E: Cannot open universe screen file For a multi-partition run, the master screen file cannot be opened. Check that the directory you are running in allows for files to be created. E: Cannot open log.lammps The default LAMMPS log file cannot be opened. Check that the directory you are running in allows for files to be created. E: Cannot open universe log file For a multi-partition run, the master log file cannot be opened. Check that the directory you are running in allows for files to be created. E: Cannot open input script %s Self-explanatory. E: Cannot open screen file The screen file specified as a command-line argument cannot be opened. Check that the directory you are running in allows for files to be created. E: Cannot open logfile The LAMMPS log file named in a command-line argument cannot be opened. Check that the path and name are correct. E: Smallint setting in lmptype.h is invalid It has to be the size of an integer. E: Tagint setting in lmptype.h is invalid Tagint must be as large or larger than smallint. E: Bigint setting in lmptype.h is invalid Size of bigint is less than size of tagint. E: MPI_LMP_TAGINT and tagint in lmptype.h are not compatible The size of the MPI datatype does not match the size of a tagint. E: MPI_LMP_BIGINT and bigint in lmptype.h are not compatible The size of the MPI datatype does not match the size of a bigint. E: Small, tag, big integers are not sized correctly -UNDOCUMENTED +See description of these 3 data types in src/lmptype.h. E: 64-bit atom IDs are not yet supported -UNDOCUMENTED +See description of this data type in src/lmptype.h. E: Cannot use -cuda on without USER-CUDA installed -UNDOCUMENTED +The USER-CUDA package must be installed via "make yes-user-cuda" +before LAMMPS is built. */ diff --git a/src/memory.h b/src/memory.h index 681af216a..aa1ec6e19 100644 --- a/src/memory.h +++ b/src/memory.h @@ -1,567 +1,567 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_MEMORY_H #define LMP_MEMORY_H #include "lmptype.h" #include "pointers.h" namespace LAMMPS_NS { class Memory : protected Pointers { public: Memory(class LAMMPS *); void *smalloc(bigint n, const char *); void *srealloc(void *, bigint n, const char *); void sfree(void *); void fail(const char *); /* ---------------------------------------------------------------------- create/grow/destroy vecs and multidim arrays with contiguous memory blocks only use with primitive data types, e.g. 1d vec of ints, 2d array of doubles cannot use with pointers, e.g. 1d vec of int*, due to mismatched destroy avoid use with non-primitive data types to avoid code bloat for these other cases, use smalloc/srealloc/sfree directly ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- create a 1d array ------------------------------------------------------------------------- */ template <typename TYPE> TYPE *create(TYPE *&array, int n, const char *name) { bigint nbytes = ((bigint) sizeof(TYPE)) * n; array = (TYPE *) smalloc(nbytes,name); return array; } template <typename TYPE> TYPE **create(TYPE **&array, int n, const char *name) {fail(name);} /* ---------------------------------------------------------------------- grow or shrink 1d array ------------------------------------------------------------------------- */ template <typename TYPE> TYPE *grow(TYPE *&array, int n, const char *name) { if (array == NULL) return create(array,n,name); bigint nbytes = ((bigint) sizeof(TYPE)) * n; array = (TYPE *) srealloc(array,nbytes,name); return array; } template <typename TYPE> TYPE **grow(TYPE **&array, int n, const char *name) {fail(name);} /* ---------------------------------------------------------------------- destroy a 1d array ------------------------------------------------------------------------- */ template <typename TYPE> void destroy(TYPE *array) { sfree(array); } /* ---------------------------------------------------------------------- create a 1d array with index from nlo to nhi inclusive cannot grow it ------------------------------------------------------------------------- */ template <typename TYPE> TYPE *create1d_offset(TYPE *&array, int nlo, int nhi, const char *name) { bigint nbytes = ((bigint) sizeof(TYPE)) * (nhi-nlo+1); array = (TYPE *) smalloc(nbytes,name); array -= nlo; return array; } template <typename TYPE> TYPE **create1d_offset(TYPE **&array, int nlo, int nhi, const char *name) {fail(name);} /* ---------------------------------------------------------------------- destroy a 1d array with index offset ------------------------------------------------------------------------- */ template <typename TYPE> void destroy1d_offset(TYPE *array, int offset) { if (array) sfree(&array[offset]); } /* ---------------------------------------------------------------------- create a 2d array ------------------------------------------------------------------------- */ template <typename TYPE> TYPE **create(TYPE **&array, int n1, int n2, const char *name) { bigint nbytes = ((bigint) sizeof(TYPE)) * n1*n2; TYPE *data = (TYPE *) smalloc(nbytes,name); nbytes = ((bigint) sizeof(TYPE *)) * n1; array = (TYPE **) smalloc(nbytes,name); bigint n = 0; for (int i = 0; i < n1; i++) { array[i] = &data[n]; n += n2; } return array; } template <typename TYPE> TYPE ***create(TYPE ***&array, int n1, int n2, const char *name) {fail(name);} /* ---------------------------------------------------------------------- grow or shrink 1st dim of a 2d array last dim must stay the same ------------------------------------------------------------------------- */ template <typename TYPE> TYPE **grow(TYPE **&array, int n1, int n2, const char *name) { if (array == NULL) return create(array,n1,n2,name); bigint nbytes = ((bigint) sizeof(TYPE)) * n1*n2; TYPE *data = (TYPE *) srealloc(array[0],nbytes,name); nbytes = ((bigint) sizeof(TYPE *)) * n1; array = (TYPE **) srealloc(array,nbytes,name); bigint n = 0; for (int i = 0; i < n1; i++) { array[i] = &data[n]; n += n2; } return array; } template <typename TYPE> TYPE ***grow(TYPE ***&array, int n1, int n2, const char *name) {fail(name);} /* ---------------------------------------------------------------------- destroy a 2d array ------------------------------------------------------------------------- */ template <typename TYPE> void destroy(TYPE **array) { if (array == NULL) return; sfree(array[0]); sfree(array); } /* ---------------------------------------------------------------------- create a 2d array with a ragged 2nd dimension ------------------------------------------------------------------------- */ template <typename TYPE> TYPE **create_ragged(TYPE **&array, int n1, int *n2, const char *name) { bigint n2sum = 0; for (int i = 0; i < n1; i++) n2sum += n2[i]; bigint nbytes = ((bigint) sizeof(TYPE)) * n2sum; TYPE *data = (TYPE *) smalloc(nbytes,name); nbytes = ((bigint) sizeof(TYPE *)) * n1; array = (TYPE **) smalloc(nbytes,name); bigint n = 0; for (int i = 0; i < n1; i++) { array[i] = &data[n]; n += n2[i]; } return array; } template <typename TYPE> TYPE ***create_ragged(TYPE ***&array, int n1, int *n2, const char *name) {fail(name);} /* ---------------------------------------------------------------------- create a 2d array with 2nd index from n2lo to n2hi inclusive cannot grow it ------------------------------------------------------------------------- */ template <typename TYPE> TYPE **create2d_offset(TYPE **&array, int n1, int n2lo, int n2hi, const char *name) { int n2 = n2hi - n2lo + 1; create(array,n1,n2,name); for (int i = 0; i < n1; i++) array[i] -= n2lo; return array; } template <typename TYPE> TYPE ***create2d_offset(TYPE ***&array, int n1, int n2lo, int n2hi, const char *name) {fail(name);} /* ---------------------------------------------------------------------- destroy a 2d array with 2nd index offset ------------------------------------------------------------------------- */ template <typename TYPE> void destroy2d_offset(TYPE **array, int offset) { if (array == NULL) return; sfree(&array[0][offset]); sfree(array); } /* ---------------------------------------------------------------------- create a 3d array ------------------------------------------------------------------------- */ template <typename TYPE> TYPE ***create(TYPE ***&array, int n1, int n2, int n3, const char *name) { bigint nbytes = ((bigint) sizeof(TYPE)) * n1*n2*n3; TYPE *data = (TYPE *) smalloc(nbytes,name); nbytes = ((bigint) sizeof(TYPE *)) * n1*n2; TYPE **plane = (TYPE **) smalloc(nbytes,name); nbytes = ((bigint) sizeof(TYPE **)) * n1; array = (TYPE ***) smalloc(nbytes,name); int i,j; bigint m; bigint n = 0; for (i = 0; i < n1; i++) { m = ((bigint) i) * n2; array[i] = &plane[m]; for (j = 0; j < n2; j++) { plane[m+j] = &data[n]; n += n3; } } return array; } template <typename TYPE> TYPE ****create(TYPE ****&array, int n1, int n2, int n3, const char *name) {fail(name);} /* ---------------------------------------------------------------------- grow or shrink 1st dim of a 3d array last 2 dims must stay the same ------------------------------------------------------------------------- */ template <typename TYPE> TYPE ***grow(TYPE ***&array, int n1, int n2, int n3, const char *name) { if (array == NULL) return create(array,n1,n2,n3,name); bigint nbytes = ((bigint) sizeof(TYPE)) * n1*n2*n3; TYPE *data = (TYPE *) srealloc(array[0][0],nbytes,name); nbytes = ((bigint) sizeof(TYPE *)) * n1*n2; TYPE **plane = (TYPE **) srealloc(array[0],nbytes,name); nbytes = ((bigint) sizeof(TYPE **)) * n1; array = (TYPE ***) srealloc(array,nbytes,name); int i,j; bigint m; bigint n = 0; for (i = 0; i < n1; i++) { m = ((bigint) i) * n2; array[i] = &plane[m]; for (j = 0; j < n2; j++) { plane[m+j] = &data[n]; n += n3; } } return array; } template <typename TYPE> TYPE ****grow(TYPE ****&array, int n1, int n2, int n3, const char *name) {fail(name);} /* ---------------------------------------------------------------------- destroy a 3d array ------------------------------------------------------------------------- */ template <typename TYPE> void destroy(TYPE ***array) { if (array == NULL) return; sfree(array[0][0]); sfree(array[0]); sfree(array); } /* ---------------------------------------------------------------------- create a 3d array with 1st index from n1lo to n1hi inclusive cannot grow it ------------------------------------------------------------------------- */ template <typename TYPE> TYPE ***create3d_offset(TYPE ***&array, int n1lo, int n1hi, int n2, int n3, const char *name) { int n1 = n1hi - n1lo + 1; create(array,n1,n2,n3,name); array -= n1lo; return array; } template <typename TYPE> TYPE ****create3d_offset(TYPE ****&array, int n1lo, int n1hi, int n2, int n3, const char *name) {fail(name);} /* ---------------------------------------------------------------------- free a 3d array with 1st index offset ------------------------------------------------------------------------- */ template <typename TYPE> void destroy3d_offset(TYPE ***array, int offset) { if (array) destroy(&array[offset]); } /* ---------------------------------------------------------------------- create a 3d array with 1st index from n1lo to n1hi inclusive, 2nd index from n2lo to n2hi inclusive, 3rd index from n3lo to n3hi inclusive cannot grow it ------------------------------------------------------------------------- */ template <typename TYPE> TYPE ***create3d_offset(TYPE ***&array, int n1lo, int n1hi, int n2lo, int n2hi, int n3lo, int n3hi, const char *name) { int n1 = n1hi - n1lo + 1; int n2 = n2hi - n2lo + 1; int n3 = n3hi - n3lo + 1; create(array,n1,n2,n3,name); bigint m = ((bigint) n1) * n2; for (bigint i = 0; i < m; i++) array[0][i] -= n3lo; for (int i = 0; i < n1; i++) array[i] -= n2lo; array -= n1lo; return array; } template <typename TYPE> TYPE ****create3d_offset(TYPE ****&array, int n1lo, int n1hi, int n2lo, int n2hi, int n3lo, int n3hi, const char *name) {fail(name);} /* ---------------------------------------------------------------------- free a 3d array with all 3 indices offset ------------------------------------------------------------------------- */ template <typename TYPE> void destroy3d_offset(TYPE ***array, int n1_offset, int n2_offset, int n3_offset) { if (array == NULL) return; sfree(&array[n1_offset][n2_offset][n3_offset]); sfree(&array[n1_offset][n2_offset]); sfree(&array[n1_offset]); } /* ---------------------------------------------------------------------- create a 4d array ------------------------------------------------------------------------- */ template <typename TYPE> TYPE ****create(TYPE ****&array, int n1, int n2, int n3, int n4, const char *name) { bigint nbytes = ((bigint) sizeof(TYPE)) * n1*n2*n3*n4; TYPE *data = (TYPE *) smalloc(nbytes,name); nbytes = ((bigint) sizeof(TYPE *)) * n1*n2*n3; TYPE **cube = (TYPE **) smalloc(nbytes,name); nbytes = ((bigint) sizeof(TYPE **)) * n1*n2; TYPE ***plane = (TYPE ***) smalloc(nbytes,name); nbytes = ((bigint) sizeof(TYPE ***)) * n1; array = (TYPE ****) smalloc(nbytes,name); int i,j,k; bigint m1,m2,m3; bigint n = 0; for (i = 0; i < n1; i++) { m2 = ((bigint) i) * n2; array[i] = &plane[m2]; for (j = 0; j < n2; j++) { m1 = ((bigint) i) * n2 + j; m2 = ((bigint) i) * n2*n3 + j*n3; plane[m1] = &cube[m2]; for (k = 0; k < n3; k++) { m1 = ((bigint) i) * n2*n3 + j*n3 + k; cube[m1] = &data[n]; n += n4; } } } return array; } template <typename TYPE> TYPE *****create(TYPE *****&array, int n1, int n2, int n3, int n4, const char *name) {fail(name);} /* ---------------------------------------------------------------------- destroy a 4d array ------------------------------------------------------------------------- */ template <typename TYPE> void destroy(TYPE ****array) { if (array == NULL) return; sfree(array[0][0][0]); sfree(array[0][0]); sfree(array[0]); sfree(array); } /* ---------------------------------------------------------------------- create a 5d array ------------------------------------------------------------------------- */ template <typename TYPE> TYPE *****create(TYPE *****&array, int n1, int n2, int n3, int n4, int n5, const char *name) { bigint nbytes = ((bigint) sizeof(TYPE)) * n1*n2*n3*n4*n5; TYPE *data = (TYPE *) smalloc(nbytes,name); nbytes = ((bigint) sizeof(TYPE *)) * n1*n2*n3*n4; TYPE **level4 = (TYPE **) smalloc(nbytes,name); nbytes = ((bigint) sizeof(TYPE **)) * n1*n2*n3; TYPE ***level3 = (TYPE ***) smalloc(nbytes,name); nbytes = ((bigint) sizeof(TYPE ***)) * n1*n2; TYPE ****level2 = (TYPE ****) smalloc(nbytes,name); nbytes = ((bigint) sizeof(TYPE ****)) * n1; array = (TYPE *****) smalloc(nbytes,name); int i,j,k,l; bigint m1,m2,m3,m4,m5; bigint n = 0; for (i = 0; i < n1; i++) { m2 = ((bigint) i) * n2; array[i] = &level2[m2]; for (j = 0; j < n2; j++) { m1 = ((bigint) i) * n2 + j; m2 = ((bigint) i) * n2*n3 + ((bigint) j) * n3; level2[m1] = &level3[m2]; for (k = 0; k < n3; k++) { m1 = ((bigint) i) * n2*n3 + ((bigint) j) * n3 + k; m2 = ((bigint) i) * n2*n3*n4 + ((bigint) j) * n3*n4 + ((bigint) k) * n4; level3[m1] = &level4[m2]; for (l = 0; l < n4; l++) { m1 = ((bigint) i) * n2*n3*n4 + ((bigint) j) * n3*n4 + ((bigint) k) * n4 + l; level4[m1] = &data[n]; n += n5; } } } } return array; } template <typename TYPE> TYPE ******create(TYPE ******&array, int n1, int n2, int n3, int n4, int n5, const char *name) {fail(name);} /* ---------------------------------------------------------------------- destroy a 5d array ------------------------------------------------------------------------- */ template <typename TYPE> void destroy(TYPE *****array) { if (array == NULL) return; sfree(array[0][0][0][0]); sfree(array[0][0][0]); sfree(array[0][0]); sfree(array[0]); sfree(array); } /* ---------------------------------------------------------------------- memory usage of arrays, including pointers ------------------------------------------------------------------------- */ template <typename TYPE> bigint usage(TYPE *array, int n) { bigint bytes = ((bigint) sizeof(TYPE)) * n; return bytes; } template <typename TYPE> bigint usage(TYPE **array, int n1, int n2) { bigint bytes = ((bigint) sizeof(TYPE)) * n1*n2; bytes += ((bigint) sizeof(TYPE *)) * n1; return bytes; } template <typename TYPE> bigint usage(TYPE ***array, int n1, int n2, int n3) { bigint bytes = ((bigint) sizeof(TYPE)) * n1*n2*n3; bytes += ((bigint) sizeof(TYPE *)) * n1*n2; bytes += ((bigint) sizeof(TYPE **)) * n1; return bytes; } template <typename TYPE> bigint usage(TYPE ****array, int n1, int n2, int n3, int n4) { bigint bytes = ((bigint) sizeof(TYPE)) * n1*n2*n3*n4; bytes += ((bigint) sizeof(TYPE *)) * n1*n2*n3; bytes += ((bigint) sizeof(TYPE **)) * n1*n2; bytes += ((bigint) sizeof(TYPE ***)) * n1; return bytes; } }; } #endif /* ERROR/WARNING messages: E: Failed to allocate %ld bytes for array %s Your LAMMPS simulation has run out of memory. You need to run a -smaller simulation or on more processors. :dd +smaller simulation or on more processors. E: Failed to reallocate %ld bytes for array %s Your LAMMPS simulation has run out of memory. You need to run a -smaller simulation or on more processors. :dd +smaller simulation or on more processors. E: Cannot create/grow a vector/array of pointers for %s LAMMPS code is making an illegal call to the templated memory allocaters, to create a vector or array of pointers. */ diff --git a/src/neigh_bond.h b/src/neigh_bond.h index ffe4c8265..f54355b47 100644 --- a/src/neigh_bond.h +++ b/src/neigh_bond.h @@ -1,44 +1,44 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ERROR/WARNING messages: E: Bond atoms %d %d missing on proc %d at step %ld One or both of 2 atoms needed to compute a particular bond are missing on this processor. Typically this is because the pairwise cutoff is set too short or the bond has blown apart and an atom is -too far away. :dd +too far away. E: Angle atoms %d %d %d missing on proc %d at step %ld One or more of 3 atoms needed to compute a particular angle are missing on this processor. Typically this is because the pairwise cutoff is set too short or the angle has blown apart and an atom is -too far away. :dd +too far away. E: Dihedral atoms %d %d %d %d missing on proc %d at step %ld One or more of 4 atoms needed to compute a particular dihedral are missing on this processor. Typically this is because the pairwise cutoff is set too short or the dihedral has blown apart and an atom is -too far away. :dd +too far away. E: Improper atoms %d %d %d %d missing on proc %d at step %ld One or more of 4 atoms needed to compute a particular improper are missing on this processor. Typically this is because the pairwise cutoff is set too short or the improper has blown apart and an atom is -too far away. :dd +too far away. */ diff --git a/src/neigh_derive.h b/src/neigh_derive.h index c782fe6de..296598aab 100644 --- a/src/neigh_derive.h +++ b/src/neigh_derive.h @@ -1,26 +1,22 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ERROR/WARNING messages: E: Neighbor list overflow, boost neigh_modify one -UNDOCUMENTED - -U: Neighbor list overflow, boost neigh_modify one or page - There are too many neighbors of a single atom. Use the neigh_modify -command to increase the neighbor page size and the max number of -neighbors allowed for one atom. +command to increase the max number of neighbors allowed for one atom. +You may also want to boost the page size. */ diff --git a/src/neigh_full.h b/src/neigh_full.h index c782fe6de..296598aab 100644 --- a/src/neigh_full.h +++ b/src/neigh_full.h @@ -1,26 +1,22 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ERROR/WARNING messages: E: Neighbor list overflow, boost neigh_modify one -UNDOCUMENTED - -U: Neighbor list overflow, boost neigh_modify one or page - There are too many neighbors of a single atom. Use the neigh_modify -command to increase the neighbor page size and the max number of -neighbors allowed for one atom. +command to increase the max number of neighbors allowed for one atom. +You may also want to boost the page size. */ diff --git a/src/neigh_gran.h b/src/neigh_gran.h index c782fe6de..296598aab 100644 --- a/src/neigh_gran.h +++ b/src/neigh_gran.h @@ -1,26 +1,22 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ERROR/WARNING messages: E: Neighbor list overflow, boost neigh_modify one -UNDOCUMENTED - -U: Neighbor list overflow, boost neigh_modify one or page - There are too many neighbors of a single atom. Use the neigh_modify -command to increase the neighbor page size and the max number of -neighbors allowed for one atom. +command to increase the max number of neighbors allowed for one atom. +You may also want to boost the page size. */ diff --git a/src/neigh_half_bin.h b/src/neigh_half_bin.h index c782fe6de..296598aab 100644 --- a/src/neigh_half_bin.h +++ b/src/neigh_half_bin.h @@ -1,26 +1,22 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ERROR/WARNING messages: E: Neighbor list overflow, boost neigh_modify one -UNDOCUMENTED - -U: Neighbor list overflow, boost neigh_modify one or page - There are too many neighbors of a single atom. Use the neigh_modify -command to increase the neighbor page size and the max number of -neighbors allowed for one atom. +command to increase the max number of neighbors allowed for one atom. +You may also want to boost the page size. */ diff --git a/src/neigh_half_multi.h b/src/neigh_half_multi.h index c782fe6de..296598aab 100644 --- a/src/neigh_half_multi.h +++ b/src/neigh_half_multi.h @@ -1,26 +1,22 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ERROR/WARNING messages: E: Neighbor list overflow, boost neigh_modify one -UNDOCUMENTED - -U: Neighbor list overflow, boost neigh_modify one or page - There are too many neighbors of a single atom. Use the neigh_modify -command to increase the neighbor page size and the max number of -neighbors allowed for one atom. +command to increase the max number of neighbors allowed for one atom. +You may also want to boost the page size. */ diff --git a/src/neigh_half_nsq.h b/src/neigh_half_nsq.h index c782fe6de..296598aab 100644 --- a/src/neigh_half_nsq.h +++ b/src/neigh_half_nsq.h @@ -1,26 +1,22 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ERROR/WARNING messages: E: Neighbor list overflow, boost neigh_modify one -UNDOCUMENTED - -U: Neighbor list overflow, boost neigh_modify one or page - There are too many neighbors of a single atom. Use the neigh_modify -command to increase the neighbor page size and the max number of -neighbors allowed for one atom. +command to increase the max number of neighbors allowed for one atom. +You may also want to boost the page size. */ diff --git a/src/neigh_respa.h b/src/neigh_respa.h index c782fe6de..296598aab 100644 --- a/src/neigh_respa.h +++ b/src/neigh_respa.h @@ -1,26 +1,22 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ERROR/WARNING messages: E: Neighbor list overflow, boost neigh_modify one -UNDOCUMENTED - -U: Neighbor list overflow, boost neigh_modify one or page - There are too many neighbors of a single atom. Use the neigh_modify -command to increase the neighbor page size and the max number of -neighbors allowed for one atom. +command to increase the max number of neighbors allowed for one atom. +You may also want to boost the page size. */ diff --git a/src/neighbor.h b/src/neighbor.h index 143727116..00079a0f2 100644 --- a/src/neighbor.h +++ b/src/neighbor.h @@ -1,384 +1,386 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_NEIGHBOR_H #define LMP_NEIGHBOR_H #include "pointers.h" namespace LAMMPS_NS { class Neighbor : protected Pointers { friend class Cuda; public: int style; // 0,1,2 = nsq, bin, multi int every; // build every this many steps int delay; // delay build for this many steps int dist_check; // 0 = always build, 1 = only if 1/2 dist int ago; // how many steps ago neighboring occurred int pgsize; // size of neighbor page int oneatom; // max # of neighbors for one atom int includegroup; // only build pairwise lists for this group int build_once; // 1 if only build lists once per run int cudable; // GPU <-> CPU communication flag for CUDA double skin; // skin distance double cutneighmin; // min neighbor cutoff for all type pairs double cutneighmax; // max neighbor cutoff for all type pairs double *cuttype; // for each type, max neigh cut w/ others int ncalls; // # of times build has been called int ndanger; // # of dangerous builds int nrequest; // requests for pairwise neighbor lists class NeighRequest **requests; // from Pair, Fix, Compute, Command classes int maxrequest; int old_style; // previous run info to avoid int old_nrequest; // re-creation of pairwise neighbor lists int old_triclinic; class NeighRequest **old_requests; int nlist; // pairwise neighbor lists class NeighList **lists; int nbondlist; // list of bonds to compute int **bondlist; int nanglelist; // list of angles to compute int **anglelist; int ndihedrallist; // list of dihedrals to compute int **dihedrallist; int nimproperlist; // list of impropers to compute int **improperlist; Neighbor(class LAMMPS *); virtual ~Neighbor(); virtual void init(); int request(void *); // another class requests a neighbor list void print_lists_of_lists(); // debug print out int decide(); // decide whether to build or not virtual int check_distance(); // check max distance moved since last build void setup_bins(); // setup bins based on box and cutoff virtual void build(); // create all neighbor lists (pair,bond) void build_one(int); // create a single neighbor list void set(int, char **); // set neighbor style and skin distance void modify_params(int, char**); // modify parameters that control builds bigint memory_usage(); int exclude_setting(); protected: int me,nprocs; int maxatom; // size of atom-based NeighList arrays int maxbond,maxangle,maxdihedral,maximproper; // size of bond lists int maxwt; // max weighting factor applied + 1 int must_check; // 1 if must check other classes to reneigh int restart_check; // 1 if restart enabled, 0 if no int fix_check; // # of fixes that induce reneigh int *fixchecklist; // which fixes to check double **cutneighsq; // neighbor cutneigh sq for each type pair double **cutneighghostsq; // neighbor cutnsq for each ghost type pair double cutneighmaxsq; // cutneighmax squared double *cuttypesq; // cuttype squared double triggersq; // trigger = build when atom moves this dist double **xhold; // atom coords at last neighbor build int maxhold; // size of xhold array int boxcheck; // 1 if need to store box size double boxlo_hold[3],boxhi_hold[3]; // box size at last neighbor build double corners_hold[8][3]; // box corners at last neighbor build int nbinx,nbiny,nbinz; // # of global bins int *bins; // ptr to next atom in each bin int maxbin; // size of bins array int *binhead; // ptr to 1st atom in each bin int maxhead; // size of binhead array int mbins; // # of local bins and offset int mbinx,mbiny,mbinz; int mbinxlo,mbinylo,mbinzlo; int binsizeflag; // user-chosen bin size double binsize_user; double binsizex,binsizey,binsizez; // actual bin sizes and inverse sizes double bininvx,bininvy,bininvz; int sx,sy,sz,smax; // bin stencil extents int dimension; // 2/3 for 2d/3d int triclinic; // 0 if domain is orthog, 1 if triclinic int newton_pair; // 0 if newton off, 1 if on for pairwise double *bboxlo,*bboxhi; // ptrs to full domain bounding box double (*corners)[3]; // ptr to 8 corners of triclinic box double inner[2],middle[2]; // rRESPA cutoffs for extra lists double cut_inner_sq; // outer cutoff for inner neighbor list double cut_middle_sq; // outer cutoff for middle neighbor list double cut_middle_inside_sq; // inner cutoff for middle neighbor list int special_flag[4]; // flags for 1-2, 1-3, 1-4 neighbors int anyghostlist; // 1 if any non-occasional list // stores neighbors of ghosts int exclude; // 0 if no type/group exclusions, 1 if yes int nex_type; // # of entries in type exclusion list int maxex_type; // max # in type list int *ex1_type,*ex2_type; // pairs of types to exclude int **ex_type; // 2d array of excluded type pairs int nex_group; // # of entries in group exclusion list int maxex_group; // max # in group list int *ex1_group,*ex2_group; // pairs of group #'s to exclude int *ex1_bit,*ex2_bit; // pairs of group bits to exclude int nex_mol; // # of entries in molecule exclusion list int maxex_mol; // max # in molecule list int *ex_mol_group; // molecule group #'s to exclude int *ex_mol_bit; // molecule group bits to exclude int nblist,nglist,nslist; // # of pairwise neigh lists of various kinds int *blist; // lists to build every reneighboring int *glist; // lists to grow atom arrays every reneigh int *slist; // lists to grow stencil arrays every reneigh void bin_atoms(); // bin all atoms double bin_distance(int, int, int); // distance between binx int coord2bin(double *); // mapping atom coord to a bin int coord2bin(double *, int &, int &, int&); // ditto int exclusion(int, int, int, int, int *, int *) const; // test for pair exclusion virtual void choose_build(int, class NeighRequest *); void choose_stencil(int, class NeighRequest *); // pairwise build functions typedef void (Neighbor::*PairPtr)(class NeighList *); PairPtr *pair_build; void half_nsq_no_newton(class NeighList *); void half_nsq_newton(class NeighList *); void half_bin_no_newton(class NeighList *); void half_bin_newton(class NeighList *); void half_bin_newton_tri(class NeighList *); void half_multi_no_newton(class NeighList *); void half_multi_newton(class NeighList *); void half_multi_newton_tri(class NeighList *); void full_nsq(class NeighList *); void full_nsq_ghost(class NeighList *); void full_bin(class NeighList *); void full_bin_ghost(class NeighList *); void full_multi(class NeighList *); void half_from_full_no_newton(class NeighList *); void half_from_full_newton(class NeighList *); void skip_from(class NeighList *); void skip_from_granular(class NeighList *); void skip_from_respa(class NeighList *); void copy_from(class NeighList *); void granular_nsq_no_newton(class NeighList *); void granular_nsq_newton(class NeighList *); void granular_bin_no_newton(class NeighList *); void granular_bin_newton(class NeighList *); void granular_bin_newton_tri(class NeighList *); void respa_nsq_no_newton(class NeighList *); void respa_nsq_newton(class NeighList *); void respa_bin_no_newton(class NeighList *); void respa_bin_newton(class NeighList *); void respa_bin_newton_tri(class NeighList *); // OpenMP multi-threaded neighbor list build versions #include "accelerator_omp.h" // pairwise stencil creation functions typedef void (Neighbor::*StencilPtr)(class NeighList *, int, int, int); StencilPtr *stencil_create; void stencil_half_bin_2d_no_newton(class NeighList *, int, int, int); void stencil_half_bin_3d_no_newton(class NeighList *, int, int, int); void stencil_half_bin_2d_newton(class NeighList *, int, int, int); void stencil_half_bin_3d_newton(class NeighList *, int, int, int); void stencil_half_bin_2d_newton_tri(class NeighList *, int, int, int); void stencil_half_bin_3d_newton_tri(class NeighList *, int, int, int); void stencil_half_multi_2d_no_newton(class NeighList *, int, int, int); void stencil_half_multi_3d_no_newton(class NeighList *, int, int, int); void stencil_half_multi_2d_newton(class NeighList *, int, int, int); void stencil_half_multi_3d_newton(class NeighList *, int, int, int); void stencil_half_multi_2d_newton_tri(class NeighList *, int, int, int); void stencil_half_multi_3d_newton_tri(class NeighList *, int, int, int); void stencil_full_bin_2d(class NeighList *, int, int, int); void stencil_full_ghost_bin_2d(class NeighList *, int, int, int); void stencil_full_bin_3d(class NeighList *, int, int, int); void stencil_full_ghost_bin_3d(class NeighList *, int, int, int); void stencil_full_multi_2d(class NeighList *, int, int, int); void stencil_full_multi_3d(class NeighList *, int, int, int); // topology build functions typedef void (Neighbor::*BondPtr)(); // ptrs to topology build functions BondPtr bond_build; // ptr to bond list functions void bond_all(); // bond list with all bonds void bond_partial(); // exclude certain bonds BondPtr angle_build; // ptr to angle list functions void angle_all(); // angle list with all angles void angle_partial(); // exclude certain angles BondPtr dihedral_build; // ptr to dihedral list functions void dihedral_all(); // dihedral list with all dihedrals void dihedral_partial(); // exclude certain dihedrals BondPtr improper_build; // ptr to improper list functions void improper_all(); // improper list with all impropers void improper_partial(); // exclude certain impropers // find_special: determine if atom j is in special list of atom i // if it is not, return 0 // if it is and special flag is 0 (both coeffs are 0.0), return -1 // if it is and special flag is 1 (both coeffs are 1.0), return 0 // if it is and special flag is 2 (otherwise), return 1,2,3 // for which level of neighbor it is (and which coeff it maps to) inline int find_special(const int *list, const int *nspecial, const int tag) const { const int n1 = nspecial[0]; const int n2 = nspecial[1]; const int n3 = nspecial[2]; for (int i = 0; i < n3; i++) { if (list[i] == tag) { if (i < n1) { if (special_flag[1] == 0) return -1; else if (special_flag[1] == 1) return 0; else return 1; } else if (i < n2) { if (special_flag[2] == 0) return -1; else if (special_flag[2] == 1) return 0; else return 2; } else { if (special_flag[3] == 0) return -1; else if (special_flag[3] == 1) return 0; else return 3; } } } return 0; }; }; } #endif /* ERROR/WARNING messages: E: Neighbor delay must be 0 or multiple of every setting The delay and every parameters set via the neigh_modify command are inconsistent. If the delay setting is non-zero, then it must be a multiple of the every setting. E: Neighbor page size must be >= 10x the one atom setting This is required to prevent wasting too much memory. E: Invalid atom type in neighbor exclusion list Atom types must range from 1 to Ntypes inclusive. E: Neighbor include group not allowed with ghost neighbors This is a current restriction within LAMMPS. E: Neighbor multi not yet enabled for ghost neighbors This is a current restriction within LAMMPS. E: Neighbor multi not yet enabled for granular Self-explanatory. E: Neighbor multi not yet enabled for rRESPA Self-explanatory. E: Neighbors of ghost atoms only allowed for full neighbor lists This is a current restriction within LAMMPS. E: Too many local+ghost atoms for neighbor list -UNDOCUMENTED +The number of nlocal + nghost atoms on a processor +is limited by the size of a 32-bit integer with 2 bits +removed for masking 1-2, 1-3, 1-4 neighbors. W: Building an occasional neighobr list when atoms may have moved too far This can cause LAMMPS to crash when the neighbor list is built. The solution is to check for building the regular neighbor lists more frequently. E: Domain too large for neighbor bins The domain has become extremely large so that neighbor bins cannot be used. Most likely, one or more atoms have been blown out of the simulation box to a great distance. E: Cannot use neighbor bins - box size << cutoff Too many neighbor bins will be created. This typically happens when the simulation box is very small in some dimension, compared to the neighbor cutoff. Use the "nsq" style instead of "bin" style. E: Too many neighbor bins This is likely due to an immense simulation box that has blown up to a large size. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Invalid group ID in neigh_modify command A group ID used in the neigh_modify command does not exist. E: Neigh_modify include group != atom_modify first group Self-explanatory. E: Neigh_modify exclude molecule requires atom attribute molecule Self-explanatory. */ diff --git a/src/pair_beck.h b/src/pair_beck.h index 83c2a812f..8790d67d9 100644 --- a/src/pair_beck.h +++ b/src/pair_beck.h @@ -1,69 +1,72 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(beck,PairBeck) #else #ifndef PAIR_BECK_H #define PAIR_BECK_H #include "pair.h" namespace LAMMPS_NS { class PairBeck : public Pair { public: PairBeck(class LAMMPS *); virtual ~PairBeck(); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); double init_one(int, int); void write_restart(FILE *); void read_restart(FILE *); void write_restart_settings(FILE *); void read_restart_settings(FILE *); double single(int, int, int, int, double, double, double, double &); protected: double cut_global; double **cut; double **AA,**BB; double **aa,**alpha,**beta; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command -UNDOCUMENTED +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients -UNDOCUMENTED +Self-explanatory. Check the input script or data file. E: All pair coeffs are not set -UNDOCUMENTED +All pair coefficients must be set in the data file or by the +pair_coeff command before running a simulation. */ diff --git a/src/pair_born_coul_wolf.cpp b/src/pair_born_coul_wolf.cpp index 0b33eb754..db4a88491 100644 --- a/src/pair_born_coul_wolf.cpp +++ b/src/pair_born_coul_wolf.cpp @@ -1,466 +1,466 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- Contributing author: Yongfeng Zhang (INL), yongfeng.zhang@inl.gov ------------------------------------------------------------------------- */ #include "math.h" #include "stdio.h" #include "stdlib.h" #include "string.h" #include "pair_born_coul_wolf.h" #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "math_const.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; using namespace MathConst; /* ---------------------------------------------------------------------- */ PairBornCoulWolf::PairBornCoulWolf(LAMMPS *lmp) : Pair(lmp) {} /* ---------------------------------------------------------------------- */ PairBornCoulWolf::~PairBornCoulWolf() { if (allocated) { memory->destroy(setflag); memory->destroy(cutsq); memory->destroy(cut_lj); memory->destroy(cut_ljsq); memory->destroy(a); memory->destroy(rho); memory->destroy(sigma); memory->destroy(c); memory->destroy(d); memory->destroy(rhoinv); memory->destroy(born1); memory->destroy(born2); memory->destroy(born3); memory->destroy(offset); } } /* ---------------------------------------------------------------------- */ void PairBornCoulWolf::compute(int eflag, int vflag) { int i,j,ii,jj,inum,jnum,itype,jtype; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; double rsq,r2inv,r6inv,forcecoul,forceborn,factor_coul,factor_lj; double prefactor; double r,rexp; int *ilist,*jlist,*numneigh,**firstneigh; double erfcc,erfcd,v_sh,dvdrr,e_self,e_shift,f_shift,qisq; evdwl = ecoul = 0.0; if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; double **x = atom->x; double **f = atom->f; double *q = atom->q; int *type = atom->type; int nlocal = atom->nlocal; int nall = nlocal + atom->nghost; double *special_coul = force->special_coul; double *special_lj = force->special_lj; int newton_pair = force->newton_pair; double qqrd2e = force->qqrd2e; // self and shifted coulombic energy e_self = v_sh = 0.0; e_shift = erfc(alf*cut_coul)/cut_coul; f_shift = -(e_shift+ 2.0*alf/MY_PIS * exp(-alf*alf*cut_coul*cut_coul)) / cut_coul; inum = list->inum; ilist = list->ilist; numneigh = list->numneigh; firstneigh = list->firstneigh; // loop over neighbors of my atoms for (ii = 0; ii < inum; ii++) { i = ilist[ii]; qtmp = q[i]; xtmp = x[i][0]; ytmp = x[i][1]; ztmp = x[i][2]; itype = type[i]; jlist = firstneigh[i]; jnum = numneigh[i]; qisq = qtmp*qtmp; e_self = -(e_shift/2.0 + alf/MY_PIS) * qisq*qqrd2e; if (evflag) ev_tally(i,i,nlocal,0,0.0,e_self,0.0,0.0,0.0,0.0); for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; factor_lj = special_lj[sbmask(j)]; factor_coul = special_coul[sbmask(j)]; j &= NEIGHMASK; delx = xtmp - x[j][0]; dely = ytmp - x[j][1]; delz = ztmp - x[j][2]; rsq = delx*delx + dely*dely + delz*delz; jtype = type[j]; if (rsq < cutsq[itype][jtype]) { r2inv = 1.0/rsq; if (rsq < cut_coulsq) { r = sqrt(rsq); prefactor = qqrd2e*qtmp*q[j]/r; erfcc = erfc(alf*r); erfcd = exp(-alf*alf*r*r); v_sh = (erfcc - e_shift*r) * prefactor; dvdrr = (erfcc/rsq + 2.0*alf/MY_PIS * erfcd/r) + f_shift; forcecoul = dvdrr*rsq*prefactor; if (factor_coul < 1.0) forcecoul -= (1.0-factor_coul)*prefactor; } else forcecoul = 0.0; if (rsq < cut_ljsq[itype][jtype]) { r6inv = r2inv*r2inv*r2inv; r = sqrt(rsq); rexp = exp((sigma[itype][jtype]-r)*rhoinv[itype][jtype]); forceborn = born1[itype][jtype]*r*rexp - born2[itype][jtype]*r6inv + born3[itype][jtype]*r2inv*r6inv; } else forceborn = 0.0; fpair = (forcecoul + factor_lj*forceborn) * r2inv; f[i][0] += delx*fpair; f[i][1] += dely*fpair; f[i][2] += delz*fpair; if (newton_pair || j < nlocal) { f[j][0] -= delx*fpair; f[j][1] -= dely*fpair; f[j][2] -= delz*fpair; } if (eflag) { if (rsq < cut_coulsq) { ecoul = v_sh; if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor; } else ecoul = 0.0; if (rsq < cut_ljsq[itype][jtype]) { evdwl = a[itype][jtype]*rexp - c[itype][jtype]*r6inv + d[itype][jtype]*r6inv*r2inv - offset[itype][jtype]; evdwl *= factor_lj; } else evdwl = 0.0; } if (evflag) ev_tally(i,j,nlocal,newton_pair, evdwl,ecoul,fpair,delx,dely,delz); } } } if (vflag_fdotr) virial_fdotr_compute(); } /* ---------------------------------------------------------------------- allocate all arrays ------------------------------------------------------------------------- */ void PairBornCoulWolf::allocate() { allocated = 1; int n = atom->ntypes; memory->create(setflag,n+1,n+1,"pair:setflag"); for (int i = 1; i <= n; i++) for (int j = i; j <= n; j++) setflag[i][j] = 0; memory->create(cutsq,n+1,n+1,"pair:cutsq"); memory->create(cut_lj,n+1,n+1,"pair:cut_lj"); memory->create(cut_ljsq,n+1,n+1,"pair:cut_ljsq"); memory->create(a,n+1,n+1,"pair:a"); memory->create(rho,n+1,n+1,"pair:rho"); memory->create(sigma,n+1,n+1,"pair:sigma"); memory->create(c,n+1,n+1,"pair:c"); memory->create(d,n+1,n+1,"pair:d"); memory->create(rhoinv,n+1,n+1,"pair:rhoinv"); memory->create(born1,n+1,n+1,"pair:born1"); memory->create(born2,n+1,n+1,"pair:born2"); memory->create(born3,n+1,n+1,"pair:born3"); memory->create(offset,n+1,n+1,"pair:offset"); } /* ---------------------------------------------------------------------- global settings ------------------------------------------------------------------------- */ void PairBornCoulWolf::settings(int narg, char **arg) { if (narg < 2 || narg > 3) error->all(FLERR,"Illegal pair_style command"); alf = force->numeric(arg[0]); cut_lj_global = force->numeric(arg[1]); if (narg == 2) cut_coul = cut_lj_global; else cut_coul = force->numeric(arg[2]); if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) for (j = i+1; j <= atom->ntypes; j++) if (setflag[i][j]) cut_lj[i][j] = cut_lj_global; } } /* ---------------------------------------------------------------------- set coeffs for one or more type pairs ------------------------------------------------------------------------- */ void PairBornCoulWolf::coeff(int narg, char **arg) { if (narg < 7 || narg > 8) error->all(FLERR,"Incorrect args for pair coefficients"); if (!allocated) allocate(); int ilo,ihi,jlo,jhi; force->bounds(arg[0],atom->ntypes,ilo,ihi); force->bounds(arg[1],atom->ntypes,jlo,jhi); double a_one = force->numeric(arg[2]); double rho_one = force->numeric(arg[3]); double sigma_one = force->numeric(arg[4]); if (rho_one <= 0) error->all(FLERR,"Incorrect args for pair coefficients"); double c_one = force->numeric(arg[5]); double d_one = force->numeric(arg[6]); double cut_lj_one = cut_lj_global; if (narg == 8) cut_lj_one = force->numeric(arg[7]); int count = 0; for (int i = ilo; i <= ihi; i++) { for (int j = MAX(jlo,i); j <= jhi; j++) { a[i][j] = a_one; rho[i][j] = rho_one; sigma[i][j] = sigma_one; c[i][j] = c_one; d[i][j] = d_one; cut_lj[i][j] = cut_lj_one; setflag[i][j] = 1; count++; } } if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); } /* ---------------------------------------------------------------------- init specific to this pair style ------------------------------------------------------------------------- */ void PairBornCoulWolf::init_style() { if (!atom->q_flag) - error->all(FLERR,"Pair style born/coul/Wolf requires atom attribute q"); + error->all(FLERR,"Pair style born/coul/wolf requires atom attribute q"); int irequest = neighbor->request(this); cut_coulsq = cut_coul * cut_coul; } /* ---------------------------------------------------------------------- init for one type pair i,j and corresponding j,i ------------------------------------------------------------------------- */ double PairBornCoulWolf::init_one(int i, int j) { if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); double cut = MAX(cut_lj[i][j],cut_coul); cut_ljsq[i][j] = cut_lj[i][j] * cut_lj[i][j]; rhoinv[i][j] = 1.0/rho[i][j]; born1[i][j] = a[i][j]/rho[i][j]; born2[i][j] = 6.0*c[i][j]; born3[i][j] = 8.0*d[i][j]; if (offset_flag) { double rexp = exp(-cut_lj[i][j]/rho[i][j]); offset[i][j] = a[i][j]*rexp - c[i][j]/pow(cut_lj[i][j],6.0) + d[i][j]/pow(cut_lj[i][j],8.0); } else offset[i][j] = 0.0; cut_ljsq[j][i] = cut_ljsq[i][j]; a[j][i] = a[i][j]; c[j][i] = c[i][j]; d[j][i] = d[i][j]; rhoinv[j][i] = rhoinv[i][j]; sigma[j][i] = sigma[i][j]; born1[j][i] = born1[i][j]; born2[j][i] = born2[i][j]; born3[j][i] = born3[i][j]; offset[j][i] = offset[i][j]; return cut; } /* ---------------------------------------------------------------------- proc 0 writes to restart file ------------------------------------------------------------------------- */ void PairBornCoulWolf::write_restart(FILE *fp) { write_restart_settings(fp); int i,j; for (i = 1; i <= atom->ntypes; i++) for (j = i; j <= atom->ntypes; j++) { fwrite(&setflag[i][j],sizeof(int),1,fp); if (setflag[i][j]) { fwrite(&a[i][j],sizeof(double),1,fp); fwrite(&rho[i][j],sizeof(double),1,fp); fwrite(&sigma[i][j],sizeof(double),1,fp); fwrite(&c[i][j],sizeof(double),1,fp); fwrite(&d[i][j],sizeof(double),1,fp); fwrite(&cut_lj[i][j],sizeof(double),1,fp); } } } /* ---------------------------------------------------------------------- proc 0 reads from restart file, bcasts ------------------------------------------------------------------------- */ void PairBornCoulWolf::read_restart(FILE *fp) { read_restart_settings(fp); allocate(); int i,j; int me = comm->me; for (i = 1; i <= atom->ntypes; i++) for (j = i; j <= atom->ntypes; j++) { if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); if (setflag[i][j]) { if (me == 0) { fread(&a[i][j],sizeof(double),1,fp); fread(&rho[i][j],sizeof(double),1,fp); fread(&sigma[i][j],sizeof(double),1,fp); fread(&c[i][j],sizeof(double),1,fp); fread(&d[i][j],sizeof(double),1,fp); fread(&cut_lj[i][j],sizeof(double),1,fp); } MPI_Bcast(&a[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&rho[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&c[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&d[i][j],1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj[i][j],1,MPI_DOUBLE,0,world); } } } /* ---------------------------------------------------------------------- proc 0 writes to restart file ------------------------------------------------------------------------- */ void PairBornCoulWolf::write_restart_settings(FILE *fp) { fwrite(&alf,sizeof(double),1,fp); fwrite(&cut_lj_global,sizeof(double),1,fp); fwrite(&cut_coul,sizeof(double),1,fp); fwrite(&offset_flag,sizeof(int),1,fp); fwrite(&mix_flag,sizeof(int),1,fp); } /* ---------------------------------------------------------------------- proc 0 reads from restart file, bcasts ------------------------------------------------------------------------- */ void PairBornCoulWolf::read_restart_settings(FILE *fp) { if (comm->me == 0) { fread(&alf,sizeof(double),1,fp); fread(&cut_lj_global,sizeof(double),1,fp); fread(&cut_coul,sizeof(double),1,fp); fread(&offset_flag,sizeof(int),1,fp); fread(&mix_flag,sizeof(int),1,fp); } MPI_Bcast(&alf,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world); MPI_Bcast(&offset_flag,1,MPI_INT,0,world); MPI_Bcast(&mix_flag,1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- only the pair part is calculated here ------------------------------------------------------------------------- */ double PairBornCoulWolf::single(int i, int j, int itype, int jtype, double rsq, double factor_coul, double factor_lj, double &fforce) { double r2inv,r6inv,r,prefactor,rexp; double forcecoul,forceborn,phicoul,phiborn; double e_shift,f_shift,dvdrr,erfcc,erfcd; r2inv = 1.0/rsq; e_shift = erfc(alf*cut_coul) / cut_coul; f_shift = -(e_shift+2*alf/MY_PIS * exp(-alf*alf*cut_coul*cut_coul)) / cut_coul; if (rsq < cut_coulsq) { r = sqrt(rsq); prefactor = force->qqrd2e * atom->q[i]*atom->q[j]/r; erfcc = erfc(alf*r); erfcd = exp(-alf*alf*r*r); dvdrr = (erfcc/rsq + 2.0*alf/MY_PIS * erfcd/r) + f_shift; forcecoul = dvdrr*rsq*prefactor; if (factor_coul < 1.0) forcecoul -= (1.0-factor_coul)*prefactor; } else forcecoul = 0.0; if (rsq < cut_ljsq[itype][jtype]) { r6inv = r2inv*r2inv*r2inv; r = sqrt(rsq); rexp = exp(-r*rhoinv[itype][jtype]); forceborn = born1[itype][jtype]*r*rexp - born2[itype][jtype]*r6inv + born3[itype][jtype]*r2inv*r6inv; } else forceborn = 0.0; fforce = (forcecoul + factor_lj*forceborn) * r2inv; double eng = 0.0; if (rsq < cut_coulsq) { phicoul = prefactor * (erfcc-e_shift*r); if (factor_coul < 1.0) phicoul -= (1.0-factor_coul)*prefactor; eng += phicoul; } if (rsq < cut_ljsq[itype][jtype]) { phiborn = a[itype][jtype]*rexp - c[itype][jtype]*r6inv + d[itype][jtype]*r2inv*r6inv - offset[itype][jtype]; eng += factor_lj*phiborn; } return eng; } diff --git a/src/pair_born_coul_wolf.h b/src/pair_born_coul_wolf.h index 0792682a2..1042e6880 100644 --- a/src/pair_born_coul_wolf.h +++ b/src/pair_born_coul_wolf.h @@ -1,78 +1,78 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(born/coul/wolf,PairBornCoulWolf) #else #ifndef LMP_PAIR_BORN_COUL_WOLF_H #define LMP_PAIR_BORN_COUL_WOLF_H #include "pair.h" namespace LAMMPS_NS { class PairBornCoulWolf : public Pair { public: PairBornCoulWolf(class LAMMPS *); virtual ~PairBornCoulWolf(); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); void init_style(); double init_one(int, int); void write_restart(FILE *); void read_restart(FILE *); void write_restart_settings(FILE *); void read_restart_settings(FILE *); double single(int, int, int, int, double, double, double, double &); protected: double cut_lj_global,alf; double **cut_lj,**cut_ljsq; double cut_coul,cut_coulsq; double **a,**rho,**sigma,**c,**d; double **rhoinv,**born1,**born2,**born3,**offset; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. -E: Pair style born/coul/Wolf requires atom attribute q +E: Pair style born/coul/wolf requires atom attribute q -UNDOCUMENTED +The atom style defined does not have this attribute. E: All pair coeffs are not set All pair coefficients must be set in the data file or by the pair_coeff command before running a simulation. */ diff --git a/src/pair_coul_wolf.h b/src/pair_coul_wolf.h index f4b6f3775..d73602ca8 100644 --- a/src/pair_coul_wolf.h +++ b/src/pair_coul_wolf.h @@ -1,69 +1,69 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(coul/wolf,PairCoulWolf) #else #ifndef LMP_PAIR_COUL_WOLF_H #define LMP_PAIR_COUL_WOLF_H #include "pair.h" namespace LAMMPS_NS { class PairCoulWolf : public Pair { public: PairCoulWolf(class LAMMPS *); virtual ~PairCoulWolf(); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); void init_style(); double init_one(int, int); void write_restart(FILE *); void read_restart(FILE *); void write_restart_settings(FILE *); void read_restart_settings(FILE *); double single(int, int, int, int, double, double, double, double &); protected: double cut_coul,cut_coulsq,alf; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. E: Pair coul/wolf requires atom attribute q -UNDOCUMENTED +The atom style defined does not have this attribute. */ diff --git a/src/pair_dpd.h b/src/pair_dpd.h index e9e0a6782..22e09c161 100644 --- a/src/pair_dpd.h +++ b/src/pair_dpd.h @@ -1,83 +1,83 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(dpd,PairDPD) #else #ifndef LMP_PAIR_DPD_H #define LMP_PAIR_DPD_H #include "pair.h" namespace LAMMPS_NS { class PairDPD : public Pair { public: PairDPD(class LAMMPS *); virtual ~PairDPD(); virtual void compute(int, int); virtual void settings(int, char **); virtual void coeff(int, char **); void init_style(); double init_one(int, int); void write_restart(FILE *); void read_restart(FILE *); virtual void write_restart_settings(FILE *); virtual void read_restart_settings(FILE *); double single(int, int, int, int, double, double, double, double &); protected: double cut_global,temperature; int seed; double **cut; double **a0,**gamma; double **sigma; class RanMars *random; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. E: Pair dpd requires ghost atoms store velocity Use the communicate vel yes command to enable this. W: Pair dpd needs newton pair on for momentum conservation -UNDOCUMENTED +Self-explanatory. E: All pair coeffs are not set All pair coefficients must be set in the data file or by the pair_coeff command before running a simulation. */ diff --git a/src/pair_hybrid.h b/src/pair_hybrid.h index ebe238e1a..e50c201ac 100644 --- a/src/pair_hybrid.h +++ b/src/pair_hybrid.h @@ -1,129 +1,124 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(hybrid,PairHybrid) #else #ifndef LMP_PAIR_HYBRID_H #define LMP_PAIR_HYBRID_H #include "stdio.h" #include "pair.h" namespace LAMMPS_NS { class PairHybrid : public Pair { public: int nstyles; // # of different sub-styles Pair **styles; // list of Pair style classes char **keywords; // style name of each Pair style int *multiple; // 0 if style used once, else Mth instance PairHybrid(class LAMMPS *); virtual ~PairHybrid(); void compute(int, int); void settings(int, char **); virtual void coeff(int, char **); void init_style(); double init_one(int, int); void write_restart(FILE *); void read_restart(FILE *); double single(int, int, int, int, double, double, double, double &); void modify_params(int narg, char **arg); double memory_usage(); void compute_inner(); void compute_middle(); void compute_outer(int, int); void *extract(const char *, int &); void reset_dt(); int check_ijtype(int, int, char *); protected: int **nmap; // # of sub-styles itype,jtype points to int ***map; // list of sub-styles itype,jtype points to char **allstyles; int nallstyles; void allocate(); virtual void modify_requests(); void build_styles(); int known_style(char *); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Pair style hybrid cannot have hybrid as an argument Self-explanatory. E: Pair style hybrid cannot have none as an argument Self-explanatory. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. E: Pair coeff for hybrid has invalid style Style in pair coeff must have been listed in pair_style command. E: Pair hybrid sub-style is not used No pair_coeff command used a sub-style specified in the pair_style command. E: All pair coeffs are not set All pair coefficients must be set in the data file or by the pair_coeff command before running a simulation. E: Invoked pair single on pair style none A command (e.g. a dump) attempted to invoke the single() function on a pair style none, which is illegal. You are probably attempting to compute per-atom quantities with an undefined pair style. E: Pair hybrid sub-style does not support single call You are attempting to invoke a single() call on a pair style that doesn't support it. E: Coulomb cutoffs of pair hybrid sub-styles do not match If using a Kspace solver, all Coulomb cutoffs of long pair styles must be the same. -U: Pair style hybrid cannot use same pair style twice - -The sub-style arguments of pair_style hybrid cannot be duplicated. -Check the input script. - */ diff --git a/src/pair_lj_smooth_linear.h b/src/pair_lj_smooth_linear.h index c45ca10d7..43d9238a7 100644 --- a/src/pair_lj_smooth_linear.h +++ b/src/pair_lj_smooth_linear.h @@ -1,66 +1,68 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(lj/smooth/linear,PairLJSmoothLinear) #else #ifndef PAIR_LJ_SMOOTH_LINEAR_H #define PAIR_LJ_SMOOTH_LINEAR_H #include "pair.h" namespace LAMMPS_NS { class PairLJSmoothLinear : public Pair { public: PairLJSmoothLinear(class LAMMPS *); virtual ~PairLJSmoothLinear(); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); double init_one(int, int); void write_restart(FILE *); void read_restart(FILE *); void write_restart_settings(FILE *); void read_restart_settings(FILE *); double single(int, int, int, int, double, double, double, double &); protected: double cut_global; double **cut; double **epsilon,**sigma; double **ljcut,**dljcut; double **lj1,**lj2,**lj3,**lj4; void allocate(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command -UNDOCUMENTED +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients -UNDOCUMENTED +Self-explanatory. Check the input script or data file. */ diff --git a/src/procmap.cpp b/src/procmap.cpp index 18e740673..e7abb8e4d 100644 --- a/src/procmap.cpp +++ b/src/procmap.cpp @@ -1,893 +1,893 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- Contributing author (NUMA option) : Mike Brown (ORNL) ------------------------------------------------------------------------- */ #include "procmap.h" #include "universe.h" #include "domain.h" #include "math_extra.h" #include "memory.h" #include "error.h" #include <map> #include <string> using namespace LAMMPS_NS; #define MAXLINE 128 enum{MULTIPLE}; // same as in Comm /* ---------------------------------------------------------------------- */ ProcMap::ProcMap(LAMMPS *lmp) : Pointers(lmp) {} /* ---------------------------------------------------------------------- create a one-level 3d grid of procs ------------------------------------------------------------------------- */ void ProcMap::onelevel_grid(int nprocs, int *user_procgrid, int *procgrid, int otherflag, int other_style, int *other_procgrid, int *other_coregrid) { int **factors; // factors = list of all possible 3 factors of processor count int npossible = factor(nprocs,NULL); memory->create(factors,npossible,3,"procmap:factors"); npossible = factor(nprocs,factors); // constrain by 2d, user request, other partition if (domain->dimension == 2) npossible = cull_2d(npossible,factors,3); npossible = cull_user(npossible,factors,3,user_procgrid); if (otherflag) npossible = cull_other(npossible,factors,3, other_style,other_procgrid, other_coregrid); // user/other constraints make failure possible if (npossible == 0) error->all(FLERR,"Could not create 3d grid of processors"); // select best set of 3 factors based on surface area of proc sub-domains best_factors(npossible,factors,procgrid,1,1,1); // clean-up memory->destroy(factors); } /* ---------------------------------------------------------------------- create a two-level 3d grid of procs ------------------------------------------------------------------------- */ void ProcMap::twolevel_grid(int nprocs, int *user_procgrid, int *procgrid, int ncores, int *user_coregrid, int *coregrid, int otherflag, int other_style, int *other_procgrid, int *other_coregrid) { int **nfactors,**cfactors,**factors; if (nprocs % ncores) error->all(FLERR,"Processors twogrid requires proc count " "be a multiple of core count"); // nfactors = list of all possible 3 factors of node count // constrain by 2d int nnpossible = factor(nprocs/ncores,NULL); memory->create(nfactors,nnpossible,3,"procmap:nfactors"); nnpossible = factor(nprocs/ncores,nfactors); if (domain->dimension == 2) nnpossible = cull_2d(nnpossible,nfactors,3); // cfactors = list of all possible 3 factors of core count // constrain by 2d int ncpossible = factor(ncores,NULL); memory->create(cfactors,ncpossible,3,"procmap:cfactors"); ncpossible = factor(ncores,cfactors); if (domain->dimension == 2) ncpossible = cull_2d(ncpossible,cfactors,3); ncpossible = cull_user(ncpossible,cfactors,3,user_coregrid); // factors = all combinations of nfactors and cfactors // factors stores additional index pointing to corresponding cfactors // constrain by user request, other partition int npossible = nnpossible * ncpossible; memory->create(factors,npossible,4,"procmap:factors"); npossible = combine_factors(nnpossible,nfactors,ncpossible,cfactors,factors); npossible = cull_user(npossible,factors,4,user_procgrid); if (otherflag) npossible = cull_other(npossible,factors,4, other_style,other_procgrid, other_coregrid); // user/other constraints make failure possible if (npossible == 0) error->all(FLERR,"Could not create twolevel 3d grid of processors"); // select best set of 3 factors based on surface area of proc sub-domains // index points to corresponding core factorization int index = best_factors(npossible,factors,procgrid,1,1,1); coregrid[0] = cfactors[factors[index][3]][0]; coregrid[1] = cfactors[factors[index][3]][1]; coregrid[2] = cfactors[factors[index][3]][2]; // clean-up memory->destroy(nfactors); memory->destroy(cfactors); memory->destroy(factors); } /* ---------------------------------------------------------------------- create a 3d grid of procs that does a 2-level hierarchy within a node auto-detects NUMA sockets within a multi-core node ------------------------------------------------------------------------- */ void ProcMap::numa_grid(int nprocs, int *user_procgrid, int *procgrid, int *numagrid) { // hardwire this for now int numa_nodes = 1; // get names of all nodes int name_length; char node_name[MPI_MAX_PROCESSOR_NAME]; char node_names[MPI_MAX_PROCESSOR_NAME*nprocs]; MPI_Get_processor_name(node_name,&name_length); MPI_Allgather(&node_name,MPI_MAX_PROCESSOR_NAME,MPI_CHAR,&node_names, MPI_MAX_PROCESSOR_NAME,MPI_CHAR,world); std::string node_string = std::string(node_name); // get number of procs per node std::map<std::string,int> name_map; std::map<std::string,int>::iterator np; for (int i = 0; i < nprocs; i++) { std::string i_string = std::string(&node_names[i*MPI_MAX_PROCESSOR_NAME]); np = name_map.find(i_string); if (np == name_map.end()) name_map[i_string] = 1; else np->second++; } procs_per_node = name_map.begin()->second; procs_per_numa = procs_per_node / numa_nodes; // error if any of these conditions met if (nprocs % procs_per_numa || // total procs not a multiple of node user_procgrid[0] > 1 || // user specified grid > 1 in any dim user_procgrid[1] > 1 || user_procgrid[2] > 1) - error->all(FLERR,"Could not create numa 3d grid of processors"); + error->all(FLERR,"Could not create numa grid of processors"); // user settings for the factorization per numa node // currently not user settable // if user specifies 1 for a proc grid dimension, // also use 1 for the numa grid dimension int user_numagrid[3]; user_numagrid[0] = user_numagrid[1] = user_numagrid[2] = 0; if (user_procgrid[0] == 1) user_numagrid[0] = 1; if (user_procgrid[1] == 1) user_numagrid[1] = 1; if (user_procgrid[2] == 1) user_numagrid[2] = 1; // initial factorization within NUMA node int **numafactors; int numapossible = factor(procs_per_numa,NULL); memory->create(numafactors,numapossible,3,"procmap:numafactors"); numapossible = factor(procs_per_numa,numafactors); if (domain->dimension == 2) numapossible = cull_2d(numapossible,numafactors,3); numapossible = cull_user(numapossible,numafactors,3,user_numagrid); if (numapossible == 0) error->all(FLERR,"Could not create numa grid of processors"); best_factors(numapossible,numafactors,numagrid,1,1,1); // user_nodegrid = implied user contraints on nodes int user_nodegrid[3]; user_nodegrid[0] = user_procgrid[0] / numagrid[0]; user_nodegrid[1] = user_procgrid[1] / numagrid[1]; user_nodegrid[2] = user_procgrid[2] / numagrid[2]; // factorization for the grid of NUMA nodes int node_count = nprocs / procs_per_numa; int **nodefactors; int nodepossible = factor(node_count,NULL); memory->create(nodefactors,nodepossible,3,"procmap:nodefactors"); nodepossible = factor(node_count,nodefactors); if (domain->dimension == 2) nodepossible = cull_2d(nodepossible,nodefactors,3); nodepossible = cull_user(nodepossible,nodefactors,3,user_nodegrid); if (nodepossible == 0) error->all(FLERR,"Could not create numa grid of processors"); best_factors(nodepossible,nodefactors,nodegrid, numagrid[0],numagrid[1],numagrid[2]); // repeat NUMA node factorization using subdomain sizes // refines the factorization if the user specified the node layout // NOTE: this will not re-enforce user-procgrid constraint will it? best_factors(numapossible,numafactors,numagrid, nodegrid[0],nodegrid[1],nodegrid[2]); memory->destroy(numafactors); memory->destroy(nodefactors); // assign a unique id to each node node_id = 0; int node_num = 0; for (np = name_map.begin(); np != name_map.end(); ++np) { if (np->first == node_string) node_id = node_num; node_num++; } // return the proc-level factorization procgrid[0] = nodegrid[0] * numagrid[0]; procgrid[1] = nodegrid[1] * numagrid[1]; procgrid[2] = nodegrid[2] * numagrid[2]; } /* ---------------------------------------------------------------------- define a 3d grid from a custom file ------------------------------------------------------------------------- */ void ProcMap::custom_grid(char *cfile, int nprocs, int *user_procgrid, int *procgrid) { FILE *fp; char line[MAXLINE]; int me; MPI_Comm_rank(world,&me); if (me == 0) { FILE *fp = fopen(cfile,"r"); if (fp == NULL) error->one(FLERR,"Cannot open custom file"); // skip header = blank and comment lines char *ptr; if (!fgets(line,MAXLINE,fp)) error->one(FLERR,"Unexpected end of custom file"); while (1) { if (ptr = strchr(line,'#')) *ptr = '\0'; if (strspn(line," \t\n\r") != strlen(line)) break; if (!fgets(line,MAXLINE,fp)) error->one(FLERR,"Unexpected end of custom file"); } } int n = strlen(line) + 1; MPI_Bcast(&n,1,MPI_INT,0,world); MPI_Bcast(line,n,MPI_CHAR,0,world); sscanf(line,"%d %d %d",&procgrid[0],&procgrid[1],&procgrid[2]); int flag = 0; if (procgrid[0]*procgrid[1]*procgrid[2] != nprocs) flag = 1; if (user_procgrid[0] && procgrid[0] != user_procgrid[0]) flag = 1; if (user_procgrid[1] && procgrid[1] != user_procgrid[1]) flag = 1; if (user_procgrid[2] && procgrid[2] != user_procgrid[2]) flag = 1; if (flag) error->all(FLERR,"Processors custom grid file is inconsistent"); // cmap = map of procs to grid // store for use in custom_map() memory->create(cmap,nprocs,4,"procmap:cmap"); for (int i = 0; i < nprocs; i++) cmap[i][0] = -1; if (me == 0) { for (int i = 0; i < nprocs; i++) { if (!fgets(line,MAXLINE,fp)) error->one(FLERR,"Unexpected end of custom file"); sscanf(line,"%d %d %d %d", &cmap[i][0],&cmap[i][1],&cmap[i][2],&cmap[i][3]); } fclose(fp); } MPI_Bcast(&cmap[0][0],nprocs*4,MPI_INT,0,world); // error check on cmap values flag = 0; for (int i = 0; i < nprocs; i++) { if (cmap[i][0] == -1) flag = 1; else { if (cmap[i][1] <= 0 || cmap[i][1] > procgrid[0]) flag = 1; if (cmap[i][2] <= 0 || cmap[i][2] > procgrid[1]) flag = 1; if (cmap[i][3] <= 0 || cmap[i][3] > procgrid[2]) flag = 1; } } - if (flag) error->all(FLERR,"Processors custom grid file is invalid"); + if (flag) error->all(FLERR,"Processors custom grid file is inconsistent"); } /* ---------------------------------------------------------------------- map processors to 3d grid via MPI_Cart routines MPI may do layout in machine-optimized fashion ------------------------------------------------------------------------- */ void ProcMap::cart_map(int reorder, int *procgrid, int *myloc, int procneigh[3][2], int ***grid2proc) { int periods[3]; periods[0] = periods[1] = periods[2] = 1; MPI_Comm cartesian; MPI_Cart_create(world,3,procgrid,periods,reorder,&cartesian); MPI_Cart_get(cartesian,3,procgrid,periods,myloc); MPI_Cart_shift(cartesian,0,1,&procneigh[0][0],&procneigh[0][1]); MPI_Cart_shift(cartesian,1,1,&procneigh[1][0],&procneigh[1][1]); MPI_Cart_shift(cartesian,2,1,&procneigh[2][0],&procneigh[2][1]); int coords[3]; int i,j,k; for (i = 0; i < procgrid[0]; i++) for (j = 0; j < procgrid[1]; j++) for (k = 0; k < procgrid[2]; k++) { coords[0] = i; coords[1] = j; coords[2] = k; MPI_Cart_rank(cartesian,coords,&grid2proc[i][j][k]); } MPI_Comm_free(&cartesian); } /* ---------------------------------------------------------------------- map processors to 3d grid via MPI_Cart routines respect sub-grid of cores within each node MPI may do layout in machine-optimized fashion ------------------------------------------------------------------------- */ void ProcMap::cart_map(int reorder, int *procgrid, int ncores, int *coregrid, int *myloc, int procneigh[3][2], int ***grid2proc) { // setup NUMA params that numa_grid() sets up int me; MPI_Comm_rank(world,&me); procs_per_node = ncores; procs_per_numa = ncores; node_id = me/ncores; nodegrid[0] = procgrid[0] / coregrid[0]; nodegrid[1] = procgrid[1] / coregrid[1]; nodegrid[2] = procgrid[2] / coregrid[2]; // now can use numa_map() to perform mapping numa_map(reorder,coregrid,myloc,procneigh,grid2proc); } /* ---------------------------------------------------------------------- map processors to 3d grid in XYZ order called by onelevel ------------------------------------------------------------------------- */ void ProcMap::xyz_map(char *xyz, int *procgrid, int *myloc, int procneigh[3][2], int ***grid2proc) { int me; MPI_Comm_rank(world,&me); int i,j,k; for (i = 0; i < procgrid[0]; i++) for (j = 0; j < procgrid[1]; j++) for (k = 0; k < procgrid[2]; k++) { if (xyz[0] == 'x' && xyz[1] == 'y' && xyz[2] == 'z') grid2proc[i][j][k] = k*procgrid[1]*procgrid[0] + j*procgrid[0] + i; else if (xyz[0] == 'x' && xyz[1] == 'z' && xyz[2] == 'y') grid2proc[i][j][k] = j*procgrid[2]*procgrid[0] + k*procgrid[0] + i; else if (xyz[0] == 'y' && xyz[1] == 'x' && xyz[2] == 'z') grid2proc[i][j][k] = k*procgrid[0]*procgrid[1] + i*procgrid[1] + j; else if (xyz[0] == 'y' && xyz[1] == 'z' && xyz[2] == 'x') grid2proc[i][j][k] = i*procgrid[2]*procgrid[1] + k*procgrid[1] + j; else if (xyz[0] == 'z' && xyz[1] == 'x' && xyz[2] == 'y') grid2proc[i][j][k] = j*procgrid[0]*procgrid[2] + i*procgrid[2] + k; else if (xyz[0] == 'z' && xyz[1] == 'y' && xyz[2] == 'x') grid2proc[i][j][k] = i*procgrid[1]*procgrid[2] + j*procgrid[2] + k; if (grid2proc[i][j][k] == me) { myloc[0] = i; myloc[1] = j, myloc[2] = k; } } // proc IDs of neighbors int minus,plus; grid_shift(myloc[0],procgrid[0],minus,plus); procneigh[0][0] = grid2proc[minus][myloc[1]][myloc[2]]; procneigh[0][1] = grid2proc[plus][myloc[1]][myloc[2]]; grid_shift(myloc[1],procgrid[1],minus,plus); procneigh[1][0] = grid2proc[myloc[0]][minus][myloc[2]]; procneigh[1][1] = grid2proc[myloc[0]][plus][myloc[2]]; grid_shift(myloc[2],procgrid[2],minus,plus); procneigh[2][0] = grid2proc[myloc[0]][myloc[1]][minus]; procneigh[2][1] = grid2proc[myloc[0]][myloc[1]][plus]; } /* ---------------------------------------------------------------------- map processors to 3d grid in XYZ order respect sub-grid of cores within each node called by twolevel ------------------------------------------------------------------------- */ void ProcMap::xyz_map(char *xyz, int *procgrid, int ncores, int *coregrid, int *myloc, int procneigh[3][2], int ***grid2proc) { int me; MPI_Comm_rank(world,&me); nodegrid[0] = procgrid[0] / coregrid[0]; nodegrid[1] = procgrid[1] / coregrid[1]; nodegrid[2] = procgrid[2] / coregrid[2]; int i,j,k,inode,jnode,knode,icore,jcore,kcore; for (i = 0; i < procgrid[0]; i++) for (j = 0; j < procgrid[1]; j++) for (k = 0; k < procgrid[2]; k++) { inode = i/coregrid[0]; jnode = j/coregrid[1]; knode = k/coregrid[2]; icore = i % coregrid[0]; jcore = j % coregrid[1]; kcore = k % coregrid[2]; if (xyz[0] == 'x' && xyz[1] == 'y' && xyz[2] == 'z') { grid2proc[i][j][k] = ncores * (knode*nodegrid[1]*nodegrid[0] + jnode*nodegrid[0] + inode) + (kcore*coregrid[1]*coregrid[0] + jcore*coregrid[0] + icore); } else if (xyz[0] == 'x' && xyz[1] == 'z' && xyz[2] == 'y') grid2proc[i][j][k] = ncores * (jnode*nodegrid[2]*nodegrid[0] + knode*nodegrid[0] + inode) + (jcore*coregrid[2]*coregrid[0] + kcore*coregrid[0] + icore); else if (xyz[0] == 'y' && xyz[1] == 'x' && xyz[2] == 'z') grid2proc[i][j][k] = ncores * (knode*nodegrid[0]*nodegrid[1] + inode*nodegrid[1] + jnode) + (kcore*coregrid[0]*coregrid[1] + icore*coregrid[1] + jcore); else if (xyz[0] == 'y' && xyz[1] == 'z' && xyz[2] == 'x') grid2proc[i][j][k] = ncores * (inode*nodegrid[2]*nodegrid[1] + knode*nodegrid[1] + jnode) + (icore*coregrid[2]*coregrid[1] + kcore*coregrid[1] + jcore); else if (xyz[0] == 'z' && xyz[1] == 'x' && xyz[2] == 'y') grid2proc[i][j][k] = ncores * (jnode*nodegrid[0]*nodegrid[2] + inode*nodegrid[2] + knode) + (jcore*coregrid[0]*coregrid[2] + icore*coregrid[2] + kcore); else if (xyz[0] == 'z' && xyz[1] == 'y' && xyz[2] == 'x') grid2proc[i][j][k] = ncores * (inode*nodegrid[1]*nodegrid[2] + jnode*nodegrid[2] + knode) + (icore*coregrid[1]*coregrid[2] + jcore*coregrid[2] + kcore); if (grid2proc[i][j][k] == me) { myloc[0] = i; myloc[1] = j, myloc[2] = k; } } // proc IDs of neighbors int minus,plus; grid_shift(myloc[0],procgrid[0],minus,plus); procneigh[0][0] = grid2proc[minus][myloc[1]][myloc[2]]; procneigh[0][1] = grid2proc[plus][myloc[1]][myloc[2]]; grid_shift(myloc[1],procgrid[1],minus,plus); procneigh[1][0] = grid2proc[myloc[0]][minus][myloc[2]]; procneigh[1][1] = grid2proc[myloc[0]][plus][myloc[2]]; grid_shift(myloc[2],procgrid[2],minus,plus); procneigh[2][0] = grid2proc[myloc[0]][myloc[1]][minus]; procneigh[2][1] = grid2proc[myloc[0]][myloc[1]][plus]; } /* ---------------------------------------------------------------------- map processors to 3d grid in 2-level NUMA ordering ------------------------------------------------------------------------- */ void ProcMap::numa_map(int reorder, int *numagrid, int *myloc, int procneigh[3][2], int ***grid2proc) { // setup a per node communicator and find rank within MPI_Comm node_comm; MPI_Comm_split(world,node_id,0,&node_comm); int node_rank; MPI_Comm_rank(node_comm,&node_rank); // setup a per numa communicator and find rank within MPI_Comm numa_comm; int local_numa = node_rank / procs_per_numa; MPI_Comm_split(node_comm,local_numa,0,&numa_comm); int numa_rank; MPI_Comm_rank(numa_comm,&numa_rank); // setup a communicator with the rank 0 procs from each numa node MPI_Comm numa_leaders; MPI_Comm_split(world,numa_rank,0,&numa_leaders); // use the MPI Cartesian routines to map the nodes to the grid int periods[3]; periods[0] = periods[1] = periods[2] = 1; MPI_Comm cartesian; if (numa_rank == 0) { MPI_Cart_create(numa_leaders,3,nodegrid,periods,reorder,&cartesian); MPI_Cart_get(cartesian,3,nodegrid,periods,myloc); } // broadcast numa node location in grid to other procs in numa node MPI_Bcast(myloc,3,MPI_INT,0,numa_comm); // compute my location within the node grid int z_offset = numa_rank / (numagrid[0] * numagrid[1]); int y_offset = (numa_rank % (numagrid[0] * numagrid[1]))/numagrid[0]; int x_offset = numa_rank % numagrid[0]; myloc[0] = myloc[0] * numagrid[0] + x_offset; myloc[1] = myloc[1] * numagrid[1] + y_offset; myloc[2] = myloc[2] * numagrid[2] + z_offset; // allgather of myloc into gridi to fill grid2proc int nprocs; MPI_Comm_size(world,&nprocs); int **gridi; memory->create(gridi,nprocs,3,"comm:gridi"); MPI_Allgather(myloc,3,MPI_INT,gridi[0],3,MPI_INT,world); for (int i = 0; i < nprocs; i++) grid2proc[gridi[i][0]][gridi[i][1]][gridi[i][2]] = i; memory->destroy(gridi); // proc IDs of neighbors int minus,plus; grid_shift(myloc[0],nodegrid[0]*numagrid[0],minus,plus); procneigh[0][0] = grid2proc[minus][myloc[1]][myloc[2]]; procneigh[0][1] = grid2proc[plus][myloc[1]][myloc[2]]; grid_shift(myloc[1],nodegrid[1]*numagrid[1],minus,plus); procneigh[1][0] = grid2proc[myloc[0]][minus][myloc[2]]; procneigh[1][1] = grid2proc[myloc[0]][plus][myloc[2]]; grid_shift(myloc[2],nodegrid[2]*numagrid[2],minus,plus); procneigh[2][0] = grid2proc[myloc[0]][myloc[1]][minus]; procneigh[2][1] = grid2proc[myloc[0]][myloc[1]][plus]; // clean-up if (numa_rank == 0) MPI_Comm_free(&cartesian); MPI_Comm_free(&numa_leaders); MPI_Comm_free(&numa_comm); MPI_Comm_free(&node_comm); } /* ---------------------------------------------------------------------- map processors to 3d grid in custom ordering ------------------------------------------------------------------------- */ void ProcMap::custom_map(int *procgrid, int *myloc, int procneigh[3][2], int ***grid2proc) { int me,nprocs; MPI_Comm_rank(world,&me); MPI_Comm_size(world,&nprocs); for (int i = 0; i < nprocs; i++) { grid2proc[cmap[i][1]-1][cmap[i][2]-1][cmap[i][3]-1] = cmap[i][0]; if (cmap[i][0] == me) { myloc[0] = cmap[i][1] - 1; myloc[1] = cmap[i][2] - 1; myloc[2] = cmap[i][3] - 1; } } // proc IDs of neighbors int minus,plus; grid_shift(myloc[0],procgrid[0],minus,plus); procneigh[0][0] = grid2proc[minus][myloc[1]][myloc[2]]; procneigh[0][1] = grid2proc[plus][myloc[1]][myloc[2]]; grid_shift(myloc[1],procgrid[1],minus,plus); procneigh[1][0] = grid2proc[myloc[0]][minus][myloc[2]]; procneigh[1][1] = grid2proc[myloc[0]][plus][myloc[2]]; grid_shift(myloc[2],procgrid[2],minus,plus); procneigh[2][0] = grid2proc[myloc[0]][myloc[1]][minus]; procneigh[2][1] = grid2proc[myloc[0]][myloc[1]][plus]; memory->destroy(cmap); } /* ---------------------------------------------------------------------- output mapping of processors to 3d grid to file ------------------------------------------------------------------------- */ void ProcMap::output(char *file, int *procgrid, int ***grid2proc) { int me,nprocs; MPI_Comm_rank(world,&me); MPI_Comm_size(world,&nprocs); FILE *fp; if (me == 0) { fp = fopen(file,"w"); - if (fp == NULL) error->one(FLERR,"Cannot open processors custom file"); + if (fp == NULL) error->one(FLERR,"Cannot open processors output file"); fprintf(fp,"LAMMPS mapping of processors to 3d grid\n"); fprintf(fp,"partition = %d\n",universe->iworld+1); fprintf(fp,"Px Py Pz = %d %d %d\n",procgrid[0],procgrid[1],procgrid[2]); fprintf(fp,"world-ID universe-ID original-ID: I J K: name\n\n"); } // find me in the grid int ime,jme,kme; for (int i = 0; i < procgrid[0]; i++) for (int j = 0; j < procgrid[1]; j++) for (int k = 0; k < procgrid[2]; k++) if (grid2proc[i][j][k] == me) { ime = i; jme = j; kme = k; } // polled comm of grid mapping info from each proc to proc 0 int tmp; int vec[6]; char procname[MPI_MAX_PROCESSOR_NAME+1]; MPI_Status status; vec[0] = me; vec[1] = universe->me; MPI_Comm_rank(universe->uorig,&vec[2]); vec[3] = ime + 1; vec[4] = jme + 1; vec[5] = kme + 1; int len; MPI_Get_processor_name(procname,&len); procname[len] = '\0'; if (me == 0) { for (int iproc = 0; iproc < nprocs; iproc++) { if (iproc) { MPI_Send(&tmp,0,MPI_INT,iproc,0,world); MPI_Recv(vec,6,MPI_INT,iproc,0,world,&status); MPI_Recv(procname,MPI_MAX_PROCESSOR_NAME+1,MPI_CHAR, iproc,0,world,&status); } fprintf(fp,"%d %d %d: %d %d %d: %s\n", vec[0],vec[1],vec[2],vec[3],vec[4],vec[5],procname); } } else { MPI_Recv(&tmp,0,MPI_INT,0,0,world,&status); MPI_Send(vec,6,MPI_INT,0,0,world); MPI_Send(procname,strlen(procname)+1,MPI_CHAR,0,0,world); } // close output file if (me == 0) fclose(fp); } /* ---------------------------------------------------------------------- generate all possible 3-integer factorizations of N store them in factors if non-NULL return # of factorizations ------------------------------------------------------------------------- */ int ProcMap::factor(int n, int **factors) { int i,j,nyz; int m = 0; for (i = 1; i <= n; i++) { if (n % i) continue; nyz = n/i; for (j = 1; j <= nyz; j++) { if (nyz % j) continue; if (factors) { factors[m][0] = i; factors[m][1] = j; factors[m][2] = nyz/j; } m++; } } return m; } /* ---------------------------------------------------------------------- create N1*N2 new factors (procs) from factors1 (nodes) and factors2 (cores) store index of corresponding core factors in factors[][3] ------------------------------------------------------------------------- */ int ProcMap::combine_factors(int n1, int **factors1, int n2, int **factors2, int **factors) { int m = 0; for (int i = 0; i < n1; i++) for (int j = 0; j < n2; j++) { factors[m][0] = factors1[i][0]*factors2[j][0]; factors[m][1] = factors1[i][1]*factors2[j][1]; factors[m][2] = factors1[i][2]*factors2[j][2]; factors[m][3] = j; m++; } return n1*n2; } /* ---------------------------------------------------------------------- remove any factors where Pz != 1 for 2d ------------------------------------------------------------------------- */ int ProcMap::cull_2d(int n, int **factors, int m) { int i = 0; while (i < n) { if (factors[i][2] != 1) { for (int j = 0; j < m; j++) factors[i][j] = factors[n-1][j]; n--; } else i++; } return n; } /* ---------------------------------------------------------------------- remove any factors that do not match non-zero user_factors Px,Py,Pz ------------------------------------------------------------------------- */ int ProcMap::cull_user(int n, int **factors, int m, int *user_factors) { int i = 0; while (i < n) { int flag = 0; if (user_factors[0] && factors[i][0] != user_factors[0]) flag = 1; if (user_factors[1] && factors[i][1] != user_factors[1]) flag = 1; if (user_factors[2] && factors[i][2] != user_factors[2]) flag = 1; if (flag) { for (int j = 0; j < m; j++) factors[i][j] = factors[n-1][j]; n--; } else i++; } return n; } /* ---------------------------------------------------------------------- remove any factors that do not match settings from other partition MULTIPLE = other Nx,Ny,Nz must be multiple of my Px,Py,Pz where Nx,Ny,Nz = node grid = procgrid/coregrid ------------------------------------------------------------------------- */ int ProcMap::cull_other(int n, int **factors, int m, int other_style, int *other_procgrid, int *other_coregrid) { int i = 0; while (i < n) { if (other_style == MULTIPLE) { int flag = 0; if ((other_procgrid[0]/other_coregrid[0]) % factors[i][0]) flag = 1; if ((other_procgrid[1]/other_coregrid[1]) % factors[i][1]) flag = 1; if ((other_procgrid[2]/other_coregrid[2]) % factors[i][2]) flag = 1; if (flag) { for (int j = 0; j < m; j++) factors[i][j] = factors[n-1][j]; n--; } else i++; } } return n; } /* ---------------------------------------------------------------------- choose best factors from list of Npossible factors best = minimal surface area of sub-domain return best = 3 factors return index of best factors in factors ------------------------------------------------------------------------- */ int ProcMap::best_factors(int npossible, int **factors, int *best, const int sx, const int sy, const int sz) { // determine cross-sectional areas for orthogonal and triclinic boxes // for triclinic, area = cross product of 2 edge vectors stored in h matrix // area[3] = surface area 3 box faces divided by sx,sy,sz // area[0] = xy, area[1] = xz, area[2] = yz double area[3]; if (domain->triclinic == 0) { area[0] = domain->xprd * domain->yprd / (sx*sy); area[1] = domain->xprd * domain->zprd / (sx*sz); area[2] = domain->yprd * domain->zprd / (sy*sz); } else { double *h = domain->h; double a[3],b[3],c[3]; a[0] = h[0]; a[1] = 0.0; a[2] = 0.0; b[0] = h[5]; b[1] = h[1]; b[2] = 0.0; MathExtra::cross3(a,b,c); area[0] = sqrt(c[0]*c[0] + c[1]*c[1] + c[2]*c[2]) / (sx*sy); a[0] = h[0]; a[1] = 0.0; a[2] = 0.0; b[0] = h[4]; b[1] = h[3]; b[2] = h[2]; MathExtra::cross3(a,b,c); area[1] = sqrt(c[0]*c[0] + c[1]*c[1] + c[2]*c[2]) / (sx*sz); a[0] = h[5]; a[1] = h[1]; a[2] = 0.0; b[0] = h[4]; b[1] = h[3]; b[2] = h[2]; MathExtra::cross3(a,b,c); area[2] = sqrt(c[0]*c[0] + c[1]*c[1] + c[2]*c[2]) / (sy*sz); } int index; double surf; double bestsurf = 2.0 * (area[0]+area[1]+area[2]); for (int m = 0; m < npossible; m++) { surf = area[0]/factors[m][0]/factors[m][1] + area[1]/factors[m][0]/factors[m][2] + area[2]/factors[m][1]/factors[m][2]; if (surf < bestsurf) { bestsurf = surf; best[0] = factors[m][0]; best[1] = factors[m][1]; best[2] = factors[m][2]; index = m; } } return index; } /* ---------------------------------------------------------------------- minus,plus = indices of neighboring processors in a dimension ------------------------------------------------------------------------- */ void ProcMap::grid_shift(int myloc, int nprocs, int &minus, int &plus) { minus = myloc - 1; if (minus < 0) minus = nprocs - 1; plus = myloc + 1; if (plus == nprocs) plus = 0; } diff --git a/src/procmap.h b/src/procmap.h index b29bedb5c..7929d3bb7 100644 --- a/src/procmap.h +++ b/src/procmap.h @@ -1,101 +1,100 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_PROCMAP_H #define LMP_PROCMAP_H #include "pointers.h" namespace LAMMPS_NS { class ProcMap : protected Pointers { public: ProcMap(class LAMMPS *); ~ProcMap() {} void onelevel_grid(int, int *, int *, int, int, int *, int *); void twolevel_grid(int, int *, int *, int, int *, int *, int, int, int *, int *); void numa_grid(int, int *, int *, int *); void custom_grid(char *, int, int *, int *); void cart_map(int, int *, int *, int [3][2], int ***); void cart_map(int, int *, int, int *, int *, int [3][2], int ***); void xyz_map(char *, int *, int *, int [3][2], int ***); void xyz_map(char *, int *, int, int *, int *, int [3][2], int ***); void numa_map(int, int *, int *, int [3][2], int ***); void custom_map(int *, int *, int [3][2], int ***); void output(char *, int *, int ***); private: int procs_per_node; // NUMA params int procs_per_numa; int node_id; // which node I am in int nodegrid[3]; // 3d grid of nodes int **cmap; // info in custom grid file int factor(int, int **); int combine_factors(int, int **, int, int **, int **); int cull_2d(int, int **, int); int cull_user(int, int **, int, int *); int cull_other(int, int **, int, int, int *, int *); int best_factors(int, int **, int *, int, int, int); void grid_shift(int, int, int &, int &); }; } #endif /* ERROR/WARNING messages: E: Could not create 3d grid of processors -UNDOCUMENTED +The specified constraints did not allow a Px by Py by Pz grid to be +created where Px * Py * Pz = P = total number of processors. E: Processors twogrid requires proc count be a multiple of core count -UNDOCUMENTED +Self-explanatory. E: Could not create twolevel 3d grid of processors -UNDOCUMENTED - -E: Could not create numa 3d grid of processors - -UNDOCUMENTED +The specified constraints did not allow this style of grid to be +created. E: Could not create numa grid of processors -UNDOCUMENTED +The specified constraints did not allow this style of grid to be +created. Usually this is because the total processor count is not a +multiple of the cores/node or the user specified processor count is > +1 in one of the dimensions. E: Cannot open custom file -UNDOCUMENTED +Self-explanatory. E: Unexpected end of custom file -UNDOCUMENTED +Self-explanatory. E: Processors custom grid file is inconsistent -UNDOCUMENTED - -E: Processors custom grid file is invalid - -UNDOCUMENTED +The vales in the custom file are not consistent with the number of +processors you are running on or the Px,Py,Pz settings of the +processors command. Or there was not a setting for every processor. -E: Cannot open processors custom file +E: Cannot open processors output file -UNDOCUMENTED +Self-explanatory. */ diff --git a/src/read_data.h b/src/read_data.h index 22073f615..52a3e053c 100644 --- a/src/read_data.h +++ b/src/read_data.h @@ -1,390 +1,392 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMMAND_CLASS CommandStyle(read_data,ReadData) #else #ifndef LMP_READ_DATA_H #define LMP_READ_DATA_H #include "stdio.h" #include "pointers.h" namespace LAMMPS_NS { class ReadData : protected Pointers { public: ReadData(class LAMMPS *); ~ReadData(); void command(int, char **); private: int me; char *line,*keyword,*buffer; FILE *fp; int narg,maxarg,compressed; char **arg; bigint nellipsoids; class AtomVecEllipsoid *avec_ellipsoid; bigint nlines; class AtomVecLine *avec_line; bigint ntris; class AtomVecTri *avec_tri; void open(char *); void scan(int &, int &, int &, int &); int reallocate(int **, int, int); void header(int); void parse_keyword(int, int); void skip_lines(int); void parse_coeffs(char *, const char *, int); void atoms(); void velocities(); void bonus(bigint, class AtomVec *, const char *); void bonds(); void angles(); void dihedrals(); void impropers(); void mass(); void paircoeffs(); void bondcoeffs(); void anglecoeffs(int); void dihedralcoeffs(int); void impropercoeffs(int); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Cannot read_data after simulation box is defined The read_data command cannot be used after a read_data, read_restart, or create_box command. E: Cannot run 2d simulation with nonperiodic Z dimension Use the boundary command to make the z dimension periodic in order to run a 2d simulation. E: Must read Atoms before Velocities The Atoms section of a data file must come before a Velocities section. E: Invalid data file section: Ellipsoids -UNDOCUMENTED +Atom style does not allow ellipsoids. E: Must read Atoms before Ellipsoids -UNDOCUMENTED +The Atoms section of a data file must come before a Ellipsoids +section. E: Invalid data file section: Lines -UNDOCUMENTED +Atom style does not allow lines. E: Must read Atoms before Lines -UNDOCUMENTED +The Atoms section of a data file must come before a Lines section. E: Invalid data file section: Triangles -UNDOCUMENTED +Atom style does not allow triangles. E: Must read Atoms before Triangles -UNDOCUMENTED +The Atoms section of a data file must come before a Triangles section. E: Invalid data file section: Bonds Atom style does not allow bonds. E: Must read Atoms before Bonds The Atoms section of a data file must come before a Bonds section. E: Invalid data file section: Angles Atom style does not allow angles. E: Must read Atoms before Angles The Atoms section of a data file must come before an Angles section. E: Invalid data file section: Dihedrals Atom style does not allow dihedrals. E: Must read Atoms before Dihedrals The Atoms section of a data file must come before a Dihedrals section. E: Invalid data file section: Impropers Atom style does not allow impropers. E: Must read Atoms before Impropers The Atoms section of a data file must come before an Impropers section. E: Must define pair_style before Pair Coeffs Must use a pair_style command before reading a data file that defines Pair Coeffs. E: Invalid data file section: Bond Coeffs Atom style does not allow bonds. E: Must define bond_style before Bond Coeffs Must use a bond_style command before reading a data file that defines Bond Coeffs. E: Invalid data file section: Angle Coeffs Atom style does not allow angles. E: Must define angle_style before Angle Coeffs Must use an angle_style command before reading a data file that defines Angle Coeffs. E: Invalid data file section: Dihedral Coeffs Atom style does not allow dihedrals. E: Must define dihedral_style before Dihedral Coeffs Must use a dihedral_style command before reading a data file that defines Dihedral Coeffs. E: Invalid data file section: Improper Coeffs Atom style does not allow impropers. E: Must define improper_style before Improper Coeffs Must use an improper_style command before reading a data file that defines Improper Coeffs. E: Invalid data file section: BondBond Coeffs Atom style does not allow angles. E: Must define angle_style before BondBond Coeffs Must use an angle_style command before reading a data file that defines Angle Coeffs. E: Invalid data file section: BondAngle Coeffs Atom style does not allow angles. E: Must define angle_style before BondAngle Coeffs Must use an angle_style command before reading a data file that defines Angle Coeffs. E: Invalid data file section: MiddleBondTorsion Coeffs Atom style does not allow dihedrals. E: Must define dihedral_style before MiddleBondTorsion Coeffs Must use a dihedral_style command before reading a data file that defines MiddleBondTorsion Coeffs. E: Invalid data file section: EndBondTorsion Coeffs Atom style does not allow dihedrals. E: Must define dihedral_style before EndBondTorsion Coeffs Must use a dihedral_style command before reading a data file that defines EndBondTorsion Coeffs. E: Invalid data file section: AngleTorsion Coeffs Atom style does not allow dihedrals. E: Must define dihedral_style before AngleTorsion Coeffs Must use a dihedral_style command before reading a data file that defines AngleTorsion Coeffs. E: Invalid data file section: AngleAngleTorsion Coeffs Atom style does not allow dihedrals. E: Must define dihedral_style before AngleAngleTorsion Coeffs Must use a dihedral_style command before reading a data file that defines AngleAngleTorsion Coeffs. E: Invalid data file section: BondBond13 Coeffs Atom style does not allow dihedrals. E: Must define dihedral_style before BondBond13 Coeffs Must use a dihedral_style command before reading a data file that defines BondBond13 Coeffs. E: Invalid data file section: AngleAngle Coeffs Atom style does not allow impropers. E: Must define improper_style before AngleAngle Coeffs Must use an improper_style command before reading a data file that defines AngleAngle Coeffs. E: Unknown identifier in data file: %s A section of the data file cannot be read by LAMMPS. E: No atoms in data file The header of the data file indicated that atoms would be included, but they were not present. E: Unexpected end of data file LAMMPS hit the end of the data file while attempting to read a section. Something is wrong with the format of the data file. E: No ellipsoids allowed with this atom style -UNDOCUMENTED +Self-explanatory. Check data file. E: No lines allowed with this atom style -UNDOCUMENTED +Self-explanatory. Check data file. E: No triangles allowed with this atom style -UNDOCUMENTED +Self-explanatory. Check data file. E: System in data file is too big See the setting for bigint in the src/lmptype.h file. E: No bonds allowed with this atom style Self-explanatory. Check data file. E: No angles allowed with this atom style Self-explanatory. Check data file. E: No dihedrals allowed with this atom style Self-explanatory. Check data file. E: No impropers allowed with this atom style Self-explanatory. Check data file. E: Bonds defined but no bond types The data file header lists bonds but no bond types. E: Angles defined but no angle types The data file header lists angles but no angle types. E: Dihedrals defined but no dihedral types The data file header lists dihedrals but no dihedral types. E: Impropers defined but no improper types The data file header lists improper but no improper types. E: Did not assign all atoms correctly Atoms read in from a data file were not assigned correctly to processors. This is likely due to some atom coordinates being outside a non-periodic simulation box. E: Invalid atom ID in Atoms section of data file Atom IDs must be positive integers. E: Bonds assigned incorrectly Bonds read in from the data file were not assigned correctly to atoms. This means there is something invalid about the topology definitions. E: Angles assigned incorrectly Angles read in from the data file were not assigned correctly to atoms. This means there is something invalid about the topology definitions. E: Dihedrals assigned incorrectly Dihedrals read in from the data file were not assigned correctly to atoms. This means there is something invalid about the topology definitions. E: Impropers assigned incorrectly Impropers read in from the data file were not assigned correctly to atoms. This means there is something invalid about the topology definitions. E: Molecular data file has too many atoms These kids of data files are currently limited to a number of atoms that fits in a 32-bit integer. E: Needed topology not in data file The header of the data file indicated that bonds or angles or dihedrals or impropers would be included, but they were not present. E: Needed bonus data not in data file -UNDOCUMENTED +Some atom styles require bonus data. See the read_data doc page for +details. E: Cannot open gzipped file LAMMPS is attempting to open a gzipped version of the specified file but was unsuccessful. Check that the path and name are correct. E: Cannot open file %s The specified file cannot be opened. Check that the path and name are correct. */ diff --git a/src/run.h b/src/run.h index d4fb7fc28..4d0c8ddf8 100644 --- a/src/run.h +++ b/src/run.h @@ -1,76 +1,76 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMMAND_CLASS CommandStyle(run,Run) #else #ifndef LMP_RUN_H #define LMP_RUN_H #include "pointers.h" namespace LAMMPS_NS { class Run : protected Pointers { public: Run(class LAMMPS *); void command(int, char **); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Run command before simulation box is defined The run command cannot be used before a read_data, read_restart, or create_box command. E: Invalid run command N value The number of timesteps must fit in a 32-bit integer. If you want to run for more steps than this, perform multiple shorter runs. E: Invalid run command upto value Self-explanatory. E: Invalid run command start/stop value Self-explanatory. E: Run command start value is after start of run Self-explanatory. E: Run command stop value is before end of run Self-explanatory. E: Too many timesteps -UNDOCUMENTED +The cummulative timesteps must fit in a 64-bit integer. */ diff --git a/src/set.h b/src/set.h index 6c9c27cea..8b466abac 100644 --- a/src/set.h +++ b/src/set.h @@ -1,156 +1,156 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMMAND_CLASS CommandStyle(set,Set) #else #ifndef LMP_SET_H #define LMP_SET_H #include "pointers.h" namespace LAMMPS_NS { class Set : protected Pointers { public: Set(class LAMMPS *lmp) : Pointers(lmp) {}; void command(int, char **); private: char *id; int *select; int style,ivalue,newtype,count; int ximage,yimage,zimage,ximageflag,yimageflag,zimageflag; double dvalue,xvalue,yvalue,zvalue,wvalue,fraction; void selection(int); void set(int); void setrandom(int); void topology(int); }; } #endif #endif /* ERROR/WARNING messages: E: Set command before simulation box is defined The set command cannot be used before a read_data, read_restart, or create_box command. E: Set command with no atoms existing No atoms are yet defined so the set command cannot be used. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Invalid value in set command The value specified for the setting is invalid, likely because it is too small or too large. E: Invalid random number seed in set command Random number seed must be > 0. E: Cannot set this attribute for this atom style The attribute being set does not exist for the defined atom style. E: Invalid mass in set command -UNDOCUMENTED +Self-explanatory. E: Invalid shape in set command -UNDOCUMENTED +Self-explanatory. E: Invalid length in set command -UNDOCUMENTED +Self-explanatory. E: Invalid dipole length in set command -UNDOCUMENTED +Self-explanatory. E: Invalid diameter in set command -UNDOCUMENTED +Self-explanatory. E: Cannot set non-zero image flag for non-periodic dimension Self-explanatory. E: Cannot set meso_rho for this atom style -UNDOCUMENTED +Self-explanatory. E: Cannot use set atom with no atom IDs defined Atom IDs are not defined, so they cannot be used to identify an atom. E: Cannot use set mol with no molecule IDs defined -UNDOCUMENTED +Self-explanatory. E: Could not find set group ID Group ID specified in set command does not exist. E: Set region ID does not exist Region ID specified in set command does not exist. E: Cannot set quaternion for atom that has none -UNDOCUMENTED +Self-explanatory. E: Cannot set theta for atom that is not a line -UNDOCUMENTED +Self-explanatory. E: Bond atom missing in set command The set command cannot find one or more atoms in a particular bond on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid bond. E: Angle atom missing in set command The set command cannot find one or more atoms in a particular angle on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid angle. E: Dihedral atom missing in set command The set command cannot find one or more atoms in a particular dihedral on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid dihedral. E: Improper atom missing in set command The set command cannot find one or more atoms in a particular improper on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid improper. */ diff --git a/src/thermo.h b/src/thermo.h index c616c0f46..1e6610f57 100644 --- a/src/thermo.h +++ b/src/thermo.h @@ -1,379 +1,391 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_THERMO_H #define LMP_THERMO_H #include "pointers.h" namespace LAMMPS_NS { class Thermo : protected Pointers { friend class WriteRestart; // accesses lostflag friend class MinCG; // accesses compute_pe public: char *style; int normflag; // 0 if do not normalize by atoms, 1 if normalize int modified; // 1 if thermo_modify has been used, else 0 int cudable; // 1 if all computes used are cudable Thermo(class LAMMPS *, int, char **); ~Thermo(); void init(); bigint lost_check(); void modify_params(int, char **); void header(); void compute(int); int evaluate_keyword(char *, double *); private: char *line; char **keyword; int *vtype; int nfield,nfield_initial; int me; char **format,**format_user; char *format_float_one_def,*format_float_multi_def; char *format_int_one_def,*format_int_multi_def; char *format_float_user,*format_int_user,*format_bigint_user; char format_multi[128]; char format_bigint_one_def[8],format_bigint_multi_def[8]; int normvalue; // use this for normflag unless natoms = 0 int normuserflag; // 0 if user has not set, 1 if has int normuser; int firststep; int lostflag,lostbefore; int flushflag,lineflag; double last_tpcpu,last_spcpu; double last_time; bigint last_step; bigint natoms; // data used by routines that compute single values int ivalue; // integer value to print double dvalue; // double value to print bigint bivalue; // big integer value to print int ifield; // which field in thermo output is being computed int *field2index; // which compute,fix,variable calcs this field int *argindex1; // indices into compute,fix scalar,vector int *argindex2; // data for keyword-specific Compute objects // index = where they are in computes list // id = ID of Compute objects // Compute * = ptrs to the Compute objects int index_temp,index_press_scalar,index_press_vector,index_pe; char *id_temp,*id_press,*id_pe; class Compute *temperature,*pressure,*pe; int ncompute; // # of Compute objects called by thermo char **id_compute; // their IDs int *compute_which; // 0/1/2 if should call scalar,vector,array class Compute **computes; // list of ptrs to the Compute objects int nfix; // # of Fix objects called by thermo char **id_fix; // their IDs class Fix **fixes; // list of ptrs to the Fix objects int nvariable; // # of variables evaulated by thermo char **id_variable; // list of variable names int *variables; // list of Variable indices // private methods void allocate(); void deallocate(); void parse_fields(char *); int add_compute(const char *, int); int add_fix(const char *); int add_variable(const char *); typedef void (Thermo::*FnPtr)(); void addfield(const char *, FnPtr, int); FnPtr *vfunc; // list of ptrs to functions void compute_compute(); // functions that compute a single value void compute_fix(); // via calls to Compute,Fix,Variable classes void compute_variable(); // functions that compute a single value // customize a new keyword by adding a method prototype void compute_step(); void compute_elapsed(); void compute_elapsed_long(); void compute_dt(); void compute_cpu(); void compute_tpcpu(); void compute_spcpu(); void compute_atoms(); void compute_temp(); void compute_press(); void compute_pe(); void compute_ke(); void compute_etotal(); void compute_enthalpy(); void compute_evdwl(); void compute_ecoul(); void compute_epair(); void compute_ebond(); void compute_eangle(); void compute_edihed(); void compute_eimp(); void compute_emol(); void compute_elong(); void compute_etail(); void compute_vol(); void compute_lx(); void compute_ly(); void compute_lz(); void compute_xlo(); void compute_xhi(); void compute_ylo(); void compute_yhi(); void compute_zlo(); void compute_zhi(); void compute_xy(); void compute_xz(); void compute_yz(); void compute_xlat(); void compute_ylat(); void compute_zlat(); void compute_pxx(); void compute_pyy(); void compute_pzz(); void compute_pxy(); void compute_pyz(); void compute_pxz(); void compute_fmax(); void compute_fnorm(); void compute_cella(); void compute_cellb(); void compute_cellc(); void compute_cellalpha(); void compute_cellbeta(); void compute_cellgamma(); }; } #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Could not find thermo compute ID Compute ID specified in thermo_style command does not exist. E: Could not find thermo fix ID Fix ID specified in thermo_style command does not exist. E: Thermo and fix not computed at compatible times Fixes generate values on specific timesteps. The thermo output does not match these timesteps. E: Could not find thermo variable name -UNDOCUMENTED +Self-explanatory. E: Too many total atoms See the setting for bigint in the src/lmptype.h file. E: Lost atoms: original %ld current %ld -UNDOCUMENTED +Lost atoms are checked for each time thermo output is done. See the +thermo_modify lost command for options. Lost atoms usually indicate +bad dynamics, e.g. atoms have been blown far out of the simulation +box, or moved futher than one processor's sub-domain away before +reneighboring. + +W: Lost atoms: original %ld current %ld + +Lost atoms are checked for each time thermo output is done. See the +thermo_modify lost command for options. Lost atoms usually indicate +bad dynamics, e.g. atoms have been blown far out of the simulation +box, or moved futher than one processor's sub-domain away before +reneighboring. E: Thermo style does not use temp Cannot use thermo_modify to set this parameter since the thermo_style is not computing this quantity. E: Could not find thermo_modify temperature ID The compute ID needed by thermo style custom to compute temperature does not exist. E: Thermo_modify temperature ID does not compute temperature The specified compute ID does not compute temperature. W: Temperature for thermo pressure is not for group all User-assigned temperature to thermo via the thermo_modify command does not compute temperature for all atoms. Since thermo computes a global pressure, the kinetic energy contribution from the temperature is assumed to also be for all atoms. Thus the pressure printed by thermo could be inaccurate. E: Pressure ID for thermo does not exist The compute ID needed to compute pressure for thermodynamics does not exist. E: Thermo style does not use press Cannot use thermo_modify to set this parameter since the thermo_style is not computing this quantity. E: Could not find thermo_modify pressure ID The compute ID needed by thermo style custom to compute pressure does not exist. E: Thermo_modify pressure ID does not compute pressure The specified compute ID does not compute pressure. E: Thermo_modify int format does not contain d character Self-explanatory. E: Thermo keyword requires lattice be defined The xlat, ylat, zlat keywords refer to lattice properties. E: Could not find thermo custom compute ID The compute ID needed by thermo style custom to compute a requested quantity does not exist. E: Thermo compute does not compute scalar Self-explanatory. E: Thermo compute does not compute vector Self-explanatory. E: Thermo compute vector is accessed out-of-range Self-explanatory. E: Thermo compute does not compute array Self-explanatory. E: Thermo compute array is accessed out-of-range Self-explanatory. E: Could not find thermo custom fix ID The fix ID needed by thermo style custom to compute a requested quantity does not exist. E: Thermo fix does not compute scalar Self-explanatory. E: Thermo fix does not compute vector Self-explanatory. E: Thermo fix vector is accessed out-of-range Self-explanatory. E: Thermo fix does not compute array Self-explanatory. E: Thermo fix array is accessed out-of-range Self-explanatory. E: Could not find thermo custom variable name Self-explanatory. E: Thermo custom variable is not equal-style variable Only equal-style variables can be output with thermodynamics, not atom-style variables. E: Thermo custom variable cannot be indexed Self-explanatory. E: Invalid keyword in thermo_style custom command One or more specified keywords are not recognized. E: This variable thermo keyword cannot be used between runs Keywords that refer to time (such as cpu, elapsed) do not make sense in between runs. E: Thermo keyword in variable requires thermo to use/init temp You are using a thermo keyword in a variable that requires temperature to be calculated, but your thermo output does not use it. Add it to your thermo output. E: Compute used in variable thermo keyword between runs is not current Some thermo keywords rely on a compute to calculate their value(s). Computes cannot be invoked by a variable in between runs. Thus they must have been evaluated on the last timestep of the previous run in order for their value(s) to be accessed. See the doc page for the variable command for more info. E: Thermo keyword in variable requires thermo to use/init press You are using a thermo keyword in a variable that requires pressure to be calculated, but your thermo output does not use it. Add it to your thermo output. E: Thermo keyword in variable requires thermo to use/init pe You are using a thermo keyword in a variable that requires potential energy to be calculated, but your thermo output does not use it. Add it to your thermo output. E: Energy was not tallied on needed timestep You are using a thermo keyword that requires potentials to have tallied energy, but they didn't on this timestep. See the variable doc page for ideas on how to make this work. E: Thermo keyword in variable requires lattice be defined The xlat, ylat, zlat keywords refer to lattice properties. */ diff --git a/src/universe.cpp b/src/universe.cpp index 903817293..bc96b2485 100644 --- a/src/universe.cpp +++ b/src/universe.cpp @@ -1,195 +1,195 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #include "mpi.h" #include "stdlib.h" #include "string.h" #include "stdio.h" #include "universe.h" #include "version.h" #include "error.h" #include "memory.h" using namespace LAMMPS_NS; #define MAXLINE 256 /* ---------------------------------------------------------------------- create & initialize the universe of processors in communicator ------------------------------------------------------------------------- */ Universe::Universe(LAMMPS *lmp, MPI_Comm communicator) : Pointers(lmp) { version = (char *) LAMMPS_VERSION "-ICMS"; uworld = uorig = communicator; MPI_Comm_rank(uworld,&me); MPI_Comm_size(uworld,&nprocs); uscreen = stdout; ulogfile = NULL; existflag = 0; nworlds = 0; procs_per_world = NULL; root_proc = NULL; memory->create(uni2orig,nprocs,"universe:uni2orig"); for (int i = 0; i < nprocs; i++) uni2orig[i] = i; } /* ---------------------------------------------------------------------- */ Universe::~Universe() { if (uworld != uorig) MPI_Comm_free(&uworld); memory->destroy(procs_per_world); memory->destroy(root_proc); memory->destroy(uni2orig); } /* ---------------------------------------------------------------------- reorder universe processors create uni2orig as inverse mapping re-create uworld communicator with new ordering via Comm_split() style = "nth", arg = N move every Nth proc to end of rankings style = "custom", arg = filename file has nprocs lines with I J I = universe proc ID in original communicator uorig J = universe proc ID in reordered communicator uworld ------------------------------------------------------------------------- */ void Universe::reorder(char *style, char *arg) { char line[MAXLINE]; if (uworld != uorig) MPI_Comm_free(&uworld); if (strcmp(style,"nth") == 0) { int n = atoi(arg); if (n <= 0) error->universe_all(FLERR,"Invalid -reorder N value"); if (nprocs % n) error->universe_all(FLERR,"Nprocs not a multiple of N for -reorder"); for (int i = 0; i < nprocs; i++) { if (i < (n-1)*nprocs/n) uni2orig[i] = i/(n-1) * n + (i % (n-1)); else uni2orig[i] = (i - (n-1)*nprocs/n) * n + n-1; } } else if (strcmp(style,"custom") == 0) { if (me == 0) { FILE *fp = fopen(arg,"r"); if (fp == NULL) error->universe_one(FLERR,"Cannot open -reorder file"); // skip header = blank and comment lines char *ptr; if (!fgets(line,MAXLINE,fp)) error->one(FLERR,"Unexpected end of -reorder file"); while (1) { if (ptr = strchr(line,'#')) *ptr = '\0'; if (strspn(line," \t\n\r") != strlen(line)) break; if (!fgets(line,MAXLINE,fp)) error->one(FLERR,"Unexpected end of -reorder file"); } // read nprocs lines // uni2orig = inverse mapping int me_orig,me_new; sscanf(line,"%d %d",&me_orig,&me_new); if (me_orig < 0 || me_orig >= nprocs || me_new < 0 || me_new >= nprocs) - error->one(FLERR,"Invalid entry in reorder file"); + error->one(FLERR,"Invalid entry in -reorder file"); uni2orig[me_new] = me_orig; for (int i = 1; i < nprocs; i++) { if (!fgets(line,MAXLINE,fp)) - error->one(FLERR,"Unexpected end of reorder file"); + error->one(FLERR,"Unexpected end of -reorder file"); sscanf(line,"%d %d",&me_orig,&me_new); if (me_orig < 0 || me_orig >= nprocs || me_new < 0 || me_new >= nprocs) - error->one(FLERR,"Invalid entry in reorder file"); + error->one(FLERR,"Invalid entry in -reorder file"); uni2orig[me_new] = me_orig; } fclose(fp); } // bcast uni2org from proc 0 to all other universe procs MPI_Bcast(uni2orig,nprocs,MPI_INT,0,uorig); } else error->universe_all(FLERR,"Invalid command-line argument"); // create new uworld communicator int ome,key; MPI_Comm_rank(uorig,&ome); for (int i = 0; i < nprocs; i++) if (uni2orig[i] == ome) key = i; MPI_Comm_split(uorig,0,key,&uworld); MPI_Comm_rank(uworld,&me); MPI_Comm_size(uworld,&nprocs); } /* ---------------------------------------------------------------------- add 1 or more worlds to universe str == NULL -> add 1 world with all procs in universe str = NxM -> add N worlds, each with M procs str = P -> add 1 world with P procs ------------------------------------------------------------------------- */ void Universe::add_world(char *str) { int n,nper; char *ptr; if (str == NULL) { n = 1; nper = nprocs; } else if ((ptr = strchr(str,'x')) != NULL) { *ptr = '\0'; n = atoi(str); nper = atoi(ptr+1); } else { n = 1; nper = atoi(str); } memory->grow(procs_per_world,nworlds+n,"universe:procs_per_world"); memory->grow(root_proc,(nworlds+n),"universe:root_proc"); for (int i = 0; i < n; i++) { procs_per_world[nworlds] = nper; if (nworlds == 0) root_proc[nworlds] = 0; else root_proc[nworlds] = root_proc[nworlds-1] + procs_per_world[nworlds-1]; if (me >= root_proc[nworlds]) iworld = nworlds; nworlds++; } } /* ---------------------------------------------------------------------- check if total procs in all worlds = procs in universe ------------------------------------------------------------------------- */ int Universe::consistent() { int n = 0; for (int i = 0; i < nworlds; i++) n += procs_per_world[i]; if (n == nprocs) return 1; else return 0; } diff --git a/src/universe.h b/src/universe.h index 2be90c72a..a6d9519de 100644 --- a/src/universe.h +++ b/src/universe.h @@ -1,84 +1,80 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_UNIVERSE_H #define LMP_UNIVERSE_H #include "stdio.h" #include "pointers.h" namespace LAMMPS_NS { class Universe : protected Pointers { public: char *version; // LAMMPS version string = date MPI_Comm uworld; // communicator for entire universe int me,nprocs; // my place in universe FILE *uscreen; // universe screen output FILE *ulogfile; // universe logfile int existflag; // 1 if universe exists due to -partition flag int nworlds; // # of worlds in universe int iworld; // which world I am in int *procs_per_world; // # of procs in each world int *root_proc; // root proc in each world MPI_Comm uorig; // original communicator passed to LAMMPS instance int *uni2orig; // proc I in universe uworld is // proc uni2orig[I] in original communicator Universe(class LAMMPS *, MPI_Comm); ~Universe(); void reorder(char *, char *); void add_world(char *); int consistent(); }; } #endif /* ERROR/WARNING messages: E: Invalid -reorder N value -UNDOCUMENTED +Self-explanatory. E: Nprocs not a multiple of N for -reorder -UNDOCUMENTED +Self-explanatory. E: Cannot open -reorder file -UNDOCUMENTED +Self-explanatory. E: Unexpected end of -reorder file -UNDOCUMENTED +Self-explanatory. -E: Invalid entry in reorder file +E: Invalid entry in -reorder file -UNDOCUMENTED - -E: Unexpected end of reorder file - -UNDOCUMENTED +Self-explanatory. E: Invalid command-line argument One or more command-line arguments is invalid. Check the syntax of the command you are using to launch LAMMPS. */ diff --git a/src/update.h b/src/update.h index 525aa07b7..69be427e5 100644 --- a/src/update.h +++ b/src/update.h @@ -1,115 +1,115 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_UPDATE_H #define LMP_UPDATE_H #include "pointers.h" namespace LAMMPS_NS { class Update : protected Pointers { public: double dt; // timestep double etol,ftol; // minimizer tolerances on energy/force bigint ntimestep; // current step (dynamics or min iterations) int nsteps; // # of steps to run (dynamics or min iter) int whichflag; // 0 for unset, 1 for dynamics, 2 for min bigint firststep,laststep; // 1st & last step of this run bigint beginstep,endstep; // 1st and last step of multiple runs int first_update; // 0 before initial update, 1 after int max_eval; // max force evaluations for minimizer int restrict_output; // 1 if output should not write dump/restart int setupflag; // set when setup() is computing forces int multireplica; // 1 if min across replicas, else 0 bigint eflag_global,eflag_atom; // timestep global/peratom eng is tallied on bigint vflag_global,vflag_atom; // ditto for virial char *unit_style; class Integrate *integrate; char *integrate_style; class Min *minimize; char *minimize_style; Update(class LAMMPS *); ~Update(); void init(); void set_units(const char *); void create_integrate(int, char **, char *); void create_minimize(int, char **); void reset_timestep(int, char **); bigint memory_usage(); private: void new_integrate(char *, int, char **, char *, int &); }; } #endif /* ERROR/WARNING messages: E: USER-CUDA mode requires CUDA variant of run style -UNDOCUMENTED +CUDA mode is enabled, so the run style must include a cuda suffix. E: USER-CUDA mode requires CUDA variant of min style -UNDOCUMENTED +CUDA mode is enabled, so the min style must include a cuda suffix. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Illegal integrate style -UNDOCUMENTED +Self-explanatory. E: Cannot reset timestep with dump file already written to Changing the timestep will confuse when a dump file is written. Use the undump command, then restart the dump file. E: Cannot reset timestep with restart file already written Changing the timestep will confuse when a restart file is written. Use the "restart 0" command to turn off restarts, then start them again. E: Cannot reset timestep with a time-dependent fix defined You cannot reset the timestep when a fix that keeps track of elapsed time is in place. E: Cannot reset timestep with a dynamic region defined Dynamic regions (see the region command) have a time dependence. Thus you cannot change the timestep when one or more of these are defined. E: Timestep must be >= 0 -Specified timestep size is invalid. +Specified timestep is invalid. E: Too big a timestep -UNDOCUMENTED +Specified timestep is too large. */ diff --git a/src/version.h b/src/version.h index c339a3811..9d9580e1e 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "12 Feb 2012" +#define LAMMPS_VERSION "13 Feb 2012"