Merge branch 'master' into mc-fix-bond-create-angle

This commit is contained in:
Axel Kohlmeyer
2020-07-15 21:21:35 -04:00
411 changed files with 21793 additions and 14872 deletions

View File

@ -105,10 +105,10 @@ CMake build
# generic (default) or intel (Intel CPU) or fermi, kepler, cypress (NVIDIA)
-D GPU_ARCH=value # primary GPU hardware choice for GPU_API=cuda
# value = sm_XX, see below
# default is sm_30
# default is sm_50
-D HIP_ARCH=value # primary GPU hardware choice for GPU_API=hip
# value depends on selected HIP_PLATFORM
# default is 'gfx906' for HIP_PLATFORM=hcc and 'sm_30' for HIP_PLATFORM=nvcc
# default is 'gfx906' for HIP_PLATFORM=hcc and 'sm_50' for HIP_PLATFORM=nvcc
-D HIP_USE_DEVICE_SORT=value # enables GPU sorting
# value = yes (default) or no
-D CUDPP_OPT=value # optimization setting for GPU_API=cuda
@ -1255,6 +1255,15 @@ also typically :ref:`install the USER-OMP package <user-omp>`, as it can be
used in tandem with the USER-INTEL package to good effect, as explained
on the :doc:`Speed intel <Speed_intel>` doc page.
When using Intel compilers version 16.0 or later is required. You can
also use the GNU or Clang compilers and they will provide performance
improvements over regular styles and USER-OMP styles, but less so than
with the Intel compilers. Please also note, that some compilers have
been found to apply memory alignment constraints incompletely or
incorrectly and thus can cause segmentation faults in otherwise correct
code when using features from the USER-INTEL package.
CMake build
^^^^^^^^^^^

View File

@ -46,13 +46,6 @@ An alphabetic list of all general LAMMPS commands.
* :doc:`dimension <dimension>`
* :doc:`displace_atoms <displace_atoms>`
* :doc:`dump <dump>`
* :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>`
* :doc:`dump netcdf/mpiio <dump_netcdf>`
* :doc:`dump vtk <dump_vtk>`
* :doc:`dump_modify <dump_modify>`
* :doc:`dynamical_matrix <dynamical_matrix>`
* :doc:`echo <echo>`
@ -108,7 +101,8 @@ An alphabetic list of all general LAMMPS commands.
* :doc:`region <region>`
* :doc:`replicate <replicate>`
* :doc:`rerun <rerun>`
* :doc:`reset_ids <reset_ids>`
* :doc:`reset_atom_ids <reset_atom_ids>`
* :doc:`reset_mol_ids <reset_mol_ids>`
* :doc:`reset_timestep <reset_timestep>`
* :doc:`restart <restart>`
* :doc:`run <run>`

View File

@ -80,6 +80,7 @@ KOKKOS, o = USER-OMP, t = OPT.
* :doc:`ke/eff <compute_ke_eff>`
* :doc:`ke/rigid <compute_ke_rigid>`
* :doc:`mesont <compute_mesont>`
* :doc:`mliap <compute_mliap>`
* :doc:`momentum <compute_momentum>`
* :doc:`msd <compute_msd>`
* :doc:`msd/chunk <compute_msd_chunk>`
@ -122,6 +123,7 @@ KOKKOS, o = USER-OMP, t = OPT.
* :doc:`smd/tlsph/strain/rate <compute_smd_tlsph_strain_rate>`
* :doc:`smd/tlsph/stress <compute_smd_tlsph_stress>`
* :doc:`smd/triangle/vertices <compute_smd_triangle_vertices>`
* :doc:`smd/ulsph/effm <compute_smd_ulsph_effm>`
* :doc:`smd/ulsph/num/neighs <compute_smd_ulsph_num_neighs>`
* :doc:`smd/ulsph/strain <compute_smd_ulsph_strain>`
* :doc:`smd/ulsph/strain/rate <compute_smd_ulsph_strain_rate>`

View File

@ -136,22 +136,22 @@ OPT.
* :doc:`lj/class2/soft <pair_fep_soft>`
* :doc:`lj/cubic (go) <pair_lj_cubic>`
* :doc:`lj/cut (gikot) <pair_lj>`
* :doc:`lj/cut/coul/cut (gko) <pair_lj>`
* :doc:`lj/cut/coul/cut (gko) <pair_lj_cut_coul>`
* :doc:`lj/cut/coul/cut/soft (o) <pair_fep_soft>`
* :doc:`lj/cut/coul/debye (gko) <pair_lj>`
* :doc:`lj/cut/coul/dsf (gko) <pair_lj>`
* :doc:`lj/cut/coul/long (gikot) <pair_lj>`
* :doc:`lj/cut/coul/debye (gko) <pair_lj_cut_coul>`
* :doc:`lj/cut/coul/dsf (gko) <pair_lj_cut_coul>`
* :doc:`lj/cut/coul/long (gikot) <pair_lj_cut_coul>`
* :doc:`lj/cut/coul/long/cs <pair_cs>`
* :doc:`lj/cut/coul/long/soft (o) <pair_fep_soft>`
* :doc:`lj/cut/coul/msm (go) <pair_lj>`
* :doc:`lj/cut/coul/wolf (o) <pair_lj>`
* :doc:`lj/cut/coul/msm (go) <pair_lj_cut_coul>`
* :doc:`lj/cut/coul/wolf (o) <pair_lj_cut_coul>`
* :doc:`lj/cut/dipole/cut (go) <pair_dipole>`
* :doc:`lj/cut/dipole/long (g) <pair_dipole>`
* :doc:`lj/cut/dipole/sf (go) <pair_dipole>`
* :doc:`lj/cut/soft (o) <pair_fep_soft>`
* :doc:`lj/cut/thole/long (o) <pair_thole>`
* :doc:`lj/cut/tip4p/cut (o) <pair_lj>`
* :doc:`lj/cut/tip4p/long (got) <pair_lj>`
* :doc:`lj/cut/tip4p/cut (o) <pair_lj_cut_tip4p>`
* :doc:`lj/cut/tip4p/long (got) <pair_lj_cut_tip4p>`
* :doc:`lj/cut/tip4p/long/soft (o) <pair_fep_soft>`
* :doc:`lj/expand (gko) <pair_lj_expand>`
* :doc:`lj/expand/coul/long (g) <pair_lj_expand>`

View File

@ -102,8 +102,8 @@ documentation for the formula it computes.
* :doc:`pair_style <pair_buck>` buck/coul/cut
* :doc:`pair_style <pair_buck>` buck/coul/long
* :doc:`pair_style <pair_lj>` lj/cut
* :doc:`pair_style <pair_lj>` lj/cut/coul/cut
* :doc:`pair_style <pair_lj>` lj/cut/coul/long
* :doc:`pair_style <pair_lj_cut_coul>` lj/cut/coul/cut
* :doc:`pair_style <pair_lj_cut_coul>` lj/cut/coul/long
* :doc:`pair_style <pair_hbond_dreiding>` hbond/dreiding/lj
* :doc:`pair_style <pair_hbond_dreiding>` hbond/dreiding/morse

View File

@ -3,13 +3,15 @@ Output from LAMMPS (thermo, dumps, computes, fixes, variables)
There are four basic kinds of LAMMPS output:
* :doc:`Thermodynamic output <thermo_style>`, which is a list
of quantities printed every few timesteps to the screen and logfile.
* :doc:`Thermodynamic output <thermo_style>`, which is a list of
quantities printed every few timesteps to the screen and logfile.
* :doc:`Dump files <dump>`, which contain snapshots of atoms and various
per-atom values and are written at a specified frequency.
* Certain fixes can output user-specified quantities to files: :doc:`fix ave/time <fix_ave_time>` for time averaging, :doc:`fix ave/chunk <fix_ave_chunk>` for spatial or other averaging, and :doc:`fix print <fix_print>` for single-line output of
:doc:`variables <variable>`. Fix print can also output to the
screen.
* Certain fixes can output user-specified quantities to files:
:doc:`fix ave/time <fix_ave_time>` for time averaging,
:doc:`fix ave/chunk <fix_ave_chunk>` for spatial or other averaging, and
:doc:`fix print <fix_print>` for single-line output of
:doc:`variables <variable>`. Fix print can also output to the screen.
* :doc:`Restart files <restart>`.
A simulation prints one set of thermodynamic output and (optionally)
@ -41,7 +43,7 @@ to output and the kind of data they operate on and produce:
.. _global:
Global/per-atom/local data
---------------------------------------
--------------------------
Various output-related commands work with three different styles of
data: global, per-atom, or local. A global datum is one or more
@ -54,7 +56,7 @@ bond distances.
.. _scalar:
Scalar/vector/array data
-------------------------------------
------------------------
Global, per-atom, and local datums can each come in three kinds: a
single scalar value, a vector of values, or a 2d array of values. The
@ -81,10 +83,27 @@ the dimension twice (array -> scalar). Thus a command that uses
scalar values as input can typically also process elements of a vector
or array.
.. _disambiguation:
Disambiguation
--------------
Some computes and fixes produce data in multiple styles, e.g. a global
scalar and a per-atom vector. Usually the context in which the input
script references the data determines which style is meant. Example: if
a compute provides both a global scalar and a per-atom vector, the
former will be accessed by using ``c_ID`` in an equal-style variable,
while the latter will be accessed by using ``c_ID`` in an atom-style
variable. Note that atom-style variable formulas can also access global
scalars, but in this case it is not possible to do directly because of
the ambiguity. Instead, an equal-style variable can be defined which
accesses the global scalar, and that variable used in the atom-style
variable formula in place of ``c_ID``.
.. _thermo:
Thermodynamic output
---------------------------------
--------------------
The frequency and format of thermodynamic output is set by the
:doc:`thermo <thermo>`, :doc:`thermo_style <thermo_style>`, and
@ -112,7 +131,7 @@ intensive result.
.. _dump:
Dump file output
---------------------------
----------------
Dump file output is specified by the :doc:`dump <dump>` and
:doc:`dump_modify <dump_modify>` commands. There are several
@ -138,7 +157,7 @@ command.
.. _fixoutput:
Fixes that write output files
---------------------------------------------
-----------------------------
Several fixes take various quantities as input and can write output
files: :doc:`fix ave/time <fix_ave_time>`, :doc:`fix ave/chunk <fix_ave_chunk>`, :doc:`fix ave/histo <fix_ave_histo>`,
@ -192,7 +211,7 @@ from normal thermodynamic or dump file output.
.. _computeoutput:
Computes that process output quantities
-----------------------------------------------------------
---------------------------------------
The :doc:`compute reduce <compute_reduce>` and :doc:`compute reduce/region <compute_reduce>` commands take one or more per-atom
or local vector quantities as inputs and "reduce" them (sum, min, max,
@ -219,7 +238,7 @@ output commands.
.. _fixprocoutput:
Fixes that process output quantities
--------------------------------------------------------
------------------------------------
The :doc:`fix vector <fix_vector>` command can create global vectors as
output from global scalars as input, accumulating them one element at
@ -244,7 +263,7 @@ The output of this fix can be used as input to other output commands.
.. _compute:
Computes that generate values to output
-----------------------------------------------------
---------------------------------------
Every :doc:`compute <compute>` in LAMMPS produces either global or
per-atom or local values. The values can be scalars or vectors or
@ -257,7 +276,7 @@ without the word "atom" or "local" produce global values.
.. _fix:
Fixes that generate values to output
----------------------------------------------
------------------------------------
Some :doc:`fixes <fix>` in LAMMPS produces either global or per-atom or
local values which can be accessed by other commands. The values can
@ -269,7 +288,7 @@ describes them.
.. _variable:
Variables that generate values to output
-------------------------------------------------------
----------------------------------------
:doc:`Variables <variable>` defined in an input script can store one or
more strings. But equal-style, vector-style, and atom-style or
@ -284,7 +303,7 @@ commands described in this section.
.. _table:
Summary table of output options and data flow between commands
--------------------------------------------------------------------------
--------------------------------------------------------------
This table summarizes the various commands that can be used for
generating output from LAMMPS. Each command produces output data of

View File

@ -11,11 +11,11 @@ angle style of *harmonic* or *charmm* should also be used.
A TIP4P model is run with LAMMPS using either this command
for a cutoff model:
* :doc:`pair_style lj/cut/tip4p/cut <pair_lj>`
* :doc:`pair_style lj/cut/tip4p/cut <pair_lj_cut_tip4p>`
or these two commands for a long-range model:
* :doc:`pair_style lj/cut/tip4p/long <pair_lj>`
* :doc:`pair_style lj/cut/tip4p/long <pair_lj_cut_tip4p>`
* :doc:`kspace_style pppm/tip4p <kspace_style>`
For both models, the bond lengths and bond angles should be held fixed
@ -95,7 +95,7 @@ typically best in an efficiency sense to use a LJ cutoff >= Coulomb
cutoff + 2\*(OM distance), to shrink the size of the neighbor list.
This leads to slightly larger cost for the long-range calculation, so
you can test the trade-off for your model. The OM distance and the LJ
and Coulombic cutoffs are set in the :doc:`pair_style lj/cut/tip4p/long <pair_lj>` command.
and Coulombic cutoffs are set in the :doc:`pair_style lj/cut/tip4p/long <pair_lj_cut_tip4p>` command.
Wikipedia also has a nice article on `water models <http://en.wikipedia.org/wiki/Water_model>`_.

View File

@ -21,8 +21,14 @@ Pre-built Ubuntu Linux executables
A pre-built LAMMPS executable suitable for running on the latest
Ubuntu Linux versions, can be downloaded as a Debian package. This
allows you to install LAMMPS with a single command, and stay
up-to-date with the current version of LAMMPS by simply updating your
operating system.
up-to-date with the current stable version of LAMMPS by simply updating
your operating system. Please note, that the repository below offers
two LAMMPS packages, ``lammps-daily`` and ``lammps-stable``. The
LAMMPS developers recommend to use the ``lammps-stable`` package for
any production simulations. The ``lammps-daily`` package is built
from the LAMMPS development sources, and those versions may have known
issues and bugs when new features are added and the software has not
undergone full release testing.
To install the appropriate personal-package archives (PPAs), do the
following once:
@ -37,16 +43,16 @@ To install LAMMPS do the following once:
.. code-block:: bash
$ sudo apt-get install lammps-daily
$ sudo apt-get install lammps-stable
This downloads an executable named ``lmp_daily`` to your box, which
This downloads an executable named ``lmp_stable`` to your box, which
can then be used in the usual way to run input scripts:
.. code-block:: bash
$ lmp_daily -in in.lj
$ lmp_stable -in in.lj
To update LAMMPS to the most current version, do the following:
To update LAMMPS to the most current stable version, do the following:
.. code-block:: bash
@ -58,25 +64,25 @@ To get a copy of the current documentation and examples:
.. code-block:: bash
$ sudo apt-get install lammps-daily-doc
$ sudo apt-get install lammps-stable-doc
which will download the doc files in
``/usr/share/doc/lammps-daily-doc/doc`` and example problems in
``/usr/share/doc/lammps-stable-doc/doc`` and example problems in
``/usr/share/doc/lammps-doc/examples``.
To get a copy of the current potentials files:
.. code-block:: bash
$ sudo apt-get install lammps-daily-data
$ sudo apt-get install lammps-stable-data
which will download the potentials files to
``/usr/share/lammps-daily/potentials``. The ``lmp_daily`` binary is
``/usr/share/lammps-stable/potentials``. The ``lmp_stable`` binary is
hard-coded to look for potential files in this directory (it does not
use the `LAMMPS_POTENTIALS` environment variable, as described
in :doc:`pair_coeff <pair_coeff>` command).
The ``lmp_daily`` binary is built with the :ref:`KIM package <kim>` which
The ``lmp_stable`` binary is built with the :ref:`KIM package <kim>` which
results in the above command also installing the `kim-api` binaries when LAMMPS
is installed. In order to use potentials from `openkim.org <openkim_>`_, you
can install the `openkim-models` package
@ -89,9 +95,9 @@ To un-install LAMMPS, do the following:
.. code-block:: bash
$ sudo apt-get remove lammps-daily
$ sudo apt-get remove lammps-stable
Please use ``lmp_daily -help`` to see which compilation options, packages,
Please use ``lmp_stable -help`` to see which compilation options, packages,
and styles are included in the binary.
Thanks to Anton Gladky (gladky.anton at gmail.com) for setting up this

View File

@ -306,7 +306,8 @@ gpu" or "-suffix gpu" :doc:`command-line switches <Run_options>`. See
also the :ref:`KOKKOS <PKG-KOKKOS>` package, which has GPU-enabled styles.
**Authors:** Mike Brown (Intel) while at Sandia and ORNL and Trung Nguyen
(Northwestern U) while at ORNL.
(Northwestern U) while at ORNL and later. AMD HIP support by Evgeny
Kuznetsov, Vladimir Stegailov, and Vsevolod Nikolskiy (HSE University).
**Install:**

View File

@ -50,6 +50,10 @@ but this can be overridden using the device option of the :doc:`package <package
command. run lammps/lib/gpu/ocl_get_devices to get a list of available
platforms and devices with a suitable ICD available.
To compute and use this package in HIP mode, you have to have the AMD ROCm
software installed. Versions of ROCm older than 3.5 are currently deprecated
by AMD.
**Building LAMMPS with the GPU package:**
See the :ref:`Build extras <gpu>` doc page for

View File

@ -138,10 +138,10 @@ For Intel Xeon Phi co-processors (Offload):
**Required hardware/software:**
When using Intel compilers version 16.0 or later is required.
In order to use offload to co-processors, an Intel Xeon Phi
co-processor and an Intel compiler are required. For this, the
recommended version of the Intel compiler is 14.0.1.106 or
versions 15.0.2.044 and higher.
co-processor and an Intel compiler are required.
Although any compiler can be used with the USER-INTEL package,
currently, vectorization directives are disabled by default when

View File

@ -49,13 +49,14 @@ The following coefficients must be defined for each angle type via the
the data file or restart files read by the :doc:`read_data <read_data>`
or :doc:`read_restart <read_restart>` commands:
* :math:`K` (energy/radian\^2)
* :math:`K` (energy)
* :math:`\theta_0` (degrees)
* :math:`K_{ub}` (energy/distance\^2)
* :math:`r_{ub}` (distance)
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of :math:`K` are in energy/radian\^2.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to
radians internally; hence :math:`K` is effectively energy per
radian\^2.
----------

View File

@ -41,27 +41,29 @@ The *class2* angle style uses the potential
E_{bb} & = M (r_{ij} - r_1) (r_{jk} - r_2) \\
E_{ba} & = N_1 (r_{ij} - r_1) (\theta - \theta_0) + N_2(r_{jk} - r_2)(\theta - \theta_0)
where :math:`E_a` is the angle term, :math:`E_{bb}` is a bond-bond term, and :math:`E_{ba}` is a
bond-angle term. :math:`\theta_0` is the equilibrium angle and :math:`r_1` and :math:`r_2` are
the equilibrium bond lengths.
where :math:`E_a` is the angle term, :math:`E_{bb}` is a bond-bond
term, and :math:`E_{ba}` is a bond-angle term. :math:`\theta_0` is
the equilibrium angle and :math:`r_1` and :math:`r_2` are the
equilibrium bond lengths.
See :ref:`(Sun) <angle-Sun>` for a description of the COMPASS class2 force field.
Coefficients for the :math:`E_a`, :math:`E_{bb}`, and :math:`E_{ba}` formulas must be defined for
each angle type via the :doc:`angle_coeff <angle_coeff>` command as in
the example above, or in the data file or restart files read by the
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>`
commands.
Coefficients for the :math:`E_a`, :math:`E_{bb}`, and :math:`E_{ba}`
formulas must be defined for each angle type via the :doc:`angle_coeff
<angle_coeff>` command as in the example above, or in the data file or
restart files read by the :doc:`read_data <read_data>` or
:doc:`read_restart <read_restart>` commands.
These are the 4 coefficients for the :math:`E_a` formula:
* :math:`\theta_0` (degrees)
* :math:`K_2` (energy/radian\^2)
* :math:`K_3` (energy/radian\^3)
* :math:`K_4` (energy/radian\^4)
* :math:`K_2` (energy)
* :math:`K_3` (energy)
* :math:`K_4` (energy)
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of the various :math:`K` are in per-radian.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to
radians internally; hence the various :math:`K` are effectively energy
per radian\^2 or radian\^3 or radian\^4.
For the :math:`E_{bb}` formula, each line in a :doc:`angle_coeff <angle_coeff>`
command in the input script lists 4 coefficients, the first of which
@ -122,11 +124,15 @@ The *class2/p6* angle style uses the *class2* potential expanded to sixth order:
In this expanded term 6 coefficients for the :math:`E_a` formula need to be set:
* :math:`\theta_0` (degrees)
* :math:`K_2` (energy/radian\^2)
* :math:`K_3` (energy/radian\^3)
* :math:`K_4` (energy/radian\^4)
* :math:`K_5` (energy/radian\^5)
* :math:`K_6` (energy/radian\^6)
* :math:`K_2` (energy)
* :math:`K_3` (energy)
* :math:`K_4` (energy)
* :math:`K_5` (energy)
* :math:`K_6` (energy)
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to
radians internally; hence the various :math:`K` are effectively energy
per radian\^2 or radian\^3 or radian\^4 or radian\^5 or radian\^6.
The bond-bond and bond-angle terms remain unchanged.

View File

@ -40,14 +40,15 @@ the data file or restart files read by the :doc:`read_data <read_data>`
or :doc:`read_restart <read_restart>` commands:
* :math:`K_{SS}` (energy/distance\^2)
* :math:`K_{BS0}` (energy/distance/rad)
* :math:`K_{BS1}` (energy/distance/rad)
* :math:`K_{BS0}` (energy/distance)
* :math:`K_{BS1}` (energy/distance)
* :math:`r_{12,0}` (distance)
* :math:`r_{32,0}` (distance)
* :math:`\theta_0` (degrees)
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of :math:`K_{BS0}` and :math:`K_{BS1}` are in energy/distance/radian.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to
radians internally; hence the :math:`K_{BS0}` and :math:`K_{BS1}` are
effectively energy/distance per radian.
Restrictions
""""""""""""

View File

@ -44,11 +44,12 @@ The following coefficients must be defined for each angle type via the
the data file or restart files read by the :doc:`read_data <read_data>`
or :doc:`read_restart <read_restart>` commands:
* :math:`K` (energy/radian\^2)
* :math:`K` (energy)
* :math:`\theta_0` (degrees)
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of :math:`K` are in energy/radian\^2.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to
radians internally; hence :math:`K` is effectively energy per
radian\^2.
----------
@ -61,11 +62,13 @@ 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.

View File

@ -28,20 +28,22 @@ as defined in :ref:`(Allinger) <mm3-allinger1989>`
E = K (\theta - \theta_0)^2 \left[ 1 - 0.014(\theta - \theta_0) + 5.6(10)^{-5} (\theta - \theta_0)^2 - 7.0(10)^{-7} (\theta - \theta_0)^3 + 9(10)^{-10} (\theta - \theta_0)^4 \right]
where :math:`\theta_0` is the equilibrium value of the angle, and :math:`K` is a
prefactor. The anharmonic prefactors have units :math:`\deg^{-n}`, for example
:math:`-0.014 \deg^{-1}`, :math:`5.6 \cdot 10^{-5} \deg^{-2}`, ...
where :math:`\theta_0` is the equilibrium value of the angle, and
:math:`K` is a prefactor. The anharmonic prefactors have units
:math:`\deg^{-n}`, for example :math:`-0.014 \deg^{-1}`, :math:`5.6
\cdot 10^{-5} \deg^{-2}`, ...
The following coefficients must be defined for each angle type via the
:doc:`angle_coeff <angle_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read_data <read_data>`
or :doc:`read_restart <read_restart>` commands:
* :math:`K` (energy/radian\^2)
* :math:`K` (energy)
* :math:`\theta_0` (degrees)
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of :math:`K` are in energy/radian\^2.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to
radians internally; hence :math:`K` is effectively energy per
radian\^2.
Restrictions
""""""""""""

View File

@ -39,12 +39,13 @@ the data file or restart files read by the :doc:`read_data <read_data>`
or :doc:`read_restart <read_restart>` commands:
* :math:`\theta_0` (degrees)
* :math:`K_2` (energy/radian\^2)
* :math:`K_3` (energy/radian\^3)
* :math:`K_4` (energy/radian\^4)
* :math:`K_2` (energy)
* :math:`K_3` (energy)
* :math:`K_4` (energy)
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of :math:`K` are in energy/radian\^2.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to
radians internally; hence the various :math:`K` are effectively energy
per radian\^2 or radian\^3 or radian\^4.
----------

View File

@ -44,13 +44,15 @@ is included in :math:`K`.
The following coefficients must be defined for each angle type via the
:doc:`angle_coeff <angle_coeff>` command as in the example above:
* :math:`K` (energy/radian\^2)
* :math:`K` (energy)
* :math:`\theta_0` (degrees)
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of :math:`K` are in energy/radian\^2.
The also required *lj/sdk* parameters will be extracted automatically
from the pair_style.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to
radians internally; hence :math:`K` is effectively energy per
radian\^2.
The required *lj/sdk* parameters are extracted automatically from the
pair_style.
----------
@ -63,7 +65,8 @@ 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

View File

@ -88,7 +88,8 @@ Commands
region
replicate
rerun
reset_ids
reset_atom_ids
reset_mol_ids
reset_timestep
restart
run

View File

@ -225,6 +225,7 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` doc
* :doc:`ke/atom/eff <compute_ke_atom_eff>` - per-atom translational and radial kinetic energy in the electron force field model
* :doc:`ke/eff <compute_ke_eff>` - kinetic energy of a group of nuclei and electrons in the electron force field model
* :doc:`ke/rigid <compute_ke_rigid>` - translational kinetic energy of rigid bodies
* :doc:`mliap <compute_mliap>` - gradients of energy and forces w.r.t. model parameters and related quantities for training machine learning interatomic potentials
* :doc:`momentum <compute_momentum>` - translational momentum
* :doc:`msd <compute_msd>` - mean-squared displacement of group of atoms
* :doc:`msd/chunk <compute_msd_chunk>` - mean-squared displacement for each chunk
@ -268,12 +269,13 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` doc
* :doc:`smd/tlsph/strain/rate <compute_smd_tlsph_strain_rate>` -
* :doc:`smd/tlsph/stress <compute_smd_tlsph_stress>` - per-particle Cauchy stress tensor for SPH particles
* :doc:`smd/triangle/vertices <compute_smd_triangle_vertices>` -
* :doc:`smd/ulsph/effm <compute_smd_ulsph_effm>` - per-particle effective shear modulus
* :doc:`smd/ulsph/num/neighs <compute_smd_ulsph_num_neighs>` -
* :doc:`smd/ulsph/strain <compute_smd_ulsph_strain>` -
* :doc:`smd/ulsph/strain/rate <compute_smd_ulsph_strain_rate>` -
* :doc:`smd/ulsph/stress <compute_smd_ulsph_stress>` - per-particle Cauchy stress tensor and von Mises equivalent stress in Smooth Mach Dynamics
* :doc:`smd/vol <compute_smd_vol>` - per-particle volumes and their sum in Smooth Mach Dynamics
* :doc:`snap <compute_sna_atom>` - bispectrum components and related quantities for a group of atoms
* :doc:`snap <compute_sna_atom>` - gradients of SNAP energy and forces w.r.t. linear coefficients and related quantities for fitting SNAP potentials
* :doc:`sna/atom <compute_sna_atom>` - bispectrum components for each atom
* :doc:`snad/atom <compute_sna_atom>` - derivative of bispectrum components for each atom
* :doc:`snav/atom <compute_sna_atom>` - virial contribution from bispectrum components for each atom

View File

@ -622,14 +622,16 @@ cylinder, x for a y-axis cylinder, and x for a z-axis cylinder.
**Output info:**
This compute calculates a per-atom vector, which can be accessed by
any command that uses per-atom values from a compute as input. See
the :doc:`Howto output <Howto_output>` doc page for an overview of
This compute calculates a per-atom vector (the chunk ID), which can
be accessed by any command that uses per-atom values from a compute
as input. It also calculates a global scalar (the number of chunks),
which can be similarly accessed everywhere outside of a per-atom context.
See the :doc:`Howto output <Howto_output>` doc page for an overview of
LAMMPS output options.
The per-atom vector values are unitless chunk IDs, ranging from 1 to
*Nchunk* (inclusive) for atoms assigned to chunks, and 0 for atoms not
belonging to a chunk.
belonging to a chunk. The scalar contains the value of *Nchunk*.
Restrictions
""""""""""""

View File

@ -15,12 +15,18 @@ Syntax
.. parsed-literal::
compute ID group-ID cluster/atom cutoff
compute ID group-ID fragment/atom
compute ID group-ID fragment/atom keyword value ...
compute ID group-ID aggregate/atom cutoff
* ID, group-ID are documented in :doc:`compute <compute>` command
* *cluster/atom* or *fragment/atom* or *aggregate/atom* = style name of this compute command
* cutoff = distance within which to label atoms as part of same cluster (distance units)
* zero or more keyword/value pairs may be appended to *fragment/atom*
* keyword = *single*
.. parsed-literal::
*single* value = *yes* or *no* to treat single atoms (no bonds) as fragments
Examples
""""""""
@ -29,27 +35,36 @@ Examples
compute 1 all cluster/atom 3.5
compute 1 all fragment/atom
compute 1 all fragment/atom single no
compute 1 all aggregate/atom 3.5
Description
"""""""""""
Define a computation that assigns each atom a cluster, fragment,
or aggregate ID.
Define a computation that assigns each atom a cluster, fragment, or
aggregate ID. Only atoms in the compute group are clustered and
assigned cluster IDs. Atoms not in the compute group are assigned an
ID = 0.
A cluster is defined as a set of atoms, each of which is within the
cutoff distance from one or more other atoms in the cluster. If an
atom has no neighbors within the cutoff distance, then it is a 1-atom
cluster.
A fragment is similarly defined as a set of atoms, each of
which has an explicit bond (i.e. defined via a :doc:`data file <read_data>`,
the :doc:`create_bonds <create_bonds>` command, or through fixes like
:doc:`fix bond/create <fix_bond_create>`, :doc:`fix bond/swap <fix_bond_swap>`,
or :doc:`fix bond/break <fix_bond_break>`). The cluster ID or fragment ID
of every atom in the cluster will be set to the smallest atom ID of any atom
in the cluster or fragment, respectively.
A fragment is similarly defined as a set of atoms, each of which has a
bond to another atom in the fragment. Bonds can be defined initially
via the :doc:`data file <read_data>` or :doc:`create_bonds
<create_bonds>` commands, or dynamically by fixes which create or
break bonds like :doc:`fix bond/react <fix_bond_react>`, :doc:`fix
bond/create <fix_bond_create>`, :doc:`fix bond/swap <fix_bond_swap>`,
or :doc:`fix bond/break <fix_bond_break>`. The cluster ID or fragment
ID of every atom in the cluster will be set to the smallest atom ID of
any atom in the cluster or fragment, respectively.
For the *fragment/atom* style, the *single* keyword determines whether
single atoms (not bonded to another atom) are treated as one-atom
fragments or not, based on the *yes* or *no* setting. If the setting
is *no* (the default), their fragment IDs are set to 0.
An aggregate is defined by combining the rules for clusters and
fragments, i.e. a set of atoms, where each of it is within the cutoff
@ -57,19 +72,11 @@ distance from one or more atoms within a fragment that is part of
the same cluster. This measure can be used to track molecular assemblies
like micelles.
Only atoms in the compute group are clustered and assigned cluster
IDs. Atoms not in the compute group are assigned a cluster ID = 0.
For fragments, only bonds where **both** atoms of the bond are included
in the compute group are assigned to fragments, so that only fragments
are detected where **all** atoms are in the compute group. Thus atoms
may be included in the compute group, yes still have a fragment ID of 0.
For computes *cluster/atom* and *aggregate/atom* the neighbor list needed
to compute this quantity is constructed each time the calculation is
performed (i.e. each time a snapshot of atoms is dumped). Thus it can be
inefficient to compute/dump this quantity too frequently or to have
multiple compute/dump commands, each of a *cluster/atom* or
*aggregate/atom* style.
For computes *cluster/atom* and *aggregate/atom* a neighbor list
needed to compute cluster IDs is constructed each time the compute is
invoked. Thus it can be inefficient to compute/dump this quantity too
frequently or to have multiple *cluster/atom* or *aggregate/atom*
style computes.
.. note::
@ -89,6 +96,14 @@ multiple compute/dump commands, each of a *cluster/atom* or
:doc:`special_bonds <special_bonds>` command that includes all pairs in
the neighbor list.
.. note::
For the compute fragment/atom style, each fragment is identified
using the current bond topology. This will not account for bonds
broken by the :doc:`bond_style quartic <bond_quartic>` command
because it does not perform a full update of the bond topology data
structures within LAMMPS.
**Output info:**
This compute calculates a per-atom vector, which can be accessed by
@ -107,4 +122,7 @@ Related commands
:doc:`compute coord/atom <compute_coord_atom>`
**Default:** none
**Default:**
The default for fragment/atom is single no.

View File

@ -160,63 +160,63 @@ pair styles and parameters that can be used with this compute. See
the doc pages for individual pair styles and their energy formulas for
the meaning of these parameters:
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`born <pair_born>` | a,b,c | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`buck <pair_buck>` | a,c | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`buck/mdf <pair_mdf>` | a,c | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/cut <pair_coul>` | scale | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/cut/soft <pair_fep_soft>` | lambda | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/long, coul/msm <pair_coul>` | scale | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/long/soft <pair_fep_soft>` | scale, lambda | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`eam <pair_eam>` | scale | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`gauss <pair_gauss>` | a | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lennard/mdf <pair_mdf>` | a,b | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/class2 <pair_class2>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/class2/coul/cut, lj/class2/coul/long <pair_class2>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut <pair_lj>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/soft <pair_fep_soft>` | epsilon,sigma,lambda | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/coul/cut, lj/cut/coul/long, lj/cut/coul/msm <pair_lj>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/coul/cut/soft, lj/cut/coul/long/soft <pair_fep_soft>` | epsilon,sigma,lambda | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/tip4p/cut, lj/cut/tip4p/long <pair_lj>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/tip4p/long/soft <pair_fep_soft>` | epsilon,sigma,lambda | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/expand <pair_lj_expand>` | epsilon,sigma,delta | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/mdf <pair_mdf>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/sf/dipole/sf <pair_dipole>` | epsilon,sigma,scale | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`mie/cut <pair_mie>` | epsilon,sigma,gamR,gamA | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`morse, morse/smooth/linear <pair_morse>` | d0,r0,alpha | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`morse/soft <pair_morse>` | d0,r0,alpha,lambda | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`nm/cut <pair_nm>` | e0,r0,nn,mm | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`nm/cut/coul/cut, nm/cut/coul/long <pair_nm>` | e0,r0,nn,mm | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`ufm <pair_ufm>` | epsilon,sigma,scale | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`soft <pair_soft>` | a | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`born <pair_born>` | a,b,c | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`buck <pair_buck>` | a,c | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`buck/mdf <pair_mdf>` | a,c | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/cut <pair_coul>` | scale | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/cut/soft <pair_fep_soft>` | lambda | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/long, coul/msm <pair_coul>` | scale | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/long/soft <pair_fep_soft>` | scale, lambda | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`eam <pair_eam>` | scale | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`gauss <pair_gauss>` | a | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lennard/mdf <pair_mdf>` | a,b | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/class2 <pair_class2>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/class2/coul/cut, lj/class2/coul/long <pair_class2>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut <pair_lj>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/soft <pair_fep_soft>` | epsilon,sigma,lambda | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/coul/cut, lj/cut/coul/long, lj/cut/coul/msm <pair_lj_cut_coul>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/coul/cut/soft, lj/cut/coul/long/soft <pair_fep_soft>` | epsilon,sigma,lambda | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/tip4p/cut, lj/cut/tip4p/long <pair_lj_cut_tip4p>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/tip4p/long/soft <pair_fep_soft>` | epsilon,sigma,lambda | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/expand <pair_lj_expand>` | epsilon,sigma,delta | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/mdf <pair_mdf>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/sf/dipole/sf <pair_dipole>` | epsilon,sigma,scale | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`mie/cut <pair_mie>` | epsilon,sigma,gamR,gamA | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`morse, morse/smooth/linear <pair_morse>` | d0,r0,alpha | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`morse/soft <pair_morse>` | d0,r0,alpha,lambda | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`nm/cut <pair_nm>` | e0,r0,nn,mm | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`nm/cut/coul/cut, nm/cut/coul/long <pair_nm>` | e0,r0,nn,mm | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`ufm <pair_ufm>` | epsilon,sigma,scale | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`soft <pair_soft>` | a | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
Note that it is easy to add new potentials and their parameters to
this list. All it typically takes is adding an extract() method to

170
doc/src/compute_mliap.rst Normal file
View File

@ -0,0 +1,170 @@
.. index:: compute mliap
compute mliap command
=====================
Syntax
""""""
.. code-block:: LAMMPS
compute ID group-ID mliap ... keyword values ...
* ID, group-ID are documented in :doc:`compute <compute>` command
* mliap = style name of this compute command
* two keyword/value pairs must be appended
* keyword = *model* or *descriptor*
.. parsed-literal::
*model* values = style Nelems Nparams
style = *linear* or *quadratic*
Nelems = number of elements
Nparams = number of parameters per element
*descriptor* values = style filename
style = *sna*
filename = name of file containing descriptor definitions
Examples
""""""""
.. code-block:: LAMMPS
compute mliap model linear 2 31 descriptor sna Ta06A.mliap.descriptor
Description
"""""""""""
Compute style *mliap* provides a general interface to the gradient
of machine-learning interatomic potentials w.r.t. model parameters.
It is used primarily for calculating the gradient of energy, force, and
stress components w.r.t. model parameters, which is useful when training
:doc:`mliap pair_style <pair_mliap>` models to match target data.
It provides separate
definitions of the interatomic potential functional form (*model*)
and the geometric quantities that characterize the atomic positions
(*descriptor*). By defining *model* and *descriptor* separately,
it is possible to use many different models with a given descriptor,
or many different descriptors with a given model. Currently, the
compute supports just two models, *linear* and *quadratic*,
and one descriptor, *sna*, the SNAP descriptor used by
:doc:`pair_style snap <pair_snap>`, including the linear, quadratic,
and chem variants. Work is currently underway to extend
the interface to handle neural network energy models,
and it is also straightforward to add new descriptor styles.
The compute *mliap* command must be followed by two keywords
*model* and *descriptor* in either order.
The *model* keyword is followed by a model style, currently limited to
either *linear* or *quadratic*. In both cases,
this is followed by two arguments. *nelems* is the number of elements.
It must be equal to the number of LAMMPS atom types. *nparams*
is the number of parameters per element for this model i.e.
the number of parameter gradients for each element. Note these definitions
are identical to those of *nelems* and *nparams* in the
:doc:`pair_style mliap <pair_mliap>` model file.
The *descriptor* keyword is followed by a descriptor style, and additional arguments.
Currently the only descriptor style is *sna*, indicating the bispectrum component
descriptors used by the Spectral Neighbor Analysis Potential (SNAP) potentials of
:doc:`pair_style snap <pair_snap>`.
The \'p\' in SNAP is dropped, because keywords that match pair_styles are silently stripped
out by the LAMMPS command parser. A single additional argument specifies the descriptor filename
containing the parameters and setting used by the SNAP descriptor.
The descriptor filename usually ends in the *.mliap.descriptor* extension.
The format of this file is identical to the descriptor file in the
:doc:`pair_style mliap <pair_mliap>`, and is described in detail
there.
.. note::
The number of LAMMPS atom types (and the value of *nelems* in the model)
must match the value of *nelems* in the descriptor file.
Compute *mliap* calculates a global array containing gradient information.
The number of columns in the array is :math:`nelems \times nparams + 1`.
The first row of the array contain the derivative of potential energy w.r.t. to
each parameter and each element. The last six rows
of the array contain the corresponding derivatives of the
virial stress tensor, listed in Voigt notation: *pxx*, *pyy*, *pzz*,
*pyz*, *pxz*, *pxy*. In between the energy and stress rows are
the 3\*\ *N* rows containing the derivatives of the force components.
See section below on output for a detailed description of how
rows and columns are ordered.
The element in the last column of each row contains
the potential energy, force, or stress, according to the row.
These quantities correspond to the user-specified reference potential
that must be subtracted from the target data when training a model.
The potential energy calculation uses the built in compute *thermo_pe*.
The stress calculation uses a compute called *mliap_press* that is
automatically created behind the scenes, according to the following
command:
.. code-block:: LAMMPS
compute mliap_press all pressure NULL virial
See section below on output for a detailed explanation of the data
layout in the global array.
Atoms not in the group do not contribute to this compute.
Neighbor atoms not in the group do not contribute to this compute.
The neighbor list needed to compute this quantity is constructed each
time the calculation is performed (i.e. each time a snapshot of atoms
is dumped). Thus it can be inefficient to compute/dump this quantity
too frequently.
.. note::
If the user-specified reference potentials includes bonded and
non-bonded pairwise interactions, then the settings of
:doc:`special_bonds <special_bonds>` command can remove pairwise
interactions between atoms in the same bond, angle, or dihedral. This
is the default setting for the :doc:`special_bonds <special_bonds>`
command, and means those pairwise interactions do not appear in the
neighbor list. Because this fix uses the neighbor list, it also means
those pairs will not be included in the calculation. The :doc:`rerun <rerun>`
command is not an option here, since the reference potential is required
for the last column of the global array. A work-around is to prevent
pairwise interactions from being removed by explicitly adding a
*tiny* positive value for every pairwise interaction that would otherwise be
set to zero in the :doc:`special_bonds <special_bonds>` command.
----------
**Output info:**
Compute *mliap* evaluates a global array.
The columns are arranged into
*nelems* blocks, listed in order of element *I*\ . Each block
contains one column for each of the *nparams* model parameters.
A final column contains the corresponding energy, force component
on an atom, or virial stress component. The rows of the array appear
in the following order:
* 1 row: Derivatives of potential energy w.r.t. each parameter of each element.
* 3\*\ *N* rows: Derivatives of force components. x, y, and z components of force on atom *i* appearing in consecutive rows. The atoms are sorted based on atom ID.
* 6 rows: Derivatives of virial stress tensor w.r.t. each parameter of each element. The ordering of the rows follows Voigt notation: *pxx*, *pyy*, *pzz*, *pyz*, *pxz*, *pxy*.
These values can be accessed by any command that uses a global array
from a compute as input. See the :doc:`Howto output <Howto_output>` doc
page for an overview of LAMMPS output options. To see how this command
can be used within a Python workflow to train machine-learning interatomic
potentials, see the examples in `FitSNAP <https://github.com/FitSNAP/FitSNAP>`_.
Restrictions
""""""""""""
This compute is part of the MLIAP package. It is only enabled if
LAMMPS was built with that package. In addition, building LAMMPS with the MLIAP package
requires building LAMMPS with the SNAP package.
See the :doc:`Build package <Build_package>` doc page for more info.
Related commands
""""""""""""""""
:doc:`pair_style mliap <pair_mliap>`
**Default:** none

View File

@ -0,0 +1,56 @@
.. index:: compute smd/ulsph/effm
compute smd/ulsph/effm command
================================
Syntax
""""""
.. code-block:: LAMMPS
compute ID group-ID smd/ulsph/effm
* ID, group-ID are documented in :doc:`compute <compute>` command
* smd/ulsph/effm = style name of this compute command
Examples
""""""""
.. code-block:: LAMMPS
compute 1 all smd/ulsph/effm
Description
"""""""""""
Define a computation that outputs the effective shear modulus for
particles interacting via the updated Lagrangian SPH pair style.
See `this PDF guide <PDF/SMD_LAMMPS_userguide.pdf>`_ to using Smooth
Mach Dynamics in LAMMPS.
**Output info:**
This compute calculates a per-particle vector, which can be accessed
by any command that uses per-particle values from a compute as input.
See the :doc:`Howto output <Howto_output>` doc page for an overview of
LAMMPS output options.
The per-particle vector contains the current effective per atom shear
modulus as computed by the :doc:`pair smd/ulsph <pair_smd_ulsph>` pair
style.
Restrictions
""""""""""""
This compute is part of the USER-SMD 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 compute can
only be used for particles which interact with the updated Lagrangian
SPH pair style.
Related commands
""""""""""""""""
:doc:`pair smd/ulsph <pair_smd_ulsph>`
**Default:** none

View File

@ -391,7 +391,9 @@ of :math:`K N_{elem}^3` columns.
These values can be accessed by any command that uses per-atom values
from a compute as input. See the :doc:`Howto output <Howto_output>` doc
page for an overview of LAMMPS output options.
page for an overview of LAMMPS output options. To see how this command
can be used within a Python workflow to train SNAP potentials,
see the examples in `FitSNAP <https://github.com/FitSNAP/FitSNAP>`_.
Restrictions
""""""""""""

View File

@ -89,7 +89,7 @@ number of atoms in the system. Note that this is not done for
molecular systems (see the :doc:`atom_style <atom_style>` command),
regardless of the *compress* setting, since it would foul up the bond
connectivity that has already been assigned. However, the
:doc:`reset_ids <reset_ids>` command can be used after this command to
:doc:`reset_atom_ids <reset_atom_ids>` command can be used after this command to
accomplish the same thing.
Note that the re-assignment of IDs is not really a compression, where
@ -157,7 +157,7 @@ using molecule template files via the :doc:`molecule <molecule>` and
Related commands
""""""""""""""""
:doc:`create_atoms <create_atoms>`, :doc:`reset_ids <reset_ids>`
:doc:`create_atoms <create_atoms>`, :doc:`reset_atom_ids <reset_atom_ids>`
Default
"""""""

View File

@ -111,34 +111,34 @@ be listed under a *AngleTorsion Coeffs* heading and you must leave out
the *at*, i.e. only list 8 coefficients after the dihedral type.
* *at*
* :math:`D_1` (energy/radian)
* :math:`D_2` (energy/radian)
* :math:`D_3` (energy/radian)
* :math:`E_1` (energy/radian)
* :math:`E_2` (energy/radian)
* :math:`E_3` (energy/radian)
* :math:`D_1` (energy)
* :math:`D_2` (energy)
* :math:`D_3` (energy)
* :math:`E_1` (energy)
* :math:`E_2` (energy)
* :math:`E_3` (energy)
* :math:`\theta_1` (degrees)
* :math:`\theta_2` (degrees)
:math:`\theta_1` and :math:`\theta_2` are specified in degrees, but LAMMPS converts
them to radians internally; hence the units of :math:`D` and :math:`E` are in
energy/radian.
:math:`\theta_1` and :math:`\theta_2` are specified in degrees, but
LAMMPS converts them to radians internally; hence the various
:math:`D` and :math:`E` are effectively energy per radian.
For the :math:`E_{aat}` formula, each line in a
:doc:`dihedral_coeff <dihedral_coeff>` command in the input script lists
4 coefficients, the first of which is *aat* to indicate they are
AngleAngleTorsion coefficients. In a data file, these coefficients
should be listed under a *AngleAngleTorsion Coeffs* heading and you
must leave out the *aat*, i.e. only list 3 coefficients after the
dihedral type.
For the :math:`E_{aat}` formula, each line in a :doc:`dihedral_coeff
<dihedral_coeff>` command in the input script lists 4 coefficients,
the first of which is *aat* to indicate they are AngleAngleTorsion
coefficients. In a data file, these coefficients should be listed
under a *AngleAngleTorsion Coeffs* heading and you must leave out the
*aat*, i.e. only list 3 coefficients after the dihedral type.
* *aat*
* :math:`M` (energy/radian\^2)
* :math:`M` (energy)
* :math:`\theta_1` (degrees)
* :math:`\theta_2` (degrees)
:math:`\theta_1` and :math:`\theta_2` are specified in degrees, but LAMMPS converts
them to radians internally; hence the units of M are in energy/radian\^2.
:math:`\theta_1` and :math:`\theta_2` are specified in degrees, but
LAMMPS converts them to radians internally; hence :math:`M` is
effectively energy per radian\^2.
For the :math:`E_{bb13}` formula, each line in a
:doc:`dihedral_coeff <dihedral_coeff>` command in the input script lists

View File

@ -39,9 +39,13 @@ above, or in the data file or restart files read by the
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>`
commands:
* :math:`K` (energy/radian\^2)
* :math:`K` (energy)
* :math:`\phi_0` (degrees)
:math:`\phi_0` is specified in degrees, but LAMMPS converts it to
radians internally; hence :math:`K` is effectively energy per
radian\^2.
----------
Styles with a *gpu*\ , *intel*\ , *kk*\ , *omp*\ , or *opt* suffix are

View File

@ -123,87 +123,85 @@ current list of pair styles and parameters that can be varied by this
fix. See the doc pages for individual pair styles and their energy
formulas for the meaning of these parameters:
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`born <pair_born>` | a,b,c | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`born/coul/long, born/coul/msm <pair_born>` | coulombic_cutoff | type global |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`buck <pair_buck>` | a,c | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`buck/coul/long, buck/coul/msm <pair_buck>` | coulombic_cutoff | type global |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`buck/mdf <pair_mdf>` | a,c | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`coul/cut <pair_coul>` | scale | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`coul/cut/soft <pair_fep_soft>` | lambda | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`coul/debye <pair_coul>` | scale | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`coul/dsf <pair_coul>` | coulombic_cutoff | type global |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`coul/long, coul/msm <pair_coul>` | coulombic_cutoff, scale | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`coul/long/soft <pair_fep_soft>` | scale, lambda, coulombic_cutoff | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`eam, eam/alloy, eam/fs <pair_eam>` | scale | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`gauss <pair_gauss>` | a | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lennard/mdf <pair_mdf>` | A,B | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/class2 <pair_class2>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/class2/coul/cut, lj/class2/coul/long <pair_class2>` | epsilon,sigma,coulombic_cutoff | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/cut <pair_lj>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/cut/coul/cut, lj/cut/coul/long, lj/cut/coul/msm <pair_lj>` | epsilon,sigma,coulombic_cutoff | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/cut/coul/cut/soft, lj/cut/coul/long/soft <pair_fep_soft>` | epsilon,sigma,lambda,coulombic_cutoff | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/cut/coul/dsf <pair_lj>` | cutoff | type global |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/cut/tip4p/cut <pair_lj>` | epsilon,sigma,coulombic_cutoff | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/cut/soft <pair_fep_soft>` | epsilon,sigma,lambda | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/expand <pair_lj_expand>` | epsilon,sigma,delta | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/mdf <pair_mdf>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/sf/dipole/sf <pair_dipole>` | epsilon,sigma,scale | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lubricate <pair_lubricate>` | mu | global |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`mie/cut <pair_mie>` | epsilon,sigma,gamma_repulsive,gamma_attractive | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`morse, morse/smooth/linear <pair_morse>` | D0,R0,alpha | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`morse/soft <pair_morse>` | D0,R0,alpha,lambda | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`nm/cut <pair_nm>` | E0,R0,m,n | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`nm/cut/coul/cut, nm/cut/coul/long <pair_nm>` | E0,R0,m,n,coulombic_cutoff | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`reax/c <pair_reaxc>` | chi, eta, gamma | type global |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`spin/dmi <pair_spin_dmi>` | coulombic_cutoff | type global |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`spin/exchange <pair_spin_exchange>` | coulombic_cutoff | type global |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`spin/magelec <pair_spin_magelec>` | coulombic_cutoff | type global |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`spin/neel <pair_spin_neel>` | coulombic_cutoff | type global |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`table <pair_table>` | table_cutoff | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`ufm <pair_ufm>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`soft <pair_soft>` | a | type pairs |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
| | | |
+---------------------------------------------------------------------+--------------------------------------------------+-------------+
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`born <pair_born>` | a,b,c | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`born/coul/long, born/coul/msm <pair_born>` | coulombic_cutoff | type global |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`buck <pair_buck>` | a,c | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`buck/coul/long, buck/coul/msm <pair_buck>` | coulombic_cutoff | type global |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`buck/mdf <pair_mdf>` | a,c | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`coul/cut <pair_coul>` | scale | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`coul/cut/soft <pair_fep_soft>` | lambda | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`coul/debye <pair_coul>` | scale | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`coul/dsf <pair_coul>` | coulombic_cutoff | type global |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`coul/long, coul/msm <pair_coul>` | coulombic_cutoff, scale | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`coul/long/soft <pair_fep_soft>` | scale, lambda, coulombic_cutoff | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`eam, eam/alloy, eam/fs <pair_eam>` | scale | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`gauss <pair_gauss>` | a | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lennard/mdf <pair_mdf>` | A,B | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/class2 <pair_class2>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/class2/coul/cut, lj/class2/coul/long <pair_class2>` | epsilon,sigma,coulombic_cutoff | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/cut <pair_lj>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/cut/coul/cut, lj/cut/coul/long, lj/cut/coul/msm <pair_lj_cut_coul>` | epsilon,sigma,coulombic_cutoff | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/cut/coul/cut/soft, lj/cut/coul/long/soft <pair_fep_soft>` | epsilon,sigma,lambda,coulombic_cutoff | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/cut/coul/dsf <pair_lj_cut_coul>` | cutoff | type global |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/cut/tip4p/cut <pair_lj_cut_tip4p>` | epsilon,sigma,coulombic_cutoff | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/cut/soft <pair_fep_soft>` | epsilon,sigma,lambda | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/expand <pair_lj_expand>` | epsilon,sigma,delta | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/mdf <pair_mdf>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lj/sf/dipole/sf <pair_dipole>` | epsilon,sigma,scale | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`lubricate <pair_lubricate>` | mu | global |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`mie/cut <pair_mie>` | epsilon,sigma,gamma_repulsive,gamma_attractive | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`morse, morse/smooth/linear <pair_morse>` | D0,R0,alpha | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`morse/soft <pair_morse>` | D0,R0,alpha,lambda | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`nm/cut <pair_nm>` | E0,R0,m,n | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`nm/cut/coul/cut, nm/cut/coul/long <pair_nm>` | E0,R0,m,n,coulombic_cutoff | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`reax/c <pair_reaxc>` | chi, eta, gamma | type global |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`spin/dmi <pair_spin_dmi>` | coulombic_cutoff | type global |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`spin/exchange <pair_spin_exchange>` | coulombic_cutoff | type global |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`spin/magelec <pair_spin_magelec>` | coulombic_cutoff | type global |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`spin/neel <pair_spin_neel>` | coulombic_cutoff | type global |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`table <pair_table>` | table_cutoff | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`ufm <pair_ufm>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`soft <pair_soft>` | a | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
.. note::

View File

@ -117,63 +117,63 @@ change. This is the current list of pair styles and parameters that
can be varied by this fix. See the doc pages for individual pair
styles and their energy formulas for the meaning of these parameters:
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`born <pair_born>` | a,b,c | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`buck <pair_buck>` | a,c | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`buck/mdf <pair_mdf>` | a,c | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/cut <pair_coul>` | scale | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/cut/soft <pair_fep_soft>` | lambda | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/long, coul/msm <pair_coul>` | scale | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/long/soft <pair_fep_soft>` | scale, lambda | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`eam <pair_eam>` | scale | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`gauss <pair_gauss>` | a | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lennard/mdf <pair_mdf>` | a,b | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/class2 <pair_class2>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/class2/coul/cut, lj/class2/coul/long <pair_class2>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut <pair_lj>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/soft <pair_fep_soft>` | epsilon,sigma,lambda | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/coul/cut, lj/cut/coul/long, lj/cut/coul/msm <pair_lj>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/coul/cut/soft, lj/cut/coul/long/soft <pair_fep_soft>` | epsilon,sigma,lambda | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/tip4p/cut, lj/cut/tip4p/long <pair_lj>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/tip4p/long/soft <pair_fep_soft>` | epsilon,sigma,lambda | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/expand <pair_lj_expand>` | epsilon,sigma,delta | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/mdf <pair_mdf>` | epsilon,sigma | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/sf/dipole/sf <pair_dipole>` | epsilon,sigma,scale | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`mie/cut <pair_mie>` | epsilon,sigma,gamR,gamA | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`morse, morse/smooth/linear <pair_morse>` | d0,r0,alpha | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`morse/soft <pair_morse>` | d0,r0,alpha,lambda | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`nm/cut <pair_nm>` | e0,r0,nn,mm | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`nm/cut/coul/cut, nm/cut/coul/long <pair_nm>` | e0,r0,nn,mm | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`ufm <pair_ufm>` | epsilon,sigma,scale | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
| :doc:`soft <pair_soft>` | a | type pairs |
+---------------------------------------------------------------------+-------------------------+------------+
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`born <pair_born>` | a,b,c | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`buck <pair_buck>` | a,c | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`buck/mdf <pair_mdf>` | a,c | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/cut <pair_coul>` | scale | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/cut/soft <pair_fep_soft>` | lambda | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/long, coul/msm <pair_coul>` | scale | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`coul/long/soft <pair_fep_soft>` | scale, lambda | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`eam <pair_eam>` | scale | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`gauss <pair_gauss>` | a | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lennard/mdf <pair_mdf>` | a,b | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/class2 <pair_class2>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/class2/coul/cut, lj/class2/coul/long <pair_class2>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut <pair_lj>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/soft <pair_fep_soft>` | epsilon,sigma,lambda | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/coul/cut, lj/cut/coul/long, lj/cut/coul/msm <pair_lj_cut_coul>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/coul/cut/soft, lj/cut/coul/long/soft <pair_fep_soft>` | epsilon,sigma,lambda | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/tip4p/cut, lj/cut/tip4p/long <pair_lj_cut_tip4p>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/cut/tip4p/long/soft <pair_fep_soft>` | epsilon,sigma,lambda | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/expand <pair_lj_expand>` | epsilon,sigma,delta | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/mdf <pair_mdf>` | epsilon,sigma | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`lj/sf/dipole/sf <pair_dipole>` | epsilon,sigma,scale | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`mie/cut <pair_mie>` | epsilon,sigma,gamR,gamA | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`morse, morse/smooth/linear <pair_morse>` | d0,r0,alpha | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`morse/soft <pair_morse>` | d0,r0,alpha,lambda | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`nm/cut <pair_nm>` | e0,r0,nn,mm | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`nm/cut/coul/cut, nm/cut/coul/long <pair_nm>` | e0,r0,nn,mm | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`ufm <pair_ufm>` | epsilon,sigma,scale | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`soft <pair_soft>` | a | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
.. note::

View File

@ -15,7 +15,7 @@ Syntax
* dir = *x* or *y* or *z*
* shockvel = shock velocity (strictly positive, velocity units)
* zero or more keyword/value pairs may be appended
* keyword = *q* or *mu* or *p0* or *v0* or *e0* or *tscale* or *damp* or *seed*\ or *f_max* or *N_f* or *eta* or *beta* or *T_init*
* keyword = *q* or *mu* or *p0* or *v0* or *e0* or *tscale* or *damp* or *seed* or *f_max* or *N_f* or *eta* or *beta* or *T_init*
.. parsed-literal::

View File

@ -183,11 +183,13 @@ the restraint is
with the following coefficients:
* :math:`K` (energy/radian\^2)
* :math:`K` (energy)
* :math:`\theta_0` (degrees)
:math:`K` and :math:`\theta_0` are specified with the fix. Note that the usual 1/2
factor is included in :math:`K`.
:math:`K` and :math:`\theta_0` are specified with the fix.
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to
radians internally; hence :math:`K` is effectively energy per
radian\^2. Note that the usual 1/2 factor is included in :math:`K`.
----------

View File

@ -93,7 +93,7 @@ Related commands
""""""""""""""""
:doc:`kspace_style <kspace_style>`, :doc:`boundary <boundary>`
:doc:`kspace_modify <kspace_modify>`, :doc:`pair_style lj/cut/coul/long <pair_lj>`, :doc:`pair_style lj/charmm/coul/long <pair_charmm>`, :doc:`pair_style lj/long <pair_lj_long>`, :doc:`pair_style lj/long/coul/long <pair_lj_long>`,
:doc:`kspace_modify <kspace_modify>`, :doc:`pair_style lj/cut/coul/long <pair_lj_cut_coul>`, :doc:`pair_style lj/charmm/coul/long <pair_charmm>`, :doc:`pair_style lj/long <pair_lj_long>`, :doc:`pair_style lj/long/coul/long <pair_lj_long>`,
:doc:`pair_style buck/coul/long <pair_buck>`
Default

View File

@ -74,29 +74,31 @@ commands.
These are the 2 coefficients for the :math:`E_i` formula:
* :math:`K` (energy/radian\^2)
* :math:`K` (energy)
* :math:`\chi_0` (degrees)
:math:`\chi_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of K are in energy/radian\^2.
:math:`\chi_0` is specified in degrees, but LAMMPS converts it to
radians internally; hence :math:`K` is effectively energy per
radian\^2.
For the :math:`E_{aa}` formula, each line in a
:doc:`improper_coeff <improper_coeff>` command in the input script lists
7 coefficients, the first of which is *aa* to indicate they are
AngleAngle coefficients. In a data file, these coefficients should be
listed under a *AngleAngle Coeffs* heading and you must leave out the
*aa*, i.e. only list 6 coefficients after the improper type.
For the :math:`E_{aa}` formula, each line in a :doc:`improper_coeff
<improper_coeff>` command in the input script lists 7 coefficients,
the first of which is *aa* to indicate they are AngleAngle
coefficients. In a data file, these coefficients should be listed
under a *AngleAngle Coeffs* heading and you must leave out the *aa*,
i.e. only list 6 coefficients after the improper type.
* *aa*
* :math:`M_1` (energy/distance)
* :math:`M_2` (energy/distance)
* :math:`M_3` (energy/distance)
* :math:`M_1` (energy)
* :math:`M_2` (energy)
* :math:`M_3` (energy)
* :math:`\theta_1` (degrees)
* :math:`\theta_2` (degrees)
* :math:`\theta_3` (degrees)
The theta values are specified in degrees, but LAMMPS converts them to
radians internally; hence the units of M are in energy/radian\^2.
The :math:`\theta` values are specified in degrees, but LAMMPS
converts them to radians internally; hence the hence the various
:math:`M` are effectively energy per radian\^2.
----------
@ -109,7 +111,8 @@ 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

View File

@ -59,11 +59,12 @@ above, or in the data file or restart files read by the
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>`
commands:
* :math:`K` (energy/radian\^2)
* :math:`K` (energy)
* :math:`\chi_0` (degrees)
:math:`\chi_0` is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of K are in energy/radian\^2.
:math:`\chi_0` is specified in degrees, but LAMMPS converts it to
radians internally; hence :math:`K` is effectively energy per
radian\^2.
----------
@ -76,11 +77,13 @@ 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.

View File

@ -437,7 +437,7 @@ virial, so this contribution is not included.
Related commands
""""""""""""""""
:doc:`kspace_modify <kspace_modify>`, :doc:`pair_style lj/cut/coul/long <pair_lj>`, :doc:`pair_style lj/charmm/coul/long <pair_charmm>`, :doc:`pair_style lj/long/coul/long <pair_lj_long>`, :doc:`pair_style buck/coul/long <pair_buck>`
:doc:`kspace_modify <kspace_modify>`, :doc:`pair_style lj/cut/coul/long <pair_lj_cut_coul>`, :doc:`pair_style lj/charmm/coul/long <pair_charmm>`, :doc:`pair_style lj/long/coul/long <pair_lj_long>`, :doc:`pair_style buck/coul/long <pair_buck>`
Default
"""""""

View File

@ -231,7 +231,7 @@ so that its energy is 0.0 at the cutoff via the
:doc:`pair_modify <pair_modify>` command. See the doc pages for
individual :doc:`pair styles <pair_style>` for details. Note that
Coulombic potentials always have a cutoff, unless versions with a
long-range component are used (e.g. :doc:`pair_style lj/cut/coul/long <pair_lj>`). The CHARMM potentials go to 0.0 at
long-range component are used (e.g. :doc:`pair_style lj/cut/coul/long <pair_lj_cut_coul>`). The CHARMM potentials go to 0.0 at
the cutoff (e.g. :doc:`pair_style lj/charmm/coul/charmm <pair_charmm>`),
as do the GROMACS potentials (e.g. :doc:`pair_style lj/gromacs <pair_gromacs>`).

View File

@ -518,7 +518,7 @@ script are supported by the KOKKOS package. In this case data can stay
on the GPU for many timesteps without being moved between the host and
GPU, if you use the *device* value. If your script uses styles (e.g.
fixes) which are not yet supported by the KOKKOS package, then data has
to be move between the host and device anyway, so it is typically faster
to be moved between the host and device anyway, so it is typically faster
to let the host handle communication, by using the *host* value. Using
*host* instead of *no* will enable use of multiple threads to
pack/unpack communicated data. When running small systems on a GPU,

View File

@ -120,7 +120,7 @@ the "/cs" in the name:
* :doc:`pair_style buck/coul/long <pair_buck>`
* :doc:`pair_style coul/long <pair_coul>`
* :doc:`pair_style coul/wolf <pair_coul>`
* :doc:`pair_style lj/cut/coul/long <pair_lj>`
* :doc:`pair_style lj/cut/coul/long <pair_lj_cut_coul>`
* :doc:`pair_style lj/class2/coul/long <pair_class2>`
except that they correctly treat the special case where the distance

View File

@ -1,109 +1,15 @@
.. index:: pair_style lj/cut
.. index:: pair_style lj/cut/gpu
.. index:: pair_style lj/cut/intel
.. index:: pair_style lj/cut/kk
.. index:: pair_style lj/cut/opt
.. index:: pair_style lj/cut/omp
pair_style lj/cut command
=========================
pair_style lj/cut/gpu command
=============================
pair_style lj/cut/intel command
===============================
pair_style lj/cut/kk command
============================
pair_style lj/cut/opt command
=============================
pair_style lj/cut/omp command
=============================
pair_style lj/cut/coul/cut command
==================================
pair_style lj/cut/coul/cut/gpu command
======================================
pair_style lj/cut/coul/cut/kk command
=====================================
pair_style lj/cut/coul/cut/omp command
======================================
pair_style lj/cut/coul/debye command
====================================
pair_style lj/cut/coul/debye/gpu command
========================================
pair_style lj/cut/coul/debye/kk command
=======================================
pair_style lj/cut/coul/debye/omp command
========================================
pair_style lj/cut/coul/dsf command
==================================
pair_style lj/cut/coul/dsf/gpu command
======================================
pair_style lj/cut/coul/dsf/kk command
=====================================
pair_style lj/cut/coul/dsf/omp command
======================================
pair_style lj/cut/coul/long command
===================================
pair_style lj/cut/coul/long/gpu command
=======================================
pair_style lj/cut/coul/long/kk command
======================================
pair_style lj/cut/coul/long/intel command
=========================================
pair_style lj/cut/coul/long/opt command
=======================================
pair_style lj/cut/coul/long/omp command
=======================================
pair_style lj/cut/coul/msm command
==================================
pair_style lj/cut/coul/msm/gpu command
======================================
pair_style lj/cut/coul/msm/omp command
======================================
pair_style lj/cut/coul/wolf command
===================================
pair_style lj/cut/coul/wolf/omp command
=======================================
pair_style lj/cut/tip4p/cut 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
========================================
pair_style lj/cut/tip4p/long/opt command
========================================
Accelerator Variants: *lj/cut/gpu*, *lj/cut/intel*, *lj/cut/kk*, *lj/cut/opt*, *lj/cut/omp*
Syntax
""""""
@ -112,46 +18,13 @@ Syntax
pair_style style args
* style = *lj/cut* or *lj/cut/coul/cut* or *lj/cut/coul/debye* or *lj/cut/coul/dsf* or *lj/cut/coul/long* *lj/cut/coul/msm* or *lj/cut/tip4p/long*
* style = *lj/cut*
* args = list of arguments for a particular style
.. parsed-literal::
*lj/cut* args = cutoff
cutoff = global cutoff for Lennard Jones interactions (distance units)
*lj/cut/coul/cut* args = cutoff (cutoff2)
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
*lj/cut/coul/debye* args = kappa cutoff (cutoff2)
kappa = inverse of the Debye length (inverse distance units)
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
*lj/cut/coul/dsf* args = alpha cutoff (cutoff2)
alpha = damping parameter (inverse distance units)
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (distance units)
*lj/cut/coul/long* args = cutoff (cutoff2)
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
*lj/cut/coul/msm* args = cutoff (cutoff2)
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
*lj/cut/coul/wolf* args = alpha cutoff (cutoff2)
alpha = damping parameter (inverse distance units)
cutoff = global cutoff for LJ (and Coulombic if only 2 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
*lj/cut/tip4p/cut* args = otype htype btype atype qdist cutoff (cutoff2)
otype,htype = atom types for TIP4P O and H
btype,atype = bond and angle types for TIP4P waters
qdist = distance from O atom to massless charge (distance units)
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
*lj/cut/tip4p/long* args = otype htype btype atype qdist cutoff (cutoff2)
otype,htype = atom types for TIP4P O and H
btype,atype = bond and angle types for TIP4P waters
qdist = distance from O atom to massless charge (distance units)
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
Examples
""""""""
@ -162,46 +35,6 @@ Examples
pair_coeff * * 1 1
pair_coeff 1 1 1 1.1 2.8
pair_style lj/cut/coul/cut 10.0
pair_style lj/cut/coul/cut 10.0 8.0
pair_coeff * * 100.0 3.0
pair_coeff 1 1 100.0 3.5 9.0
pair_coeff 1 1 100.0 3.5 9.0 9.0
pair_style lj/cut/coul/debye 1.5 3.0
pair_style lj/cut/coul/debye 1.5 2.5 5.0
pair_coeff * * 1.0 1.0
pair_coeff 1 1 1.0 1.5 2.5
pair_coeff 1 1 1.0 1.5 2.5 5.0
pair_style lj/cut/coul/dsf 0.05 2.5 10.0
pair_coeff * * 1.0 1.0
pair_coeff 1 1 1.0 1.0 2.5
pair_style lj/cut/coul/long 10.0
pair_style lj/cut/coul/long 10.0 8.0
pair_coeff * * 100.0 3.0
pair_coeff 1 1 100.0 3.5 9.0
pair_style lj/cut/coul/msm 10.0
pair_style lj/cut/coul/msm 10.0 8.0
pair_coeff * * 100.0 3.0
pair_coeff 1 1 100.0 3.5 9.0
pair_style lj/cut/tip4p/cut 1 2 7 8 0.15 12.0
pair_style lj/cut/tip4p/cut 1 2 7 8 0.15 12.0 10.0
pair_coeff * * 100.0 3.0
pair_coeff 1 1 100.0 3.5 9.0
pair_style lj/cut/coul/wolf 0.2 5. 10.0
pair_coeff * * 1.0 1.0
pair_coeff 1 1 1.0 1.0 2.5
pair_style lj/cut/tip4p/long 1 2 7 8 0.15 12.0
pair_style lj/cut/tip4p/long 1 2 7 8 0.15 12.0 10.0
pair_coeff * * 100.0 3.0
pair_coeff 1 1 100.0 3.5 9.0
Description
"""""""""""
@ -214,150 +47,36 @@ given by
\left(\frac{\sigma}{r}\right)^6 \right]
\qquad r < r_c
Rc is the cutoff.
:math:`r_c` is the cutoff.
Style *lj/cut/coul/cut* adds a Coulombic pairwise interaction given by
See the :doc:`lj/cut/coul <pair_lj_cut_coul>` styles to add a Coulombic
pairwise interaction and the :doc:`lj/cut/tip4p <pair_lj_cut_tip4p>` styles to
add the TIP4P water model.
.. math::
Coefficients
""""""""""""
E = \frac{C q_i q_j}{\epsilon r} \qquad r < r_c
where C is an energy-conversion constant, :math:`q_i` and :math:`q_j`
are the charges on the 2 atoms, and :math:`\epsilon` is the dielectric
constant which can be set by the :doc:`dielectric <dielectric>` command.
If one cutoff is specified in the pair_style command, it is used for
both the LJ and Coulombic terms. If two cutoffs are specified, they are
used as cutoffs for the LJ and Coulombic terms respectively.
Style *lj/cut/coul/debye* adds an additional exp() damping factor
to the Coulombic term, given by
.. math::
E = \frac{C q_i q_j}{\epsilon r} \exp(- \kappa r) \qquad r < r_c
where :math:`\kappa` is the inverse of the Debye length. This potential
is another way to mimic the screening effect of a polar solvent.
Style *lj/cut/coul/dsf* computes the Coulombic term via the damped
shifted force model described in :ref:`Fennell <Fennell2>`, given by:
.. math::
E =
q_iq_j \left[ \frac{\mbox{erfc} (\alpha r)}{r} - \frac{\mbox{erfc} (\alpha r_c)}{r_c} +
\left( \frac{\mbox{erfc} (\alpha r_c)}{r_c^2} + \frac{2\alpha}{\sqrt{\pi}}\frac{\exp (-\alpha^2 r^2_c)}{r_c} \right)(r-r_c) \right] \qquad r < r_c
where :math:`\alpha` is the damping parameter and erfc() is the complementary
error-function. This potential is essentially a short-range,
spherically-truncated, charge-neutralized, shifted, pairwise *1/r*
summation. The potential is based on Wolf summation, proposed as an
alternative to Ewald summation for condensed phase systems where
charge screening causes electrostatic interactions to become
effectively short-ranged. In order for the electrostatic sum to be
absolutely convergent, charge neutralization within the cutoff radius
is enforced by shifting the potential through placement of image
charges on the cutoff sphere. Convergence can often be improved by
setting :math:`\alpha` to a small non-zero value.
Styles *lj/cut/coul/long* and *lj/cut/coul/msm* compute the same
Coulombic interactions as style *lj/cut/coul/cut* except that an
additional damping factor is applied to the Coulombic term so it can
be used in conjunction with the :doc:`kspace_style <kspace_style>`
command and its *ewald* or *pppm* option. The Coulombic cutoff
specified for this style means that pairwise interactions within this
distance are computed directly; interactions outside that distance are
computed in reciprocal space.
Style *coul/wolf* adds a Coulombic pairwise interaction via the Wolf
summation method, described in :ref:`Wolf <Wolf1>`, given by:
.. math::
E_i = \frac{1}{2} \sum_{j \neq i}
\frac{q_i q_j {\rm erfc}(\alpha r_{ij})}{r_{ij}} +
\frac{1}{2} \sum_{j \neq i}
\frac{q_i q_j {\rm erf}(\alpha r_{ij})}{r_{ij}} \qquad r < r_c
where :math:`\alpha` is the damping parameter, and erfc() is the
complementary error-function terms. This potential is essentially a
short-range, spherically-truncated, charge-neutralized, shifted,
pairwise *1/r* summation. With a manipulation of adding and subtracting
a self term (for i = j) to the first and second term on the
right-hand-side, respectively, and a small enough :math:`\alpha` damping
parameter, the second term shrinks and the potential becomes a
rapidly-converging real-space summation. With a long enough cutoff and
small enough :math:`\alpha` parameter, the energy and forces calculated by the
Wolf summation method approach those of the Ewald sum. So it is a means
of getting effective long-range interactions with a short-range
potential.
Styles *lj/cut/tip4p/cut* and *lj/cut/tip4p/long* implement the TIP4P
water model of :ref:`(Jorgensen) <Jorgensen2>`, which introduces a massless
site located a short distance away from the oxygen atom along the
bisector of the HOH angle. The atomic types of the oxygen and
hydrogen atoms, the bond and angle types for OH and HOH interactions,
and the distance to the massless charge site are specified as
pair_style arguments. Style *lj/cut/tip4p/cut* uses a cutoff for
Coulomb interactions; style *lj/cut/tip4p/long* is for use with a
long-range Coulombic solver (Ewald or PPPM).
.. note::
For each TIP4P water molecule in your system, the atom IDs for
the O and 2 H atoms must be consecutive, with the O atom first. This
is to enable LAMMPS to "find" the 2 H atoms associated with each O
atom. For example, if the atom ID of an O atom in a TIP4P water
molecule is 500, then its 2 H atoms must have IDs 501 and 502.
See the :doc:`Howto tip4p <Howto_tip4p>` doc page for more information
on how to use the TIP4P pair styles and lists of parameters to set.
Note that the neighbor list cutoff for Coulomb interactions is
effectively extended by a distance 2\*qdist when using the TIP4P pair
style, to account for the offset distance of the fictitious charges on
O atoms in water molecules. Thus it is typically best in an
efficiency sense to use a LJ cutoff >= Coulombic cutoff + 2\*qdist, to
shrink the size of the neighbor list. This leads to slightly larger
cost for the long-range calculation, so you can test the trade-off for
your model.
For all of the *lj/cut* pair styles, the following coefficients must
be defined for each pair of atoms types via the
:doc:`pair_coeff <pair_coeff>` command as in the examples above, or in
the data file or restart files read by the :doc:`read_data <read_data>`
or :doc:`read_restart <read_restart>` commands, or by mixing as
described below:
The following coefficients must be defined for each pair of atoms types via the
:doc:`pair_coeff <pair_coeff>` command as in the examples above, or in the data
file or restart files read by the :doc:`read_data <read_data>` or
:doc:`read_restart <read_restart>` commands, or by mixing as described below:
* :math:`\epsilon` (energy units)
* :math:`\sigma` (distance units)
* cutoff1 (distance units)
* cutoff2 (distance units)
* LJ cutoff (distance units)
Note that :math:`\sigma` is defined in the LJ formula as the zero-crossing
distance for the potential, not as the energy minimum at :math:`2^{\frac{1}{6}} \sigma`.
The latter 2 coefficients are optional. If not specified, the global
LJ and Coulombic cutoffs specified in the pair_style command are used.
If only one cutoff is specified, it is used as the cutoff for both LJ
and Coulombic interactions for this type pair. If both coefficients
are specified, they are used as the LJ and Coulombic cutoffs for this
type pair. You cannot specify 2 cutoffs for style *lj/cut*\ , since it
has no Coulombic terms.
For *lj/cut/coul/long* and *lj/cut/coul/msm* and *lj/cut/tip4p/cut*
and *lj/cut/tip4p/long* only the LJ cutoff can be specified since a
Coulombic cutoff cannot be specified for an individual I,J type pair.
All type pairs use the same global Coulombic cutoff specified in the
pair_style command.
The last coefficient is optional. If not specified, the global
LJ cutoff specified in the pair_style command are used.
----------
A version of these styles with a soft core, *lj/cut/soft*\ , suitable
for use in free energy calculations, is part of the USER-FEP package and
is documented with the :doc:`pair_style */soft <pair_fep_soft>`
styles. The version with soft core is only available if LAMMPS was built
with that package. See the :doc:`Build package <Build_package>` doc page
for more info.
styles.
----------
@ -381,21 +100,17 @@ instructions on how to use the accelerated styles effectively.
----------
**Mixing, shift, table, tail correction, restart, rRESPA info**\ :
**Mixing, shift, table, tail correction, restart, rRESPA info:**
For atom type pairs I,J and I != J, the epsilon and sigma coefficients
and cutoff distance for all of the lj/cut pair styles can be mixed.
The default mix value is *geometric*\ . See the "pair_modify" command
The default mix value is *geometric*. See the "pair_modify" command
for details.
All of the *lj/cut* pair styles support the
:doc:`pair_modify <pair_modify>` shift option for the energy of the
Lennard-Jones portion of the pair interaction.
The *lj/cut/coul/long* and *lj/cut/tip4p/long* pair styles support the
:doc:`pair_modify <pair_modify>` table option since they can tabulate
the short-range portion of the long-range Coulombic interaction.
All of the *lj/cut* pair styles support the
:doc:`pair_modify <pair_modify>` tail option for adding a long-range
tail correction to the energy and pressure for the Lennard-Jones
@ -404,7 +119,7 @@ portion of the pair interaction.
All of the *lj/cut* pair styles write their information to :doc:`binary restart files <restart>`, so pair_style and pair_coeff commands do
not need to be specified in an input script that reads a restart file.
The *lj/cut* and *lj/cut/coul/long* pair styles support the use of the
The *lj/cut* pair styles support the use of the
*inner*\ , *middle*\ , and *outer* keywords of the :doc:`run_style respa <run_style>` command, meaning the pairwise forces can be
partitioned by distance at different levels of the rRESPA hierarchy.
The other styles only support the *pair* keyword of run_style respa.
@ -412,30 +127,17 @@ See the :doc:`run_style <run_style>` command for details.
----------
Restrictions
""""""""""""
The *lj/cut/coul/long* and *lj/cut/tip4p/long* styles are part of the
KSPACE package. The *lj/cut/tip4p/cut* style is part of the MOLECULE
package. These styles are only enabled if LAMMPS was built with those
packages. See the :doc:`Build package <Build_package>` doc page for
more info.
Related commands
""""""""""""""""
:doc:`pair_coeff <pair_coeff>`
* :doc:`pair_coeff <pair_coeff>`
* :doc:`pair_style lj/cut/coul/cut <pair_lj_cut_coul>`
* :doc:`pair_style lj/cut/coul/debye <pair_lj_cut_coul>`
* :doc:`pair_style lj/cut/coul/dsf <pair_lj_cut_coul>`
* :doc:`pair_style lj/cut/coul/long <pair_lj_cut_coul>`
* :doc:`pair_style lj/cut/coul/msm <pair_lj_cut_coul>`
* :doc:`pair_style lj/cut/coul/wolf <pair_lj_cut_coul>`
* :doc:`pair_style lj/cut/tip4p/cut <pair_lj_cut_tip4p>`
* :doc:`pair_style lj/cut/tip4p/long <pair_lj_cut_tip4p>`
**Default:** none
----------
.. _Jorgensen2:
**(Jorgensen)** Jorgensen, Chandrasekhar, Madura, Impey, Klein, J Chem
Phys, 79, 926 (1983).
.. _Fennell2:
**(Fennell)** C. J. Fennell, J. D. Gezelter, J Chem Phys, 124,
234104 (2006).

View File

@ -0,0 +1,328 @@
.. index:: pair_style lj/cut/coul/cut
.. index:: pair_style lj/cut/coul/cut/gpu
.. index:: pair_style lj/cut/coul/cut/kk
.. index:: pair_style lj/cut/coul/cut/omp
.. index:: pair_style lj/cut/coul/debye
.. index:: pair_style lj/cut/coul/debye/gpu
.. index:: pair_style lj/cut/coul/debye/kk
.. index:: pair_style lj/cut/coul/debye/omp
.. index:: pair_style lj/cut/coul/dsf
.. index:: pair_style lj/cut/coul/dsf/gpu
.. index:: pair_style lj/cut/coul/dsf/kk
.. index:: pair_style lj/cut/coul/dsf/omp
.. index:: pair_style lj/cut/coul/long
.. index:: pair_style lj/cut/coul/long/gpu
.. index:: pair_style lj/cut/coul/long/kk
.. index:: pair_style lj/cut/coul/long/intel
.. index:: pair_style lj/cut/coul/long/opt
.. index:: pair_style lj/cut/coul/long/omp
.. index:: pair_style lj/cut/coul/msm
.. index:: pair_style lj/cut/coul/msm/gpu
.. index:: pair_style lj/cut/coul/msm/omp
.. index:: pair_style lj/cut/coul/wolf
.. index:: pair_style lj/cut/coul/wolf/omp
pair_style lj/cut/coul/cut command
==================================
Accelerator Variants: *lj/cut/coul/cut/gpu*, *lj/cut/coul/cut/kk*, *lj/cut/coul/cut/omp*
pair_style lj/cut/coul/debye command
====================================
Accelerator Variants: *lj/cut/coul/debye/gpu*, lj/cut/coul/debye/kk, *lj/cut/coul/debye/omp*
pair_style lj/cut/coul/dsf command
==================================
Accelerator Variants: *lj/cut/coul/dsf/gpu*, *lj/cut/coul/dsf/kk*, *lj/cut/coul/dsf/omp*
pair_style lj/cut/coul/long command
===================================
Accelerator Variants: *lj/cut/coul/long/gpu*, *lj/cut/coul/long/kk*, *lj/cut/coul/long/intel*, *lj/cut/coul/long/opt*, *lj/cut/coul/long/omp*
pair_style lj/cut/coul/msm command
==================================
Accelerator Variants: *lj/cut/coul/msm/gpu*, *lj/cut/coul/msm/omp*
pair_style lj/cut/coul/wolf command
===================================
Accelerator Variants: *lj/cut/coul/wolf/omp*
Syntax
""""""
.. code-block:: LAMMPS
pair_style style args
* style = *lj/cut/coul/cut* or *lj/cut/coul/debye* or *lj/cut/coul/dsf* or *lj/cut/coul/long* *lj/cut/coul/msm* or *lj/cut/coul/wolf*
* args = list of arguments for a particular style
.. parsed-literal::
*lj/cut/coul/cut* args = cutoff (cutoff2)
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
*lj/cut/coul/debye* args = kappa cutoff (cutoff2)
kappa = inverse of the Debye length (inverse distance units)
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
*lj/cut/coul/dsf* args = alpha cutoff (cutoff2)
alpha = damping parameter (inverse distance units)
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (distance units)
*lj/cut/coul/long* args = cutoff (cutoff2)
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
*lj/cut/coul/msm* args = cutoff (cutoff2)
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
*lj/cut/coul/wolf* args = alpha cutoff (cutoff2)
alpha = damping parameter (inverse distance units)
cutoff = global cutoff for LJ (and Coulombic if only 2 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
Examples
""""""""
.. code-block:: LAMMPS
pair_style lj/cut/coul/cut 10.0
pair_style lj/cut/coul/cut 10.0 8.0
pair_coeff * * 100.0 3.0
pair_coeff 1 1 100.0 3.5 9.0
pair_coeff 1 1 100.0 3.5 9.0 9.0
pair_style lj/cut/coul/debye 1.5 3.0
pair_style lj/cut/coul/debye 1.5 2.5 5.0
pair_coeff * * 1.0 1.0
pair_coeff 1 1 1.0 1.5 2.5
pair_coeff 1 1 1.0 1.5 2.5 5.0
pair_style lj/cut/coul/dsf 0.05 2.5 10.0
pair_coeff * * 1.0 1.0
pair_coeff 1 1 1.0 1.0 2.5
pair_style lj/cut/coul/long 10.0
pair_style lj/cut/coul/long 10.0 8.0
pair_coeff * * 100.0 3.0
pair_coeff 1 1 100.0 3.5 9.0
pair_style lj/cut/coul/msm 10.0
pair_style lj/cut/coul/msm 10.0 8.0
pair_coeff * * 100.0 3.0
pair_coeff 1 1 100.0 3.5 9.0
pair_style lj/cut/coul/wolf 0.2 5. 10.0
pair_coeff * * 1.0 1.0
pair_coeff 1 1 1.0 1.0 2.5
Description
"""""""""""
The *lj/cut/coul* styles compute the standard 12/6 Lennard-Jones potential,
given by
.. math::
E = 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} -
\left(\frac{\sigma}{r}\right)^6 \right]
\qquad r < r_c
:math:`r_c` is the cutoff.
Style *lj/cut/coul/cut* adds a Coulombic pairwise interaction given by
.. math::
E = \frac{C q_i q_j}{\epsilon r} \qquad r < r_c
where :math:`C` is an energy-conversion constant, :math:`q_i` and :math:`q_j`
are the charges on the 2 atoms, and :math:`\epsilon` is the dielectric
constant which can be set by the :doc:`dielectric <dielectric>` command.
If one cutoff is specified in the pair_style command, it is used for
both the LJ and Coulombic terms. If two cutoffs are specified, they are
used as cutoffs for the LJ and Coulombic terms respectively.
Style *lj/cut/coul/debye* adds an additional exp() damping factor
to the Coulombic term, given by
.. math::
E = \frac{C q_i q_j}{\epsilon r} \exp(- \kappa r) \qquad r < r_c
where :math:`\kappa` is the inverse of the Debye length. This potential
is another way to mimic the screening effect of a polar solvent.
Style *lj/cut/coul/dsf* computes the Coulombic term via the damped
shifted force model described in :ref:`Fennell <Fennell2>`, given by:
.. math::
E =
q_iq_j \left[ \frac{\mbox{erfc} (\alpha r)}{r} - \frac{\mbox{erfc} (\alpha r_c)}{r_c} +
\left( \frac{\mbox{erfc} (\alpha r_c)}{r_c^2} + \frac{2\alpha}{\sqrt{\pi}}\frac{\exp (-\alpha^2 r^2_c)}{r_c} \right)(r-r_c) \right] \qquad r < r_c
where :math:`\alpha` is the damping parameter and erfc() is the complementary
error-function. This potential is essentially a short-range,
spherically-truncated, charge-neutralized, shifted, pairwise *1/r*
summation. The potential is based on Wolf summation, proposed as an
alternative to Ewald summation for condensed phase systems where
charge screening causes electrostatic interactions to become
effectively short-ranged. In order for the electrostatic sum to be
absolutely convergent, charge neutralization within the cutoff radius
is enforced by shifting the potential through placement of image
charges on the cutoff sphere. Convergence can often be improved by
setting :math:`\alpha` to a small non-zero value.
Styles *lj/cut/coul/long* and *lj/cut/coul/msm* compute the same
Coulombic interactions as style *lj/cut/coul/cut* except that an
additional damping factor is applied to the Coulombic term so it can
be used in conjunction with the :doc:`kspace_style <kspace_style>`
command and its *ewald* or *pppm* option. The Coulombic cutoff
specified for this style means that pairwise interactions within this
distance are computed directly; interactions outside that distance are
computed in reciprocal space.
Style *coul/wolf* adds a Coulombic pairwise interaction via the Wolf
summation method, described in :ref:`Wolf <Wolf3>`, given by:
.. math::
E_i = \frac{1}{2} \sum_{j \neq i}
\frac{q_i q_j {\rm erfc}(\alpha r_{ij})}{r_{ij}} +
\frac{1}{2} \sum_{j \neq i}
\frac{q_i q_j {\rm erf}(\alpha r_{ij})}{r_{ij}} \qquad r < r_c
where :math:`\alpha` is the damping parameter, and erfc() is the
complementary error-function terms. This potential is essentially a
short-range, spherically-truncated, charge-neutralized, shifted,
pairwise *1/r* summation. With a manipulation of adding and subtracting
a self term (for i = j) to the first and second term on the
right-hand-side, respectively, and a small enough :math:`\alpha` damping
parameter, the second term shrinks and the potential becomes a
rapidly-converging real-space summation. With a long enough cutoff and
small enough :math:`\alpha` parameter, the energy and forces calculated by the
Wolf summation method approach those of the Ewald sum. So it is a means
of getting effective long-range interactions with a short-range
potential.
Coefficients
""""""""""""
For all of the *lj/cut/coul* pair styles, the following coefficients must
be defined for each pair of atoms types via the
:doc:`pair_coeff <pair_coeff>` command as in the examples above, or in
the data file or restart files read by the :doc:`read_data <read_data>`
or :doc:`read_restart <read_restart>` commands, or by mixing as
described below:
* :math:`\epsilon` (energy units)
* :math:`\sigma` (distance units)
* cutoff1 (distance units)
* cutoff2 (distance units)
Note that :math:`\sigma` is defined in the LJ formula as the zero-crossing
distance for the potential, not as the energy minimum at :math:`2^{\frac{1}{6}} \sigma`.
The latter 2 coefficients are optional. If not specified, the global
LJ and Coulombic cutoffs specified in the pair_style command are used.
If only one cutoff is specified, it is used as the cutoff for both LJ
and Coulombic interactions for this type pair. If both coefficients
are specified, they are used as the LJ and Coulombic cutoffs for this
type pair.
For *lj/cut/coul/long* and *lj/cut/coul/msm* only the LJ cutoff can be
specified since a Coulombic cutoff cannot be specified for an individual I,J
type pair. All type pairs use the same global Coulombic cutoff specified in
the pair_style command.
----------
A version of these styles with a soft core, *lj/cut/coul/soft*\ and
*lj/cut/coul/long/soft*\ , suitable for use in free energy calculations, is
part of the USER-FEP package and is documented with the :doc:`pair_style */soft <pair_fep_soft>` styles.
----------
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
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.
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.
See the :doc:`Speed packages <Speed_packages>` doc page for more
instructions on how to use the accelerated styles effectively.
----------
**Mixing, shift, table, tail correction, restart, rRESPA info**\ :
For atom type pairs I,J and I != J, the epsilon and sigma coefficients
and cutoff distance for all of the lj/cut pair styles can be mixed.
The default mix value is *geometric*\ . See the "pair_modify" command
for details.
All of the *lj/cut* pair styles support the
:doc:`pair_modify <pair_modify>` shift option for the energy of the
Lennard-Jones portion of the pair interaction.
The *lj/cut/coul/long* pair styles support the
:doc:`pair_modify <pair_modify>` table option since they can tabulate
the short-range portion of the long-range Coulombic interaction.
All of the *lj/cut* pair styles support the
:doc:`pair_modify <pair_modify>` tail option for adding a long-range
tail correction to the energy and pressure for the Lennard-Jones
portion of the pair interaction.
All of the *lj/cut* pair styles write their information to :doc:`binary restart files <restart>`, so pair_style and pair_coeff commands do
not need to be specified in an input script that reads a restart file.
The *lj/cut/coul/long* pair styles support the use of the
*inner*\ , *middle*\ , and *outer* keywords of the :doc:`run_style respa <run_style>` command, meaning the pairwise forces can be
partitioned by distance at different levels of the rRESPA hierarchy.
The other styles only support the *pair* keyword of run_style respa.
See the :doc:`run_style <run_style>` command for details.
----------
Restrictions
""""""""""""
The *lj/cut/coul/long* styles are part of the KSPACE package.
These styles are only enabled if LAMMPS was built with those
packages. See the :doc:`Build package <Build_package>` doc page for
more info.
Related commands
""""""""""""""""
:doc:`pair_coeff <pair_coeff>`
**Default:** none
----------
.. _Wolf3:
**(Wolf)** D. Wolf, P. Keblinski, S. R. Phillpot, J. Eggebrecht, J Chem
Phys, 110, 8254 (1999).
.. _Fennell2:
**(Fennell)** C. J. Fennell, J. D. Gezelter, J Chem Phys, 124,
234104 (2006).

View File

@ -0,0 +1,230 @@
.. index:: pair_style lj/cut/tip4p/cut
.. index:: pair_style lj/cut/tip4p/cut/omp
.. index:: pair_style lj/cut/tip4p/long
.. index:: pair_style lj/cut/tip4p/long/gpu
.. index:: pair_style lj/cut/tip4p/long/omp
.. index:: pair_style lj/cut/tip4p/long/opt
pair_style lj/cut/tip4p/cut command
===================================
Accelerator Variants: *lj/cut/tip4p/cut/omp*
pair_style lj/cut/tip4p/long command
====================================
Accelerator Variants: *lj/cut/tip4p/long/gpu*, *lj/cut/tip4p/long/omp*, *lj/cut/tip4p/long/opt*
Syntax
""""""
.. code-block:: LAMMPS
pair_style style args
* style = *lj/cut/tip4p/cut* or *lj/cut/tip4p/long*
* args = list of arguments for a particular style
.. parsed-literal::
*lj/cut/tip4p/cut* args = otype htype btype atype qdist cutoff (cutoff2)
otype,htype = atom types for TIP4P O and H
btype,atype = bond and angle types for TIP4P waters
qdist = distance from O atom to massless charge (distance units)
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
*lj/cut/tip4p/long* args = otype htype btype atype qdist cutoff (cutoff2)
otype,htype = atom types for TIP4P O and H
btype,atype = bond and angle types for TIP4P waters
qdist = distance from O atom to massless charge (distance units)
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
Examples
""""""""
.. code-block:: LAMMPS
pair_style lj/cut/tip4p/cut 1 2 7 8 0.15 12.0
pair_style lj/cut/tip4p/cut 1 2 7 8 0.15 12.0 10.0
pair_coeff * * 100.0 3.0
pair_coeff 1 1 100.0 3.5 9.0
pair_style lj/cut/tip4p/long 1 2 7 8 0.15 12.0
pair_style lj/cut/tip4p/long 1 2 7 8 0.15 12.0 10.0
pair_coeff * * 100.0 3.0
pair_coeff 1 1 100.0 3.5 9.0
Description
"""""""""""
The *lj/cut/tip4p* styles compute the standard 12/6 Lennard-Jones potential,
given by
.. math::
E = 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} -
\left(\frac{\sigma}{r}\right)^6 \right]
\qquad r < r_c
:math:`r_c` is the cutoff.
They add Coulombic pairwise interactions given by
.. math::
E = \frac{C q_i q_j}{\epsilon r} \qquad r < r_c
where :math:`C` is an energy-conversion constant, :math:`q_i` and :math:`q_j`
are the charges on the 2 atoms, and :math:`\epsilon` is the dielectric
constant which can be set by the :doc:`dielectric <dielectric>` command.
If one cutoff is specified in the pair_style command, it is used for
both the LJ and Coulombic terms. If two cutoffs are specified, they are
used as cutoffs for the LJ and Coulombic terms respectively.
Style *lj/cut/tip4p/long* compute the same
Coulombic interactions as style *lj/cut/tip4p/cut* except that an
additional damping factor is applied to the Coulombic term so it can
be used in conjunction with the :doc:`kspace_style <kspace_style>`
command and its *ewald* or *pppm* option. The Coulombic cutoff
specified for this style means that pairwise interactions within this
distance are computed directly; interactions outside that distance are
computed in reciprocal space.
The *lj/cut/tip4p* styles implement the TIP4P
water model of :ref:`(Jorgensen) <Jorgensen2>`, which introduces a massless
site located a short distance away from the oxygen atom along the
bisector of the HOH angle. The atomic types of the oxygen and
hydrogen atoms, the bond and angle types for OH and HOH interactions,
and the distance to the massless charge site are specified as
pair_style arguments. Style *lj/cut/tip4p/cut* uses a cutoff for
Coulomb interactions; style *lj/cut/tip4p/long* is for use with a
long-range Coulombic solver (Ewald or PPPM).
.. note::
For each TIP4P water molecule in your system, the atom IDs for
the O and 2 H atoms must be consecutive, with the O atom first. This
is to enable LAMMPS to "find" the 2 H atoms associated with each O
atom. For example, if the atom ID of an O atom in a TIP4P water
molecule is 500, then its 2 H atoms must have IDs 501 and 502.
See the :doc:`Howto tip4p <Howto_tip4p>` doc page for more information
on how to use the TIP4P pair styles and lists of parameters to set.
Note that the neighbor list cutoff for Coulomb interactions is
effectively extended by a distance 2\*qdist when using the TIP4P pair
style, to account for the offset distance of the fictitious charges on
O atoms in water molecules. Thus it is typically best in an
efficiency sense to use a LJ cutoff >= Coulombic cutoff + 2\*qdist, to
shrink the size of the neighbor list. This leads to slightly larger
cost for the long-range calculation, so you can test the trade-off for
your model.
Coefficients
""""""""""""
For all of the *lj/cut* pair styles, the following coefficients must
be defined for each pair of atoms types via the
:doc:`pair_coeff <pair_coeff>` command as in the examples above, or in
the data file or restart files read by the :doc:`read_data <read_data>`
or :doc:`read_restart <read_restart>` commands, or by mixing as
described below:
* :math:`\epsilon` (energy units)
* :math:`\sigma` (distance units)
* LJ cutoff (distance units)
Note that :math:`\sigma` is defined in the LJ formula as the zero-crossing
distance for the potential, not as the energy minimum at :math:`2^{\frac{1}{6}} \sigma`.
The last coefficient is optional. If not specified, the global
LJ cutoff specified in the pair_style command is used.
For *lj/cut/tip4p/cut* and *lj/cut/tip4p/long* only the LJ cutoff can be
specified since a Coulombic cutoff cannot be specified for an individual I,J
type pair. All type pairs use the same global Coulombic cutoff specified in
the pair_style command.
----------
A version of these styles with a soft core, *lj/cut/tip4p/long/soft*\ , suitable
for use in free energy calculations, is part of the USER-FEP package and
is documented with the :doc:`pair_style */soft <pair_fep_soft>`
styles.
----------
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
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.
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.
See the :doc:`Speed packages <Speed_packages>` doc page for more
instructions on how to use the accelerated styles effectively.
----------
**Mixing, shift, table, tail correction, restart, rRESPA info**\ :
For atom type pairs I,J and I != J, the epsilon and sigma coefficients
and cutoff distance for all of the lj/cut pair styles can be mixed.
The default mix value is *geometric*\ . See the "pair_modify" command
for details.
All of the *lj/cut* pair styles support the
:doc:`pair_modify <pair_modify>` shift option for the energy of the
Lennard-Jones portion of the pair interaction.
The *lj/cut/coul/long* and *lj/cut/tip4p/long* pair styles support the
:doc:`pair_modify <pair_modify>` table option since they can tabulate
the short-range portion of the long-range Coulombic interaction.
All of the *lj/cut* pair styles support the
:doc:`pair_modify <pair_modify>` tail option for adding a long-range
tail correction to the energy and pressure for the Lennard-Jones
portion of the pair interaction.
All of the *lj/cut* pair styles write their information to :doc:`binary restart files <restart>`, so pair_style and pair_coeff commands do
not need to be specified in an input script that reads a restart file.
The *lj/cut* and *lj/cut/coul/long* pair styles support the use of the
*inner*\ , *middle*\ , and *outer* keywords of the :doc:`run_style respa <run_style>` command, meaning the pairwise forces can be
partitioned by distance at different levels of the rRESPA hierarchy.
The other styles only support the *pair* keyword of run_style respa.
See the :doc:`run_style <run_style>` command for details.
----------
Restrictions
""""""""""""
The *lj/cut/tip4p/long* styles are part of the
KSPACE package. The *lj/cut/tip4p/cut* style is part of the MOLECULE
package. These styles are only enabled if LAMMPS was built with those
packages. See the :doc:`Build package <Build_package>` doc page for
more info.
Related commands
""""""""""""""""
:doc:`pair_coeff <pair_coeff>`
**Default:** none
----------
.. _Jorgensen2:
**(Jorgensen)** Jorgensen, Chandrasekhar, Madura, Impey, Klein, J Chem
Phys, 79, 926 (1983).

View File

@ -8,7 +8,19 @@ Syntax
.. code-block:: LAMMPS
pair_style mliap
pair_style mliap ... keyword values ...
* two keyword/value pairs must be appended
* keyword = *model* or *descriptor*
.. parsed-literal::
*model* values = style filename
style = *linear* or *quadratic*
filename = name of file containing model definitions
*descriptor* values = style filename
style = *sna*
filename = name of file containing descriptor definitions
Examples
""""""""
@ -22,8 +34,8 @@ Examples
Description
"""""""""""
Pair style *mliap* provides a general interface to families of
machine-learning interatomic potentials. It provides separate
Pair style *mliap* provides a general interface to families of
machine-learning interatomic potentials. It allows separate
definitions of the interatomic potential functional form (*model*)
and the geometric quantities that characterize the atomic positions
(*descriptor*). By defining *model* and *descriptor* separately,
@ -34,6 +46,9 @@ and one descriptor, *sna*, the SNAP descriptor used by :doc:`pair_style snap <pa
and chem variants. Work is currently underway to extend
the interface to handle neural network energy models,
and it is also straightforward to add new descriptor styles.
In order to train a model, it is useful to know the gradient or derivative
of energy, force, and stress w.r.t. model parameters. This information
can be accessed using the related :doc:`compute mliap <compute_mliap>` command.
The pair_style *mliap* command must be followed by two keywords
*model* and *descriptor* in either order. A single
@ -46,10 +61,10 @@ where N is the number of LAMMPS atom types.
The *model* keyword is followed by a model style, currently limited to
either *linear* or *quadratic*. In both cases,
this is followed by a single argument specifying the model filename containing the
linear or quadratic coefficients for a set of elements.
this is followed by a single argument specifying the model filename containing the
parameters for a set of elements.
The model filename usually ends in the *.mliap.model* extension.
It may contain coefficients for many elements. The only requirement is that it
It may contain parameters for many elements. The only requirement is that it
contain at least those element names appearing in the
*pair_coeff* command.
@ -58,10 +73,10 @@ but follows a strict format after that. The first non-blank non-comment
line must contain two integers:
* nelems = Number of elements
* ncoeff = Number of coefficients
* nparams = Number of parameters
This is followed by one block for each of the *nelem* elements.
Each block consists of *ncoeff* coefficients, one per line.
Each block consists of *nparams* parameters, one per line.
Note that this format is similar, but not identical to that used
for the :doc:`pair_style snap <pair_snap>` coefficient file.
Specifically, the line containing the element weight and radius is omitted,
@ -131,6 +146,6 @@ See the :doc:`Build package <Build_package>` doc page for more info.
Related commands
""""""""""""""""
:doc:`pair_style snap <pair_snap>`,
:doc:`pair_style snap <pair_snap>`, :doc:`compute mliap <compute_mliap>`
**Default:** none

View File

@ -201,21 +201,21 @@ accelerated styles exist.
* :doc:`lj/class2/soft <pair_fep_soft>` - COMPASS (class 2) force field with no Coulomb with a soft core
* :doc:`lj/cubic <pair_lj_cubic>` - LJ with cubic after inflection point
* :doc:`lj/cut <pair_lj>` - cutoff Lennard-Jones potential without Coulomb
* :doc:`lj/cut/coul/cut <pair_lj>` - LJ with cutoff Coulomb
* :doc:`lj/cut/coul/cut <pair_lj_cut_coul>` - LJ with cutoff Coulomb
* :doc:`lj/cut/coul/cut/soft <pair_fep_soft>` - LJ with cutoff Coulomb with a soft core
* :doc:`lj/cut/coul/debye <pair_lj>` - LJ with Debye screening added to Coulomb
* :doc:`lj/cut/coul/dsf <pair_lj>` - LJ with Coulomb via damped shifted forces
* :doc:`lj/cut/coul/long <pair_lj>` - LJ with long-range Coulomb
* :doc:`lj/cut/coul/debye <pair_lj_cut_coul>` - LJ with Debye screening added to Coulomb
* :doc:`lj/cut/coul/dsf <pair_lj_cut_coul>` - LJ with Coulomb via damped shifted forces
* :doc:`lj/cut/coul/long <pair_lj_cut_coul>` - LJ with long-range Coulomb
* :doc:`lj/cut/coul/long/cs <pair_cs>` - LJ with long-range Coulomb with core/shell adjustments
* :doc:`lj/cut/coul/long/soft <pair_fep_soft>` - LJ with long-range Coulomb with a soft core
* :doc:`lj/cut/coul/msm <pair_lj>` - LJ with long-range MSM Coulomb
* :doc:`lj/cut/coul/wolf <pair_lj>` - LJ with Coulomb via Wolf potential
* :doc:`lj/cut/coul/msm <pair_lj_cut_coul>` - LJ with long-range MSM Coulomb
* :doc:`lj/cut/coul/wolf <pair_lj_cut_coul>` - LJ with Coulomb via Wolf potential
* :doc:`lj/cut/dipole/cut <pair_dipole>` - point dipoles with cutoff
* :doc:`lj/cut/dipole/long <pair_dipole>` - point dipoles with long-range Ewald
* :doc:`lj/cut/soft <pair_fep_soft>` - LJ with a soft core
* :doc:`lj/cut/thole/long <pair_thole>` - LJ with Coulomb with thole damping
* :doc:`lj/cut/tip4p/cut <pair_lj>` - LJ with cutoff Coulomb for TIP4P water
* :doc:`lj/cut/tip4p/long <pair_lj>` - LJ with long-range Coulomb for TIP4P water
* :doc:`lj/cut/tip4p/cut <pair_lj_cut_tip4p>` - LJ with cutoff Coulomb for TIP4P water
* :doc:`lj/cut/tip4p/long <pair_lj_cut_tip4p>` - LJ with long-range Coulomb for TIP4P water
* :doc:`lj/cut/tip4p/long/soft <pair_fep_soft>` - LJ with cutoff Coulomb for TIP4P water with a soft core
* :doc:`lj/expand <pair_lj_expand>` - Lennard-Jones for variable size particles
* :doc:`lj/expand/coul/long <pair_lj_expand>` - Lennard-Jones for variable size particles with long-range Coulomb

View File

@ -98,7 +98,7 @@ more of the optional keywords listed above for the pair_style command.
These are *ewald* or *pppm* or *msm* or *dispersion* or *tip4p*\ . This
is so LAMMPS can insure the short-range potential and long-range
solver are compatible with each other, as it does for other
short-range pair styles, such as :doc:`pair_style lj/cut/coul/long <pair_lj>`. Note that it is up to you to insure
short-range pair styles, such as :doc:`pair_style lj/cut/coul/long <pair_lj_cut_coul>`. Note that it is up to you to insure
the tabulated values for each pair of atom types has the correct
functional form to be compatible with the matching long-range solver.

View File

@ -182,7 +182,7 @@ Related commands
""""""""""""""""
:doc:`fix drude <fix_drude>`, :doc:`fix langevin/drude <fix_langevin_drude>`, :doc:`fix drude/transform <fix_drude_transform>`, :doc:`compute temp/drude <compute_temp_drude>`
:doc:`pair_style lj/cut/coul/long <pair_lj>`
:doc:`pair_style lj/cut/coul/long <pair_lj_cut_coul>`
**Default:** none

View File

@ -1,14 +1,14 @@
.. index:: reset_ids
.. index:: reset_atom_ids
reset_ids command
=================
reset_atom_ids command
======================
Syntax
""""""
.. code-block:: LAMMPS
reset_ids keyword values ...
reset_atom_ids keyword values ...
* zero or more keyword/value pairs may be appended
* keyword = *sort*
@ -22,8 +22,8 @@ Examples
.. code-block:: LAMMPS
reset_ids
reset_ids sort yes
reset_atom_ids
reset_atom_ids sort yes
Description
"""""""""""
@ -77,7 +77,7 @@ processor have consecutive IDs, as the :doc:`create_atoms
that are owned by other processors. The :doc:`comm_modify cutoff <comm_modify>` command can be used to correct this issue.
Or you can define a pair style before using this command. If you do
the former, you should unset the comm_modify cutoff after using
reset_ids so that subsequent communication is not inefficient.
reset_atom_ids so that subsequent communication is not inefficient.
Restrictions
""""""""""""

116
doc/src/reset_mol_ids.rst Normal file
View File

@ -0,0 +1,116 @@
.. index:: reset_mol_ids
reset_mol_ids command
=====================
Syntax
""""""
.. parsed-literal::
reset_mol_ids group-ID keyword value ...
* group-ID = ID of group of atoms whose molecule IDs will be reset
* zero or more keyword/value pairs may be appended
* keyword = *compress* or *offset* or *single*
.. parsed-literal::
*compress* value = *yes* or *no*
*offset* value = *Noffset* >= -1
*single* value = *yes* or *no* to treat single atoms (no bonds) as molecules
Examples
""""""""
.. code-block:: LAMMPS
reset_mol_ids all
reset_mol_ids all offset 10 single yes
reset_mol_ids solvent compress yes offset 100
reset_mol_ids solvent compress no
Description
"""""""""""
Reset molecule IDs for a group of atoms based on current bond
connectivity. This will typically create a new set of molecule IDs
for atoms in the group. Only molecule IDs for atoms in the specified
group are reset; molecule IDs for atoms not in the group are not
changed.
For purposes of this operation, molecules are identified by the current
bond connectivity in the system, which may or may not be consistent with
the current molecule IDs. A molecule in this context is a set of atoms
connected to each other with explicit bonds. The specific algorithm
used is the one of :doc:`compute fragment/atom <compute_cluster_atom>`
Once the molecules are identified and a new molecule ID computed for
each, this command will update the current molecule ID for all atoms in
the group with the new molecule ID. Note that if the group excludes
atoms within molecules, one (physical) molecule may become two or more
(logical) molecules. For example if the group excludes atoms in the
middle of a linear chain, then each end of the chain is considered an
independent molecule and will be assigned a different molecule ID.
This can be a useful operation to perform after running reactive
molecular dynamics run with :doc:`fix bond/react <fix_bond_react>`,
:doc:`fix bond/create <fix_bond_create>`, or :doc:`fix bond/break
<fix_bond_break>`, all of which can change molecule topologies. It can
also be useful after molecules have been deleted with the
:doc:`delete_atoms <delete_atoms>` command or after a simulation which
has lost molecules, e.g. via the :doc:`fix evaporate <fix_evaporate>`
command.
The *compress* keyword determines how new molecule IDs are computed. If
the setting is *yes* (the default) and there are N molecules in the
group, the new molecule IDs will be a set of N contiguous values. See
the *offset* keyword for details on selecting the range of these values.
If the setting is *no*, the molecule ID of every atom in the molecule
will be set to the smallest atom ID of any atom in the molecule.
The *single* keyword determines whether single atoms (not bonded to
another atom) are treated as one-atom molecules or not, based on the
*yes* or *no* setting. If the setting is *no* (the default), their
molecule IDs are set to 0. This setting can be important if the new
molecule IDs will be used as input to other commands such as
:doc:`compute chunk/atom molecule <compute_chunk_atom>` or :doc:`fix
rigid molecule <fix_rigid>`.
The *offset* keyword is only used if the *compress* setting is *yes*.
Its default value is *Noffset* = -1. In that case, if the specified
group is *all*, then the new compressed molecule IDs will range from 1
to N. If the specified group is not *all* and the largest molecule ID
of atoms outside that group is M, then the new compressed molecule IDs will
range from M+1 to M+N, to avoid collision with existing molecule
IDs. If an *Noffset* >= 0 is specified, then the new compressed
molecule IDs will range from *Noffset*\ +1 to *Noffset*\ +N. If the group
is not *all* there may be collisions with the molecule IDs of other atoms.
.. note::
The same as explained for the :doc:`compute fragment/atom
<compute_cluster_atom>` command, molecules are identified using the
current bond topology. This will not account for bonds broken by
the :doc:`bond_style quartic <bond_quartic>` command because it
does not perform a full update of the bond topology data structures
within LAMMPS.
Restrictions
""""""""""""
none
Related commands
""""""""""""""""
:doc:`reset_atom_ids <reset_atom_ids>`, :doc:`fix bond/react <fix_bond_react>`,
:doc:`fix bond/create <fix_bond_create>`,
:doc:`fix bond/break <fix_bond_break>`,
:doc:`fix evaporate <fix_evaporate>`,
:doc:`delete_atoms <delete_atoms>`,
:doc:`compute fragment/atom <compute_cluster_atom>`
Default
"""""""
The default keyword settings are compress = yes, single = no, and
offset = -1.