diff --git a/doc/Manual.html b/doc/Manual.html index 240ebc6f6d..44a7d1bb8e 100644 --- a/doc/Manual.html +++ b/doc/Manual.html @@ -1,4 +1,13 @@ + +LAMMPS Users Manual + + + + + + +
LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands
@@ -116,6 +125,8 @@ it gives quick access to documentation for all LAMMPS commands. 4.13 NEMD simulations
4.14 Aspherical particles +
+ 4.15 Output from LAMMPS
  • Example problems @@ -214,5 +225,9 @@ it gives quick access to documentation for all LAMMPS commands. + + + + diff --git a/doc/Manual.pdf b/doc/Manual.pdf index b2897d8256..ee93187bc3 100644 Binary files a/doc/Manual.pdf and b/doc/Manual.pdf differ diff --git a/doc/Manual.txt b/doc/Manual.txt index ff8bbab6b9..f59935a721 100644 --- a/doc/Manual.txt +++ b/doc/Manual.txt @@ -1,3 +1,12 @@ + +LAMMPS Users Manual + + + + + + + "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) @@ -77,7 +86,8 @@ it gives quick access to documentation for all LAMMPS commands. 4.11 "Visualizing LAMMPS snapshots"_4_11 :b 4.12 "Non-orthogonal simulation boxes"_4_12 :b 4.13 "NEMD simulations"_4_13 :b - 4.14 "Aspherical particles"_4_14 :ule,b + 4.14 "Aspherical particles"_4_14 :b + 4.15 "Output from LAMMPS"_4_15 :ule,b "Example problems"_Section_example.html :l "Performance & scalability"_Section_perf.html :l "Additional tools"_Section_tools.html :l @@ -126,6 +136,7 @@ it gives quick access to documentation for all LAMMPS commands. :link(4_12,Section_howto.html#4_12) :link(4_13,Section_howto.html#4_13) :link(4_14,Section_howto.html#4_14) +:link(4_15,Section_howto.html#4_15) :link(9_1,Section_errors.html#9_1) :link(9_2,Section_errors.html#9_2) @@ -133,3 +144,5 @@ it gives quick access to documentation for all LAMMPS commands. :link(10_1,Section_history.html#10_1) :link(10_2,Section_history.html#10_2) + + diff --git a/doc/Section_commands.html b/doc/Section_commands.html index a0c45a432e..8ee34eb1aa 100644 --- a/doc/Section_commands.html +++ b/doc/Section_commands.html @@ -295,7 +295,7 @@ 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.

    -
    +
    @@ -317,14 +317,14 @@ in the command's documentation. descriptions of each style or click on the style itself for a full description:

    -
    angle_coeffangle_styleatom_modifyatom_stylebond_coeffbond_style
    boundarychange_boxclearcommunicatecomputecompute_modify
    create_atomscreate_boxdelete_atomsdelete_bondsdielectricdihedral_coeff
    - - - - - - -
    addforceaveforceave/spatialave/timecomdeformdepositdrag
    efieldenforce2dfreezegran/diaggravitygyrationheatindent
    langevinlineforcemsdmomentumnphnptnpt/aspherenve
    nve/aspherenve/dipolenve/grannve/limitnve/noforcenvtnvt/aspherenvt/sllod
    orient/fccplaneforcepoemspourprintrdfrecenterrigid
    setforceshakespringspring/rgspring/selftemp/rescaletmdviscous
    wall/granwall/lj126wall/lj93wall/reflectwiggle +
    @@ -333,11 +333,11 @@ description: descriptions of each style or click on the style itself for a full description:

    -
    - - - -
    centro/atomcoord/atomebond/atomepair/atometotal/atomke/atom
    pressurerotate/dipolerotate/granstress/atomtemptemp/deform
    temp/aspheretemp/dipoletemp/partialtemp/ramptemp/regionvariable
    variable/atom +
    @@ -346,7 +346,7 @@ description: for an overview of pair potentials. Click on the style itself for a full description:

    -
    +
    @@ -366,7 +366,7 @@ full description: for an overview of bond potentials. Click on the style itself for a full description:

    -
    nonehybridairebobuck
    buck/coul/cutbuck/coul/longcolloiddipole/cut
    dpdeameam/opteam/alloy
    +
    nonehybridclass2fene
    fene/expandharmonicmorsenonlinear
    quartic @@ -378,7 +378,7 @@ full description: command for an overview of angle potentials. Click on the style itself for a full description:

    - @@ -390,7 +390,7 @@ itself for a full description: dihedral potentials. Click on the style itself for a full description:

    - @@ -402,7 +402,7 @@ description: improper potentials. Click on the style itself for a full description:

    - @@ -413,7 +413,7 @@ description: an overview of Kspace solvers. Click on the style itself for a full description:

    - diff --git a/doc/Section_commands.txt b/doc/Section_commands.txt index 36251751c4..2a6f706ea3 100644 --- a/doc/Section_commands.txt +++ b/doc/Section_commands.txt @@ -378,6 +378,7 @@ description: "addforce"_fix_addforce.html, "aveforce"_fix_aveforce.html, +"ave/atom"_fix_ave_atom.html, "ave/spatial"_fix_ave_spatial.html, "ave/time"_fix_ave_time.html, "com"_fix_com.html, @@ -436,16 +437,17 @@ Compute commands. See the "compute"_compute.html command for one-line descriptions of each style or click on the style itself for a full description: +"attribute/atom"_compute_attribute_atom.html, "centro/atom"_compute_centro_atom.html, "coord/atom"_compute_coord_atom.html, "ebond/atom"_compute_ebond_atom.html, "epair/atom"_compute_epair_atom.html, -"etotal/atom"_compute_etotal_atom.html, "ke/atom"_compute_ke_atom.html, "pressure"_compute_pressure.html, "rotate/dipole"_compute_rotate_dipole.html, "rotate/gran"_compute_rotate_gran.html, "stress/atom"_compute_stress_atom.html, +"sum/atom"_compute_sum_atom.html, "temp"_compute_temp.html, "temp/deform"_compute_temp_deform.html, "temp/asphere"_compute_temp_asphere.html, diff --git a/doc/Section_example.html b/doc/Section_example.html index 20d68af123..eb4abc1255 100644 --- a/doc/Section_example.html +++ b/doc/Section_example.html @@ -30,7 +30,7 @@ Site.

    These are the sample problems in the examples sub-directories:

    -
    +
    diff --git a/doc/Section_howto.html b/doc/Section_howto.html index d676c954e1..cbb90b0cb1 100644 --- a/doc/Section_howto.html +++ b/doc/Section_howto.html @@ -27,7 +27,8 @@ certain kinds of LAMMPS simulations. 4.11 Visualizing LAMMPS snapshots
    4.12 Non-orthogonal simulation boxes
    4.13 NEMD simulations
    -4.14 Aspherical particles
    +4.14 Aspherical particles
    +4.15 Output from LAMMPS

    The example input scripts included in the LAMMPS distribution and highlighted in this section also show how to @@ -793,6 +794,105 @@ lj/cut.


    +

    4.15 Output from LAMMPS +

    +

    There are two basic kinds of LAMMPS output. The first is +thermodynamic output, which is a list of quantities printed every few +timesteps to the screen and logfile. The second is dump files, which +contain snapshots of atoms and various per-atom values and are written +at a specified frequency. A simulation prints one set of +thermodynamic output; it may generate zero, or one, or multiple dump +files. LAMMPS gives you a variety of ways to determine what +quantities are computed and printed when thermodynamic info or dump +files are output. There are also two fixes which perform time and +spatial averaging of user-defined quantities, fix ave/time and fix +ave/spatial. These produce their own output files and are described +below. +

    +

    The frequency and format of thermodynamic output is set by the +thermo, thermo_style, and +thermo_modify commands. The +thermo_style command also specifies what values are +calculated and written out. Pre-defined keywords can be specified +(e.g. press, etotal, etc) which include time-averaged versions of +temperature, pressure, and a few other variables (tave, pave, etc). +Three addtional kinds of keywords can also be specified (c_ID, f_ID, +v_name), where a compute or fix or +variable provides the value(s) to be output. Each of +these are described in turn. +

    +

    In LAMMPS, a compute comes in two flavors: ones that +compute one or more global values (e.g. temperature, kinetic energy +tensor) and ones that compute one or more per-atom values. Only the +former can be used for thermodynamic output. The user-defined ID of +the compute is used along with an optional subscript as part of the +thermo_style command. E.g. c_myTemp outputs the +single scalar value generated by the compute; c_myTemp[2] would +output the 2nd vector value. +

    +

    Fixes can also generate values to output with thermodynamic +output, e.g. the energy of an indenter's interaction with the +simulation atoms. These values are accessed via the same format as +compute's values, as f_ID or f_ID[N]. See the doc pages for +individual fix commands to see which ones generate global values that +can be output with thermodynamic info. +

    +

    Input script variables of various kinds are defined by the +variable command. All kinds except the atom-style +variable can be used for thermodynamic output. A variable with name +"abc" is referenced in a thermo_style command as v_abc. +

    +

    The variable formula defined in the input script can contain math +functions (add, exp, etc), atom values (x[N], fx[N]), groups +quantities (mass(), vcm(), etc), references to thermodynamic +quantities (e.g. temp, volume, etc), or references to other variables +or computes. Thus a variable is the most general way +to define some quantity you want calculated and output with +thermodynamic info. +

    +

    Dump file output is specified by the dump and +dump_modify commands. There are several +pre-defined formats (dump atom, dump xtc, etc). There is also a dump +custom format where you specify what values are output with +each atom. Pre-defined keywords can be specified (e.g. tag, type, x, +etc). Two additional kinds of keywords can also be specified (c_ID, +f_ID), where a compute or fix provides the +values to be output. +

    +

    Computes that generate per-atom values can be accessed +by the dump custom command. These are computes that have the word +"atom" in their style name, e.g. ke/atom, stress/atom, etc. The +values are accessed as described above: c_myKE or c_myStress[2]. +The compute variable/atom command takes a +user-defined atom-style variable as input and +calculates its value for each atom. Since this compute can be +accessed by the dump custom command, this is a general way to define +some quantity you want calculated and output in a dump file. +

    +

    Fixes can also generate values to output to dump files. +For example, the fix ave/atom command does +time-averaging of atom quantites, such as velocity or energy or stress +which can then be output in a dump file. These values are accessed as +describe above, as f_ID or f_ID[N]. +

    +

    Two other fixes are of particular note for output. Neither produces +values for thermodynamic or dump output, rather they output their +results directly to a file. +

    +

    The fix ave/time command enables time-averaging of +global quantities like temperature or pressure. The global quantities +are calculated by a compute. +

    +

    The fix ave/spatial command enables +spatial-averaging of per-atom quantities like per-atom energy or +stress. The per-atom quantities can be atom density (mass or number) +or be calculated by a by a compute. They can also be +quantities calculated by fix ave/atom, which means +you are effectively calculating a time average of a spatial average of +a time-averaged per-atom quantity. +

    +
    +

    (Cornell) Cornell, Cieplak, Bayly, Gould, Merz, Ferguson, diff --git a/doc/Section_howto.txt b/doc/Section_howto.txt index b75c566c2f..a3f5a9e9a8 100644 --- a/doc/Section_howto.txt +++ b/doc/Section_howto.txt @@ -24,7 +24,8 @@ certain kinds of LAMMPS simulations. 4.11 "Visualizing LAMMPS snapshots"_#4_11 4.12 "Non-orthogonal simulation boxes"_#4_12 4.13 "NEMD simulations"_#4_13 -4.14 "Aspherical particles"_#4_14 :all(b) +4.14 "Aspherical particles"_#4_14 +4.15 "Output from LAMMPS"_#4_15 :all(b) The example input scripts included in the LAMMPS distribution and highlighted in "this section"_Section_example.html also show how to @@ -786,6 +787,105 @@ lj/cut"_pair_lj.html. :line +4.15 Output from LAMMPS :link(4_15),h4 + +There are two basic kinds of LAMMPS output. The first is +thermodynamic output, which is a list of quantities printed every few +timesteps to the screen and logfile. The second is dump files, which +contain snapshots of atoms and various per-atom values and are written +at a specified frequency. A simulation prints one set of +thermodynamic output; it may generate zero, or one, or multiple dump +files. LAMMPS gives you a variety of ways to determine what +quantities are computed and printed when thermodynamic info or dump +files are output. There are also two fixes which perform time and +spatial averaging of user-defined quantities, fix ave/time and fix +ave/spatial. These produce their own output files and are described +below. + +The frequency and format of thermodynamic output is set by the +"thermo"_thermo.html, "thermo_style"_thermo_style.html, and +"thermo_modify"_thermo_modify.html commands. The +"thermo_style"_themo_style.html command also specifies what values are +calculated and written out. Pre-defined keywords can be specified +(e.g. press, etotal, etc) which include time-averaged versions of +temperature, pressure, and a few other variables (tave, pave, etc). +Three addtional kinds of keywords can also be specified (c_ID, f_ID, +v_name), where a "compute"_compute.html or "fix"_fix.html or +"variable"_variable.html provides the value(s) to be output. Each of +these are described in turn. + +In LAMMPS, a "compute"_compute.html comes in two flavors: ones that +compute one or more global values (e.g. temperature, kinetic energy +tensor) and ones that compute one or more per-atom values. Only the +former can be used for thermodynamic output. The user-defined ID of +the compute is used along with an optional subscript as part of the +"thermo_style"_thermo_style.html command. E.g. c_myTemp outputs the +single scalar value generated by the compute; c_myTemp\[2\] would +output the 2nd vector value. + +"Fixes"_fix.html can also generate values to output with thermodynamic +output, e.g. the energy of an indenter's interaction with the +simulation atoms. These values are accessed via the same format as +compute's values, as f_ID or f_ID\[N\]. See the doc pages for +individual fix commands to see which ones generate global values that +can be output with thermodynamic info. + +Input script variables of various kinds are defined by the +"variable"_variable.html command. All kinds except the atom-style +variable can be used for thermodynamic output. A variable with name +"abc" is referenced in a thermo_style command as v_abc. + +The variable formula defined in the input script can contain math +functions (add, exp, etc), atom values (x\[N\], fx\[N\]), groups +quantities (mass(), vcm(), etc), references to thermodynamic +quantities (e.g. temp, volume, etc), or references to other variables +or "computes"_compute.html. Thus a variable is the most general way +to define some quantity you want calculated and output with +thermodynamic info. + +Dump file output is specified by the "dump"_dump.html and +"dump_modify"_dump_modify.html commands. There are several +pre-defined formats (dump atom, dump xtc, etc). There is also a "dump +custom"_dump.html format where you specify what values are output with +each atom. Pre-defined keywords can be specified (e.g. tag, type, x, +etc). Two additional kinds of keywords can also be specified (c_ID, +f_ID), where a "compute"_compute.html or "fix"_fix.html provides the +values to be output. + +"Computes"_compute.html that generate per-atom values can be accessed +by the dump custom command. These are computes that have the word +"atom" in their style name, e.g. ke/atom, stress/atom, etc. The +values are accessed as described above: c_myKE or c_myStress\[2\]. +The "compute variable/atom"_compute_variable_atom.html command takes a +user-defined atom-style "variable"_variable.html as input and +calculates its value for each atom. Since this compute can be +accessed by the dump custom command, this is a general way to define +some quantity you want calculated and output in a dump file. + +"Fixes"_fix.html can also generate values to output to dump files. +For example, the "fix ave/atom"_fix_ave_atom.html command does +time-averaging of atom quantites, such as velocity or energy or stress +which can then be output in a dump file. These values are accessed as +describe above, as f_ID or f_ID\[N\]. + +Two other fixes are of particular note for output. Neither produces +values for thermodynamic or dump output, rather they output their +results directly to a file. + +The "fix ave/time"_fix_ave_time.html command enables time-averaging of +global quantities like temperature or pressure. The global quantities +are calculated by a "compute"_compute.html. + +The "fix ave/spatial"_fix_ave_spatial.html command enables +spatial-averaging of per-atom quantities like per-atom energy or +stress. The per-atom quantities can be atom density (mass or number) +or be calculated by a by a "compute"_compute.html. They can also be +quantities calculated by "fix ave/atom"_fix_ave_atom.html, which means +you are effectively calculating a time average of a spatial average of +a time-averaged per-atom quantity. + +:line + :link(Cornell) [(Cornell)] Cornell, Cieplak, Bayly, Gould, Merz, Ferguson, Spellmeyer, Fox, Caldwell, Kollman, JACS 117, 5179-5197 (1995). diff --git a/doc/Section_intro.html b/doc/Section_intro.html index 59d0266645..a7dbc17f3e 100644 --- a/doc/Section_intro.html +++ b/doc/Section_intro.html @@ -434,11 +434,9 @@ Computing, Minneapolis, MN (March 1997).

    If you use LAMMPS results in your published work, please cite the J Comp Phys reference and include a pointer to the LAMMPS WWW Site -(http://lammps.sandia.gov). A paper describing the latest version of -LAMMPS is in the works; when it appears in print, you can check the -LAMMPS WWW Site for a more current citation. +(http://lammps.sandia.gov).

    -

    If you send me information about your publication, I'll be pleased to +

    If you send is information about your publication, we'll be pleased to add it to the Publications page of the LAMMPS WWW Site. Ditto for a picture or movie for the Pictures or Movies pages.

    @@ -451,7 +449,7 @@ features in LAMMPS:

    -
    colloid big colloid particles in a small particle solvent, 2d system
    crack crack propagation in a 2d solid
    dipole point dipolar particles, 2d system
    +
    diff --git a/doc/Section_intro.txt b/doc/Section_intro.txt index e984870d10..983036a817 100644 --- a/doc/Section_intro.txt +++ b/doc/Section_intro.txt @@ -420,11 +420,9 @@ Computing, Minneapolis, MN (March 1997). If you use LAMMPS results in your published work, please cite the J Comp Phys reference and include a pointer to the "LAMMPS WWW Site"_lws -(http://lammps.sandia.gov). A paper describing the latest version of -LAMMPS is in the works; when it appears in print, you can check the -"LAMMPS WWW Site"_lws for a more current citation. +(http://lammps.sandia.gov). -If you send me information about your publication, I'll be pleased to +If you send is information about your publication, we'll be pleased to add it to the Publications page of the "LAMMPS WWW Site"_lws. Ditto for a picture or movie for the Pictures or Movies pages. diff --git a/doc/Section_modify.html b/doc/Section_modify.html index b4a91db31f..55b1fe14fd 100644 --- a/doc/Section_modify.html +++ b/doc/Section_modify.html @@ -147,7 +147,7 @@ atoms.

    Here is a brief description of methods you define in your new derived class. See atom.h for details.

    -
    Ewald and PPPM solvers Roy Pollock (LLNL)
    rRESPA Mark Stevens & Paul Crozier (Sandia)
    NVT/NPT integrators Mark Stevens (Sandia)
    +
    @@ -187,7 +187,7 @@ commands. bond class. See bond.h, angle.h, dihedral.h, and improper.h for details.

    -
    grow re-allocate atom arrays to longer lengths
    copy copy info for one atom to another atom's array locations
    pack_comm store an atom's info in a buffer communicated every timestep
    +
    @@ -212,7 +212,7 @@ per-atom kinetic energy.

    Here is a brief description of methods you define in your new derived class. See compute.h for details.

    -
    compute compute the molecular interactions
    coeff set coefficients for one bond type
    equilibrium_distance length of bond, used by SHAKE
    +
    @@ -239,7 +239,7 @@ DumpCustom class contained in the dump_custom.cpp file.

    Here is a brief description of methods you define in your new derived class. See dump.h for details.

    -
    compute_scalar compute a scalar quantity
    compute_vector compute a vector of quantities
    compute_peratom compute one or more quantities per atom
    +
    @@ -277,7 +277,7 @@ implement.

    Here is a brief description of methods you can define in your new derived class. See fix.h for details.

    -
    write_header write the header section of a snapshot of atoms
    count count the number of lines a processor will output
    pack pack a proc's output data into a buffer
    +
    @@ -348,7 +348,7 @@ operations it wishes on LAMMPS data structures.

    The single method your new class must define is as follows:

    -
    setmask determines when the fix is called during the timestep
    init initialization before a run
    setup called immediately before the 1st timestep
    +
    command operations performed by the new command
    @@ -368,7 +368,7 @@ styles can be created to add new K-space options to LAMMPS.

    Here is a brief description of methods you define in your new derived class. See kspace.h for details.

    -
    +
    @@ -388,7 +388,7 @@ LAMMPS.

    Here is a brief description of methods you define in your new derived class. See min.h for details.

    -
    init initialize the calculation before a run
    setup computation before the 1st timestep of a run
    compute every-timestep computation
    +
    init initialize the minimization before a run
    run perform the minimization
    memory_usage tally of memory usage @@ -409,7 +409,7 @@ includes some optional methods to enable its use with rRESPA.

    Here is a brief description of the class methods in pair.h:

    -
    +
    @@ -437,7 +437,7 @@ styles can be created to add new region shapes to LAMMPS.

    Here is a brief description of methods you define in your new derived class. See region.h for details.

    -
    compute workhorse routine that computes pairwise interactions
    settings reads the input script line with arguments you define
    coeff set coefficients for one i,j type pair
    +
    match determine whether a point is in the region
    diff --git a/doc/Section_perf.html b/doc/Section_perf.html index 4d135bc555..bf95445aa0 100644 --- a/doc/Section_perf.html +++ b/doc/Section_perf.html @@ -56,7 +56,7 @@ For example, on a 1.7 GHz Pentium desktop machine (Intel icc compiler under Red Hat Linux), the CPU run-time in seconds/atom/timestep for the 5 problems is

    -
    +
    Problem: LJ Chain EAM Chute Rhodopsin
    CPU/atom/step: 4.55E-6 2.18E-6 9.38E-6 2.18E-6 1.11E-4
    Ratio to LJ: 1.0 0.48 2.06 0.48 24.5 diff --git a/doc/Section_start.html b/doc/Section_start.html index 07befc7297..19c62b0a4b 100644 --- a/doc/Section_start.html +++ b/doc/Section_start.html @@ -37,7 +37,7 @@ tar xvf lammps*.tar

    This will create a LAMMPS directory containing two files and several sub-directories:

    -
    +
    @@ -273,7 +273,7 @@ fields for molecular systems or granular systems are in packages. You can see the list of packages by typing "make package". The current list of packages is as follows:

    -
    README text file
    LICENSE the GNU General Public License (GPL)
    bench benchmark problems
    +
    diff --git a/doc/compute.html b/doc/compute.html index 83646130ef..54744bf3d0 100644 --- a/doc/compute.html +++ b/doc/compute.html @@ -30,18 +30,27 @@ compute 3 all ke/atom

    Create a computation that will be performed on a group of atoms.

    -

    In LAMMPS, a "compute" is used in several ways. Computes that -calculate one or more values for the entire group of atoms can output -those values via the thermo_style custom or fix -ave/time command. Or the values can be referenced -in a variable equal command. Computes that calculate -a temperature or pressure are used by fixes that do thermostatting or -barostatting and when atom velocities are created. Computes that -calculate one or more values for each atom in the group can output -those values via the dump custom command or the fix -ave/spatial command. +

    In LAMMPS, a "compute" is used in several ways. There are two kinds +of computes, "global" computes that calculate one or more values for +the entire group of atoms, and "per-atom" computes that calculate one +or more values for each atom in the group. The latter has the word +"atom" in its style name.

    -

    LAMMPS creates its own computes for thermodynamic output. Two +

    The results of global computes can be output via the thermo_style +custom or fix ave/time command. +Or the values can be referenced in a variable equal +command. The results of computes that calculate a global temperature +or pressure can be used by fixes that do thermostatting or +barostatting and when atom velocities are created. +

    +

    The results of per-atom computes can be output via the dump +custom command or the fix +ave/spatial command. Or the per-atom values can +be time-averaged via the fix ave/atom command and +then output via the dump custom or fix +ave/spatial commands. +

    +

    LAMMPS creates its own global computes for thermodynamic output. Two computes are always created, named "thermo_temp" and "thermo_pressure", as if these commands had been invoked:

    @@ -57,9 +66,9 @@ documentation for the dump custom and specific fix commands.

    In all these cases, the default computes can be replaced by computes -defined in the input script, as described by the -thermo_modify and fix modify -commands. +defined by the user in the input script, as described by the +thermo_modify, fix modify, and +dump commands.

    Properties of either a default of user-defined compute can be modified via the compute_modify command. @@ -74,16 +83,17 @@ calculations accessed in the various ways described above. and what it does. Here is an alphabetic list of compute styles defined in LAMMPS:

    -
    • centro/atom - centro-symmetry parameter for each atom +
      • attribute/atom - attribute (x,v,f,etc) of each atom +
      • centro/atom - centro-symmetry parameter for each atom
      • coord/atom - coordination number for each atom
      • ebond/atom - bond energy for each atom
      • epair/atom - pairwise energy for each atom -
      • etotal/atom - total energy (ke + epair) for each atom
      • ke/atom - kinetic energy for each atom
      • pressure - total pressure and pressure tensor
      • rotate/dipole - rotational energy of dipolar atoms
      • rotate/gran - rotational energy of granular atoms
      • stress/atom - stress tensor for each atom +
      • sum/atom - sum 2 or more quantities for each atom
      • temp - temperature of group of atoms
      • temp/asphere - temperature of aspherical particles
      • temp/deform - temperature excluding box deformation velocity diff --git a/doc/compute.txt b/doc/compute.txt index 9918d95148..477f407ea2 100644 --- a/doc/compute.txt +++ b/doc/compute.txt @@ -27,18 +27,27 @@ compute 3 all ke/atom :pre Create a computation that will be performed on a group of atoms. -In LAMMPS, a "compute" is used in several ways. Computes that -calculate one or more values for the entire group of atoms can output -those values via the "thermo_style custom"_thermo_style.html or "fix -ave/time"_fix_ave_time.html command. Or the values can be referenced -in a "variable equal"_variable.html command. Computes that calculate -a temperature or pressure are used by fixes that do thermostatting or -barostatting and when atom velocities are created. Computes that -calculate one or more values for each atom in the group can output -those values via the "dump custom"_dump.html command or the "fix -ave/spatial"_fix_ave_spatial.html command. +In LAMMPS, a "compute" is used in several ways. There are two kinds +of computes, "global" computes that calculate one or more values for +the entire group of atoms, and "per-atom" computes that calculate one +or more values for each atom in the group. The latter has the word +"atom" in its style name. -LAMMPS creates its own computes for thermodynamic output. Two +The results of global computes can be output via the "thermo_style +custom"_thermo_style.html or "fix ave/time"_fix_ave_time.html command. +Or the values can be referenced in a "variable equal"_variable.html +command. The results of computes that calculate a global temperature +or pressure can be used by fixes that do thermostatting or +barostatting and when atom velocities are created. + +The results of per-atom computes can be output via the "dump +custom"_dump.html command or the "fix +ave/spatial"_fix_ave_spatial.html command. Or the per-atom values can +be time-averaged via the "fix ave/atom"_fix_ave_atom.html command and +then output via the "dump custom"_dump.html or "fix +ave/spatial"_fix_ave_spatial.html commands. + +LAMMPS creates its own global computes for thermodynamic output. Two computes are always created, named "thermo_temp" and "thermo_pressure", as if these commands had been invoked: @@ -54,9 +63,9 @@ documentation for the "dump custom"_dump.html and specific "fix"_fix.html commands. In all these cases, the default computes can be replaced by computes -defined in the input script, as described by the -"thermo_modify"_thermo_modify.html and "fix modify"_fix_modify.html -commands. +defined by the user in the input script, as described by the +"thermo_modify"_thermo_modify.html, "fix modify"_fix_modify.html, and +"dump"_dump.html commands. Properties of either a default of user-defined compute can be modified via the "compute_modify"_compute_modify.html command. @@ -71,16 +80,17 @@ Each compute style has its own doc page which describes its arguments and what it does. Here is an alphabetic list of compute styles defined in LAMMPS: +"attribute/atom"_compute_attribute_atom.html - attribute (x,v,f,etc) of each atom "centro/atom"_compute_centro_atom.html - centro-symmetry parameter for each atom "coord/atom"_compute_coord_atom.html - coordination number for each atom "ebond/atom"_compute_ebond_atom.html - bond energy for each atom "epair/atom"_compute_epair_atom.html - pairwise energy for each atom -"etotal/atom"_compute_etotal_atom.html - total energy (ke + epair) for each atom "ke/atom"_compute_ke_atom.html - kinetic energy for each atom "pressure"_compute_pressure.html - total pressure and pressure tensor "rotate/dipole"_compute_rotate_dipole.html - rotational energy of dipolar atoms "rotate/gran"_compute_rotate_gran.html - rotational energy of granular atoms "stress/atom"_compute_stress_atom.html - stress tensor for each atom +"sum/atom"_compute_sum_atom.html - sum 2 or more quantities for each atom "temp"_compute_temp.html - temperature of group of atoms "temp/asphere"_compute_temp_asphere.html - temperature of aspherical particles "temp/deform"_compute_temp_deform.html - temperature excluding box deformation velocity diff --git a/doc/compute_centro_atom.html b/doc/compute_centro_atom.html index 49b3b449f4..9a68348a53 100644 --- a/doc/compute_centro_atom.html +++ b/doc/compute_centro_atom.html @@ -25,8 +25,7 @@

        Description:

        Define a computation that calculates the centro-symmetry parameter for -each atom in a group. This can be output via the dump -custom command. In solid state systems the centro-symmetry +each atom in a group. In solid-state systems the centro-symmetry parameter is a useful measure of the local lattice disorder around an atom and can be used to characterize whether the atom is part of a perfect lattice, a local defect (e.g. a dislocation or stacking diff --git a/doc/compute_centro_atom.txt b/doc/compute_centro_atom.txt index d60c1541f7..4633d129c1 100644 --- a/doc/compute_centro_atom.txt +++ b/doc/compute_centro_atom.txt @@ -22,8 +22,7 @@ compute 1 all centro/atom :pre [Description:] Define a computation that calculates the centro-symmetry parameter for -each atom in a group. This can be output via the "dump -custom"_dump.html command. In solid state systems the centro-symmetry +each atom in a group. In solid-state systems the centro-symmetry parameter is a useful measure of the local lattice disorder around an atom and can be used to characterize whether the atom is part of a perfect lattice, a local defect (e.g. a dislocation or stacking diff --git a/doc/compute_coord_atom.html b/doc/compute_coord_atom.html index d165447f53..0c164fd93e 100644 --- a/doc/compute_coord_atom.html +++ b/doc/compute_coord_atom.html @@ -26,8 +26,7 @@

        Description:

        Define a computation that calculates the coordination number for each -atom in a group. This can be output via the dump custom -command. +atom in a group.

        The coordination number is defined as the number of neighbor atoms within the specified cutoff distance from the central atom. Atoms not diff --git a/doc/compute_coord_atom.txt b/doc/compute_coord_atom.txt index 54e1a8d640..67be7dde21 100644 --- a/doc/compute_coord_atom.txt +++ b/doc/compute_coord_atom.txt @@ -23,8 +23,7 @@ compute 1 all coord/atom 2.0 :pre [Description:] Define a computation that calculates the coordination number for each -atom in a group. This can be output via the "dump custom"_dump.html -command. +atom in a group. The coordination number is defined as the number of neighbor atoms within the specified cutoff distance from the central atom. Atoms not diff --git a/doc/compute_ebond_atom.html b/doc/compute_ebond_atom.html index db8d212bbd..d39417d97c 100644 --- a/doc/compute_ebond_atom.html +++ b/doc/compute_ebond_atom.html @@ -25,8 +25,7 @@

        Description:

        Define a computation that computes the per-atom bond energy for each -atom in a group. This can be output via the dump custom -command. +atom in a group.

        The bond energy for each atom is computed by looping over the atoms it is bonded to and computing the bond energy associated with the defined diff --git a/doc/compute_ebond_atom.txt b/doc/compute_ebond_atom.txt index 3deec2109f..5f7710dfd1 100644 --- a/doc/compute_ebond_atom.txt +++ b/doc/compute_ebond_atom.txt @@ -22,8 +22,7 @@ compute 1 all ebond/atom :pre [Description:] Define a computation that computes the per-atom bond energy for each -atom in a group. This can be output via the "dump custom"_dump.html -command. +atom in a group. The bond energy for each atom is computed by looping over the atoms it is bonded to and computing the bond energy associated with the defined diff --git a/doc/compute_epair_atom.html b/doc/compute_epair_atom.html index 39a09adb13..eabdf3131e 100644 --- a/doc/compute_epair_atom.html +++ b/doc/compute_epair_atom.html @@ -25,8 +25,7 @@

        Description:

        Define a computation that computes the per-atom pairwise energy for -each atom in a group. This can be output via the dump -custom command. +each atom in a group.

        The pairwise energy for each atom is computed by looping over its neighbors and computing the energy associated with the defined diff --git a/doc/compute_epair_atom.txt b/doc/compute_epair_atom.txt index 31c6114bd6..14dea3b9bc 100644 --- a/doc/compute_epair_atom.txt +++ b/doc/compute_epair_atom.txt @@ -22,8 +22,7 @@ compute 1 all epair/atom :pre [Description:] Define a computation that computes the per-atom pairwise energy for -each atom in a group. This can be output via the "dump -custom"_dump.html command. +each atom in a group. The pairwise energy for each atom is computed by looping over its neighbors and computing the energy associated with the defined diff --git a/doc/compute_etotal_atom.html b/doc/compute_etotal_atom.html deleted file mode 100644 index b21b357249..0000000000 --- a/doc/compute_etotal_atom.html +++ /dev/null @@ -1,60 +0,0 @@ - -

        LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands -
        - - - - - - -
        - -

        compute etotal/atom command -

        -

        Syntax: -

        -
        compute ID group-ID etotal/atom compute-ID 
        -
        -
        • ID, group-ID are documented in compute command -
        • etotal/atom = style name of this compute command -
        • compute-ID = ID of compute that calculates per-atom pairwise energy -
        -

        Examples: -

        -
        compute 1 all etotal/atom atomEng 
        -
        -

        Description: -

        -

        Define a computation that computes the total energy (kinetic + -pairwise) for each atom in a group. This can be output via the dump -custom command. -

        -

        IMPORTANT NOTE: The per-atom total energy does NOT include -contributions due to bonds, angles, dihedrals, impropers that the atom -is part of, or a long-range Coulombic contribution. The bond -contribution can be computed separately via the compute -ebond/atom command. Currently, there is no -way in LAMMPS to calculate per-atom energy from angles, dihedrals, -improper, or long-range interactions. -

        -

        The kinetic energy for each atom is computed the same way as in the -compute ke/atom command, namely as 1/2 m v^2. -

        -

        The pairwise energy for each atom is computed the same way as in the -compute epair/atom command. In fact, the -last argument to this command is the ID of the epair/atom compute that -performs this calculation. -

        -

        Restrictions: -

        -

        Some pair potentials do not allow the calculation of per-atom energy -and via the auxiliary compute epair/atom -compute that is an argument to this command. -

        -

        Related commands: -

        -

        compute epair/atom -

        -

        Default: none -

        - diff --git a/doc/compute_etotal_atom.txt b/doc/compute_etotal_atom.txt deleted file mode 100644 index 8e96df39cb..0000000000 --- a/doc/compute_etotal_atom.txt +++ /dev/null @@ -1,55 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Section_commands.html#comm) - -:line - -compute etotal/atom command :h3 - -[Syntax:] - -compute ID group-ID etotal/atom compute-ID :pre - -ID, group-ID are documented in "compute"_compute.html command -etotal/atom = style name of this compute command -compute-ID = ID of compute that calculates per-atom pairwise energy :ul - -[Examples:] - -compute 1 all etotal/atom atomEng :pre - -[Description:] - -Define a computation that computes the total energy (kinetic + -pairwise) for each atom in a group. This can be output via the "dump -custom"_dump.html command. - -IMPORTANT NOTE: The per-atom total energy does NOT include -contributions due to bonds, angles, dihedrals, impropers that the atom -is part of, or a long-range Coulombic contribution. The bond -contribution can be computed separately via the "compute -ebond/atom"_compute_ebond_atom.html command. Currently, there is no -way in LAMMPS to calculate per-atom energy from angles, dihedrals, -improper, or long-range interactions. - -The kinetic energy for each atom is computed the same way as in the -"compute ke/atom"_compute_ke_atom.html command, namely as 1/2 m v^2. - -The pairwise energy for each atom is computed the same way as in the -"compute epair/atom"_compute_epair_atom.html command. In fact, the -last argument to this command is the ID of the epair/atom compute that -performs this calculation. - -[Restrictions:] - -Some pair potentials do not allow the calculation of per-atom energy -and via the auxiliary "compute epair/atom"_compute_epair_atom.html -compute that is an argument to this command. - -[Related commands:] - -"compute epair/atom"_compute_epair_atom.html - -[Default:] none diff --git a/doc/compute_ke_atom.html b/doc/compute_ke_atom.html index 79cca562d5..5bc705bd71 100644 --- a/doc/compute_ke_atom.html +++ b/doc/compute_ke_atom.html @@ -25,8 +25,7 @@

        Description:

        Define a computation that calculates the per-atom kinetic energy for -each atom in a group. This can be output via the dump -custom command. +each atom in a group.

        The kinetic energy is simply 1/2 m v^2, where m is the mass and v is the velocity of each atom. diff --git a/doc/compute_ke_atom.txt b/doc/compute_ke_atom.txt index 04dc1fc493..9f24adaa34 100644 --- a/doc/compute_ke_atom.txt +++ b/doc/compute_ke_atom.txt @@ -22,8 +22,7 @@ compute 1 all ke/atom :pre [Description:] Define a computation that calculates the per-atom kinetic energy for -each atom in a group. This can be output via the "dump -custom"_dump.html command. +each atom in a group. The kinetic energy is simply 1/2 m v^2, where m is the mass and v is the velocity of each atom. diff --git a/doc/compute_stress_atom.html b/doc/compute_stress_atom.html index 1e95ecd697..eedac23195 100644 --- a/doc/compute_stress_atom.html +++ b/doc/compute_stress_atom.html @@ -41,8 +41,11 @@

        Description:

        Define a computation that computes the per-atom stress tensor for each -atom in a group. The 6 components can be output via the dump -custom command. +atom in a group. The tensor for each atom has 6 components: xx, yy, +zz, xy, xz, yz. The resulting values can be accessed by indices 1-6 +by any command that uses per-atom computes, e.g. the dump +custom command or fix ave/spatial +command or fix ave/atom command.

        The stress tensor for each atom is the sum of 3 terms in the following formula. Any of the terms can be excluded by setting the ke, diff --git a/doc/compute_stress_atom.txt b/doc/compute_stress_atom.txt index e01a3842b7..64fcaa1b62 100644 --- a/doc/compute_stress_atom.txt +++ b/doc/compute_stress_atom.txt @@ -32,8 +32,11 @@ compute 1 all stress/atom ke no :pre [Description:] Define a computation that computes the per-atom stress tensor for each -atom in a group. The 6 components can be output via the "dump -custom"_dump.html command. +atom in a group. The tensor for each atom has 6 components: xx, yy, +zz, xy, xz, yz. The resulting values can be accessed by indices 1-6 +by any command that uses per-atom computes, e.g. the "dump +custom"_dump.html command or "fix ave/spatial"_fix_ave_spatial.html +command or "fix ave/atom"_fix_ave_atom.html command. The stress tensor for each atom is the sum of 3 terms in the following formula. Any of the terms can be excluded by setting the {ke}, diff --git a/doc/compute_variable_atom.html b/doc/compute_variable_atom.html index 87fdecddad..ed896eb404 100644 --- a/doc/compute_variable_atom.html +++ b/doc/compute_variable_atom.html @@ -26,9 +26,10 @@

        Description:

        Define a computation that calculates a formula for each atom in the -group. The per-atom quantities can be output via the dump -custom command or spatially averaged via the fix -ave/spatial command. +group. The resulting values can be accessed by any command that uses +per-atom computes, e.g. the dump custom command or fix +ave/spatial command or fix +ave/atom command.

        The formula is defined by the variable atom command. A variable of style atom can access properties of the system, such diff --git a/doc/compute_variable_atom.txt b/doc/compute_variable_atom.txt index abf8194a2c..8c5e6a3a7b 100644 --- a/doc/compute_variable_atom.txt +++ b/doc/compute_variable_atom.txt @@ -23,9 +23,10 @@ compute 1 flow variable/atom myVar :pre [Description:] Define a computation that calculates a formula for each atom in the -group. The per-atom quantities can be output via the "dump -custom"_dump.html command or spatially averaged via the "fix -ave/spatial"_fix_ave_spatial.html command. +group. The resulting values can be accessed by any command that uses +per-atom computes, e.g. the "dump custom"_dump.html command or "fix +ave/spatial"_fix_ave_spatial.html command or "fix +ave/atom"_fix_ave_atom.html command. The formula is defined by the "variable atom"_variable.html command. A variable of style {atom} can access properties of the system, such diff --git a/doc/dump.html b/doc/dump.html index c9978835b2..1b073135f1 100644 --- a/doc/dump.html +++ b/doc/dump.html @@ -39,9 +39,7 @@ vx, vy, vz, fx, fy, fz, q, mux, muy, muz, quatw, quati, quatj, quatk, tqx, tqy, tqz, - epair, ebond, ke, etotal, centro, - sxx, syy, szz, sxy, sxz, syz, - c_ID, c_ID[N] + c_ID, c_ID[N], f_ID, f_ID[N] tag = atom ID mol = molecule ID type = atom type @@ -55,14 +53,10 @@ mux,muy,muz = orientation of dipolar atom quatw,quati,quatj,quatk = quaternion components for aspherical particles tqx,tqy,tqz = torque on aspherical particles - epair = per-atom pairwise energy - ebond = per-atom bond energy - ke = per-atom kinetic energy - etotal = per-atom total energy (ke + epair, not ebond) - centro = per-atom centro-symmetry parameter - sxx, syy, szz, sxy, sxz, syz = per-atom stress tensor components c_ID = scalar per-atom quantity calculated by a compute identified by its ID - c_ID[N] = Nth per-atom vector quantity calculated by a compute identified by its ID + c_ID[N] = Nth per-atom vector quantity calculated by a compute identified by its ID + f_ID = scalar per-atom quantity calculated by a fix identified by its ID + f_ID[N] = Nth per-atom vector quantity calculated by a fix identified by its ID

      @@ -71,7 +65,7 @@
      dump myDump all atom 100 dump.atom
       dump 2 subgroup atom 50 dump.run.bin
       dump 4a all custom 100 dump.myforce.* tag type x y vx fx
      -dump 4b flow custom 100 dump.%.myforce tag type epair sxx syy szz c_myF[3]
      +dump 4b flow custom 100 dump.%.myforce tag type c_myF[3]
       dump 1 all xtc 1000 file.xtc 100.0 
       

      Description: @@ -136,8 +130,8 @@ to specify a quantity that is not defined for a particular simulation - such as q for atom style bond, since that atom style doesn't assign charges. Dumps occur at the very end of a timestep, so atom attributes will include effects due to fixes that are applied during -the timestep. An explanation of some of the dump custom quantities is -given below. +the timestep. An explanation of the dump custom quantities is given +below.

      The dcd style writes DCD files, a standard atomic trajectory format used by the CHARMM, NAMD, and XPlor molecular dynamics packages. DCD @@ -218,16 +212,16 @@ part of the custom style. fz, q keywords are self-explanatory. Tag is the atom ID. Mol is the molecule ID, included in the data file for molecular systems. The x, y, z keywords write atom coordinates "unscaled", in the -appropriate distance units (Angstroms, sigma, etc). Use xs, ys, -zs if you want the coordinates "scaled" to the box size, so that -each value is 0.0 to 1.0. Use xu, yu, zu if you want the -coordinates "unwrapped" by the image flags for each atom. Unwrapped -means that if the atom has passed thru a periodic boundary one or more -times, the value is printed for what the coordinate would be if it had -not been wrapped back into the periodic box. Note that using xu, -yu, zu means that the coordinate values may be far outside the box -size printed with the snapshot. The image flags can be printed -directly using the ix, iy, iz keywords. The +appropriate distance units (Angstroms, sigma, etc). Use +xs, ys, zs if you want the coordinates "scaled" to the box size, +so that each value is 0.0 to 1.0. Use xu, yu, zu if you want +the coordinates "unwrapped" by the image flags for each atom. +Unwrapped means that if the atom has passed thru a periodic boundary +one or more times, the value is printed for what the coordinate would +be if it had not been wrapped back into the periodic box. Note that +using xu, yu, zu means that the coordinate values may be far +outside the box size printed with the snapshot. The image flags can +be printed directly using the ix, iy, iz keywords. The dump_modify command describes in more detail what is meant by scaled vs unscaled coordinates and the image flags.

      @@ -241,57 +235,45 @@ are specific to aspherical particles defined with an atom style of define the orientiation of the particle. The final 3 give the rotational torque on the particle.

      -

      The epair, ebond, ke, etotal, centro, and sxx, etc -keywords print the pairwise energy, bond energy, kinetic energy, total -energy (pairwise + kinetic), centro-symmetry parameter, and components -of the per-atom stress tensor for each atom. These quantities are -calculated by computes that the dump defines, as if these commands had -been issued: -

      -
      compute dump-ID_epair/atom group-ID epair/atom
      -compute dump-ID_ebond/atom group-ID ebond/atom
      -compute dump-ID_ke/atom group-ID ke/atom
      -compute dump-ID_etotal/atom group-ID etotal/atom dump-ID_epair/atom
      -compute dump-ID_centro/atom group-ID centro/atom
      -compute dump-ID_stress/atom group-ID stress/atom 
      -
      -

      See the corresponding compute style commands for -details on what is computed for each atom. Note that the ID of each -new compute is the dump-ID with the compute style appended (with an -underscore). The group for each new compute is the same as the dump -group. Note that for etotal, an auxiliary compute for calculating -the pairwise energy is created, since the compute -etotal/atom command requires it as an extra -argument. -

      -

      IMPORTANT NOTE: The etotal keyword does NOT include contributions -due to bonds, angles, etc that the atom is part of. The bond -contribution can be computed separately via the ebond keyword. -Currently, there is no way in LAMMPS to dump per-atom energy for -angles, dihedrals, improper, or long-range interactions. -

      -

      The sxx, syy, szz, sxy, sxz, syz keywords access the 6 -components of the stress tensor calculated for each atom by the -compute stress/atom style. -

      The c_ID and c_ID[N] keywords allow scalar or vector per-atom quantities calculated by a compute to be output. The ID in the keyword should be replaced by the actual ID of the compute that has -been defined elsewhere in the input script. See the -compute command for details. Note that scalar and -vector quantities that are not calculated on a per-atom basis -(e.g. global temperature or pressure) cannot be output in a dump. -Rather, these quantities are output by the thermo_style -custom command. +been defined previously in the input script. See the +compute command for details. There are pre-defined +computes for calculating the energy, stress, centro-symmetry +parameter, and coordination number of individual atoms. The "compute +variable/atom" command will evaluate a per-atom formula you define via +the variable atom command, for each atom, which can +then be dumped. +

      +

      Note that scalar and vector quantities that are not calculated on a +per-atom basis by a compute (e.g. global temperature or pressure) +cannot be output in a dump. Rather, these quantities can be output by +the thermo_style custom command.

      If c_ID is used as a keyword, then the scalar per-atom quantity calculated by the compute is printed. If c_ID[N] is used, then N in the range from 1-M will print the Nth component of the M-length per-atom vector calculated by the compute.

      -

      See this section for information on how to add -new compute styles to LAMMPS that calculate per-atom quantities which -could then be output with these keywords. +

      The f_ID and f_ID[N] keywords allow scalar or vector per-atom +quantities calculated by a fix to be output. The ID in the keyword +should be replaced by the actual ID of the fix that has been defined +previously in the input script. Currently the fix +ave/atom command is the only fix that calculates +per-atom quantities. Since it takes a per-atom compute +as an argument it effectively time-averages any of the previously +described compute quantities so the time-averaged result can be +written to a dump file. +

      +

      If f_ID is used as a keyword, then the scalar per-atom quantity +calculated by the fix is printed. If f_ID[N] is used, then N +in the range from 1-M will print the Nth component of the M-length +per-atom vector calculated by the fix. +

      +

      See this section of the manual for information +on how to add new compute and fix styles to LAMMPS that calculate +per-atom quantities which could then be output with these keywords.


      diff --git a/doc/dump.txt b/doc/dump.txt index 57f2122f1e..473490023b 100644 --- a/doc/dump.txt +++ b/doc/dump.txt @@ -30,9 +30,7 @@ args = list of arguments for a particular style :l vx, vy, vz, fx, fy, fz, q, mux, muy, muz, quatw, quati, quatj, quatk, tqx, tqy, tqz, - epair, ebond, ke, etotal, centro, - sxx, syy, szz, sxy, sxz, syz, - c_ID, c_ID\[N\] + c_ID, c_ID\[N\], f_ID, f_ID\[N\] tag = atom ID mol = molecule ID type = atom type @@ -46,14 +44,10 @@ args = list of arguments for a particular style :l mux,muy,muz = orientation of dipolar atom quatw,quati,quatj,quatk = quaternion components for aspherical particles tqx,tqy,tqz = torque on aspherical particles - epair = per-atom pairwise energy - ebond = per-atom bond energy - ke = per-atom kinetic energy - etotal = per-atom total energy (ke + epair, not ebond) - centro = per-atom centro-symmetry parameter - sxx, syy, szz, sxy, sxz, syz = per-atom stress tensor components c_ID = scalar per-atom quantity calculated by a compute identified by its ID - c_ID\[N\] = Nth per-atom vector quantity calculated by a compute identified by its ID :pre + c_ID\[N\] = Nth per-atom vector quantity calculated by a compute identified by its ID + f_ID = scalar per-atom quantity calculated by a fix identified by its ID + f_ID\[N\] = Nth per-atom vector quantity calculated by a fix identified by its ID :pre :ule [Examples:] @@ -61,7 +55,7 @@ args = list of arguments for a particular style :l dump myDump all atom 100 dump.atom dump 2 subgroup atom 50 dump.run.bin dump 4a all custom 100 dump.myforce.* tag type x y vx fx -dump 4b flow custom 100 dump.%.myforce tag type epair sxx syy szz c_myF\[3\] +dump 4b flow custom 100 dump.%.myforce tag type c_myF\[3\] dump 1 all xtc 1000 file.xtc 100.0 :pre [Description:] @@ -126,8 +120,8 @@ to specify a quantity that is not defined for a particular simulation - such as {q} for atom style {bond}, since that atom style doesn't assign charges. Dumps occur at the very end of a timestep, so atom attributes will include effects due to fixes that are applied during -the timestep. An explanation of some of the dump custom quantities is -given below. +the timestep. An explanation of the dump custom quantities is given +below. The {dcd} style writes DCD files, a standard atomic trajectory format used by the CHARMM, NAMD, and XPlor molecular dynamics packages. DCD @@ -208,16 +202,16 @@ The {tag}, {mol}, {type}, {x}, {y}, {z}, {vx}, {vy}, {vz}, {fx}, {fy}, {fz}, {q} keywords are self-explanatory. {Tag} is the atom ID. {Mol} is the molecule ID, included in the data file for molecular systems. The {x}, {y}, {z} keywords write atom coordinates "unscaled", in the -appropriate distance units (Angstroms, sigma, etc). Use {xs}, {ys}, -{zs} if you want the coordinates "scaled" to the box size, so that -each value is 0.0 to 1.0. Use {xu}, {yu}, {zu} if you want the -coordinates "unwrapped" by the image flags for each atom. Unwrapped -means that if the atom has passed thru a periodic boundary one or more -times, the value is printed for what the coordinate would be if it had -not been wrapped back into the periodic box. Note that using {xu}, -{yu}, {zu} means that the coordinate values may be far outside the box -size printed with the snapshot. The image flags can be printed -directly using the {ix}, {iy}, {iz} keywords. The +appropriate distance "units"_units.html (Angstroms, sigma, etc). Use +{xs}, {ys}, {zs} if you want the coordinates "scaled" to the box size, +so that each value is 0.0 to 1.0. Use {xu}, {yu}, {zu} if you want +the coordinates "unwrapped" by the image flags for each atom. +Unwrapped means that if the atom has passed thru a periodic boundary +one or more times, the value is printed for what the coordinate would +be if it had not been wrapped back into the periodic box. Note that +using {xu}, {yu}, {zu} means that the coordinate values may be far +outside the box size printed with the snapshot. The image flags can +be printed directly using the {ix}, {iy}, {iz} keywords. The "dump_modify"_dump_modify.html command describes in more detail what is meant by scaled vs unscaled coordinates and the image flags. @@ -231,57 +225,45 @@ are specific to aspherical particles defined with an atom style of define the orientiation of the particle. The final 3 give the rotational torque on the particle. -The {epair}, {ebond}, {ke}, {etotal}, {centro}, and {sxx}, etc -keywords print the pairwise energy, bond energy, kinetic energy, total -energy (pairwise + kinetic), centro-symmetry parameter, and components -of the per-atom stress tensor for each atom. These quantities are -calculated by computes that the dump defines, as if these commands had -been issued: - -compute dump-ID_epair/atom group-ID "epair/atom"_compute_epair_atom.html -compute dump-ID_ebond/atom group-ID "ebond/atom"_compute_ebond_atom.html -compute dump-ID_ke/atom group-ID "ke/atom"_compute_ke_atom.html -compute dump-ID_etotal/atom group-ID "etotal/atom"_compute_etotal_atom.html dump-ID_epair/atom -compute dump-ID_centro/atom group-ID "centro/atom"_compute_centro_atom.html -compute dump-ID_stress/atom group-ID "stress/atom"_compute_stress_atom.html :pre - -See the corresponding "compute"_compute.html style commands for -details on what is computed for each atom. Note that the ID of each -new compute is the dump-ID with the compute style appended (with an -underscore). The group for each new compute is the same as the dump -group. Note that for {etotal}, an auxiliary compute for calculating -the pairwise energy is created, since the "compute -etotal/atom"_compute_etotal_atom.html command requires it as an extra -argument. - -IMPORTANT NOTE: The {etotal} keyword does NOT include contributions -due to bonds, angles, etc that the atom is part of. The bond -contribution can be computed separately via the {ebond} keyword. -Currently, there is no way in LAMMPS to dump per-atom energy for -angles, dihedrals, improper, or long-range interactions. - -The {sxx}, {syy}, {szz}, {sxy}, {sxz}, {syz} keywords access the 6 -components of the stress tensor calculated for each atom by the -"compute stress/atom"_compute_stress_atom.html style. - The {c_ID} and {c_ID\[N\]} keywords allow scalar or vector per-atom quantities calculated by a compute to be output. The ID in the keyword should be replaced by the actual ID of the compute that has -been defined elsewhere in the input script. See the -"compute"_compute.html command for details. Note that scalar and -vector quantities that are not calculated on a per-atom basis -(e.g. global temperature or pressure) cannot be output in a dump. -Rather, these quantities are output by the "thermo_style -custom"_thermo_style.html command. +been defined previously in the input script. See the +"compute"_compute.html command for details. There are pre-defined +computes for calculating the energy, stress, centro-symmetry +parameter, and coordination number of individual atoms. The "compute +variable/atom" command will evaluate a per-atom formula you define via +the "variable atom"_variable.html command, for each atom, which can +then be dumped. + +Note that scalar and vector quantities that are not calculated on a +per-atom basis by a compute (e.g. global temperature or pressure) +cannot be output in a dump. Rather, these quantities can be output by +the "thermo_style custom"_thermo_style.html command. If {c_ID} is used as a keyword, then the scalar per-atom quantity calculated by the compute is printed. If {c_ID\[N\]} is used, then N in the range from 1-M will print the Nth component of the M-length per-atom vector calculated by the compute. -See "this section"_Section_modify.html for information on how to add -new compute styles to LAMMPS that calculate per-atom quantities which -could then be output with these keywords. +The {f_ID} and {f_ID\[N\]} keywords allow scalar or vector per-atom +quantities calculated by a fix to be output. The ID in the keyword +should be replaced by the actual ID of the fix that has been defined +previously in the input script. Currently the "fix +ave/atom"_fix_ave_atom.html command is the only fix that calculates +per-atom quantities. Since it takes a per-atom "compute"_compute.html +as an argument it effectively time-averages any of the previously +described compute quantities so the time-averaged result can be +written to a dump file. + +If {f_ID} is used as a keyword, then the scalar per-atom quantity +calculated by the fix is printed. If {f_ID\[N\]} is used, then N +in the range from 1-M will print the Nth component of the M-length +per-atom vector calculated by the fix. + +See "this section"_Section_modify.html of the manual for information +on how to add new compute and fix styles to LAMMPS that calculate +per-atom quantities which could then be output with these keywords. :line diff --git a/doc/fix.html b/doc/fix.html index ab40ccc149..0a9aacba19 100644 --- a/doc/fix.html +++ b/doc/fix.html @@ -75,6 +75,7 @@ for individual fixes for info on which ones can be restarted.

      • fix addforce - add a force to each atom
      • fix aveforce - add an averaged force to each atom +
      • fix ave/atom - compute per-atom time-averaged quantities
      • fix ave/spatial - output per-atom quantities by layer
      • fix ave/time - output time-averaged compute quantities
      • fix com - compute a center-of-mass diff --git a/doc/fix.txt b/doc/fix.txt index b6eafa05d4..2841bf1e51 100644 --- a/doc/fix.txt +++ b/doc/fix.txt @@ -72,6 +72,7 @@ Here is an alphabetic list of fix styles available in LAMMPS: "fix addforce"_fix_addforce.html - add a force to each atom "fix aveforce"_fix_aveforce.html - add an averaged force to each atom +"fix ave/atom"_fix_ave_atom.html - compute per-atom time-averaged quantities "fix ave/spatial"_fix_ave_spatial.html - output per-atom quantities by layer "fix ave/time"_fix_ave_time.html - output time-averaged compute quantities "fix com"_fix_com.html - compute a center-of-mass diff --git a/doc/fix_ave_spatial.html b/doc/fix_ave_spatial.html index 6af3435195..d481a6514f 100644 --- a/doc/fix_ave_spatial.html +++ b/doc/fix_ave_spatial.html @@ -13,7 +13,7 @@

        Syntax:

        -
        fix ID group-ID ave/spatial Nevery Nfreq dim origin delta file style args keyword value ... 
        +
        fix ID group-ID ave/spatial Nevery Nrepeat Nfreq dim origin delta file style args keyword value ... 
         
        • ID, group-ID are documented in fix command @@ -21,7 +21,9 @@
        • Nevery = calculate property every this many timesteps -
        • Nfreq = write average property to file every this many steps +
        • Nrepeat = # of times to repeat the Nevery calculation before averaging + +
        • Nfreq = timestep frequency at which the average value is written to file
        • dim = x or y or z @@ -31,13 +33,15 @@
        • file = filename to write results to -
        • style = density or atom or compute +
        • style = density or compute or fix
            density arg = mass or number
               mass = compute mass density
               number = compute number density
          -  atom arg = vx or vy or vz or fx or fy or fz
          -  compute arg = compute-ID that calculates per-atom quantities 
          +  compute arg = compute-ID that stores or calculates per-atom quantities
          +  fix arg = fix-ID that stores or calculates per-atom quantities 
          +
          +
           
        • zero or more keyword/value pairs may be appended @@ -49,36 +53,49 @@

        Examples:

        -
        fix 1 all ave/spatial 10000 10000 z lower 2.0 centro.profile compute myCentro
        -fix 1 flow ave/spatial 100 1000 y 0.0 1.0 vel.profile atom vx norm sample
        -fix 1 flow ave/spatial 100 1000 y 0.0 2.5 dens.profile density mass 
        +
        fix 1 all ave/spatial 10000 1 10000 z lower 2.0 centro.profile compute myCentro
        +fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vel.profile compute Vx norm sample
        +fix 1 flow ave/spatial 100 5 1000 y 0.0 2.5 dens.profile density mass 
         

        Description:

        Calculate one or more instantaneous per-atom quantities every few timesteps, average them by layer in a chosen dimension and over a longer timescale, and print the results to a file. This can be used -to spatially average per-atom properties such as velocity or energy or -a quantity calculated by an equation you define; see the variable -atom command. +to spatially average per-atom properties (velocity, force) or per-atom +quantities calculated by a compute (energy, stress) or +by another fix (see the fix ave/atom command) or +by a variable via an equation you define (see the compute +variable/atom command).

        The density styles means to simply count the number of atoms in each -layer, either by mass or number. The atom style allows an atom -property such as x-velocity to be specified. The compute style -allows specification of a compute which will be invoked -to calculate the desired property. The compute can be previously -defined in the input script. Note that the "compute variable/atom" -style allows you to calculate any quantity for an atom that can be -specified by a variable atom equation. Users can also -write code for their own compute styles and add them to -LAMMPS. Note that the dump custom -command can also be used to output per-atom quantities calculated by a -compute. +layer, either by mass or number. The compute style allows +specification of a compute which will be invoked to +calculate the desired property. The compute can be previously defined +in the input script or it can be a compute defined by a dump +custom command.

        -

        For the compute style, the fix ave/spatial style uses the per-atom -scalar or vector calculated by the compute. See the fix -ave/time command if you wish to time-average a -global quantity, e.g. via a compute that temperature or pressure. +

        For the compute style, the fix ave/spatial command accesses the +per-atom scalar or vector values stored by the compute. Thus it must +be a "per-atom" compute with the word "atom" in its style name, rather +than a "global" compute. See the fix ave/time +command if you wish to time-average a global quantity calculated by a +compute without the word atom in its style name, e.g. a compute that +calculates a temperature or pressure. +

        +

        See the compute command for a list of pre-defined +per-atom computes. Two special computes are as follows. The compute +attribute/atom command selects one or +more atom attributes like vx or fz. The "compute variable/atom" style +can calculate a value for an atom that can be specified by a variable +atom equation. Users can also write code for their own +per-atom compute styles and add them to LAMMPS. +Note that the dump custom command can also be used to +directly output per-atom quantities calculated by a per-atom compute. +

        +

        For the fix style, the fix ave/spatial command accesses the per-atom +scalar or vector values stored by another fix. The fix +ave/atom command is an example of such a fix.

        In all cases, the calculated property is averaged over atoms in each layer, where the layers are in a particular dim and have a thickness @@ -130,12 +147,14 @@ the lower "b" cross "c" plane of the simulation box and an origin of 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 Nevery and Nfreq arguments specify how the property calculated -for each layer is time-averaged. The property is calculated once each -Nevery timesteps. It is averaged and output every Nfreq timesteps. -Nfreq must be a multiple of Nevery. In the 2nd example above, the -property is calculated every 100 steps. After 10 calculations, the -average result is written to the file, once every 1000 steps. +

        The Nevery, Nrepeat, and Nfreq arguments specify how the +property will be time-averaged. The final averaged value(s) are +computed every Nfreq timesteps. The average is over Nrepeat +values, computed in the preceeding portion of the simulation every +Nevery timesteps. Thus 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 written to the file on timestep 100. Similary for +timesteps 190,192,194,196,198,200 on timestep 200, etc.

        The norm keyword also affects how time-averaging is done. For an all setting, a layer quantity is summed over all atoms in all @@ -159,16 +178,16 @@ 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).

        -

        If the density or atom keyword is used, or the compute keyword -with a compute that calculates a single quantity per atom, then a -single value will be printed for each layer. If the compute keyword -is used with a compute that calculates N quantities per atom, then N -values per line will be written, each of them averaged independently. +

        If the density keyword is used, or the compute or fix keyword +with a compute/fix that calculates a single quantity per atom, then a +single value will be printed for each layer. If the compute or +fix keyword is used with a compute/fix that calculates N quantities +per atom, then N values per line will be written, each of them +averaged independently.

        -

        For the compute keyword, the calculation performed by the compute in -on the group defined by the compute. However, only atoms in the fix -group are included in the layer averaging. LAMMPS prints a warning if -the fix group and compute group do not match. +

        For the compute and fix keywords, the calculation performed by the +compute or fix is on the group defined by the that command. However, +only atoms in the fix group are included in the layer averaging.

        Note that some computes perform costly calculations, involving use of or creation of neighbor lists. If the compute is invoked too often by diff --git a/doc/fix_ave_spatial.txt b/doc/fix_ave_spatial.txt index 7f02d27dd2..7c55afb0a6 100644 --- a/doc/fix_ave_spatial.txt +++ b/doc/fix_ave_spatial.txt @@ -10,22 +10,25 @@ fix ave/spatial command :h3 [Syntax:] -fix ID group-ID ave/spatial Nevery Nfreq dim origin delta file style args keyword value ... :pre +fix ID group-ID ave/spatial Nevery Nrepeat Nfreq dim origin delta file style args keyword value ... :pre ID, group-ID are documented in "fix"_fix.html command :ulb,l ave/spatial = style name of this fix command :l Nevery = calculate property every this many timesteps :l -Nfreq = write average property to file every this many steps :l +Nrepeat = # of times to repeat the Nevery calculation before averaging :l +Nfreq = timestep frequency at which the average value is written to file :l dim = {x} or {y} or {z} :l origin = {lower} or {center} or {upper} or coordinate value (distance units) :l delta = thickness of spatial layers in dim (distance units) :l file = filename to write results to :l -style = {density} or {atom} or {compute} :l +style = {density} or {compute} or {fix} :l {density} arg = {mass} or {number} {mass} = compute mass density {number} = compute number density - {atom} arg = {vx} or {vy} or {vz} or {fx} or {fy} or {fz} - {compute} arg = compute-ID that calculates per-atom quantities :pre + {compute} arg = compute-ID that stores or calculates per-atom quantities + {fix} arg = fix-ID that stores or calculates per-atom quantities :pre + +:pre zero or more keyword/value pairs may be appended :l keyword = {norm} or {units} @@ -36,36 +39,49 @@ keyword = {norm} or {units} [Examples:] -fix 1 all ave/spatial 10000 10000 z lower 2.0 centro.profile compute myCentro -fix 1 flow ave/spatial 100 1000 y 0.0 1.0 vel.profile atom vx norm sample -fix 1 flow ave/spatial 100 1000 y 0.0 2.5 dens.profile density mass :pre +fix 1 all ave/spatial 10000 1 10000 z lower 2.0 centro.profile compute myCentro +fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vel.profile compute Vx norm sample +fix 1 flow ave/spatial 100 5 1000 y 0.0 2.5 dens.profile density mass :pre [Description:] Calculate one or more instantaneous per-atom quantities every few timesteps, average them by layer in a chosen dimension and over a longer timescale, and print the results to a file. This can be used -to spatially average per-atom properties such as velocity or energy or -a quantity calculated by an equation you define; see the "variable -atom"_variable.html command. +to spatially average per-atom properties (velocity, force) or per-atom +quantities calculated by a "compute"_compute.html (energy, stress) or +by another fix (see the "fix ave/atom"_fix_ave_atom.html command) or +by a variable via an equation you define (see the "compute +variable/atom"_compute_variable_atom.html command). The {density} styles means to simply count the number of atoms in each -layer, either by mass or number. The {atom} style allows an atom -property such as x-velocity to be specified. The {compute} style -allows specification of a "compute"_compute.html which will be invoked -to calculate the desired property. The compute can be previously -defined in the input script. Note that the "compute variable/atom" -style allows you to calculate any quantity for an atom that can be -specified by a "variable atom"_variable.html equation. Users can also -write code for their own compute styles and "add them to -LAMMPS"_Section_modify.html. Note that the "dump custom"_dump.html -command can also be used to output per-atom quantities calculated by a -compute. +layer, either by mass or number. The {compute} style allows +specification of a "compute"_compute.html which will be invoked to +calculate the desired property. The compute can be previously defined +in the input script or it can be a compute defined by a "dump +custom"_dump.html command. -For the {compute} style, the fix ave/spatial style uses the per-atom -scalar or vector calculated by the compute. See the "fix -ave/time"_fix_ave_time.html command if you wish to time-average a -global quantity, e.g. via a compute that temperature or pressure. +For the {compute} style, the fix ave/spatial command accesses the +per-atom scalar or vector values stored by the compute. Thus it must +be a "per-atom" compute with the word "atom" in its style name, rather +than a "global" compute. See the "fix ave/time"_fix_ave_time.html +command if you wish to time-average a global quantity calculated by a +compute without the word atom in its style name, e.g. a compute that +calculates a temperature or pressure. + +See the "compute"_compute.html command for a list of pre-defined +per-atom computes. Two special computes are as follows. The "compute +attribute/atom"_compute_attribute_atom.html command selects one or +more atom attributes like vx or fz. The "compute variable/atom" style +can calculate a value for an atom that can be specified by a "variable +atom"_variable.html equation. Users can also write code for their own +per-atom compute styles and "add them to LAMMPS"_Section_modify.html. +Note that the "dump custom"_dump.html command can also be used to +directly output per-atom quantities calculated by a per-atom compute. + +For the {fix} style, the fix ave/spatial command accesses the per-atom +scalar or vector values stored by another fix. The "fix +ave/atom"_fix_ave_atom.html command is an example of such a fix. In all cases, the calculated property is averaged over atoms in each layer, where the layers are in a particular {dim} and have a thickness @@ -117,12 +133,14 @@ the lower "b" cross "c" plane of the simulation box and an {origin} of 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 {Nevery} and {Nfreq} arguments specify how the property calculated -for each layer is time-averaged. The property is calculated once each -Nevery timesteps. It is averaged and output every Nfreq timesteps. -Nfreq must be a multiple of Nevery. In the 2nd example above, the -property is calculated every 100 steps. After 10 calculations, the -average result is written to the file, once every 1000 steps. +The {Nevery}, {Nrepeat}, and {Nfreq} arguments specify how the +property will be time-averaged. The final averaged value(s) are +computed every {Nfreq} timesteps. The average is over {Nrepeat} +values, computed in the preceeding portion of the simulation every +{Nevery} timesteps. Thus 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 written to the file on timestep 100. Similary for +timesteps 190,192,194,196,198,200 on timestep 200, etc. The {norm} keyword also affects how time-averaging is done. For an {all} setting, a layer quantity is summed over all atoms in all @@ -146,16 +164,16 @@ 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). -If the {density} or {atom} keyword is used, or the {compute} keyword -with a compute that calculates a single quantity per atom, then a -single value will be printed for each layer. If the {compute} keyword -is used with a compute that calculates N quantities per atom, then N -values per line will be written, each of them averaged independently. +If the {density} keyword is used, or the {compute} or {fix} keyword +with a compute/fix that calculates a single quantity per atom, then a +single value will be printed for each layer. If the {compute} or +{fix} keyword is used with a compute/fix that calculates N quantities +per atom, then N values per line will be written, each of them +averaged independently. -For the {compute} keyword, the calculation performed by the compute in -on the group defined by the compute. However, only atoms in the fix -group are included in the layer averaging. LAMMPS prints a warning if -the fix group and compute group do not match. +For the {compute} and {fix} keywords, the calculation performed by the +compute or fix is on the group defined by the that command. However, +only atoms in the fix group are included in the layer averaging. Note that some computes perform costly calculations, involving use of or creation of neighbor lists. If the compute is invoked too often by diff --git a/doc/fix_ave_time.html b/doc/fix_ave_time.html index 35cdba8f4d..cd318ed159 100644 --- a/doc/fix_ave_time.html +++ b/doc/fix_ave_time.html @@ -13,46 +13,52 @@

        Syntax:

        -
        fix ID group-ID ave/time Nevery Nfreq compute-ID flag file 
        +
        fix ID group-ID ave/time Nevery Nrepeat Nfreq compute-ID flag file 
         
        • ID, group-ID are documented in fix command
        • ave/time = style name of this fix command
        • Nevery = calculate property every this many timesteps -
        • Nfreq = write average property to file every this many steps +
        • Nrepeat = # of times to repeat the Nevery calculation before averaging +
        • Nfreq = timestep frequency at which the average value is written to file
        • compute-ID = ID of compute that performs the calculation
        • flag = 0 for scalar quantity, 1 for vector quantity, 2 for both
        • file = filename to write results to

        Examples:

        -
        fix 1 all ave/time 100 1000 myTemp 0 temp.stats 
        +
        fix 1 all ave/time 100 5 1000 myTemp 0 temp.stats 
         

        Description:

        Calculate one or more instantaneous quantities every few timesteps, average them over a longer timescale, and print the results to a file. -This can be used to time-average any "compute" entity in LAMMPS such -as a temperature or pressure. +This can be used to time-average any "compute" entity in LAMMPS which +calculates a global quantity such as a temperature or pressure. +Per-atom computes cannot be used with this fix.

        The compute-ID specifies a compute which calculates -the desired property. The compute can be previously defined in the -input script. Or it can be a compute defined by thermodynamic +the desired property. The compute must be a "global" compute that +calculates one or more global properties rather than a "per-atom" +compute. The compute can be previously defined in the input script. +Or it can be a compute defined by thermodynamic output or other fixes such as fix nvt or fix temp/rescale. Users can also write code for their own compute styles and add them to LAMMPS.

        -

        In all these cases, the fix ave/time style uses the global scalar or +

        In all these cases, the fix ave/time command uses the global scalar or vector calculated by the compute. See the fix ave/spatial command if you wish to average spatially, e.g. via a compute that calculates per-atom quantities.

        -

        The Nevery and Nfreq arguments specify how the property will be -averaged. The property is calculated once each Nevery timesteps. It -is averaged and output every Nfreq timesteps. Nfreq must be a -multiple of Nevery. In the example above, the property is calculated -every 100 steps. After 10 calculations, the average result is written -to the file, once every 1000 steps. +

        The Nevery, Nrepeat, and Nfreq arguments specify how the +property will be time-averaged. The final averaged value(s) are +computed every Nfreq timesteps. The average is over Nrepeat +values, computed in the preceeding portion of the simulation every +Nevery timesteps. Thus 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 written to the file on timestep 100. Similary for +timesteps 190,192,194,196,198,200 on timestep 200, etc.

        The flag argument chooses whether the scalar and/or vector calculation of the compute is invoked. The former computes a single @@ -62,9 +68,7 @@ case, each of the N values is averaged independently and N values are written to the file at each output.

        Since the calculation is performed by the compute which stores its own -"group" definition, the group specified for the fix is ignored. -LAMMPS prints a warning if the fix group and compute group do not -match. +"group" definition, the group specified for this fix is ignored.

        If the compute calculates pressure, it will cause the force computations performed by LAMMPS (pair, bond, angle, etc) to calculate diff --git a/doc/fix_ave_time.txt b/doc/fix_ave_time.txt index f951d804e1..e603c3019c 100644 --- a/doc/fix_ave_time.txt +++ b/doc/fix_ave_time.txt @@ -10,46 +10,52 @@ fix ave/time command :h3 [Syntax:] -fix ID group-ID ave/time Nevery Nfreq compute-ID flag file :pre +fix ID group-ID ave/time Nevery Nrepeat Nfreq compute-ID flag file :pre ID, group-ID are documented in "fix"_fix.html command ave/time = style name of this fix command Nevery = calculate property every this many timesteps -Nfreq = write average property to file every this many steps +Nrepeat = # of times to repeat the Nevery calculation before averaging +Nfreq = timestep frequency at which the average value is written to file compute-ID = ID of compute that performs the calculation flag = 0 for scalar quantity, 1 for vector quantity, 2 for both file = filename to write results to :ul [Examples:] -fix 1 all ave/time 100 1000 myTemp 0 temp.stats :pre +fix 1 all ave/time 100 5 1000 myTemp 0 temp.stats :pre [Description:] Calculate one or more instantaneous quantities every few timesteps, average them over a longer timescale, and print the results to a file. -This can be used to time-average any "compute" entity in LAMMPS such -as a temperature or pressure. +This can be used to time-average any "compute" entity in LAMMPS which +calculates a global quantity such as a temperature or pressure. +Per-atom computes cannot be used with this fix. The {compute-ID} specifies a "compute"_compute.html which calculates -the desired property. The compute can be previously defined in the -input script. Or it can be a compute defined by "thermodynamic +the desired property. The compute must be a "global" compute that +calculates one or more global properties rather than a "per-atom" +compute. The compute can be previously defined in the input script. +Or it can be a compute defined by "thermodynamic output"_thermo_style.html or other fixes such as "fix nvt"_fix_nvt.html or "fix temp/rescale"_fix_temp_rescale.html. Users can also write code for their own compute styles and "add them to LAMMPS"_Section_modify.html. -In all these cases, the fix ave/time style uses the global scalar or +In all these cases, the fix ave/time command uses the global scalar or vector calculated by the compute. See the "fix ave/spatial"_fix_ave_spatial.html command if you wish to average spatially, e.g. via a compute that calculates per-atom quantities. -The {Nevery} and {Nfreq} arguments specify how the property will be -averaged. The property is calculated once each Nevery timesteps. It -is averaged and output every Nfreq timesteps. Nfreq must be a -multiple of Nevery. In the example above, the property is calculated -every 100 steps. After 10 calculations, the average result is written -to the file, once every 1000 steps. +The {Nevery}, {Nrepeat}, and {Nfreq} arguments specify how the +property will be time-averaged. The final averaged value(s) are +computed every {Nfreq} timesteps. The average is over {Nrepeat} +values, computed in the preceeding portion of the simulation every +{Nevery} timesteps. Thus 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 written to the file on timestep 100. Similary for +timesteps 190,192,194,196,198,200 on timestep 200, etc. The {flag} argument chooses whether the scalar and/or vector calculation of the compute is invoked. The former computes a single @@ -59,9 +65,7 @@ case, each of the N values is averaged independently and N values are written to the file at each output. Since the calculation is performed by the compute which stores its own -"group" definition, the group specified for the fix is ignored. -LAMMPS prints a warning if the fix group and compute group do not -match. +"group" definition, the group specified for this fix is ignored. If the compute calculates pressure, it will cause the force computations performed by LAMMPS (pair, bond, angle, etc) to calculate diff --git a/doc/fix_recenter.html b/doc/fix_recenter.html index ee09c1cf0d..0b569e760c 100644 --- a/doc/fix_recenter.html +++ b/doc/fix_recenter.html @@ -82,6 +82,19 @@ the input script, since the adjustments it makes to atom coordinates should come after the changes made by time integration. LAMMPS will warn you if your fixes are not ordered this way.

        +

        IMPORTANT NOTE: If you use this fix on a small group of atoms (e.g. a +molecule in solvent) without using the shift keyword to adjust the +positions of all atoms in the system, then the results can be +unpredictable. For example, if the molecule is pushed in one +direction by the solvent, its velocity will increase. But its +coordinates will be recentered, meaning it is pushed back towards the +force. Thus over time, the velocity and temperature of the molecule +could become very large (though it won't appear to be moving due to +the recentering). If you are thermostatting the entire system, then +the solvent would be cooled to compensate. A better solution for this +simulation scenario is to use the fix spring command +to tether the molecule in place. +

        Restart, fix_modify, thermo output, run start/stop, minimize info:

        No information about this fix is written to binary restart diff --git a/doc/fix_recenter.txt b/doc/fix_recenter.txt index c093bd2ca7..7af7917193 100644 --- a/doc/fix_recenter.txt +++ b/doc/fix_recenter.txt @@ -74,6 +74,19 @@ the input script, since the adjustments it makes to atom coordinates should come after the changes made by time integration. LAMMPS will warn you if your fixes are not ordered this way. +IMPORTANT NOTE: If you use this fix on a small group of atoms (e.g. a +molecule in solvent) without using the {shift} keyword to adjust the +positions of all atoms in the system, then the results can be +unpredictable. For example, if the molecule is pushed in one +direction by the solvent, its velocity will increase. But its +coordinates will be recentered, meaning it is pushed back towards the +force. Thus over time, the velocity and temperature of the molecule +could become very large (though it won't appear to be moving due to +the recentering). If you are thermostatting the entire system, then +the solvent would be cooled to compensate. A better solution for this +simulation scenario is to use the "fix spring"_fix_spring.html command +to tether the molecule in place. + [Restart, fix_modify, thermo output, run start/stop, minimize info:] No information about this fix is written to "binary restart diff --git a/doc/read_data.html b/doc/read_data.html index 923840fb6f..91b46b681a 100644 --- a/doc/read_data.html +++ b/doc/read_data.html @@ -250,7 +250,7 @@ integers (1, not 1.0). header section. The atoms can be listed in any order. These are the line formats for each atom style in LAMMPS:

        -
    asphere aspherical particles and force fields
    class2 class 2 force fields
    colloid colloidal particle force fields
    +
    @@ -642,7 +642,7 @@ style dipole or ellipsoid.
    • one line per atom
    • line syntax: depends on atom style
    -
    angle atom-ID molecule-ID atom-type x y z
    atomic atom-ID atom-type x y z
    bond atom-ID molecule-ID atom-type x y z
    +
    diff --git a/doc/variable.html b/doc/variable.html index e0e662b751..19fcaf887b 100644 --- a/doc/variable.html +++ b/doc/variable.html @@ -203,7 +203,7 @@ functions, group functions, atom vectors, compute references, and other variables. There is one difference between equal and atom variables; the syntax of Atom vector references is different.

    -
    all styles except those listed atom-ID vx vy vz
    dipole atom-ID vx vy vz wx wy wz
    ellipsoid atom-ID vx vy vz lx ly lz
    +
    Number 0.2, 1.0e20, -15.4, etc
    Thermo keywords vol, pe, ebond, etc
    Math functions add(x,y), sub(x,y), mult(x,y), div(x,y), neg(x), pow(x,y), exp(x), ln(x), sqrt(x)