diff --git a/doc/Section_commands.html b/doc/Section_commands.html index 3df64ec59..f3551e16f 100644 --- a/doc/Section_commands.html +++ b/doc/Section_commands.html @@ -1,643 +1,643 @@ <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). </P> <P>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". </P> <P>How the variable is converted to a text string depends on what style of variable it is; see the <A HREF = "variable">variable</A> doc page for details. It can be a variable that stores multiple text strings, and return one of them. The returned text string can be multiple "words" (space separated) which will then be interpreted as multiple arguments in the input command. The variable can also store a numeric formula which will be evaluated and its numeric result returned as a string. </P> <P>As a special case, if the $ is followed by parenthesis, then the text inside the parenthesis is treated as an "immediate" variable and evaluated as an <A HREF = "variable.html">equal-style variable</A>. This is a way to use numeric formulas in an input script without having to assign them to variable names. For example, these 3 input script lines: </P> <PRE>variable X equal (xlo+xhi)/2+sqrt(v_area) region 1 block $X 2 INF INF EDGE EDGE variable X delete </PRE> <P>can be replaced by </P> <PRE>region 1 block $((xlo+xhi)/2+sqrt(v_area)) 2 INF INF EDGE EDGE </PRE> <P>so that you do not have to define (or discard) a temporary variable X. </P> <P>Note that neither the curly-bracket or immediate form of variables can contain nested $ characters for other variables to substitute for. Thus you cannot do this: </P> <PRE>variable a equal 2 variable b2 equal 4 print "B2 = ${b$a}" </PRE> <P>Nor can you specify this $($x-1.0) for an immediate variable, but you could use $(v_x-1.0), since the latter is valid syntax for an <A HREF = "variable.html">equal-style variable</A>. </P> <P>See the <A HREF = "variable.html">variable</A> command for more details of how strings are assigned to variables and evaluated, and how they can be used 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. A long single argument enclosed in quotes can even span multiple lines if the "&" character is used, as described above. E.g. </P> <PRE>print "Volume = $v" print 'Volume = $v' variable a string "red green blue & purple orange cyan" if "$<I>steps</I> > 1000" then quit </PRE> <P>The quotes are removed when the single argument is stored internally. </P> <P>See the <A HREF = "dump_modify.html">dump modify format</A> or <A HREF = "print.html">print</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_dump.html">read_dump</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 = "comm_style.html">comm_style</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 = "dump_image.html">dump movie</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_data.html">write_data</A>, <A HREF = "write_dump.html">write_dump</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 = "rerun.html">rerun</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 = "box.html">box</A></TD><TD ><A HREF = "change_box.html">change_box</A></TD><TD ><A HREF = "clear.html">clear</A></TD><TD ><A HREF = "comm_modify.html">comm_modify</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "comm_style.html">comm_style</A></TD><TD ><A HREF = "compute.html">compute</A></TD><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></TR> <TR ALIGN="center"><TD ><A HREF = "delete_bonds.html">delete_bonds</A></TD><TD ><A HREF = "dielectric.html">dielectric</A></TD><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></TR> <TR ALIGN="center"><TD ><A HREF = "dump.html">dump</A></TD><TD ><A HREF = "dump_image.html">dump image</A></TD><TD ><A HREF = "dump_modify.html">dump_modify</A></TD><TD ><A HREF = "dump_image.html">dump movie</A></TD><TD ><A HREF = "echo.html">echo</A></TD><TD ><A HREF = "fix.html">fix</A></TD></TR> <TR ALIGN="center"><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><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></TR> <TR ALIGN="center"><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><TD ><A HREF = "label.html">label</A></TD><TD ><A HREF = "lattice.html">lattice</A></TD><TD ><A HREF = "log.html">log</A></TD></TR> <TR ALIGN="center"><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><TD ><A HREF = "min_style.html">min_style</A></TD><TD ><A HREF = "molecule.html">molecule</A></TD><TD ><A HREF = "neb.html">neb</A></TD></TR> <TR ALIGN="center"><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><TD ><A HREF = "package.html">package</A></TD><TD ><A HREF = "pair_coeff.html">pair_coeff</A></TD></TR> <TR ALIGN="center"><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><TD ><A HREF = "prd.html">prd</A></TD><TD ><A HREF = "print.html">print</A></TD></TR> <TR ALIGN="center"><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_dump.html">read_dump</A></TD><TD ><A HREF = "read_restart.html">read_restart</A></TD><TD ><A HREF = "region.html">region</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "replicate.html">replicate</A></TD><TD ><A HREF = "rerun.html">rerun</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_data.html">write_data</A></TD><TD ><A HREF = "write_dump.html">write_dump</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "write_restart.html">write_restart</A> </TD></TR></TABLE></DIV> <P>These are additional commands in USER packages, 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 = "group2ndx.html">group2ndx</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. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. </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 (c)</A></TD><TD ><A HREF = "fix_append_atoms.html">append/atoms</A></TD><TD ><A HREF = "fix_aveforce.html">aveforce (c)</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_balance.html">balance</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></TR> <TR ALIGN="center"><TD ><A HREF = "fix_drag.html">drag</A></TD><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 (c)</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 (c)</A></TD><TD ><A HREF = "fix_gcmc.html">gcmc</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "fix_gld.html">gld</A></TD><TD ><A HREF = "fix_gravity.html">gravity (co)</A></TD><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 (k)</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></TR> <TR ALIGN="center"><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 (o)</A></TD><TD ><A HREF = "fix_nphug.html">nphug (o)</A></TD><TD ><A HREF = "fix_nph_asphere.html">nph/asphere (o)</A></TD><TD ><A HREF = "fix_nph_sphere.html">nph/sphere (o)</A></TD><TD ><A HREF = "fix_nh.html">npt (co)</A></TD><TD ><A HREF = "fix_npt_asphere.html">npt/asphere (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "fix_npt_sphere.html">npt/sphere (o)</A></TD><TD ><A HREF = "fix_nve.html">nve (cko)</A></TD><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_body.html">nve/body</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></TR> <TR ALIGN="center"><TD ><A HREF = "fix_nve_sphere.html">nve/sphere (o)</A></TD><TD ><A HREF = "fix_nve_tri.html">nve/tri</A></TD><TD ><A HREF = "fix_nh.html">nvt (co)</A></TD><TD ><A HREF = "fix_nvt_asphere.html">nvt/asphere (o)</A></TD><TD ><A HREF = "fix_nvt_sllod.html">nvt/sllod (o)</A></TD><TD ><A HREF = "fix_nvt_sphere.html">nvt/sphere (o)</A></TD><TD ><A HREF = "fix_oneway.html">oneway</A></TD><TD ><A HREF = "fix_orient_fcc.html">orient/fcc</A></TD></TR> <TR ALIGN="center"><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><TD ><A HREF = "fix_property_atom.html">property/atom</A></TD><TD ><A HREF = "fix_qeq_comb.html">qeq/comb (o)</A></TD><TD ><A HREF = "fix_qeq.html">qeq/dynamic</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "fix_qeq.html">qeq/point</A></TD><TD ><A HREF = "fix_qeq.html">qeq/shielded</A></TD><TD ><A HREF = "fix_qeq.html">qeq/slater</A></TD><TD ><A HREF = "fix_reax_bonds.html">reax/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 (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/nph (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "fix_rigid.html">rigid/npt (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/nve (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/nvt (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small/nph</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small/npt</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small/nve</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small/nvt</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "fix_setforce.html">setforce (c)</A></TD><TD ><A HREF = "fix_shake.html">shake (c)</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 (c)</A></TD><TD ><A HREF = "fix_temp_csvr.html">temp/csvr</A></TD><TD ><A HREF = "fix_temp_rescale.html">temp/rescale (c)</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_tune_kspace.html">tune/kspace</A></TD><TD ><A HREF = "fix_vector.html">vector</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "fix_viscosity.html">viscosity</A></TD><TD ><A HREF = "fix_viscous.html">viscous (c)</A></TD><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/lj1043</A></TD><TD ><A HREF = "fix_wall.html">wall/lj126</A></TD><TD ><A HREF = "fix_wall.html">wall/lj93</A></TD></TR> <TR ALIGN="center"><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><TD ><A HREF = "fix_wall_srd.html">wall/srd</A> </TD></TR></TABLE></DIV> <P>These are additional fix styles in USER packages, 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_adapt_fep.html">adapt/fep</A></TD><TD ><A HREF = "fix_addtorque.html">addtorque</A></TD><TD ><A HREF = "fix_atc.html">atc</A></TD><TD ><A HREF = "fix_colvars.html">colvars</A></TD><TD ><A HREF = "fix_imd.html">imd</A></TD><TD ><A HREF = "fix_langevin_eff.html">langevin/eff</A></TD></TR> -<TR ALIGN="center"><TD ><A HREF = "fix_lb_fluid.html">lb/fluid</A></TD><TD ><A HREF = "fix_lb_momentum.html">lb/momentum</A></TD><TD ><A HREF = "fix_lb_pc.html">lb/pc</A></TD><TD ><A HREF = "fix_lb_rigid_pc_sphere.html">lb/rigid/pc/sphere</A></TD><TD ><A HREF = "fix_lb_viscous.html">lb/viscous</A></TD><TD ><A HREF = "fix_meso.html">meso</A></TD></TR> -<TR ALIGN="center"><TD ><A HREF = "fix_meso_stationary.html">meso/stationary</A></TD><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></TR> -<TR ALIGN="center"><TD ><A HREF = "fix_phonon.html">phonon</A></TD><TD ><A HREF = "fix_qeq_reax.html">qeq/reax</A></TD><TD ><A HREF = "fix_qmmm.html">qmmm</A></TD><TD ><A HREF = "fix_reax_bonds.html">reax/c/bonds</A></TD><TD ><A HREF = "fix_reaxc_species.html">reax/c/species</A></TD><TD ><A HREF = "fix_smd.html">smd</A></TD></TR> -<TR ALIGN="center"><TD ><A HREF = "fix_temp_rescale_eff.html">temp/rescale/eff</A></TD><TD ><A HREF = "fix_ti_rs.html">ti/rs</A></TD><TD ><A HREF = "fix_ti_spring.html">ti/spring</A> +<TR ALIGN="center"><TD ><A HREF = "fix_adapt_fep.html">adapt/fep</A></TD><TD ><A HREF = "fix_addtorque.html">addtorque</A></TD><TD ><A HREF = "fix_atc.html">atc</A></TD><TD ><A HREF = "fix_ave_spatial_sphere.html">ave/spatial/sphere</A></TD><TD ><A HREF = "fix_colvars.html">colvars</A></TD><TD ><A HREF = "fix_imd.html">imd</A></TD></TR> +<TR ALIGN="center"><TD ><A HREF = "fix_langevin_eff.html">langevin/eff</A></TD><TD ><A HREF = "fix_lb_fluid.html">lb/fluid</A></TD><TD ><A HREF = "fix_lb_momentum.html">lb/momentum</A></TD><TD ><A HREF = "fix_lb_pc.html">lb/pc</A></TD><TD ><A HREF = "fix_lb_rigid_pc_sphere.html">lb/rigid/pc/sphere</A></TD><TD ><A HREF = "fix_lb_viscous.html">lb/viscous</A></TD></TR> +<TR ALIGN="center"><TD ><A HREF = "fix_meso.html">meso</A></TD><TD ><A HREF = "fix_meso_stationary.html">meso/stationary</A></TD><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></TR> +<TR ALIGN="center"><TD ><A HREF = "fix_nvt_sllod_eff.html">nvt/sllod/eff</A></TD><TD ><A HREF = "fix_phonon.html">phonon</A></TD><TD ><A HREF = "fix_qeq_reax.html">qeq/reax</A></TD><TD ><A HREF = "fix_qmmm.html">qmmm</A></TD><TD ><A HREF = "fix_reax_bonds.html">reax/c/bonds</A></TD><TD ><A HREF = "fix_reaxc_species.html">reax/c/species</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><TD ><A HREF = "fix_ti_rs.html">ti/rs</A></TD><TD ><A HREF = "fix_ti_spring.html">ti/spring</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. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. </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_body_local.html">body/local</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></TR> <TR ALIGN="center"><TD ><A HREF = "compute_cna_atom.html">cna/atom</A></TD><TD ><A HREF = "compute_com.html">com</A></TD><TD ><A HREF = "compute_com_molecule.html">com/molecule</A></TD><TD ><A HREF = "compute_contact_atom.html">contact/atom</A></TD><TD ><A HREF = "compute_coord_atom.html">coord/atom</A></TD><TD ><A HREF = "compute_damage_atom.html">damage/atom</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_dihedral_local.html">dihedral/local</A></TD><TD ><A HREF = "compute_dilatation_atom.html">dilatation/atom</A></TD><TD ><A HREF = "compute_displace_atom.html">displace/atom</A></TD><TD ><A HREF = "compute_erotate_asphere.html">erotate/asphere</A></TD><TD ><A HREF = "compute_erotate_rigid.html">erotate/rigid</A></TD><TD ><A HREF = "compute_erotate_sphere.html">erotate/sphere</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_erotate_sphere_atom.html">erotate/sphere/atom</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><TD ><A HREF = "compute_heat_flux.html">heat/flux</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_improper_local.html">improper/local</A></TD><TD ><A HREF = "compute_inertia_molecule.html">inertia/molecule</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_ke_rigid.html">ke/rigid</A></TD><TD ><A HREF = "compute_msd.html">msd</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_msd_molecule.html">msd/molecule</A></TD><TD ><A HREF = "compute_msd_nongauss.html">msd/nongauss</A></TD><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 (c)</A></TD><TD ><A HREF = "compute_pe_atom.html">pe/atom</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_plasticity_atom.html">plasticity/atom</A></TD><TD ><A HREF = "compute_pressure.html">pressure (c)</A></TD><TD ><A HREF = "compute_property_atom.html">property/atom</A></TD><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></TR> <TR ALIGN="center"><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><TD ><A HREF = "compute_sna.html">sna/atom</A></TD><TD ><A HREF = "compute_sna.html">snad/atom</A></TD><TD ><A HREF = "compute_sna.html">snav/atom</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_stress_atom.html">stress/atom</A></TD><TD ><A HREF = "compute_temp.html">temp (c)</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 (c)</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><TD ><A HREF = "compute_vacf.html">vacf</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "compute_voronoi_atom.html">voronoi/atom</A> </TD></TR></TABLE></DIV> <P>These are additional compute styles in USER packages, 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_basal_atom.html">basal/atom</A></TD><TD ><A HREF = "compute_fep.html">fep</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></TR> <TR ALIGN="center"><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><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> <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. Many of the styles have accelerated versions, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. </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 (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_airebo.html">airebo (o)</A></TD><TD ><A HREF = "pair_beck.html">beck (go)</A></TD><TD ><A HREF = "pair_body.html">body</A></TD><TD ><A HREF = "pair_bop.html">bop</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_born.html">born (go)</A></TD><TD ><A HREF = "pair_born.html">born/coul/long (cgo)</A></TD><TD ><A HREF = "pair_born.html">born/coul/msm (o)</A></TD><TD ><A HREF = "pair_born.html">born/coul/wolf (go)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_brownian.html">brownian (o)</A></TD><TD ><A HREF = "pair_brownian.html">brownian/poly (o)</A></TD><TD ><A HREF = "pair_buck.html">buck (cgo)</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/cut (cgo)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_buck.html">buck/coul/long (cgo)</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/msm (o)</A></TD><TD ><A HREF = "pair_buck_long.html">buck/long/coul/long (o)</A></TD><TD ><A HREF = "pair_colloid.html">colloid (go)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_comb.html">comb (o)</A></TD><TD ><A HREF = "pair_comb.html">comb3</A></TD><TD ><A HREF = "pair_coul.html">coul/cut (gko)</A></TD><TD ><A HREF = "pair_coul.html">coul/debye (go)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_coul.html">coul/dsf (go)</A></TD><TD ><A HREF = "pair_coul.html">coul/long (go)</A></TD><TD ><A HREF = "pair_coul.html">coul/msm</A></TD><TD ><A HREF = "pair_coul.html">coul/wolf (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_dpd.html">dpd (o)</A></TD><TD ><A HREF = "pair_dpd.html">dpd/tstat (o)</A></TD><TD ><A HREF = "pair_dsmc.html">dsmc</A></TD><TD ><A HREF = "pair_eam.html">eam (cgot)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam/alloy (cgot)</A></TD><TD ><A HREF = "pair_eam.html">eam/fs (cgot)</A></TD><TD ><A HREF = "pair_eim.html">eim (o)</A></TD><TD ><A HREF = "pair_gauss.html">gauss (go)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_gayberne.html">gayberne (gio)</A></TD><TD ><A HREF = "pair_gran.html">gran/hertz/history (o)</A></TD><TD ><A HREF = "pair_gran.html">gran/hooke (co)</A></TD><TD ><A HREF = "pair_gran.html">gran/hooke/history (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_hbond_dreiding.html">hbond/dreiding/lj (o)</A></TD><TD ><A HREF = "pair_hbond_dreiding.html">hbond/dreiding/morse (o)</A></TD><TD ><A HREF = "pair_kim.html">kim</A></TD><TD ><A HREF = "pair_lcbop.html">lcbop</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_line_lj.html">line/lj (o)</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm (co)</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/implicit (co)</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long (cgio)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/msm</A></TD><TD ><A HREF = "pair_class2.html">lj/class2 (cgo)</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/cut (co)</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/long (cgo)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut (cgikot)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/cut (cgko)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/debye (cgo)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/dsf (go)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/coul/long (cgikot)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/msm (go)</A></TD><TD ><A HREF = "pair_dipole.html">lj/cut/dipole/cut (go)</A></TD><TD ><A HREF = "pair_dipole.html">lj/cut/dipole/long</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/tip4p/cut (o)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/tip4p/long (ot)</A></TD><TD ><A HREF = "pair_lj_expand.html">lj/expand (cgo)</A></TD><TD ><A HREF = "pair_gromacs.html">lj/gromacs (cgo)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_gromacs.html">lj/gromacs/coul/gromacs (co)</A></TD><TD ><A HREF = "pair_lj_long.html">lj/long/coul/long (o)</A></TD><TD ><A HREF = "pair_dipole.html">lj/long/dipole/long</A></TD><TD ><A HREF = "pair_lj_long.html">lj/long/tip4p/long</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lj_smooth.html">lj/smooth (co)</A></TD><TD ><A HREF = "pair_lj_smooth_linear.html">lj/smooth/linear (o)</A></TD><TD ><A HREF = "pair_lj96.html">lj96/cut (cgo)</A></TD><TD ><A HREF = "pair_lubricate.html">lubricate (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_lubricate.html">lubricate/poly (o)</A></TD><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 (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_mie.html">mie/cut (o)</A></TD><TD ><A HREF = "pair_morse.html">morse (cgot)</A></TD><TD ><A HREF = "pair_nb3b_harmonic.html">nb3b/harmonic (o)</A></TD><TD ><A HREF = "pair_nm.html">nm/cut (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_nm.html">nm/cut/coul/cut (o)</A></TD><TD ><A HREF = "pair_nm.html">nm/cut/coul/long (o)</A></TD><TD ><A HREF = "pair_peri.html">peri/eps</A></TD><TD ><A HREF = "pair_peri.html">peri/lps (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_peri.html">peri/pmb (o)</A></TD><TD ><A HREF = "pair_peri.html">peri/ves</A></TD><TD ><A HREF = "pair_reax.html">reax</A></TD><TD ><A HREF = "pair_airebo.html">rebo (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_resquared.html">resquared (go)</A></TD><TD ><A HREF = "pair_snap.html">snap</A></TD><TD ><A HREF = "pair_soft.html">soft (go)</A></TD><TD ><A HREF = "pair_sw.html">sw (cgo)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_table.html">table (gko)</A></TD><TD ><A HREF = "pair_tersoff.html">tersoff (co)</A></TD><TD ><A HREF = "pair_tersoff_mod.html">tersoff/mod (o)</A></TD><TD ><A HREF = "pair_tersoff_zbl.html">tersoff/zbl (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_coul.html">tip4p/cut (o)</A></TD><TD ><A HREF = "pair_coul.html">tip4p/long (o)</A></TD><TD ><A HREF = "pair_tri_lj.html">tri/lj (o)</A></TD><TD ><A HREF = "pair_yukawa.html">yukawa (go)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_yukawa_colloid.html">yukawa/colloid (go)</A></TD><TD ><A HREF = "pair_zbl.html">zbl (o)</A> </TD></TR></TABLE></DIV> <P>These are additional pair styles in USER packages, 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_lj_soft.html">coul/cut/soft (o)</A></TD><TD ><A HREF = "pair_coul_diel.html">coul/diel (o)</A></TD><TD ><A HREF = "pair_lj_soft.html">coul/long/soft (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam/cd (o)</A></TD><TD ><A HREF = "pair_edip.html">edip (o)</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_list.html">list</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long/soft (o)</A></TD><TD ><A HREF = "pair_lj_soft.html">lj/cut/coul/cut/soft (o)</A></TD><TD ><A HREF = "pair_lj_soft.html">lj/cut/coul/long/soft (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_dipole.html">lj/cut/dipole/sf (go)</A></TD><TD ><A HREF = "pair_lj_soft.html">lj/cut/soft (o)</A></TD><TD ><A HREF = "pair_lj_soft.html">lj/cut/tip4p/long/soft (o)</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk (go)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_sdk.html">lj/sdk/coul/long (go)</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk/coul/msm (o)</A></TD><TD ><A HREF = "pair_lj_sf.html">lj/sf (o)</A></TD><TD ><A HREF = "pair_meam_spline.html">meam/spline</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_meam_sw_spline.html">meam/sw/spline</A></TD><TD ><A HREF = "pair_reax_c.html">reax/c</A></TD><TD ><A HREF = "pair_sph_heatconduction.html">sph/heatconduction</A></TD><TD ><A HREF = "pair_sph_idealgas.html">sph/idealgas</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_sph_lj.html">sph/lj</A></TD><TD ><A HREF = "pair_sph_rhosum.html">sph/rhosum</A></TD><TD ><A HREF = "pair_sph_taitwater.html">sph/taitwater</A></TD><TD ><A HREF = "pair_sph_taitwater_morris.html">sph/taitwater/morris</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "pair_tersoff.html">tersoff/table (o)</A></TD><TD ><A HREF = "pair_lj_soft.html">tip4p/long/soft (o)</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. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "bond_none.html">none</A></TD><TD ><A HREF = "bond_hybrid.html">hybrid</A></TD><TD ><A HREF = "bond_class2.html">class2 (o)</A></TD><TD ><A HREF = "bond_fene.html">fene (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "bond_fene_expand.html">fene/expand (o)</A></TD><TD ><A HREF = "bond_harmonic.html">harmonic (o)</A></TD><TD ><A HREF = "bond_morse.html">morse (o)</A></TD><TD ><A HREF = "bond_nonlinear.html">nonlinear (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "bond_quartic.html">quartic (o)</A></TD><TD ><A HREF = "bond_table.html">table (o)</A> </TD></TR></TABLE></DIV> <P>These are additional bond styles in USER packages, 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 (o)</A></TD><TD ><A HREF = "bond_harmonic_shift_cut.html">harmonic/shift/cut (o)</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. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "angle_none.html">none</A></TD><TD ><A HREF = "angle_hybrid.html">hybrid</A></TD><TD ><A HREF = "angle_charmm.html">charmm (o)</A></TD><TD ><A HREF = "angle_class2.html">class2 (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "angle_cosine.html">cosine (o)</A></TD><TD ><A HREF = "angle_cosine_delta.html">cosine/delta (o)</A></TD><TD ><A HREF = "angle_cosine_periodic.html">cosine/periodic (o)</A></TD><TD ><A HREF = "angle_cosine_squared.html">cosine/squared (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "angle_harmonic.html">harmonic (o)</A></TD><TD ><A HREF = "angle_table.html">table (o)</A> </TD></TR></TABLE></DIV> <P>These are additional angle styles in USER packages, 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_cosine_shift.html">cosine/shift (o)</A></TD><TD ><A HREF = "angle_cosine_shift_exp.html">cosine/shift/exp (o)</A></TD><TD ><A HREF = "angle_dipole.html">dipole (o)</A></TD><TD ><A HREF = "angle_fourier.html">fourier (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "angle_fourier_simple.html">fourier/simple (o)</A></TD><TD ><A HREF = "angle_quartic.html">quartic (o)</A></TD><TD ><A HREF = "angle_sdk.html">sdk</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. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "dihedral_none.html">none</A></TD><TD ><A HREF = "dihedral_hybrid.html">hybrid</A></TD><TD ><A HREF = "dihedral_charmm.html">charmm (o)</A></TD><TD ><A HREF = "dihedral_class2.html">class2 (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "dihedral_harmonic.html">harmonic (o)</A></TD><TD ><A HREF = "dihedral_helix.html">helix (o)</A></TD><TD ><A HREF = "dihedral_multi_harmonic.html">multi/harmonic (o)</A></TD><TD ><A HREF = "dihedral_opls.html">opls (o)</A> </TD></TR></TABLE></DIV> <P>These are additional dihedral styles in USER packages, 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 (o)</A></TD><TD ><A HREF = "dihedral_fourier.html">fourier (o)</A></TD><TD ><A HREF = "dihedral_nharmonic.html">nharmonic (o)</A></TD><TD ><A HREF = "dihedral_quadratic.html">quadratic (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "dihedral_table.html">table (o)</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. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "improper_none.html">none</A></TD><TD ><A HREF = "improper_hybrid.html">hybrid</A></TD><TD ><A HREF = "improper_class2.html">class2 (o)</A></TD><TD ><A HREF = "improper_cvff.html">cvff (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "improper_harmonic.html">harmonic (o)</A></TD><TD ><A HREF = "improper_umbrella.html">umbrella (o)</A> </TD></TR></TABLE></DIV> <P>These are additional improper styles in USER packages, 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 = "improper_cossq.html">cossq (o)</A></TD><TD ><A HREF = "improper_fourier.html">fourier (o)</A></TD><TD ><A HREF = "improper_ring.html">ring (o)</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. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. </P> <DIV ALIGN=center><TABLE BORDER=1 > <TR ALIGN="center"><TD ><A HREF = "kspace_style.html">ewald (o)</A></TD><TD ><A HREF = "kspace_style.html">ewald/disp</A></TD><TD ><A HREF = "kspace_style.html">msm (o)</A></TD><TD ><A HREF = "kspace_style.html">msm/cg (o)</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "kspace_style.html">pppm (cgo)</A></TD><TD ><A HREF = "kspace_style.html">pppm/cg (o)</A></TD><TD ><A HREF = "kspace_style.html">pppm/disp</A></TD><TD ><A HREF = "kspace_style.html">pppm/disp/tip4p</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "kspace_style.html">pppm/tip4p (o)</A> </TD></TR></TABLE></DIV> </HTML> diff --git a/doc/Section_commands.txt b/doc/Section_commands.txt index f89e53a29..24e420484 100644 --- a/doc/Section_commands.txt +++ b/doc/Section_commands.txt @@ -1,993 +1,994 @@ "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". How the variable is converted to a text string depends on what style of variable it is; see the "variable"_variable doc page for details. It can be a variable that stores multiple text strings, and return one of them. The returned text string can be multiple "words" (space separated) which will then be interpreted as multiple arguments in the input command. The variable can also store a numeric formula which will be evaluated and its numeric result returned as a string. As a special case, if the $ is followed by parenthesis, then the text inside the parenthesis is treated as an "immediate" variable and evaluated as an "equal-style variable"_variable.html. This is a way to use numeric formulas in an input script without having to assign them to variable names. For example, these 3 input script lines: variable X equal (xlo+xhi)/2+sqrt(v_area) region 1 block $X 2 INF INF EDGE EDGE variable X delete :pre can be replaced by region 1 block $((xlo+xhi)/2+sqrt(v_area)) 2 INF INF EDGE EDGE :pre so that you do not have to define (or discard) a temporary variable X. Note that neither the curly-bracket or immediate form of variables can contain nested $ characters for other variables to substitute for. Thus you cannot do this: variable a equal 2 variable b2 equal 4 print "B2 = $\{b$a\}" :pre Nor can you specify this $($x-1.0) for an immediate variable, but you could use $(v_x-1.0), since the latter is valid syntax for an "equal-style variable"_variable.html. See the "variable"_variable.html command for more details of how strings are assigned to variables and evaluated, and how they can be used 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. A long single argument enclosed in quotes can even span multiple lines if the "&" character is used, as described above. E.g. print "Volume = $v" print 'Volume = $v' variable a string "red green blue & purple orange cyan" if "${steps} > 1000" then quit :pre The quotes are removed when the single argument is stored internally. See the "dump modify format"_dump_modify.html or "print"_print.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_dump"_read_dump.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: "comm_style"_comm_style.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, "dump movie"_dump_image.html, "restart"_restart.html, "thermo"_thermo.html, "thermo_modify"_thermo_modify.html, "thermo_style"_thermo_style.html, "undump"_undump.html, "write_data"_write_data.html, "write_dump"_write_dump.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, "rerun"_rerun.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, "box"_box.html, "change_box"_change_box.html, "clear"_clear.html, "comm_modify"_comm_modify.html, "comm_style"_comm_style.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, "dump movie"_dump_image.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, "log"_log.html, "mass"_mass.html, "minimize"_minimize.html, "min_modify"_min_modify.html, "min_style"_min_style.html, "molecule"_molecule.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_dump"_read_dump.html, "read_restart"_read_restart.html, "region"_region.html, "replicate"_replicate.html, "rerun"_rerun.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_data"_write_data.html, "write_dump"_write_dump.html, "write_restart"_write_restart.html :tb(c=6,ea=c) These are additional commands in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "group2ndx"_group2ndx.html :tb(c=1,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. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "adapt"_fix_adapt.html, "addforce (c)"_fix_addforce.html, "append/atoms"_fix_append_atoms.html, "aveforce (c)"_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, "balance"_fix_balance.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 (c)"_fix_enforce2d.html, "evaporate"_fix_evaporate.html, "external"_fix_external.html, "freeze (c)"_fix_freeze.html, "gcmc"_fix_gcmc.html, "gld"_fix_gld.html, "gravity (co)"_fix_gravity.html, "heat"_fix_heat.html, "indent"_fix_indent.html, "langevin (k)"_fix_langevin.html, "lineforce"_fix_lineforce.html, "momentum"_fix_momentum.html, "move"_fix_move.html, "msst"_fix_msst.html, "neb"_fix_neb.html, "nph (o)"_fix_nh.html, "nphug (o)"_fix_nphug.html, "nph/asphere (o)"_fix_nph_asphere.html, "nph/sphere (o)"_fix_nph_sphere.html, "npt (co)"_fix_nh.html, "npt/asphere (o)"_fix_npt_asphere.html, "npt/sphere (o)"_fix_npt_sphere.html, "nve (cko)"_fix_nve.html, "nve/asphere"_fix_nve_asphere.html, "nve/asphere/noforce"_fix_nve_asphere_noforce.html, "nve/body"_fix_nve_body.html, "nve/limit"_fix_nve_limit.html, "nve/line"_fix_nve_line.html, "nve/noforce"_fix_nve_noforce.html, "nve/sphere (o)"_fix_nve_sphere.html, "nve/tri"_fix_nve_tri.html, "nvt (co)"_fix_nh.html, "nvt/asphere (o)"_fix_nvt_asphere.html, "nvt/sllod (o)"_fix_nvt_sllod.html, "nvt/sphere (o)"_fix_nvt_sphere.html, "oneway"_fix_oneway.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, "property/atom"_fix_property_atom.html, "qeq/comb (o)"_fix_qeq_comb.html, "qeq/dynamic"_fix_qeq.html, "qeq/point"_fix_qeq.html, "qeq/shielded"_fix_qeq.html, "qeq/slater"_fix_qeq.html, "reax/bonds"_fix_reax_bonds.html, "recenter"_fix_recenter.html, "restrain"_fix_restrain.html, "rigid (o)"_fix_rigid.html, "rigid/nph (o)"_fix_rigid.html, "rigid/npt (o)"_fix_rigid.html, "rigid/nve (o)"_fix_rigid.html, "rigid/nvt (o)"_fix_rigid.html, "rigid/small (o)"_fix_rigid.html, "rigid/small/nph"_fix_rigid.html, "rigid/small/npt"_fix_rigid.html, "rigid/small/nve"_fix_rigid.html, "rigid/small/nvt"_fix_rigid.html, "setforce (c)"_fix_setforce.html, "shake (c)"_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 (c)"_fix_temp_berendsen.html, "temp/csvr"_fix_temp_csvr.html, "temp/rescale (c)"_fix_temp_rescale.html, "thermal/conductivity"_fix_thermal_conductivity.html, "tmd"_fix_tmd.html, "ttm"_fix_ttm.html, "tune/kspace"_fix_tune_kspace.html, "vector"_fix_vector.html, "viscosity"_fix_viscosity.html, "viscous (c)"_fix_viscous.html, "wall/colloid"_fix_wall.html, "wall/gran"_fix_wall_gran.html, "wall/harmonic"_fix_wall.html, "wall/lj1043"_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 additional fix styles in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "adapt/fep"_fix_adapt_fep.html, "addtorque"_fix_addtorque.html, "atc"_fix_atc.html, +"ave/spatial/sphere"_fix_ave_spatial_sphere.html, "colvars"_fix_colvars.html, "imd"_fix_imd.html, "langevin/eff"_fix_langevin_eff.html, "lb/fluid"_fix_lb_fluid.html, "lb/momentum"_fix_lb_momentum.html, "lb/pc"_fix_lb_pc.html, "lb/rigid/pc/sphere"_fix_lb_rigid_pc_sphere.html, "lb/viscous"_fix_lb_viscous.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, "phonon"_fix_phonon.html, "qeq/reax"_fix_qeq_reax.html, "qmmm"_fix_qmmm.html, "reax/c/bonds"_fix_reax_bonds.html, "reax/c/species"_fix_reaxc_species.html, "smd"_fix_smd.html, "temp/rescale/eff"_fix_temp_rescale_eff.html, "ti/rs"_fix_ti_rs.html, "ti/spring"_fix_ti_spring.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. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "angle/local"_compute_angle_local.html, "atom/molecule"_compute_atom_molecule.html, "body/local"_compute_body_local.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, "contact/atom"_compute_contact_atom.html, "coord/atom"_compute_coord_atom.html, "damage/atom"_compute_damage_atom.html, "dihedral/local"_compute_dihedral_local.html, "dilatation/atom"_compute_dilatation_atom.html, "displace/atom"_compute_displace_atom.html, "erotate/asphere"_compute_erotate_asphere.html, "erotate/rigid"_compute_erotate_rigid.html, "erotate/sphere"_compute_erotate_sphere.html, "erotate/sphere/atom"_compute_erotate_sphere_atom.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, "inertia/molecule"_compute_inertia_molecule.html, "ke"_compute_ke.html, "ke/atom"_compute_ke_atom.html, "ke/rigid"_compute_ke_rigid.html, "msd"_compute_msd.html, "msd/molecule"_compute_msd_molecule.html, "msd/nongauss"_compute_msd_nongauss.html, "pair"_compute_pair.html, "pair/local"_compute_pair_local.html, "pe (c)"_compute_pe.html, "pe/atom"_compute_pe_atom.html, "plasticity/atom"_compute_plasticity_atom.html, "pressure (c)"_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, "sna/atom"_compute_sna.html, "snad/atom"_compute_sna.html, "snav/atom"_compute_sna.html, "stress/atom"_compute_stress_atom.html, "temp (c)"_compute_temp.html, "temp/asphere"_compute_temp_asphere.html, "temp/com"_compute_temp_com.html, "temp/deform"_compute_temp_deform.html, "temp/partial (c)"_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, "vacf"_compute_vacf.html, "voronoi/atom"_compute_voronoi_atom.html :tb(c=6,ea=c) These are additional compute styles in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "ackland/atom"_compute_ackland_atom.html, "basal/atom"_compute_basal_atom.html, "fep"_compute_fep.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) :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. Many of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_pair_none.html, "hybrid"_pair_hybrid.html, "hybrid/overlay"_pair_hybrid.html, "adp (o)"_pair_adp.html, "airebo (o)"_pair_airebo.html, "beck (go)"_pair_beck.html, "body"_pair_body.html, "bop"_pair_bop.html, "born (go)"_pair_born.html, "born/coul/long (cgo)"_pair_born.html, "born/coul/msm (o)"_pair_born.html, "born/coul/wolf (go)"_pair_born.html, "brownian (o)"_pair_brownian.html, "brownian/poly (o)"_pair_brownian.html, "buck (cgo)"_pair_buck.html, "buck/coul/cut (cgo)"_pair_buck.html, "buck/coul/long (cgo)"_pair_buck.html, "buck/coul/msm (o)"_pair_buck.html, "buck/long/coul/long (o)"_pair_buck_long.html, "colloid (go)"_pair_colloid.html, "comb (o)"_pair_comb.html, "comb3"_pair_comb.html, "coul/cut (gko)"_pair_coul.html, "coul/debye (go)"_pair_coul.html, "coul/dsf (go)"_pair_coul.html, "coul/long (go)"_pair_coul.html, "coul/msm"_pair_coul.html, "coul/wolf (o)"_pair_coul.html, "dpd (o)"_pair_dpd.html, "dpd/tstat (o)"_pair_dpd.html, "dsmc"_pair_dsmc.html, "eam (cgot)"_pair_eam.html, "eam/alloy (cgot)"_pair_eam.html, "eam/fs (cgot)"_pair_eam.html, "eim (o)"_pair_eim.html, "gauss (go)"_pair_gauss.html, "gayberne (gio)"_pair_gayberne.html, "gran/hertz/history (o)"_pair_gran.html, "gran/hooke (co)"_pair_gran.html, "gran/hooke/history (o)"_pair_gran.html, "hbond/dreiding/lj (o)"_pair_hbond_dreiding.html, "hbond/dreiding/morse (o)"_pair_hbond_dreiding.html, "kim"_pair_kim.html, "lcbop"_pair_lcbop.html, "line/lj (o)"_pair_line_lj.html, "lj/charmm/coul/charmm (co)"_pair_charmm.html, "lj/charmm/coul/charmm/implicit (co)"_pair_charmm.html, "lj/charmm/coul/long (cgio)"_pair_charmm.html, "lj/charmm/coul/msm"_pair_charmm.html, "lj/class2 (cgo)"_pair_class2.html, "lj/class2/coul/cut (co)"_pair_class2.html, "lj/class2/coul/long (cgo)"_pair_class2.html, "lj/cut (cgikot)"_pair_lj.html, "lj/cut/coul/cut (cgko)"_pair_lj.html, "lj/cut/coul/debye (cgo)"_pair_lj.html, "lj/cut/coul/dsf (go)"_pair_lj.html, "lj/cut/coul/long (cgikot)"_pair_lj.html, "lj/cut/coul/msm (go)"_pair_lj.html, "lj/cut/dipole/cut (go)"_pair_dipole.html, "lj/cut/dipole/long"_pair_dipole.html, "lj/cut/tip4p/cut (o)"_pair_lj.html, "lj/cut/tip4p/long (ot)"_pair_lj.html, "lj/expand (cgo)"_pair_lj_expand.html, "lj/gromacs (cgo)"_pair_gromacs.html, "lj/gromacs/coul/gromacs (co)"_pair_gromacs.html, "lj/long/coul/long (o)"_pair_lj_long.html, "lj/long/dipole/long"_pair_dipole.html, "lj/long/tip4p/long"_pair_lj_long.html, "lj/smooth (co)"_pair_lj_smooth.html, "lj/smooth/linear (o)"_pair_lj_smooth_linear.html, "lj96/cut (cgo)"_pair_lj96.html, "lubricate (o)"_pair_lubricate.html, "lubricate/poly (o)"_pair_lubricate.html, "lubricateU"_pair_lubricateU.html, "lubricateU/poly"_pair_lubricateU.html, "meam (o)"_pair_meam.html, "mie/cut (o)"_pair_mie.html, "morse (cgot)"_pair_morse.html, "nb3b/harmonic (o)"_pair_nb3b_harmonic.html, "nm/cut (o)"_pair_nm.html, "nm/cut/coul/cut (o)"_pair_nm.html, "nm/cut/coul/long (o)"_pair_nm.html, "peri/eps"_pair_peri.html, "peri/lps (o)"_pair_peri.html, "peri/pmb (o)"_pair_peri.html, "peri/ves"_pair_peri.html, "reax"_pair_reax.html, "rebo (o)"_pair_airebo.html, "resquared (go)"_pair_resquared.html, "snap"_pair_snap.html, "soft (go)"_pair_soft.html, "sw (cgo)"_pair_sw.html, "table (gko)"_pair_table.html, "tersoff (co)"_pair_tersoff.html, "tersoff/mod (o)"_pair_tersoff_mod.html, "tersoff/zbl (o)"_pair_tersoff_zbl.html, "tip4p/cut (o)"_pair_coul.html, "tip4p/long (o)"_pair_coul.html, "tri/lj (o)"_pair_tri_lj.html, "yukawa (go)"_pair_yukawa.html, "yukawa/colloid (go)"_pair_yukawa_colloid.html, "zbl (o)"_pair_zbl.html :tb(c=4,ea=c) These are additional pair styles in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "awpmd/cut"_pair_awpmd.html, "coul/cut/soft (o)"_pair_lj_soft.html, "coul/diel (o)"_pair_coul_diel.html, "coul/long/soft (o)"_pair_lj_soft.html, "eam/cd (o)"_pair_eam.html, "edip (o)"_pair_edip.html, "eff/cut"_pair_eff.html, "gauss/cut"_pair_gauss.html, "list"_pair_list.html, "lj/charmm/coul/long/soft (o)"_pair_charmm.html, "lj/cut/coul/cut/soft (o)"_pair_lj_soft.html, "lj/cut/coul/long/soft (o)"_pair_lj_soft.html, "lj/cut/dipole/sf (go)"_pair_dipole.html, "lj/cut/soft (o)"_pair_lj_soft.html, "lj/cut/tip4p/long/soft (o)"_pair_lj_soft.html, "lj/sdk (go)"_pair_sdk.html, "lj/sdk/coul/long (go)"_pair_sdk.html, "lj/sdk/coul/msm (o)"_pair_sdk.html, "lj/sf (o)"_pair_lj_sf.html, "meam/spline"_pair_meam_spline.html, "meam/sw/spline"_pair_meam_sw_spline.html, "reax/c"_pair_reax_c.html, "sph/heatconduction"_pair_sph_heatconduction.html, "sph/idealgas"_pair_sph_idealgas.html, "sph/lj"_pair_sph_lj.html, "sph/rhosum"_pair_sph_rhosum.html, "sph/taitwater"_pair_sph_taitwater.html, "sph/taitwater/morris"_pair_sph_taitwater_morris.html, "tersoff/table (o)"_pair_tersoff.html, "tip4p/long/soft (o)"_pair_lj_soft.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. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_bond_none.html, "hybrid"_bond_hybrid.html, "class2 (o)"_bond_class2.html, "fene (o)"_bond_fene.html, "fene/expand (o)"_bond_fene_expand.html, "harmonic (o)"_bond_harmonic.html, "morse (o)"_bond_morse.html, "nonlinear (o)"_bond_nonlinear.html, "quartic (o)"_bond_quartic.html, "table (o)"_bond_table.html :tb(c=4,ea=c) These are additional bond styles in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "harmonic/shift (o)"_bond_harmonic_shift.html, "harmonic/shift/cut (o)"_bond_harmonic_shift_cut.html :tb(c=4,ea=c) :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. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_angle_none.html, "hybrid"_angle_hybrid.html, "charmm (o)"_angle_charmm.html, "class2 (o)"_angle_class2.html, "cosine (o)"_angle_cosine.html, "cosine/delta (o)"_angle_cosine_delta.html, "cosine/periodic (o)"_angle_cosine_periodic.html, "cosine/squared (o)"_angle_cosine_squared.html, "harmonic (o)"_angle_harmonic.html, "table (o)"_angle_table.html :tb(c=4,ea=c) These are additional angle styles in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "cosine/shift (o)"_angle_cosine_shift.html, "cosine/shift/exp (o)"_angle_cosine_shift_exp.html, "dipole (o)"_angle_dipole.html, "fourier (o)"_angle_fourier.html, "fourier/simple (o)"_angle_fourier_simple.html, "quartic (o)"_angle_quartic.html, "sdk"_angle_sdk.html :tb(c=4,ea=c) :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. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_dihedral_none.html, "hybrid"_dihedral_hybrid.html, "charmm (o)"_dihedral_charmm.html, "class2 (o)"_dihedral_class2.html, "harmonic (o)"_dihedral_harmonic.html, "helix (o)"_dihedral_helix.html, "multi/harmonic (o)"_dihedral_multi_harmonic.html, "opls (o)"_dihedral_opls.html :tb(c=4,ea=c) These are additional dihedral styles in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "cosine/shift/exp (o)"_dihedral_cosine_shift_exp.html, "fourier (o)"_dihedral_fourier.html, "nharmonic (o)"_dihedral_nharmonic.html, "quadratic (o)"_dihedral_quadratic.html, "table (o)"_dihedral_table.html :tb(c=4,ea=c) :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. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_improper_none.html, "hybrid"_improper_hybrid.html, "class2 (o)"_improper_class2.html, "cvff (o)"_improper_cvff.html, "harmonic (o)"_improper_harmonic.html, "umbrella (o)"_improper_umbrella.html :tb(c=4,ea=c) These are additional improper styles in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "cossq (o)"_improper_cossq.html, "fourier (o)"_improper_fourier.html, "ring (o)"_improper_ring.html :tb(c=4,ea=c) :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. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "ewald (o)"_kspace_style.html, "ewald/disp"_kspace_style.html, "msm (o)"_kspace_style.html, "msm/cg (o)"_kspace_style.html, "pppm (cgo)"_kspace_style.html, "pppm/cg (o)"_kspace_style.html, "pppm/disp"_kspace_style.html, "pppm/disp/tip4p"_kspace_style.html, "pppm/tip4p (o)"_kspace_style.html :tb(c=4,ea=c) diff --git a/doc/fix_ave_spatial.html b/doc/fix_ave_spatial.html index b5a51e8be..a026f73c1 100644 --- a/doc/fix_ave_spatial.html +++ b/doc/fix_ave_spatial.html @@ -1,415 +1,417 @@ <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 ave/spatial command </H3> <P><B>Syntax:</B> </P> <PRE>fix ID group-ID ave/spatial Nevery Nrepeat Nfreq dim origin delta ... value1 value2 ... keyword args ... </PRE> <UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command <LI>ave/spatial = style name of this fix command <LI>Nevery = use input values every this many timesteps <LI>Nrepeat = # of times to use input values for calculating averages <LI>Nfreq = calculate averages every this many timesteps <LI>dim, origin, delta can be repeated 1, 2, or 3 times for 1d, 2d, or 3d bins <PRE> dim = <I>x</I> or <I>y</I> or <I>z</I> origin = <I>lower</I> or <I>center</I> or <I>upper</I> or coordinate value (distance units) delta = thickness of spatial bins in dim (distance units) </PRE> <LI>one or more input values can be listed <LI>value = vx, vy, vz, fx, fy, fz, density/mass, density/number, c_ID, c_ID[I], f_ID, f_ID[I], v_name <PRE> vx,vy,vz,fx,fy,fz = atom attribute (velocity, force component) density/number, density/mass = number or mass density c_ID = per-atom vector calculated by a compute with ID c_ID[I] = Ith column of per-atom array calculated by a compute with ID f_ID = per-atom vector calculated by a fix with ID f_ID[I] = Ith column of per-atom array calculated by a fix with ID v_name = per-atom vector calculated by an atom-style variable with name </PRE> <LI>zero or more keyword/arg pairs may be appended <LI>keyword = <I>region</I> or <I>discard</I> or <I>norm</I> or <I>ave</I> or <I>units</I> or <I>file</I> or <I>overwrite</I> or <I>title1</I> or <I>title2</I> or <I>title3</I> <PRE> <I>region</I> arg = region-ID <I>bound</I> args = x/y/z lo hi x/y/z = <I>x</I> or <I>y</I> or <I>z</I> to bound bins in this dimension lo = <I>lower</I> or coordinate value (distance units) hi = <I>upper</I> or coordinate value (distance units) <I>discard</I> arg = <I>mixed</I> or <I>no</I> or <I>yes</I> mixed = discard atoms outside bins only if bin bounds are explicitly set no = always keep out-of-bounds atoms yes = always discard out-of-bounds atoms <I>norm</I> arg = <I>all</I> or <I>sample</I> region-ID = ID of region atoms must be in to contribute to spatial averaging <I>ave</I> args = <I>one</I> or <I>running</I> or <I>window M</I> one = output new average value every Nfreq steps running = output cumulative average of all previous Nfreq steps window M = output average of M most recent Nfreq steps <I>units</I> arg = <I>box</I> or <I>lattice</I> or <I>reduced</I> <I>file</I> arg = filename filename = file to write results to <I>overwrite</I> arg = none = overwrite output file with only latest output <I>title1</I> arg = string string = text to print as 1st line of output file <I>title2</I> arg = string string = text to print as 2nd line of output file <I>title3</I> arg = string string = text to print as 3rd line of output file </PRE> </UL> <P><B>Examples:</B> </P> <PRE>fix 1 all ave/spatial 10000 1 10000 z lower 0.02 c_myCentro units reduced & title1 "My output values" fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile -fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass ave running +fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass ave running +fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass bound y 5.0 20.0 discard yes ave running </PRE> <P><B>Description:</B> </P> <P>Use one or more per-atom vectors as inputs every few timesteps, bin their values spatially into 1d, 2d, or 3d bins based on current atom coordinates, and average the bin values over longer timescales. The resulting bin averages can be used by other <A HREF = "Section_howto.html#howto_15">output commands</A> such as <A HREF = "thermo_style.html">thermo_style custom</A>, and can also be written to a file. </P> <P>The group specified with the command means only atoms within the group contribute to bin averages. If the <I>region</I> keyword is used, the atom must be in both the group and the specified geometric <A HREF = "region.html">region</A> in order to contribute to bin averages. </P> <P>Each listed value can be an atom attribute (position, velocity, force component), a mass or number density, or the result of a <A HREF = "compute.html">compute</A> or <A HREF = "fix.html">fix</A> or the evaluation of an atom-style <A HREF = "variable.html">variable</A>. In the latter cases, the compute, fix, or variable must produce a per-atom quantity, not a global quantity. If you wish to time-average global quantities from a compute, fix, or variable, then see the <A HREF = "fix_ave_time.html">fix ave/time</A> command. </P> <P><A HREF = "compute.html">Computes</A> that produce per-atom quantities are those which have the word <I>atom</I> in their style name. See the doc pages for individual <A HREF = "fix.html">fixes</A> to determine which ones produce per-atom quantities. <A HREF = "variable.html">Variables</A> of style <I>atom</I> are the only ones that can be used with this fix since all other styles of variable produce global quantities. </P> <P>The per-atom values of each input vector are binned and averaged independently of the per-atom values in other input vectors. </P> <P>The size and dimensionality of the bins (1d = layers or slabs, 2d = pencils, 3d = boxes) are determined by the <I>dim</I>, <I>origin</I>, and <I>delta</I> settings and how many times they are specified (1, 2, or 3). See details below. </P> <P>IMPORTANT NOTE: This fix works by creating an array of size Nbins by Nvalues on each processor. Nbins is the total number of bins; Nvalues is the number of input values specified. Each processor loops over its atoms, tallying its values to the appropriate bin. Then the entire array is summed across all processors. This means that using a large number of bins (easy to do for 2d or 3d bins) will incur an overhead in memory and computational cost (summing across processors), so be careful to use reasonable numbers of bins. </P> <HR> <P>The <I>Nevery</I>, <I>Nrepeat</I>, and <I>Nfreq</I> arguments specify on what timesteps the input values will be used to bin them and contribute to the average. The final averaged quantities are generated on timesteps that are a multiples of <I>Nfreq</I>. The average is over <I>Nrepeat</I> quantities, computed in the preceding portion of the simulation every <I>Nevery</I> timesteps. <I>Nfreq</I> must be a multiple of <I>Nevery</I> and <I>Nevery</I> must be non-zero even if <I>Nrepeat</I> is 1. Also, the timesteps contributing to the average value cannot overlap, i.e. Nfreq > (Nrepeat-1)*Nevery is required. </P> <P>For example, if Nevery=2, Nrepeat=6, and Nfreq=100, then values on timesteps 90,92,94,96,98,100 will be used to compute the final average on timestep 100. Similarly for timesteps 190,192,194,196,198,200 on timestep 200, etc. If Nrepeat=1 and Nfreq = 100, then no time averaging is done; values are simply generated on timesteps 100,200,etc. </P> <HR> <P>Each per-atom property is also averaged over atoms in each bin. The way the averaging is one across the <I>Nrepeat</I> timesteps to produce output on the <I>Nfreq</I> timesteps, and across multiple <I>Nfreq</I> outputs, is determined by the <I>norm</I> and <I>av</I> keyword settings, as discussed below. </P> <P>Bins can be 1d layers or slabs, 2d pencils, or 3d boxes. This depends on how many times (1, 2, or 3) the <I>dim</I>, <I>origin</I>, and <I>delta</I> settings are specified in the fix ave/spatial command. For 2d or 3d bins, there is no restriction on specifying dim = x before dim = y, or dim = y before dim = z. Bins in a particular <I>dim</I> have a bin size in that dimension given by <I>delta</I>. Every Nfreq steps, when averaging is being performed and the per-atom property is calculated for the first time, the number of bins and the bin sizes and boundaries are computed. Thus if the simulation box changes size during a simulation, the number of bins and their boundaries may also change. In each dimension, bins are defined relative to a specified <I>origin</I>, which may be the lower/upper edge of the simulation box in that dimension, or its center point, or a specified coordinate value. Starting at the origin, sufficient bins are created in both directions to completely span the bin extent in that dimension. By default the bin extent is the entire simulation box. </P> <P>The <I>bound</I> keyword can be used to limit the extent of bin coverage in any dimension, i.e. to only bin a portion of the box. If the <I>lo</I> setting is <I>lower</I> or the <I>hi</I> setting is <I>upper</I>, the bin extent in that direction extends to the box boundary. If a numeric value is used for <I>lo</I> and/or <I>hi</I>, then the bin extent in the <I>lo</I> or <I>hi</I> direction extends only to that value, which is assumed to be inside (or at least near) the simulation box boundaries, though LAMMPS does not check for this. </P> <P>On each sampling timestep, each atom is mapped to the bin it currently belongs to, based on its current position. Note that the group-ID and region keyword can exclude specific atoms from this operation, as discussed above. Note that between reneighboring timesteps, atoms can move outside the current simulation box. If the box is periodic (in that dimension) the atom is remapping into the periodic box for purposes of binning. If the box in not periodic, the atom may have moved outside the bounds of any bin. </P> <P>The <I>discard</I> keyword determines what is done with any atom which is outside the bounds of any bin. If <I>discard</I> is set to <I>yes</I>, the atom will be ignored and not contribute to any bin averages. If <I>discard</I> is set to <I>no</I>, the atom will be counted as if it were in the first or last bin in that dimension. If (discard</I> is set to <I>mixed</I>, which is the default, it will only be counted in the first or last bin if bins extend to the box boundary in that dimension. This is the case if the <I>bound</I> keyword settings are <I>lower</I> and <I>upper</I>, which is the default. If the <I>bound</I> keyword settings are numeric values, then the atom will be ignored if it is outside the bounds of any bin. Note that in this case, it is possible that the first or last bin extends beyond the numeric <I>bounds</I> settings, depending on the specified <I>origin</I>. If this is the case, the atom is only ignored if it is outside the first or last bin, not if it is simply outside the numeric <I>bounds</I> setting. </P> <P>For orthogonal simulation boxes, the bins are also layers, pencils, or boxes aligned with the xyz coordinate axes. For triclinic (non-orthogonal) simulation boxes, the bins are so that they are parallel to the tilted faces of the simulation box. See <A HREF = "Section_howto.html#howto_12">this section</A> of the manual for a discussion of the geometry of triclinic boxes in LAMMPS. As described there, a tilted simulation box has edge vectors a,b,c. In that nomenclature, bins in the x dimension have faces with normals in the "b" cross "c" direction. Bins in y have faces normal to the "a" cross "c" direction. And bins in z have faces normal to the "a" cross "b" direction. Note that in order to define the size and position of these bins in an unambiguous fashion, the <I>units</I> option must be set to <I>reduced</I> when using a triclinic simulation box, as noted below. </P> <HR> <P>The atom attribute values (vx,vy,vz,fx,fy,fz) are self-explanatory. Note that other atom attributes (including atom postitions x,y,z) can be used as inputs to this fix by using the <A HREF = "compute_property_atom.html">compute property/atom</A> command and then specifying an input value from that compute. </P> <P>The <I>density/number</I> value means the number density is computed in each bin, i.e. a weighting of 1 for each atom. The <I>density/mass</I> value means the mass density is computed in each bind, i.e. each atom is weighted by its mass. The resulting density is normalized by the volume of the bin so that units of number/volume or density are output. See the <A HREF = "units.html">units</A> command doc page for the definition of density for each choice of units, e.g. gram/cm^3. </P> <P>If a value begins with "c_", a compute ID must follow which has been previously defined in the input script. If no bracketed integer is appended, the per-atom vector calculated by the compute is used. If a bracketed integer is appended, the Ith column of the per-atom array calculated by the compute is used. Users can also write code for their own compute styles and <A HREF = "Section_modify.html">add them to LAMMPS</A>. </P> <P>If a value begins with "f_", a fix ID must follow which has been previously defined in the input script. If no bracketed integer is appended, the per-atom vector calculated by the fix is used. If a bracketed integer is appended, the Ith column of the per-atom array calculated by the fix is used. Note that some fixes only produce their values on certain timesteps, which must be compatible with <I>Nevery</I>, else an error results. Users can also write code for their own fix styles and <A HREF = "Section_modify.html">add them to LAMMPS</A>. </P> <P>If a value begins with "v_", a variable name must follow which has been previously defined in the input script. Variables of style <I>atom</I> can reference thermodynamic keywords and various per-atom attributes, or invoke other computes, fixes, or variables when they are evaluated, so this is a very general means of generating per-atom quantities to spatially average. </P> <HR> <P>Additional optional keywords also affect the operation of this fix. The <I>region</I>, <I>bound</I>, and <I>discard</I> keywords were discussed above. </P> <P>The <I>norm</I> keyword affects how averaging is done for the output produced every <I>Nfreq</I> timesteps. For an <I>all</I> setting, a bin quantity is summed over all atoms in all <I>Nrepeat</I> samples, as is the count of atoms in the bin. The printed value for the bin is Total-quantity / Total-count. In other words it is an average over the entire <I>Nfreq</I> timescale. </P> <P>For a <I>sample</I> setting, the bin quantity is summed over atoms for only a single sample, as is the count, and a "average sample value" is computed, i.e. Sample-quantity / Sample-count. The printed value for the bin is the average of the <I>Nrepeat</I> "average sample values", In other words it is an average of an average. </P> <P>The <I>ave</I> keyword determines how the bin values produced every <I>Nfreq</I> steps are averaged with bin values produced on previous steps that were multiples of <I>Nfreq</I>, before they are accessed by another output command or written to a file. </P> <P>If the <I>ave</I> setting is <I>one</I>, then the bin values produced on timesteps that are multiples of <I>Nfreq</I> are independent of each other; they are output as-is without further averaging. </P> <P>If the <I>ave</I> setting is <I>running</I>, then the bin values produced on timesteps that are multiples of <I>Nfreq</I> are summed and averaged in a cumulative sense before being output. Each output bin value is thus the average of the bin value produced on that timestep with all preceding values for the same bin. This running average begins when the fix is defined; it can only be restarted by deleting the fix via the <A HREF = "unfix.html">unfix</A> command, or re-defining the fix by re-specifying it. </P> <P>If the <I>ave</I> setting is <I>window</I>, then the bin values produced on timesteps that are multiples of <I>Nfreq</I> are summed and averaged within a moving "window" of time, so that the last M values for the same bin are used to produce the output. E.g. if M = 3 and Nfreq = 1000, then the output on step 10000 will be the average of the individual bin values on steps 8000,9000,10000. Outputs on early steps will average over less than M values if they are not available. </P> <P>The <I>units</I> keyword determines the meaning of the distance units used for the bin size <I>delta</I> and for <I>origin</I> and <I>bounds</I> values if they are coordinate value. For orthogonal simulation boxes, any of the 3 options may be used. For non-orthogonal (triclinic) simulation boxes, only the <I>reduced</I> option may be 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 spacing. A <I>reduced</I> value means normalized unitless values between 0 and 1, which represent the lower and upper faces of the simulation box respectively. Thus an <I>origin</I> value of 0.5 means the center of the box in any dimension. A <I>delta</I> value of 0.1 means 10 bins span the box in that dimension. </P> <P>Consider a non-orthogonal box, with bins that are 1d layers or slabs in the x dimension. No matter how the box is tilted, an <I>origin</I> of 0.0 means start layers at the lower "b" cross "c" plane of the simulation box and an <I>origin</I> of 1.0 means to start layers at the upper "b" cross "c" face of the box. A <I>delta</I> value of 0.1 means there will be 10 layers from 0.0 to 1.0, regardless of the current size or shape of the simulation box. </P> <P>The <I>file</I> keyword allows a filename to be specified. Every <I>Nfreq</I> timesteps, a section of bin info will be written to a text file in the following format. A line with the timestep and number of bin is written. Then one line per bin is written, containing the bin ID (1-N), the coordinate of the center of the bin, the number of atoms in the bin, and one or more calculated values. The number of values in each line corresponds to the number of values specified in the fix ave/spatial command. The number of atoms and the value(s) are average quantities. If the value of the <I>units</I> keyword is <I>box</I> or <I>lattice</I>, the "coord" is printed in box units. If the value of the <I>units</I> keyword is <I>reduced</I>, the "coord" is printed in reduced units (0-1). </P> <P>The <I>overwrite</I> keyword will continuously overwrite the output file with the latest output, so that it only contains one timestep worth of output. This option can only be used with the <I>ave running</I> setting. </P> <P>The <I>title1</I> and <I>title2</I> and <I>title3</I> keywords allow specification of the strings that will be printed as the first 3 lines of the output file, assuming the <I>file</I> keyword was used. LAMMPS uses default values for each of these, so they do not need to be specified. </P> <P>By default, these header lines are as follows: </P> <PRE># Spatial-averaged data for fix ID and group name # Timestep Number-of-bins # Bin Coord1 Coord2 Coord3 Count value1 value2 ... </PRE> <P>In the first line, ID and name are replaced with the fix-ID and group name. The second line describes the two values that are printed at the first of each section of output. In the third line the values are replaced with the appropriate fields from the fix ave/spatial command. The Coord2 and Coord3 entries in the third line only appear for 2d and 3d bins respectively. For 1d bins, the word Coord1 is replaced by just Coord. </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. </P> <P>This fix computes a global array of values which can be accessed by various <A HREF = "Section_howto.html#howto_15">output commands</A>. The values can only be accessed on timesteps that are multiples of <I>Nfreq</I> since that is when averaging is performed. The global array has # of rows = Nbins and # of columns = Ndim+1+Nvalues, where Ndim = 1,2,3 for 1d,2d,3d bins. The first 1 or 2 or 3 columns have the bin coordinates (center of the bin) in the appropriate dimensions, the next column has the count of atoms in that bin, and the remaining columns are the Nvalue quantities. When the array is accessed with an I that exceeds the current number of bins, than a 0.0 is returned by the fix instead of an error, since the number of bins can vary as a simulation runs, depending on the simulation box size. 2d or 3d bins are ordered so that the last dimension(s) vary fastest. The array values calculated by this fix are "intensive", since they are already normalized by the count of atoms in each bin. </P> <P>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>When the <I>ave</I> keyword is set to <I>running</I> or <I>window</I> then the number of bins must remain the same during the simulation, so that the appropriate averaging can be done. This will be the case if the simulation box size doesn't change or if the <I>units</I> keyword is set to <I>reduced</I>. </P> <P><B>Related commands:</B> </P> <P><A HREF = "compute.html">compute</A>, <A HREF = "fix_ave_atom.html">fix ave/atom</A>, <A HREF = "fix_ave_histo.html">fix ave/histo</A>, <A HREF = "fix_ave_time.html">fix ave/time</A>, <A HREF = "variable.html">variable</A>, <A HREF = "fix_ave_correlate.html">fix ave/correlate</A>, +<A HREF = "fix_ave_spatial_sphere.html">fix ave/spatial/sphere</A> </P> <P><B>Default:</B> </P> <P>The option defaults are bound = lower and upper in all dimensions, discard = mixed, norm = all, ave = one, units = lattice, no file output, and title 1,2,3 = strings as described above. </P> </HTML> diff --git a/doc/fix_ave_spatial.txt b/doc/fix_ave_spatial.txt index c12713f65..1487502e0 100644 --- a/doc/fix_ave_spatial.txt +++ b/doc/fix_ave_spatial.txt @@ -1,398 +1,400 @@ "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 ave/spatial command :h3 [Syntax:] fix ID group-ID ave/spatial Nevery Nrepeat Nfreq dim origin delta ... value1 value2 ... keyword args ... :pre ID, group-ID are documented in "fix"_fix.html command :ulb,l ave/spatial = style name of this fix command :l Nevery = use input values every this many timesteps :l Nrepeat = # of times to use input values for calculating averages :l Nfreq = calculate averages every this many timesteps :l dim, origin, delta can be repeated 1, 2, or 3 times for 1d, 2d, or 3d bins :l dim = {x} or {y} or {z} origin = {lower} or {center} or {upper} or coordinate value (distance units) delta = thickness of spatial bins in dim (distance units) :pre one or more input values can be listed :l value = vx, vy, vz, fx, fy, fz, density/mass, density/number, c_ID, c_ID\[I\], f_ID, f_ID\[I\], v_name :l vx,vy,vz,fx,fy,fz = atom attribute (velocity, force component) density/number, density/mass = number or mass density c_ID = per-atom vector calculated by a compute with ID c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID f_ID = per-atom vector calculated by a fix with ID f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID v_name = per-atom vector calculated by an atom-style variable with name :pre zero or more keyword/arg pairs may be appended :l keyword = {region} or {discard} or {norm} or {ave} or {units} or {file} or {overwrite} or {title1} or {title2} or {title3} :l {region} arg = region-ID {bound} args = x/y/z lo hi x/y/z = {x} or {y} or {z} to bound bins in this dimension lo = {lower} or coordinate value (distance units) hi = {upper} or coordinate value (distance units) {discard} arg = {mixed} or {no} or {yes} mixed = discard atoms outside bins only if bin bounds are explicitly set no = always keep out-of-bounds atoms yes = always discard out-of-bounds atoms {norm} arg = {all} or {sample} region-ID = ID of region atoms must be in to contribute to spatial averaging {ave} args = {one} or {running} or {window M} one = output new average value every Nfreq steps running = output cumulative average of all previous Nfreq steps window M = output average of M most recent Nfreq steps {units} arg = {box} or {lattice} or {reduced} {file} arg = filename filename = file to write results to {overwrite} arg = none = overwrite output file with only latest output {title1} arg = string string = text to print as 1st line of output file {title2} arg = string string = text to print as 2nd line of output file {title3} arg = string string = text to print as 3rd line of output file :pre :ule [Examples:] fix 1 all ave/spatial 10000 1 10000 z lower 0.02 c_myCentro units reduced & title1 "My output values" fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile -fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass ave running :pre +fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass ave running +fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass bound y 5.0 20.0 discard yes ave running :pre [Description:] Use one or more per-atom vectors as inputs every few timesteps, bin their values spatially into 1d, 2d, or 3d bins based on current atom coordinates, and average the bin values over longer timescales. The resulting bin averages can be used by other "output commands"_Section_howto.html#howto_15 such as "thermo_style custom"_thermo_style.html, and can also be written to a file. The group specified with the command means only atoms within the group contribute to bin averages. If the {region} keyword is used, the atom must be in both the group and the specified geometric "region"_region.html in order to contribute to bin averages. Each listed value can be an atom attribute (position, velocity, force component), a mass or number density, or the result of a "compute"_compute.html or "fix"_fix.html or the evaluation of an atom-style "variable"_variable.html. In the latter cases, the compute, fix, or variable must produce a per-atom quantity, not a global quantity. If you wish to time-average global quantities from a compute, fix, or variable, then see the "fix ave/time"_fix_ave_time.html command. "Computes"_compute.html that produce per-atom quantities are those which have the word {atom} in their style name. See the doc pages for individual "fixes"_fix.html to determine which ones produce per-atom quantities. "Variables"_variable.html of style {atom} are the only ones that can be used with this fix since all other styles of variable produce global quantities. The per-atom values of each input vector are binned and averaged independently of the per-atom values in other input vectors. The size and dimensionality of the bins (1d = layers or slabs, 2d = pencils, 3d = boxes) are determined by the {dim}, {origin}, and {delta} settings and how many times they are specified (1, 2, or 3). See details below. IMPORTANT NOTE: This fix works by creating an array of size Nbins by Nvalues on each processor. Nbins is the total number of bins; Nvalues is the number of input values specified. Each processor loops over its atoms, tallying its values to the appropriate bin. Then the entire array is summed across all processors. This means that using a large number of bins (easy to do for 2d or 3d bins) will incur an overhead in memory and computational cost (summing across processors), so be careful to use reasonable numbers of bins. :line The {Nevery}, {Nrepeat}, and {Nfreq} arguments specify on what timesteps the input values will be used to bin them and contribute to the average. The final averaged quantities are generated on timesteps that are a multiples of {Nfreq}. The average is over {Nrepeat} quantities, computed in the preceding portion of the simulation every {Nevery} timesteps. {Nfreq} must be a multiple of {Nevery} and {Nevery} must be non-zero even if {Nrepeat} is 1. Also, the timesteps contributing to the average value cannot overlap, i.e. Nfreq > (Nrepeat-1)*Nevery is required. For example, if Nevery=2, Nrepeat=6, and Nfreq=100, then values on timesteps 90,92,94,96,98,100 will be used to compute the final average on timestep 100. Similarly for timesteps 190,192,194,196,198,200 on timestep 200, etc. If Nrepeat=1 and Nfreq = 100, then no time averaging is done; values are simply generated on timesteps 100,200,etc. :line Each per-atom property is also averaged over atoms in each bin. The way the averaging is one across the {Nrepeat} timesteps to produce output on the {Nfreq} timesteps, and across multiple {Nfreq} outputs, is determined by the {norm} and {av} keyword settings, as discussed below. Bins can be 1d layers or slabs, 2d pencils, or 3d boxes. This depends on how many times (1, 2, or 3) the {dim}, {origin}, and {delta} settings are specified in the fix ave/spatial command. For 2d or 3d bins, there is no restriction on specifying dim = x before dim = y, or dim = y before dim = z. Bins in a particular {dim} have a bin size in that dimension given by {delta}. Every Nfreq steps, when averaging is being performed and the per-atom property is calculated for the first time, the number of bins and the bin sizes and boundaries are computed. Thus if the simulation box changes size during a simulation, the number of bins and their boundaries may also change. In each dimension, bins are defined relative to a specified {origin}, which may be the lower/upper edge of the simulation box in that dimension, or its center point, or a specified coordinate value. Starting at the origin, sufficient bins are created in both directions to completely span the bin extent in that dimension. By default the bin extent is the entire simulation box. The {bound} keyword can be used to limit the extent of bin coverage in any dimension, i.e. to only bin a portion of the box. If the {lo} setting is {lower} or the {hi} setting is {upper}, the bin extent in that direction extends to the box boundary. If a numeric value is used for {lo} and/or {hi}, then the bin extent in the {lo} or {hi} direction extends only to that value, which is assumed to be inside (or at least near) the simulation box boundaries, though LAMMPS does not check for this. On each sampling timestep, each atom is mapped to the bin it currently belongs to, based on its current position. Note that the group-ID and region keyword can exclude specific atoms from this operation, as discussed above. Note that between reneighboring timesteps, atoms can move outside the current simulation box. If the box is periodic (in that dimension) the atom is remapping into the periodic box for purposes of binning. If the box in not periodic, the atom may have moved outside the bounds of any bin. The {discard} keyword determines what is done with any atom which is outside the bounds of any bin. If {discard} is set to {yes}, the atom will be ignored and not contribute to any bin averages. If {discard} is set to {no}, the atom will be counted as if it were in the first or last bin in that dimension. If (discard} is set to {mixed}, which is the default, it will only be counted in the first or last bin if bins extend to the box boundary in that dimension. This is the case if the {bound} keyword settings are {lower} and {upper}, which is the default. If the {bound} keyword settings are numeric values, then the atom will be ignored if it is outside the bounds of any bin. Note that in this case, it is possible that the first or last bin extends beyond the numeric {bounds} settings, depending on the specified {origin}. If this is the case, the atom is only ignored if it is outside the first or last bin, not if it is simply outside the numeric {bounds} setting. For orthogonal simulation boxes, the bins are also layers, pencils, or boxes aligned with the xyz coordinate axes. For triclinic (non-orthogonal) simulation boxes, the bins are so that they are parallel to the tilted faces of the simulation box. See "this section"_Section_howto.html#howto_12 of the manual for a discussion of the geometry of triclinic boxes in LAMMPS. As described there, a tilted simulation box has edge vectors a,b,c. In that nomenclature, bins in the x dimension have faces with normals in the "b" cross "c" direction. Bins in y have faces normal to the "a" cross "c" direction. And bins in z have faces normal to the "a" cross "b" direction. Note that in order to define the size and position of these bins in an unambiguous fashion, the {units} option must be set to {reduced} when using a triclinic simulation box, as noted below. :line The atom attribute values (vx,vy,vz,fx,fy,fz) are self-explanatory. Note that other atom attributes (including atom postitions x,y,z) can be used as inputs to this fix by using the "compute property/atom"_compute_property_atom.html command and then specifying an input value from that compute. The {density/number} value means the number density is computed in each bin, i.e. a weighting of 1 for each atom. The {density/mass} value means the mass density is computed in each bind, i.e. each atom is weighted by its mass. The resulting density is normalized by the volume of the bin so that units of number/volume or density are output. See the "units"_units.html command doc page for the definition of density for each choice of units, e.g. gram/cm^3. If a value begins with "c_", a compute ID must follow which has been previously defined in the input script. If no bracketed integer is appended, the per-atom vector calculated by the compute is used. If a bracketed integer is appended, the Ith column of the per-atom array calculated by the compute is used. Users can also write code for their own compute styles and "add them to LAMMPS"_Section_modify.html. If a value begins with "f_", a fix ID must follow which has been previously defined in the input script. If no bracketed integer is appended, the per-atom vector calculated by the fix is used. If a bracketed integer is appended, the Ith column of the per-atom array calculated by the fix is used. Note that some fixes only produce their values on certain timesteps, which must be compatible with {Nevery}, else an error results. Users can also write code for their own fix styles and "add them to LAMMPS"_Section_modify.html. If a value begins with "v_", a variable name must follow which has been previously defined in the input script. Variables of style {atom} can reference thermodynamic keywords and various per-atom attributes, or invoke other computes, fixes, or variables when they are evaluated, so this is a very general means of generating per-atom quantities to spatially average. :line Additional optional keywords also affect the operation of this fix. The {region}, {bound}, and {discard} keywords were discussed above. The {norm} keyword affects how averaging is done for the output produced every {Nfreq} timesteps. For an {all} setting, a bin quantity is summed over all atoms in all {Nrepeat} samples, as is the count of atoms in the bin. The printed value for the bin is Total-quantity / Total-count. In other words it is an average over the entire {Nfreq} timescale. For a {sample} setting, the bin quantity is summed over atoms for only a single sample, as is the count, and a "average sample value" is computed, i.e. Sample-quantity / Sample-count. The printed value for the bin is the average of the {Nrepeat} "average sample values", In other words it is an average of an average. The {ave} keyword determines how the bin values produced every {Nfreq} steps are averaged with bin values produced on previous steps that were multiples of {Nfreq}, before they are accessed by another output command or written to a file. If the {ave} setting is {one}, then the bin values produced on timesteps that are multiples of {Nfreq} are independent of each other; they are output as-is without further averaging. If the {ave} setting is {running}, then the bin values produced on timesteps that are multiples of {Nfreq} are summed and averaged in a cumulative sense before being output. Each output bin value is thus the average of the bin value produced on that timestep with all preceding values for the same bin. This running average begins when the fix is defined; it can only be restarted by deleting the fix via the "unfix"_unfix.html command, or re-defining the fix by re-specifying it. If the {ave} setting is {window}, then the bin values produced on timesteps that are multiples of {Nfreq} are summed and averaged within a moving "window" of time, so that the last M values for the same bin are used to produce the output. E.g. if M = 3 and Nfreq = 1000, then the output on step 10000 will be the average of the individual bin values on steps 8000,9000,10000. Outputs on early steps will average over less than M values if they are not available. The {units} keyword determines the meaning of the distance units used for the bin size {delta} and for {origin} and {bounds} values if they are coordinate value. For orthogonal simulation boxes, any of the 3 options may be used. For non-orthogonal (triclinic) simulation boxes, only the {reduced} option may be 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 spacing. A {reduced} value means normalized unitless values between 0 and 1, which represent the lower and upper faces of the simulation box respectively. Thus an {origin} value of 0.5 means the center of the box in any dimension. A {delta} value of 0.1 means 10 bins span the box in that dimension. Consider a non-orthogonal box, with bins that are 1d layers or slabs in the x dimension. No matter how the box is tilted, an {origin} of 0.0 means start layers at the lower "b" cross "c" plane of the simulation box and an {origin} of 1.0 means to start layers at the upper "b" cross "c" face of the box. A {delta} value of 0.1 means there will be 10 layers from 0.0 to 1.0, regardless of the current size or shape of the simulation box. The {file} keyword allows a filename to be specified. Every {Nfreq} timesteps, a section of bin info will be written to a text file in the following format. A line with the timestep and number of bin is written. Then one line per bin is written, containing the bin ID (1-N), the coordinate of the center of the bin, the number of atoms in the bin, and one or more calculated values. The number of values in each line corresponds to the number of values specified in the fix ave/spatial command. The number of atoms and the value(s) are average quantities. If the value of the {units} keyword is {box} or {lattice}, the "coord" is printed in box units. If the value of the {units} keyword is {reduced}, the "coord" is printed in reduced units (0-1). The {overwrite} keyword will continuously overwrite the output file with the latest output, so that it only contains one timestep worth of output. This option can only be used with the {ave running} setting. The {title1} and {title2} and {title3} keywords allow specification of the strings that will be printed as the first 3 lines of the output file, assuming the {file} keyword was used. LAMMPS uses default values for each of these, so they do not need to be specified. By default, these header lines are as follows: # Spatial-averaged data for fix ID and group name # Timestep Number-of-bins # Bin Coord1 Coord2 Coord3 Count value1 value2 ... :pre In the first line, ID and name are replaced with the fix-ID and group name. The second line describes the two values that are printed at the first of each section of output. In the third line the values are replaced with the appropriate fields from the fix ave/spatial command. The Coord2 and Coord3 entries in the third line only appear for 2d and 3d bins respectively. For 1d bins, the word Coord1 is replaced by just Coord. :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. This fix computes a global array of values which can be accessed by various "output commands"_Section_howto.html#howto_15. The values can only be accessed on timesteps that are multiples of {Nfreq} since that is when averaging is performed. The global array has # of rows = Nbins and # of columns = Ndim+1+Nvalues, where Ndim = 1,2,3 for 1d,2d,3d bins. The first 1 or 2 or 3 columns have the bin coordinates (center of the bin) in the appropriate dimensions, the next column has the count of atoms in that bin, and the remaining columns are the Nvalue quantities. When the array is accessed with an I that exceeds the current number of bins, than a 0.0 is returned by the fix instead of an error, since the number of bins can vary as a simulation runs, depending on the simulation box size. 2d or 3d bins are ordered so that the last dimension(s) vary fastest. The array values calculated by this fix are "intensive", since they are already normalized by the count of atoms in each bin. 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:] When the {ave} keyword is set to {running} or {window} then the number of bins must remain the same during the simulation, so that the appropriate averaging can be done. This will be the case if the simulation box size doesn't change or if the {units} keyword is set to {reduced}. [Related commands:] "compute"_compute.html, "fix ave/atom"_fix_ave_atom.html, "fix ave/histo"_fix_ave_histo.html, "fix ave/time"_fix_ave_time.html, "variable"_variable.html, "fix ave/correlate"_fix_ave_correlate.html, +"fix ave/spatial/sphere"_fix_ave_spatial_sphere.html [Default:] The option defaults are bound = lower and upper in all dimensions, discard = mixed, norm = all, ave = one, units = lattice, no file output, and title 1,2,3 = strings as described above. diff --git a/doc/fix_ave_spatial.html b/doc/fix_ave_spatial_sphere.html similarity index 60% copy from doc/fix_ave_spatial.html copy to doc/fix_ave_spatial_sphere.html index b5a51e8be..d7d55d725 100644 --- a/doc/fix_ave_spatial.html +++ b/doc/fix_ave_spatial_sphere.html @@ -1,415 +1,342 @@ <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 ave/spatial command +<H3>fix ave/spatial/sphere command </H3> <P><B>Syntax:</B> </P> -<PRE>fix ID group-ID ave/spatial Nevery Nrepeat Nfreq dim origin delta ... value1 value2 ... keyword args ... +<PRE>fix ID group-ID ave/spatial/sphere Nevery Nrepeat Nfreq origin_x origin_y origin_z r_min r_max nbins value1 value2 ... keyword args ... </PRE> <UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command <LI>ave/spatial = style name of this fix command <LI>Nevery = use input values every this many timesteps <LI>Nrepeat = # of times to use input values for calculating averages <LI>Nfreq = calculate averages every this many timesteps -<LI>dim, origin, delta can be repeated 1, 2, or 3 times for 1d, 2d, or 3d bins +<LI>origin_x, origin_y, origin_z = center of the sphere. can be the result of variables or computes (see below) + +<LI>r_min = radial distance at which binning begins + +<LI>r_max = radial distance at which binning ends + +<LI>nbins = number of spherical shells to create between r_min and r_max -<PRE> dim = <I>x</I> or <I>y</I> or <I>z</I> - origin = <I>lower</I> or <I>center</I> or <I>upper</I> or coordinate value (distance units) - delta = thickness of spatial bins in dim (distance units) -</PRE> <LI>one or more input values can be listed <LI>value = vx, vy, vz, fx, fy, fz, density/mass, density/number, c_ID, c_ID[I], f_ID, f_ID[I], v_name <PRE> vx,vy,vz,fx,fy,fz = atom attribute (velocity, force component) density/number, density/mass = number or mass density c_ID = per-atom vector calculated by a compute with ID c_ID[I] = Ith column of per-atom array calculated by a compute with ID f_ID = per-atom vector calculated by a fix with ID f_ID[I] = Ith column of per-atom array calculated by a fix with ID v_name = per-atom vector calculated by an atom-style variable with name </PRE> <LI>zero or more keyword/arg pairs may be appended -<LI>keyword = <I>region</I> or <I>discard</I> or <I>norm</I> or <I>ave</I> or <I>units</I> or <I>file</I> or <I>overwrite</I> or <I>title1</I> or <I>title2</I> or <I>title3</I> +<LI>keyword = <I>region</I> or <I>norm</I> or <I>units</I> or <I>ave</I> or <I>file</I> or <I>overwrite</I> or <I>title1</I> or <I>title2</I> or <I>title3</I> <PRE> <I>region</I> arg = region-ID - <I>bound</I> args = x/y/z lo hi - x/y/z = <I>x</I> or <I>y</I> or <I>z</I> to bound bins in this dimension - lo = <I>lower</I> or coordinate value (distance units) - hi = <I>upper</I> or coordinate value (distance units) - <I>discard</I> arg = <I>mixed</I> or <I>no</I> or <I>yes</I> - mixed = discard atoms outside bins only if bin bounds are explicitly set - no = always keep out-of-bounds atoms - yes = always discard out-of-bounds atoms - <I>norm</I> arg = <I>all</I> or <I>sample</I> region-ID = ID of region atoms must be in to contribute to spatial averaging + <I>norm</I> arg = <I>all</I> or <I>sample</I> + <I>units</I> arg = <I>box</I> or <I>lattice</I> or <I>reduced</I> <I>ave</I> args = <I>one</I> or <I>running</I> or <I>window M</I> one = output new average value every Nfreq steps running = output cumulative average of all previous Nfreq steps window M = output average of M most recent Nfreq steps - <I>units</I> arg = <I>box</I> or <I>lattice</I> or <I>reduced</I> <I>file</I> arg = filename filename = file to write results to <I>overwrite</I> arg = none = overwrite output file with only latest output <I>title1</I> arg = string string = text to print as 1st line of output file <I>title2</I> arg = string string = text to print as 2nd line of output file <I>title3</I> arg = string string = text to print as 3rd line of output file </PRE> </UL> <P><B>Examples:</B> </P> -<PRE>fix 1 all ave/spatial 10000 1 10000 z lower 0.02 c_myCentro units reduced & - title1 "My output values" -fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile -fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass ave running +<PRE>fix 1 all ave/spatial/sphere 10000 1 10000 0.5 0.5 0.5 0.1 0.5 5 density/number vx vy vz units reduced title1 "My output values" +fix 1 flow ave/spatial/sphere 100 10 1000 20.0 20.0 20.0 0.0 20.0 20 vx vz norm sample file vel.profile </PRE> <P><B>Description:</B> </P> <P>Use one or more per-atom vectors as inputs every few timesteps, bin -their values spatially into 1d, 2d, or 3d bins based on current atom +their values spatially into spherical shells based on current atom coordinates, and average the bin values over longer timescales. The resulting bin averages can be used by other <A HREF = "Section_howto.html#howto_15">output commands</A> such as <A HREF = "thermo_style.html">thermo_style custom</A>, and can also be written to a file. </P> <P>The group specified with the command means only atoms within the group -contribute to bin averages. If the <I>region</I> keyword is used, the -atom must be in both the group and the specified geometric +contribute to bin averages. If the <I>region</I> keyword is used, the atom +must be in both the group and the specified geometric <A HREF = "region.html">region</A> in order to contribute to bin averages. </P> <P>Each listed value can be an atom attribute (position, velocity, force component), a mass or number density, or the result of a <A HREF = "compute.html">compute</A> or <A HREF = "fix.html">fix</A> or the evaluation of an atom-style <A HREF = "variable.html">variable</A>. In the latter cases, the compute, fix, or variable must produce a per-atom quantity, not a global quantity. If you wish to time-average global quantities from a compute, fix, or variable, then see the <A HREF = "fix_ave_time.html">fix ave/time</A> command. </P> <P><A HREF = "compute.html">Computes</A> that produce per-atom quantities are those which have the word <I>atom</I> in their style name. See the doc pages for individual <A HREF = "fix.html">fixes</A> to determine which ones produce per-atom quantities. <A HREF = "variable.html">Variables</A> of style <I>atom</I> are the only ones that can be used with this fix since all other styles of variable produce global quantities. </P> <P>The per-atom values of each input vector are binned and averaged independently of the per-atom values in other input vectors. </P> -<P>The size and dimensionality of the bins (1d = layers or slabs, 2d = -pencils, 3d = boxes) are determined by the <I>dim</I>, <I>origin</I>, and -<I>delta</I> settings and how many times they are specified (1, 2, or 3). -See details below. +<P><I>Nbins</I> specifies the number of spherical shells which will be created +between r_min and r_max centered at (origin_x, origin_y, origin_z). </P> <P>IMPORTANT NOTE: This fix works by creating an array of size Nbins by Nvalues on each processor. Nbins is the total number of bins; Nvalues is the number of input values specified. Each processor loops over its atoms, tallying its values to the appropriate bin. Then the entire array is summed across all processors. This means that using a -large number of bins (easy to do for 2d or 3d bins) will incur an -overhead in memory and computational cost (summing across processors), -so be careful to use reasonable numbers of bins. +large number of bins will incur an overhead in memory and computational +cost (summing across processors), so be careful to use reasonable numbers +of bins. </P> <HR> <P>The <I>Nevery</I>, <I>Nrepeat</I>, and <I>Nfreq</I> arguments specify on what timesteps the input values will be used to bin them and contribute to the average. The final averaged quantities are generated on timesteps that are a multiples of <I>Nfreq</I>. The average is over <I>Nrepeat</I> quantities, computed in the preceding portion of the simulation every <I>Nevery</I> timesteps. <I>Nfreq</I> must be a multiple of <I>Nevery</I> and <I>Nevery</I> must be non-zero even if <I>Nrepeat</I> is 1. Also, the timesteps contributing to the average value cannot overlap, i.e. Nfreq > (Nrepeat-1)*Nevery is required. </P> <P>For example, if Nevery=2, Nrepeat=6, and Nfreq=100, then values on timesteps 90,92,94,96,98,100 will be used to compute the final average on timestep 100. Similarly for timesteps 190,192,194,196,198,200 on timestep 200, etc. If Nrepeat=1 and Nfreq = 100, then no time averaging is done; values are simply generated on timesteps 100,200,etc. </P> <HR> -<P>Each per-atom property is also averaged over atoms in each bin. The -way the averaging is one across the <I>Nrepeat</I> timesteps to produce -output on the <I>Nfreq</I> timesteps, and across multiple <I>Nfreq</I> outputs, -is determined by the <I>norm</I> and <I>av</I> keyword settings, as discussed -below. -</P> -<P>Bins can be 1d layers or slabs, 2d pencils, or 3d boxes. This depends -on how many times (1, 2, or 3) the <I>dim</I>, <I>origin</I>, and <I>delta</I> -settings are specified in the fix ave/spatial command. For 2d or 3d -bins, there is no restriction on specifying dim = x before dim = y, or -dim = y before dim = z. Bins in a particular <I>dim</I> have a bin size in -that dimension given by <I>delta</I>. Every Nfreq steps, when averaging is -being performed and the per-atom property is calculated for the first -time, the number of bins and the bin sizes and boundaries are -computed. Thus if the simulation box changes size during a -simulation, the number of bins and their boundaries may also change. -In each dimension, bins are defined relative to a specified <I>origin</I>, -which may be the lower/upper edge of the simulation box in that -dimension, or its center point, or a specified coordinate value. -Starting at the origin, sufficient bins are created in both directions -to completely span the bin extent in that dimension. By default the -bin extent is the entire simulation box. -</P> -<P>The <I>bound</I> keyword can be used to limit the extent of bin coverage in -any dimension, i.e. to only bin a portion of the box. If the <I>lo</I> -setting is <I>lower</I> or the <I>hi</I> setting is <I>upper</I>, the bin extent in -that direction extends to the box boundary. If a numeric value is -used for <I>lo</I> and/or <I>hi</I>, then the bin extent in the <I>lo</I> or <I>hi</I> -direction extends only to that value, which is assumed to be inside -(or at least near) the simulation box boundaries, though LAMMPS does -not check for this. -</P> -<P>On each sampling timestep, each atom is mapped to the bin it currently -belongs to, based on its current position. Note that the group-ID and -region keyword can exclude specific atoms from this operation, as -discussed above. Note that between reneighboring timesteps, atoms can -move outside the current simulation box. If the box is periodic (in -that dimension) the atom is remapping into the periodic box for -purposes of binning. If the box in not periodic, the atom may have -moved outside the bounds of any bin. -</P> -<P>The <I>discard</I> keyword determines what is done with any atom which is -outside the bounds of any bin. If <I>discard</I> is set to <I>yes</I>, the atom -will be ignored and not contribute to any bin averages. If <I>discard</I> -is set to <I>no</I>, the atom will be counted as if it were in the first or -last bin in that dimension. If (discard</I> is set to <I>mixed</I>, which is -the default, it will only be counted in the first or last bin if bins -extend to the box boundary in that dimension. This is the case if the -<I>bound</I> keyword settings are <I>lower</I> and <I>upper</I>, which is the -default. If the <I>bound</I> keyword settings are numeric values, then the -atom will be ignored if it is outside the bounds of any bin. Note -that in this case, it is possible that the first or last bin extends -beyond the numeric <I>bounds</I> settings, depending on the specified -<I>origin</I>. If this is the case, the atom is only ignored if it is -outside the first or last bin, not if it is simply outside the numeric -<I>bounds</I> setting. -</P> -<P>For orthogonal simulation boxes, the bins are also layers, pencils, or -boxes aligned with the xyz coordinate axes. For triclinic -(non-orthogonal) simulation boxes, the bins are so that they are -parallel to the tilted faces of the simulation box. See <A HREF = "Section_howto.html#howto_12">this -section</A> of the manual for a discussion of -the geometry of triclinic boxes in LAMMPS. As described there, a -tilted simulation box has edge vectors a,b,c. In that nomenclature, -bins in the x dimension have faces with normals in the "b" cross "c" -direction. Bins in y have faces normal to the "a" cross "c" -direction. And bins in z have faces normal to the "a" cross "b" -direction. Note that in order to define the size and position of -these bins in an unambiguous fashion, the <I>units</I> option must be set -to <I>reduced</I> when using a triclinic simulation box, as noted below. +<P>The <I>origin_x</I>, <I>origin_y</I>, and <I>origin_z</I> parameters may be specified +by either a compute or a variable. This allows, for example, the +center of the spherical bins to be attached to the center of mass of a +group of atoms. If a variable origin is used and periodic boundary +conditions are in effect, then the origin will be wrapped across +periodic boundaries whenever it changes so that it is always inside +the simulation box. </P> <HR> <P>The atom attribute values (vx,vy,vz,fx,fy,fz) are self-explanatory. Note that other atom attributes (including atom postitions x,y,z) can be used as inputs to this fix by using the <A HREF = "compute_property_atom.html">compute property/atom</A> command and then specifying an input value from that compute. </P> <P>The <I>density/number</I> value means the number density is computed in each bin, i.e. a weighting of 1 for each atom. The <I>density/mass</I> -value means the mass density is computed in each bind, i.e. each atom +value means the mass density is computed in each bin, i.e. each atom is weighted by its mass. The resulting density is normalized by the volume of the bin so that units of number/volume or density are output. See the <A HREF = "units.html">units</A> command doc page for the definition of density for each choice of units, e.g. gram/cm^3. +The bin volume will always be calculated in box units, independent +of the use of the <I>units</I> keyword in this command. </P> <P>If a value begins with "c_", a compute ID must follow which has been previously defined in the input script. If no bracketed integer is appended, the per-atom vector calculated by the compute is used. If a bracketed integer is appended, the Ith column of the per-atom array calculated by the compute is used. Users can also write code for their own compute styles and <A HREF = "Section_modify.html">add them to LAMMPS</A>. </P> <P>If a value begins with "f_", a fix ID must follow which has been previously defined in the input script. If no bracketed integer is appended, the per-atom vector calculated by the fix is used. If a bracketed integer is appended, the Ith column of the per-atom array calculated by the fix is used. Note that some fixes only produce their values on certain timesteps, which must be compatible with <I>Nevery</I>, else an error results. Users can also write code for their own fix styles and <A HREF = "Section_modify.html">add them to LAMMPS</A>. </P> <P>If a value begins with "v_", a variable name must follow which has been previously defined in the input script. Variables of style <I>atom</I> can reference thermodynamic keywords and various per-atom attributes, or invoke other computes, fixes, or variables when they are evaluated, so this is a very general means of generating per-atom quantities to spatially average. </P> <HR> <P>Additional optional keywords also affect the operation of this fix. -The <I>region</I>, <I>bound</I>, and <I>discard</I> keywords were discussed above. +The <I>region</I> keyword was discussed above. </P> <P>The <I>norm</I> keyword affects how averaging is done for the output produced every <I>Nfreq</I> timesteps. For an <I>all</I> setting, a bin quantity is summed over all atoms in all <I>Nrepeat</I> samples, as is the count of atoms in the bin. The printed value for the bin is Total-quantity / Total-count. In other words it is an average over the entire <I>Nfreq</I> timescale. </P> <P>For a <I>sample</I> setting, the bin quantity is summed over atoms for only a single sample, as is the count, and a "average sample value" is computed, i.e. Sample-quantity / Sample-count. The printed value for the bin is the average of the <I>Nrepeat</I> "average sample values", In other words it is an average of an average. </P> <P>The <I>ave</I> keyword determines how the bin values produced every <I>Nfreq</I> steps are averaged with bin values produced on previous steps that were multiples of <I>Nfreq</I>, before they are accessed by another output command or written to a file. </P> <P>If the <I>ave</I> setting is <I>one</I>, then the bin values produced on timesteps that are multiples of <I>Nfreq</I> are independent of each other; they are output as-is without further averaging. </P> <P>If the <I>ave</I> setting is <I>running</I>, then the bin values produced on timesteps that are multiples of <I>Nfreq</I> are summed and averaged in a cumulative sense before being output. Each output bin value is thus the average of the bin value produced on that timestep with all preceding values for the same bin. This running average begins when the fix is defined; it can only be restarted by deleting the fix via the <A HREF = "unfix.html">unfix</A> command, or re-defining the fix by re-specifying it. </P> <P>If the <I>ave</I> setting is <I>window</I>, then the bin values produced on timesteps that are multiples of <I>Nfreq</I> are summed and averaged within a moving "window" of time, so that the last M values for the same bin are used to produce the output. E.g. if M = 3 and Nfreq = 1000, then the output on step 10000 will be the average of the individual bin values on steps 8000,9000,10000. Outputs on early steps will average over less than M values if they are not available. </P> <P>The <I>units</I> keyword determines the meaning of the distance units used -for the bin size <I>delta</I> and for <I>origin</I> and <I>bounds</I> values if they -are coordinate value. For orthogonal simulation boxes, any of the 3 -options may be used. For non-orthogonal (triclinic) simulation boxes, -only the <I>reduced</I> option may be used. +for the sphere origin and the two radial lengths. For orthogonal +simulation boxes, any of the 3 options may be used. For +non-orthogonal (triclinic) simulation boxes, only the <I>reduced</I> option +may be 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 spacing. A <I>reduced</I> value means normalized -unitless values between 0 and 1, which represent the lower and upper -faces of the simulation box respectively. Thus an <I>origin</I> value of -0.5 means the center of the box in any dimension. A <I>delta</I> value of -0.1 means 10 bins span the box in that dimension. -</P> -<P>Consider a non-orthogonal box, with bins that are 1d layers or slabs -in the x dimension. No matter how the box is tilted, an <I>origin</I> of -0.0 means start layers at the lower "b" cross "c" plane of the -simulation box and an <I>origin</I> of 1.0 means to start layers at the -upper "b" cross "c" face of the box. A <I>delta</I> value of 0.1 means -there will be 10 layers from 0.0 to 1.0, regardless of the current -size or shape of the simulation box. +define the lattice spacing. +</P> +<P>IMPORTANT NOTE: The <I>lattice</I> style may only be used if the lattice +spacing is the same in each direction. +</P> +<P>A <I>reduced</I> value means normalized unitless values between 0 and 1, +which represent the lower and upper faces of the simulation box +respectively. Thus an <I>origin</I> value of 0.5 means the center of the +box in any dimension. </P> <P>The <I>file</I> keyword allows a filename to be specified. Every <I>Nfreq</I> timesteps, a section of bin info will be written to a text file in the following format. A line with the timestep and number of bin is written. Then one line per bin is written, containing the bin ID -(1-N), the coordinate of the center of the bin, the number of atoms -in the bin, and one or more calculated values. The number of values -in each line corresponds to the number of values specified in the fix +(1-N), the coordinate of the center of the bin, the number of atoms in +the bin, and one or more calculated values. The number of values in +each line corresponds to the number of values specified in the fix ave/spatial command. The number of atoms and the value(s) are average quantities. If the value of the <I>units</I> keyword is <I>box</I> or <I>lattice</I>, the "coord" is printed in box units. If the value of the <I>units</I> keyword is <I>reduced</I>, the "coord" is printed in reduced units (0-1). </P> <P>The <I>overwrite</I> keyword will continuously overwrite the output file with the latest output, so that it only contains one timestep worth of output. This option can only be used with the <I>ave running</I> setting. </P> <P>The <I>title1</I> and <I>title2</I> and <I>title3</I> keywords allow specification of the strings that will be printed as the first 3 lines of the output file, assuming the <I>file</I> keyword was used. LAMMPS uses default values for each of these, so they do not need to be specified. </P> <P>By default, these header lines are as follows: </P> <PRE># Spatial-averaged data for fix ID and group name # Timestep Number-of-bins -# Bin Coord1 Coord2 Coord3 Count value1 value2 ... +# Bin r Count value1 value2 ... </PRE> <P>In the first line, ID and name are replaced with the fix-ID and group name. The second line describes the two values that are printed at the first of each section of output. In the third line the values are replaced with the appropriate fields from the fix ave/spatial command. The Coord2 and Coord3 entries in the third line only appear for 2d and 3d bins respectively. For 1d bins, the word Coord1 is replaced by just Coord. </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. </P> <P>This fix computes a global array of values which can be accessed by various <A HREF = "Section_howto.html#howto_15">output commands</A>. The values can only be accessed on timesteps that are multiples of <I>Nfreq</I> since that is when averaging is performed. The global array has # of rows = -Nbins and # of columns = Ndim+1+Nvalues, where Ndim = 1,2,3 for -1d,2d,3d bins. The first 1 or 2 or 3 columns have the bin coordinates -(center of the bin) in the appropriate dimensions, the next column has -the count of atoms in that bin, and the remaining columns are the -Nvalue quantities. When the array is accessed with an I that exceeds -the current number of bins, than a 0.0 is returned by the fix instead -of an error, since the number of bins can vary as a simulation runs, -depending on the simulation box size. 2d or 3d bins are ordered so -that the last dimension(s) vary fastest. The array values calculated -by this fix are "intensive", since they are already normalized by the -count of atoms in each bin. +Nbins and # of columns = 2+Nvalues. The first column contains the +radius at the center of the shell. For units <I>reduced</I>, this is in +reduced units, while for units <I>box</I> and <I>lattice</I> this is in box +units. The next column has the count of atoms in that bin, and the +remaining columns are the Nvalue quantities. When the array is +accessed with an I that exceeds the current number of bins, than a 0.0 +is returned by the fix instead of an error. The array values +calculated by this fix are "intensive", since they are already +normalized by the count of atoms in each bin. </P> <P>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>When the <I>ave</I> keyword is set to <I>running</I> or <I>window</I> then the number of bins must remain the same during the simulation, so that the appropriate averaging can be done. This will be the case if the simulation box size doesn't change or if the <I>units</I> keyword is set to <I>reduced</I>. </P> +<P>This style is part of the USER-MISC package. It is only enabled if +LAMMPS is build with that package. See the <A HREF = "Section_start.html#3">Making of +LAMMPS</A> section for more info. +</P> <P><B>Related commands:</B> </P> <P><A HREF = "compute.html">compute</A>, <A HREF = "fix_ave_atom.html">fix ave/atom</A>, <A HREF = "fix_ave_histo.html">fix ave/histo</A>, <A HREF = "fix_ave_time.html">fix ave/time</A>, <A HREF = "variable.html">variable</A>, <A HREF = "fix_ave_correlate.html">fix ave/correlate</A>, +<A HREF = "fix_ave_spatial.html">fix ave/spatial</A>, </P> <P><B>Default:</B> </P> -<P>The option defaults are bound = lower and upper in all dimensions, -discard = mixed, norm = all, ave = one, units = lattice, no file -output, and title 1,2,3 = strings as described above. +<P>The option defaults are norm = all, ave = one, units = lattice, no +file output, and title 1,2,3 = strings as described above. </P> </HTML> diff --git a/doc/fix_ave_spatial.txt b/doc/fix_ave_spatial_sphere.txt similarity index 59% copy from doc/fix_ave_spatial.txt copy to doc/fix_ave_spatial_sphere.txt index c12713f65..65d078b8b 100644 --- a/doc/fix_ave_spatial.txt +++ b/doc/fix_ave_spatial_sphere.txt @@ -1,398 +1,323 @@ "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 ave/spatial command :h3 +fix ave/spatial/sphere command :h3 [Syntax:] -fix ID group-ID ave/spatial Nevery Nrepeat Nfreq dim origin delta ... value1 value2 ... keyword args ... :pre +fix ID group-ID ave/spatial/sphere Nevery Nrepeat Nfreq origin_x origin_y origin_z r_min r_max nbins value1 value2 ... keyword args ... :pre ID, group-ID are documented in "fix"_fix.html command :ulb,l ave/spatial = style name of this fix command :l Nevery = use input values every this many timesteps :l Nrepeat = # of times to use input values for calculating averages :l Nfreq = calculate averages every this many timesteps :l -dim, origin, delta can be repeated 1, 2, or 3 times for 1d, 2d, or 3d bins :l - dim = {x} or {y} or {z} - origin = {lower} or {center} or {upper} or coordinate value (distance units) - delta = thickness of spatial bins in dim (distance units) :pre +origin_x, origin_y, origin_z = center of the sphere. can be the result of variables or computes (see below) :l +r_min = radial distance at which binning begins :l +r_max = radial distance at which binning ends :l +nbins = number of spherical shells to create between r_min and r_max :l one or more input values can be listed :l value = vx, vy, vz, fx, fy, fz, density/mass, density/number, c_ID, c_ID\[I\], f_ID, f_ID\[I\], v_name :l vx,vy,vz,fx,fy,fz = atom attribute (velocity, force component) density/number, density/mass = number or mass density c_ID = per-atom vector calculated by a compute with ID c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID f_ID = per-atom vector calculated by a fix with ID f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID v_name = per-atom vector calculated by an atom-style variable with name :pre zero or more keyword/arg pairs may be appended :l -keyword = {region} or {discard} or {norm} or {ave} or {units} or {file} or {overwrite} or {title1} or {title2} or {title3} :l +keyword = {region} or {norm} or {units} or {ave} or {file} or {overwrite} or {title1} or {title2} or {title3} :l {region} arg = region-ID - {bound} args = x/y/z lo hi - x/y/z = {x} or {y} or {z} to bound bins in this dimension - lo = {lower} or coordinate value (distance units) - hi = {upper} or coordinate value (distance units) - {discard} arg = {mixed} or {no} or {yes} - mixed = discard atoms outside bins only if bin bounds are explicitly set - no = always keep out-of-bounds atoms - yes = always discard out-of-bounds atoms - {norm} arg = {all} or {sample} region-ID = ID of region atoms must be in to contribute to spatial averaging + {norm} arg = {all} or {sample} + {units} arg = {box} or {lattice} or {reduced} {ave} args = {one} or {running} or {window M} one = output new average value every Nfreq steps running = output cumulative average of all previous Nfreq steps window M = output average of M most recent Nfreq steps - {units} arg = {box} or {lattice} or {reduced} {file} arg = filename filename = file to write results to {overwrite} arg = none = overwrite output file with only latest output {title1} arg = string string = text to print as 1st line of output file {title2} arg = string string = text to print as 2nd line of output file {title3} arg = string string = text to print as 3rd line of output file :pre :ule [Examples:] -fix 1 all ave/spatial 10000 1 10000 z lower 0.02 c_myCentro units reduced & - title1 "My output values" -fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile -fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass ave running :pre +fix 1 all ave/spatial/sphere 10000 1 10000 0.5 0.5 0.5 0.1 0.5 5 density/number vx vy vz units reduced title1 "My output values" +fix 1 flow ave/spatial/sphere 100 10 1000 20.0 20.0 20.0 0.0 20.0 20 vx vz norm sample file vel.profile :pre [Description:] Use one or more per-atom vectors as inputs every few timesteps, bin -their values spatially into 1d, 2d, or 3d bins based on current atom +their values spatially into spherical shells based on current atom coordinates, and average the bin values over longer timescales. The resulting bin averages can be used by other "output commands"_Section_howto.html#howto_15 such as "thermo_style custom"_thermo_style.html, and can also be written to a file. The group specified with the command means only atoms within the group -contribute to bin averages. If the {region} keyword is used, the -atom must be in both the group and the specified geometric +contribute to bin averages. If the {region} keyword is used, the atom +must be in both the group and the specified geometric "region"_region.html in order to contribute to bin averages. Each listed value can be an atom attribute (position, velocity, force component), a mass or number density, or the result of a "compute"_compute.html or "fix"_fix.html or the evaluation of an atom-style "variable"_variable.html. In the latter cases, the compute, fix, or variable must produce a per-atom quantity, not a global quantity. If you wish to time-average global quantities from a compute, fix, or variable, then see the "fix ave/time"_fix_ave_time.html command. "Computes"_compute.html that produce per-atom quantities are those which have the word {atom} in their style name. See the doc pages for individual "fixes"_fix.html to determine which ones produce per-atom quantities. "Variables"_variable.html of style {atom} are the only ones that can be used with this fix since all other styles of variable produce global quantities. The per-atom values of each input vector are binned and averaged independently of the per-atom values in other input vectors. -The size and dimensionality of the bins (1d = layers or slabs, 2d = -pencils, 3d = boxes) are determined by the {dim}, {origin}, and -{delta} settings and how many times they are specified (1, 2, or 3). -See details below. +{Nbins} specifies the number of spherical shells which will be created +between r_min and r_max centered at (origin_x, origin_y, origin_z). IMPORTANT NOTE: This fix works by creating an array of size Nbins by Nvalues on each processor. Nbins is the total number of bins; Nvalues is the number of input values specified. Each processor loops over its atoms, tallying its values to the appropriate bin. Then the entire array is summed across all processors. This means that using a -large number of bins (easy to do for 2d or 3d bins) will incur an -overhead in memory and computational cost (summing across processors), -so be careful to use reasonable numbers of bins. +large number of bins will incur an overhead in memory and computational +cost (summing across processors), so be careful to use reasonable numbers +of bins. :line The {Nevery}, {Nrepeat}, and {Nfreq} arguments specify on what timesteps the input values will be used to bin them and contribute to the average. The final averaged quantities are generated on timesteps that are a multiples of {Nfreq}. The average is over {Nrepeat} quantities, computed in the preceding portion of the simulation every {Nevery} timesteps. {Nfreq} must be a multiple of {Nevery} and {Nevery} must be non-zero even if {Nrepeat} is 1. Also, the timesteps contributing to the average value cannot overlap, i.e. Nfreq > (Nrepeat-1)*Nevery is required. For example, if Nevery=2, Nrepeat=6, and Nfreq=100, then values on timesteps 90,92,94,96,98,100 will be used to compute the final average on timestep 100. Similarly for timesteps 190,192,194,196,198,200 on timestep 200, etc. If Nrepeat=1 and Nfreq = 100, then no time averaging is done; values are simply generated on timesteps 100,200,etc. :line -Each per-atom property is also averaged over atoms in each bin. The -way the averaging is one across the {Nrepeat} timesteps to produce -output on the {Nfreq} timesteps, and across multiple {Nfreq} outputs, -is determined by the {norm} and {av} keyword settings, as discussed -below. - -Bins can be 1d layers or slabs, 2d pencils, or 3d boxes. This depends -on how many times (1, 2, or 3) the {dim}, {origin}, and {delta} -settings are specified in the fix ave/spatial command. For 2d or 3d -bins, there is no restriction on specifying dim = x before dim = y, or -dim = y before dim = z. Bins in a particular {dim} have a bin size in -that dimension given by {delta}. Every Nfreq steps, when averaging is -being performed and the per-atom property is calculated for the first -time, the number of bins and the bin sizes and boundaries are -computed. Thus if the simulation box changes size during a -simulation, the number of bins and their boundaries may also change. -In each dimension, bins are defined relative to a specified {origin}, -which may be the lower/upper edge of the simulation box in that -dimension, or its center point, or a specified coordinate value. -Starting at the origin, sufficient bins are created in both directions -to completely span the bin extent in that dimension. By default the -bin extent is the entire simulation box. - -The {bound} keyword can be used to limit the extent of bin coverage in -any dimension, i.e. to only bin a portion of the box. If the {lo} -setting is {lower} or the {hi} setting is {upper}, the bin extent in -that direction extends to the box boundary. If a numeric value is -used for {lo} and/or {hi}, then the bin extent in the {lo} or {hi} -direction extends only to that value, which is assumed to be inside -(or at least near) the simulation box boundaries, though LAMMPS does -not check for this. - -On each sampling timestep, each atom is mapped to the bin it currently -belongs to, based on its current position. Note that the group-ID and -region keyword can exclude specific atoms from this operation, as -discussed above. Note that between reneighboring timesteps, atoms can -move outside the current simulation box. If the box is periodic (in -that dimension) the atom is remapping into the periodic box for -purposes of binning. If the box in not periodic, the atom may have -moved outside the bounds of any bin. - -The {discard} keyword determines what is done with any atom which is -outside the bounds of any bin. If {discard} is set to {yes}, the atom -will be ignored and not contribute to any bin averages. If {discard} -is set to {no}, the atom will be counted as if it were in the first or -last bin in that dimension. If (discard} is set to {mixed}, which is -the default, it will only be counted in the first or last bin if bins -extend to the box boundary in that dimension. This is the case if the -{bound} keyword settings are {lower} and {upper}, which is the -default. If the {bound} keyword settings are numeric values, then the -atom will be ignored if it is outside the bounds of any bin. Note -that in this case, it is possible that the first or last bin extends -beyond the numeric {bounds} settings, depending on the specified -{origin}. If this is the case, the atom is only ignored if it is -outside the first or last bin, not if it is simply outside the numeric -{bounds} setting. - -For orthogonal simulation boxes, the bins are also layers, pencils, or -boxes aligned with the xyz coordinate axes. For triclinic -(non-orthogonal) simulation boxes, the bins are so that they are -parallel to the tilted faces of the simulation box. See "this -section"_Section_howto.html#howto_12 of the manual for a discussion of -the geometry of triclinic boxes in LAMMPS. As described there, a -tilted simulation box has edge vectors a,b,c. In that nomenclature, -bins in the x dimension have faces with normals in the "b" cross "c" -direction. Bins in y have faces normal to the "a" cross "c" -direction. And bins in z have faces normal to the "a" cross "b" -direction. Note that in order to define the size and position of -these bins in an unambiguous fashion, the {units} option must be set -to {reduced} when using a triclinic simulation box, as noted below. +The {origin_x}, {origin_y}, and {origin_z} parameters may be specified +by either a compute or a variable. This allows, for example, the +center of the spherical bins to be attached to the center of mass of a +group of atoms. If a variable origin is used and periodic boundary +conditions are in effect, then the origin will be wrapped across +periodic boundaries whenever it changes so that it is always inside +the simulation box. :line The atom attribute values (vx,vy,vz,fx,fy,fz) are self-explanatory. Note that other atom attributes (including atom postitions x,y,z) can be used as inputs to this fix by using the "compute property/atom"_compute_property_atom.html command and then specifying an input value from that compute. The {density/number} value means the number density is computed in each bin, i.e. a weighting of 1 for each atom. The {density/mass} -value means the mass density is computed in each bind, i.e. each atom +value means the mass density is computed in each bin, i.e. each atom is weighted by its mass. The resulting density is normalized by the volume of the bin so that units of number/volume or density are output. See the "units"_units.html command doc page for the definition of density for each choice of units, e.g. gram/cm^3. +The bin volume will always be calculated in box units, independent +of the use of the {units} keyword in this command. If a value begins with "c_", a compute ID must follow which has been previously defined in the input script. If no bracketed integer is appended, the per-atom vector calculated by the compute is used. If a bracketed integer is appended, the Ith column of the per-atom array calculated by the compute is used. Users can also write code for their own compute styles and "add them to LAMMPS"_Section_modify.html. If a value begins with "f_", a fix ID must follow which has been previously defined in the input script. If no bracketed integer is appended, the per-atom vector calculated by the fix is used. If a bracketed integer is appended, the Ith column of the per-atom array calculated by the fix is used. Note that some fixes only produce their values on certain timesteps, which must be compatible with {Nevery}, else an error results. Users can also write code for their own fix styles and "add them to LAMMPS"_Section_modify.html. If a value begins with "v_", a variable name must follow which has been previously defined in the input script. Variables of style {atom} can reference thermodynamic keywords and various per-atom attributes, or invoke other computes, fixes, or variables when they are evaluated, so this is a very general means of generating per-atom quantities to spatially average. :line Additional optional keywords also affect the operation of this fix. -The {region}, {bound}, and {discard} keywords were discussed above. +The {region} keyword was discussed above. The {norm} keyword affects how averaging is done for the output produced every {Nfreq} timesteps. For an {all} setting, a bin quantity is summed over all atoms in all {Nrepeat} samples, as is the count of atoms in the bin. The printed value for the bin is Total-quantity / Total-count. In other words it is an average over the entire {Nfreq} timescale. For a {sample} setting, the bin quantity is summed over atoms for only a single sample, as is the count, and a "average sample value" is computed, i.e. Sample-quantity / Sample-count. The printed value for the bin is the average of the {Nrepeat} "average sample values", In other words it is an average of an average. The {ave} keyword determines how the bin values produced every {Nfreq} steps are averaged with bin values produced on previous steps that were multiples of {Nfreq}, before they are accessed by another output command or written to a file. If the {ave} setting is {one}, then the bin values produced on timesteps that are multiples of {Nfreq} are independent of each other; they are output as-is without further averaging. If the {ave} setting is {running}, then the bin values produced on timesteps that are multiples of {Nfreq} are summed and averaged in a cumulative sense before being output. Each output bin value is thus the average of the bin value produced on that timestep with all preceding values for the same bin. This running average begins when the fix is defined; it can only be restarted by deleting the fix via the "unfix"_unfix.html command, or re-defining the fix by re-specifying it. If the {ave} setting is {window}, then the bin values produced on timesteps that are multiples of {Nfreq} are summed and averaged within a moving "window" of time, so that the last M values for the same bin are used to produce the output. E.g. if M = 3 and Nfreq = 1000, then the output on step 10000 will be the average of the individual bin values on steps 8000,9000,10000. Outputs on early steps will average over less than M values if they are not available. The {units} keyword determines the meaning of the distance units used -for the bin size {delta} and for {origin} and {bounds} values if they -are coordinate value. For orthogonal simulation boxes, any of the 3 -options may be used. For non-orthogonal (triclinic) simulation boxes, -only the {reduced} option may be used. +for the sphere origin and the two radial lengths. For orthogonal +simulation boxes, any of the 3 options may be used. For +non-orthogonal (triclinic) simulation boxes, only the {reduced} option +may be 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 spacing. A {reduced} value means normalized -unitless values between 0 and 1, which represent the lower and upper -faces of the simulation box respectively. Thus an {origin} value of -0.5 means the center of the box in any dimension. A {delta} value of -0.1 means 10 bins span the box in that dimension. - -Consider a non-orthogonal box, with bins that are 1d layers or slabs -in the x dimension. No matter how the box is tilted, an {origin} of -0.0 means start layers at the lower "b" cross "c" plane of the -simulation box and an {origin} of 1.0 means to start layers at the -upper "b" cross "c" face of the box. A {delta} value of 0.1 means -there will be 10 layers from 0.0 to 1.0, regardless of the current -size or shape of the simulation box. +define the lattice spacing. + +IMPORTANT NOTE: The {lattice} style may only be used if the lattice +spacing is the same in each direction. + +A {reduced} value means normalized unitless values between 0 and 1, +which represent the lower and upper faces of the simulation box +respectively. Thus an {origin} value of 0.5 means the center of the +box in any dimension. The {file} keyword allows a filename to be specified. Every {Nfreq} timesteps, a section of bin info will be written to a text file in the following format. A line with the timestep and number of bin is written. Then one line per bin is written, containing the bin ID -(1-N), the coordinate of the center of the bin, the number of atoms -in the bin, and one or more calculated values. The number of values -in each line corresponds to the number of values specified in the fix +(1-N), the coordinate of the center of the bin, the number of atoms in +the bin, and one or more calculated values. The number of values in +each line corresponds to the number of values specified in the fix ave/spatial command. The number of atoms and the value(s) are average quantities. If the value of the {units} keyword is {box} or {lattice}, the "coord" is printed in box units. If the value of the {units} keyword is {reduced}, the "coord" is printed in reduced units (0-1). The {overwrite} keyword will continuously overwrite the output file with the latest output, so that it only contains one timestep worth of output. This option can only be used with the {ave running} setting. The {title1} and {title2} and {title3} keywords allow specification of the strings that will be printed as the first 3 lines of the output file, assuming the {file} keyword was used. LAMMPS uses default values for each of these, so they do not need to be specified. By default, these header lines are as follows: # Spatial-averaged data for fix ID and group name # Timestep Number-of-bins -# Bin Coord1 Coord2 Coord3 Count value1 value2 ... :pre +# Bin r Count value1 value2 ... :pre In the first line, ID and name are replaced with the fix-ID and group name. The second line describes the two values that are printed at the first of each section of output. In the third line the values are replaced with the appropriate fields from the fix ave/spatial command. The Coord2 and Coord3 entries in the third line only appear for 2d and 3d bins respectively. For 1d bins, the word Coord1 is replaced by just Coord. :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. This fix computes a global array of values which can be accessed by various "output commands"_Section_howto.html#howto_15. The values can only be accessed on timesteps that are multiples of {Nfreq} since that is when averaging is performed. The global array has # of rows = -Nbins and # of columns = Ndim+1+Nvalues, where Ndim = 1,2,3 for -1d,2d,3d bins. The first 1 or 2 or 3 columns have the bin coordinates -(center of the bin) in the appropriate dimensions, the next column has -the count of atoms in that bin, and the remaining columns are the -Nvalue quantities. When the array is accessed with an I that exceeds -the current number of bins, than a 0.0 is returned by the fix instead -of an error, since the number of bins can vary as a simulation runs, -depending on the simulation box size. 2d or 3d bins are ordered so -that the last dimension(s) vary fastest. The array values calculated -by this fix are "intensive", since they are already normalized by the -count of atoms in each bin. +Nbins and # of columns = 2+Nvalues. The first column contains the +radius at the center of the shell. For units {reduced}, this is in +reduced units, while for units {box} and {lattice} this is in box +units. The next column has the count of atoms in that bin, and the +remaining columns are the Nvalue quantities. When the array is +accessed with an I that exceeds the current number of bins, than a 0.0 +is returned by the fix instead of an error. The array values +calculated by this fix are "intensive", since they are already +normalized by the count of atoms in each bin. 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:] When the {ave} keyword is set to {running} or {window} then the number of bins must remain the same during the simulation, so that the appropriate averaging can be done. This will be the case if the simulation box size doesn't change or if the {units} keyword is set to {reduced}. +This style is part of the USER-MISC package. It is only enabled if +LAMMPS is build with that package. See the "Making of +LAMMPS"_Section_start.html#3 section for more info. + [Related commands:] "compute"_compute.html, "fix ave/atom"_fix_ave_atom.html, "fix ave/histo"_fix_ave_histo.html, "fix ave/time"_fix_ave_time.html, "variable"_variable.html, "fix ave/correlate"_fix_ave_correlate.html, +"fix ave/spatial"_fix_ave_spatial.html, [Default:] -The option defaults are bound = lower and upper in all dimensions, -discard = mixed, norm = all, ave = one, units = lattice, no file -output, and title 1,2,3 = strings as described above. +The option defaults are norm = all, ave = one, units = lattice, no +file output, and title 1,2,3 = strings as described above.