reformat and fix spelling and related issues

This commit is contained in:
Axel Kohlmeyer
2024-03-27 06:53:03 -04:00
parent 7323364d1d
commit fda433a7ee
3 changed files with 94 additions and 29 deletions

View File

@ -1933,11 +1933,11 @@ ML-UF3 package
**Contents:**
A pair style for the Ultra-Fast Forcefield potentials (UF3). UF3 is a
methodology for deriving a highly accurate classical potential which is fast to
evaluate and is fitted to a large archives of quantum mechanical (DFT) data.
The use of bspline basis set in UF3 enables the rapid evaluation of 2-body and
3-body interactions.
A pair style for the ultra-fast force field potentials (UF3). UF3 is a
methodology for deriving a highly accurate classical potential which is
fast to evaluate and is fitted to a large archives of quantum mechanical
(DFT) data. The use of b-spline basis set in UF3 enables the rapid
evaluation of 2-body and 3-body interactions.
**Authors:** Ajinkya C Hire (University of Florida),
Hendrik Krass (University of Constance),

View File

@ -17,11 +17,9 @@ Syntax
.. parsed-literal::
BodyFlag = Indicates whether to calculate only 2-body or 2 and 3-body interactions. Possible values- 2 or 3
BodyFlag = Indicates whether to calculate only 2-body or 2 and 3-body interactions. Possible values: 2 or 3
NumAtomType = Number of atoms types in the simulation
Examples
""""""""
@ -50,7 +48,12 @@ Examples
Description
"""""""""""
The *uf3* style computes the :ref:`Ultra-Fast Force Fields (UF3) <Xie23>` potential, a machine-learning interatomic potential. In UF3, the total energy of the system is defined via two- and three-body interactions:
.. versionadded:: TBD
The *uf3* style computes the :ref:`Ultra-Fast Force Fields (UF3)
<Xie23>` potential, a machine-learning interatomic potential. In UF3,
the total energy of the system is defined via two- and three-body
interactions:
.. math::
@ -58,15 +61,29 @@ The *uf3* style computes the :ref:`Ultra-Fast Force Fields (UF3) <Xie23>` potent
V_2(r_{ij}) & = \sum_{n=0}^N c_n B_n(r_{ij}) \\
V_3 (r_{ij},r_{ik},r_{jk}) & = \sum_{l=0}^{N_l} \sum_{m=0}^{N_m} \sum_{n=0}^{N_n} c_{l,m,n} B_l(r_{ij}) B_m(r_{ik}) B_n(r_{jk})
where :math:`V_2(r_{ij})` and :math:`V_3 (r_{ij},r_{ik},r_{jk})` are the two- and three-body interactions, respectively. For the two-body the summation is over all neighbours J and for the three-body the summation is over all neighbors J and K of atom I within a cutoff distance determined from the potential files. :math:`B_n(r_{ij})` are the cubic bspline basis, :math:`c_n` and :math:`c_{l,m,n}` are the machine-learned interaction parameters and :math:`N`, :math:`N_l`, :math:`N_m`, and :math:`N_n` denote the number of basis functions per spline or tensor spline dimension.
where :math:`V_2(r_{ij})` and :math:`V_3 (r_{ij},r_{ik},r_{jk})` are the
two- and three-body interactions, respectively. For the two-body the
summation is over all neighbors J and for the three-body the summation
is over all neighbors J and K of atom I within a cutoff distance
determined from the potential files. :math:`B_n(r_{ij})` are the cubic
b-spline basis, :math:`c_n` and :math:`c_{l,m,n}` are the machine-learned
interaction parameters and :math:`N`, :math:`N_l`, :math:`N_m`, and
:math:`N_n` denote the number of basis functions per spline or tensor
spline dimension.
The UF3 LAMMPS potential files are provided using multiple pair_coeff commands. A single UF3 LAMMPS potential file contains information about one particular interaction only.
The UF3 LAMMPS potential files are provided using multiple pair_coeff
commands. A single UF3 LAMMPS potential file contains information about
one particular interaction only.
.. note::
Unlike other MANYBODY and ML potentials in LAMMPS, the atom type for which the specified potential file should be used for is not determined from the potential file, but is rather determined from the user provided atom type numbers after pair_coeff.
Unlike other MANYBODY and ML potentials in LAMMPS, the atom type for
which the specified potential file should be used for is not
determined from the potential file, but is rather determined from the
user provided atom type numbers after pair_coeff.
As an example, if a LAMMPS simulation contains 2 atom types (elements 'A' and 'B'), the pair_coeff command will be-
As an example, if a LAMMPS simulation contains 2 atom types (elements
'A' and 'B'), the pair_coeff command will be:
.. code-block:: LAMMPS
@ -81,9 +98,15 @@ As an example, if a LAMMPS simulation contains 2 atom types (elements 'A' and 'B
pair_coeff 3b 2 1 2 B_A_B
pair_coeff 3b 2 2 2 B_B_B
If a value of "2" is specified in the :code:`pair_style uf3` command, only the two-body potential files are needed. For 3-body interaction the first atom type is the central atom. We recommend using the :code:`generate_uf3_lammps_pots.py` script (found `here <https://github.com/uf3/uf3/tree/master/lammps_plugin/scripts>`_) for generating the UF3 LAMMPS potential files from the UF3 JSON potentials.
If a value of "2" is specified in the :code:`pair_style uf3` command,
only the two-body potential files are needed. For 3-body interaction the
first atom type is the central atom. We recommend using the
:code:`generate_uf3_lammps_pots.py` script (found `here
<https://github.com/uf3/uf3/tree/master/lammps_plugin/scripts>`_) for
generating the UF3 LAMMPS potential files from the UF3 JSON potentials.
LAMMPS wild-card character "*" can also be used to specify a single UF3 LAMMPS potential file for multiple interaction. For example-
LAMMPS wild-card character "*" can also be used to specify a single UF3
LAMMPS potential file for multiple interaction. For example-
.. code-block:: LAMMPS
@ -92,10 +115,18 @@ LAMMPS wild-card character "*" can also be used to specify a single UF3 LAMMPS p
pair_coeff 3b 1 * * A_A_A
pair_coeff 3b 2 * * B_B_B
The file A_A will be used for 2-body interaction between atom types 1-1, 1-2 and 2-2; file A_A_A will be used 3-body interaction for atom types 1-1-1, 1-1-2, 1-2-2; and so on. Note, using a single interaction file for all types of interactions is **not** the recommended way of using :code:`pair_style uf3` and will often lead to **incorrect results**.
The file A_A will be used for 2-body interaction between atom types 1-1,
1-2 and 2-2; file A_A_A will be used 3-body interaction for atom types
1-1-1, 1-1-2, 1-2-2; and so on. Note, using a single interaction file
for all types of interactions is **not** the recommended way of using
:code:`pair_style uf3` and will often lead to **incorrect results**.
----------
UF3 LAMMPS potential files in the *potentials* directory of the LAMMPS distribution have a ".uf3" suffix. All UF3 LAMMPS potential files should start with :code:`#UF3 POT` and end with :code:`#` characters. Following shows the format of a generic 2-body UF3 LAMMPS potential file-
UF3 LAMMPS potential files in the *potentials* directory of the LAMMPS
distribution have a ".uf3" suffix. All UF3 LAMMPS potential files should
start with :code:`#UF3 POT` and end with :code:`#` characters. Following
shows the format of a generic 2-body UF3 LAMMPS potential file-
.. code-block:: LAMMPS
@ -134,38 +165,66 @@ The format of a generic 3-body UF3 LAMMPS potential file is as follow-
.
#
Similar to the 2-body potential file, the third line sets the cutoffs and length of the knots. The cutoff distance between atom-type I and J is :code:`Rij_CUTOFF`, atom-type I and K is :code:`Rik_CUTOFF` and between J and K is :code:`Rjk_CUTOFF`.
Similar to the 2-body potential file, the third line sets the cutoffs
and length of the knots. The cutoff distance between atom-type I and J
is :code:`Rij_CUTOFF`, atom-type I and K is :code:`Rik_CUTOFF` and
between J and K is :code:`Rjk_CUTOFF`.
.. note::
The current implementation only works for UF3 potentials with cutoff distances for 3-body interactions that follows :code:`2Rij_CUTOFF=2Rik_CUTOFF=Rjk_CUTOFF` relation.
The current implementation only works for UF3 potentials with cutoff
distances for 3-body interactions that follows
:code:`2Rij_CUTOFF=2Rik_CUTOFF=Rjk_CUTOFF` relation.
The :code:`BSPLINE_KNOTS_FOR_JK`, :code:`BSPLINE_KNOTS_FOR_IK`, and :code:`BSPLINE_KNOTS_FOR_IJ` lines (note the order) contain the knots in increasing order for atoms J and K, I and K, and atoms I and J respectively. The number of knots is defined by the :code:`NUM_OF_KNOTS_*` characters in the previous line.
The shape of the coefficient matrix is defined on the :code:`SHAPE_OF_COEFF_MATRIX[I][J][K]` line followed by the columns of the coefficient matrix, one per line, as shown above. For example, if the coefficient matrix has the shape of 8x8x13, then :code:`SHAPE_OF_COEFF_MATRIX[I][J][K]` will be :code:`8 8 13` followed by 64 (8x8) lines each containing 13 coefficients seperated by space.
The :code:`BSPLINE_KNOTS_FOR_JK`, :code:`BSPLINE_KNOTS_FOR_IK`, and
:code:`BSPLINE_KNOTS_FOR_IJ` lines (note the order) contain the knots in
increasing order for atoms J and K, I and K, and atoms I and J
respectively. The number of knots is defined by the
:code:`NUM_OF_KNOTS_*` characters in the previous line. The shape of
the coefficient matrix is defined on the
:code:`SHAPE_OF_COEFF_MATRIX[I][J][K]` line followed by the columns of
the coefficient matrix, one per line, as shown above. For example, if
the coefficient matrix has the shape of 8x8x13, then
:code:`SHAPE_OF_COEFF_MATRIX[I][J][K]` will be :code:`8 8 13` followed
by 64 (8x8) lines each containing 13 coefficients separated by space.
----------
.. include:: accel_styles.rst
----------
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 as described above from values in the potential file.
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 as described
above from values in the potential file.
This pair style does not support the :doc:`pair_modify <pair_modify>` shift, table, and tail options.
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.
This pair style does not write its information to :doc:`binary restart
files <restart>`, since it is stored in potential files.
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.
The single() function of 'uf3' pair style only return the 2-body interaction energy.
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
""""""""""""
The 'uf3' pair style is part of the ML-UF3 package. It is only enabled if LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info.
The 'uf3' pair style is part of the ML-UF3 package. It is only enabled
if LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
This pair style requires the :doc:`newton <newton>` setting to be "on".
The UF3 LAMMPS potential files provided with LAMMPS (see the potentials directory) are parameterized for metal :doc:`units <units>`.
The UF3 LAMMPS potential files provided with LAMMPS (see the potentials
directory) are parameterized for metal :doc:`units <units>`.
The single() function of 'uf3' pair style only return the 2-body
interaction energy.
Related commands
""""""""""""""""

View File

@ -1407,6 +1407,7 @@ Hendrik
Henin
Henkelman
Henkes
Hennig
henrich
Henrich
Hermitian
@ -1567,6 +1568,7 @@ interlayer
intermolecular
interoperable
Interparticle
interpretable
interstitials
intertube
Intr
@ -1786,6 +1788,7 @@ Koziol
Kp
kradius
Kraker
Krass
Kraus
Kremer
Kress
@ -3226,6 +3229,7 @@ Rudranarayan
Rudzinski
Runge
runtime
Rupp
Rutuparna
rx
rxd
@ -3771,6 +3775,8 @@ uChem
uCond
uef
UEF
uf
uf3
ufm
Uhlenbeck
Ui