Merge branch 'clean-master2' of github.com:julient31/lammps into STT2
This commit is contained in:
@ -18,8 +18,8 @@ digraph lammps {
|
||||
Up [shape=box label="Update" color=blue]
|
||||
Un [shape=box label="Universe" color=blue]
|
||||
Ti [shape=box label="Timer" color=blue]
|
||||
Lt [label="Lattice"]
|
||||
Rg [label="Region" color=red]
|
||||
Lt [label="Lattice"]
|
||||
Rb [shape=box label="RegionBlock"]
|
||||
Rs [shape=box label="RegionSphere"]
|
||||
Av [label="AtomVec" color=red]
|
||||
@ -34,6 +34,7 @@ digraph lammps {
|
||||
Du [label="Dump" color=red]
|
||||
Fi [label="Fix" color=red]
|
||||
Cp [label="Compute" color=red]
|
||||
Cm [label="Command" color=red]
|
||||
Th [label="Thermo"]
|
||||
Va [label="Variable"]
|
||||
Ew [shape=box label="Ewald"]
|
||||
@ -71,16 +72,19 @@ digraph lammps {
|
||||
Dg [shape=box label="DumpCFG"]
|
||||
Ve [shape=box label="Verlet"]
|
||||
Rr [shape=box label="Respa"]
|
||||
Ru [shape=box label="Run"]
|
||||
Se [shape=box label="Set"]
|
||||
Pt [shape=box label="PPPMTIP4P"]
|
||||
Vs [shape=box label="VerletSplit"]
|
||||
Ro [shape=box label="RespaOMP"]
|
||||
Mc [shape=box label="MinCG"]
|
||||
Mf [shape=box label="MinFire"]
|
||||
La -> {At Ci Co Do Er Fo Gr In Me Mo Ne Ou Ti Up Un} [penwidth=2]
|
||||
Do -> {Lt Rg} [penwidth=2]
|
||||
Do -> {Rg Lt} [penwidth=2]
|
||||
Rg -> {Rb Rs} [style=dashed penwidth=2]
|
||||
Co -> {Cb Ct} [style=dashed penwidth=2]
|
||||
In -> Va [penwidth=2]
|
||||
In -> {Va Cm} [penwidth=2]
|
||||
Cm -> {Ru Se} [style=dashed penwidth=2]
|
||||
Mo -> {Fi Cp} [penwidth=2]
|
||||
Fo -> {Pa Bo An Di Im Ks} [penwidth=2]
|
||||
Ks -> {Ew Pp} [style=dashed penwidth=2]
|
||||
|
||||
@ -52,6 +52,7 @@ This is the list of packages that may require additional steps.
|
||||
* :ref:`USER-MESONT <user-mesont>`
|
||||
* :ref:`USER-MOLFILE <user-molfile>`
|
||||
* :ref:`USER-NETCDF <user-netcdf>`
|
||||
* :ref:`USER-PACE <user-pace>`
|
||||
* :ref:`USER-PLUMED <user-plumed>`
|
||||
* :ref:`USER-OMP <user-omp>`
|
||||
* :ref:`USER-QMMM <user-qmmm>`
|
||||
@ -1247,6 +1248,46 @@ be built for the most part with all major versions of the C++ language.
|
||||
|
||||
----------
|
||||
|
||||
.. _user-pace:
|
||||
|
||||
USER-PACE package
|
||||
-----------------------------
|
||||
|
||||
This package requires a library that can be downloaded and built
|
||||
in lib/pace or somewhere else, which must be done before building
|
||||
LAMMPS with this package. The code for the library can be found
|
||||
at: `https://github.com/ICAMS/lammps-user-pace/ <https://github.com/ICAMS/lammps-user-pace/>`_
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
By default the library will be downloaded from the git repository
|
||||
and built automatically when the USER-PACE package is enabled with
|
||||
``-D PKG_USER-PACE=yes``. The location for the sources may be
|
||||
customized by setting the variable ``PACELIB_URL`` when
|
||||
configuring with CMake (e.g. to use a local archive on machines
|
||||
without internet access). Since CMake checks the validity of the
|
||||
archive with ``md5sum`` you may also need to set ``PACELIB_MD5``
|
||||
if you provide a different library version than what is downloaded
|
||||
automatically.
|
||||
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
You can download and build the USER-PACE library
|
||||
in one step from the ``lammps/src`` dir, using these commands,
|
||||
which invoke the ``lib/pace/Install.py`` script.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ make lib-pace # print help message
|
||||
$ make lib-pace args="-b" # download and build the default version in lib/pace
|
||||
|
||||
You should not need to edit the ``lib/pace/Makefile.lammps`` file.
|
||||
|
||||
----------
|
||||
|
||||
.. _user-plumed:
|
||||
|
||||
USER-PLUMED package
|
||||
|
||||
@ -30,17 +30,17 @@ steps, as explained on the :doc:`Build extras <Build_extras>` page.
|
||||
These links take you to the extra instructions for those select
|
||||
packages:
|
||||
|
||||
+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`COMPRESS <compress>` | :ref:`GPU <gpu>` | :ref:`KIM <kim>` | :ref:`KOKKOS <kokkos>` | :ref:`LATTE <latte>` | :ref:`MESSAGE <message>` |
|
||||
+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`MSCG <mscg>` | :ref:`OPT <opt>` | :ref:`POEMS <poems>` | :ref:`PYTHON <python>` | :ref:`VORONOI <voronoi>` | :ref:`USER-ADIOS <user-adios>` |
|
||||
+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`USER-ATC <user-atc>` | :ref:`USER-AWPMD <user-awpmd>` | :ref:`USER-COLVARS <user-colvars>` | :ref:`USER-H5MD <user-h5md>` | :ref:`USER-INTEL <user-intel>` | :ref:`USER-MOLFILE <user-molfile>` |
|
||||
+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`USER-NETCDF <user-netcdf>` | :ref:`USER-PLUMED <user-plumed>` | :ref:`USER-OMP <user-omp>` | :ref:`USER-QMMM <user-qmmm>` | :ref:`USER-QUIP <user-quip>` | :ref:`USER-SCAFACOS <user-scafacos>` |
|
||||
+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`USER-SMD <user-smd>` | :ref:`USER-VTK <user-vtk>` | | | | |
|
||||
+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
+--------------------------------------+--------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`COMPRESS <compress>` | :ref:`GPU <gpu>` | :ref:`KIM <kim>` | :ref:`KOKKOS <kokkos>` | :ref:`LATTE <latte>` | :ref:`MESSAGE <message>` |
|
||||
+--------------------------------------+--------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`MSCG <mscg>` | :ref:`OPT <opt>` | :ref:`POEMS <poems>` | :ref:`PYTHON <python>` | :ref:`VORONOI <voronoi>` | :ref:`USER-ADIOS <user-adios>` |
|
||||
+--------------------------------------+--------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`USER-ATC <user-atc>` | :ref:`USER-AWPMD <user-awpmd>` | :ref:`USER-COLVARS <user-colvars>` | :ref:`USER-H5MD <user-h5md>` | :ref:`USER-INTEL <user-intel>` | :ref:`USER-MOLFILE <user-molfile>` |
|
||||
+--------------------------------------+--------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`USER-NETCDF <user-netcdf>` | :ref:`USER-PACE <user-pace>` | :ref:`USER-PLUMED <user-plumed>` | :ref:`USER-OMP <user-omp>` | :ref:`USER-QMMM <user-qmmm>` | :ref:`USER-QUIP <user-quip>` |
|
||||
+--------------------------------------+--------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`USER-SCAFACOS <user-scafacos>` | :ref:`USER-SMD <user-smd>` | :ref:`USER-VTK <user-vtk>` | | | |
|
||||
+--------------------------------------+--------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
|
||||
The mechanism for including packages is simple but different for CMake
|
||||
versus make.
|
||||
|
||||
@ -46,6 +46,7 @@ OPT.
|
||||
* :doc:`bond/react <fix_bond_react>`
|
||||
* :doc:`bond/swap <fix_bond_swap>`
|
||||
* :doc:`box/relax <fix_box_relax>`
|
||||
* :doc:`charge/regulation <fix_charge_regulation>`
|
||||
* :doc:`client/md <fix_client_md>`
|
||||
* :doc:`cmap <fix_cmap>`
|
||||
* :doc:`colvars <fix_colvars>`
|
||||
|
||||
@ -216,6 +216,7 @@ OPT.
|
||||
* :doc:`oxrna2/stk <pair_oxrna2>`
|
||||
* :doc:`oxrna2/xstk <pair_oxrna2>`
|
||||
* :doc:`oxrna2/coaxstk <pair_oxrna2>`
|
||||
* :doc:`pace <pair_pace>`
|
||||
* :doc:`peri/eps <pair_peri>`
|
||||
* :doc:`peri/lps (o) <pair_peri>`
|
||||
* :doc:`peri/pmb (o) <pair_peri>`
|
||||
|
||||
@ -49,8 +49,8 @@ underscore character '_' to separate words. Outside of bundled libraries
|
||||
which may have different conventions, all C and C++ header files have a
|
||||
``.h`` extension, all C++ files have a ``.cpp`` extension, and C files a
|
||||
``.c`` extension. A small number of C++ classes and utility functions
|
||||
are implemented with only a ``.h`` file. Examples are the Pointer class
|
||||
or the MathVec functions.
|
||||
are implemented with only a ``.h`` file. Examples are the Pointers and
|
||||
Commands classes or the MathVec functions.
|
||||
|
||||
Class topology
|
||||
--------------
|
||||
@ -144,7 +144,7 @@ implement specific commands that can be invoked before, after, or in
|
||||
between runs. For these an instance of the class is created, its
|
||||
command() method called and then, after completion, the class instance
|
||||
deleted. Examples for this are the create_box, create_atoms, minimize,
|
||||
run, or velocity command styles.
|
||||
run, set, or velocity command styles.
|
||||
|
||||
For all those ``styles`` certain naming conventions are employed: for
|
||||
the fix nve command the class is called FixNVE and the source files are
|
||||
@ -175,11 +175,11 @@ follows:
|
||||
- The Input class reads and processes input input strings and files,
|
||||
stores variables, and invokes :doc:`commands <Commands_all>`.
|
||||
|
||||
- As discussed above, command style classes are directly derived from
|
||||
the Pointers class. They provide input script commands that perform
|
||||
one-time operations before/after/between simulations or which invoke a
|
||||
simulation. They are instantiated from within the Input class,
|
||||
invoked, then immediately destructed.
|
||||
- Command style classes are derived from the Command class. They provide
|
||||
input script commands that perform one-time operations
|
||||
before/after/between simulations or which invoke a simulation. They
|
||||
are usually instantiated from within the Input class, its ``command``
|
||||
method invoked, and then immediately destructed.
|
||||
|
||||
- The Finish class is instantiated to print statistics to the screen
|
||||
after a simulation is performed, by commands like run and minimize.
|
||||
|
||||
@ -59,31 +59,25 @@ Members of ``lammpsplugin_t``
|
||||
* - author
|
||||
- String with the name and email of the author
|
||||
* - creator.v1
|
||||
- Pointer to factory function for pair, bond, angle, dihedral, or improper styles
|
||||
- Pointer to factory function for pair, bond, angle, dihedral, improper or command styles
|
||||
* - creator.v2
|
||||
- Pointer to factory function for compute, fix, or region styles
|
||||
* - creator.v3
|
||||
- Pointer to factory function for command styles
|
||||
* - handle
|
||||
- Pointer to the open DSO file handle
|
||||
|
||||
Only one of the three alternate creator entries can be used at a time
|
||||
and which of those is determined by the style of plugin. The "creator.v1"
|
||||
element is for factory functions of supported styles computing forces (i.e.
|
||||
pair, bond, angle, dihedral, or improper styles) and the function takes
|
||||
as single argument the pointer to the LAMMPS instance. The factory function
|
||||
is cast to the ``lammpsplugin_factory1`` type before assignment. The
|
||||
"creator.v2" element is for factory functions creating an instance of
|
||||
a fix, compute, or region style and takes three arguments: a pointer to
|
||||
the LAMMPS instance, an integer with the length of the argument list and
|
||||
a ``char **`` pointer to the list of arguments. The factory function pointer
|
||||
needs to be cast to the ``lammpsplugin_factory2`` type before assignment.
|
||||
The "creator.v3" element takes the same arguments as "creator.v3" but is
|
||||
specific to creating command styles: the factory function has to instantiate
|
||||
the command style locally passing the LAMMPS pointer as argument and then
|
||||
call its "command" member function with the number and list of arguments.
|
||||
The factory function pointer needs to be cast to the
|
||||
``lammpsplugin_factory3`` type before assignment.
|
||||
and which of those is determined by the style of plugin. The
|
||||
"creator.v1" element is for factory functions of supported styles
|
||||
computing forces (i.e. command, pair, bond, angle, dihedral, or
|
||||
improper styles) and the function takes as single argument the pointer
|
||||
to the LAMMPS instance. The factory function is cast to the
|
||||
``lammpsplugin_factory1`` type before assignment. The "creator.v2"
|
||||
element is for factory functions creating an instance of a fix, compute,
|
||||
or region style and takes three arguments: a pointer to the LAMMPS
|
||||
instance, an integer with the length of the argument list and a ``char
|
||||
**`` pointer to the list of arguments. The factory function pointer
|
||||
needs to be cast to the ``lammpsplugin_factory2`` type before
|
||||
assignment.
|
||||
|
||||
Pair style example
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
@ -123,12 +117,12 @@ function would look like this:
|
||||
|
||||
The factory function in this example is called ``morse2creator()``. It
|
||||
receives a pointer to the LAMMPS class as only argument and thus has to
|
||||
be assigned to the *creator.v1* member of the plugin struct and cast to the
|
||||
``lammpsplugin_factory1`` pointer type. It returns a
|
||||
be assigned to the *creator.v1* member of the plugin struct and cast to
|
||||
the ``lammpsplugin_factory1`` function pointer type. It returns a
|
||||
pointer to the allocated class instance derived from the ``Pair`` class.
|
||||
This function may be declared static to avoid clashes with other plugins.
|
||||
The name of the derived class, ``PairMorse2``, must be unique inside
|
||||
the entire LAMMPS executable.
|
||||
This function may be declared static to avoid clashes with other
|
||||
plugins. The name of the derived class, ``PairMorse2``, however must be
|
||||
unique inside the entire LAMMPS executable.
|
||||
|
||||
Fix style example
|
||||
^^^^^^^^^^^^^^^^^
|
||||
@ -169,9 +163,9 @@ Below is an example for that:
|
||||
|
||||
Command style example
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
For command styles there is a third variant of factory function as
|
||||
Command styles also use the first variant of factory function as
|
||||
demonstrated in the following example, which also shows that the
|
||||
implementation of the plugin class may also be within the same
|
||||
implementation of the plugin class may be within the same source
|
||||
file as the plugin interface code:
|
||||
|
||||
.. code-block:: C++
|
||||
@ -180,15 +174,15 @@ file as the plugin interface code:
|
||||
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "pointers.h"
|
||||
#include "command.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
class Hello : protected Pointers {
|
||||
class Hello : public Command {
|
||||
public:
|
||||
Hello(class LAMMPS *lmp) : Pointers(lmp) {};
|
||||
Hello(class LAMMPS *lmp) : Command(lmp) {};
|
||||
void command(int, char **);
|
||||
};
|
||||
}
|
||||
@ -202,10 +196,9 @@ file as the plugin interface code:
|
||||
utils::logmesg(lmp,fmt::format("Hello, {}!\n",argv[0]));
|
||||
}
|
||||
|
||||
static void hellocreator(LAMMPS *lmp, int argc, char **argv)
|
||||
static void hellocreator(LAMMPS *lmp)
|
||||
{
|
||||
Hello hello(lmp);
|
||||
hello.command(argc,argv);
|
||||
return new Hello(lmp);
|
||||
}
|
||||
|
||||
extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
|
||||
@ -216,9 +209,9 @@ file as the plugin interface code:
|
||||
plugin.version = LAMMPS_VERSION;
|
||||
plugin.style = "command";
|
||||
plugin.name = "hello";
|
||||
plugin.info = "Hello world command v1.0";
|
||||
plugin.info = "Hello world command v1.1";
|
||||
plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)";
|
||||
plugin.creator.v3 = (lammpsplugin_factory3 *) &hellocreator;
|
||||
plugin.creator.v1 = (lammpsplugin_factory1 *) &hellocreator;
|
||||
plugin.handle = handle;
|
||||
(*register_plugin)(&plugin,lmp);
|
||||
}
|
||||
|
||||
@ -21,8 +21,8 @@ orientations and their associated inter-atomic distances.
|
||||
|
||||
The command :doc:`fix precession/spin <fix_precession_spin>` allows to
|
||||
apply a constant magnetic torque on all the spins in the system. This
|
||||
torque can be an external magnetic field (Zeeman interaction), or an
|
||||
uniaxial magnetic anisotropy.
|
||||
torque can be an external magnetic field (Zeeman interaction), and an
|
||||
uniaxial or cubic magnetic anisotropy.
|
||||
|
||||
A Langevin thermostat can be applied to those magnetic spins using
|
||||
:doc:`fix langevin/spin <fix_langevin_spin>`. Typically, this thermostat
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 286 KiB |
@ -1,14 +1,15 @@
|
||||
Input script command style
|
||||
==========================
|
||||
|
||||
New commands can be added to LAMMPS input scripts by adding new
|
||||
classes that have a "command" method. For example, the create_atoms,
|
||||
read_data, velocity, and run commands are all implemented in this
|
||||
fashion. When such a command is encountered in the LAMMPS input
|
||||
script, LAMMPS simply creates a class with the corresponding name,
|
||||
invokes the "command" method of the class, and passes it the arguments
|
||||
from the input script. The command method can perform whatever
|
||||
operations it wishes on LAMMPS data structures.
|
||||
New commands can be added to LAMMPS input scripts by adding new classes
|
||||
that are derived from the Command class and thus must have a "command"
|
||||
method. For example, the create_atoms, read_data, velocity, and run
|
||||
commands are all implemented in this fashion. When such a command is
|
||||
encountered in the LAMMPS input script, LAMMPS simply creates a class
|
||||
instance with the corresponding name, invokes the "command" method of
|
||||
the class, and passes it the arguments from the input script. The
|
||||
command method can perform whatever operations it wishes on LAMMPS data
|
||||
structures.
|
||||
|
||||
The single method your new class must define is as follows:
|
||||
|
||||
|
||||
@ -90,6 +90,7 @@ page gives those details.
|
||||
* :ref:`USER-MOLFILE <PKG-USER-MOLFILE>`
|
||||
* :ref:`USER-NETCDF <PKG-USER-NETCDF>`
|
||||
* :ref:`USER-OMP <PKG-USER-OMP>`
|
||||
* :ref:`USER-PACE <PKG-USER-PACE>`
|
||||
* :ref:`USER-PHONON <PKG-USER-PHONON>`
|
||||
* :ref:`USER-PLUMED <PKG-USER-PLUMED>`
|
||||
* :ref:`USER-PTM <PKG-USER-PTM>`
|
||||
@ -585,7 +586,7 @@ MC package
|
||||
Several fixes and a pair style that have Monte Carlo (MC) or MC-like
|
||||
attributes. These include fixes for creating, breaking, and swapping
|
||||
bonds, for performing atomic swaps, and performing grand-canonical MC
|
||||
(GCMC) in conjunction with dynamics.
|
||||
(GCMC) or similar processes in conjunction with dynamics.
|
||||
|
||||
**Supporting info:**
|
||||
|
||||
@ -593,8 +594,12 @@ bonds, for performing atomic swaps, and performing grand-canonical MC
|
||||
* :doc:`fix atom/swap <fix_atom_swap>`
|
||||
* :doc:`fix bond/break <fix_bond_break>`
|
||||
* :doc:`fix bond/create <fix_bond_create>`
|
||||
* :doc:`fix bond/create/angle <fix_bond_create>`
|
||||
* :doc:`fix bond/swap <fix_bond_swap>`
|
||||
* :doc:`fix charge/regulation <fix_charge_regulation>`
|
||||
* :doc:`fix gcmc <fix_gcmc>`
|
||||
* :doc:`fix tfmc <fix_tfmc>`
|
||||
* :doc:`fix widom <fix_widom>`
|
||||
* :doc:`pair_style dsmc <pair_dsmc>`
|
||||
* https://lammps.sandia.gov/movies.html#gcmc
|
||||
|
||||
@ -1349,6 +1354,46 @@ This package has :ref:`specific installation instructions <user-colvars>` on the
|
||||
|
||||
----------
|
||||
|
||||
.. _PKG-USER-PACE:
|
||||
|
||||
USER-PACE package
|
||||
-------------------
|
||||
|
||||
**Contents:**
|
||||
|
||||
A pair style for the Atomic Cluster Expansion potential (ACE).
|
||||
ACE is a methodology for deriving a highly accurate classical potential
|
||||
fit to a large archive of quantum mechanical (DFT) data. The USER-PACE
|
||||
package provides an efficient implementation for running simulations
|
||||
with ACE potentials.
|
||||
|
||||
**Authors:**
|
||||
|
||||
This package was written by Yury Lysogorskiy^1,
|
||||
Cas van der Oord^2, Anton Bochkarev^1,
|
||||
Sarath Menon^1, Matteo Rinaldi^1, Thomas Hammerschmidt^1, Matous Mrovec^1,
|
||||
Aidan Thompson^3, Gabor Csanyi^2, Christoph Ortner^4, Ralf Drautz^1.
|
||||
|
||||
^1: Ruhr-University Bochum, Bochum, Germany
|
||||
|
||||
^2: University of Cambridge, Cambridge, United Kingdom
|
||||
|
||||
^3: Sandia National Laboratories, Albuquerque, New Mexico, USA
|
||||
|
||||
^4: University of British Columbia, Vancouver, BC, Canada
|
||||
|
||||
**Install:**
|
||||
|
||||
This package has :ref:`specific installation instructions <user-pace>` on the :doc:`Build extras <Build_extras>` page.
|
||||
|
||||
**Supporting info:**
|
||||
|
||||
* src/USER-PACE: filenames -> commands
|
||||
* :doc:`pair_style pace <pair_pace>`
|
||||
* examples/USER/pace
|
||||
|
||||
----------
|
||||
|
||||
.. _PKG-USER-PLUMED:
|
||||
|
||||
USER-PLUMED package
|
||||
|
||||
@ -81,6 +81,8 @@ package:
|
||||
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
|
||||
| :ref:`USER-OMP <PKG-USER-OMP>` | OpenMP-enabled styles | :doc:`Speed omp <Speed_omp>` | `Benchmarks <https://lammps.sandia.gov/bench.html>`_ | no |
|
||||
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
|
||||
| :ref:`USER-PACE <PKG-USER-PACE>` | Fast implementation of Atomic Cluster Expansion (ACE) potential | :doc:`pair pace <pair_pace>` | USER/pace | ext |
|
||||
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
|
||||
| :ref:`USER-PHONON <PKG-USER-PHONON>` | phonon dynamical matrix | :doc:`fix phonon <fix_phonon>` | USER/phonon | no |
|
||||
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
|
||||
| :ref:`USER-PLUMED <PKG-USER-PLUMED>` | :ref:`PLUMED <PLUMED>` free energy library | :doc:`fix plumed <fix_plumed>` | USER/plumed | ext |
|
||||
|
||||
@ -27,7 +27,7 @@ Syntax
|
||||
template-ID = ID of molecule template specified in a separate :doc:`molecule <molecule>` command
|
||||
*hybrid* args = list of one or more sub-styles, each with their args
|
||||
|
||||
* accelerated styles (with same args) = *angle/kk* or *atomic/kk* or *bond/kk* or *charge/kk* or *full/kk* or *molecular/kk*
|
||||
* accelerated styles (with same args) = *angle/kk* or *atomic/kk* or *bond/kk* or *charge/kk* or *full/kk* or *molecular/kk* or *spin/kk*
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
@ -308,9 +308,9 @@ performed with dump style *xtc*\ .
|
||||
|
||||
----------
|
||||
|
||||
The *format* keyword can be used to change the default numeric format
|
||||
output by the text-based dump styles: *atom*\ , *custom*\ , *cfg*\ , and
|
||||
*xyz* styles, and their MPIIO variants. Only the *line* or *none*
|
||||
The *format* keyword can be used to change the default numeric format output
|
||||
by the text-based dump styles: *atom*\ , *local*\ , *custom*\ , *cfg*\ , and
|
||||
*xyz* styles, and their MPIIO variants. Only the *line* or *none*
|
||||
options can be used with the *atom* and *xyz* styles.
|
||||
|
||||
All the specified format strings are C-style formats, e.g. as used by
|
||||
@ -362,7 +362,7 @@ settings, reverting all values to their default format.
|
||||
|
||||
compute 1 all property/local batom1 batom2
|
||||
dump 1 all local 100 tmp.bonds index c_1[1] c_1[2]
|
||||
dump_modify 1 format "%d %0.0f %0.0f"
|
||||
dump_modify 1 format line "%d %0.0f %0.0f"
|
||||
|
||||
will output the two atom IDs for atoms in each bond as integers. If
|
||||
the dump_modify command were omitted, they would appear as
|
||||
|
||||
@ -189,6 +189,7 @@ accelerated styles exist.
|
||||
* :doc:`bond/react <fix_bond_react>` - apply topology changes to model reactions
|
||||
* :doc:`bond/swap <fix_bond_swap>` - Monte Carlo bond swapping
|
||||
* :doc:`box/relax <fix_box_relax>` - relax box size during energy minimization
|
||||
* :doc:`charge/regulation <fix_charge_regulation>` - Monte Carlo sampling of charge regulation
|
||||
* :doc:`client/md <fix_client_md>` - MD client for client/server simulations
|
||||
* :doc:`cmap <fix_cmap>` - enables CMAP cross-terms of the CHARMM force field
|
||||
* :doc:`colvars <fix_colvars>` - interface to the collective variables "Colvars" library
|
||||
|
||||
276
doc/src/fix_charge_regulation.rst
Normal file
276
doc/src/fix_charge_regulation.rst
Normal file
@ -0,0 +1,276 @@
|
||||
|
||||
.. index:: fix charge/regulation
|
||||
|
||||
fix charge/regulation command
|
||||
=============================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
fix ID group-ID charge/regulation cation_type anion_type keyword value(s)
|
||||
|
||||
* ID, group-ID are documented in fix command
|
||||
* charge/regulation = style name of this fix command
|
||||
* cation_type = atom type of free cations
|
||||
* anion_type = atom type of free anions
|
||||
|
||||
* zero or more keyword/value pairs may be appended
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
keyword = *pH*, *pKa*, *pKb*, *pIp*, *pIm*, *pKs*, *acid_type*, *base_type*, *lunit_nm*, *temp*, *tempfixid*, *nevery*, *nmc*, *xrd*, *seed*, *tag*, *group*, *onlysalt*, *pmcmoves*
|
||||
*pH* value = pH of the solution
|
||||
*pKa* value = acid dissociation constant
|
||||
*pKb* value = base dissociation constant
|
||||
*pIp* value = chemical potential of free cations
|
||||
*pIm* value = chemical potential of free anions
|
||||
*pKs* value = solution self-dissociation constant
|
||||
*acid_type* = atom type of acid groups
|
||||
*base_type* = atom type of base groups
|
||||
*lunit_nm* value = unit length used by LAMMPS (# in the units of nanometers)
|
||||
*temp* value = temperature
|
||||
*tempfixid* value = fix ID of temperature thermostat
|
||||
*nevery* value = invoke this fix every nevery steps
|
||||
*nmc* value = number of charge regulation MC moves to attempt every nevery steps
|
||||
*xrd* value = cutoff distance for acid/base reaction
|
||||
*seed* value = random # seed (positive integer)
|
||||
*tag* value = yes or no (yes: The code assign unique tags to inserted ions; no: The tag of all inserted ions is "0")
|
||||
*group* value = group-ID, inserted ions are assigned to group group-ID. Can be used multiple times to assign inserted ions to multiple groups.
|
||||
*onlysalt* values = flag charge_cation charge_anion.
|
||||
flag = yes or no (yes: the fix performs only ion insertion/deletion, no: perform acid/base dissociation and ion insertion/deletion)
|
||||
charge_cation, charge_anion = value of cation/anion charge, must be an integer (only specify if flag = yes)
|
||||
*pmcmoves* values = pmcA pmcB pmcI - MC move fractions for acid ionization (pmcA), base ionization (pmcB) and free ion exchange (pmcI)
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix chareg all charge/regulation 1 2 acid_type 3 base_type 4 pKa 5 pKb 7 lb 1.0 nevery 200 nexchange 200 seed 123 tempfixid fT
|
||||
|
||||
fix chareg all charge/regulation 1 2 pIp 3 pIm 3 onlysalt yes 2 -1 seed 123 tag yes temp 1.0
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
This fix performs Monte Carlo (MC) sampling of charge regulation and
|
||||
exchange of ions with a reservoir as discussed in :ref:`(Curk1) <Curk1>`
|
||||
and :ref:`(Curk2) <Curk2>`. The implemented method is largely analogous
|
||||
to the grand-reaction ensemble method in :ref:`(Landsgesell)
|
||||
<Landsgesell>`. The implementation is parallelized, compatible with
|
||||
existing LAMMPS functionalities, and applicable to any system utilizing
|
||||
discrete, ionizable groups or surface sites.
|
||||
|
||||
Specifically, the fix implements the following three types of MC moves,
|
||||
which discretely change the charge state of individual particles and
|
||||
insert ions into the systems: :math:`\mathrm{A} \rightleftharpoons
|
||||
\mathrm{A}^-+\mathrm{X}^+`, :math:`\mathrm{B} \rightleftharpoons
|
||||
\mathrm{B}^++\mathrm{X}^-`, and :math:`\emptyset \rightleftharpoons
|
||||
Z^-\mathrm{X}^{Z^+}+Z^+\mathrm{X}^{-Z^-}`. In the former two types of
|
||||
reactions, Monte Carlo moves alter the charge value of specific atoms
|
||||
(:math:`\mathrm{A}`, :math:`\mathrm{B}`) and simultaneously insert a
|
||||
counterion to preserve the charge neutrality of the system, modeling the
|
||||
dissociation/association process. The last type of reaction performs
|
||||
grand canonical MC exchange of ion pairs with a (fictitious) reservoir.
|
||||
|
||||
In our implementation "acid" refers to particles that can attain charge
|
||||
:math:`q=\{0,-1\}` and "base" to particles with :math:`q=\{0,1\}`,
|
||||
whereas the MC exchange of free ions allows any integer charge values of
|
||||
:math:`{Z^+}` and :math:`{Z^-}`.
|
||||
|
||||
Here we provide several practical examples for modeling charge
|
||||
regulation effects in solvated systems. An acid ionization reaction
|
||||
(:math:`\mathrm{A} \rightleftharpoons \mathrm{A}^-+\mathrm{H}^+`) can be
|
||||
defined via a single line in the input file
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix acid_reaction all charge/regulation 2 3 acid_type 1 pH 7.0 pKa 5.0 pIp 7.0 pIm 7.0
|
||||
|
||||
where the fix attempts to charge :math:`\mathrm{A}` (discharge
|
||||
:math:`\mathrm{A}^-`) to :math:`\mathrm{A}^-` (:math:`\mathrm{A}`) and
|
||||
insert (delete) a proton (atom type 2). Besides, the fix implements
|
||||
self-ionization reaction of water :math:`\emptyset \rightleftharpoons
|
||||
\mathrm{H}^++\mathrm{OH}^-`. However, this approach is highly
|
||||
inefficient at :math:`\mathrm{pH} \approx 7` when the concentration of
|
||||
both protons and hydroxyl ions is low, resulting in a relatively low
|
||||
acceptance rate of MC moves.
|
||||
|
||||
A more efficient way is to allow salt ions to participate in ionization
|
||||
reactions, which can be easily achieved via
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix acid_reaction all charge/regulation 4 5 acid_type 1 pH 7.0 pKa 5.0 pIp 2.0 pIm 2.0
|
||||
|
||||
where particles of atom type 4 and 5 are the salt cations and anions,
|
||||
both at chemical potential pI=2.0, see :ref:`(Curk1) <Curk1>` and
|
||||
:ref:`(Landsgesell) <Landsgesell>` for more details.
|
||||
|
||||
|
||||
Similarly, we could have simultaneously added a base ionization reaction
|
||||
(:math:`\mathrm{B} \rightleftharpoons \mathrm{B}^++\mathrm{OH}^-`)
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix base_reaction all charge/regulation 2 3 base_type 6 pH 7.0 pKb 6.0 pIp 7.0 pIm 7.0
|
||||
|
||||
where the fix will attempt to charge :math:`\mathrm{B}` (discharge
|
||||
:math:`\mathrm{B}^+`) to :math:`\mathrm{B}^+` (:math:`\mathrm{B}`) and
|
||||
insert (delete) a hydroxyl ion :math:`\mathrm{OH}^-` of atom type 3. If
|
||||
neither the acid or the base type is specified, for example,
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix salt_reaction all charge/regulation 4 5 pIp 2.0 pIm 2.0
|
||||
|
||||
the fix simply inserts or deletes an ion pair of a free cation (atom
|
||||
type 4) and a free anion (atom type 5) as done in a conventional
|
||||
grand-canonical MC simulation.
|
||||
|
||||
|
||||
The fix is compatible with LAMMPS sub-packages such as *molecule* or
|
||||
*rigid*. That said, the acid and base particles can be part of larger
|
||||
molecules or rigid bodies. Free ions that are inserted to or deleted
|
||||
from the system must be defined as single particles (no bonded
|
||||
interactions allowed) and cannot be part of larger molecules or rigid
|
||||
bodies. If *molecule* package is used, all inserted ions have a molecule
|
||||
ID equal to zero.
|
||||
|
||||
Note that LAMMPS implicitly assumes a constant number of particles
|
||||
(degrees of freedom). Since using this fix alters the total number of
|
||||
particles during the simulation, any thermostat used by LAMMPS, such as
|
||||
NVT or Langevin, must use a dynamic calculation of system
|
||||
temperature. This can be achieved by specifying a dynamic temperature
|
||||
compute (e.g. dtemp) and using it with the desired thermostat, e.g. a
|
||||
Langevin thermostat:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute dtemp all temp
|
||||
compute_modify dtemp dynamic yes
|
||||
fix fT all langevin 1.0 1.0 1.0 123
|
||||
fix_modify fT temp dtemp
|
||||
|
||||
The chemical potential units (e.g. pH) are in the standard log10
|
||||
representation assuming reference concentration :math:`\rho_0 =
|
||||
\mathrm{mol}/\mathrm{l}`. Therefore, to perform the internal unit
|
||||
conversion, the length (in nanometers) of the LAMMPS unit length must be
|
||||
specified via *lunit_nm* (default is set to the Bjerrum length in water
|
||||
at room temperature *lunit_nm* = 0.71nm). For example, in the dilute
|
||||
ideal solution limit, the concentration of free ions will be
|
||||
:math:`c_\mathrm{I} = 10^{-\mathrm{pIp}}\mathrm{mol}/\mathrm{l}`.
|
||||
|
||||
The temperature used in MC acceptance probability is set by *temp*. This
|
||||
temperature should be the same as the temperature set by the molecular
|
||||
dynamics thermostat. For most purposes, it is probably best to use
|
||||
*tempfixid* keyword which dynamically sets the temperature equal to the
|
||||
chosen MD thermostat temperature, in the example above we assumed the
|
||||
thermostat fix-ID is *fT*. The inserted particles attain a random
|
||||
velocity corresponding to the specified temperature. Using *tempfixid*
|
||||
overrides any fixed temperature set by *temp*.
|
||||
|
||||
The *xrd* keyword can be used to restrict the inserted/deleted
|
||||
counterions to a specific radial distance from an acid or base particle
|
||||
that is currently participating in a reaction. This can be used to
|
||||
simulate more realist reaction dynamics. If *xrd* = 0 or *xrd* > *L* /
|
||||
2, where *L* is the smallest box dimension, the radial restriction is
|
||||
automatically turned off and free ion can be inserted or deleted
|
||||
anywhere in the simulation box.
|
||||
|
||||
If the *tag yes* is used, every inserted atom gets a unique tag ID,
|
||||
otherwise, the tag of every inserted atom is set to 0. *tag yes* might
|
||||
cause an integer overflow in very long simulations since the tags are
|
||||
unique to every particle and thus increase with every successful
|
||||
particle insertion.
|
||||
|
||||
The *pmcmoves* keyword sets the relative probability of attempting the
|
||||
three types of MC moves (reactions): acid charging, base charging, and
|
||||
ion pair exchange. The fix only attempts to perform particle charging
|
||||
MC moves if *acid_type* or *base_type* is defined. Otherwise fix only
|
||||
performs free ion insertion/deletion. For example, if *acid_type* is not
|
||||
defined, *pmcA* is automatically set to 0. The vector *pmcmoves* is
|
||||
automatically normalized, for example, if set to *pmcmoves* 0 0.33 0.33,
|
||||
the vector would be normalized to [0,0.5,0.5].
|
||||
|
||||
The *only_salt* option can be used to perform multivalent
|
||||
grand-canonical ion-exchange moves. If *only_salt yes* is used, no
|
||||
charge exchange is performed, only ion insertion/deletion (*pmcmoves* is
|
||||
set to [0,0,1]), but ions can be multivalent. In the example above, an
|
||||
MC move would consist of three ion insertion/deletion to preserve the
|
||||
charge neutrality of the system.
|
||||
|
||||
The *group* keyword can be used to add inserted particles to a specific
|
||||
group-ID. All inserted particles are automatically added to group *all*.
|
||||
|
||||
|
||||
Output
|
||||
""""""
|
||||
|
||||
This fix computes a global vector of length 8, which can be accessed by
|
||||
various output commands. The vector values are the following global
|
||||
quantities:
|
||||
|
||||
* 1 = cumulative MC attempts
|
||||
* 2 = cumulative MC successes
|
||||
* 3 = current # of neutral acid atoms
|
||||
* 4 = current # of -1 charged acid atoms
|
||||
* 5 = current # of neutral base atoms
|
||||
* 6 = current # of +1 charged base atoms
|
||||
* 7 = current # of free cations
|
||||
* 8 = current # of free anions
|
||||
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This fix is part of the MC package. It is only enabled if LAMMPS
|
||||
was built with that package. See the :doc:`Build package
|
||||
<Build_package>` doc page for more info.
|
||||
|
||||
The :doc:`atom_style <atom_style>`, used must contain the charge
|
||||
property, for example, the style could be *charge* or *full*. Only
|
||||
usable for 3D simulations. Atoms specified as free ions cannot be part
|
||||
of rigid bodies or molecules and cannot have bonding interactions. The
|
||||
scheme is limited to integer charges, any atoms with non-integer charges
|
||||
will not be considered by the fix.
|
||||
|
||||
All interaction potentials used must be continuous, otherwise the MD
|
||||
integration and the particle exchange MC moves do not correspond to the
|
||||
same equilibrium ensemble. For example, if an lj/cut pair style is used,
|
||||
the LJ potential must be shifted so that it vanishes at the cutoff. This
|
||||
can be easily achieved using the :doc:`pair_modify <pair_modify>`
|
||||
command, i.e., by using: *pair_modify shift yes*.
|
||||
|
||||
.. note::
|
||||
|
||||
Region restrictions are not yet implemented.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fix gcmc <fix_gcmc>`,
|
||||
:doc:`fix atom/swap <fix_atom_swap>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
pH = 7.0; pKa = 100.0; pKb = 100.0; pIp = 5.0; pIm = 5.0; pKs = 14.0;
|
||||
acid_type = -1; base_type = -1; lunit_nm = 0.71; temp = 1.0; nevery =
|
||||
100; nmc = 100; xrd = 0; seed = 0; tag = no; onlysalt = no, pmcmoves =
|
||||
[1/3, 1/3, 1/3], group-ID = all
|
||||
|
||||
----------
|
||||
|
||||
.. _Curk1:
|
||||
|
||||
**(Curk1)** T. Curk, J. Yuan, and E. Luijten, "Coarse-grained simulation of charge regulation using LAMMPS", preprint (2021).
|
||||
|
||||
.. _Curk2:
|
||||
|
||||
**(Curk2)** T. Curk and E. Luijten, "Charge-regulation effects in nanoparticle self-assembly", PRL (2021)
|
||||
|
||||
.. _Landsgesell:
|
||||
|
||||
**(Landsgesell)** J. Landsgesell, P. Hebbeker, O. Rud, R. Lunkad, P. Kosovan, and C. Holm, "Grand-reaction method for simulations of ionization equilibria coupled to ion partitioning", Macromolecules 53, 3007-3020 (2020).
|
||||
@ -56,27 +56,28 @@ Examples
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
Perform the charge equilibration (QEq) method as described in :ref:`(Rappe and Goddard) <Rappe1>` and formulated in :ref:`(Nakano) <Nakano1>` (also known
|
||||
as the matrix inversion method) and in :ref:`(Rick and Stuart) <Rick1>` (also
|
||||
known as the extended Lagrangian method) based on the
|
||||
electronegativity equilization principle.
|
||||
Perform the charge equilibration (QEq) method as described in
|
||||
:ref:`(Rappe and Goddard) <Rappe1>` and formulated in :ref:`(Nakano)
|
||||
<Nakano1>` (also known as the matrix inversion method) and in
|
||||
:ref:`(Rick and Stuart) <Rick1>` (also known as the extended Lagrangian
|
||||
method) based on the electronegativity equilization principle.
|
||||
|
||||
These fixes can be used with any :doc:`pair style <pair_style>` in
|
||||
LAMMPS, so long as per-atom charges are defined. The most typical
|
||||
use-case is in conjunction with a :doc:`pair style <pair_style>` that
|
||||
performs charge equilibration periodically (e.g. every timestep), such
|
||||
as the ReaxFF or Streitz-Mintmire potential.
|
||||
But these fixes can also be used with
|
||||
potentials that normally assume per-atom charges are fixed, e.g. a
|
||||
:doc:`Buckingham <pair_buck>` or :doc:`LJ/Coulombic <pair_lj>` potential.
|
||||
as the ReaxFF or Streitz-Mintmire potential. But these fixes can also
|
||||
be used with potentials that normally assume per-atom charges are fixed,
|
||||
e.g. a :doc:`Buckingham <pair_buck>` or :doc:`LJ/Coulombic <pair_lj>`
|
||||
potential.
|
||||
|
||||
Because the charge equilibration calculation is effectively
|
||||
independent of the pair style, these fixes can also be used to perform
|
||||
a one-time assignment of charges to atoms. For example, you could
|
||||
define the QEq fix, perform a zero-timestep run via the :doc:`run <run>`
|
||||
command without any pair style defined which would set per-atom
|
||||
charges (based on the current atom configuration), then remove the fix
|
||||
via the :doc:`unfix <unfix>` command before performing further dynamics.
|
||||
Because the charge equilibration calculation is effectively independent
|
||||
of the pair style, these fixes can also be used to perform a one-time
|
||||
assignment of charges to atoms. For example, you could define the QEq
|
||||
fix, perform a zero-timestep run via the :doc:`run <run>` command
|
||||
without any pair style defined which would set per-atom charges (based
|
||||
on the current atom configuration), then remove the fix via the
|
||||
:doc:`unfix <unfix>` command before performing further dynamics.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -87,11 +88,14 @@ via the :doc:`unfix <unfix>` command before performing further dynamics.
|
||||
|
||||
.. note::
|
||||
|
||||
The :doc:`fix qeq/comb <fix_qeq_comb>` command must still be used
|
||||
to perform charge equilibration with the :doc:`COMB potential <pair_comb>`. The :doc:`fix qeq/reax <fix_qeq_reax>`
|
||||
command can be used to perform charge equilibration with the :doc:`ReaxFF force field <pair_reaxc>`, although fix qeq/shielded yields the
|
||||
same results as fix qeq/reax if *Nevery*\ , *cutoff*\ , and *tolerance*
|
||||
are the same. Eventually the fix qeq/reax command will be deprecated.
|
||||
The :doc:`fix qeq/comb <fix_qeq_comb>` command must still be used to
|
||||
perform charge equilibration with the :doc:`COMB potential
|
||||
<pair_comb>`. The :doc:`fix qeq/reax <fix_qeq_reax>` command can be
|
||||
used to perform charge equilibration with the :doc:`ReaxFF force
|
||||
field <pair_reaxc>`, although fix qeq/shielded yields the same
|
||||
results as fix qeq/reax if *Nevery*\ , *cutoff*\ , and *tolerance*
|
||||
are the same. Eventually the fix qeq/reax command will be
|
||||
deprecated.
|
||||
|
||||
The QEq method minimizes the electrostatic energy of the system (or
|
||||
equalizes the derivative of energy with respect to charge of all the
|
||||
@ -134,55 +138,57 @@ usually a good number.
|
||||
The *qeq/shielded* style describes partial charges on atoms also as
|
||||
point charges, but uses a shielded Coulomb potential to describe the
|
||||
interaction between a pair of charged particles. Interaction through
|
||||
the shielded Coulomb is given by equation (13) of the :ref:`ReaxFF force field <vanDuin>` paper. The shielding accounts for charge overlap
|
||||
the shielded Coulomb is given by equation (13) of the :ref:`ReaxFF force
|
||||
field <vanDuin>` paper. The shielding accounts for charge overlap
|
||||
between charged particles at small separation. This style is the same
|
||||
as :doc:`fix qeq/reax <fix_qeq_reax>`, and can be used with :doc:`pair_style reax/c <pair_reaxc>`. Only the *chi*\ , *eta*\ , and *gamma*
|
||||
parameters from the *qfile* file are used. When using the string
|
||||
*reax/c* as filename, these parameters are extracted directly from
|
||||
an active *reax/c* pair style. This style solves partial
|
||||
charges on atoms via the matrix inversion method. A tolerance of
|
||||
1.0e-6 is usually a good number.
|
||||
as :doc:`fix qeq/reax <fix_qeq_reax>`, and can be used with
|
||||
:doc:`pair_style reax/c <pair_reaxc>`. Only the *chi*\ , *eta*\ , and
|
||||
*gamma* parameters from the *qfile* file are used. When using the string
|
||||
*reax/c* as filename, these parameters are extracted directly from an
|
||||
active *reax/c* pair style. This style solves partial charges on atoms
|
||||
via the matrix inversion method. A tolerance of 1.0e-6 is usually a
|
||||
good number.
|
||||
|
||||
The *qeq/slater* style describes partial charges on atoms as spherical
|
||||
charge densities centered around atoms via the Slater 1\ *s* orbital, so
|
||||
that the interaction between a pair of charged particles is the
|
||||
product of two Slater 1\ *s* orbitals. The expression for the Slater
|
||||
1\ *s* orbital is given under equation (6) of the
|
||||
:ref:`Streitz-Mintmire <Streitz1>` paper. Only the *chi*\ , *eta*\ , *zeta*\ , and
|
||||
*qcore* parameters from the *qfile* file are used. When using the string
|
||||
that the interaction between a pair of charged particles is the product
|
||||
of two Slater 1\ *s* orbitals. The expression for the Slater 1\ *s*
|
||||
orbital is given under equation (6) of the :ref:`Streitz-Mintmire
|
||||
<Streitz1>` paper. Only the *chi*\ , *eta*\ , *zeta*\ , and *qcore*
|
||||
parameters from the *qfile* file are used. When using the string
|
||||
*coul/streitz* as filename, these parameters are extracted directly from
|
||||
an active *coul/streitz* pair style. This style solves
|
||||
partial charges on atoms via the matrix inversion method. A tolerance
|
||||
of 1.0e-6 is usually a good number. Keyword *alpha* can be used to
|
||||
change the Slater type orbital exponent.
|
||||
an active *coul/streitz* pair style. This style solves partial charges
|
||||
on atoms via the matrix inversion method. A tolerance of 1.0e-6 is
|
||||
usually a good number. Keyword *alpha* can be used to change the Slater
|
||||
type orbital exponent.
|
||||
|
||||
The *qeq/dynamic* style describes partial charges on atoms as point
|
||||
charges that interact through 1/r, but the extended Lagrangian method
|
||||
is used to solve partial charges on atoms. Only the *chi* and *eta*
|
||||
charges that interact through 1/r, but the extended Lagrangian method is
|
||||
used to solve partial charges on atoms. Only the *chi* and *eta*
|
||||
parameters from the *qfile* file are used. Note that Coulomb
|
||||
catastrophe can occur if repulsion between the pair of charged
|
||||
particles is too weak. A tolerance of 1.0e-3 is usually a good
|
||||
number. Keyword *qdamp* can be used to change the damping factor, while
|
||||
keyword *qstep* can be used to change the time step size.
|
||||
catastrophe can occur if repulsion between the pair of charged particles
|
||||
is too weak. A tolerance of 1.0e-3 is usually a good number. Keyword
|
||||
*qdamp* can be used to change the damping factor, while keyword *qstep*
|
||||
can be used to change the time step size.
|
||||
|
||||
The :ref:`\ *qeq/fire*\ <Shan>` style describes the same charge model and charge
|
||||
solver as the *qeq/dynamic* style, but employs a FIRE minimization
|
||||
algorithm to solve for equilibrium charges.
|
||||
Keyword *qdamp* can be used to change the damping factor, while
|
||||
keyword *qstep* can be used to change the time step size.
|
||||
The :ref:`\ *qeq/fire*\ <Shan>` style describes the same charge model
|
||||
and charge solver as the *qeq/dynamic* style, but employs a FIRE
|
||||
minimization algorithm to solve for equilibrium charges. Keyword
|
||||
*qdamp* can be used to change the damping factor, while keyword *qstep*
|
||||
can be used to change the time step size.
|
||||
|
||||
Note that *qeq/point*\ , *qeq/shielded*\ , and *qeq/slater* describe
|
||||
different charge models, whereas the matrix inversion method and the
|
||||
extended Lagrangian method (\ *qeq/dynamic* and *qeq/fire*\ ) are
|
||||
different solvers.
|
||||
|
||||
Note that *qeq/point*\ , *qeq/dynamic* and *qeq/fire* styles all describe
|
||||
charges as point charges that interact through 1/r relationship, but
|
||||
solve partial charges on atoms using different solvers. These three
|
||||
styles should yield comparable results if
|
||||
the QEq parameters and *Nevery*\ , *cutoff*\ , and *tolerance* are the
|
||||
same. Style *qeq/point* is typically faster, *qeq/dynamic* scales
|
||||
better on larger sizes, and *qeq/fire* is faster than *qeq/dynamic*\ .
|
||||
Note that *qeq/point*\ , *qeq/dynamic* and *qeq/fire* styles all
|
||||
describe charges as point charges that interact through 1/r
|
||||
relationship, but solve partial charges on atoms using different
|
||||
solvers. These three styles should yield comparable results if the QEq
|
||||
parameters and *Nevery*\ , *cutoff*\ , and *tolerance* are the same.
|
||||
Style *qeq/point* is typically faster, *qeq/dynamic* scales better on
|
||||
larger sizes, and *qeq/fire* is faster than *qeq/dynamic*\ .
|
||||
|
||||
.. note::
|
||||
|
||||
@ -200,9 +206,11 @@ better on larger sizes, and *qeq/fire* is faster than *qeq/dynamic*\ .
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
No information about these fixes is written to :doc:`binary restart files <restart>`. No global scalar or vector or per-atom
|
||||
quantities are stored by these fixes for access by various :doc:`output commands <Howto_output>`. No parameter of these fixes can be used
|
||||
with the *start/stop* keywords of the :doc:`run <run>` command.
|
||||
No information about these fixes is written to :doc:`binary restart
|
||||
files <restart>`. No global scalar or vector or per-atom quantities are
|
||||
stored by these fixes for access by various :doc:`output commands
|
||||
<Howto_output>`. No parameter of these fixes can be used with the
|
||||
*start/stop* keywords of the :doc:`run <run>` command.
|
||||
|
||||
Thexe fixes are invoked during :doc:`energy minimization <minimize>`.
|
||||
|
||||
@ -210,7 +218,8 @@ Restrictions
|
||||
""""""""""""
|
||||
|
||||
These fixes are part of the QEQ package. They are only enabled if
|
||||
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
|
||||
LAMMPS was built with that package. See the :doc:`Build package
|
||||
<Build_package>` doc page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
114
doc/src/pair_pace.rst
Normal file
114
doc/src/pair_pace.rst
Normal file
@ -0,0 +1,114 @@
|
||||
.. index:: pair_style pace
|
||||
|
||||
pair_style pace command
|
||||
========================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style pace ... keyword values ...
|
||||
|
||||
* an optional keyword may be appended
|
||||
* keyword = *product* or *recursive*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*product* = use product algorithm for basis functions
|
||||
*recursive* = use recursive algorithm for basis functions
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style pace
|
||||
pair_style pace product
|
||||
pair_coeff * * Cu-PBE-core-rep.ace Cu
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
Pair style *pace* computes interactions using the Atomic Cluster
|
||||
Expansion (ACE), which is a general expansion of the atomic energy in
|
||||
multi-body basis functions. :ref:`(Drautz) <Drautz20191>`.
|
||||
The *pace* pair style
|
||||
provides an efficient implementation that
|
||||
is described in this paper :ref:`(Lysogorskiy) <Lysogorskiy20211>`.
|
||||
|
||||
In ACE, the total energy is decomposed into a sum over
|
||||
atomic energies. The energy of atom *i* is expressed as a
|
||||
linear or non-linear function of one or more density functions.
|
||||
By projecting the
|
||||
density onto a local atomic base, the lowest order contributions
|
||||
to the energy can be expressed as a set of scalar polynomials in
|
||||
basis function contributions summed over neighbor atoms.
|
||||
|
||||
Only a single pair_coeff command is used with the *pace* style which
|
||||
specifies an ACE coefficient file followed by N additional arguments
|
||||
specifying the mapping of ACE elements to LAMMPS atom types,
|
||||
where N is the number of LAMMPS atom types:
|
||||
|
||||
* ACE coefficient file
|
||||
* N element names = mapping of ACE elements to atom types
|
||||
|
||||
Only a single pair_coeff command is used with the *pace* style which
|
||||
specifies an ACE file that fully defines the potential.
|
||||
Note that unlike for other potentials, cutoffs are
|
||||
not set in the pair_style or pair_coeff command; they are specified in
|
||||
the ACE file.
|
||||
|
||||
The pair_style *pace* command may be followed by an optional keyword
|
||||
*product* or *recursive*, which determines which of two algorithms
|
||||
is used for the calculation of basis functions and derivatives.
|
||||
The default is *recursive*.
|
||||
|
||||
See the :doc:`pair_coeff <pair_coeff>` doc page for alternate ways
|
||||
to specify the path for the ACE coefficient file.
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
For atom type pairs I,J and I != J, where types I and J correspond to
|
||||
two different element types, mixing is performed by LAMMPS with
|
||||
user-specifiable parameters as described above. You never need to
|
||||
specify a pair_coeff command with I != J arguments for this style.
|
||||
|
||||
This pair style does not support the :doc:`pair_modify <pair_modify>`
|
||||
shift, table, and tail options.
|
||||
|
||||
This pair style does not write its information to :doc:`binary restart files <restart>`, since it is stored in potential files. Thus, you
|
||||
need to re-specify the pair_style and pair_coeff commands in an input
|
||||
script that reads a restart file.
|
||||
|
||||
This pair style can only be used via the *pair* keyword of the
|
||||
:doc:`run_style respa <run_style>` command. It does not support the
|
||||
*inner*\ , *middle*\ , *outer* keywords.
|
||||
|
||||
----------
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This pair style is part of the USER-PACE package. It is only enabled if LAMMPS
|
||||
was built with that package.
|
||||
See the :doc:`Build package <Build_package>` doc page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`pair_style snap <pair_snap>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
recursive
|
||||
|
||||
.. _Drautz20191:
|
||||
|
||||
**(Drautz)** Drautz, Phys Rev B, 99, 014104 (2019).
|
||||
|
||||
.. _Lysogorskiy20211:
|
||||
|
||||
**(Lysogorskiy)** Lysogorskiy, van der Oord, Bochkarev, Menon, Rinaldi, Hammerschmidt, Mrovec, Thompson, Csanyi, Ortner, Drautz, TBD (2021).
|
||||
@ -99,7 +99,7 @@ accelerated styles exist.
|
||||
* :doc:`zero <pair_zero>` - neighbor list but no interactions
|
||||
|
||||
* :doc:`adp <pair_adp>` - angular dependent potential (ADP) of Mishin
|
||||
* :doc:`agni <pair_agni>` - machine learned potential mapping atomic environment to forces
|
||||
* :doc:`agni <pair_agni>` - AGNI machine-learning potential
|
||||
* :doc:`airebo <pair_airebo>` - AIREBO potential of Stuart
|
||||
* :doc:`airebo/morse <pair_airebo>` - AIREBO with Morse instead of LJ
|
||||
* :doc:`atm <pair_atm>` - Axilrod-Teller-Muto potential
|
||||
@ -280,6 +280,7 @@ accelerated styles exist.
|
||||
* :doc:`oxrna2/hbond <pair_oxrna2>` -
|
||||
* :doc:`oxrna2/stk <pair_oxrna2>` -
|
||||
* :doc:`oxrna2/xstk <pair_oxrna2>` -
|
||||
* :doc:`pace <pair_pace>` - Atomic Cluster Expansion (ACE) machine-learning potential
|
||||
* :doc:`peri/eps <pair_peri>` - peridynamic EPS potential
|
||||
* :doc:`peri/lps <pair_peri>` - peridynamic LPS potential
|
||||
* :doc:`peri/pmb <pair_peri>` - peridynamic PMB potential
|
||||
@ -297,7 +298,7 @@ accelerated styles exist.
|
||||
* :doc:`smd/ulsph <pair_smd_ulsph>` -
|
||||
* :doc:`smtbq <pair_smtbq>` -
|
||||
* :doc:`mliap <pair_mliap>` - Multiple styles of machine-learning potential
|
||||
* :doc:`snap <pair_snap>` - SNAP quantum-accurate potential
|
||||
* :doc:`snap <pair_snap>` - SNAP machine-learning potential
|
||||
* :doc:`soft <pair_soft>` - Soft (cosine) potential
|
||||
* :doc:`sph/heatconduction <pair_sph_heatconduction>` -
|
||||
* :doc:`sph/idealgas <pair_sph_idealgas>` -
|
||||
|
||||
@ -261,6 +261,7 @@ bitmask
|
||||
bitrate
|
||||
bitrates
|
||||
Bitzek
|
||||
Bjerrum
|
||||
Blaise
|
||||
blanchedalmond
|
||||
blocksize
|
||||
@ -268,6 +269,7 @@ blueviolet
|
||||
bn
|
||||
bni
|
||||
bo
|
||||
Bochkarev
|
||||
Bochum
|
||||
bocs
|
||||
bodyflag
|
||||
@ -343,6 +345,7 @@ Cao
|
||||
Capolungo
|
||||
Caro
|
||||
cartesian
|
||||
Cas
|
||||
CasP
|
||||
Caswell
|
||||
Cates
|
||||
@ -502,6 +505,8 @@ coulgauss
|
||||
coulombic
|
||||
Coulombic
|
||||
Coulombics
|
||||
counterion
|
||||
counterions
|
||||
Courant
|
||||
covalent
|
||||
covalently
|
||||
@ -730,6 +735,7 @@ DRUDE
|
||||
dsf
|
||||
dsmc
|
||||
dt
|
||||
dtemp
|
||||
dtgrow
|
||||
dtheta
|
||||
dtshrink
|
||||
@ -878,6 +884,7 @@ equilibrates
|
||||
equilibrating
|
||||
equilibration
|
||||
Equilibria
|
||||
equilibria
|
||||
equilization
|
||||
equipartitioning
|
||||
Ercolessi
|
||||
@ -1069,6 +1076,7 @@ fuer
|
||||
fx
|
||||
fy
|
||||
fz
|
||||
Gabor
|
||||
Gahler
|
||||
gainsboro
|
||||
Galindo
|
||||
@ -1193,6 +1201,7 @@ Halperin
|
||||
Halver
|
||||
Hamaker
|
||||
Hamel
|
||||
Hammerschmidt
|
||||
haptic
|
||||
Hara
|
||||
Harpertown
|
||||
@ -1212,6 +1221,7 @@ hbnewflag
|
||||
hbond
|
||||
hcp
|
||||
heatconduction
|
||||
Hebbeker
|
||||
Hebenstreit
|
||||
Hecht
|
||||
Heenen
|
||||
@ -1279,6 +1289,7 @@ hy
|
||||
hydrophobicity
|
||||
hydrostatic
|
||||
hydrostatically
|
||||
hydroxyl
|
||||
Hynninen
|
||||
Hyoungki
|
||||
hyperdynamics
|
||||
@ -1369,6 +1380,7 @@ ints
|
||||
inv
|
||||
invariants
|
||||
inversed
|
||||
ionizable
|
||||
ionocovalent
|
||||
iostreams
|
||||
iparam
|
||||
@ -1548,6 +1560,7 @@ Koning
|
||||
Kooser
|
||||
Korn
|
||||
Koskinen
|
||||
Kosovan
|
||||
Koster
|
||||
Kosztin
|
||||
Kp
|
||||
@ -1594,6 +1607,7 @@ Lamoureux
|
||||
Lanczos
|
||||
Lande
|
||||
Landron
|
||||
Landsgesell
|
||||
langevin
|
||||
Langevin
|
||||
Langston
|
||||
@ -1731,10 +1745,13 @@ lpsapi
|
||||
lrt
|
||||
lsfftw
|
||||
ltbbmalloc
|
||||
Lua
|
||||
lubricateU
|
||||
lucy
|
||||
Lua
|
||||
Luding
|
||||
Luijten
|
||||
lunit
|
||||
Lunkad
|
||||
Lussetti
|
||||
Lustig
|
||||
lval
|
||||
@ -1743,6 +1760,7 @@ lx
|
||||
ly
|
||||
Lybrand
|
||||
lyon
|
||||
Lysogorskiy
|
||||
Lyulin
|
||||
lz
|
||||
Maaravi
|
||||
@ -1801,8 +1819,10 @@ Materias
|
||||
mathbf
|
||||
mathjax
|
||||
matlab
|
||||
Matous
|
||||
matplotlib
|
||||
Matsubara
|
||||
Matteo
|
||||
Mattice
|
||||
Mattox
|
||||
Mattson
|
||||
@ -1863,6 +1883,7 @@ MEMALIGN
|
||||
membered
|
||||
memcheck
|
||||
Mendelev
|
||||
Menon
|
||||
mer
|
||||
Meremianin
|
||||
Mersenne
|
||||
@ -1986,6 +2007,7 @@ mpiio
|
||||
mpirun
|
||||
mplayer
|
||||
mps
|
||||
Mrovec
|
||||
Mryglod
|
||||
mscg
|
||||
MSCG
|
||||
@ -2020,6 +2042,7 @@ multiscale
|
||||
multisectioning
|
||||
multithreading
|
||||
Multithreading
|
||||
multivalent
|
||||
Mundy
|
||||
Murdick
|
||||
Murtola
|
||||
@ -2065,6 +2088,7 @@ Nanoletters
|
||||
nanomechanics
|
||||
nanometer
|
||||
nanometers
|
||||
nanoparticle
|
||||
nanoparticles
|
||||
Nanotube
|
||||
nanotube
|
||||
@ -2174,6 +2198,7 @@ nm
|
||||
Nm
|
||||
Nmax
|
||||
nmax
|
||||
nmc
|
||||
Nmin
|
||||
nmin
|
||||
Nmols
|
||||
@ -2308,9 +2333,11 @@ OMP
|
||||
oneAPI
|
||||
onelevel
|
||||
oneway
|
||||
onlysalt
|
||||
onn
|
||||
ons
|
||||
OO
|
||||
Oord
|
||||
opencl
|
||||
openKIM
|
||||
openmp
|
||||
@ -2331,6 +2358,7 @@ Orsi
|
||||
ortho
|
||||
orthonormal
|
||||
orthorhombic
|
||||
Ortner
|
||||
oso
|
||||
Otype
|
||||
Ouldridge
|
||||
@ -2390,6 +2418,8 @@ pbc
|
||||
pc
|
||||
pchain
|
||||
Pchain
|
||||
pcmoves
|
||||
pmcmoves
|
||||
Pdamp
|
||||
pdb
|
||||
pdf
|
||||
@ -2434,6 +2464,7 @@ phosphide
|
||||
Phs
|
||||
Physica
|
||||
physik
|
||||
pI
|
||||
Piaggi
|
||||
picocoulomb
|
||||
picocoulombs
|
||||
@ -2445,7 +2476,9 @@ pid
|
||||
piecewise
|
||||
Pieniazek
|
||||
Pieter
|
||||
pIm
|
||||
pimd
|
||||
pIp
|
||||
Piola
|
||||
Pisarev
|
||||
Pishevar
|
||||
@ -2460,6 +2493,9 @@ ploop
|
||||
PloS
|
||||
plt
|
||||
plumedfile
|
||||
pKa
|
||||
pKb
|
||||
pKs
|
||||
pmb
|
||||
Pmolrotate
|
||||
Pmoltrans
|
||||
@ -2620,6 +2656,7 @@ radians
|
||||
Rafferty
|
||||
rahman
|
||||
Rahman
|
||||
Ralf
|
||||
Raman
|
||||
ramped
|
||||
ramping
|
||||
@ -2727,6 +2764,7 @@ Rij
|
||||
RIj
|
||||
Rik
|
||||
Rin
|
||||
Rinaldi
|
||||
Rino
|
||||
RiRj
|
||||
Risi
|
||||
@ -2786,6 +2824,7 @@ rst
|
||||
rstyle
|
||||
Rubensson
|
||||
Rubia
|
||||
Rud
|
||||
Rudd
|
||||
Rudra
|
||||
Rudranarayan
|
||||
@ -2815,6 +2854,7 @@ Sandia
|
||||
sandybrown
|
||||
sanitizer
|
||||
Sanyal
|
||||
Sarath
|
||||
sc
|
||||
scafacos
|
||||
SCAFACOS
|
||||
|
||||
Reference in New Issue
Block a user