Merge branch 'master' into fft

# Conflicts:
#	src/MAKE/OPTIONS/Makefile.kokkos_cuda_mpi
This commit is contained in:
Axel Kohlmeyer
2020-01-22 15:21:08 -05:00
194 changed files with 2039464 additions and 20865 deletions

View File

@ -46,7 +46,8 @@ An alphabetic list of all general LAMMPS commands.
* :doc:`dimension <dimension>`
* :doc:`displace_atoms <displace_atoms>`
* :doc:`dump <dump>`
* :doc:`dump adios <dump_adios>`
* :doc:`dump atom/adios <dump_adios>`
* :doc:`dump custom/adios <dump_adios>`
* :doc:`dump image <dump_image>`
* :doc:`dump movie <dump_image>`
* :doc:`dump netcdf <dump_netcdf>`
@ -135,7 +136,4 @@ An alphabetic list of all general LAMMPS commands.
* :doc:`write_data <write_data>`
* :doc:`write_dump <write_dump>`
* :doc:`write_restart <write_restart>`
*
*
*
*

View File

@ -47,7 +47,6 @@ OPT.
* :doc:`oxrna2/fene <bond_oxdna>`
* :doc:`quartic (o) <bond_quartic>`
* :doc:`table (o) <bond_table>`
*
.. _angle:
@ -89,7 +88,6 @@ OPT.
* :doc:`quartic (o) <angle_quartic>`
* :doc:`sdk (o) <angle_sdk>`
* :doc:`table (o) <angle_table>`
*
.. _dihedral:
@ -127,8 +125,6 @@ OPT.
* :doc:`spherical <dihedral_spherical>`
* :doc:`table (o) <dihedral_table>`
* :doc:`table/cut <dihedral_table_cut>`
*
*
.. _improper:
@ -162,4 +158,3 @@ OPT.
* :doc:`ring (o) <improper_ring>`
* :doc:`sqdistharm <improper_sqdistharm>`
* :doc:`umbrella (o) <improper_umbrella>`
*

View File

@ -163,6 +163,4 @@ KOKKOS, o = USER-OMP, t = OPT.
* :doc:`vcm/chunk <compute_vcm_chunk>`
* :doc:`voronoi/atom <compute_voronoi_atom>`
* :doc:`xrd <compute_xrd>`
*
*
*

View File

@ -115,6 +115,7 @@ OPT.
* :doc:`npt (iko) <fix_nh>`
* :doc:`npt/asphere (o) <fix_npt_asphere>`
* :doc:`npt/body <fix_npt_body>`
* :doc:`npt/cauchy <fix_npt_cauchy>`
* :doc:`npt/eff <fix_nh_eff>`
* :doc:`npt/sphere (o) <fix_npt_sphere>`
* :doc:`npt/uef <fix_nh_uef>`
@ -155,6 +156,7 @@ OPT.
* :doc:`precession/spin <fix_precession_spin>`
* :doc:`press/berendsen <fix_press_berendsen>`
* :doc:`print <fix_print>`
* :doc:`propel/self <fix_propel_self>`
* :doc:`property/atom (k) <fix_property_atom>`
* :doc:`python/invoke <fix_python_invoke>`
* :doc:`python/move <fix_python_move>`
@ -234,7 +236,7 @@ OPT.
* :doc:`wall/morse <fix_wall>`
* :doc:`wall/piston <fix_wall_piston>`
* :doc:`wall/reflect (k) <fix_wall_reflect>`
* :doc:`wall/reflect/stochastic <fix_wall_reflect_stochastic>`
* :doc:`wall/region <fix_wall_region>`
* :doc:`wall/region/ees <fix_wall_ees>`
* :doc:`wall/srd <fix_wall_srd>`
*

View File

@ -37,4 +37,3 @@ OPT.
* :doc:`pppm/stagger <kspace_style>`
* :doc:`pppm/tip4p (o) <kspace_style>`
* :doc:`scafacos <kspace_style>`
*

View File

@ -174,6 +174,7 @@ OPT.
* :doc:`meam/c <pair_meamc>`
* :doc:`meam/spline (o) <pair_meam_spline>`
* :doc:`meam/sw/spline <pair_meam_sw_spline>`
* :doc:`mesocnt <pair_mesocnt>`
* :doc:`mgpt <pair_mgpt>`
* :doc:`mie/cut (g) <pair_mie>`
* :doc:`mm3/switch3/coulgauss/long <pair_mm3_switch3_coulgauss_long>`
@ -256,5 +257,3 @@ OPT.
* :doc:`yukawa (gko) <pair_yukawa>`
* :doc:`yukawa/colloid (go) <pair_yukawa_colloid>`
* :doc:`zbl (gko) <pair_zbl>`
*
*

View File

@ -24,9 +24,38 @@ atoms. The quantum code computes energy and forces based on the
coords. It returns them as a message to LAMMPS, which completes the
timestep.
A more complex example is where LAMMPS is the client code and
processes a series of data files, sending each configuration to a
quantum code to compute energy and forces. Or LAMMPS runs dynamics
with an atomistic force field, but pauses every N steps to ask the
quantum code to compute energy and forces.
Alternate methods for code coupling with LAMMPS are described on
the :doc:`Howto couple <Howto_couple>` doc page.
The protocol for using LAMMPS as a client is to use these 3 commands
in this order (other commands may come in between):
* :doc:`message client <message>` # initiate client/server interaction
* :doc:`fix client/md <fix_client_md>` # any client fix which makes specific requests to the server
* :doc:`message quit <message>` # terminate client/server interaction
In between the two message commands, a client fix command and
:doc:`unfix <unfix>` command can be used multiple times. Similarly,
this sequence of 3 commands can be repeated multiple times, assuming
the server program operates in a similar fashion, to initiate and
terminate client/server communication.
The protocol for using LAMMPS as a server is to use these 2 commands
in this order (other commands may come in between):
* :doc:`message server <message>` # initiate client/server interaction
* :doc:`server md <server_md>` # any server command which responds to specific requests from the client
This sequence of 2 commands can be repeated multiple times, assuming
the client program operates in a similar fashion, to initiate and
terminate client/server communication.
LAMMPS support for client/server coupling is in its :ref:`MESSAGE package <PKG-MESSAGE>` which implements several
commands that enable LAMMPS to act as a client or server, as discussed
below. The MESSAGE package also wraps a client/server library called
@ -39,8 +68,8 @@ programs.
.. note::
For client/server coupling to work between LAMMPS and another
code, the other code also has to use the CSlib. This can sometimes be
done without any modifications to the other code by simply wrapping it
code, the other code also has to use the CSlib. This can often be
done without any modification to the other code by simply wrapping it
with a Python script that exchanges CSlib messages with LAMMPS and
prepares input for or processes output from the other code. The other
code also has to implement a matching protocol for the format and

View File

@ -20,6 +20,31 @@ and C and Python codes which show how a driver code can link to LAMMPS
as a library, run LAMMPS on a subset of processors, grab data from
LAMMPS, change it, and put it back into LAMMPS.
Thread-safety
-------------
LAMMPS has not initially been conceived as a thread-safe program, but
over the years changes have been applied to replace operations that
collide with creating multiple LAMMPS instances from multiple-threads
of the same process with thread-safe alternatives. This primarily
applies to the core LAMMPS code and less so on add-on packages, especially
when those packages require additional code in the *lib* folder,
interface LAMMPS to Fortran libraries, or the code uses static variables
(like the USER-COLVARS package.
Another major issue to deal with is to correctly handle MPI. Creating
a LAMMPS instance requires passing an MPI communicator, or it assumes
the MPI\_COMM\_WORLD communicator, which spans all MPI processor ranks.
When creating multiple LAMMPS object instances from different threads,
this communicator has to be different for each thread or else collisions
can happen, or it has to be guaranteed, that only one thread at a time
is active. MPI communicators, however, are not a problem, if LAMMPS is
compiled with the MPI STUBS library, which implies that there is no MPI
communication and only 1 MPI rank.
Provided APIs
-------------
The file src/library.cpp contains the following functions for creating
and destroying an instance of LAMMPS and sending it commands to
execute. See the documentation in the src/library.cpp file for

View File

@ -1096,8 +1096,9 @@ USER-ADIOS package
**Contents:**
ADIOS is a high-performance I/O library. This package implements the
dump "atom/adios" and dump "custom/adios" commands to write data using
the ADIOS library.
:doc:`dump atom/adios <dump_adios>`, :doc:`dump custom/adios <dump_adios>` and
:doc:`read_dump ... format adios <read_dump>`
commands to write and read data using the ADIOS library.
**Authors:** Norbert Podhorszki (ORNL) from the ADIOS developer team.
@ -1111,6 +1112,10 @@ This package has :ref:`specific installation instructions <user-adios>` on the :
* src/USER-ADIOS/README
* examples/USER/adios
* https://github.com/ornladios/ADIOS2
* :doc:`dump atom/adios <dump_adios>`
* :doc:`dump custom/adios <dump_adios>`
* :doc:`read_dump <read_dump>`
----------

View File

@ -1,6 +1,6 @@
from docutils import nodes
from sphinx.util.docutils import SphinxDirective
from docutils.nodes import Element, Node
from docutils.nodes import Element, Node, list_item
from typing import Any, Dict, List
from sphinx import addnodes
from sphinx.util import logging
@ -26,8 +26,12 @@ class TableFromList(SphinxDirective):
raise SphinxError('table_from_list content is not a list')
fulllist = node.children[0]
# fill list with empty items to have a number of entries
# that is divisible by ncolumns
if (len(fulllist) % ncolumns) != 0:
raise SphinxError('number of list elements not a multiple of column number')
missing = int(ncolumns - (len(fulllist) % ncolumns))
for i in range(0,missing):
fulllist += list_item()
table = nodes.table()
tgroup = nodes.tgroup(cols=ncolumns)

View File

@ -21,8 +21,11 @@ dump command
:doc:`dump movie <dump_image>` command
======================================
:doc:`dump adios <dump_adios>` command
======================================
:doc:`dump atom/adios <dump_adios>` command
===========================================
:doc:`dump custom/adios <dump_adios>` command
=============================================
Syntax
""""""
@ -45,12 +48,12 @@ Syntax
*atom* args = none
*atom/gz* args = none
*atom/mpiio* args = none
*atom/adios* args = none, discussed on :doc:`dump adios <dump_adios>` doc page
*atom/adios* args = none, discussed on :doc:`dump atom/adios <dump_adios>` doc page
*cfg* args = same as *custom* args, see below
*cfg/gz* args = same as *custom* args, see below
*cfg/mpiio* args = same as *custom* args, see below
*custom*\ , *custom/gz*\ , *custom/mpiio* args = see below
*custom/adios* args = same as *custom* args, discussed on :doc:`dump adios <dump_adios>` doc page
*custom/adios* args = same as *custom* args, discussed on :doc:`dump custom/adios <dump_adios>` doc page
*dcd* args = none
*h5md* args = discussed on :doc:`dump h5md <dump_h5md>` doc page
*image* args = discussed on :doc:`dump image <dump_image>` doc page
@ -713,7 +716,8 @@ LAMMPS was built with that package. See the :doc:`Build package <Build_package>
Related commands
""""""""""""""""
:doc:`dump adios <dump_adios>` :doc:`dump h5md <dump_h5md>`, :doc:`dump image <dump_image>`,
:doc:`dump atom/adios <dump_adios>`, :doc:`dump custom/adios <dump_adios>`,
:doc:`dump h5md <dump_h5md>`, :doc:`dump image <dump_image>`,
:doc:`dump molfile <dump_molfile>`, :doc:`dump\_modify <dump_modify>`,
:doc:`undump <undump>`

View File

@ -1,6 +1,7 @@
.. index:: dump atoms/adios
.. index:: dump atom/adios
.. index:: dump custom/adios
dump atoms/adios command
dump atom/adios command
=========================
dump custom/adios command
@ -12,7 +13,7 @@ Syntax
.. parsed-literal::
dump ID group-ID atoms/adios N file.bp
dump ID group-ID atom/adios N file.bp
dump ID group-ID custom/adios N file.bp args

View File

@ -267,6 +267,7 @@ accelerated styles exist.
* :doc:`npt <fix_nh>` - constant NPT time integration via Nose/Hoover
* :doc:`npt/asphere <fix_npt_asphere>` - NPT for aspherical particles
* :doc:`npt/body <fix_npt_body>` - NPT for body particles
* :doc:`npt/cauchy <fix_npt_cauchy>` - NPT with Cauchy stress
* :doc:`npt/eff <fix_nh_eff>` - NPT for nuclei and electrons in the electron force field model
* :doc:`npt/sphere <fix_npt_sphere>` - NPT for spherical particles
* :doc:`npt/uef <fix_nh_uef>` - NPT style time integration with diagonal flow
@ -307,6 +308,7 @@ accelerated styles exist.
* :doc:`precession/spin <fix_precession_spin>` -
* :doc:`press/berendsen <fix_press_berendsen>` - pressure control by Berendsen barostat
* :doc:`print <fix_print>` - print text and variables during a simulation
* :doc:`propel/self <fix_propel_self>` - model self-propelled particles
* :doc:`property/atom <fix_property_atom>` - add customized per-atom values
* :doc:`python/invoke <fix_python_invoke>` - call a Python function during a simulation
* :doc:`python/move <fix_python_move>` - call a Python function during a simulation run
@ -386,6 +388,7 @@ accelerated styles exist.
* :doc:`wall/morse <fix_wall>` - Morse potential wall
* :doc:`wall/piston <fix_wall_piston>` - moving reflective piston wall
* :doc:`wall/reflect <fix_wall_reflect>` - reflecting wall(s)
* :doc:`wall/reflect/stochastic <fix_wall_reflect_stochastic>` - reflecting wall(s) with finite temperature
* :doc:`wall/region <fix_wall_region>` - use region surface as wall
* :doc:`wall/region/ees <fix_wall_ees>` - use region surface as wall for ellipsoidal particles
* :doc:`wall/srd <fix_wall_srd>` - slip/no-slip wall for SRD particles

View File

@ -41,10 +41,10 @@ computes their interaction, and returns the energy, forces, and virial
for the interacting particles to LAMMPS, so it can complete the
timestep.
The server code could be a quantum code, or another classical MD code
which encodes a force field (pair\_style in LAMMPS lingo) which LAMMPS
does not have. In the quantum case, this fix is a mechanism for
running *ab initio* MD with quantum forces.
Note that the server code can be a quantum code, or another classical
MD code which encodes a force field (pair\_style in LAMMPS lingo) which
LAMMPS does not have. In the quantum case, this fix is a mechanism
for running *ab initio* MD with quantum forces.
The group associated with this fix is ignored.
@ -99,8 +99,8 @@ This fix is part of the MESSAGE package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
A script that uses this command must also use the
:doc:`message <message>` command to setup the messaging protocol with
the other server code.
:doc:`message <message>` command to setup and shut down the messaging
protocol with the server code.
Related commands
""""""""""""""""

View File

@ -57,6 +57,8 @@ Syntax
fix-ID = ID of :doc:`fix rigid/small <fix_rigid>` command
*shake* value = fix-ID
fix-ID = ID of :doc:`fix shake <fix_shake>` command
*orient* values = rx ry rz
rx,ry,rz = vector to randomly rotate an inserted molecule around
*units* value = *lattice* or *box*
lattice = the geometry is defined in lattice units
box = the geometry is defined in simulation box units
@ -236,6 +238,13 @@ sputtering process. E.g. the target point can be far away, so that
all incident particles strike the surface as if they are in an
incident beam of particles at a prescribed angle.
The *orient* keyword is only used when molecules are deposited. By
default, each molecule is inserted at a random orientation. If this
keyword is specified, then (rx,ry,rz) is used as an orientation
vector, and each inserted molecule is rotated around that vector with
a random value from zero to 2*PI. For a 2d simulation, rx = ry = 0.0
is required, since rotations can only be performed around the z axis.
The *id* keyword determines how atom IDs and molecule IDs are assigned
to newly deposited particles. Molecule IDs are only assigned if
molecules are being inserted. For the *max* setting, the atom and

View File

@ -21,10 +21,14 @@ Syntax
* alpha = boostostat relaxation time (time units)
* Btarget = desired time boost factor (unitless)
* zero or more keyword/value pairs may be appended
* keyword = *check/ghost* or *check/bias*
* keyword = *bound* or *reset* or *check/ghost* or *check/bias*
.. parsed-literal::
*bound* value = Bfrac
Bfrac = -1 or a value >= 0.0
*reset* value = Rfreq
Rfreq = -1 or 0 or timestep value > 0
*check/ghost* values = none
*check/bias* values = Nevery error/warn/ignore
@ -37,6 +41,7 @@ Examples
.. parsed-literal::
fix 1 all hyper/local 1.0 0.3 0.8 300.0
fix 1 all hyper/local 1.0 0.3 0.8 300.0 bound 0.1 reset 0
Description
"""""""""""
@ -214,8 +219,8 @@ guarantee an accelerated time-accurate trajectory of the system.
Cij are initialized to 1.0 and the boostostatting procedure typically
operates slowly enough that there can be a time period of bad dynamics
if *Vmax* is set too large. A better strategy is to set *Vmax* to the
smallest barrier height for an event (the same as for GHD), so that
the Cij remain near unity.
slightly smaller than the lowest barrier height for an event (the same
as for GHD), so that the Cij remain near unity.
The *Tequil* argument is the temperature at which the system is
simulated; see the comment above about the :doc:`fix langevin <fix_langevin>` thermostatting. It is also part of the
@ -310,6 +315,42 @@ time (t\_hyper equation above) will be shorter.
Here is additional information on the optional keywords for this fix.
The *bound* keyword turns on min/max bounds for bias coefficients Cij
for all bonds. Cij is a prefactor for each bond on the bias potential
of maximum strength Vmax. Depending on the choice of *alpha* and
*Btarget* and *Vmax*\ , the boostostatting can cause individual Cij
values to fluctuate. If the fluctuations are too large Cij\*Vmax can
exceed low barrier heights and induce bad event dynamics. Bounding
the Cij values is a way to prevent this. If *Bfrac* is set to -1 or
any negative value (the default) then no bounds are enforced on Cij
values (except they must always be >= 0.0). A *Bfrac* setting >= 0.0
sets a lower bound of 1.0 - Bfrac and upper bound of 1.0 + Bfrac on
each Cij value. Note that all Cij values are initialized to 1.0 when
a bond is created for the first time. Thus *Bfrac* limits the bias
potential height to *Vmax* +/- *Bfrac*\ \*\ *Vmax*\ .
The *reset* keyword allow *Vmax* to be adjusted dynamically depending
on the average value of all Cij prefactors. This can be useful if you
are unsure what value of *Vmax* will match the *Btarget* boost for the
system. The Cij values will then adjust in aggregate (up or down) so
that Cij\*Vmax produces a boost of *Btarget*\ , but this may conflict
with the *bound* keyword settings. By using *bound* and *reset*
together, *Vmax* itself can be reset, and desired bounds still applied
to the Cij values.
A setting for *Rfreq* of -1 (the default) means *Vmax* never changes.
A setting of 0 means *Vmax* is adjusted every time an event occurs and
bond pairs are recalculated. A setting of N > 0 timesteps means
*Vmax* is adjusted on the first time an event occurs on a timestep >=
N steps after the previous adjustment. The adjustment to *Vmax* is
computed as follows. The current average of all Cij\*Vmax values is
computed and the *Vmax* is reset to that value. All Cij values are
changed to new prefactors such the new Cij\*Vmax is the same as it was
previously. If the *bound* keyword was used, those bounds are
enforced on the new Cij values. Henceforth, new bonds are assigned a
Cij = 1.0, which means their bias potential magnitude is the new
*Vmax*\ .
The *check/ghost* keyword turns on extra computation each timestep to
compute statistics about ghost atoms used to determine which bonds to
bias. The output of these stats are the vector values 14 and 15,
@ -338,83 +379,96 @@ enabled by these keywords.
No information about this fix is written to :doc:`binary restart files <restart>`.
The :doc:`fix\_modify <fix_modify>` *energy* option is supported by this
fix to add the energy of the bias potential to the system's
potential energy as part of :doc:`thermodynamic output <thermo_style>`.
fix to add the energy of the bias potential to the system's potential
energy as part of :doc:`thermodynamic output <thermo_style>`.
This fix computes a global scalar and global vector of length 21,
This fix computes a global scalar and global vector of length 28,
which can be accessed by various :doc:`output commands <Howto_output>`.
The scalar is the magnitude of the bias potential (energy units)
applied on the current timestep, summed over all biased bonds. The
vector stores the following quantities:
* 1 = # of biased bonds on this step
* 2 = max strain Eij of any bond on this step (absolute value, unitless)
* 3 = average bias coeff for all bonds on this step (unitless)
* 4 = average # of bonds/atom on this step
* 5 = average neighbor bonds/bond on this step within *Dcut*
* 1 = average boost for all bonds on this step (unitless)
* 2 = # of biased bonds on this step
* 3 = max strain Eij of any bond on this step (absolute value, unitless)
* 4 = value of Vmax on this step (energy units)
* 5 = average bias coeff for all bonds on this step (unitless)
* 6 = min bias coeff for all bonds on this step (unitless)
* 7 = max bias coeff for all bonds on this step (unitless)
* 8 = average # of bonds/atom on this step
* 9 = average neighbor bonds/bond on this step within *Dcut*
* 6 = max bond length during this run (distance units)
* 7 = average # of biased bonds/step during this run
* 8 = fraction of biased bonds with no bias during this run
* 9 = fraction of biased bonds with negative strain during this run
* 10 = average bias coeff for all bonds during this run (unitless)
* 11 = min bias coeff for any bond during this run (unitless)
* 12 = max bias coeff for any bond during this run (unitless)
* 10 = average boost for all bonds during this run (unitless)
* 11 = average # of biased bonds/step during this run
* 12 = fraction of biased bonds with no bias during this run
* 13 = fraction of biased bonds with negative strain during this run
* 14 = max bond length during this run (distance units)
* 15 = average bias coeff for all bonds during this run (unitless)
* 16 = min bias coeff for any bond during this run (unitless)
* 17 = max bias coeff for any bond during this run (unitless)
* 13 = max drift distance of any bond atom during this run (distance units)
* 14 = max distance from proc subbox of any ghost atom with maxstrain < qfactor during this run (distance units)
* 15 = max distance outside my box of any ghost atom with any maxstrain during this run (distance units)
* 16 = count of ghost atoms that could not be found on reneighbor steps during this run
* 17 = count of bias overlaps (< Dcut) found during this run
* 18 = max drift distance of any bond atom during this run (distance units)
* 19 = max distance from proc subbox of any ghost atom with maxstrain < qfactor during this run (distance units)
* 20 = max distance outside my box of any ghost atom with any maxstrain during this run (distance units)
* 21 = count of ghost atoms that could not be found on reneighbor steps during this run
* 22 = count of bias overlaps (< Dcut) found during this run
* 18 = cumulative hyper time since fix created (time units)
* 19 = cumulative count of event timesteps since fix created
* 20 = cumulative count of atoms in events since fix created
* 21 = cumulative # of new bonds formed since fix created
* 23 = cumulative hyper time since fix created (time units)
* 24 = cumulative count of event timesteps since fix created
* 25 = cumulative count of atoms in events since fix created
* 26 = cumulative # of new bonds formed since fix created
The first quantities (1-5) are for the current timestep. Quantities
6-17 are for the current hyper run. They are reset each time a new
hyper run is performed. Quantities 18-21 are cumulative across
27 = average boost for biased bonds on this step (unitless)
28 = # of bonds with absolute strain >= q on this step
The first quantities 1-9 are for the current timestep. Quantities
10-22 are for the current hyper run. They are reset each time a new
hyper run is performed. Quantities 23-26 are cumulative across
multiple runs (since the point in the input script the fix was
defined).
For value 8, the numerator is a count of all biased bonds on each
For value 10, each bond instantaneous boost factor is given by the
equation for Bij above. The total system boost (average across all
bonds) fluctuates, but should average to a value close to the
specified Btarget.
For value 12, the numerator is a count of all biased bonds on each
timestep whose bias energy = 0.0 due to Eij >= *qfactor*\ . The
denominator is the count of all biased bonds on all timesteps.
For value 9, the numerator is a count of all biased bonds on each
For value 13, the numerator is a count of all biased bonds on each
timestep with negative strain. The denominator is the count of all
biased bonds on all timesteps.
Values 13-17 are mostly useful for debugging and diagnostic purposes.
Values 18-22 are mostly useful for debugging and diagnostic purposes.
For value 13, drift is the distance an atom moves between two quenched
For value 18, drift is the distance an atom moves between two quenched
states when the second quench determines an event has occurred. Atoms
involved in an event will typically move the greatest distance since
others typically remain near their original quenched position.
For values 14-16, neighbor atoms in the full neighbor list with cutoff
For values 19-21, neighbor atoms in the full neighbor list with cutoff
*Dcut* may be ghost atoms outside a processor's sub-box. Before the
next event occurs they may move further than *Dcut* away from the
sub-box boundary. Value 14 is the furthest (from the sub-box) any
sub-box boundary. Value 19 is the furthest (from the sub-box) any
ghost atom in the neighbor list with maxstrain < *qfactor* was
accessed during the run. Value 15 is the same except that the ghost
accessed during the run. Value 20 is the same except that the ghost
atom's maxstrain may be >= *qfactor*\ , which may mean it is about to
participate in an event. Value 16 is a count of how many ghost atoms
participate in an event. Value 21 is a count of how many ghost atoms
could not be found on reneighbor steps, presumably because they moved
too far away due to their participation in an event (which will likely
be detected at the next quench).
Typical values for 14 and 15 should be slightly larger than *Dcut*\ ,
Typical values for 19 and 20 should be slightly larger than *Dcut*\ ,
which accounts for ghost atoms initially at a *Dcut* distance moving
thermally before the next event takes place.
Note that for values 14 and 15 to be computed, the optional keyword
Note that for values 19 and 20 to be computed, the optional keyword
*check/ghost* must be specified. Otherwise these values will be zero.
This is because computing them incurs overhead, so the values are only
computed if requested.
Value 16 should be zero or small. As explained above a small count
Value 21 should be zero or small. As explained above a small count
likely means some ghost atoms were participating in their own events
and moved a longer distance. If the value is large, it likely means
the communication cutoff for ghosts is too close to *Dcut* leading to
@ -424,11 +478,11 @@ assumes those atoms are part of highly strained bonds. As explained
above, the :doc:`comm\_modify cutoff <comm_modify>` command can be used
to set a longer cutoff.
For value 17, no two bonds should be biased if they are within a
For value 22, no two bonds should be biased if they are within a
*Dcut* distance of each other. This value should be zero, indicating
that no pair of biased bonds are closer than *Dcut* from each other.
Note that for values 17 to be computed, the optional keyword
Note that for value 22 to be computed, the optional keyword
*check/bias* must be specified and it determines how often this check
is performed. This is because performing the check incurs overhead,
so if only computed as often as requested.
@ -438,27 +492,32 @@ timestep the check was made. Note that the value is a count of atoms
in bonds which found other atoms in bonds too close, so it is almost
always an over-count of the number of too-close bonds.
Value 18 is simply the specified *boost* factor times the number of
Value 23 is simply the specified *boost* factor times the number of
timesteps times the timestep size.
For value 19, events are checked for by the :doc:`hyper <hyper>` command
For value 24, events are checked for by the :doc:`hyper <hyper>` command
once every *Nevent* timesteps. This value is the count of those
timesteps on which one (or more) events was detected. It is NOT the
number of distinct events, since more than one event may occur in the
same *Nevent* time window.
For value 20, each time the :doc:`hyper <hyper>` command checks for an
For value 25, each time the :doc:`hyper <hyper>` command checks for an
event, it invokes a compute to flag zero or more atoms as
participating in one or more events. E.g. atoms that have displaced
more than some distance from the previous quench state. Value 20 is
more than some distance from the previous quench state. Value 25 is
the cumulative count of the number of atoms participating in any of
the events that were found.
Value 21 tallies the number of new bonds created by the bond reset
Value 26 tallies the number of new bonds created by the bond reset
operation. Bonds between a specific I,J pair of atoms may persist for
the entire hyperdynamics simulation if neither I or J are involved in
an event.
Value 27 computes the average boost for biased bonds only on this step.
Value 28 is the count of bonds with an absolute value of strain >= q
on this step.
The scalar and vector values calculated by this fix are all
"intensive".
@ -491,7 +550,9 @@ Related commands
Default
"""""""
The check/ghost and check/bias keywords are not enabled by default.
The default settings for optimal keywords are bounds = -1 and reset =
-1. The check/ghost and check/bias keywords are not enabled by
default.
----------

View File

@ -132,7 +132,7 @@ integrators derived by Tuckerman et al in :ref:`(Tuckerman) <nh-Tuckerman>`.
----------
The thermostat parameters for fix styles *nvt* and *npt* is specified
The thermostat parameters for fix styles *nvt* and *npt* are specified
using the *temp* keyword. Other thermostat-related keywords are
*tchain*\ , *tloop* and *drag*\ , which are discussed below.

679
doc/src/fix_npt_cauchy.rst Normal file
View File

@ -0,0 +1,679 @@
.. index:: fix npt/cauchy
fix npt/cauchy command
======================
Syntax
""""""
.. parsed-literal::
fix ID group-ID style_name keyword value ...
* ID, group-ID are documented in :doc:`fix <fix>` command
* style\_name = *npt/cauchy*
* one or more keyword/value pairs may be appended
* keyword = *temp* or *iso* or *aniso* or *tri* or *x* or *y* or *z* or *xy* or *yz* or *xz* or *couple* or *tchain* or *pchain* or *mtk* or *tloop* or *ploop* or *nreset* or *drag* or *dilate* or *scalexy* or *scaleyz* or *scalexz* or *flip* or *fixedpoint* or *update*
.. parsed-literal::
*temp* values = Tstart Tstop Tdamp
Tstart,Tstop = external temperature at start/end of run
Tdamp = temperature damping parameter (time units)
*iso* or *aniso* or *tri* values = Pstart Pstop Pdamp
Pstart,Pstop = scalar external pressure at start/end of run (pressure units)
Pdamp = pressure damping parameter (time units)
*x* or *y* or *z* or *xy* or *yz* or *xz* values = Pstart Pstop Pdamp
Pstart,Pstop = external stress tensor component at start/end of run (pressure units)
Pdamp = stress damping parameter (time units)
*couple* = *none* or *xyz* or *xy* or *yz* or *xz*
*tchain* value = N
N = length of thermostat chain (1 = single thermostat)
*pchain* values = N
N length of thermostat chain on barostat (0 = no thermostat)
*mtk* value = *yes* or *no* = add in MTK adjustment term or not
*tloop* value = M
M = number of sub-cycles to perform on thermostat
*ploop* value = M
M = number of sub-cycles to perform on barostat thermostat
*nreset* value = reset reference cell every this many timesteps
*drag* value = Df
Df = drag factor added to barostat/thermostat (0.0 = no drag)
*dilate* value = dilate-group-ID
dilate-group-ID = only dilate atoms in this group due to barostat volume changes
*scalexy* value = *yes* or *no* = scale xy with ly
*scaleyz* value = *yes* or *no* = scale yz with lz
*scalexz* value = *yes* or *no* = scale xz with lz
*flip* value = *yes* or *no* = allow or disallow box flips when it becomes highly skewed
*cauchystat* cauchystat values = alpha continue
alpha = strength of Cauchy stress control parameter
continue = *yes* or *no* = whether of not to continue from a previous run
*fixedpoint* values = x y z
x,y,z = perform barostat dilation/contraction around this point (distance units)
Examples
""""""""
fix 1 water npt/cauchy temp 300.0 300.0 100.0 iso 0.0 0.0 1000.0
Description
"""""""""""
This command performs time integration on Nose-Hoover style
non-Hamiltonian equations of motion which are designed to generate
positions and velocities sampled from the isothermal-isobaric (npt)
ensembles. This updates the position and velocity for atoms in the
group each timestep and the box dimensions.
The thermostatting and barostatting is achieved by adding some dynamic
variables which are coupled to the particle velocities
(thermostatting) and simulation domain dimensions (barostatting). In
addition to basic thermostatting and barostatting, this fix can
also create a chain of thermostats coupled to the particle thermostat,
and another chain of thermostats coupled to the barostat
variables. The barostat can be coupled to the overall box volume, or
to individual dimensions, including the *xy*\ , *xz* and *yz* tilt
dimensions. The external pressure of the barostat can be specified as
either a scalar pressure (isobaric ensemble) or as components of a
symmetric stress tensor (constant stress ensemble). When used
correctly, the time-averaged temperature and stress tensor of the
particles will match the target values specified by Tstart/Tstop and
Pstart/Pstop.
The equations of motion used are those of Shinoda et al in
:ref:`(Shinoda) <nc-Shinoda>`, which combine the hydrostatic equations of
Martyna, Tobias and Klein in :ref:`(Martyna) <nc-Martyna>` with the strain
energy proposed by Parrinello and Rahman in
:ref:`(Parrinello) <nc-Parrinello>`. The time integration schemes closely
follow the time-reversible measure-preserving Verlet and rRESPA
integrators derived by Tuckerman et al in :ref:`(Tuckerman) <nc-Tuckerman>`.
----------
The thermostat parameters are specified using the *temp* keyword.
Other thermostat-related keywords are *tchain*\ , *tloop* and *drag*\ ,
which are discussed below.
The thermostat is applied to only the translational degrees of freedom
for the particles. The translational degrees of freedom can also have
a bias velocity removed before thermostatting takes place; see the
description below. The desired temperature at each timestep is a
ramped value during the run from *Tstart* to *Tstop*\ . The *Tdamp*
parameter is specified in time units and determines how rapidly the
temperature is relaxed. For example, a value of 10.0 means to relax
the temperature in a timespan of (roughly) 10 time units (e.g. tau or
fmsec or psec - see the :doc:`units <units>` command). The atoms in the
fix group are the only ones whose velocities and positions are updated
by the velocity/position update portion of the integration.
.. note::
A Nose-Hoover thermostat will not work well for arbitrary values
of *Tdamp*\ . If *Tdamp* is too small, the temperature can fluctuate
wildly; if it is too large, the temperature will take a very long time
to equilibrate. A good choice for many models is a *Tdamp* of around
100 timesteps. Note that this is NOT the same as 100 time units for
most :doc:`units <units>` settings.
----------
The barostat parameters are specified using one or more of the *iso*\ ,
*aniso*\ , *tri*\ , *x*\ , *y*\ , *z*\ , *xy*\ , *xz*\ , *yz*\ , and *couple* keywords.
These keywords give you the ability to specify all 6 components of an
external stress tensor, and to couple various of these components
together so that the dimensions they represent are varied together
during a constant-pressure simulation.
Other barostat-related keywords are *pchain*\ , *mtk*\ , *ploop*\ ,
*nreset*\ , *drag*\ , and *dilate*\ , which are discussed below.
Orthogonal simulation boxes have 3 adjustable dimensions (x,y,z).
Triclinic (non-orthogonal) simulation boxes have 6 adjustable
dimensions (x,y,z,xy,xz,yz). The :doc:`create\_box <create_box>`, :doc:`read data <read_data>`, and :doc:`read\_restart <read_restart>` commands
specify whether the simulation box is orthogonal or non-orthogonal
(triclinic) and explain the meaning of the xy,xz,yz tilt factors.
The target pressures for each of the 6 components of the stress tensor
can be specified independently via the *x*\ , *y*\ , *z*\ , *xy*\ , *xz*\ , *yz*
keywords, which correspond to the 6 simulation box dimensions. For
each component, the external pressure or tensor component at each
timestep is a ramped value during the run from *Pstart* to *Pstop*\ .
If a target pressure is specified for a component, then the
corresponding box dimension will change during a simulation. For
example, if the *y* keyword is used, the y-box length will change. If
the *xy* keyword is used, the xy tilt factor will change. A box
dimension will not change if that component is not specified, although
you have the option to change that dimension via the :doc:`fix deform <fix_deform>` command.
Note that in order to use the *xy*\ , *xz*\ , or *yz* keywords, the
simulation box must be triclinic, even if its initial tilt factors are
0.0.
For all barostat keywords, the *Pdamp* parameter operates like the
*Tdamp* parameter, determining the time scale on which pressure is
relaxed. For example, a value of 10.0 means to relax the pressure in
a timespan of (roughly) 10 time units (e.g. tau or fmsec or psec - see
the :doc:`units <units>` command).
.. note::
A Nose-Hoover barostat will not work well for arbitrary values
of *Pdamp*\ . If *Pdamp* is too small, the pressure and volume can
fluctuate wildly; if it is too large, the pressure will take a very
long time to equilibrate. A good choice for many models is a *Pdamp*
of around 1000 timesteps. However, note that *Pdamp* is specified in
time units, and that timesteps are NOT the same as time units for most
:doc:`units <units>` settings.
Regardless of what atoms are in the fix group (the only atoms which
are time integrated), a global pressure or stress tensor is computed
for all atoms. Similarly, when the size of the simulation box is
changed, all atoms are re-scaled to new positions, unless the keyword
*dilate* is specified with a *dilate-group-ID* for a group that
represents a subset of the atoms. This can be useful, for example, to
leave the coordinates of atoms in a solid substrate unchanged and
controlling the pressure of a surrounding fluid. This option should
be used with care, since it can be unphysical to dilate some atoms and
not others, because it can introduce large, instantaneous
displacements between a pair of atoms (one dilated, one not) that are
far from the dilation origin. Also note that for atoms not in the fix
group, a separate time integration fix like :doc:`fix nve <fix_nve>` or
:doc:`fix nvt <fix_nh>` can be used on them, independent of whether they
are dilated or not.
----------
The *couple* keyword allows two or three of the diagonal components of
the pressure tensor to be "coupled" together. The value specified
with the keyword determines which are coupled. For example, *xz*
means the *Pxx* and *Pzz* components of the stress tensor are coupled.
*Xyz* means all 3 diagonal components are coupled. Coupling means two
things: the instantaneous stress will be computed as an average of the
corresponding diagonal components, and the coupled box dimensions will
be changed together in lockstep, meaning coupled dimensions will be
dilated or contracted by the same percentage every timestep. The
*Pstart*\ , *Pstop*\ , *Pdamp* parameters for any coupled dimensions must
be identical. *Couple xyz* can be used for a 2d simulation; the *z*
dimension is simply ignored.
----------
The *iso*\ , *aniso*\ , and *tri* keywords are simply shortcuts that are
equivalent to specifying several other keywords together.
The keyword *iso* means couple all 3 diagonal components together when
pressure is computed (hydrostatic pressure), and dilate/contract the
dimensions together. Using "iso Pstart Pstop Pdamp" is the same as
specifying these 4 keywords:
.. parsed-literal::
x Pstart Pstop Pdamp
y Pstart Pstop Pdamp
z Pstart Pstop Pdamp
couple xyz
The keyword *aniso* means *x*\ , *y*\ , and *z* dimensions are controlled
independently using the *Pxx*\ , *Pyy*\ , and *Pzz* components of the
stress tensor as the driving forces, and the specified scalar external
pressure. Using "aniso Pstart Pstop Pdamp" is the same as specifying
these 4 keywords:
.. parsed-literal::
x Pstart Pstop Pdamp
y Pstart Pstop Pdamp
z Pstart Pstop Pdamp
couple none
The keyword *tri* means *x*\ , *y*\ , *z*\ , *xy*\ , *xz*\ , and *yz* dimensions
are controlled independently using their individual stress components
as the driving forces, and the specified scalar pressure as the
external normal stress. Using "tri Pstart Pstop Pdamp" is the same as
specifying these 7 keywords:
.. parsed-literal::
x Pstart Pstop Pdamp
y Pstart Pstop Pdamp
z Pstart Pstop Pdamp
xy 0.0 0.0 Pdamp
yz 0.0 0.0 Pdamp
xz 0.0 0.0 Pdamp
couple none
----------
In some cases (e.g. for solids) the pressure (volume) and/or
temperature of the system can oscillate undesirably when a Nose/Hoover
barostat and thermostat is applied. The optional *drag* keyword will
damp these oscillations, although it alters the Nose/Hoover equations.
A value of 0.0 (no drag) leaves the Nose/Hoover formalism unchanged.
A non-zero value adds a drag term; the larger the value specified, the
greater the damping effect. Performing a short run and monitoring the
pressure and temperature is the best way to determine if the drag term
is working. Typically a value between 0.2 to 2.0 is sufficient to
damp oscillations after a few periods. Note that use of the drag
keyword will interfere with energy conservation and will also change
the distribution of positions and velocities so that they do not
correspond to the nominal NVT, NPT, or NPH ensembles.
An alternative way to control initial oscillations is to use chain
thermostats. The keyword *tchain* determines the number of thermostats
in the particle thermostat. A value of 1 corresponds to the original
Nose-Hoover thermostat. The keyword *pchain* specifies the number of
thermostats in the chain thermostatting the barostat degrees of
freedom. A value of 0 corresponds to no thermostatting of the
barostat variables.
The *mtk* keyword controls whether or not the correction terms due to
Martyna, Tuckerman, and Klein are included in the equations of motion
:ref:`(Martyna) <nc-Martyna>`. Specifying *no* reproduces the original
Hoover barostat, whose volume probability distribution function
differs from the true NPT and NPH ensembles by a factor of 1/V. Hence
using *yes* is more correct, but in many cases the difference is
negligible.
The keyword *tloop* can be used to improve the accuracy of integration
scheme at little extra cost. The initial and final updates of the
thermostat variables are broken up into *tloop* sub-steps, each of
length *dt*\ /\ *tloop*\ . This corresponds to using a first-order
Suzuki-Yoshida scheme :ref:`(Tuckerman) <nc-Tuckerman>`. The keyword *ploop*
does the same thing for the barostat thermostat.
The keyword *nreset* controls how often the reference dimensions used
to define the strain energy are reset. If this keyword is not used,
or is given a value of zero, then the reference dimensions are set to
those of the initial simulation domain and are never changed. If the
simulation domain changes significantly during the simulation, then
the final average pressure tensor will differ significantly from the
specified values of the external stress tensor. A value of *nstep*
means that every *nstep* timesteps, the reference dimensions are set
to those of the current simulation domain.
The *scaleyz*\ , *scalexz*\ , and *scalexy* keywords control whether or
not the corresponding tilt factors are scaled with the associated box
dimensions when barostatting triclinic periodic cells. The default
values *yes* will turn on scaling, which corresponds to adjusting the
linear dimensions of the cell while preserving its shape. Choosing
*no* ensures that the tilt factors are not scaled with the box
dimensions. See below for restrictions and default values in different
situations. In older versions of LAMMPS, scaling of tilt factors was
not performed. The old behavior can be recovered by setting all three
scale keywords to *no*\ .
The *flip* keyword allows the tilt factors for a triclinic box to
exceed half the distance of the parallel box length, as discussed
below. If the *flip* value is set to *yes*\ , the bound is enforced by
flipping the box when it is exceeded. If the *flip* value is set to
*no*\ , the tilt will continue to change without flipping. Note that if
applied stress induces large deformations (e.g. in a liquid), this
means the box shape can tilt dramatically and LAMMPS will run less
efficiently, due to the large volume of communication needed to
acquire ghost atoms around a processor's irregular-shaped sub-domain.
For extreme values of tilt, LAMMPS may also lose atoms and generate an
error.
The *fixedpoint* keyword specifies the fixed point for barostat volume
changes. By default, it is the center of the box. Whatever point is
chosen will not move during the simulation. For example, if the lower
periodic boundaries pass through (0,0,0), and this point is provided
to *fixedpoint*\ , then the lower periodic boundaries will remain at
(0,0,0), while the upper periodic boundaries will move twice as
far. In all cases, the particle trajectories are unaffected by the
chosen value, except for a time-dependent constant translation of
positions.
----------
.. note::
Using a barostat coupled to tilt dimensions *xy*\ , *xz*\ , *yz* can
sometimes result in arbitrarily large values of the tilt dimensions,
i.e. a dramatically deformed simulation box. LAMMPS allows the tilt
factors to grow a small amount beyond the normal limit of half the box
length (0.6 times the box length), and then performs a box "flip" to
an equivalent periodic cell. See the discussion of the *flip* keyword
above, to allow this bound to be exceeded, if desired.
The flip operation is described in more detail in the doc page for
:doc:`fix deform <fix_deform>`. Both the barostat dynamics and the atom
trajectories are unaffected by this operation. However, if a tilt
factor is incremented by a large amount (1.5 times the box length) on
a single timestep, LAMMPS can not accommodate this event and will
terminate the simulation with an error. This error typically indicates
that there is something badly wrong with how the simulation was
constructed, such as specifying values of *Pstart* that are too far
from the current stress value, or specifying a timestep that is too
large. Triclinic barostatting should be used with care. This also is
true for other barostat styles, although they tend to be more
forgiving of insults. In particular, it is important to recognize that
equilibrium liquids can not support a shear stress and that
equilibrium solids can not support shear stresses that exceed the
yield stress.
One exception to this rule is if the 1st dimension in the tilt factor
(x for xy) is non-periodic. In that case, the limits on the tilt
factor are not enforced, since flipping the box in that dimension does
not change the atom positions due to non-periodicity. In this mode,
if you tilt the system to extreme angles, the simulation will simply
become inefficient due to the highly skewed simulation box.
.. note::
Unlike the :doc:`fix temp/berendsen <fix_temp_berendsen>` command
which performs thermostatting but NO time integration, this fix
performs thermostatting/barostatting AND time integration. Thus you
should not use any other time integration fix, such as :doc:`fix nve <fix_nve>` on atoms to which this fix is applied. Likewise,
fix npt/cauchy should not normally be used on atoms that also
have their temperature controlled by another fix - e.g. by :doc:`fix langevin <fix_nh>` or :doc:`fix temp/rescale <fix_temp_rescale>`
commands.
See the :doc:`Howto thermostat <Howto_thermostat>` and :doc:`Howto barostat <Howto_barostat>` doc pages for a discussion of different
ways to compute temperature and perform thermostatting and
barostatting.
----------
This fix compute a temperature and pressure each timestep. To do
this, the fix creates its own computes of style "temp" and "pressure",
as if one of these sets of commands had been issued:
.. parsed-literal::
compute fix-ID_temp all temp
compute fix-ID_press all pressure fix-ID_temp
The group for both the new temperature and pressure compute is "all"
since pressure is computed for the entire system. See the :doc:`compute temp <compute_temp>` and :doc:`compute pressure <compute_pressure>`
commands for details. Note that the IDs of the new computes are the
fix-ID + underscore + "temp" or fix\_ID + underscore + "press".
Note that these are NOT the computes used by thermodynamic output (see
the :doc:`thermo\_style <thermo_style>` command) with ID = *thermo\_temp*
and *thermo\_press*. This means you can change the attributes of these
fix's temperature or pressure via the
:doc:`compute\_modify <compute_modify>` command. Or you can print this
temperature or pressure during thermodynamic output via the
:doc:`thermo\_style custom <thermo_style>` command using the appropriate
compute-ID. It also means that changing attributes of *thermo\_temp*
or *thermo\_press* will have no effect on this fix.
Like other fixes that perform thermostatting, fix npt/cauchy can
be used with :doc:`compute commands <compute>` that calculate a
temperature after removing a "bias" from the atom velocities.
E.g. removing the center-of-mass velocity from a group of atoms or
only calculating temperature on the x-component of velocity or only
calculating temperature for atoms in a geometric region. This is not
done by default, but only if the :doc:`fix\_modify <fix_modify>` command
is used to assign a temperature compute to this fix that includes such
a bias term. See the doc pages for individual :doc:`compute commands <compute>` to determine which ones include a bias. In
this case, the thermostat works in the following manner: the current
temperature is calculated taking the bias into account, bias is
removed from each atom, thermostatting is performed on the remaining
thermal degrees of freedom, and the bias is added back in.
----------
This fix can be used with either the *verlet* or *respa*
:doc:`integrators <run_style>`. When using this fix
with *respa*\ , LAMMPS uses an integrator constructed
according to the following factorization of the Liouville propagator
(for two rRESPA levels):
.. image:: Eqs/fix_nh1.jpg
:align: center
This factorization differs somewhat from that of Tuckerman et al, in
that the barostat is only updated at the outermost rRESPA level,
whereas Tuckerman's factorization requires splitting the pressure into
pieces corresponding to the forces computed at each rRESPA level. In
theory, the latter method will exhibit better numerical stability. In
practice, because Pdamp is normally chosen to be a large multiple of
the outermost rRESPA timestep, the barostat dynamics are not the
limiting factor for numerical stability. Both factorizations are
time-reversible and can be shown to preserve the phase space measure
of the underlying non-Hamiltonian equations of motion.
.. note::
Under NPT dynamics, for a system with zero initial total linear
momentum, the total momentum fluctuates close to zero. It may occasionally
undergo brief excursions to non-negligible values, before returning close
to zero. Over long simulations, this has the effect of causing the
center-of-mass to undergo a slow random walk. This can be mitigated by
resetting the momentum at infrequent intervals using the
:doc:`fix momentum <fix_momentum>` command.
----------
**Restart, fix\_modify, output, run start/stop, minimize info:**
This fix writes the state of all the thermostat and barostat
variables to :doc:`binary restart files <restart>`. See the
:doc:`read\_restart <read_restart>` command for info on how to re-specify
a fix in an input script that reads a restart file, so that the
operation of the fix continues in an uninterrupted fashion.
The :doc:`fix\_modify <fix_modify>` *temp* and *press* options are
supported by this fix. You can use them to assign a
:doc:`compute <compute>` you have defined to this fix which will be used
in its thermostatting or barostatting procedure, as described above.
If you do this, note that the kinetic energy derived from the compute
temperature should be consistent with the virial term computed using
all atoms for the pressure. LAMMPS will warn you if you choose to
compute temperature on a subset of atoms.
.. note::
If both the *temp* and *press* keywords are used in a single
thermo\_modify command (or in two separate commands), then the order in
which the keywords are specified is important. Note that a :doc:`pressure compute <compute_pressure>` defines its own temperature compute as
an argument when it is specified. The *temp* keyword will override
this (for the pressure compute being used by fix npt), but only if the
*temp* keyword comes after the *press* keyword. If the *temp* keyword
comes before the *press* keyword, then the new pressure compute
specified by the *press* keyword will be unaffected by the *temp*
setting.
The :doc:`fix\_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Nose/Hoover thermostatting
and barostatting to the system's potential energy as part of
:doc:`thermodynamic output <thermo_style>`.
This fix computes a global scalar and a global vector of quantities,
which can be accessed by various :doc:`output commands <Howto_output>`.
The scalar value calculated by this fix is "extensive"; the vector
values are "intensive".
The scalar is the cumulative energy change due to the fix.
The vector stores internal Nose/Hoover thermostat and barostat
variables. The number and meaning of the vector values depends on
which fix is used and the settings for keywords *tchain* and *pchain*\ ,
which specify the number of Nose/Hoover chains for the thermostat and
barostat. If no thermostatting is done, then *tchain* is 0. If no
barostatting is done, then *pchain* is 0. In the following list,
"ndof" is 0, 1, 3, or 6, and is the number of degrees of freedom in
the barostat. Its value is 0 if no barostat is used, else its value
is 6 if any off-diagonal stress tensor component is barostatted, else
its value is 1 if *couple xyz* is used or *couple xy* for a 2d
simulation, otherwise its value is 3.
The order of values in the global vector and their meaning is as
follows. The notation means there are tchain values for eta, followed
by tchain for eta\_dot, followed by ndof for omega, etc:
* eta[tchain] = particle thermostat displacements (unitless)
* eta\_dot[tchain] = particle thermostat velocities (1/time units)
* omega[ndof] = barostat displacements (unitless)
* omega\_dot[ndof] = barostat velocities (1/time units)
* etap[pchain] = barostat thermostat displacements (unitless)
* etap\_dot[pchain] = barostat thermostat velocities (1/time units)
* PE\_eta[tchain] = potential energy of each particle thermostat displacement (energy units)
* KE\_eta\_dot[tchain] = kinetic energy of each particle thermostat velocity (energy units)
* PE\_omega[ndof] = potential energy of each barostat displacement (energy units)
* KE\_omega\_dot[ndof] = kinetic energy of each barostat velocity (energy units)
* PE\_etap[pchain] = potential energy of each barostat thermostat displacement (energy units)
* KE\_etap\_dot[pchain] = kinetic energy of each barostat thermostat velocity (energy units)
* PE\_strain[1] = scalar strain energy (energy units)
This fix can ramp its external temperature and pressure over
multiple runs, using the *start* and *stop* keywords of the
:doc:`run <run>` command. See the :doc:`run <run>` command for details of
how to do this.
This fix is not invoked during :doc:`energy minimization <minimize>`.
----------
Restrictions
""""""""""""
This fix is part of the USER-MISC package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
*X*\ , *y*\ , *z* cannot be barostatted if the associated dimension is not
periodic. *Xy*\ , *xz*\ , and *yz* can only be barostatted if the
simulation domain is triclinic and the 2nd dimension in the keyword
(\ *y* dimension in *xy*\ ) is periodic. *Z*\ , *xz*\ , and *yz*\ , cannot be
barostatted for 2D simulations. The :doc:`create\_box <create_box>`,
:doc:`read data <read_data>`, and :doc:`read\_restart <read_restart>`
commands specify whether the simulation box is orthogonal or
non-orthogonal (triclinic) and explain the meaning of the xy,xz,yz
tilt factors.
For the *temp* keyword, the final Tstop cannot be 0.0 since it would
make the external T = 0.0 at some timestep during the simulation which
is not allowed in the Nose/Hoover formulation.
The *scaleyz yes* and *scalexz yes* keyword/value pairs can not be used
for 2D simulations. *scaleyz yes*\ , *scalexz yes*\ , and *scalexy yes* options
can only be used if the 2nd dimension in the keyword is periodic,
and if the tilt factor is not coupled to the barostat via keywords
*tri*\ , *yz*\ , *xz*\ , and *xy*\ .
Without the *cauchystat* keyword, the barostat algorithm
controls the Second-Piola Kirchhoff stress, which is a stress measure
referred to the unmodified (initial) simulation box. If the box
deforms substantially during the equilibration, the difference between
the set values and the final true (Cauchy) stresses can be
considerable.
The *cauchystat* keyword modifies the barostat as per Miller et
al. (Miller)\_"#nc-Miller" so that the Cauchy stress is controlled.
*alpha* is the non-dimensional parameter, typically set to 0.001 or
0.01 that determines how aggressively the algorithm drives the system
towards the set Cauchy stresses. Larger values of *alpha* will modify
the system more quickly, but can lead to instabilities. Smaller
values will lead to longer convergence time. Since *alpha* also
influences how much the stress fluctuations deviate from the
equilibrium fluctuations, it should be set as small as possible.
A *continue* value of *yes* indicates that the fix is subsequent to a
previous run with the npt/cauchy fix, and the intention is to continue
from the converged stress state at the end of the previous run. This
may be required, for example, when implementing a multi-step loading/unloading
sequence over several fixes.
Setting *alpha* to zero is not permitted. To "turn off" the
cauchystat control and thus restore the equilibrium stress
fluctuations, two subsequent fixes should be used. In the first, the
cauchystat flag is used and the simulation box equilibrates to the
correct shape for the desired stresses. In the second, the *fix*
statement is identical except that the *cauchystat* keyword is removed
(along with related *alpha* and *continue* values). This restores the
original Parrinello-Rahman algorithm, but now with the correct simulation
box shape from the first fix.
This fix can be used with dynamic groups as defined by the
:doc:`group <group>` command. Likewise it can be used with groups to
which atoms are added or deleted over time, e.g. a deposition
simulation. However, the conservation properties of the thermostat
and barostat are defined for systems with a static set of atoms. You
may observe odd behavior if the atoms in a group vary dramatically
over time or the atom count becomes very small.
Related commands
""""""""""""""""
:doc:`fix nve <fix_nve>`, :doc:`fix\_modify <fix_modify>`,
:doc:`run\_style <run_style>`
Default
"""""""
The keyword defaults are tchain = 3, pchain = 3, mtk = yes, tloop =
ploop = 1, nreset = 0, drag = 0.0, dilate = all, couple = none,
cauchystat = no,
scaleyz = scalexz = scalexy = yes if periodic in 2nd dimension and
not coupled to barostat, otherwise no.
----------
.. _nc-Martyna:
**(Martyna)** Martyna, Tobias and Klein, J Chem Phys, 101, 4177 (1994).
.. _nc-Parrinello:
**(Parrinello)** Parrinello and Rahman, J Appl Phys, 52, 7182 (1981).
.. _nc-Tuckerman:
**(Tuckerman)** Tuckerman, Alejandre, Lopez-Rendon, Jochim, and
Martyna, J Phys A: Math Gen, 39, 5629 (2006).
.. _nc-Shinoda:
**(Shinoda)** Shinoda, Shiga, and Mikami, Phys Rev B, 69, 134103 (2004).
.. _nc-Miller:
**(Miller)** Miller, Tadmor, Gibson, Bernstein and Pavia, J Chem Phys,
144, 184107 (2016).
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

113
doc/src/fix_propel_self.rst Normal file
View File

@ -0,0 +1,113 @@
.. index:: fix propel/self
fix propel/self command
=======================
Syntax
""""""
fix ID group-ID propel/self mode magnitude keyword values ...
* ID, group-ID are documented in :doc:`fix <fix>` command
* propel/self = style name of this fix command
* mode = velocity or quat
* magnitude = magnitude of the active force
* one or more keyword/value pairs may be appended to args
* keyword = *types*
*types* values = one or more atom types
Examples
""""""""
.. parsed-literal::
fix active_group all propel/self velocity 1.0
fix constant_velocity all viscous 1.0
fix active_group all propel/self quat 1.0
fix active all propel/self quat 1.0 types 1 2 4
Description
"""""""""""
Adds a force of a constant magnitude to each atom in the group. The nature in
which the force is added depends on the mode.
For *mode* = *velocity*, the active force acts along the velocity vector of
each atom. This can be interpreted as a velocity-dependent friction,
such as proposed by :ref:`(Erdmann) <Erdmann>`.
For *mode* = *quat* the force is applied along the axis obtained
by rotating the x-axis along the atom's quaternion. In other words, the
force is along the x-axis in the atom's body frame. This mode requires
all atoms in the group to have a quaternion, so atom\_style should
either be ellipsoid or body. In combination with Langevin thermostat
for translation and rotation in the overdamped regime, the quaternion
mode corresponds to the active Brownian particle model introduced by
:ref:`(Henkes) <Henkes>`, :ref:`(Bialke) <Bialke>` and :ref:`(Fily)
<Fily>`.
By default, this fix is applied to all atoms in the group. You can
override this behavior by specifying the atom types the fix should work
on through the *types* keyword.
----------
**Restart, fix\_modify, output, run start/stop, minimize info:**
No information about this fix is written to :doc:`binary restart files <restart>`.
This fix is not imposed during minimization.
Restrictions
""""""""""""
In quat mode, this fix makes use of per-atom quaternions to take
into account the fact that the orientation can rotate and hence the
direction of the active force can change. The quat mode
of this fix only works with atom\_style ellipsoid.
Related commands
""""""""""""""""
:doc:`fix setforce <fix_setforce>`, :doc:`fix addforce <fix_addforce>`
.. _Erdmann:
**(Erdmann)** U. Erdmann , W. Ebeling, L. Schimansky-Geier, and F. Schweitzer,
Eur. Phys. J. B 15, 105-113, 2000.
.. _Henkes:
**(Henkes)** Henkes, S, Fily, Y., and Marchetti, M. C. Phys. Rev. E, 84, 040301(R), 2011.
.. _Bialke:
**(Bialke)** J. Bialke, T. Speck, and H Loewen, Phys. Rev. Lett. 108, 168301, 2012.
.. _Fily:
**(Fily)** Y. Fily and M.C. Marchetti, Phys. Rev. Lett. 108, 235702, 2012.
**Default:** types
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -21,13 +21,9 @@ Syntax
.. parsed-literal::
*xlo*\ ,\ *ylo*\ ,\ *zlo* arg = EDGE or constant or variable
arg = EDGE or constant or variable
EDGE = current lo edge of simulation box
constant = number like 0.0 or -30.0 (distance units)
variable = :doc:`equal-style variable <variable>` like v_x or v_wiggle
*xhi*\ ,\ *yhi*\ ,\ *zhi* arg = EDGE or constant or variable
EDGE = current hi edge of simulation box
constant = number like 50.0 or 100.3 (distance units)
constant = number like 0.0 or 30.0 (distance units)
variable = :doc:`equal-style variable <variable>` like v_x or v_wiggle
* zero or more keyword/value pairs may be appended
@ -62,11 +58,12 @@ by a distance delta (e.g. due to :doc:`fix nve <fix_nve>`), then it is
put back inside the face by the same delta, and the sign of the
corresponding component of its velocity is flipped.
When used in conjunction with :doc:`fix nve <fix_nve>` and :doc:`run\_style verlet <run_style>`, the resultant time-integration algorithm is
equivalent to the primitive splitting algorithm (PSA) described by
:ref:`Bond <Bond1>`. Because each reflection event divides
the corresponding timestep asymmetrically, energy conservation is only
satisfied to O(dt), rather than to O(dt\^2) as it would be for
When used in conjunction with :doc:`fix nve <fix_nve>` and
:doc:`run\_style verlet <run_style>`, the resultant time-integration
algorithm is equivalent to the primitive splitting algorithm (PSA)
described by :ref:`Bond <Bond1>`. Because each reflection event
divides the corresponding timestep asymmetrically, energy conservation
is only satisfied to O(dt), rather than to O(dt\^2) as it would be for
velocity-Verlet integration without reflective walls.
Up to 6 walls or faces can be specified in a single command: *xlo*\ ,
@ -156,17 +153,19 @@ perturbation on the particles:
Styles with a *gpu*\ , *intel*\ , *kk*\ , *omp*\ , or *opt* suffix are
functionally the same as the corresponding style without the suffix.
They have been optimized to run faster, depending on your available
hardware, as discussed on the :doc:`Speed packages <Speed_packages>` doc
page. The accelerated styles take the same arguments and should
hardware, as discussed on the :doc:`Speed packages <Speed_packages>`
doc page. The accelerated styles take the same arguments and should
produce the same results, except for round-off and precision issues.
These accelerated styles are part of the GPU, USER-INTEL, KOKKOS,
USER-OMP and OPT packages, respectively. They are only enabled if
LAMMPS was built with those packages. See the :doc:`Build package <Build_package>` doc page for more info.
LAMMPS was built with those packages. See the :doc:`Build package
<Build_package>` doc page for more info.
You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the :doc:`-suffix command-line switch <Run_options>` when you invoke LAMMPS, or you can use the
:doc:`suffix <suffix>` command in your input script.
by including their suffix, or you can use the :doc:`-suffix
command-line switch <Run_options>` when you invoke LAMMPS, or you can
use the :doc:`suffix <suffix>` command in your input script.
See the :doc:`Speed packages <Speed_packages>` doc page for more
instructions on how to use the accelerated styles effectively.
@ -177,11 +176,13 @@ instructions on how to use the accelerated styles effectively.
**Restart, fix\_modify, output, run start/stop, minimize info:**
No information about this fix is written to :doc:`binary restart files <restart>`. None of the :doc:`fix\_modify <fix_modify>` options
are relevant to this fix. No global or per-atom quantities are stored
by this fix for access by various :doc:`output commands <Howto_output>`.
No information about this fix is written to :doc:`binary restart files
<restart>`. None of the :doc:`fix\_modify <fix_modify>` options are
relevant to this fix. No global or per-atom quantities are stored by
this fix for access by various :doc:`output commands <Howto_output>`.
No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`.
the :doc:`run <run>` command. This fix is not invoked during
:doc:`energy minimization <minimize>`.
Restrictions
""""""""""""
@ -192,17 +193,18 @@ Any dimension (xyz) that has a reflecting wall must be non-periodic.
A reflecting wall should not be used with rigid bodies such as those
defined by a "fix rigid" command. This is because the wall/reflect
displaces atoms directly rather than exerts a force on them. For
rigid bodies, use a soft wall instead, such as :doc:`fix wall/lj93 <fix_wall>`. LAMMPS will flag the use of a rigid
fix with fix wall/reflect with a warning, but will not generate an
error.
rigid bodies, use a soft wall instead, such as :doc:`fix wall/lj93
<fix_wall>`. LAMMPS will flag the use of a rigid fix with fix
wall/reflect with a warning, but will not generate an error.
Related commands
""""""""""""""""
:doc:`fix wall/lj93 <fix_wall>`, :doc:`fix oneway <fix_oneway>`
**Default:** none
**Default:**
The default for the units keyword is lattice.
----------

View File

@ -0,0 +1,157 @@
.. index:: fix wall/reflect/stochastic
fix wall/reflect/stochastic command
===================================
Syntax
""""""
.. parsed-literal::
fix ID group-ID wall/reflect/stochastic rstyle seed face args ... keyword value ...
* ID, group-ID are documented in :doc:`fix <fix>` command
* wall/reflect/stochastic = style name of this fix command
* rstyle = diffusive or maxwell or ccl
* seed = random seed for stochasticity (positive integer)
* one or more face/args pairs may be appended
* face = *xlo* or *xhi* or *ylo* or *yhi* or *zlo* or *zhi*
.. parsed-literal::
args = pos temp velx vely velz accomx accomy accomz
pos = EDGE or constant
EDGE = current lo or hi edge of simulation box
constant = number like 0.0 or 30.0 (distance units)
temp = wall temperature (temperature units)
velx,vely,velz = wall velocity in x,y,z directions (velocity units)
accomx,accomy,accomz = accommodation coeffs in x,y,z directions (unitless)
not specified for rstyle = diffusive
single accom coeff specified for rstyle maxwell
all 3 coeffs specified for rstyle cll
* zero or more keyword/value pairs may be appended
* keyword = *units*
.. parsed-literal::
*units* value = *lattice* or *box*
*lattice* = the wall position is defined in lattice units
*box* = the wall position is defined in simulation box units
Examples
""""""""
.. parsed-literal::
fix zwalls all wall/reflect/stochastic diffusive 23424 zlo EDGE 300 0.1 0.1 0 zhi EDGE 200 0.1 0.1 0
fix ywalls all wall/reflect/stochastic maxwell 345533 ylo 5.0 300 0.1 0.0 0.0 0.8 yhi 10.0 300 0.1 0.0 0.0 0.8
fix xwalls all wall/reflect/stochastic cercignanilampis 2308 xlo 0.0 300 0.0 0.1 0.9 0.8 0.7 xhi EDGE 300 0.0 0.1 0 0.9 0.8 0.7 units box
Description
"""""""""""
Bound the simulation with one or more walls which reflect particles
in the specified group when they attempt to move through them.
Reflection means that if an atom moves outside the wall on a timestep
(e.g. due to the :doc:`fix nve <fix_nve>` command), then it is put back
inside the wall with a changed velocity.
This fix models treats the wall as a moving solid boundary with a
finite temperature, which can exchange energy with particles that
collide with it. This is different than the simpler :doc:`fix wall/reflect <fix_wall_reflect>` command which models mirror
reflection. For this fix, the post collision velocity of each
particle is treated stochastically. The randomness can come from many
sources: thermal motion of the wall atoms, surface roughness, etc.
Three stochastic reflection models are currently implemented.
For rstyle *diffusive*\ , particles are reflected diffusively. Their
velocity distribution corresponds to an equilibrium distribution of
particles at the wall temperature. No accommodation coefficients
are specified.
For rstyle *maxwell*\ , particle reflection is Maxwellian which means
partially diffusive and partially specular (:ref:`Maxwell <Maxwell>`). A
single accommodation coeff is specified which must be between 0.0 and
1.0 inclusive. It determines the fraction of the collision which is
diffusive versus specular. An accommodation coefficient of 1.0 is fully
diffusive; a coefficient of 0.0 is fully specular.
For rstyle *cll*\ , particle collisions are computed by the
Cercignani/Lampis model. See :ref:`CL <CL>` and :ref:`To <To>` for details.
Three accommodations coefficient are specified. Each must be between
0.0 and 1.0 inclusive. Two are velocity accommodation coefficients;
one is a normal kinetic energy accommodation. The normal coeff is the
one corresponding to the normal of the wall itself. For example if
the wall is *ylo* or *yhi*\ , *accomx* and *accomz* are the tangential
velocity accommodation coefficients, and *accomy* is the normal
kinetic energy accommodation coefficient.
The optional *units* keyword determines the distance units used to
define a wall position. A *box* value selects standard distance units
as defined by the :doc:`units <units>` command, e.g. Angstroms for units
= real or metal. A *lattice* value means the distance units are in
lattice spacings. The :doc:`lattice <lattice>` command must have been
previously used to define the lattice spacings.
----------
Restrictions
""""""""""""
This fix has the same limitations as the :doc:`fix wall/reflect <fix_wall_reflect>` command. Any dimension (xyz) that
has a wall must be non-periodic. It should not be used with rigid
bodies such as those defined by the :doc:`fix rigid <fix_rigid>`
command. The wall velocity must lie on the same plane as the wall
itself.
This fix is part of the USER-MISC package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
Related commands
""""""""""""""""
:doc:`fix wall/reflect <fix_wall_reflect>`
Default
"""""""
The default for the units keyword is lattice.
----------
.. _Maxwell:
**(Maxwell)** J.C. Maxwell, Philos. Tans. Royal Soc. London, 157: 49-88
(1867).
.. _CL:
**(Cercignani)** C. Cercignani and M. Lampis. Trans. Theory
Stat. Phys. 1, 2, 101 (1971).
.. _To:
**(To)** Q.D. To, V.H. Vu, G. Lauriat, and
C. Leonard. J. Math. Phys. 56, 103101 (2015).
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -11,7 +11,7 @@ Syntax
message which protocol mode arg
* which = *client* or *server*
* which = *client* or *server* or *quit*
* protocol = *md* or *mc*
* mode = *file* or *zmq* or *mpi/one* or *mpi/two*
@ -46,6 +46,8 @@ Examples
message client md mpi/two tmp.couple
message server md mpi/two tmp.couple
message quit
Description
"""""""""""
@ -64,6 +66,10 @@ enables the two codes to work in tandem to perform a simulation.
The *which* argument defines LAMMPS to be the client or the server.
As explained below the *quit* option should be used when LAMMPS is
finished as a client. It sends a message to the server to tell it to
shut down.
----------
@ -146,12 +152,12 @@ path/file in a common filesystem.
----------
Normally, the message command should be used at the top of a LAMMPS
input script. It performs an initial handshake with the other code to
setup messaging and to verify that both codes are using the same
message protocol and mode. Assuming both codes are launched at
(nearly) the same time, the other code should perform the same kind of
initialization.
Normally, the message client or message server command should be used
at the top of a LAMMPS input script. It performs an initial handshake
with the other code to setup messaging and to verify that both codes
are using the same message protocol and mode. Assuming both codes are
launched at (nearly) the same time, the other code should perform the
same kind of initialization.
If LAMMPS is the client code, it will begin sending messages when a
LAMMPS client command begins its operation. E.g. for the :doc:`fix client/md <fix_client_md>` command, it is when a :doc:`run <run>`
@ -160,16 +166,25 @@ command is executed.
If LAMMPS is the server code, it will begin receiving messages when
the :doc:`server <server>` command is invoked.
A fix client command will terminate its messaging with the server when
LAMMPS ends, or the fix is deleted via the :doc:`unfix <unfix>` command.
The server command will terminate its messaging with the client when the
client signals it. Then the remainder of the LAMMPS input script will
be processed.
If LAMMPS is being used as a client, the message quit command will
terminate its messaging with the server. If you do not use this
command and just allow LAMMPS to exit, then the server will continue
to wait for further messages. This may not be a problem, but if both
the client and server programs were launched in the same batch script,
then if the server runs indefinitely, it may consume the full allocation
of computer time, even if the calculation finishes sooner.
If both codes do something similar, this means a new round of
client/server messaging can be initiated after termination by re-using
a 2nd message command in your LAMMPS input script, followed by a new
fix client or server command.
Note that if LAMMPS is the client or server, it will continue
processing the rest of its input script after client/server
communication terminates.
If both codes cooperate in this manner, a new round of client/server
messaging can be initiated after termination by re-using a 2nd message
command in your LAMMPS input script, followed by a new fix client or
server command, followed by another message quit command (if LAMMPS is
the client). As an example, this can be performed in a loop to use a
quantum code as a server to compute quantum forces for multiple LAMMPS
data files or periodic snapshots while running dynamics.
----------

View File

@ -82,15 +82,15 @@ list for calculating the normals for each atom pair.
.. note::
Two new sets of parameters of ILP for two-dimensional hexagonal
Materials are presented in :ref:`(Ouyang) <Ouyang>`. These parameters provide
a good description in both short- and long-range interaction regimes.
Four new sets of parameters of ILP for 2D layered Materials with bilayer and
bulk configurations are presented in :ref:`(Ouyang1) <Ouyang1>` and :ref:`(Ouyang2) <Ouyang2>`, respectively.
These parameters provide a good description in both short- and long-range interaction regimes.
While the old ILP parameters published in :ref:`(Leven2) <Leven2>` and
:ref:`(Maaravi) <Maaravi2>` are only suitable for long-range interaction
regime. This feature is essential for simulations in high pressure
regime (i.e., the interlayer distance is smaller than the equilibrium
distance). The benchmark tests and comparison of these parameters can
be found in :ref:`(Ouyang) <Ouyang>`.
distance). The benchmark tests and comparison of these parameters can
be found in :ref:`(Ouyang1) <Ouyang1>` and :ref:`(Ouyang2) <Ouyang2>`.
This potential must be used in combination with hybrid/overlay.
Other interactions can be set to zero using pair\_style *none*\ .
@ -185,11 +185,17 @@ Related commands
**(Kolmogorov)** A. N. Kolmogorov, V. H. Crespi, Phys. Rev. B 71, 235415 (2005).
.. _Ouyang:
.. _Ouyang1:
**(Ouyang)** W. Ouyang, D. Mandelli, M. Urbakh and O. Hod, Nano Lett. 18, 6009-6016 (2018).
**(Ouyang1)** W. Ouyang, D. Mandelli, M. Urbakh and O. Hod, Nano Lett. 18, 6009-6016 (2018).
.. _Ouyang2:
**(Ouyang2)** W. Ouyang et al., J. Chem. Theory Comput. 16(1), 666-676 (2020).
.. _lws: http://lammps.sandia.gov

View File

@ -70,7 +70,7 @@ list for calculating the normals for each atom pair.
Two new sets of parameters of KC potential for hydrocarbons, CH.KC
(without the taper function) and CH\_taper.KC (with the taper function)
are presented in :ref:`(Ouyang) <Ouyang1>`. The energy for the KC potential
are presented in :ref:`(Ouyang1) <Ouyang3>`. The energy for the KC potential
with the taper function goes continuously to zero at the cutoff. The
parameters in both CH.KC and CH\_taper.KC provide a good description in
both short- and long-range interaction regimes. While the original
@ -78,7 +78,7 @@ list for calculating the normals for each atom pair.
suitable for long-range interaction regime. This feature is essential
for simulations in high pressure regime (i.e., the interlayer distance
is smaller than the equilibrium distance). The benchmark tests and
comparison of these parameters can be found in :ref:`(Ouyang) <Ouyang1>`.
comparison of these parameters can be found in :ref:`(Ouyang1) <Ouyang3>` and :ref:`(Ouyang2) <Ouyang4>`.
This potential must be used in combination with hybrid/overlay.
Other interactions can be set to zero using pair\_style *none*\ .
@ -154,11 +154,17 @@ Related commands
**(Kolmogorov)** A. N. Kolmogorov, V. H. Crespi, Phys. Rev. B 71, 235415 (2005)
.. _Ouyang1:
.. _Ouyang3:
**(Ouyang)** W. Ouyang, D. Mandelli, M. Urbakh and O. Hod, Nano Lett. 18, 6009-6016 (2018).
**(Ouyang1)** W. Ouyang, D. Mandelli, M. Urbakh and O. Hod, Nano Lett. 18, 6009-6016 (2018).
.. _Ouyang4:
**(Ouyang2)** W. Ouyang et al., J. Chem. Theory Comput. 16(1), 666-676 (2020).
.. _lws: http://lammps.sandia.gov

View File

@ -90,15 +90,15 @@ pair\_style lj/cut/coul/wolf/omp command
pair\_style lj/cut/tip4p/cut command
====================================
pair\_style lj/cut/tip4p/cut/gpu command
========================================
pair\_style lj/cut/tip4p/cut/omp command
========================================
pair\_style lj/cut/tip4p/long command
=====================================
pair\_style lj/cut/tip4p/long/gpu command
=========================================
pair\_style lj/cut/tip4p/long/omp command
=========================================

161
doc/src/pair_mesocnt.rst Normal file
View File

@ -0,0 +1,161 @@
.. index:: pair\_style mesocnt
pair\_style mesocnt command
===========================
Syntax
""""""
.. parsed-literal::
pair_style mesocnt
Examples
""""""""
.. parsed-literal::
pair_style mesocnt
pair_coeff \* \* 10_10.cnt
Description
"""""""""""
Style *mesocnt* implements a mesoscopic potential
for the interaction of carbon nanotubes (CNTs). In this potential,
CNTs are modelled as chains of cylindrical segments in which
each infinitesimal surface element interacts with all other
CNT surface elements with the Lennard-Jones (LJ) term adopted from
the :doc:`airebo <pair_airebo>` style. The interaction energy
is then computed by integrating over the surfaces of all interacting
CNTs.
The potential is based on interactions between one cylindrical
segment and infinitely or semi-infinitely long CNTs as described
in :ref:`(Volkov1) <Volkov1>`. Chains of segments are
converted to these (semi-)infinite CNTs bases on an approximate
chain approach outlined in :ref:`(Volkov2) <Volkov2>`.
This allows to simplify the computation of the interactions
significantly and reduces the computational times to the
same order of magnitude as for regular bead spring models
where beads interact with the standard :doc:`pair_lj/cut <pair_lj>`
potential.
In LAMMPS, cylindrical segments are represented by bonds. Each
segment is defined by its two end points ("nodes") which correspond
to atoms in LAMMPS. For the exact functional form of the potential
and implementation details, the reader is referred to the
original papers :ref:`(Volkov1) <Volkov1>` and
:ref:`(Volkov2) <Volkov2>`.
The potential requires tabulated data provided in a single ASCII
text file specified in the :doc:`pair\_coeff <pair_coeff>` command.
The first line of the file provides a time stamp and
general information. The second line lists four integers giving
the number of data points provided in the subsequent four
data tables. The third line lists four floating point numbers:
the CNT radius R, the LJ parameter sigma and two numerical
parameters delta1 and delta2. These four parameters are given
in Angstroms. This is followed by four data tables each separated
by a single empty line. The first two tables have two columns
and list the parameters uInfParallel and Gamma respectively.
The last two tables have three columns giving data on a quadratic
array and list the parameters Phi and uSemiParallel respectively.
uInfParallel and uSemiParallel are given in eV/Angstrom, Phi is
given in eV and Gamma is unitless.
Potential files for CNTs can be readily generated using the freely
available code provided on
.. parsed-literal::
https://github.com/phankl/cntpot
Using the same approach, it should also be possible to
generate potential files for other 1D systems such as
boron nitride nanotubes.
.. note::
LAMMPS comes with one *mesocnt* style potential file
where the default number of data points per table is 1001.
This is sufficient for NVT simulations. For proper energy
conservation, we recommend using a potential file where
the resolution for Phi is at least 2001 data points.
.. note::
The *mesocnt* style requires CNTs to be represented
as a chain of atoms connected by bonds. Atoms need
to be numbered consecutively within one chain.
Atoms belonging to different CNTs need to be assigned
different molecule IDs.
A full summary of the method and LAMMPS implementation details
is expected to soon become available in Computer Physics
Communications.
----------
**Mixing, shift, table, tail correction, restart, rRESPA info**\ :
This pair style does not support mixing.
This pair style does not support the :doc:`pair\_modify <pair_modify>`
shift, table, and tail options.
The *mesocnt* pair style do not write their information to :doc:`binary restart files <restart>`,
since it is stored in tabulated potential files.
Thus, you need to re-specify the pair\_style and pair\_coeff commands in
an input script that reads a restart file.
This pair style can only be used via the *pair* keyword of the
:doc:`run\_style respa <run_style>` command. They do not support the
*inner*\ , *middle*\ , *outer* keywords.
----------
Restrictions
""""""""""""
This style is part of the USER-MISC package. It is only
enabled if LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
This pair potential requires the :doc:`newton <newton>` setting to be
"on" for pair interactions.
Related commands
""""""""""""""""
:doc:`pair\_coeff <pair_coeff>`
**Default:** none
----------
.. _Volkov1:
**(Volkov1)** Volkov and Zhigilei, J Phys Chem C, 114, 5513 (2010).
.. _Volkov2:
**(Volkov2)** Volkov, Simov and Zhigilei, APS Meeting Abstracts,
Q31.013 (2008).
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html

View File

@ -244,6 +244,7 @@ accelerated styles exist.
* :doc:`meam/c <pair_meamc>` - modified embedded atom method (MEAM) in C
* :doc:`meam/spline <pair_meam_spline>` - splined version of MEAM
* :doc:`meam/sw/spline <pair_meam_sw_spline>` - splined version of MEAM with a Stillinger-Weber term
* :doc:`mesocnt <pair_mesocnt>` - mesoscale model for (carbon) nanotubes
* :doc:`mgpt <pair_mgpt>` - simplified model generalized pseudopotential theory (MGPT) potential
* :doc:`mie/cut <pair_mie>` - Mie potential
* :doc:`mm3/switch3/coulgauss/long <pair_mm3_switch3_coulgauss_long>` - smoothed MM3 vdW potential with Gaussian electrostatics

View File

@ -356,7 +356,7 @@ to the screen and log file. Note that since the LAMMPS print command
itself takes a string in quotes as its argument, the Python string
must be delimited with a different style of quotes.
The :doc:`Pytnon library <Python_library>` doc page describes the syntax
The :doc:`Python library <Python_library>` doc page describes the syntax
for how Python wraps the various functions included in the LAMMPS
library interface.

View File

@ -43,6 +43,9 @@ Syntax
*format* values = format of dump file, must be last keyword if used
*native* = native LAMMPS dump file
*xyz* = XYZ file
*adios* [*timeout* value] = dump file written by the :doc:`dump adios <dump_adios>` command
*timeout* = specify waiting time for the arrival of the timestep when running concurrently.
The value is a float number and is interpreted in seconds.
*molfile* style path = VMD molfile plugin interface
style = *dcd* or *xyz* or others supported by molfile plugins
path = optional path for location of molfile plugins
@ -65,6 +68,8 @@ Examples
read_dump dump.xyz 10 x y z box no format molfile xyz ../plugins
read_dump dump.dcd 0 x y z format molfile dcd
read_dump dump.file 1000 x y z vx vy vz format molfile lammpstrj /usr/local/lib/vmd/plugins/LINUXAMD64/plugins/molfile
read_dump dump.bp 5000 x y z vx vy vz format adios
read_dump dump.bp 5000 x y z vx vy vz format adios timeout 60.0
Description
"""""""""""
@ -136,6 +141,17 @@ contain multiple directories separated by a colon (or semi-colon on
windows). The *path* keyword is optional and defaults to ".",
i.e. the current directory.
The *adios* format supports reading data that was written by the
:doc:`dump adios <dump_adios>` command. The
entire dump is read in parallel across all the processes, dividing
the atoms evenly among the processes. The number of writers that
has written the dump file does not matter. Using the adios style for
dump and read_dump is a convenient way to dump all atoms from *N*
writers and read it back by *M* readers. If one is running two
LAMMPS instances concurrently where one dumps data and the other is
reading it with the rerun command, the timeout option can be specified
to wait on the reader side for the arrival of the requested step.
Support for other dump format readers may be added in the future.
@ -147,7 +163,19 @@ and box information.
The dump file is scanned for a snapshot with a timestamp that matches
the specified *Nstep*\ . This means the LAMMPS timestep the dump file
snapshot was written on for the *native* format. Note that the *xyz*
snapshot was written on for the *native* or *adios* formats.
The list of timestamps available in an adios .bp file is stored in the
variable *ntimestep*:
.. parsed-literal::
$ bpls dump.bp -d ntimestep
uint64_t ntimestep 5*scalar
(0) 0 50 100 150 200
Note that the *xyz*
and *molfile* formats do not store the timestep. For these formats,
timesteps are numbered logically, in a sequential manner, starting
from 0. Thus to access the 10th snapshot in an *xyz* or *mofile*
@ -160,7 +188,8 @@ and the current simulation box is orthogonal or vice versa. A warning
will be generated if the snapshot box boundary conditions (periodic,
shrink-wrapped, etc) do not match the current simulation boundary
conditions, but the boundary condition information in the snapshot is
otherwise ignored. See the "boundary" command for more details.
otherwise ignored. See the "boundary" command for more details. The
*adios* reader does the same as the *native* format reader.
For the *xyz* format, no information about the box is available, so
you must set the *box* flag to *no*\ . See details below.
@ -231,6 +260,18 @@ consistent from snapshot to snapshot in the molfile dump file.
See the :doc:`dump\_modify sort <dump_modify>` command if the dump file
was written by LAMMPS.
The *adios* format supports all fields that the *native* format supports
except for the *q* charge field.
The list of fields stored in an adios .bp file is recorded in the attributes
*columns* (array of short strings) and *columnstr* (space-separated single string).
.. parsed-literal::
$ bpls -la dump.bp column*
string columns attr = {"id", "type", "x", "y", "z", "vx", "vy", "vz"}
string columnstr attr = "id type x y z vx vy vz "
----------
@ -357,10 +398,14 @@ The *molfile* dump file formats are part of the USER-MOLFILE package.
They are only enabled if LAMMPS was built with that packages. See the
:doc:`Build package <Build_package>` doc page for more info.
To write and read adios .bp files, you must compile LAMMPS with the
:ref:`USER-ADIOS <PKG-USER-ADIOS>` package.
Related commands
""""""""""""""""
:doc:`dump <dump>`, :doc:`dump molfile <dump_molfile>`,
:doc:`dump adios <dump_adios>`,
:doc:`read\_data <read_data>`, :doc:`read\_restart <read_restart>`,
:doc:`rerun <rerun>`

View File

@ -44,6 +44,8 @@ Examples
rerun dump.vels dump x y z vx vy vz box yes format molfile lammpstrj
rerun dump.dcd dump x y z box no format molfile dcd
rerun ../run7/dump.file.gz skip 2 dump x y z box yes
rerun dump.bp dump x y z box no format adios
rerun dump.bp dump x y z vx vy vz format adios timeout 10.0
Description
"""""""""""

View File

@ -39,7 +39,7 @@ enables the two codes to work in tandem to perform a simulation.
When this command is invoked, LAMMPS will run in server mode in an
endless loop, waiting for messages from the client code. The client
signals when it is done sending messages to LAMMPS, at which point the
loop will exit, and the remainder of the LAMMPS script will be
loop will exit, and the remainder of the LAMMPS input script will be
processed.
The *protocol* argument defines the format and content of messages