Merge pull request #2796 from macstein/mliap_so3_ver2
Add support for SO3 descriptor to MLIAP package
This commit is contained in:
@ -19,7 +19,7 @@ Syntax
|
||||
style = *linear* or *quadratic* or *nn* or *mliappy*
|
||||
filename = name of file containing model definitions
|
||||
*descriptor* values = style filename
|
||||
style = *sna*
|
||||
style = *sna* or *so3*
|
||||
filename = name of file containing descriptor definitions
|
||||
|
||||
Examples
|
||||
@ -29,65 +29,70 @@ Examples
|
||||
|
||||
pair_style mliap model linear InP.mliap.model descriptor sna InP.mliap.descriptor
|
||||
pair_style mliap model quadratic W.mliap.model descriptor sna W.mliap.descriptor
|
||||
pair_style mliap model nn Si.nn.mliap.model descriptor so3 Si.nn.mliap.descriptor
|
||||
pair_coeff * * In P
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
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,
|
||||
it is possible to use many different models with a given descriptor,
|
||||
or many different descriptors with a given model. The
|
||||
pair style currently supports just one descriptor style, but it is
|
||||
is straightforward to add new descriptor styles.
|
||||
The SNAP descriptor style *sna* is the same as that used by :doc:`pair_style snap <pair_snap>`,
|
||||
including the linear, quadratic, and chem variants.
|
||||
The available models are *linear*, *quadratic*, *nn*, and *mliappy*.
|
||||
The *mliappy* style can be used to couple python models,
|
||||
e.g. PyTorch neural network energy models, and requires building
|
||||
LAMMPS with the PYTHON package (see below).
|
||||
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.
|
||||
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, it is possible to use many
|
||||
different models with a given descriptor, or many different descriptors
|
||||
with a given model. The pair style currently supports only *sna* and *so3*
|
||||
descriptor styles, but it is is straightforward to add new descriptor
|
||||
styles.
|
||||
|
||||
The pair_style *mliap* command must be followed by two keywords
|
||||
*model* and *descriptor* in either order. A single
|
||||
*pair_coeff* command is also required. The first 2 arguments
|
||||
must be \* \* so as to span all LAMMPS atom types.
|
||||
This is followed by a list of N arguments
|
||||
that specify the mapping of MLIAP
|
||||
element names to LAMMPS atom types,
|
||||
where N is the number of LAMMPS atom types.
|
||||
The SNAP descriptor style *sna* is the same as that used by
|
||||
:doc:`pair_style snap <pair_snap>`, including the linear, quadratic, and
|
||||
chem variants. The available models are *linear*, *quadratic*, *nn*,
|
||||
and *mliappy*. The *mliappy* style can be used to couple python models,
|
||||
e.g. PyTorch neural network energy models, and requires building LAMMPS
|
||||
with the PYTHON package (see below). 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 *model* keyword is followed by the model style. 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 parameters for many elements. The only requirement is that it
|
||||
contain at least those element names appearing in the
|
||||
*pair_coeff* command.
|
||||
The descriptor style *so3* is a descriptor that is derived from the
|
||||
the smooth SO(3) power spectrum with the explicit inclusion of a radial
|
||||
basis :ref:`(Bartok) <Bartok2013>` and :ref:`(Zagaceta) <Zagaceta2020>`.
|
||||
The available models are *linear* and *nn*.
|
||||
|
||||
The top of the model file can contain any number of blank and comment lines (start with #),
|
||||
but follows a strict format after that. The first non-blank non-comment
|
||||
line must contain two integers:
|
||||
The pair_style *mliap* command must be followed by two keywords *model*
|
||||
and *descriptor* in either order. A single *pair_coeff* command is also
|
||||
required. The first 2 arguments must be \* \* so as to span all LAMMPS
|
||||
atom types. This is followed by a list of N arguments that specify the
|
||||
mapping of MLIAP element names to LAMMPS atom types, where N is the
|
||||
number of LAMMPS atom types.
|
||||
|
||||
The *model* keyword is followed by the model style. 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 parameters for many
|
||||
elements. The only requirement is that it contain at least those element
|
||||
names appearing in the *pair_coeff* command.
|
||||
|
||||
The top of the model file can contain any number of blank and comment
|
||||
lines (start with #), but follows a strict format after that. The first
|
||||
non-blank non-comment line must contain two integers:
|
||||
|
||||
* nelems = Number of elements
|
||||
* nparams = Number of parameters
|
||||
|
||||
When the *model* keyword is *linear* or *quadratic*,
|
||||
this is followed by one block for each of the *nelem* elements.
|
||||
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,
|
||||
since these are handled by the *descriptor*.
|
||||
When the *model* keyword is *linear* or *quadratic*, this is followed by
|
||||
one block for each of the *nelem* elements. 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, since these are handled by the
|
||||
*descriptor*.
|
||||
|
||||
When the *model* keyword is *nn* (neural networks), the model file can contain
|
||||
blank and comment lines (start with #) anywhere. The second non-blank non-comment
|
||||
line must contain the string NET, followed by two integers:
|
||||
When the *model* keyword is *nn* (neural networks), the model file can
|
||||
contain blank and comment lines (start with #) anywhere. The second
|
||||
non-blank non-comment line must contain the string NET, followed by two
|
||||
integers:
|
||||
|
||||
* ndescriptors = Number of descriptors
|
||||
* nlayers = Number of layers (including the hidden layers and the output layer)
|
||||
@ -97,54 +102,71 @@ and followed by a sequence of a string and an integer for each layer:
|
||||
* Activation function (linear, sigmoid, tanh or relu)
|
||||
* nnodes = Number of nodes
|
||||
|
||||
This is followed by one block for each of the *nelem* elements. Each block consists
|
||||
of *scale0* minimum value, *scale1* (maximum - minimum) value,
|
||||
in order to normalize the descriptors, followed by *nparams* parameters,
|
||||
including *bias* and *weights* of the model, starting with the first node of the first layer
|
||||
and so on, with a maximum of 30 values per line.
|
||||
This is followed by one block for each of the *nelem* elements. Each
|
||||
block consists of *scale0* minimum value, *scale1* (maximum - minimum)
|
||||
value, in order to normalize the descriptors, followed by *nparams*
|
||||
parameters, including *bias* and *weights* of the model, starting with
|
||||
the first node of the first layer and so on, with a maximum of 30 values
|
||||
per line.
|
||||
|
||||
Notes on mliappy models:
|
||||
When the *model* keyword is *mliappy*, the filename should end in '.pt',
|
||||
'.pth' for pytorch models, or be a pickle file. To load a model from
|
||||
memory (i.e. an existing python object), specify the filename as
|
||||
"LATER", and then call `lammps.mliap.load_model(model)` from python
|
||||
before using the pair style. When using lammps via the library mode, you will need to call
|
||||
`lammps.mliappy.activate_mliappy(lmp)` on the active lammps object
|
||||
before the pair style is defined. This call locates and loads the mliap-specific
|
||||
python module that is built into lammps.
|
||||
The detail of *nn* module implementation can be found at :ref:`(Yanxon) <Yanxon2020>`.
|
||||
|
||||
.. admonition:: Notes on mliappy models
|
||||
|
||||
When the *model* keyword is *mliappy*, the filename should end in '.pt',
|
||||
'.pth' for pytorch models, or be a pickle file. To load a model from
|
||||
memory (i.e. an existing python object), specify the filename as
|
||||
"LATER", and then call `lammps.mliap.load_model(model)` from python
|
||||
before using the pair style. When using lammps via the library mode, you
|
||||
will need to call `lammps.mliappy.activate_mliappy(lmp)` on the active
|
||||
lammps object before the pair style is defined. This call locates and
|
||||
loads the mliap-specific python module that is built into lammps.
|
||||
|
||||
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>`.
|
||||
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.
|
||||
Currently two descriptor styles are available: *sna* and *so3*.
|
||||
|
||||
- *sna* indicates the bispectrum component descriptors used by the Spectral
|
||||
Neighbor Analysis Potential (SNAP) potentials of :doc:`pair_style snap
|
||||
<pair_snap>`. 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.
|
||||
|
||||
- *so3* indicated the power spectrum component descriptors. A single additional
|
||||
argument specifies the descriptor filename containing the parameters and setting.
|
||||
|
||||
The SNAP descriptor file closely follows the format of the
|
||||
:doc:`pair_style snap <pair_snap>` parameter file.
|
||||
The file can contain blank and comment lines (start
|
||||
with #) anywhere. Each non-blank non-comment line must contain one
|
||||
keyword/value pair. The required keywords are *rcutfac* and
|
||||
*twojmax*\ . There are many optional keywords that are described
|
||||
on the :doc:`pair_style snap <pair_snap>` doc page.
|
||||
In addition, the SNAP descriptor file must contain
|
||||
the *nelems*, *elems*, *radelems*, and *welems* keywords.
|
||||
The *nelems* keyword specifies the number of elements
|
||||
provided in the other three keywords.
|
||||
The *elems* keyword is followed by a list of *nelems*
|
||||
element names that must include the element
|
||||
names appearing in the *pair_coeff* command,
|
||||
but can contain other names too.
|
||||
Similarly, the *radelems* and *welems* keywords are
|
||||
followed by lists of *nelems* numbers giving the element radius
|
||||
and element weight of each element. Obviously, the order
|
||||
in which the elements are listed must be consistent for all
|
||||
three keywords.
|
||||
:doc:`pair_style snap <pair_snap>` parameter file. The file can contain
|
||||
blank and comment lines (start with #) anywhere. Each non-blank
|
||||
non-comment line must contain one keyword/value pair. The required
|
||||
keywords are *rcutfac* and *twojmax*\ . There are many optional keywords
|
||||
that are described on the :doc:`pair_style snap <pair_snap>` doc page.
|
||||
In addition, the SNAP descriptor file must contain the *nelems*,
|
||||
*elems*, *radelems*, and *welems* keywords. The *nelems* keyword
|
||||
specifies the number of elements provided in the other three keywords.
|
||||
The *elems* keyword is followed by a list of *nelems* element names that
|
||||
must include the element names appearing in the *pair_coeff* command,
|
||||
but can contain other names too. Similarly, the *radelems* and *welems*
|
||||
keywords are followed by lists of *nelems* numbers giving the element
|
||||
radius and element weight of each element. Obviously, the order in which
|
||||
the elements are listed must be consistent for all three keywords.
|
||||
|
||||
The SO3 descriptor file is similar to the SNAP descriptor except that it
|
||||
contains a few more arguments (e.g., *nmax* and *alpha*). The preparation
|
||||
of SO3 descriptor and model files can be done with the
|
||||
`*Pyxtal_FF*<https://github.com/qzhu2017/PyXtal_FF>`_ package.
|
||||
|
||||
See the :doc:`pair_coeff <pair_coeff>` doc page for alternate ways
|
||||
to specify the path for these *model* and *descriptor* files.
|
||||
|
||||
.. note::
|
||||
|
||||
To significantly reduce SO3 descriptor/force calculation time,
|
||||
some properties are pre-computed and reused during the calculation.
|
||||
These can consume a significant amount of RAM for simulations of
|
||||
larger systems since their size depends on the total number of
|
||||
neighbors per MPI process.
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
@ -156,9 +178,10 @@ 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 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
|
||||
@ -169,11 +192,11 @@ This pair style can only be used via the *pair* keyword of the
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This pair style 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.
|
||||
The *mliappy* model requires building LAMMPS with the PYTHON package.
|
||||
See the :doc:`Build package <Build_package>` doc page for more info.
|
||||
This pair style 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. The
|
||||
*mliappy* model requires building LAMMPS with the PYTHON package. See
|
||||
the :doc:`Build package <Build_package>` doc page for more info.
|
||||
|
||||
|
||||
Related commands
|
||||
@ -185,3 +208,19 @@ Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
|
||||
----------
|
||||
|
||||
.. _Bartok2013:
|
||||
|
||||
**(Bartok2013)** Bartok, Kondor, Csanyi, Phys Rev B, 87, 184115 (2013).
|
||||
|
||||
.. _Zagaceta2020:
|
||||
|
||||
**(Zagaceta2020)** Zagaceta, Yanxon, Zhu, J Appl Phys, 128, 045113 (2020).
|
||||
|
||||
.. _Yanxon2020:
|
||||
|
||||
**(Yanxon2020)** Yanxon, Zagaceta, Tang, Matteson, Zhu, Mach. Learn.: Sci. Technol. 2, 027001 (2020).
|
||||
|
||||
|
||||
|
||||
@ -262,7 +262,7 @@ none
|
||||
|
||||
.. _Bartok20102:
|
||||
|
||||
**(Bartok2010)** Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010).
|
||||
**(Bartok2010)** Bartok, Payne, Kondor, Csanyi, Phys Rev Lett, 104, 136403 (2010).
|
||||
|
||||
.. _Wood20182:
|
||||
|
||||
|
||||
26
examples/mliap/Ni_Mo.data
Normal file
26
examples/mliap/Ni_Mo.data
Normal file
@ -0,0 +1,26 @@
|
||||
NiMo.data (written by ASE)
|
||||
|
||||
10 atoms
|
||||
2 atom types
|
||||
0.0 5.7209004999999999 xlo xhi
|
||||
0.0 5.7209004999999999 ylo yhi
|
||||
0.0 3.5556619999999999 zlo zhi
|
||||
|
||||
Masses
|
||||
|
||||
1 95.96
|
||||
2 58.6934
|
||||
|
||||
|
||||
Atoms
|
||||
|
||||
1 1 0 0 0
|
||||
2 1 2.86045025 2.86045025 1.7778309999999999
|
||||
3 2 2.2921502965812497 4.5858137713447498 0
|
||||
4 2 3.4287502034187498 1.13508672865525 0
|
||||
5 2 1.72536352134475 0.56829995341874995 1.7778309999999999
|
||||
6 2 3.9955369786552501 5.1526005465812501 1.7778309999999999
|
||||
7 2 5.1526005465812501 1.72536352134475 1.7778309999999999
|
||||
8 2 0.56829995341874995 3.9955369786552501 1.7778309999999999
|
||||
9 2 4.5858137713447498 3.4287502034187498 0
|
||||
10 2 1.13508672865525 2.2921502965812497 0
|
||||
1
examples/mliap/Ni_Mo.mliap.descriptor
Symbolic link
1
examples/mliap/Ni_Mo.mliap.descriptor
Symbolic link
@ -0,0 +1 @@
|
||||
../../potentials/Ni_Mo.mliap.descriptor
|
||||
1
examples/mliap/Ni_Mo.mliap.model
Symbolic link
1
examples/mliap/Ni_Mo.mliap.model
Symbolic link
@ -0,0 +1 @@
|
||||
../../potentials/Ni_Mo.mliap.model
|
||||
1
examples/mliap/Si.nn.mliap.descriptor
Symbolic link
1
examples/mliap/Si.nn.mliap.descriptor
Symbolic link
@ -0,0 +1 @@
|
||||
../../potentials/Si.nn.mliap.descriptor
|
||||
1
examples/mliap/Si.nn.mliap.model
Symbolic link
1
examples/mliap/Si.nn.mliap.model
Symbolic link
@ -0,0 +1 @@
|
||||
../../potentials/Si.nn.mliap.model
|
||||
17
examples/mliap/compute.quadratic.gg0.dat
Normal file
17
examples/mliap/compute.quadratic.gg0.dat
Normal file
@ -0,0 +1,17 @@
|
||||
# Time-averaged data for fix snap
|
||||
# TimeStep Number-of-rows
|
||||
# Row c_snap[1] c_snap[2] c_snap[3] c_snap[4] c_snap[5] c_snap[6] c_snap[7] c_snap[8] c_snap[9] c_snap[10] c_snap[11] c_snap[12] c_snap[13] c_snap[14] c_snap[15] c_snap[16] c_snap[17] c_snap[18] c_snap[19] c_snap[20] c_snap[21] c_snap[22] c_snap[23] c_snap[24] c_snap[25] c_snap[26] c_snap[27] c_snap[28] c_snap[29] c_snap[30] c_snap[31] c_snap[32] c_snap[33] c_snap[34] c_snap[35] c_snap[36] c_snap[37] c_snap[38] c_snap[39] c_snap[40] c_snap[41] c_snap[42] c_snap[43]
|
||||
0 13
|
||||
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 364183 213523 107428 122916 41227.5 3.31573e+10 3.88807e+10 1.95617e+10 2.23819e+10 7.50718e+09 1.1398e+10 1.14692e+10 1.31227e+10 4.40152e+09 2.88519e+09 6.60228e+09 2.21449e+09 3.77706e+09 2.53375e+09 4.24928e+08 322.87
|
||||
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -206.978 -293.105 -434.029 -217.39 0 -3.76889e+07 -5.33719e+07 -7.9033e+07 -3.95849e+07 -2.20973e+07 -4.24099e+07 -5.9058e+07 -2.74755e+07 -1.57438e+07 -4.1327e+07 -1.77189e+07 -2.66745e+07 -2.23073e+07 -4.48124e+06 -20.7188
|
||||
3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1277.1 -1841.02 -2752.08 -1381.8 0 -2.3255e+08 -3.35235e+08 -5.0113e+08 -2.51613e+08 -1.36345e+08 -2.65149e+08 -3.72304e+08 -1.73849e+08 -9.88886e+07 -2.6097e+08 -1.12172e+08 -1.69137e+08 -1.41653e+08 -2.8484e+07 -106.829
|
||||
4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 804.916 1147.62 1705.6 855.045 0 1.46568e+08 2.08973e+08 3.10574e+08 1.55696e+08 8.59341e+07 1.65757e+08 2.3156e+08 1.07878e+08 6.16434e+07 1.62145e+08 6.95847e+07 1.04822e+08 8.77079e+07 1.76257e+07 74.8128
|
||||
5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 206.978 293.105 434.029 217.39 0 3.76889e+07 5.33719e+07 7.9033e+07 3.95849e+07 2.20973e+07 4.24099e+07 5.9058e+07 2.74755e+07 1.57438e+07 4.1327e+07 1.77189e+07 2.66745e+07 2.23073e+07 4.48124e+06 20.7188
|
||||
6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1277.1 1841.02 2752.08 1381.8 0 2.3255e+08 3.35235e+08 5.0113e+08 2.51613e+08 1.36345e+08 2.65149e+08 3.72304e+08 1.73849e+08 9.88886e+07 2.6097e+08 1.12172e+08 1.69137e+08 1.41653e+08 2.8484e+07 106.829
|
||||
7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -804.916 -1147.62 -1705.6 -855.045 0 -1.46568e+08 -2.08973e+08 -3.10574e+08 -1.55696e+08 -8.59341e+07 -1.65757e+08 -2.3156e+08 -1.07878e+08 -6.16434e+07 -1.62145e+08 -6.95847e+07 -1.04822e+08 -8.77079e+07 -1.76257e+07 -74.8128
|
||||
8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -368289 -407156 -507654 -255414 0 -6.70623e+10 -7.41396e+10 -9.24395e+10 -4.65087e+10 -3.93191e+10 -6.32509e+10 -7.68322e+10 -3.48602e+10 -2.18699e+10 -5.2291e+10 -2.21123e+10 -3.11993e+10 -2.61618e+10 -5.26504e+09 1.3152e+08
|
||||
9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -366906 -404336 -502742 -252940 0 -6.68105e+10 -7.36261e+10 -9.1545e+10 -4.60582e+10 -3.91714e+10 -6.28755e+10 -7.62227e+10 -3.45676e+10 -2.17185e+10 -5.18538e+10 -2.19213e+10 -3.08974e+10 -2.59085e+10 -5.21405e+09 1.2154e+08
|
||||
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -367764 -406084 -505786 -254475 0 -6.69666e+10 -7.39444e+10 -9.20993e+10 -4.63376e+10 -3.9263e+10 -6.31081e+10 -7.66004e+10 -3.47491e+10 -2.18124e+10 -5.21248e+10 -2.20397e+10 -3.10845e+10 -2.60656e+10 -5.24568e+09 1.27407e+08
|
||||
11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1133.9 -1843.91 -2924.6 -1483.25 0 -2.06474e+08 -3.3576e+08 -5.32545e+08 -2.70086e+08 -1.21057e+08 -2.57765e+08 -3.81922e+08 -1.81728e+08 -9.90436e+07 -2.70414e+08 -1.17681e+08 -1.7974e+08 -1.51444e+08 -3.05753e+07 -5.32884e+06
|
||||
12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -183.403 -298.662 -473.996 -240.251 0 -3.33961e+07 -5.43839e+07 -8.63107e+07 -4.37476e+07 -1.95804e+07 -4.17369e+07 -6.18761e+07 -2.94301e+07 -1.60423e+07 -4.38153e+07 -1.90614e+07 -2.91308e+07 -2.45361e+07 -4.95247e+06 -1.08912e+06
|
||||
13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 291.353 474.04 752.045 381.322 0 5.30528e+07 8.63186e+07 1.36941e+08 6.94355e+07 3.11053e+07 6.62589e+07 9.81954e+07 4.67164e+07 2.54626e+07 6.95288e+07 3.02541e+07 4.6219e+07 3.89377e+07 7.86049e+06 1.50556e+06
|
||||
17
examples/mliap/compute.quadratic.gg1.dat
Normal file
17
examples/mliap/compute.quadratic.gg1.dat
Normal file
@ -0,0 +1,17 @@
|
||||
# Time-averaged data for fix snap
|
||||
# TimeStep Number-of-rows
|
||||
# Row c_snap[1] c_snap[2] c_snap[3] c_snap[4] c_snap[5] c_snap[6] c_snap[7] c_snap[8] c_snap[9] c_snap[10] c_snap[11] c_snap[12] c_snap[13] c_snap[14] c_snap[15] c_snap[16] c_snap[17] c_snap[18] c_snap[19] c_snap[20] c_snap[21] c_snap[22] c_snap[23] c_snap[24] c_snap[25] c_snap[26] c_snap[27] c_snap[28] c_snap[29] c_snap[30] c_snap[31] c_snap[32] c_snap[33] c_snap[34] c_snap[35] c_snap[36] c_snap[37] c_snap[38] c_snap[39] c_snap[40] c_snap[41] c_snap[42] c_snap[43]
|
||||
0 13
|
||||
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 364183 213523 107428 122916 41227.5 3.31573e+10 3.88807e+10 1.95617e+10 2.23819e+10 7.50718e+09 1.1398e+10 1.14692e+10 1.31227e+10 4.40152e+09 2.88519e+09 6.60228e+09 2.21449e+09 3.77706e+09 2.53375e+09 4.24928e+08 322.87
|
||||
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -206.978 -293.105 -434.029 -217.39 0 -3.76889e+07 -5.33719e+07 -7.9033e+07 -3.95849e+07 -2.20973e+07 -4.24099e+07 -5.9058e+07 -2.74755e+07 -1.57438e+07 -4.1327e+07 -1.77189e+07 -2.66745e+07 -2.23073e+07 -4.48124e+06 -20.7188
|
||||
3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1277.1 -1841.02 -2752.08 -1381.8 0 -2.3255e+08 -3.35235e+08 -5.0113e+08 -2.51613e+08 -1.36345e+08 -2.65149e+08 -3.72304e+08 -1.73849e+08 -9.88886e+07 -2.6097e+08 -1.12172e+08 -1.69137e+08 -1.41653e+08 -2.8484e+07 -106.829
|
||||
4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 804.916 1147.62 1705.6 855.045 0 1.46568e+08 2.08973e+08 3.10574e+08 1.55696e+08 8.59341e+07 1.65757e+08 2.3156e+08 1.07878e+08 6.16434e+07 1.62145e+08 6.95847e+07 1.04822e+08 8.77079e+07 1.76257e+07 74.8128
|
||||
5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 206.978 293.105 434.029 217.39 0 3.76889e+07 5.33719e+07 7.9033e+07 3.95849e+07 2.20973e+07 4.24099e+07 5.9058e+07 2.74755e+07 1.57438e+07 4.1327e+07 1.77189e+07 2.66745e+07 2.23073e+07 4.48124e+06 20.7188
|
||||
6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1277.1 1841.02 2752.08 1381.8 0 2.3255e+08 3.35235e+08 5.0113e+08 2.51613e+08 1.36345e+08 2.65149e+08 3.72304e+08 1.73849e+08 9.88886e+07 2.6097e+08 1.12172e+08 1.69137e+08 1.41653e+08 2.8484e+07 106.829
|
||||
7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -804.916 -1147.62 -1705.6 -855.045 0 -1.46568e+08 -2.08973e+08 -3.10574e+08 -1.55696e+08 -8.59341e+07 -1.65757e+08 -2.3156e+08 -1.07878e+08 -6.16434e+07 -1.62145e+08 -6.95847e+07 -1.04822e+08 -8.77079e+07 -1.76257e+07 -74.8128
|
||||
8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -368289 -407156 -507654 -255414 0 -6.70623e+10 -7.41396e+10 -9.24395e+10 -4.65087e+10 -3.93191e+10 -6.32509e+10 -7.68322e+10 -3.48602e+10 -2.18699e+10 -5.2291e+10 -2.21123e+10 -3.11993e+10 -2.61618e+10 -5.26504e+09 1.3152e+08
|
||||
9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -366906 -404336 -502742 -252940 0 -6.68105e+10 -7.36261e+10 -9.1545e+10 -4.60582e+10 -3.91714e+10 -6.28755e+10 -7.62227e+10 -3.45676e+10 -2.17185e+10 -5.18538e+10 -2.19213e+10 -3.08974e+10 -2.59085e+10 -5.21405e+09 1.2154e+08
|
||||
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -367764 -406084 -505786 -254475 0 -6.69666e+10 -7.39444e+10 -9.20993e+10 -4.63376e+10 -3.9263e+10 -6.31081e+10 -7.66004e+10 -3.47491e+10 -2.18124e+10 -5.21248e+10 -2.20397e+10 -3.10845e+10 -2.60656e+10 -5.24568e+09 1.27407e+08
|
||||
11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1133.9 -1843.91 -2924.6 -1483.25 0 -2.06474e+08 -3.3576e+08 -5.32545e+08 -2.70086e+08 -1.21057e+08 -2.57765e+08 -3.81922e+08 -1.81728e+08 -9.90436e+07 -2.70414e+08 -1.17681e+08 -1.7974e+08 -1.51444e+08 -3.05753e+07 -5.32884e+06
|
||||
12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -183.403 -298.662 -473.996 -240.251 0 -3.33961e+07 -5.43839e+07 -8.63107e+07 -4.37476e+07 -1.95804e+07 -4.17369e+07 -6.18761e+07 -2.94301e+07 -1.60423e+07 -4.38153e+07 -1.90614e+07 -2.91308e+07 -2.45361e+07 -4.95247e+06 -1.08912e+06
|
||||
13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 291.353 474.04 752.045 381.322 0 5.30528e+07 8.63186e+07 1.36941e+08 6.94355e+07 3.11053e+07 6.62589e+07 9.81954e+07 4.67164e+07 2.54626e+07 6.95288e+07 3.02541e+07 4.6219e+07 3.89377e+07 7.86049e+06 1.50556e+06
|
||||
17
examples/mliap/compute.snap.gg0.dat
Normal file
17
examples/mliap/compute.snap.gg0.dat
Normal file
@ -0,0 +1,17 @@
|
||||
# Time-averaged data for fix snap
|
||||
# TimeStep Number-of-rows
|
||||
# Row c_snap[1] c_snap[2] c_snap[3] c_snap[4] c_snap[5] c_snap[6] c_snap[7] c_snap[8] c_snap[9] c_snap[10] c_snap[11] c_snap[12] c_snap[13]
|
||||
0 13
|
||||
1 0 0 0 0 0 0 2 364183 213523 107428 122916 41227.5 322.87
|
||||
2 0 0 0 0 0 0 0 0 -206.978 -293.105 -434.029 -217.39 -20.7188
|
||||
3 0 0 0 0 0 0 0 0 -1277.1 -1841.02 -2752.08 -1381.8 -106.829
|
||||
4 0 0 0 0 0 0 0 0 804.916 1147.62 1705.6 855.045 74.8128
|
||||
5 0 0 0 0 0 0 0 0 206.978 293.105 434.029 217.39 20.7188
|
||||
6 0 0 0 0 0 0 0 0 1277.1 1841.02 2752.08 1381.8 106.829
|
||||
7 0 0 0 0 0 0 0 0 -804.916 -1147.62 -1705.6 -855.045 -74.8128
|
||||
8 0 0 0 0 0 0 0 0 -368289 -407156 -507654 -255414 1.3152e+08
|
||||
9 0 0 0 0 0 0 0 0 -366906 -404336 -502742 -252940 1.2154e+08
|
||||
10 0 0 0 0 0 0 0 0 -367764 -406084 -505786 -254475 1.27407e+08
|
||||
11 0 0 0 0 0 0 0 0 -1133.9 -1843.91 -2924.6 -1483.25 -5.32884e+06
|
||||
12 0 0 0 0 0 0 0 0 -183.403 -298.662 -473.996 -240.251 -1.08912e+06
|
||||
13 0 0 0 0 0 0 0 0 291.353 474.04 752.045 381.322 1.50556e+06
|
||||
17
examples/mliap/compute.snap.gg1.dat
Normal file
17
examples/mliap/compute.snap.gg1.dat
Normal file
@ -0,0 +1,17 @@
|
||||
# Time-averaged data for fix snap
|
||||
# TimeStep Number-of-rows
|
||||
# Row c_snap[1] c_snap[2] c_snap[3] c_snap[4] c_snap[5] c_snap[6] c_snap[7] c_snap[8] c_snap[9] c_snap[10] c_snap[11] c_snap[12] c_snap[13]
|
||||
0 13
|
||||
1 0 0 0 0 0 0 2 364183 213523 107428 122916 41227.5 322.87
|
||||
2 0 0 0 0 0 0 0 0 -206.978 -293.105 -434.029 -217.39 -20.7188
|
||||
3 0 0 0 0 0 0 0 0 -1277.1 -1841.02 -2752.08 -1381.8 -106.829
|
||||
4 0 0 0 0 0 0 0 0 804.916 1147.62 1705.6 855.045 74.8128
|
||||
5 0 0 0 0 0 0 0 0 206.978 293.105 434.029 217.39 20.7188
|
||||
6 0 0 0 0 0 0 0 0 1277.1 1841.02 2752.08 1381.8 106.829
|
||||
7 0 0 0 0 0 0 0 0 -804.916 -1147.62 -1705.6 -855.045 -74.8128
|
||||
8 0 0 0 0 0 0 0 0 -368289 -407156 -507654 -255414 1.3152e+08
|
||||
9 0 0 0 0 0 0 0 0 -366906 -404336 -502742 -252940 1.2154e+08
|
||||
10 0 0 0 0 0 0 0 0 -367764 -406084 -505786 -254475 1.27407e+08
|
||||
11 0 0 0 0 0 0 0 0 -1133.9 -1843.91 -2924.6 -1483.25 -5.32884e+06
|
||||
12 0 0 0 0 0 0 0 0 -183.403 -298.662 -473.996 -240.251 -1.08912e+06
|
||||
13 0 0 0 0 0 0 0 0 291.353 474.04 752.045 381.322 1.50556e+06
|
||||
25
examples/mliap/in.mliap.so3.Ni_Mo
Normal file
25
examples/mliap/in.mliap.so3.Ni_Mo
Normal file
@ -0,0 +1,25 @@
|
||||
# ---------- Initialize Simulation ---------------------
|
||||
clear
|
||||
units metal
|
||||
dimension 3
|
||||
boundary p p p
|
||||
atom_style atomic
|
||||
read_data Ni_Mo.data
|
||||
|
||||
#change_box all x scale 0.9 y scale 0.9 z scale 0.9
|
||||
|
||||
pair_style mliap model linear Ni_Mo.mliap.model descriptor so3 Ni_Mo.mliap.descriptor
|
||||
pair_coeff * * Mo Ni
|
||||
|
||||
variable e equal pe
|
||||
variable N equal count(all)
|
||||
|
||||
thermo_style custom pe pxx pyy pzz pxy pxz pyz
|
||||
thermo 1
|
||||
|
||||
# dump 1 all custom 1 dump.myforce.* id type fx fy fz
|
||||
|
||||
velocity all create 300.0 4928459 loop geom
|
||||
fix 1 all nve
|
||||
|
||||
run 3
|
||||
52
examples/mliap/in.mliap.so3.nn.Si
Normal file
52
examples/mliap/in.mliap.so3.nn.Si
Normal file
@ -0,0 +1,52 @@
|
||||
# Run NPT MD simulation for Si at 500 K.
|
||||
variable nsteps index 100 #0
|
||||
|
||||
# NOTE: These are not intended to represent real materials
|
||||
|
||||
units metal
|
||||
|
||||
atom_style atomic
|
||||
atom_modify map array
|
||||
boundary p p p
|
||||
atom_modify sort 0 0.0
|
||||
|
||||
#read_data Si.data
|
||||
lattice diamond 5.43
|
||||
region box block 0 2 0 2 0 2
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 29.0
|
||||
|
||||
# temperature
|
||||
variable t equal 500.
|
||||
|
||||
|
||||
# Potential
|
||||
#pair_style mliap model nn Si-snap/NN_weights.txt descriptor sna Si-snap/DescriptorParam.txt
|
||||
pair_style mliap model nn Si.nn.mliap.model descriptor so3 Si.nn.mliap.descriptor
|
||||
pair_coeff * * Si Si
|
||||
|
||||
# Set-up output
|
||||
|
||||
compute eatom all pe/atom
|
||||
compute energy all reduce sum c_eatom
|
||||
|
||||
compute satom all stress/atom NULL
|
||||
compute str all reduce sum c_satom[1] c_satom[2] c_satom[3]
|
||||
variable press equal (c_str[1]+c_str[2]+c_str[3])/(3*vol)
|
||||
|
||||
thermo_style custom step temp epair c_energy etotal press v_press
|
||||
thermo 10
|
||||
thermo_modify norm yes
|
||||
|
||||
# Set up NVE run
|
||||
|
||||
timestep 0.5e-3
|
||||
neighbor 1.0 bin
|
||||
neigh_modify once no every 1 delay 0 check yes
|
||||
|
||||
# Run MD
|
||||
|
||||
velocity all create $t 5287287 loop geom
|
||||
fix 1 all npt temp ${t} ${t} 0.2 iso 0.0 0.0 2
|
||||
run ${nsteps}
|
||||
@ -1,5 +1,4 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
LAMMPS (27 May 2021)
|
||||
# Demonstrate MLIAP interface to SNAP nn Cu potential
|
||||
|
||||
# Initialize simulation
|
||||
@ -93,30 +92,30 @@ Neighbor list info ...
|
||||
Per MPI rank memory allocation (min/avg/max) = 31.17 | 31.17 | 31.17 Mbytes
|
||||
Step Temp E_pair c_energy TotEng Press v_press
|
||||
0 300 -4.0935581 -4.0935581 -4.0549315 -2916.7505 2916.7505
|
||||
10 294.19698 -4.0927997 -4.0927997 -4.0549203 -2653.7504 2653.7504
|
||||
20 277.15991 -4.0905816 -4.0905816 -4.0548958 -1875.7718 1875.7718
|
||||
30 250.30462 -4.0870777 -4.0870777 -4.0548496 -618.45378 618.45378
|
||||
40 215.94455 -4.0825861 -4.0825861 -4.0547821 1014.6151 -1014.6151
|
||||
50 177.29307 -4.0775299 -4.0775299 -4.0547025 2846.7675 -2846.7675
|
||||
60 138.26899 -4.072429 -4.072429 -4.0546261 4698.9654 -4698.9654
|
||||
70 103.04321 -4.0678341 -4.0678341 -4.0545667 6401.8077 -6401.8077
|
||||
80 75.426905 -4.0642423 -4.0642423 -4.0545307 7766.2217 -7766.2217
|
||||
90 58.150738 -4.0620015 -4.0620015 -4.0545143 8668.0598 -8668.0598
|
||||
100 52.301012 -4.0612408 -4.0612408 -4.0545067 9049.3141 -9049.3141
|
||||
Loop time of 12.7584 on 1 procs for 100 steps with 256 atoms
|
||||
10 294.11049 -4.0927998 -4.0927998 -4.0549315 -2654.7826 2654.7826
|
||||
20 276.89115 -4.0905826 -4.0905826 -4.0549314 -1879.2872 1879.2872
|
||||
30 249.71134 -4.0870829 -4.0870829 -4.0549312 -627.47006 627.47006
|
||||
40 214.92415 -4.0826036 -4.0826036 -4.054931 995.44801 -995.44801
|
||||
50 175.86879 -4.0775747 -4.0775747 -4.0549307 2811.6019 -2811.6019
|
||||
60 136.62706 -4.0725218 -4.0725218 -4.0549303 4640.4144 -4640.4144
|
||||
70 101.48566 -4.0679968 -4.0679968 -4.05493 6313.5871 -6313.5871
|
||||
80 74.248664 -4.0644897 -4.0644897 -4.0549298 7644.1364 -7644.1364
|
||||
90 57.500423 -4.0623332 -4.0623332 -4.0549297 8514.2222 -8514.2222
|
||||
100 52.104609 -4.0616385 -4.0616385 -4.0549298 8870.8923 -8870.8923
|
||||
Loop time of 4.77867 on 1 procs for 100 steps with 256 atoms
|
||||
|
||||
Performance: 0.339 ns/day, 70.880 hours/ns, 7.838 timesteps/s
|
||||
100.0% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
Performance: 0.904 ns/day, 26.548 hours/ns, 20.926 timesteps/s
|
||||
100.0% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 12.755 | 12.755 | 12.755 | 0.0 | 99.97
|
||||
Pair | 4.7771 | 4.7771 | 4.7771 | 0.0 | 99.97
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.0014069 | 0.0014069 | 0.0014069 | 0.0 | 0.01
|
||||
Output | 0.00085897 | 0.00085897 | 0.00085897 | 0.0 | 0.01
|
||||
Modify | 0.00075486 | 0.00075486 | 0.00075486 | 0.0 | 0.01
|
||||
Other | | 0.0003242 | | | 0.00
|
||||
Comm | 0.00052619 | 0.00052619 | 0.00052619 | 0.0 | 0.01
|
||||
Output | 0.00054073 | 0.00054073 | 0.00054073 | 0.0 | 0.01
|
||||
Modify | 0.00021744 | 0.00021744 | 0.00021744 | 0.0 | 0.00
|
||||
Other | | 0.0002317 | | | 0.00
|
||||
|
||||
Nlocal: 256.000 ave 256 max 256 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
@ -131,4 +130,4 @@ Total # of neighbors = 19968
|
||||
Ave neighs/atom = 78.000000
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:12
|
||||
Total wall time: 0:00:04
|
||||
@ -1,5 +1,4 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
LAMMPS (27 May 2021)
|
||||
# Demonstrate MLIAP interface to SNAP nn Cu potential
|
||||
|
||||
# Initialize simulation
|
||||
@ -93,30 +92,30 @@ Neighbor list info ...
|
||||
Per MPI rank memory allocation (min/avg/max) = 30.85 | 30.85 | 30.85 Mbytes
|
||||
Step Temp E_pair c_energy TotEng Press v_press
|
||||
0 300 -4.0935581 -4.0935581 -4.0549315 -2916.7505 2916.7505
|
||||
10 294.19698 -4.0927997 -4.0927997 -4.0549203 -2653.7504 2653.7504
|
||||
20 277.15991 -4.0905816 -4.0905816 -4.0548958 -1875.7718 1875.7718
|
||||
30 250.30462 -4.0870777 -4.0870777 -4.0548496 -618.45378 618.45378
|
||||
40 215.94455 -4.0825861 -4.0825861 -4.0547821 1014.6151 -1014.6151
|
||||
50 177.29307 -4.0775299 -4.0775299 -4.0547025 2846.7675 -2846.7675
|
||||
60 138.26899 -4.072429 -4.072429 -4.0546261 4698.9654 -4698.9654
|
||||
70 103.04321 -4.0678341 -4.0678341 -4.0545667 6401.8077 -6401.8077
|
||||
80 75.426905 -4.0642423 -4.0642423 -4.0545307 7766.2217 -7766.2217
|
||||
90 58.150738 -4.0620015 -4.0620015 -4.0545143 8668.0598 -8668.0598
|
||||
100 52.301012 -4.0612408 -4.0612408 -4.0545067 9049.3141 -9049.3141
|
||||
Loop time of 3.22769 on 4 procs for 100 steps with 256 atoms
|
||||
10 294.11049 -4.0927998 -4.0927998 -4.0549315 -2654.7826 2654.7826
|
||||
20 276.89115 -4.0905826 -4.0905826 -4.0549314 -1879.2872 1879.2872
|
||||
30 249.71134 -4.0870829 -4.0870829 -4.0549312 -627.47006 627.47006
|
||||
40 214.92415 -4.0826036 -4.0826036 -4.054931 995.44801 -995.44801
|
||||
50 175.86879 -4.0775747 -4.0775747 -4.0549307 2811.6019 -2811.6019
|
||||
60 136.62706 -4.0725218 -4.0725218 -4.0549303 4640.4144 -4640.4144
|
||||
70 101.48566 -4.0679968 -4.0679968 -4.05493 6313.5871 -6313.5871
|
||||
80 74.248664 -4.0644897 -4.0644897 -4.0549298 7644.1364 -7644.1364
|
||||
90 57.500423 -4.0623332 -4.0623332 -4.0549297 8514.2222 -8514.2222
|
||||
100 52.104609 -4.0616385 -4.0616385 -4.0549298 8870.8923 -8870.8923
|
||||
Loop time of 1.25021 on 4 procs for 100 steps with 256 atoms
|
||||
|
||||
Performance: 1.338 ns/day, 17.932 hours/ns, 30.982 timesteps/s
|
||||
100.0% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
Performance: 3.455 ns/day, 6.946 hours/ns, 79.987 timesteps/s
|
||||
100.0% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 3.19 | 3.2037 | 3.2196 | 0.7 | 99.26
|
||||
Pair | 1.2256 | 1.2347 | 1.2415 | 0.5 | 98.76
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.0061415 | 0.022081 | 0.035855 | 8.9 | 0.68
|
||||
Output | 0.00093221 | 0.00094824 | 0.00098861 | 0.0 | 0.03
|
||||
Modify | 0.0002173 | 0.00022773 | 0.00024477 | 0.0 | 0.01
|
||||
Other | | 0.0006805 | | | 0.02
|
||||
Comm | 0.0074687 | 0.014311 | 0.023481 | 4.8 | 1.14
|
||||
Output | 0.00060678 | 0.00062859 | 0.00066781 | 0.0 | 0.05
|
||||
Modify | 8.7976e-05 | 9.7811e-05 | 0.00010943 | 0.0 | 0.01
|
||||
Other | | 0.0004484 | | | 0.04
|
||||
|
||||
Nlocal: 64.0000 ave 64 max 64 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
@ -131,4 +130,4 @@ Total # of neighbors = 19968
|
||||
Ave neighs/atom = 78.000000
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:03
|
||||
Total wall time: 0:00:01
|
||||
@ -1,5 +1,4 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
LAMMPS (27 May 2021)
|
||||
# Demonstrate MLIAP interface to linear SNAP potential
|
||||
|
||||
# Initialize simulation
|
||||
@ -125,20 +124,20 @@ Step Temp E_pair c_energy TotEng Press v_press
|
||||
80 124.79303 -11.829099 -11.829099 -11.813094 1947.0715 -1947.0715
|
||||
90 97.448054 -11.825592 -11.825592 -11.813094 2231.9563 -2231.9563
|
||||
100 74.035418 -11.822589 -11.822589 -11.813094 2515.8526 -2515.8526
|
||||
Loop time of 3.05207 on 1 procs for 100 steps with 128 atoms
|
||||
Loop time of 1.46158 on 1 procs for 100 steps with 128 atoms
|
||||
|
||||
Performance: 1.415 ns/day, 16.956 hours/ns, 32.765 timesteps/s
|
||||
100.0% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
Performance: 2.956 ns/day, 8.120 hours/ns, 68.419 timesteps/s
|
||||
99.9% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 3.0503 | 3.0503 | 3.0503 | 0.0 | 99.94
|
||||
Pair | 1.4607 | 1.4607 | 1.4607 | 0.0 | 99.94
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.00072395 | 0.00072395 | 0.00072395 | 0.0 | 0.02
|
||||
Output | 0.00050893 | 0.00050893 | 0.00050893 | 0.0 | 0.02
|
||||
Modify | 0.00037375 | 0.00037375 | 0.00037375 | 0.0 | 0.01
|
||||
Other | | 0.0001878 | | | 0.01
|
||||
Comm | 0.00028086 | 0.00028086 | 0.00028086 | 0.0 | 0.02
|
||||
Output | 0.00035334 | 0.00035334 | 0.00035334 | 0.0 | 0.02
|
||||
Modify | 0.00011992 | 0.00011992 | 0.00011992 | 0.0 | 0.01
|
||||
Other | | 0.0001502 | | | 0.01
|
||||
|
||||
Nlocal: 128.000 ave 128 max 128 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
@ -154,4 +153,4 @@ Ave neighs/atom = 58.000000
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
|
||||
Total wall time: 0:00:03
|
||||
Total wall time: 0:00:01
|
||||
@ -1,5 +1,4 @@
|
||||
LAMMPS (10 Feb 2021)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
LAMMPS (27 May 2021)
|
||||
# Demonstrate MLIAP interface to linear SNAP potential
|
||||
|
||||
# Initialize simulation
|
||||
@ -32,7 +31,7 @@ Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (13.264000 13.264000
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 128 atoms
|
||||
create_atoms CPU = 0.000 seconds
|
||||
create_atoms CPU = 0.001 seconds
|
||||
|
||||
mass 1 180.88
|
||||
|
||||
@ -125,20 +124,20 @@ Step Temp E_pair c_energy TotEng Press v_press
|
||||
80 124.79303 -11.829099 -11.829099 -11.813094 1947.0715 -1947.0715
|
||||
90 97.448054 -11.825592 -11.825592 -11.813094 2231.9563 -2231.9563
|
||||
100 74.035418 -11.822589 -11.822589 -11.813094 2515.8526 -2515.8526
|
||||
Loop time of 0.858301 on 4 procs for 100 steps with 128 atoms
|
||||
Loop time of 0.466162 on 4 procs for 100 steps with 128 atoms
|
||||
|
||||
Performance: 5.033 ns/day, 4.768 hours/ns, 116.509 timesteps/s
|
||||
100.2% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
Performance: 9.267 ns/day, 2.590 hours/ns, 214.518 timesteps/s
|
||||
99.5% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.75351 | 0.79999 | 0.85429 | 4.2 | 93.21
|
||||
Pair | 0.36478 | 0.41101 | 0.45575 | 6.9 | 88.17
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.0026857 | 0.057019 | 0.10354 | 15.8 | 6.64
|
||||
Output | 0.00078796 | 0.00080864 | 0.00085671 | 0.0 | 0.09
|
||||
Modify | 0.00011437 | 0.00012275 | 0.00013339 | 0.0 | 0.01
|
||||
Other | | 0.0003564 | | | 0.04
|
||||
Comm | 0.0095217 | 0.054209 | 0.10046 | 19.0 | 11.63
|
||||
Output | 0.00042248 | 0.00045168 | 0.00051188 | 0.0 | 0.10
|
||||
Modify | 5.4359e-05 | 6.0737e-05 | 6.5088e-05 | 0.0 | 0.01
|
||||
Other | | 0.0004352 | | | 0.09
|
||||
|
||||
Nlocal: 32.0000 ave 32 max 32 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
88
examples/mliap/log.14Jun21.mliap.so3.Ni_Mo.g++.1
Normal file
88
examples/mliap/log.14Jun21.mliap.so3.Ni_Mo.g++.1
Normal file
@ -0,0 +1,88 @@
|
||||
LAMMPS (27 May 2021)
|
||||
# ---------- Initialize Simulation ---------------------
|
||||
clear
|
||||
units metal
|
||||
dimension 3
|
||||
boundary p p p
|
||||
atom_style atomic
|
||||
read_data Ni_Mo.data
|
||||
Reading data file ...
|
||||
orthogonal box = (0.0000000 0.0000000 0.0000000) to (5.7209005 5.7209005 3.5556620)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
10 atoms
|
||||
read_data CPU = 0.000 seconds
|
||||
|
||||
#change_box all x scale 0.9 y scale 0.9 z scale 0.9
|
||||
|
||||
pair_style mliap model linear Ni_Mo.mliap.model descriptor so3 Ni_Mo.mliap.descriptor
|
||||
Reading potential file Ni_Mo.mliap.descriptor with DATE: 2014-09-05
|
||||
SO3 keyword rcutfac 4.1
|
||||
SO3 keyword nmax 3
|
||||
SO3 keyword lmax 2
|
||||
SO3 keyword alpha 2.0
|
||||
SO3 keyword nelems 2
|
||||
SO3 keyword elems Mo
|
||||
SO3 keyword radelems 0.5
|
||||
SO3 keyword welems 42
|
||||
pair_coeff * * Mo Ni
|
||||
|
||||
variable e equal pe
|
||||
variable N equal count(all)
|
||||
|
||||
thermo_style custom pe pxx pyy pzz pxy pxz pyz
|
||||
thermo 1
|
||||
|
||||
# dump 1 all custom 1 dump.myforce.* id type fx fy fz
|
||||
|
||||
velocity all create 300.0 4928459 loop geom
|
||||
fix 1 all nve
|
||||
|
||||
run 3
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 10 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 6.1
|
||||
ghost atom cutoff = 6.1
|
||||
binsize = 3.05, bins = 2 2 2
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair mliap, perpetual
|
||||
attributes: full, newton on
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 17.22 | 17.22 | 17.22 Mbytes
|
||||
PotEng Pxx Pyy Pzz Pxy Pxz Pyz
|
||||
-60.509577 -38.702887 -342.91582 1831.0743 -819.59439 427.87407 446.40498
|
||||
-60.509344 -29.050171 -342.67124 1839.4215 -832.92479 439.72661 448.55829
|
||||
-60.509056 -9.4119072 -335.83361 1856.2802 -846.04664 451.4663 450.35456
|
||||
-60.508714 20.205972 -322.43019 1881.6 -858.97774 463.10122 451.79916
|
||||
Loop time of 0.00634885 on 1 procs for 3 steps with 10 atoms
|
||||
|
||||
Performance: 40.826 ns/day, 0.588 hours/ns, 472.527 timesteps/s
|
||||
78.5% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.0063019 | 0.0063019 | 0.0063019 | 0.0 | 99.26
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 7.6294e-06 | 7.6294e-06 | 7.6294e-06 | 0.0 | 0.12
|
||||
Output | 3.4094e-05 | 3.4094e-05 | 3.4094e-05 | 0.0 | 0.54
|
||||
Modify | 2.1458e-06 | 2.1458e-06 | 2.1458e-06 | 0.0 | 0.03
|
||||
Other | | 3.099e-06 | | | 0.05
|
||||
|
||||
Nlocal: 10.0000 ave 10 max 10 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 423.000 ave 423 max 423 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0.00000 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 780.000 ave 780 max 780 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 780
|
||||
Ave neighs/atom = 78.000000
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:00
|
||||
88
examples/mliap/log.14Jun21.mliap.so3.Ni_Mo.g++.4
Normal file
88
examples/mliap/log.14Jun21.mliap.so3.Ni_Mo.g++.4
Normal file
@ -0,0 +1,88 @@
|
||||
LAMMPS (27 May 2021)
|
||||
# ---------- Initialize Simulation ---------------------
|
||||
clear
|
||||
units metal
|
||||
dimension 3
|
||||
boundary p p p
|
||||
atom_style atomic
|
||||
read_data Ni_Mo.data
|
||||
Reading data file ...
|
||||
orthogonal box = (0.0000000 0.0000000 0.0000000) to (5.7209005 5.7209005 3.5556620)
|
||||
2 by 2 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
10 atoms
|
||||
read_data CPU = 0.000 seconds
|
||||
|
||||
#change_box all x scale 0.9 y scale 0.9 z scale 0.9
|
||||
|
||||
pair_style mliap model linear Ni_Mo.mliap.model descriptor so3 Ni_Mo.mliap.descriptor
|
||||
Reading potential file Ni_Mo.mliap.descriptor with DATE: 2014-09-05
|
||||
SO3 keyword rcutfac 4.1
|
||||
SO3 keyword nmax 3
|
||||
SO3 keyword lmax 2
|
||||
SO3 keyword alpha 2.0
|
||||
SO3 keyword nelems 2
|
||||
SO3 keyword elems Mo
|
||||
SO3 keyword radelems 0.5
|
||||
SO3 keyword welems 42
|
||||
pair_coeff * * Mo Ni
|
||||
|
||||
variable e equal pe
|
||||
variable N equal count(all)
|
||||
|
||||
thermo_style custom pe pxx pyy pzz pxy pxz pyz
|
||||
thermo 1
|
||||
|
||||
# dump 1 all custom 1 dump.myforce.* id type fx fy fz
|
||||
|
||||
velocity all create 300.0 4928459 loop geom
|
||||
fix 1 all nve
|
||||
|
||||
run 3
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 10 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 6.1
|
||||
ghost atom cutoff = 6.1
|
||||
binsize = 3.05, bins = 2 2 2
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair mliap, perpetual
|
||||
attributes: full, newton on
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 17.23 | 17.23 | 17.23 Mbytes
|
||||
PotEng Pxx Pyy Pzz Pxy Pxz Pyz
|
||||
-60.509577 -38.702887 -342.91582 1831.0743 -819.59439 427.87407 446.40498
|
||||
-60.509344 -29.050171 -342.67124 1839.4215 -832.92479 439.72661 448.55829
|
||||
-60.509056 -9.4119072 -335.83361 1856.2802 -846.04664 451.4663 450.35456
|
||||
-60.508714 20.205972 -322.43019 1881.6 -858.97774 463.10122 451.79916
|
||||
Loop time of 0.00191921 on 4 procs for 3 steps with 10 atoms
|
||||
|
||||
Performance: 135.056 ns/day, 0.178 hours/ns, 1563.143 timesteps/s
|
||||
100.0% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.0012183 | 0.0015162 | 0.0018141 | 0.8 | 79.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 5.3883e-05 | 0.00035822 | 0.00065947 | 0.0 | 18.67
|
||||
Output | 3.4094e-05 | 3.8326e-05 | 4.6492e-05 | 0.0 | 2.00
|
||||
Modify | 9.5367e-07 | 1.1325e-06 | 1.4305e-06 | 0.0 | 0.06
|
||||
Other | | 5.305e-06 | | | 0.28
|
||||
|
||||
Nlocal: 2.50000 ave 3 max 2 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||
Nghost: 303.500 ave 304 max 303 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||
Neighs: 0.00000 ave 0 max 0 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 195.000 ave 234 max 156 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||
|
||||
Total # of neighbors = 780
|
||||
Ave neighs/atom = 78.000000
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:00
|
||||
124
examples/mliap/log.14Jun21.mliap.so3.nn.Si.g++.1
Normal file
124
examples/mliap/log.14Jun21.mliap.so3.nn.Si.g++.1
Normal file
@ -0,0 +1,124 @@
|
||||
LAMMPS (27 May 2021)
|
||||
# Run NPT MD simulation for Si at 500 K.
|
||||
variable nsteps index 100 #0
|
||||
|
||||
# NOTE: These are not intended to represent real materials
|
||||
|
||||
units metal
|
||||
|
||||
atom_style atomic
|
||||
atom_modify map array
|
||||
boundary p p p
|
||||
atom_modify sort 0 0.0
|
||||
|
||||
#read_data Si.data
|
||||
lattice diamond 5.43
|
||||
Lattice spacing in x,y,z = 5.4300000 5.4300000 5.4300000
|
||||
region box block 0 2 0 2 0 2
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (10.860000 10.860000 10.860000)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 64 atoms
|
||||
create_atoms CPU = 0.000 seconds
|
||||
mass 1 29.0
|
||||
|
||||
# temperature
|
||||
variable t equal 500.
|
||||
|
||||
|
||||
# Potential
|
||||
#pair_style mliap model nn Si-snap/NN_weights.txt descriptor sna Si-snap/DescriptorParam.txt
|
||||
pair_style mliap model nn Si.nn.mliap.model descriptor so3 Si.nn.mliap.descriptor
|
||||
SO3 keyword rcutfac 5.0
|
||||
SO3 keyword nmax 3
|
||||
SO3 keyword lmax 4
|
||||
SO3 keyword alpha 2.0
|
||||
SO3 keyword nelems 1
|
||||
SO3 keyword elems Si
|
||||
SO3 keyword radelems 0.5
|
||||
SO3 keyword welems 14
|
||||
pair_coeff * * Si Si
|
||||
|
||||
# Set-up output
|
||||
|
||||
compute eatom all pe/atom
|
||||
compute energy all reduce sum c_eatom
|
||||
|
||||
compute satom all stress/atom NULL
|
||||
compute str all reduce sum c_satom[1] c_satom[2] c_satom[3]
|
||||
variable press equal (c_str[1]+c_str[2]+c_str[3])/(3*vol)
|
||||
|
||||
thermo_style custom step temp epair c_energy etotal press v_press
|
||||
thermo 10
|
||||
thermo_modify norm yes
|
||||
|
||||
# Set up NVE run
|
||||
|
||||
timestep 0.5e-3
|
||||
neighbor 1.0 bin
|
||||
neigh_modify once no every 1 delay 0 check yes
|
||||
|
||||
# Run MD
|
||||
|
||||
velocity all create $t 5287287 loop geom
|
||||
velocity all create 500 5287287 loop geom
|
||||
fix 1 all npt temp ${t} ${t} 0.2 iso 0.0 0.0 2
|
||||
fix 1 all npt temp 500 ${t} 0.2 iso 0.0 0.0 2
|
||||
fix 1 all npt temp 500 500 0.2 iso 0.0 0.0 2
|
||||
run ${nsteps}
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 6
|
||||
ghost atom cutoff = 6
|
||||
binsize = 3, bins = 4 4 4
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair mliap, perpetual
|
||||
attributes: full, newton on
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 298.3 | 298.3 | 298.3 Mbytes
|
||||
Step Temp E_pair c_energy TotEng Press v_press
|
||||
0 500 -3.8376374 -3.8376374 -3.7740172 -7295.2456 7295.2456
|
||||
10 489.81 -3.8363423 -3.8363423 -3.7740187 -6964.5624 6964.5624
|
||||
20 460.24523 -3.8325828 -3.8325828 -3.774021 -6014.7165 6014.7165
|
||||
30 414.4367 -3.826752 -3.826752 -3.7740189 -4572.0641 4572.0641
|
||||
40 358.34511 -3.8196022 -3.8196022 -3.7740062 -2849.9177 2849.9177
|
||||
50 300.80447 -3.8122536 -3.8122536 -3.7739791 -1128.7008 1128.7008
|
||||
60 251.6276 -3.8059543 -3.8059543 -3.7739371 306.20639 -306.20639
|
||||
70 218.02888 -3.8016236 -3.8016236 -3.7738815 1253.4391 -1253.4391
|
||||
80 201.70095 -3.7994767 -3.7994767 -3.7738122 1661.6675 -1661.6675
|
||||
90 198.91416 -3.7990366 -3.7990366 -3.7737266 1628.78 -1628.78
|
||||
100 203.36197 -3.799497 -3.799497 -3.7736212 1338.0458 -1338.0458
|
||||
Loop time of 3.39264 on 1 procs for 100 steps with 64 atoms
|
||||
|
||||
Performance: 1.273 ns/day, 18.848 hours/ns, 29.476 timesteps/s
|
||||
99.9% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 3.391 | 3.391 | 3.391 | 0.0 | 99.95
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.00029302 | 0.00029302 | 0.00029302 | 0.0 | 0.01
|
||||
Output | 0.00039387 | 0.00039387 | 0.00039387 | 0.0 | 0.01
|
||||
Modify | 0.00074792 | 0.00074792 | 0.00074792 | 0.0 | 0.02
|
||||
Other | | 0.0002153 | | | 0.01
|
||||
|
||||
Nlocal: 64.0000 ave 64 max 64 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 557.000 ave 557 max 557 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0.00000 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 2944.00 ave 2944 max 2944 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 2944
|
||||
Ave neighs/atom = 46.000000
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:03
|
||||
124
examples/mliap/log.14Jun21.mliap.so3.nn.Si.g++.4
Normal file
124
examples/mliap/log.14Jun21.mliap.so3.nn.Si.g++.4
Normal file
@ -0,0 +1,124 @@
|
||||
LAMMPS (27 May 2021)
|
||||
# Run NPT MD simulation for Si at 500 K.
|
||||
variable nsteps index 100 #0
|
||||
|
||||
# NOTE: These are not intended to represent real materials
|
||||
|
||||
units metal
|
||||
|
||||
atom_style atomic
|
||||
atom_modify map array
|
||||
boundary p p p
|
||||
atom_modify sort 0 0.0
|
||||
|
||||
#read_data Si.data
|
||||
lattice diamond 5.43
|
||||
Lattice spacing in x,y,z = 5.4300000 5.4300000 5.4300000
|
||||
region box block 0 2 0 2 0 2
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (10.860000 10.860000 10.860000)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 64 atoms
|
||||
create_atoms CPU = 0.000 seconds
|
||||
mass 1 29.0
|
||||
|
||||
# temperature
|
||||
variable t equal 500.
|
||||
|
||||
|
||||
# Potential
|
||||
#pair_style mliap model nn Si-snap/NN_weights.txt descriptor sna Si-snap/DescriptorParam.txt
|
||||
pair_style mliap model nn Si.nn.mliap.model descriptor so3 Si.nn.mliap.descriptor
|
||||
SO3 keyword rcutfac 5.0
|
||||
SO3 keyword nmax 3
|
||||
SO3 keyword lmax 4
|
||||
SO3 keyword alpha 2.0
|
||||
SO3 keyword nelems 1
|
||||
SO3 keyword elems Si
|
||||
SO3 keyword radelems 0.5
|
||||
SO3 keyword welems 14
|
||||
pair_coeff * * Si Si
|
||||
|
||||
# Set-up output
|
||||
|
||||
compute eatom all pe/atom
|
||||
compute energy all reduce sum c_eatom
|
||||
|
||||
compute satom all stress/atom NULL
|
||||
compute str all reduce sum c_satom[1] c_satom[2] c_satom[3]
|
||||
variable press equal (c_str[1]+c_str[2]+c_str[3])/(3*vol)
|
||||
|
||||
thermo_style custom step temp epair c_energy etotal press v_press
|
||||
thermo 10
|
||||
thermo_modify norm yes
|
||||
|
||||
# Set up NVE run
|
||||
|
||||
timestep 0.5e-3
|
||||
neighbor 1.0 bin
|
||||
neigh_modify once no every 1 delay 0 check yes
|
||||
|
||||
# Run MD
|
||||
|
||||
velocity all create $t 5287287 loop geom
|
||||
velocity all create 500 5287287 loop geom
|
||||
fix 1 all npt temp ${t} ${t} 0.2 iso 0.0 0.0 2
|
||||
fix 1 all npt temp 500 ${t} 0.2 iso 0.0 0.0 2
|
||||
fix 1 all npt temp 500 500 0.2 iso 0.0 0.0 2
|
||||
run ${nsteps}
|
||||
run 100
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 6
|
||||
ghost atom cutoff = 6
|
||||
binsize = 3, bins = 4 4 4
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair mliap, perpetual
|
||||
attributes: full, newton on
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 298.2 | 298.2 | 298.2 Mbytes
|
||||
Step Temp E_pair c_energy TotEng Press v_press
|
||||
0 500 -3.8376374 -3.8376374 -3.7740172 -7295.2456 7295.2456
|
||||
10 489.81 -3.8363423 -3.8363423 -3.7740187 -6964.5624 6964.5624
|
||||
20 460.24523 -3.8325828 -3.8325828 -3.774021 -6014.7165 6014.7165
|
||||
30 414.4367 -3.826752 -3.826752 -3.7740189 -4572.0641 4572.0641
|
||||
40 358.34511 -3.8196022 -3.8196022 -3.7740062 -2849.9177 2849.9177
|
||||
50 300.80447 -3.8122536 -3.8122536 -3.7739791 -1128.7008 1128.7008
|
||||
60 251.6276 -3.8059543 -3.8059543 -3.7739371 306.20639 -306.20639
|
||||
70 218.02888 -3.8016236 -3.8016236 -3.7738815 1253.4391 -1253.4391
|
||||
80 201.70095 -3.7994767 -3.7994767 -3.7738122 1661.6675 -1661.6675
|
||||
90 198.91416 -3.7990366 -3.7990366 -3.7737266 1628.78 -1628.78
|
||||
100 203.36197 -3.799497 -3.799497 -3.7736212 1338.0458 -1338.0458
|
||||
Loop time of 1.06231 on 4 procs for 100 steps with 64 atoms
|
||||
|
||||
Performance: 4.067 ns/day, 5.902 hours/ns, 94.135 timesteps/s
|
||||
95.4% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.97395 | 1.0072 | 1.048 | 2.7 | 94.81
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.012069 | 0.052803 | 0.086037 | 12.0 | 4.97
|
||||
Output | 0.00052595 | 0.0005523 | 0.00062776 | 0.0 | 0.05
|
||||
Modify | 0.0014014 | 0.001442 | 0.0014772 | 0.1 | 0.14
|
||||
Other | | 0.0003045 | | | 0.03
|
||||
|
||||
Nlocal: 16.0000 ave 16 max 16 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 349.000 ave 349 max 349 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0.00000 ave 0 max 0 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 736.000 ave 736 max 736 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 2944
|
||||
Ave neighs/atom = 46.000000
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:01
|
||||
17
potentials/Ni_Mo.mliap.descriptor
Normal file
17
potentials/Ni_Mo.mliap.descriptor
Normal file
@ -0,0 +1,17 @@
|
||||
# DATE: 2014-09-05 UNITS: metal CONTRIBUTOR: Aidan Thompson athomps@sandia.gov CITATION: Thompson, Swiler, Trott, Foiles and Tucker, arxiv.org, 1409.3880 (2014)
|
||||
|
||||
# LAMMPS SNAP parameters for Ta_Cand06A
|
||||
|
||||
# required
|
||||
rcutfac 4.1
|
||||
|
||||
nmax 3
|
||||
lmax 2
|
||||
alpha 2.0
|
||||
|
||||
nelems 2
|
||||
elems Mo Ni
|
||||
radelems 0.5 0.5
|
||||
welems 42 28
|
||||
|
||||
|
||||
42
potentials/Ni_Mo.mliap.model
Normal file
42
potentials/Ni_Mo.mliap.model
Normal file
@ -0,0 +1,42 @@
|
||||
# Polynomial Regression weights generated in PyXtal_FF
|
||||
# total_species ncoefficient
|
||||
|
||||
2 19
|
||||
-10.484582207168929
|
||||
0.002181984336398585
|
||||
0.00014278726759476177
|
||||
-3.8073123887240994e-05
|
||||
0.00942160245354996
|
||||
-0.002953156990653782
|
||||
0.0035289893532609155
|
||||
0.010388199227015397
|
||||
-0.007293285178559783
|
||||
0.007778725702022789
|
||||
0.02409088304815118
|
||||
-0.006471686904018551
|
||||
0.007708629032670791
|
||||
0.05493502344189282
|
||||
-0.037332449564392266
|
||||
0.03526780681504278
|
||||
0.07467315638703718
|
||||
-0.040318596628773226
|
||||
0.0422992011630305
|
||||
-4.847096371333525
|
||||
0.00026609729899863425
|
||||
0.0006174790678830839
|
||||
0.0011724604882377416
|
||||
0.0007124714756813229
|
||||
0.0008021747400134603
|
||||
0.004032016341419122
|
||||
0.00011594166533859027
|
||||
-0.0007692676499943738
|
||||
0.003157768943516899
|
||||
0.0029578461448900376
|
||||
0.004176054309089772
|
||||
0.013203612422421204
|
||||
0.003423023528944328
|
||||
-0.0030482554314720275
|
||||
0.021258801851889702
|
||||
0.009238194498574716
|
||||
-0.0031503286063986977
|
||||
0.03174623113337486
|
||||
14
potentials/Si.nn.mliap.descriptor
Normal file
14
potentials/Si.nn.mliap.descriptor
Normal file
@ -0,0 +1,14 @@
|
||||
# Descriptor parameters generated in PyXtal_FF
|
||||
|
||||
# Required
|
||||
rcutfac 5.0
|
||||
nmax 3
|
||||
lmax 4
|
||||
alpha 2.0
|
||||
|
||||
# Elements
|
||||
|
||||
nelems 1
|
||||
elems Si
|
||||
radelems 0.5
|
||||
welems 14
|
||||
182
potentials/Si.nn.mliap.model
Normal file
182
potentials/Si.nn.mliap.model
Normal file
@ -0,0 +1,182 @@
|
||||
# Neural networks weights generated in PyXtal_FF
|
||||
# total_species nparams
|
||||
1 785
|
||||
|
||||
# NET ndescriptors nlayers activation_func for layer 1, number of nodes for layer 1, ..., ..., ....,
|
||||
NET 30 3 tanh 16 tanh 16 linear 1
|
||||
|
||||
# Scale0
|
||||
882.1455698558184 0.0000000000000 0.0000000000000 5.8841777702371 5.7517799958383
|
||||
-3238.9045671946642 -251.4215568867158 -178.2481266736228 -179.1034402268287 -221.9598950116207
|
||||
90.0327111887464 0.0000000000000 0.0000000000000 1.0415952549641 2.1678474306880
|
||||
-322.3587241302986 -75.7646415488627 -76.7145786721378 -129.0677794487796 -112.8987161484017
|
||||
-245.1898929301280 -74.2072298868271 -80.7839875646899 -88.2638908840287 -72.5147728162335
|
||||
0.0000000611830 0.0000000000000 0.0000000000000 0.8210754495092 0.8535996334201
|
||||
|
||||
# Scale1
|
||||
5596.5949073820930 631.6650003257006 507.4436535576392 526.9938853932412 578.4408280351018
|
||||
2946.1154148172673 387.1899445036270 289.3330986716401 400.3133327930956 344.7757780648306
|
||||
1791.3334649717744 229.6824470442407 282.7126942391381 295.8232977577057 213.4074061628525
|
||||
702.0628109646157 116.5739852500949 94.8723519732492 161.8196514838781 125.3225027894728
|
||||
336.8056307932885 81.6558752026350 86.1654467256720 94.0311967431067 81.3402101281388
|
||||
36.4668951370478 29.7270744697909 30.5640947358207 43.8634527339667 37.3463021205072
|
||||
|
||||
# Coefficients (Si)
|
||||
0.3685385859286 -0.7362089264023 0.2715981065192 -0.1163322715384 0.3075404404972
|
||||
-0.1610935909884 0.0015719318101 -0.5946522948990 -0.1053262271503 0.0880530740557
|
||||
-0.1994084791015 0.5117820573250 -0.3213661835683 -0.0937083715377 -0.2683319723078
|
||||
-0.2532296010987 -0.5584453847766 -0.1042993171458 0.1662189986326 0.1082297339321
|
||||
0.4454372211944 0.7546740467117 -0.4766645580419 -0.6032704524575 -0.5618001207332
|
||||
-0.3428319344940 0.0260954348575 -0.1489788544525 -0.1717162356069 -0.2914269918301
|
||||
0.1840607080241 -0.0255899000658 1.0924323643612 0.4260148927592 0.1239175432774
|
||||
-0.9116368030807 -1.2975392383857 0.2389860982057 0.5160804882868 0.1210706506477
|
||||
-0.1473192701817 0.8192625410393 0.2152596573607 0.1358353711302 0.6717634613131
|
||||
-0.2315709284550 0.1741413084117 -0.0099955470754 0.2616483846714 0.3912502053220
|
||||
0.8749951208333 -0.0431582056181 0.0102692478410 0.1186685028545 0.1946870540726
|
||||
0.4036277185047 0.5928075256653 -0.4496293441759 0.9264124791852 0.1716675841982
|
||||
0.2708051872856 0.4463867931709 -0.4957162076397 -0.0746578010730 0.0073625462495
|
||||
0.0092517223471 -0.0415038367188 0.0045399774768 -0.2776779881357 -0.3091863908603
|
||||
-0.1016267540100 -0.0784091348819 -0.0203494059243 -0.2990856988363 0.2401024708934
|
||||
0.0708936055962 0.1431336258523 0.1858443893117 -0.2816923101943 -0.2910022130389
|
||||
-0.3135572060018 -0.1521378607704 -0.2453897063581 -0.2726430057341 -0.2421602698082
|
||||
-0.3128029713546 -0.1827056998260 -0.3901520035262 -0.1324626884016 0.1607549950922
|
||||
-0.1272025961543 -0.2662529289302 -0.2001902105085 1.3322746230916 -0.8843714935272
|
||||
0.0610990084591 -0.2018171772711 -1.2055303456803 -0.2325866875488 0.1081275282523
|
||||
-0.1491391559555 -0.5520812407412 -0.0640761380549 0.6765175020195 1.2206531572117
|
||||
0.1078375642360 -0.1028473414486 0.6249292293014 -0.2018181367134 -0.4251848300159
|
||||
0.0381912209677 -0.2839240973504 0.6938189551207 0.4475271058663 1.2439556871932
|
||||
0.0958715552130 0.0848914643322 0.0359333433729 -0.1426658987523 0.3878612432265
|
||||
-0.0884002830699 0.2461842525732 -0.3855417641638 0.3610547974928 1.2000221012044
|
||||
-0.7619489325768 0.1922710798231 0.2013011272099 0.2597940390654 0.1663268357305
|
||||
0.1773185099443 -0.3741158312170 -0.0338525225587 0.2549708021742 -0.0810650986302
|
||||
0.1224230230427 -0.1934990255791 0.0495785029249 -0.0618816297472 -0.2746687250995
|
||||
0.5713036318631 -0.0364995002901 -0.1983132283451 -0.3268392300109 -0.3482902774445
|
||||
0.6538801814102 -0.4113836580166 -0.2305353676706 -0.5778250045389 -0.3598740944450
|
||||
0.2736443710983 -0.1128910933430 -0.0919988917993 -0.4368560396096 -0.2305403790951
|
||||
0.6649323339792 0.0709828831945 -0.0033436631396 0.1057717177900 -0.1460299227050
|
||||
-0.1389142008027 -0.1475847298953 0.0780163595712 0.0258466155780 -0.1789616940560
|
||||
-0.0373947792796 0.2148420813297 -0.0431798011847 -0.0146104312043 -0.1480239599857
|
||||
-0.0847080878942 0.2039926538485 -0.2010381944098 -0.2668431937612 -0.3216515425436
|
||||
-0.2596890571364 0.4936195382822 -0.1860180745114 -0.2074354118557 -0.2416732831209
|
||||
-0.2666376819098 -0.0908097400915 -0.1289920784494 0.0335866638839 -0.2518965413050
|
||||
0.0674487132870 0.8915640476571 0.7651062195186 -0.1737237449531 -0.4109639542841
|
||||
0.1298528884941 0.4157590846198 -0.4396218718418 0.4188550271970 -0.0968598586540
|
||||
0.4380015939459 0.5274261605942 0.4817745745905 -0.1670330165165 0.0672294110689
|
||||
-0.1621708597271 -0.1891426446188 -0.5498956343431 -0.2262600980463 0.5589639856567
|
||||
0.1239520142574 0.3232100994997 0.9701165829357 -0.4243827247698 -0.1907722239427
|
||||
-0.3252703454469 -0.2813430915954 -0.0354802312175 0.2331764896939 -0.1601162478960
|
||||
0.3928971102942 0.3584634396318 -1.6846550738145 0.5632377845138 0.3377503176471
|
||||
-0.0405972283898 -0.1126722368764 0.1169922293148 0.2868564429577 0.2054722348762
|
||||
0.0146227932877 0.4210830438308 0.3900767602931 -1.6796713374215 -0.0141085808126
|
||||
0.0267583172940 0.1747450657015 -0.0869382873339 0.2294135521442 0.3500471271637
|
||||
0.3153816845778 0.5203183486326 0.2344264371423 -1.0952287735043 0.0360401196553
|
||||
0.3766505356391 0.0690211828188 -0.1291720195852 -0.1391378659197 0.1277323633603
|
||||
0.4358883412432 -0.0930214078514 0.2296762696431 0.3657489953416 0.4448481207998
|
||||
-0.2970278559470 0.0082107225834 0.4729868874967 -0.0322408769252 -0.2567544388038
|
||||
-0.0394079478990 -0.3276878648768 0.1190393086387 -0.4630355455104 0.1903764089070
|
||||
-0.0686929963287 -0.2700398391081 0.1630763502798 0.0039653039953 0.5471048363965
|
||||
-0.2121672830401 -0.1387310526842 -0.4748692221685 -0.2179131043939 0.1791359553141
|
||||
-0.0691481047346 0.0364693118101 -0.1074750293966 -0.0280347427886 -0.0531915291890
|
||||
-0.0027278735969 0.0472166196619 0.0639748960102 -0.2149691753932 0.1703765335668
|
||||
-0.8365293274490 -0.2036299287295 -0.3024336780502 0.6313286341753 0.4324479854633
|
||||
-0.2212564442055 -0.1902989818823 -0.5341896432760 0.2063449670623 0.1972911567449
|
||||
0.1952633938886 -0.2248277867577 -0.4015108017380 0.0682928813456 0.1196456983654
|
||||
1.0593448000443 -0.2011051575189 -0.1122540932884 -0.7191699683672 -0.5961212611454
|
||||
-0.2982400656862 -0.1475683720679 -0.0478394860059 0.0495651850840 -0.2362850664368
|
||||
-0.4559405422384 -0.0692926624755 -0.0148035961730 -0.3522265422434 -0.6042574163050
|
||||
0.1875123361167 0.5036468057014 0.2489867456544 0.1906756848081 -0.2642126398248
|
||||
-0.6311635481053 -0.2129877266597 0.2904008152973 0.1018749064853 0.0181960006954
|
||||
0.1945223832919 0.6415511824798 0.3522432230794 0.5854281319088 0.4379170307822
|
||||
0.1648737245668 0.7394444442469 -0.3829009998903 0.0560041245747 0.1579916169815
|
||||
0.2501615866544 -0.3289091242248 0.5711076100448 0.3588275108163 0.3369828604279
|
||||
0.2195478789498 0.2864203320072 0.1841745961074 -0.1113560909355 -0.4174258027241
|
||||
-0.2575966532337 0.4461193139074 0.3595341872731 -0.1382070858505 -0.0159911642453
|
||||
-0.1567014153427 0.0806357834131 -0.2494555963476 -0.2182530605791 -0.0961148334151
|
||||
-0.3785090354048 0.0767693764145 0.4786604486863 0.1568926643890 0.0566623778208
|
||||
-0.3094365663166 -0.1083766919037 -0.2986844651899 0.2345767514997 -0.0059661611070
|
||||
0.1902232250425 0.3007396332837 0.4012532609389 -0.0776601524775 0.0887931786695
|
||||
0.4013405289830 -0.0921550476990 -0.3615563850377 -0.0073781054302 0.1676596752198
|
||||
-0.2268566003739 0.2596695961758 0.1563055924178 -0.8119493930685 -0.0342191707597
|
||||
0.0870489501782 -0.2974632450281 0.1306968350832 0.1784678031175 -0.4884028995396
|
||||
-0.1023409886934 0.0559531100516 -0.3279385032663 0.2928797561194 -0.0716663805949
|
||||
-0.0190349957267 0.0613799053730 -0.4339274961167 -0.7006893315445 -0.2182992907551
|
||||
-0.2609681405818 -0.0185885459265 0.1742618542683 0.8278105797262 -0.5688268645217
|
||||
-0.4792864876608 -0.7316222338308 -0.4475501847008 -0.1582773880609 -0.1305552697648
|
||||
-0.2538086608846 -0.1678664635166 0.2462902787707 -0.5492441534695 -0.3128240729465
|
||||
0.1049857923344 -0.0330704910625 0.0956870561308 -0.1972193315073 -0.1048020498956
|
||||
-0.1061682562857 -0.1047593924707 -0.2964507520524 -0.2578017048300 -0.4019070165651
|
||||
0.0393263343754 0.1406195106286 -0.0853062790799 -0.0047225654714 0.0761059325935
|
||||
-0.1435354639704 -0.3039719120447 -0.1568669592638 -0.1740003982441 -0.5880253498919
|
||||
-0.0489572853307 0.0220457298206 0.0868809611978 -0.1265508169263 -0.0800482390698
|
||||
-0.1234524026091 -0.0121219049785 -0.3047835841705 -0.3699741347267 -0.3479025131708
|
||||
-0.2237103203199 0.0309776473568 0.1054531715636 -0.2456114999955 0.0171740317434
|
||||
-0.1534204498368 0.0015393121406 -0.0391843066781 -0.1615841309991 -0.2673244607112
|
||||
0.0214007124664 -0.1339223667613 0.0543227945322 -0.1687852155448 -0.0804620409308
|
||||
-0.1724371034281 -0.1384011520847 -0.0833851773924 -0.2328384556197 -0.2024054789816
|
||||
-0.2320102698623 -0.0455728305404 -0.1232310117814 -0.1415638175694 -0.0587450191320
|
||||
0.1245671209481 -0.0456711386439 -0.1264329406955 -0.1111747027193 -0.0094711310831
|
||||
0.8746357449946 0.0015891946774 0.2237765838820 -0.2115611671441 -0.4005773679195
|
||||
-0.2186188633684 -0.1453645274652 -0.2036514323290 -0.0298211838719 -0.2351411896292
|
||||
-0.3870269527221 0.5250721712499 -0.1455085902255 -0.1891590874126 -0.2531338044708
|
||||
-0.3623391871451 -0.1455624668322 -0.2637835432189 0.0967268579861 0.1262091023974
|
||||
0.0991503171882 0.8407894741334 -0.1888506108661 0.0271133642332 -0.4138397980861
|
||||
-0.4048449242738 0.1827704696781 -0.0706675535582 -0.0502436125664 -0.1042334268383
|
||||
0.1707949370808 0.3284897275196 0.0818957864931 0.0392814721250 -0.1833387659320
|
||||
0.0893216359566 0.0763231106540 -0.1839596412801 -0.0344947879819 -0.0792812914101
|
||||
0.1444554612643 -0.0993219107507 0.0649589561109 -0.0966764437673 -0.0391474257378
|
||||
-0.0718042907276 -0.0510326987528 0.0874954020808 -0.2550973591885 -0.0126974836540
|
||||
0.1795275097906 0.1101543183550 -0.0995485499980 -0.1751275503398 -0.0359731228901
|
||||
-0.1452836760264 -0.0541032661164 -0.2716642394681 -0.5104540803432 -0.0566481480266
|
||||
0.0817172135540 -0.1122245807885 0.0297482550722 -0.0749316464476 -0.0204811962607
|
||||
-0.0639507960267 -0.1668705387068 0.3722759373542 0.2136526553985 0.0150012303106
|
||||
0.0603997328772 -0.1097567029358 0.1397793930764 -0.0040445558669 -0.1154439955295
|
||||
-0.3701591631754 -0.0595312646604 0.1651745572528 -0.1602767026376 -0.1626919630315
|
||||
-0.0675007240727 0.1734640638880 0.1277542922121 -0.0192996025061 -0.1440538146222
|
||||
-0.1247820904688 0.0302035441708 0.1316686798346 0.1643643009318 0.0539896790809
|
||||
0.1625339645675 0.1823539567496 0.3634460144592 0.1207046199949 0.0578686179836
|
||||
0.0941689295993 -0.1237971505306 0.1491810141483 -0.0770705141179 -0.2065595244990
|
||||
0.0089263397707 0.0961014773091 0.2140364206986 -0.2163708468276 -0.2097652590745
|
||||
-0.1637721527497 0.0204393073684 -0.0106139043140 -0.0506018331394 0.1608831823069
|
||||
0.0653020745598 -0.1954829098091 -0.0307611137052 -0.0115378469285 -0.1461047931131
|
||||
0.0035523460907 -0.5402468972430 -0.4333734271909 0.3871808991651 0.3982942968667
|
||||
-0.8733108214666 -0.6905546696240 -0.8806423587757 -0.3197354220301 0.6231176926895
|
||||
0.1388604007147 -0.1367318985738 -0.1411949712371 -0.2705802320621 -0.3449665135980
|
||||
-0.0081040886406 -0.0965179875103 -0.4439740653898 -0.4248582686136 -0.0004104724442
|
||||
0.0053370201369 0.2980657389484 0.0334502122417 0.0819999333318 -0.1169849309797
|
||||
-0.1596767695407 0.2136850755282 -0.2621010345049 -0.0869758529020 -0.3184408121493
|
||||
-0.1206579399187 0.1995314696923 -0.1617366359012 -0.1124458838619 -0.2696291568413
|
||||
-0.2029138009744 -0.2026416870784 0.0510599783777 0.1692934578713 0.0844396492460
|
||||
-0.1751769965838 -0.1534795159321 0.2127885250648 -0.0856561690561 0.1907353848099
|
||||
-0.0138361532750 -0.0480655789029 -0.1272012046007 0.0416270201558 0.2065976758082
|
||||
0.0988493595194 -0.0176964082905 -0.4744037719779 -0.2949523315253 0.3118705497400
|
||||
0.1489691439304 -0.4569175538330 -0.4644897009341 -0.4686168623570 -0.1243054728558
|
||||
0.5732171519706 0.1904896053219 -0.2103352434311 -0.3795352101730 0.0574951703103
|
||||
-0.3815644383174 0.0985307776878 -0.0259340090039 -0.2085191025194 0.2110201228876
|
||||
0.2340052956771 -0.3498732231605 -0.0988402172947 -0.1940790287983 0.2660742157027
|
||||
0.0798252876458 0.2279218829521 -0.3316405856822 0.7115928862830 0.7723969088612
|
||||
0.3349444713400 -0.0497704006667 0.1887612653901 0.1279612878363 0.1974428443251
|
||||
0.0658477720105 -0.2305151128541 -0.1247363598405 0.1178605543768 0.3570210956889
|
||||
-0.1204677179984 -0.3879495282948 -0.1219409546575 -0.3573611388182 0.3281661470559
|
||||
-0.1902806689623 -0.2716112953705 0.0830330364636 -0.1578261726584 -0.0994840276723
|
||||
0.1897574923466 0.0992230533211 0.1276570722926 -0.4546854120255 -0.1836046126462
|
||||
0.1539256939837 0.0387381375615 -0.1707388754077 0.3056841191317 0.1034545056807
|
||||
-0.1189619476757 0.6363824120801 0.1042674354613 0.1333633803582 -0.1622687430124
|
||||
-0.0897454482076 0.1708797441326 0.2868923216527 0.0277641973893 -0.1791665666371
|
||||
-0.3176474905621 -0.0061446861913 -0.0161385152018 0.1738887663948 0.0208887791735
|
||||
-0.0320567148133 -0.0730146550801 -0.0470228989655 0.0834656204265 -0.0233593165817
|
||||
-0.2052942640539 -0.0431692803469 -0.2366994435096 0.1849125314854 -0.0643179085590
|
||||
-0.0088101155797 -0.2350930514721 -0.2791829346342 0.0945329648928 0.0068964862844
|
||||
-0.0712883926756 -0.1754196742000 -0.4150465134868 -0.4320468295210 -0.2447975183043
|
||||
0.1960976634210 -0.4307520361914 -0.2063984002846 -0.2480057268925 -0.0820093912801
|
||||
0.0660477467766 0.1769199080810 0.0072956097283 -0.0799041994372 -0.2899420838166
|
||||
-0.4369141960078 0.7189088286830 0.3163475833145 -0.8137264081246 0.3439733571036
|
||||
-0.1878989767113 -0.1104570273397 1.1720380395723 0.1303453425092 0.0366319333275
|
||||
-0.5273326142452 -0.3340415625742 -0.1183805290179 0.0253960559615 0.1809779542769
|
||||
-0.9338279630235 -0.3338827912382 -0.0414641467582 0.1875909526505 0.2023114370903
|
||||
0.1821986225696 -0.4841920377164 -0.3672659774414 -0.2560262915836 -0.1794602414659
|
||||
-0.4710940323449 -0.7267786564363 -0.3848973015652 0.0131471778865 -0.1416931043725
|
||||
-0.0062759865543 -0.0176786818303 -0.2892970475287 -1.9877373273863 -0.0857983129657
|
||||
0.3632455559432 0.2256244524453 -0.3175640453009 0.1235831888525 1.3675895000900
|
||||
0.6094018739680 0.0106519517753 1.0631117686475 -1.0188789294824 0.5078419912585
|
||||
0.7342404388578 0.1929388215830 0.7192101094887 1.3393750566441 1.2057785028366
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -18,14 +17,39 @@
|
||||
|
||||
#include "mliap_descriptor.h"
|
||||
|
||||
#include "memory.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
MLIAPDescriptor::MLIAPDescriptor(LAMMPS *lmp) :
|
||||
Pointers(lmp), ndescriptors(0), nelements(0), elements(nullptr), cutsq(nullptr),
|
||||
radelem(nullptr), wjelem(nullptr)
|
||||
{
|
||||
cutmax = 0.0;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
MLIAPDescriptor::MLIAPDescriptor(LAMMPS *lmp) : Pointers(lmp) {}
|
||||
MLIAPDescriptor::~MLIAPDescriptor()
|
||||
{
|
||||
for (int i = 0; i < nelements; i++) delete[] elements[i];
|
||||
delete[] elements;
|
||||
memory->destroy(cutsq);
|
||||
memory->destroy(radelem);
|
||||
memory->destroy(wjelem);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
/* ----------------------------------------------------------------------
|
||||
memory usage
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
MLIAPDescriptor::~MLIAPDescriptor() {}
|
||||
double MLIAPDescriptor::memory_usage()
|
||||
{
|
||||
double bytes = (double)nelements*sizeof(double); // radelem
|
||||
bytes += (double)nelements*sizeof(double); // welem
|
||||
bytes += (double)nelements*nelements*sizeof(double); // cutsq
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
@ -21,19 +21,21 @@ namespace LAMMPS_NS {
|
||||
class MLIAPDescriptor : protected Pointers {
|
||||
public:
|
||||
MLIAPDescriptor(LAMMPS *);
|
||||
~MLIAPDescriptor();
|
||||
virtual ~MLIAPDescriptor();
|
||||
virtual void compute_descriptors(class MLIAPData *) = 0;
|
||||
virtual void compute_forces(class MLIAPData *) = 0;
|
||||
virtual void compute_force_gradients(class MLIAPData *) = 0;
|
||||
virtual void compute_descriptor_gradients(class MLIAPData *) = 0;
|
||||
virtual void init() = 0;
|
||||
virtual double memory_usage() = 0;
|
||||
virtual double memory_usage();
|
||||
|
||||
int ndescriptors; // number of descriptors
|
||||
int nelements; // # of unique elements
|
||||
char **elements; // names of unique elements
|
||||
double **cutsq; // nelem x nelem rcutsq values
|
||||
double cutmax; // maximum cutoff needed
|
||||
double *radelem; // element radii
|
||||
double *wjelem; // elements weights
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
@ -39,8 +39,6 @@ using namespace LAMMPS_NS;
|
||||
MLIAPDescriptorSNAP::MLIAPDescriptorSNAP(LAMMPS *lmp, char *paramfilename):
|
||||
MLIAPDescriptor(lmp)
|
||||
{
|
||||
nelements = 0;
|
||||
elements = nullptr;
|
||||
radelem = nullptr;
|
||||
wjelem = nullptr;
|
||||
snaptr = nullptr;
|
||||
@ -51,25 +49,15 @@ MLIAPDescriptorSNAP::MLIAPDescriptorSNAP(LAMMPS *lmp, char *paramfilename):
|
||||
chemflag, bnormflag, wselfallflag, nelements);
|
||||
|
||||
ndescriptors = snaptr->ncoeff;
|
||||
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
MLIAPDescriptorSNAP::~MLIAPDescriptorSNAP()
|
||||
{
|
||||
|
||||
if (nelements) {
|
||||
for (int i = 0; i < nelements; i++)
|
||||
delete[] elements[i];
|
||||
delete[] elements;
|
||||
memory->destroy(radelem);
|
||||
memory->destroy(wjelem);
|
||||
memory->destroy(cutsq);
|
||||
}
|
||||
|
||||
memory->destroy(radelem);
|
||||
memory->destroy(wjelem);
|
||||
delete snaptr;
|
||||
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -374,6 +362,12 @@ void MLIAPDescriptorSNAP::read_paramfile(char *paramfilename)
|
||||
bnormflag = 0;
|
||||
wselfallflag = 0;
|
||||
|
||||
for (int i = 0; i < nelements; i++) delete[] elements[i];
|
||||
delete[] elements;
|
||||
memory->destroy(radelem);
|
||||
memory->destroy(wjelem);
|
||||
memory->destroy(cutsq);
|
||||
|
||||
// open SNAP parameter file on proc 0
|
||||
|
||||
FILE *fpparam;
|
||||
@ -510,13 +504,8 @@ void MLIAPDescriptorSNAP::read_paramfile(char *paramfilename)
|
||||
|
||||
double MLIAPDescriptorSNAP::memory_usage()
|
||||
{
|
||||
double bytes = 0;
|
||||
|
||||
bytes += (double)nelements*sizeof(double); // radelem
|
||||
bytes += (double)nelements*sizeof(double); // welem
|
||||
bytes += (double)nelements*nelements*sizeof(int); // cutsq
|
||||
double bytes = MLIAPDescriptor::memory_usage();
|
||||
bytes += snaptr->memory_usage(); // SNA object
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ namespace LAMMPS_NS {
|
||||
class MLIAPDescriptorSNAP : public MLIAPDescriptor {
|
||||
public:
|
||||
MLIAPDescriptorSNAP(LAMMPS *, char *);
|
||||
~MLIAPDescriptorSNAP();
|
||||
virtual ~MLIAPDescriptorSNAP();
|
||||
virtual void compute_descriptors(class MLIAPData *);
|
||||
virtual void compute_forces(class MLIAPData *);
|
||||
virtual void compute_force_gradients(class MLIAPData *);
|
||||
@ -37,8 +37,6 @@ class MLIAPDescriptorSNAP : public MLIAPDescriptor {
|
||||
inline int equal(double *x, double *y);
|
||||
inline double dist2(double *x, double *y);
|
||||
|
||||
double *radelem; // element radii
|
||||
double *wjelem; // elements weights
|
||||
int twojmax, switchflag, bzeroflag;
|
||||
int chemflag, bnormflag, wselfallflag;
|
||||
double rfac0, rmin0;
|
||||
|
||||
281
src/MLIAP/mliap_descriptor_so3.cpp
Normal file
281
src/MLIAP/mliap_descriptor_so3.cpp
Normal file
@ -0,0 +1,281 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing authors: Byungkyun Kang (University of Nevada, Las Vegas)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "mliap_descriptor_so3.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "memory.h"
|
||||
#include "mliap_data.h"
|
||||
#include "mliap_so3.h"
|
||||
#include "pair_mliap.h"
|
||||
#include "tokenizer.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define MAXLINE 1024
|
||||
#define MAXWORD 3
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
MLIAPDescriptorSO3::MLIAPDescriptorSO3(LAMMPS *lmp, char *paramfilename) : MLIAPDescriptor(lmp)
|
||||
{
|
||||
radelem = nullptr;
|
||||
wjelem = nullptr;
|
||||
so3ptr = nullptr;
|
||||
read_paramfile(paramfilename);
|
||||
|
||||
so3ptr = new MLIAP_SO3(lmp, rcutfac, lmax, nmax, alpha);
|
||||
|
||||
ndescriptors = so3ptr->ncoeff;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
MLIAPDescriptorSO3::~MLIAPDescriptorSO3()
|
||||
{
|
||||
memory->destroy(radelem);
|
||||
memory->destroy(wjelem);
|
||||
delete so3ptr;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void MLIAPDescriptorSO3::read_paramfile(char *paramfilename)
|
||||
{
|
||||
int rcutfacflag = 0;
|
||||
int nelementsflag = 0;
|
||||
int elementsflag = 0;
|
||||
int radelemflag = 0;
|
||||
int wjelemflag = 0;
|
||||
int nmaxflag = 0;
|
||||
int lmaxflag = 0;
|
||||
int alphaflag = 0;
|
||||
|
||||
// set defaults for optional keywords
|
||||
|
||||
rfac0 = 0.99363;
|
||||
rmin0 = 0.0;
|
||||
|
||||
for (int i = 0; i < nelements; i++) delete[] elements[i];
|
||||
delete[] elements;
|
||||
memory->destroy(radelem);
|
||||
memory->destroy(wjelem);
|
||||
memory->destroy(cutsq);
|
||||
|
||||
// open SO3 parameter file on proc 0
|
||||
|
||||
FILE *fpparam;
|
||||
if (comm->me == 0) {
|
||||
fpparam = utils::open_potential(paramfilename, lmp, nullptr);
|
||||
if (fpparam == nullptr)
|
||||
error->one(FLERR, "Cannot open SO3 parameter file {}: {}", paramfilename,
|
||||
utils::getsyserror());
|
||||
}
|
||||
|
||||
char line[MAXLINE], *ptr;
|
||||
int eof = 0;
|
||||
int n, nwords;
|
||||
|
||||
while (1) {
|
||||
if (comm->me == 0) {
|
||||
ptr = utils::fgets_trunc(line, MAXLINE, fpparam);
|
||||
if (ptr == nullptr) {
|
||||
eof = 1;
|
||||
fclose(fpparam);
|
||||
} else
|
||||
n = strlen(line) + 1;
|
||||
}
|
||||
|
||||
MPI_Bcast(&eof, 1, MPI_INT, 0, world);
|
||||
if (eof) break;
|
||||
MPI_Bcast(&n, 1, MPI_INT, 0, world);
|
||||
MPI_Bcast(line, n, MPI_CHAR, 0, world);
|
||||
|
||||
// strip comment, skip line if blank
|
||||
|
||||
if ((ptr = strchr(line, '#'))) *ptr = '\0';
|
||||
nwords = utils::count_words(line);
|
||||
if (nwords == 0) continue;
|
||||
|
||||
// words = ptrs to all words in line
|
||||
// strip single and double quotes from words
|
||||
|
||||
Tokenizer p(line, "' \t\n\r\f");
|
||||
std::string skeywd = p.next();
|
||||
std::string skeyval = p.next();
|
||||
|
||||
if (comm->me == 0) { utils::logmesg(lmp, "SO3 keyword {} {} \n", skeywd, skeyval); }
|
||||
|
||||
// check for keywords with one value per element
|
||||
|
||||
if (strcmp(skeywd.c_str(), "elems") == 0 || strcmp(skeywd.c_str(), "radelems") == 0 ||
|
||||
strcmp(skeywd.c_str(), "welems") == 0) {
|
||||
|
||||
if (nelementsflag == 0 || nwords != nelements + 1)
|
||||
error->all(FLERR, "Incorrect SO3 parameter file");
|
||||
|
||||
if (strcmp(skeywd.c_str(), "elems") == 0) {
|
||||
for (int ielem = 0; ielem < nelements; ielem++) {
|
||||
elements[ielem] = utils::strdup(skeyval);
|
||||
if (ielem < nelements - 1) skeyval = p.next();
|
||||
}
|
||||
|
||||
elementsflag = 1;
|
||||
} else if (strcmp(skeywd.c_str(), "radelems") == 0) {
|
||||
for (int ielem = 0; ielem < nelements; ielem++) {
|
||||
radelem[ielem] = utils::numeric(FLERR, skeyval.c_str(), false, lmp);
|
||||
if (ielem < nelements - 1) skeyval = p.next();
|
||||
}
|
||||
radelemflag = 1;
|
||||
} else if (strcmp(skeywd.c_str(), "welems") == 0) {
|
||||
for (int ielem = 0; ielem < nelements; ielem++) {
|
||||
wjelem[ielem] = utils::numeric(FLERR, skeyval.c_str(), false, lmp);
|
||||
if (ielem < nelements - 1) skeyval = p.next();
|
||||
}
|
||||
wjelemflag = 1;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
// all other keywords take one value
|
||||
|
||||
if (nwords != 2) error->all(FLERR, "Incorrect SO3 parameter file");
|
||||
|
||||
if (strcmp(skeywd.c_str(), "nelems") == 0) {
|
||||
nelements = utils::inumeric(FLERR, skeyval.c_str(), false, lmp);
|
||||
elements = new char *[nelements];
|
||||
memory->create(radelem, nelements, "mliap_so3_descriptor:radelem");
|
||||
memory->create(wjelem, nelements, "mliap_so3_descriptor:wjelem");
|
||||
nelementsflag = 1;
|
||||
} else if (strcmp(skeywd.c_str(), "rcutfac") == 0) {
|
||||
rcutfac = utils::numeric(FLERR, skeyval.c_str(), false, lmp);
|
||||
rcutfacflag = 1;
|
||||
} else if (strcmp(skeywd.c_str(), "nmax") == 0) {
|
||||
nmax = utils::inumeric(FLERR, skeyval.c_str(), false, lmp);
|
||||
nmaxflag = 1;
|
||||
} else if (strcmp(skeywd.c_str(), "lmax") == 0) {
|
||||
lmax = utils::inumeric(FLERR, skeyval.c_str(), false, lmp);
|
||||
lmaxflag = 1;
|
||||
} else if (strcmp(skeywd.c_str(), "alpha") == 0) {
|
||||
alpha = utils::numeric(FLERR, skeyval.c_str(), false, lmp);
|
||||
alphaflag = 1;
|
||||
} else
|
||||
error->all(FLERR, "Incorrect SO3 parameter file");
|
||||
}
|
||||
}
|
||||
|
||||
if (!rcutfacflag || !nelementsflag || !elementsflag || !radelemflag || !wjelemflag || !nmaxflag ||
|
||||
!lmaxflag || !alphaflag)
|
||||
error->all(FLERR, "Incorrect SO3 parameter file");
|
||||
|
||||
// construct cutsq
|
||||
|
||||
double cut;
|
||||
cutmax = 0.0;
|
||||
memory->create(cutsq, nelements, nelements, "mliap/descriptor/so3:cutsq");
|
||||
for (int ielem = 0; ielem < nelements; ielem++) {
|
||||
|
||||
cut = 2.0 * radelem[ielem] * rcutfac;
|
||||
if (cut > cutmax) cutmax = cut;
|
||||
cutsq[ielem][ielem] = cut * cut;
|
||||
|
||||
for (int jelem = ielem + 1; jelem < nelements; jelem++) {
|
||||
cut = (radelem[ielem] + radelem[jelem]) * rcutfac;
|
||||
cutsq[ielem][jelem] = cutsq[jelem][ielem] = cut * cut;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void MLIAPDescriptorSO3::compute_descriptors(class MLIAPData *data)
|
||||
{
|
||||
so3ptr->spectrum(data->nlistatoms, data->numneighs, data->jelems, wjelem, data->rij, nmax, lmax,
|
||||
rcutfac, alpha, data->ndescriptors);
|
||||
|
||||
for (int ii = 0; ii < data->nlistatoms; ii++) {
|
||||
for (int icoeff = 0; icoeff < data->ndescriptors; icoeff++)
|
||||
data->descriptors[ii][icoeff] = so3ptr->m_plist_r[ii * (data->ndescriptors) + icoeff];
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void MLIAPDescriptorSO3::compute_forces(class MLIAPData *data)
|
||||
{
|
||||
int npairs = 0;
|
||||
for (int ii = 0; ii < data->nlistatoms; ii++) npairs += data->numneighs[ii];
|
||||
|
||||
so3ptr->spectrum_dxdr(data->nlistatoms, data->numneighs, data->jelems, wjelem, data->rij, nmax,
|
||||
lmax, rcutfac, alpha, npairs, data->ndescriptors);
|
||||
double fij[3];
|
||||
double **f = atom->f;
|
||||
int ij = 0;
|
||||
|
||||
for (int ii = 0; ii < data->nlistatoms; ii++) {
|
||||
const int i = data->iatoms[ii];
|
||||
|
||||
// insure rij, inside, wj, and rcutij are of size jnum
|
||||
|
||||
const int jnum = data->numneighs[ii];
|
||||
|
||||
for (int jj = 0; jj < jnum; jj++) {
|
||||
int j = data->jatoms[ij];
|
||||
|
||||
for (int ir = 0; ir < 3; ir++) {
|
||||
fij[ir] = 0.0;
|
||||
for (int icoeff = 0; icoeff < data->ndescriptors; icoeff++)
|
||||
fij[ir] += data->betas[ii][icoeff] *
|
||||
so3ptr->m_dplist_r[(ij * (data->ndescriptors) + icoeff) * 3 + ir];
|
||||
}
|
||||
|
||||
f[i][0] += fij[0];
|
||||
f[i][1] += fij[1];
|
||||
f[i][2] += fij[2];
|
||||
f[j][0] -= fij[0];
|
||||
f[j][1] -= fij[1];
|
||||
f[j][2] -= fij[2];
|
||||
|
||||
// add in global and per-atom virial contributions
|
||||
// this is optional and has no effect on force calculation
|
||||
|
||||
if (data->vflag) data->pairmliap->v_tally(i, j, fij, data->rij[ij]);
|
||||
ij++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void MLIAPDescriptorSO3::init()
|
||||
{
|
||||
so3ptr->init();
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double MLIAPDescriptorSO3::memory_usage()
|
||||
{
|
||||
double bytes = MLIAPDescriptor::memory_usage();
|
||||
bytes += so3ptr->memory_usage();
|
||||
|
||||
return bytes;
|
||||
}
|
||||
51
src/MLIAP/mliap_descriptor_so3.h
Normal file
51
src/MLIAP/mliap_descriptor_so3.h
Normal file
@ -0,0 +1,51 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/ Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifndef LMP_MLIAP_DESCRIPTOR_SO3_H
|
||||
#define LMP_MLIAP_DESCRIPTOR_SO3_H
|
||||
|
||||
#include "mliap_descriptor.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class MLIAPDescriptorSO3 : public MLIAPDescriptor {
|
||||
|
||||
public:
|
||||
MLIAPDescriptorSO3(LAMMPS *, char *);
|
||||
virtual ~MLIAPDescriptorSO3();
|
||||
|
||||
virtual void compute_descriptors(class MLIAPData *);
|
||||
virtual void compute_forces(class MLIAPData *);
|
||||
virtual void compute_force_gradients(class MLIAPData *){};
|
||||
virtual void compute_descriptor_gradients(class MLIAPData *){};
|
||||
virtual void init();
|
||||
virtual double memory_usage();
|
||||
|
||||
double rcutfac;
|
||||
|
||||
protected:
|
||||
class MLIAP_SO3 *so3ptr;
|
||||
void read_paramfile(char *);
|
||||
inline int equal(double *x, double *y);
|
||||
inline double dist2(double *x, double *y);
|
||||
|
||||
int nmax, lmax;
|
||||
double alpha;
|
||||
|
||||
int twojmax, switchflag, bzeroflag;
|
||||
int chemflag, bnormflag, wselfallflag;
|
||||
double rfac0, rmin0;
|
||||
};
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
#endif
|
||||
@ -32,7 +32,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
MLIAPModel::MLIAPModel(LAMMPS *lmp, char *) : Pointers(lmp)
|
||||
MLIAPModel::MLIAPModel(LAMMPS *lmp, char *) : Pointers(lmp), coeffelem(nullptr)
|
||||
{
|
||||
nparams = 0;
|
||||
nelements = 0;
|
||||
@ -44,6 +44,7 @@ MLIAPModel::MLIAPModel(LAMMPS *lmp, char *) : Pointers(lmp)
|
||||
|
||||
MLIAPModel::~MLIAPModel()
|
||||
{
|
||||
memory->destroy(coeffelem);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -77,19 +78,11 @@ void MLIAPModel::set_ndescriptors(int ndescriptors_in)
|
||||
|
||||
MLIAPModelSimple::MLIAPModelSimple(LAMMPS *lmp, char *coefffilename) : MLIAPModel(lmp, coefffilename)
|
||||
{
|
||||
coeffelem = nullptr;
|
||||
if (coefffilename) read_coeffs(coefffilename);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
MLIAPModelSimple::~MLIAPModelSimple()
|
||||
{
|
||||
memory->destroy(coeffelem);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void MLIAPModelSimple::read_coeffs(char *coefffilename)
|
||||
{
|
||||
|
||||
@ -143,6 +136,7 @@ void MLIAPModelSimple::read_coeffs(char *coefffilename)
|
||||
|
||||
// set up coeff lists
|
||||
|
||||
memory->destroy(coeffelem);
|
||||
memory->create(coeffelem,nelements,nparams,"mliap_snap_model:coeffelem");
|
||||
|
||||
// Loop over nelements blocks in the coefficient file
|
||||
|
||||
@ -21,7 +21,7 @@ namespace LAMMPS_NS {
|
||||
class MLIAPModel : protected Pointers {
|
||||
public:
|
||||
MLIAPModel(LAMMPS *, char *);
|
||||
~MLIAPModel();
|
||||
virtual ~MLIAPModel();
|
||||
void set_ndescriptors(int);
|
||||
void set_nelements(int);
|
||||
virtual int get_nparams() = 0;
|
||||
@ -35,6 +35,7 @@ class MLIAPModel : protected Pointers {
|
||||
int nonlinearflag; // 1 if gradient() requires descriptors
|
||||
int ndescriptors; // number of descriptors
|
||||
int nparams; // number of parameters per element
|
||||
double **coeffelem; // element coefficients
|
||||
|
||||
protected:
|
||||
virtual void read_coeffs(char *) = 0;
|
||||
@ -43,11 +44,10 @@ class MLIAPModel : protected Pointers {
|
||||
class MLIAPModelSimple : public MLIAPModel {
|
||||
public:
|
||||
MLIAPModelSimple(LAMMPS *, char *);
|
||||
~MLIAPModelSimple();
|
||||
~MLIAPModelSimple(){};
|
||||
virtual double memory_usage();
|
||||
|
||||
protected:
|
||||
double **coeffelem; // element coefficients
|
||||
virtual void read_coeffs(char *);
|
||||
};
|
||||
|
||||
|
||||
@ -36,18 +36,17 @@ using namespace LAMMPS_NS;
|
||||
MLIAPModelNN::MLIAPModelNN(LAMMPS* lmp, char* coefffilename) :
|
||||
MLIAPModel(lmp, coefffilename)
|
||||
{
|
||||
coeffelem = nullptr;
|
||||
nnodes = nullptr;
|
||||
activation = nullptr;
|
||||
scale = nullptr;
|
||||
if (coefffilename) read_coeffs(coefffilename);
|
||||
nonlinearflag = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
MLIAPModelNN::~MLIAPModelNN()
|
||||
{
|
||||
memory->destroy(coeffelem);
|
||||
memory->destroy(nnodes);
|
||||
memory->destroy(activation);
|
||||
memory->destroy(scale);
|
||||
@ -118,6 +117,7 @@ void MLIAPModelNN::read_coeffs(char *coefffilename)
|
||||
|
||||
// set up coeff lists
|
||||
|
||||
memory->destroy(coeffelem);
|
||||
memory->create(coeffelem,nelements,nparams,"mliap_snap_model:coeffelem");
|
||||
|
||||
int stats = 0;
|
||||
@ -352,9 +352,9 @@ void MLIAPModelNN::compute_gradients(MLIAPData* data)
|
||||
// Deleting the variables
|
||||
|
||||
for (int n=0; n<nl; n++) {
|
||||
delete nodes[n];
|
||||
delete dnodes[n];
|
||||
delete bnodes[n];
|
||||
delete[] nodes[n];
|
||||
delete[] dnodes[n];
|
||||
delete[] bnodes[n];
|
||||
}
|
||||
|
||||
delete[] nodes;
|
||||
|
||||
@ -35,7 +35,6 @@ class MLIAPModelNN : public MLIAPModel {
|
||||
int *activation; // activation functions
|
||||
int *nnodes; // number of nodes per layer
|
||||
double ***scale; // element scale values
|
||||
double **coeffelem; // element coefficients
|
||||
virtual void read_coeffs(char *);
|
||||
|
||||
inline double sigm(double x, double &deriv)
|
||||
|
||||
1243
src/MLIAP/mliap_so3.cpp
Normal file
1243
src/MLIAP/mliap_so3.cpp
Normal file
File diff suppressed because it is too large
Load Diff
89
src/MLIAP/mliap_so3.h
Normal file
89
src/MLIAP/mliap_so3.h
Normal file
@ -0,0 +1,89 @@
|
||||
#ifndef LMP_MLIAP_SO3_H
|
||||
#define LMP_MLIAP_SO3_H
|
||||
|
||||
#include "pointers.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class MLIAP_SO3 : protected Pointers {
|
||||
|
||||
public:
|
||||
MLIAP_SO3(LAMMPS *, double vrcut, int vlmax, int vnmax, double valpha);
|
||||
MLIAP_SO3(LAMMPS *lmp) : Pointers(lmp){};
|
||||
|
||||
~MLIAP_SO3();
|
||||
|
||||
void init();
|
||||
|
||||
double memory_usage();
|
||||
|
||||
int ncoeff;
|
||||
double *m_plist_r;
|
||||
double *m_dplist_r;
|
||||
|
||||
private:
|
||||
double alloc_init, alloc_arrays;
|
||||
int *m_ellpl1, *m_ellm1;
|
||||
double *m_pfac;
|
||||
int m_pfac_l1, m_pfac_l2;
|
||||
double *m_dfac0, *m_dfac1, *m_dfac2, *m_dfac3, *m_dfac4, *m_dfac5;
|
||||
int m_dfac_l1, m_dfac_l2;
|
||||
double m_rcut, m_alpha;
|
||||
int m_lmax, m_nmax, m_Nmax, m_ldim;
|
||||
double *m_g_array, *m_w, *m_rootpq;
|
||||
int *m_idxu_block, *m_idxylm;
|
||||
int m_idxu_count, m_idxy_count;
|
||||
int m_numYlms;
|
||||
|
||||
double *m_clisttot_r, *m_clisttot_i;
|
||||
|
||||
double *m_rip_array, *m_rip_darray;
|
||||
double *m_sbes_array, *m_sbes_darray;
|
||||
int m_init_arrays;
|
||||
|
||||
double *m_plist_i;
|
||||
double *m_clist_r, *m_clist_i;
|
||||
double *m_ulist_r, *m_ulist_i;
|
||||
|
||||
double *m_Ylms_r, *m_Ylms_i, *m_dYlm_r, *m_dYlm_i;
|
||||
double *m_dplist_i, *m_dclist_r, *m_dclist_i, *m_tempdp_r;
|
||||
|
||||
public:
|
||||
void spectrum(int nlocal, int *numneighs, int *jelems, double *wjelem, double **rij, int nmax,
|
||||
int lmax, double rcut, double alpha, int ncoefs);
|
||||
void spectrum_dxdr(int nlocal, int *numneighs, int *jelems, double *wjelem, double **rij,
|
||||
int nmax, int lmax, double rcut, double alpha, int npairs, int ncoefs);
|
||||
|
||||
private:
|
||||
double Cosine(double Rij, double Rc);
|
||||
double CosinePrime(double Rij, double Rc);
|
||||
double compute_sfac(double r, double rcut);
|
||||
double compute_dsfac(double r, double rcut);
|
||||
void get_sbes_array(int nlocal, int *numneighs, double **rij, int lmax, double rcut,
|
||||
double alpha);
|
||||
void get_rip_array(int nlocal, int *numneighs, double **rij, int nmax, int lmax, double alpha);
|
||||
void init_arrays(int nlocal, int ncoefs);
|
||||
void init_garray(int nmax, int lmax, double rcut, double alpha, double *w, int lw1,
|
||||
double *g_array, int lg2);
|
||||
|
||||
void compute_uarray_recursive(double x, double y, double z, double r, int twol, double *ulist_r,
|
||||
double *ulist_i, int *idxu_block, double *rootpqarray);
|
||||
void compute_ncoeff();
|
||||
|
||||
int get_sum(int istart, int iend, int id, int imult);
|
||||
|
||||
void compute_dpidrj(int nmax, int lmax, double *clisttot_r, double *clisttot_i, int lctot2,
|
||||
double *dclist_r, double *dclist_i, int ldcli2, int ldcli3, double *dplist_r,
|
||||
int dpli2);
|
||||
|
||||
double compute_g(double r, int n, int nmax, double rcut, double *w, int lw1);
|
||||
double phi(double r, int alpha, double rcut);
|
||||
void compute_pi(int nmax, int lmax, double *clisttot_r, double *clisttot_i, int lcl2,
|
||||
double *plist_r, double *plist_i, int lpl2, int indpl);
|
||||
|
||||
void compute_W(int nmax, double *arr);
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
#endif
|
||||
167
src/MLIAP/mliap_so3_math.h
Normal file
167
src/MLIAP/mliap_so3_math.h
Normal file
@ -0,0 +1,167 @@
|
||||
/*
|
||||
* MLIAP_SO3_math.h
|
||||
*
|
||||
* Created on: Apr 12, 2021
|
||||
* Author: macstein
|
||||
*/
|
||||
|
||||
#ifndef LMP_MLIAP_SO3_MATH_H
|
||||
#define LMP_MLIAP_SO3_MATH_H
|
||||
|
||||
#include "math_eigen_impl.h"
|
||||
|
||||
namespace SO3Math {
|
||||
|
||||
int jacobin(int n, double const *const *mat, double *eval, double **evec);
|
||||
int invert_matrix(int n, double *A, double *Ainv);
|
||||
int LUPdecompose(int n, double dtol, double *A, int *P);
|
||||
void LUPSolve(int n, double *A, double *B, int *P);
|
||||
|
||||
} // namespace SO3Math
|
||||
|
||||
using namespace MathEigen;
|
||||
|
||||
typedef Jacobi<double, double *, double **, double const *const *> Jacobi_v2;
|
||||
int SO3Math::jacobin(int n, double const *const *mat, double *eval, double **evec)
|
||||
{
|
||||
int i, j;
|
||||
double **mat_cpy;
|
||||
|
||||
mat_cpy = new double *[n];
|
||||
for (int iy = 0; iy < n; iy++) mat_cpy[iy] = new double[n];
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
for (j = 0; j < n; j++) mat_cpy[i][j] = mat[i][j];
|
||||
|
||||
double *M[n];
|
||||
for (i = 0; i < n; i++) M[i] = &(mat_cpy[i][0]);
|
||||
|
||||
int midx[n];
|
||||
|
||||
Jacobi_v2 ecalcn(n, M, midx);
|
||||
int ierror = ecalcn.Diagonalize(mat, eval, evec, Jacobi_v2::SORT_DECREASING_EVALS);
|
||||
|
||||
for (int i = 0; i < n; i++)
|
||||
for (int j = i + 1; j < n; j++) std::swap(evec[i][j], evec[j][i]);
|
||||
|
||||
for (int iy = 0; iy < n; iy++) delete[] mat_cpy[iy];
|
||||
delete[] mat_cpy;
|
||||
|
||||
return ierror;
|
||||
}
|
||||
|
||||
int SO3Math::invert_matrix(int n, double *A, double *Ainv)
|
||||
{
|
||||
|
||||
int i, j;
|
||||
double dtol = 1.e-30;
|
||||
|
||||
int *P;
|
||||
double *b, *Atemp;
|
||||
|
||||
P = new int[n];
|
||||
b = new double[n];
|
||||
Atemp = new double[n * n];
|
||||
|
||||
for (i = 0; i < n * n; i++) Atemp[i] = A[i];
|
||||
|
||||
if (LUPdecompose(n, dtol, Atemp, P) != 0) return 1;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
for (j = 0; j < n; j++) b[j] = 0.0;
|
||||
|
||||
b[i] = 1.0;
|
||||
LUPSolve(n, Atemp, b, P);
|
||||
|
||||
for (j = 0; j < n; j++) Ainv[j * n + i] = b[j];
|
||||
}
|
||||
|
||||
delete[] P;
|
||||
delete[] b;
|
||||
delete[] Atemp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SO3Math::LUPdecompose(int n, double dtol, double *A, int *P)
|
||||
{
|
||||
int i, j, k, maxi;
|
||||
double maxA, Atemp;
|
||||
double *normi;
|
||||
|
||||
maxi = 0;
|
||||
normi = new double[n];
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
maxA = 0.0;
|
||||
for (j = 0; j < n; j++) {
|
||||
Atemp = fabs(A[i * n + j]);
|
||||
if (Atemp > maxA) maxA = Atemp;
|
||||
}
|
||||
if (maxA < dtol) return 1;
|
||||
|
||||
normi[i] = 1.0 / maxA;
|
||||
}
|
||||
|
||||
for (j = 0; j < n; j++) {
|
||||
for (i = 0; i < j; i++)
|
||||
for (k = 0; k < i; k++) A[i * n + j] -= A[i * n + k] * A[k * n + j];
|
||||
|
||||
maxA = 0.0;
|
||||
for (i = j; i < n; i++) {
|
||||
for (k = 0; k < j; k++) A[i * n + j] -= A[i * n + k] * A[k * n + j];
|
||||
|
||||
Atemp = fabs(A[i * n + j]) * normi[i];
|
||||
if (Atemp >= maxA) {
|
||||
maxA = Atemp;
|
||||
maxi = i;
|
||||
}
|
||||
}
|
||||
if (maxi != j) {
|
||||
if ((j == (n - 2)) && (A[j * n + j + 1] == 0.0))
|
||||
maxi = j;
|
||||
else {
|
||||
for (k = 0; k < n; k++) {
|
||||
Atemp = A[j * n + k];
|
||||
A[j * n + k] = A[maxi * n + k];
|
||||
A[maxi * n + k] = Atemp;
|
||||
}
|
||||
normi[maxi] = normi[j];
|
||||
}
|
||||
}
|
||||
|
||||
P[j] = maxi;
|
||||
if (A[j * n + j] == 0.0) A[j * n + j] = dtol;
|
||||
|
||||
if (j != (n - 1)) {
|
||||
Atemp = 1.0 / A[j * n + j];
|
||||
for (i = (j + 1); i < n; i++) A[i * n + j] *= Atemp;
|
||||
}
|
||||
}
|
||||
|
||||
delete[] normi;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SO3Math::LUPSolve(int n, double *A, double *B, int *P)
|
||||
{
|
||||
int i, j;
|
||||
double dtemp;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
|
||||
dtemp = B[P[i]];
|
||||
B[P[i]] = B[i];
|
||||
for (j = (i - 1); j >= 0; j--) dtemp -= A[i * n + j] * B[j];
|
||||
|
||||
B[i] = dtemp;
|
||||
}
|
||||
|
||||
for (i = (n - 1); i >= 0; i--) {
|
||||
for (j = (i + 1); j < n; j++) B[i] -= A[i * n + j] * B[j];
|
||||
|
||||
B[i] /= A[i * n + i];
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LMP_MLIAP_SO3_MATH_H_ */
|
||||
@ -19,10 +19,11 @@
|
||||
#include "pair_mliap.h"
|
||||
|
||||
#include "mliap_data.h"
|
||||
#include "mliap_model_linear.h"
|
||||
#include "mliap_model_quadratic.h"
|
||||
#include "mliap_model_nn.h"
|
||||
#include "mliap_descriptor_snap.h"
|
||||
#include "mliap_descriptor_so3.h"
|
||||
#include "mliap_model_linear.h"
|
||||
#include "mliap_model_nn.h"
|
||||
#include "mliap_model_quadratic.h"
|
||||
#ifdef MLIAP_PYTHON
|
||||
#include "mliap_model_python.h"
|
||||
#endif
|
||||
@ -41,7 +42,8 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairMLIAP::PairMLIAP(LAMMPS *lmp) : Pair(lmp)
|
||||
PairMLIAP::PairMLIAP(LAMMPS *lmp) :
|
||||
Pair(lmp), map(nullptr), model(nullptr), descriptor(nullptr), data(nullptr)
|
||||
{
|
||||
single_enable = 0;
|
||||
restartinfo = 0;
|
||||
@ -65,7 +67,6 @@ PairMLIAP::~PairMLIAP()
|
||||
memory->destroy(cutsq);
|
||||
memory->destroy(map);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -77,27 +78,22 @@ void PairMLIAP::compute(int eflag, int vflag)
|
||||
|
||||
// consistency checks
|
||||
|
||||
if (data->ndescriptors != model->ndescriptors) {
|
||||
error->all(FLERR,"Incompatible model and descriptor descriptor count");
|
||||
};
|
||||
if (data->ndescriptors != model->ndescriptors)
|
||||
error->all(FLERR, "Incompatible model and descriptor descriptor count");
|
||||
|
||||
if (data->nelements != model->nelements) {
|
||||
error->all(FLERR,"Incompatible model and descriptor element count");
|
||||
};
|
||||
|
||||
ev_init(eflag,vflag);
|
||||
if (data->nelements != model->nelements)
|
||||
error->all(FLERR, "Incompatible model and descriptor element count");
|
||||
|
||||
ev_init(eflag, vflag);
|
||||
data->generate_neighdata(list, eflag, vflag);
|
||||
|
||||
// compute descriptors, if needed
|
||||
|
||||
if (model->nonlinearflag || eflag)
|
||||
descriptor->compute_descriptors(data);
|
||||
if (model->nonlinearflag || eflag) descriptor->compute_descriptors(data);
|
||||
|
||||
// compute E_i and beta_i = dE_i/dB_i for all i in list
|
||||
|
||||
model->compute_gradients(data);
|
||||
|
||||
e_tally(data);
|
||||
|
||||
// calculate force contributions beta_i*dB_i/dR_j
|
||||
@ -129,7 +125,6 @@ void PairMLIAP::allocate()
|
||||
|
||||
void PairMLIAP::settings(int narg, char ** arg)
|
||||
{
|
||||
|
||||
if (narg < 4)
|
||||
error->all(FLERR,"Illegal pair_style command");
|
||||
|
||||
@ -137,6 +132,8 @@ void PairMLIAP::settings(int narg, char ** arg)
|
||||
|
||||
int modelflag = 0;
|
||||
int descriptorflag = 0;
|
||||
delete model;
|
||||
delete descriptor;
|
||||
|
||||
// process keywords
|
||||
|
||||
@ -159,9 +156,9 @@ void PairMLIAP::settings(int narg, char ** arg)
|
||||
iarg += 3;
|
||||
#ifdef MLIAP_PYTHON
|
||||
} else if (strcmp(arg[iarg+1],"mliappy") == 0) {
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal pair_style mliap command");
|
||||
model = new MLIAPModelPython(lmp,arg[iarg+2]);
|
||||
iarg += 3;
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal pair_style mliap command");
|
||||
model = new MLIAPModelPython(lmp,arg[iarg+2]);
|
||||
iarg += 3;
|
||||
#endif
|
||||
} else error->all(FLERR,"Illegal pair_style mliap command");
|
||||
modelflag = 1;
|
||||
@ -171,6 +168,11 @@ void PairMLIAP::settings(int narg, char ** arg)
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal pair_style mliap command");
|
||||
descriptor = new MLIAPDescriptorSNAP(lmp,arg[iarg+2]);
|
||||
iarg += 3;
|
||||
} else if (strcmp(arg[iarg+1],"so3") == 0) {
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal pair_style mliap command");
|
||||
descriptor = new MLIAPDescriptorSO3(lmp,arg[iarg+2]);
|
||||
iarg += 3;
|
||||
|
||||
} else error->all(FLERR,"Illegal pair_style mliap command");
|
||||
descriptorflag = 1;
|
||||
} else
|
||||
@ -241,10 +243,9 @@ void PairMLIAP::coeff(int narg, char **arg)
|
||||
model->init();
|
||||
descriptor->init();
|
||||
int gradgradflag = -1;
|
||||
delete data;
|
||||
data = new MLIAPData(lmp, gradgradflag, map, model, descriptor, this);
|
||||
data->init();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -255,10 +256,8 @@ void PairMLIAP::e_tally(MLIAPData* data)
|
||||
{
|
||||
if (eflag_global) eng_vdwl += data->energy;
|
||||
if (eflag_atom)
|
||||
for (int ii = 0; ii < data->nlistatoms; ii++) {
|
||||
const int i = data->iatoms[ii];
|
||||
eatom[i] += data->eatoms[ii];
|
||||
}
|
||||
for (int ii = 0; ii < data->nlistatoms; ii++)
|
||||
eatom[data->iatoms[ii]] += data->eatoms[ii];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
156
unittest/force-styles/tests/manybody-pair-mliap_so3.yaml
Normal file
156
unittest/force-styles/tests/manybody-pair-mliap_so3.yaml
Normal file
@ -0,0 +1,156 @@
|
||||
---
|
||||
lammps_version: 27 May 2021
|
||||
date_generated: Sun Jun 13 17:44:07 2021
|
||||
epsilon: 5e-13
|
||||
skip_tests:
|
||||
prerequisites: ! |
|
||||
pair mliap
|
||||
pre_commands: ! |
|
||||
variable newton_pair delete
|
||||
variable newton_pair index on
|
||||
post_commands: ! ""
|
||||
input_file: in.manybody
|
||||
pair_style: mliap model nn Si.nn.mliap.model descriptor so3 Si.nn.mliap.descriptor
|
||||
pair_coeff: ! |
|
||||
* * Si Si Si Si Si Si Si Si
|
||||
extract: ! ""
|
||||
natoms: 64
|
||||
init_vdwl: -242.08541438097282
|
||||
init_coul: 0
|
||||
init_stress: ! |2-
|
||||
3.5856243389095512e+00 4.3178319509851431e+00 5.1450742391421338e+00 -2.3382445177587403e+00 6.3444541794487845e+00 9.1752299438021412e-01
|
||||
init_forces: ! |2
|
||||
1 -3.1962501950595823e-01 5.6761412892541685e-01 3.5767479262345103e-01
|
||||
2 -3.4055902237163499e-01 -3.3463048947437657e-01 -2.0463281550586621e-01
|
||||
3 1.0965493482185078e-01 1.1852119996899939e-02 -6.8690216469585785e-02
|
||||
4 -4.2917681710400246e-01 5.8785334295730940e-01 2.6944024734509658e-01
|
||||
5 -2.8480011500666280e-01 -2.4246371636263281e-02 2.6371880866650411e-02
|
||||
6 1.4478663596031660e-01 5.0373076788511817e-01 2.4754536884184455e-01
|
||||
7 -1.6648111143006419e-01 -2.1580818190690107e-01 4.5962059999665661e-01
|
||||
8 5.1793872208577641e-03 9.8258205721181310e-02 -2.1237239804032296e-01
|
||||
9 -2.2695156450444193e-01 -3.0886720222241792e-01 -3.3982471524904129e-01
|
||||
10 -5.4899280049504409e-02 -2.6361580602848766e-01 -4.6186547428794356e-01
|
||||
11 7.0822516902798582e-01 -6.5855726964151540e-01 6.8445843697172026e-01
|
||||
12 -9.3227603274412574e-01 -9.3228190927668686e-01 -7.6938876929731748e-01
|
||||
13 -3.0470726616180671e-01 8.0435103580644729e-01 -2.4756252000756823e-01
|
||||
14 -2.3479043824466983e-01 7.3220393122987470e-01 -1.4939914893452921e-01
|
||||
15 -7.1082131811158800e-01 8.5118662256190825e-01 -9.4363341636616416e-01
|
||||
16 3.0519311772485996e-01 2.8483674897946326e-01 1.2395992551492252e+00
|
||||
17 6.5956915047965214e-01 4.8254693346624744e-01 -5.2567354105831976e-01
|
||||
18 -7.9689468944905612e-02 6.8196067151325090e-02 5.9874054660106668e-01
|
||||
19 -2.3763697545215456e-01 -4.2724396450632990e-01 -1.8684043081463819e-01
|
||||
20 -9.7721019192374103e-01 1.9998108603209278e-01 8.6010353204828152e-02
|
||||
21 2.2013361219973313e-01 -1.2294990669541571e-01 -2.6697320196243068e-01
|
||||
22 -1.2285340017853370e+00 1.1690349275168264e+00 -1.4237226265347376e+00
|
||||
23 3.8898630617701757e-01 4.6455023282884689e-01 3.3423521635638376e-01
|
||||
24 3.8226040090622126e-01 2.9557989393434092e-01 5.5205109933714203e-01
|
||||
25 9.3521601977790650e-02 -1.6073416835582686e-02 1.3983336197196455e-01
|
||||
26 7.0434112329697054e-02 -2.1616954791777516e-02 1.1838121146432676e-01
|
||||
27 4.3053526631612626e-01 -1.8120315965038483e-01 3.2118273346822135e-01
|
||||
28 -8.5222587593901430e-02 2.5053534569095887e-01 8.4998194456908627e-01
|
||||
29 -5.2824806036659966e-01 3.7688334350435798e-01 -2.9342945950696531e-01
|
||||
30 -2.0630152439038446e-01 1.1742029257880499e-01 -1.5472597043542272e-01
|
||||
31 -1.5461602575510483e-01 1.7652146539226263e-01 -3.9084496119253777e-02
|
||||
32 -4.5837827660003577e-01 2.0385249301614106e-01 -1.2398969536978524e-01
|
||||
33 7.9471459720084048e-01 -6.9190694940632047e-01 8.3162926736539400e-01
|
||||
34 1.4890352006720189e-01 1.2051093068835445e-02 -1.4903892467477795e-02
|
||||
35 2.2834220821773751e-01 -1.2404653069908662e-01 4.7043869369199348e-01
|
||||
36 -6.0161946119659152e-02 -3.5011696674253306e-01 6.9827025926206300e-03
|
||||
37 -3.5755783353896464e-01 3.4293192644746495e-01 -3.3035510255109329e-01
|
||||
38 -1.5264515528290096e-01 -1.8578933375676593e-02 7.6231207427680664e-02
|
||||
39 5.0950710874938010e-01 -4.8343099863687994e-01 -5.9731921195378934e-01
|
||||
40 8.2087228191924311e-01 -5.8338727466140039e-01 -5.3577051746179449e-01
|
||||
41 -2.5932061784047694e-02 -1.2942331539744090e-01 -1.1369207362951550e-01
|
||||
42 -5.0930140389860812e-01 -2.4266141136226554e-01 -2.0947953649294865e-01
|
||||
43 8.5673434249355668e-02 -8.4351858143712588e-01 1.2348559495353699e-01
|
||||
44 5.2887927118716704e-01 -5.4060461346991406e-01 6.0878058062650675e-01
|
||||
45 -4.5189088028948604e-01 3.5848279996786603e-01 -6.0248253431181398e-01
|
||||
46 -3.3641633018653277e-01 -2.9706533294242637e-01 9.5865696396805256e-01
|
||||
47 4.4265361896830380e-01 3.4098141839855145e-01 2.7768582076458542e-01
|
||||
48 1.5550373308714810e-01 -8.0490292537712296e-02 -1.2140381247151916e-02
|
||||
49 -6.4126972948425498e-01 -8.1277048989772516e-01 -6.6088623870263008e-01
|
||||
50 6.9590856991288405e-02 3.2650008138931746e-01 -1.2981864462879661e-01
|
||||
51 -5.9079732678911834e-01 5.4485696856005095e-01 6.8471642407028899e-01
|
||||
52 1.2500943393870998e+00 -1.2483610604845263e+00 1.3764499435893642e+00
|
||||
53 7.5044082180665861e-01 7.1006339405720620e-01 6.8752933088770685e-01
|
||||
54 5.7790768581732632e-01 -6.0482253610873882e-01 -5.7995317962912973e-01
|
||||
55 4.4776151869164765e-01 -5.9219393004341692e-01 -6.9398818388834249e-01
|
||||
56 -7.4276087479339600e-02 3.8502591921562142e-02 -3.1482369726424059e-01
|
||||
57 -4.9028410280524036e-02 -5.8115359646338252e-02 -2.6774949685019013e-02
|
||||
58 3.7437462851140180e-01 -2.3858950328415252e-01 2.7176318794239890e-01
|
||||
59 7.5049664891509604e-01 6.0003203348980849e-01 -6.0606097897888678e-01
|
||||
60 -7.8027828178258207e-01 -1.0282777251742856e+00 -7.6957323203237027e-01
|
||||
61 -2.0704735890388715e-01 2.1426153130500308e-01 -1.7757121507272916e-01
|
||||
62 -4.9195674075326684e-01 5.5632927867395221e-01 -4.8501482619942371e-01
|
||||
63 4.0392077364288381e-01 -6.5683525718558333e-01 -3.5450072515244213e-01
|
||||
64 8.3136790206790612e-01 8.4030959270424599e-01 9.6744125066169429e-01
|
||||
run_vdwl: -242.07509367477505
|
||||
run_coul: 0
|
||||
run_stress: ! |2-
|
||||
3.6067334447532695e+00 4.3471333638967478e+00 5.1979080340147519e+00 -2.2917015647694656e+00 6.3545457412614894e+00 1.0105656026958723e+00
|
||||
run_forces: ! |2
|
||||
1 -3.2099025878012155e-01 5.6621647667818076e-01 3.5950167010603051e-01
|
||||
2 -3.4509776918969848e-01 -3.3867254821455528e-01 -2.0920538372184505e-01
|
||||
3 1.0531155735451671e-01 1.2386817647918189e-02 -6.5592214009213612e-02
|
||||
4 -4.2518309605527171e-01 5.8922044317041156e-01 2.6563467306378569e-01
|
||||
5 -2.8801072479776163e-01 -2.5766299821446889e-02 2.9057158897915637e-02
|
||||
6 1.5542359530932462e-01 5.0618090170742924e-01 2.5705162916056401e-01
|
||||
7 -1.6155636197369327e-01 -2.0933544079115984e-01 4.5528515616655318e-01
|
||||
8 2.4173198798722703e-03 9.8119054544594395e-02 -2.1160344210292820e-01
|
||||
9 -2.3309913937974988e-01 -3.1480594421707164e-01 -3.4564398106874977e-01
|
||||
10 -5.4522048631510535e-02 -2.6706654804162977e-01 -4.5324758936337878e-01
|
||||
11 7.0091421529942932e-01 -6.5161362710989634e-01 6.7911091706071092e-01
|
||||
12 -9.3013382458275318e-01 -9.2865203992752920e-01 -7.6857777606975730e-01
|
||||
13 -2.9150015714972832e-01 8.0193668506020310e-01 -2.3445660406176830e-01
|
||||
14 -2.3931752715567098e-01 7.3165656442486871e-01 -1.5460079660908072e-01
|
||||
15 -7.0949250316968981e-01 8.4895481344920531e-01 -9.4171558147000023e-01
|
||||
16 3.0631254529841845e-01 2.8452527197212563e-01 1.2374792465145266e+00
|
||||
17 6.5855968811869425e-01 4.8254937919423335e-01 -5.2248413587752107e-01
|
||||
18 -8.7481644703575029e-02 7.6634049591861181e-02 6.0224665003051581e-01
|
||||
19 -2.4288814928950306e-01 -4.3211093792565469e-01 -1.9384450640073986e-01
|
||||
20 -9.7426378856830720e-01 1.9288999988815433e-01 8.0604056667934840e-02
|
||||
21 2.2424888386015288e-01 -1.3293815632038816e-01 -2.7377822690501097e-01
|
||||
22 -1.2323644574571764e+00 1.1752131626398818e+00 -1.4294587388733917e+00
|
||||
23 3.9308015126728924e-01 4.6878338812272585e-01 3.4083333751850131e-01
|
||||
24 3.8760532137362280e-01 2.9510552152958136e-01 5.5074781186708821e-01
|
||||
25 9.3396150962252164e-02 -1.5317581194901989e-02 1.3747727146599498e-01
|
||||
26 6.9265560054146760e-02 -2.0314915486256999e-02 1.1931386929585183e-01
|
||||
27 4.3415121072825247e-01 -1.8687603495448388e-01 3.2487067605082509e-01
|
||||
28 -9.1871593618403344e-02 2.5620554100946658e-01 8.5286477941973227e-01
|
||||
29 -5.3071912525035825e-01 3.8001024033499603e-01 -2.9595616725714385e-01
|
||||
30 -2.0363608471489461e-01 1.1467846274268546e-01 -1.5423466174347741e-01
|
||||
31 -1.5347742017717006e-01 1.7737371992520326e-01 -3.9100161388642633e-02
|
||||
32 -4.5523972305123062e-01 2.0385758964290804e-01 -1.2369373913464421e-01
|
||||
33 7.9087458324830917e-01 -6.9245678150703793e-01 8.3099119891416617e-01
|
||||
34 1.4802038008409366e-01 1.1906014937963626e-02 -1.4079337228309469e-02
|
||||
35 2.2885578071414028e-01 -1.2375478283251561e-01 4.7035167000612227e-01
|
||||
36 -6.6712338981015251e-02 -3.4784959749591643e-01 -8.2434566151845740e-04
|
||||
37 -3.5559876201572144e-01 3.4127522791063586e-01 -3.3119493923999893e-01
|
||||
38 -1.5190134438030195e-01 -1.7408563012483787e-02 7.7163920440187175e-02
|
||||
39 5.0793157466484662e-01 -4.8015243788901102e-01 -5.9618064615637467e-01
|
||||
40 8.3101665635822208e-01 -5.9096688016268673e-01 -5.4151897902038382e-01
|
||||
41 -2.2638462355541608e-02 -1.2687248931889569e-01 -1.1170657237550335e-01
|
||||
42 -5.1187405127087360e-01 -2.4900529137919386e-01 -2.1379948491741790e-01
|
||||
43 8.1549992649728023e-02 -8.4270445844787201e-01 1.1940335582923872e-01
|
||||
44 5.2979201238463836e-01 -5.4163495044340293e-01 6.0904604522603012e-01
|
||||
45 -4.5349498979959058e-01 3.5543802758009235e-01 -6.0071827959729118e-01
|
||||
46 -3.3812369451494262e-01 -2.9608077672407218e-01 9.6601486219971566e-01
|
||||
47 4.4432776315481021e-01 3.4106617818250651e-01 2.8018780396259058e-01
|
||||
48 1.5373759328615888e-01 -7.7559745424578372e-02 -1.1738256128522504e-02
|
||||
49 -6.5552433924923514e-01 -8.2962215224843339e-01 -6.8041757200528219e-01
|
||||
50 7.2009338943382531e-02 3.2345724726665581e-01 -1.3328856788416371e-01
|
||||
51 -6.0193053801934937e-01 5.5621389434911084e-01 6.9122096987900861e-01
|
||||
52 1.2542223217674440e+00 -1.2515674646711927e+00 1.3812983341667304e+00
|
||||
53 7.6517171556659869e-01 7.2661791257033292e-01 7.1045870262624977e-01
|
||||
54 5.7763188954157396e-01 -6.0585750515061210e-01 -5.7983327790970884e-01
|
||||
55 4.4244372609738386e-01 -5.8905832551910409e-01 -6.8763885072819386e-01
|
||||
56 -7.2489818842452189e-02 3.3901184340476273e-02 -3.1255337552350843e-01
|
||||
57 -5.0302123192962747e-02 -6.1405545784893767e-02 -2.7597409034218284e-02
|
||||
58 3.7360346515990828e-01 -2.3419685074330851e-01 2.6752706940536103e-01
|
||||
59 7.5732954986333467e-01 6.0665518776115368e-01 -6.0815520107330145e-01
|
||||
60 -7.9635276290536017e-01 -1.0415254996798184e+00 -7.8732107265558360e-01
|
||||
61 -2.0591458098965063e-01 2.1482058504135643e-01 -1.7680341681360623e-01
|
||||
62 -4.8938738154162575e-01 5.5387119501671334e-01 -4.8275712266641585e-01
|
||||
63 4.0721801666660368e-01 -6.6333065414791259e-01 -3.6112779273985718e-01
|
||||
64 8.4666802609774161e-01 8.5876008835428574e-01 9.8070536947452069e-01
|
||||
...
|
||||
Reference in New Issue
Block a user