Merge branch 'develop' into collected-small-changes
This commit is contained in:
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
@ -38,6 +38,7 @@ src/ML-HDNNP/* @singraber
|
||||
src/ML-IAP/* @athomps
|
||||
src/ML-PACE/* @yury-lysogorskiy
|
||||
src/ML-POD/* @exapde
|
||||
src/ML-UF3/* @monk-04
|
||||
src/MOFFF/* @hheenen
|
||||
src/MOLFILE/* @akohlmey
|
||||
src/NETCDF/* @pastewka
|
||||
|
||||
@ -285,6 +285,7 @@ set(STANDARD_PACKAGES
|
||||
ML-RANN
|
||||
ML-SNAP
|
||||
ML-POD
|
||||
ML-UF3
|
||||
MOFFF
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
|
||||
@ -60,6 +60,7 @@ set(ALL_PACKAGES
|
||||
ML-QUIP
|
||||
ML-RANN
|
||||
ML-SNAP
|
||||
ML-UF3
|
||||
MOFFF
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
|
||||
@ -62,6 +62,7 @@ set(ALL_PACKAGES
|
||||
ML-QUIP
|
||||
ML-RANN
|
||||
ML-SNAP
|
||||
ML-UF3
|
||||
MOFFF
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
|
||||
@ -50,6 +50,7 @@ set(WIN_PACKAGES
|
||||
ML-POD
|
||||
ML-RANN
|
||||
ML-SNAP
|
||||
ML-UF3
|
||||
MOFFF
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
|
||||
@ -45,6 +45,7 @@ set(ALL_PACKAGES
|
||||
ML-IAP
|
||||
ML-POD
|
||||
ML-SNAP
|
||||
ML-UF3
|
||||
MOFFF
|
||||
MOLECULE
|
||||
OPENMP
|
||||
|
||||
@ -42,6 +42,7 @@ set(WIN_PACKAGES
|
||||
ML-IAP
|
||||
ML-POD
|
||||
ML-SNAP
|
||||
ML-UF3
|
||||
MOFFF
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
|
||||
@ -25,16 +25,16 @@ OPT.
|
||||
|
||||
* :doc:`none <pair_none>`
|
||||
* :doc:`zero <pair_zero>`
|
||||
* :doc:`hybrid (k) <pair_hybrid>`
|
||||
* :doc:`hybrid/overlay (k) <pair_hybrid>`
|
||||
* :doc:`hybrid/scaled <pair_hybrid>`
|
||||
* :doc:`hybrid (ko) <pair_hybrid>`
|
||||
* :doc:`hybrid/molecular (o) <pair_hybrid>`
|
||||
* :doc:`hybrid/overlay (ko) <pair_hybrid>`
|
||||
* :doc:`hybrid/scaled (o) <pair_hybrid>`
|
||||
* :doc:`kim <pair_kim>`
|
||||
* :doc:`list <pair_list>`
|
||||
* :doc:`tracker <pair_tracker>`
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* :doc:`adp (ko) <pair_adp>`
|
||||
* :doc:`agni (o) <pair_agni>`
|
||||
* :doc:`aip/water/2dm (t) <pair_aip_water_2dm>`
|
||||
@ -269,7 +269,7 @@ OPT.
|
||||
* :doc:`smd/ulsph <pair_smd_ulsph>`
|
||||
* :doc:`smtbq <pair_smtbq>`
|
||||
* :doc:`snap (ik) <pair_snap>`
|
||||
* :doc:`soft (go) <pair_soft>`
|
||||
* :doc:`soft (gko) <pair_soft>`
|
||||
* :doc:`sph/heatconduction (g) <pair_sph_heatconduction>`
|
||||
* :doc:`sph/idealgas <pair_sph_idealgas>`
|
||||
* :doc:`sph/lj (g) <pair_sph_lj>`
|
||||
@ -303,6 +303,7 @@ OPT.
|
||||
* :doc:`tip4p/long/soft (o) <pair_fep_soft>`
|
||||
* :doc:`tri/lj <pair_tri_lj>`
|
||||
* :doc:`ufm (got) <pair_ufm>`
|
||||
* :doc:`uf3 (k) <pair_uf3>`
|
||||
* :doc:`vashishta (gko) <pair_vashishta>`
|
||||
* :doc:`vashishta/table (o) <pair_vashishta>`
|
||||
* :doc:`wf/cut <pair_wf_cut>`
|
||||
|
||||
@ -84,6 +84,7 @@ page gives those details.
|
||||
* :ref:`ML-QUIP <PKG-ML-QUIP>`
|
||||
* :ref:`ML-RANN <PKG-ML-RANN>`
|
||||
* :ref:`ML-SNAP <PKG-ML-SNAP>`
|
||||
* :ref:`ML-UF3 <PKG-ML-UF3>`
|
||||
* :ref:`MOFFF <PKG-MOFFF>`
|
||||
* :ref:`MOLECULE <PKG-MOLECULE>`
|
||||
* :ref:`MOLFILE <PKG-MOLFILE>`
|
||||
@ -1925,6 +1926,31 @@ computes which analyze attributes of the potential.
|
||||
|
||||
----------
|
||||
|
||||
.. _PKG-ML-UF3:
|
||||
|
||||
ML-UF3 package
|
||||
--------------
|
||||
|
||||
**Contents:**
|
||||
|
||||
A pair style for the ultra-fast force field potentials (UF3). UF3 is a
|
||||
methodology for deriving a highly accurate classical potential which is
|
||||
fast to evaluate and is fitted to a large archives of quantum mechanical
|
||||
(DFT) data. The use of b-spline basis set in UF3 enables the rapid
|
||||
evaluation of 2-body and 3-body interactions.
|
||||
|
||||
**Authors:** Ajinkya C Hire (University of Florida),
|
||||
Hendrik Krass (University of Constance),
|
||||
Matthias Rupp (Luxembourg Institute of Science and Technology),
|
||||
Richard Hennig (University of Florida)
|
||||
|
||||
**Supporting info:**
|
||||
|
||||
* src/ML-UF3: filenames -> commands
|
||||
* :doc:`pair_style uf3 <pair_uf3>`
|
||||
* examples/uf3
|
||||
* https://github.com/uf3/uf3
|
||||
|
||||
.. _PKG-MOFFF:
|
||||
|
||||
MOFFF package
|
||||
|
||||
@ -318,6 +318,11 @@ whether an extra library is needed to build and use the package:
|
||||
- :doc:`pair_style snap <pair_snap>`
|
||||
- snap
|
||||
- no
|
||||
* - :ref:`ML-UF3 <PKG-ML-UF3>`
|
||||
- quantum-fitted ultra fast potentials
|
||||
- :doc:`pair_style uf3 <pair_uf3>`
|
||||
- PACKAGES/uf3
|
||||
- no
|
||||
* - :ref:`MOFFF <PKG-MOFFF>`
|
||||
- styles for `MOF-FF <MOFplus_>`_ force field
|
||||
- :doc:`pair_style buck6d/coul/gauss <pair_buck6d_coul_gauss>`
|
||||
|
||||
@ -64,6 +64,8 @@ Syntax
|
||||
effectively an engineering shear strain rate
|
||||
*erate* value = R
|
||||
R = engineering shear strain rate (1/time units)
|
||||
*erate/rescale* value = R (ONLY available in :doc:`fix deform/pressure <fix_deform_pressure>` command)
|
||||
R = engineering shear strain rate (1/time units)
|
||||
*trate* value = R
|
||||
R = true shear strain rate (1/time units)
|
||||
*wiggle* values = A Tp
|
||||
|
||||
@ -115,6 +115,18 @@ friction and twisting friction supported by the :doc:`pair_style granular <pair_
|
||||
supported for walls. These are discussed in greater detail on the doc
|
||||
page for :doc:`pair_style granular <pair_granular>`.
|
||||
|
||||
.. note::
|
||||
When *fstyle* *granular* is specified, the associated *fstyle_params* are taken as
|
||||
those for a wall/particle interaction. For example, for the *hertz/material* normal
|
||||
contact model with :math:`E = 960` and :math:`\nu = 0.2`, the effective Young's
|
||||
modulus for a wall/particle interaction is computed as
|
||||
:math:`E_{eff} = \frac{960}{2(1-0.2^2)} = 500`. Any pair coefficients defined by
|
||||
:doc:`pair_style granular <pair_granular>` are not taken into consideration. To
|
||||
model different wall/particle interactions for particles of different material
|
||||
types, the user may define multiple fix wall/gran commands operating on separate
|
||||
groups (e.g. based on particle type) each with a different wall/particle effective
|
||||
Young's modulus.
|
||||
|
||||
Note that you can choose a different force styles and/or different
|
||||
values for the wall/particle coefficients than for particle/particle
|
||||
interactions. E.g. if you wish to model the wall as a different
|
||||
|
||||
@ -111,7 +111,7 @@ For the *hertz* model, the normal component of force is given by:
|
||||
|
||||
\mathbf{F}_{ne, Hertz} = k_n R_{eff}^{1/2}\delta_{ij}^{3/2} \mathbf{n}
|
||||
|
||||
Here, :math:`R_{eff} = \frac{R_i R_j}{R_i + R_j}` is the effective
|
||||
Here, :math:`R_{eff} = R = \frac{R_i R_j}{R_i + R_j}` is the effective
|
||||
radius, denoted for simplicity as *R* from here on. For *hertz*, the
|
||||
units of the spring constant :math:`k_n` are *force*\ /\ *length*\ \^2, or
|
||||
equivalently *pressure*\ .
|
||||
@ -120,13 +120,14 @@ For the *hertz/material* model, the force is given by:
|
||||
|
||||
.. math::
|
||||
|
||||
\mathbf{F}_{ne, Hertz/material} = \frac{4}{3} E_{eff} R_{eff}^{1/2}\delta_{ij}^{3/2} \mathbf{n}
|
||||
\mathbf{F}_{ne, Hertz/material} = \frac{4}{3} E_{eff} R^{1/2}\delta_{ij}^{3/2} \mathbf{n}
|
||||
|
||||
Here, :math:`E_{eff} = E = \left(\frac{1-\nu_i^2}{E_i} + \frac{1-\nu_j^2}{E_j}\right)^{-1}` is the effective Young's
|
||||
modulus, with :math:`\nu_i, \nu_j` the Poisson ratios of the particles of
|
||||
types *i* and *j*\ . Note that if the elastic modulus and the shear
|
||||
modulus of the two particles are the same, the *hertz/material* model
|
||||
is equivalent to the *hertz* model with :math:`k_n = 4/3 E_{eff}`
|
||||
Here, :math:`E_{eff} = E = \left(\frac{1-\nu_i^2}{E_i} + \frac{1-\nu_j^2}{E_j}\right)^{-1}`
|
||||
is the effective Young's modulus, with :math:`\nu_i, \nu_j` the Poisson ratios
|
||||
of the particles of types *i* and *j*. :math:`E_{eff}` is denoted as *E* from here on.
|
||||
Note that if the elastic modulus and the shear modulus of the two particles are the
|
||||
same, the *hertz/material* model is equivalent to the *hertz* model with
|
||||
:math:`k_n = 4/3 E`
|
||||
|
||||
The *dmt* model corresponds to the
|
||||
:ref:`(Derjaguin-Muller-Toporov) <DMT1975>` cohesive model, where the force
|
||||
@ -270,7 +271,8 @@ where :math:`k_n = \frac{4}{3} E_{eff}` for the *hertz/material* model. Since
|
||||
*coeff_restitution* accounts for the effective mass, effective radius, and
|
||||
pairwise overlaps (except when used with the *hooke* normal model) when calculating
|
||||
the damping coefficient, it accurately reproduces the specified coefficient of
|
||||
restitution for both monodisperse and polydisperse particle pairs.
|
||||
restitution for both monodisperse and polydisperse particle pairs. This damping
|
||||
model is not compatible with cohesive normal models such as *JKR* or *DMT*.
|
||||
|
||||
The total normal force is computed as the sum of the elastic and
|
||||
damping components:
|
||||
@ -441,11 +443,11 @@ discussion above. To match the Mindlin solution, one should set
|
||||
|
||||
G_{eff} = \left(\frac{2-\nu_i}{G_i} + \frac{2-\nu_j}{G_j}\right)^{-1}
|
||||
|
||||
where :math:`G` is the shear modulus, related to Young's modulus :math:`E`
|
||||
and Poisson's ratio :math:`\nu` by :math:`G = E/(2(1+\nu))`. This can also be
|
||||
achieved by specifying *NULL* for :math:`k_t`, in which case a
|
||||
normal contact model that specifies material parameters :math:`E` and
|
||||
:math:`\nu` is required (e.g. *hertz/material*, *dmt* or *jkr*\ ). In this
|
||||
where :math:`G_i` is the shear modulus of a particle of type :math:`i`, related to Young's
|
||||
modulus :math:`E_i` and Poisson's ratio :math:`\nu_i` by :math:`G_i = E_i/(2(1+\nu_i))`.
|
||||
This can also be achieved by specifying *NULL* for :math:`k_t`, in which case a
|
||||
normal contact model that specifies material parameters :math:`E_i` and
|
||||
:math:`\nu_i` is required (e.g. *hertz/material*, *dmt* or *jkr*\ ). In this
|
||||
case, mixing of the shear modulus for different particle types *i* and
|
||||
*j* is done according to the formula above.
|
||||
|
||||
@ -575,7 +577,7 @@ opposite torque on each particle, according to:
|
||||
|
||||
.. math::
|
||||
|
||||
\tau_{roll,i} = R_{eff} \mathbf{n} \times \mathbf{F}_{roll}
|
||||
\tau_{roll,i} = R \mathbf{n} \times \mathbf{F}_{roll}
|
||||
|
||||
.. math::
|
||||
|
||||
|
||||
@ -1,28 +1,41 @@
|
||||
.. index:: pair_style hybrid
|
||||
.. index:: pair_style hybrid/kk
|
||||
.. index:: pair_style hybrid/omp
|
||||
.. index:: pair_style hybrid/molecular
|
||||
.. index:: pair_style hybrid/molecular/omp
|
||||
.. index:: pair_style hybrid/overlay
|
||||
.. index:: pair_style hybrid/overlay/omp
|
||||
.. index:: pair_style hybrid/overlay/kk
|
||||
.. index:: pair_style hybrid/scaled
|
||||
.. index:: pair_style hybrid/scaled/omp
|
||||
|
||||
pair_style hybrid command
|
||||
=========================
|
||||
|
||||
Accelerator Variants: *hybrid/kk*
|
||||
Accelerator Variants: *hybrid/kk*, *hybrid/omp*
|
||||
|
||||
pair_style hybrid/molecular command
|
||||
===================================
|
||||
|
||||
Accelerator Variant: *hybrid/molecular/omp*
|
||||
|
||||
pair_style hybrid/overlay command
|
||||
=================================
|
||||
|
||||
Accelerator Variants: *hybrid/overlay/kk*
|
||||
Accelerator Variants: *hybrid/overlay/kk*, *hybrid/overlay/omp*
|
||||
|
||||
pair_style hybrid/scaled command
|
||||
==================================
|
||||
|
||||
Accelerator Variant: *hybrid/scaled/omp*
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style hybrid style1 args style2 args ...
|
||||
pair_style hybrid/molecular factor1 style1 args factor2 style 2 args
|
||||
pair_style hybrid/overlay style1 args style2 args ...
|
||||
pair_style hybrid/scaled factor1 style1 args factor2 style 2 args ...
|
||||
|
||||
@ -47,6 +60,10 @@ Examples
|
||||
pair_coeff * * tersoff Si.tersoff Si
|
||||
pair_coeff * * sw Si.sw Si
|
||||
|
||||
pair_style hybrid/molecular lj/cut 2.5 lj/cut 2.5
|
||||
pair_coeff * * lj/cut 1 1.0 1.0
|
||||
pair_coeff * * lj/cut 2 1.5 1.0
|
||||
|
||||
variable one equal ramp(1.0,0.0)
|
||||
variable two equal 1.0-v_one
|
||||
pair_style hybrid/scaled v_one lj/cut 2.5 v_two morse 2.5
|
||||
@ -56,17 +73,26 @@ Examples
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
The *hybrid*, *hybrid/overlay*, and *hybrid/scaled* styles enable the
|
||||
use of multiple pair styles in one simulation. With the *hybrid* style,
|
||||
exactly one pair style is assigned to each pair of atom types. With the
|
||||
*hybrid/overlay* and *hybrid/scaled* styles, one or more pair styles can
|
||||
be assigned to each pair of atom types. The assignment of pair styles
|
||||
to type pairs is made via the :doc:`pair_coeff <pair_coeff>` command.
|
||||
The major difference between the *hybrid/overlay* and *hybrid/scaled*
|
||||
styles is that the *hybrid/scaled* adds a scale factor for each
|
||||
sub-style contribution to forces, energies and stresses. Because of the
|
||||
added complexity, the *hybrid/scaled* style has more overhead and thus
|
||||
may be slower than *hybrid/overlay*.
|
||||
The *hybrid*, *hybrid/overlay*, *hybrid/molecular*, and *hybrid/scaled*
|
||||
styles enable the use of multiple pair styles in one simulation. With
|
||||
the *hybrid* style, exactly one pair style is assigned to each pair of
|
||||
atom types. With the *hybrid/overlay* and *hybrid/scaled* styles, one
|
||||
or more pair styles can be assigned to each pair of atom types. With
|
||||
the hybrid/molecular style, pair styles are assigned to either intra-
|
||||
or inter-molecular interactions.
|
||||
|
||||
The assignment of pair styles to type pairs is made via the
|
||||
:doc:`pair_coeff <pair_coeff>` command. The major difference between
|
||||
the *hybrid/overlay* and *hybrid/scaled* styles is that the
|
||||
*hybrid/scaled* adds a scale factor for each sub-style contribution to
|
||||
forces, energies and stresses. Because of the added complexity, the
|
||||
*hybrid/scaled* style has more overhead and thus may be slower than
|
||||
*hybrid/overlay*.
|
||||
|
||||
The *hybrid/molecular* pair style accepts *only* two sub-styles: the
|
||||
first is assigned to intra-molecular interactions (i.e. both atoms
|
||||
have the same molecule ID), the second to inter-molecular interactions
|
||||
(i.e. interacting atoms have different molecule IDs).
|
||||
|
||||
Here are two examples of hybrid simulations. The *hybrid* style could
|
||||
be used for a simulation of a metal droplet on a LJ surface. The metal
|
||||
@ -476,6 +502,8 @@ the same or else LAMMPS will generate an error.
|
||||
Pair style *hybrid/scaled* currently only works for non-accelerated
|
||||
pair styles and pair styles from the OPT package.
|
||||
|
||||
Pair style *hybrid/molecular* is not compatible with manybody potentials.
|
||||
|
||||
When using pair styles from the GPU package they must not be listed
|
||||
multiple times. LAMMPS will detect this and abort.
|
||||
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
.. index:: pair_style soft
|
||||
.. index:: pair_style soft/gpu
|
||||
.. index:: pair_style soft/kk
|
||||
.. index:: pair_style soft/omp
|
||||
|
||||
pair_style soft command
|
||||
=======================
|
||||
|
||||
Accelerator Variants: *soft/gpu*, *soft/omp*
|
||||
Accelerator Variants: *soft/gpu*, *soft/kk*, *soft/omp*
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
@ -108,6 +108,7 @@ accelerated styles exist.
|
||||
|
||||
* :doc:`none <pair_none>` - turn off pairwise interactions
|
||||
* :doc:`hybrid <pair_hybrid>` - multiple styles of pairwise interactions
|
||||
* :doc:`hybrid/molecular <pair_hybrid>` - different pair styles for intra- and inter-molecular interactions
|
||||
* :doc:`hybrid/overlay <pair_hybrid>` - multiple styles of superposed pairwise interactions
|
||||
* :doc:`hybrid/scaled <pair_hybrid>` - multiple styles of scaled superposed pairwise interactions
|
||||
* :doc:`zero <pair_zero>` - neighbor list but no interactions
|
||||
@ -382,6 +383,7 @@ accelerated styles exist.
|
||||
* :doc:`tracker <pair_tracker>` - monitor information about pairwise interactions
|
||||
* :doc:`tri/lj <pair_tri_lj>` - LJ potential between triangles
|
||||
* :doc:`ufm <pair_ufm>` -
|
||||
* :doc:`uf3 <pair_uf3>` - UF3 machine-learning potential
|
||||
* :doc:`vashishta <pair_vashishta>` - Vashishta 2-body and 3-body potential
|
||||
* :doc:`vashishta/table <pair_vashishta>` -
|
||||
* :doc:`wf/cut <pair_wf_cut>` - Wang-Frenkel Potential for short-ranged interactions
|
||||
|
||||
213
doc/src/pair_uf3.rst
Normal file
213
doc/src/pair_uf3.rst
Normal file
@ -0,0 +1,213 @@
|
||||
.. index:: pair_style uf3
|
||||
.. index:: pair_style uf3/kk
|
||||
|
||||
pair_style uf3 command
|
||||
======================
|
||||
|
||||
Accelerator Variants: *uf3/kk*
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style style BodyFlag
|
||||
|
||||
* style = *uf3* or *uf3/kk*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
BodyFlag = Indicates whether to calculate only 2-body or 2 and 3-body interactions. Possible values: 2 or 3
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style uf3 3
|
||||
pair_coeff * * Nb.uf3 Nb
|
||||
|
||||
pair_style uf3 2
|
||||
pair_coeff * * NbSn.uf3 Nb Sn
|
||||
|
||||
pair_style uf3 3
|
||||
pair_coeff * * NbSn.uf3 Nb Sn
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
|
||||
The *uf3* style computes the :ref:`Ultra-Fast Force Fields (UF3)
|
||||
<Xie23>` potential, a machine-learning interatomic potential. In UF3,
|
||||
the total energy of the system is defined via two- and three-body
|
||||
interactions:
|
||||
|
||||
.. math::
|
||||
|
||||
E & = \sum_{i,j} V_2(r_{ij}) + \sum_{i,j,k} V_3 (r_{ij},r_{ik},r_{jk}) \\
|
||||
V_2(r_{ij}) & = \sum_{n=0}^N c_n B_n(r_{ij}) \\
|
||||
V_3 (r_{ij},r_{ik},r_{jk}) & = \sum_{l=0}^{N_l} \sum_{m=0}^{N_m} \sum_{n=0}^{N_n} c_{l,m,n} B_l(r_{ij}) B_m(r_{ik}) B_n(r_{jk})
|
||||
|
||||
where :math:`V_2(r_{ij})` and :math:`V_3 (r_{ij},r_{ik},r_{jk})` are the
|
||||
two- and three-body interactions, respectively. For the two-body the
|
||||
summation is over all neighbors J and for the three-body the summation
|
||||
is over all neighbors J and K of atom I within a cutoff distance
|
||||
determined from the potential files. :math:`B_n(r_{ij})` are the cubic
|
||||
b-spline basis, :math:`c_n` and :math:`c_{l,m,n}` are the machine-learned
|
||||
interaction parameters and :math:`N`, :math:`N_l`, :math:`N_m`, and
|
||||
:math:`N_n` denote the number of basis functions per spline or tensor
|
||||
spline dimension.
|
||||
|
||||
With *uf3* style only a single pair_coeff command is used to indicate the
|
||||
UF3 LAMMPS potential file containing all the two- and three-body interactions
|
||||
followed by N additional arguments specifying the mapping of UF3 elements to
|
||||
LAMMPS atom types, where N is the number of LAMMPS atom types:
|
||||
|
||||
* UF3 LAMMPS potential file
|
||||
* N elements names = mapping of UF3 elements to atom types
|
||||
|
||||
As an example, if a LAMMPS simulation contains 2 atom types (elements
|
||||
'A' and 'B'), the pair_coeff command will be:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style uf3 3
|
||||
pair_coeff * * AB.uf3 A B
|
||||
|
||||
The AB.uf3 file should contain all two-body (A-A, A-B, B-B) and three-body
|
||||
(A-A-A, A-A-B, A-B-B, B-A-A, B-A-B, B-B-B).
|
||||
|
||||
If a value of "2" is specified in the :code:`pair_style uf3` command,
|
||||
only the two-body potentials are needed. For 3-body interaction the
|
||||
first atom type is the central atom. We recommend using the
|
||||
:code:`generate_uf3_lammps_pots.py` script (found `here
|
||||
<https://github.com/uf3/uf3/tree/develop/lammps_plugin/scripts>`_) for
|
||||
generating the UF3 LAMMPS potential file from the UF3 JSON potentials.
|
||||
|
||||
----------
|
||||
|
||||
UF3 LAMMPS potential file in the *potentials* directory of the LAMMPS
|
||||
distribution have a ".uf3" suffix. The interaction block in UF3 LAMMPS potential
|
||||
file should start with :code:`#UF3 POT` and end with :code:`#` characters.
|
||||
Following shows the format of a generic 2-body and 3-body potential block in
|
||||
UF3 LAMMPS potential file-
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
#UF3 POT UNITS: units DATE: POT_GEN_DATE AUTHOR: AUTHOR_NAME CITATION: CITE
|
||||
2B ELEMENT1 ELEMENT2 LEADING_TRIM TRAILING_TRIM
|
||||
Rij_CUTOFF NUM_OF_KNOTS
|
||||
BSPLINE_KNOTS
|
||||
NUM_OF_COEFF
|
||||
COEFF
|
||||
#
|
||||
#UF3 POT UNITS: units DATE: POT_GEN_DATE AUTHOR: AUTHOR_NAME CITATION: CITE
|
||||
3B ELEMENT1 ELEMENT2 ELEMENT3 LEADING_TRIM TRAILING_TRIM
|
||||
Rjk_CUTOFF Rik_CUTOFF Rij_CUTOFF NUM_OF_KNOTS_JK NUM_OF_KNOTS_IK NUM_OF_KNOTS_IJ
|
||||
BSPLINE_KNOTS_FOR_JK
|
||||
BSPLINE_KNOTS_FOR_IK
|
||||
BSPLINE_KNOTS_FOR_IJ
|
||||
SHAPE_OF_COEFF_MATRIX[I][J][K]
|
||||
COEFF_MATRIX[0][0][K]
|
||||
COEFF_MATRIX[0][1][K]
|
||||
COEFF_MATRIX[0][2][K]
|
||||
.
|
||||
.
|
||||
.
|
||||
COEFF_MATRIX[1][0][K]
|
||||
COEFF_MATRIX[1][1][K]
|
||||
COEFF_MATRIX[1][2][K]
|
||||
.
|
||||
.
|
||||
.
|
||||
#
|
||||
|
||||
The second line indicates whether the block contains data for 2-body
|
||||
(:code:`2B`) or 3-body (:code:`3B`) interaction. This is followed by element
|
||||
combination interaction, :code:`LEADING_TRIM` and :code:`TRAILING_TRIM`
|
||||
number on the same line. The current implementation is only tested for
|
||||
:code:`LEADING_TRIM=0` and :code:`TRAILING_TRIM=3`.
|
||||
If other values are used LAMMPS is terminated after issuing an error message.
|
||||
The :code:`Rij_CUTOFF` sets the 2-body cutoff for the interaction described
|
||||
by the potential block. :code:`NUM_OF_KNOTS` is the number of knots
|
||||
(or the length of the knot vector) present on the very next line. The
|
||||
:code:`BSPLINE_KNOTS` line should contain all the knots in ascending order.
|
||||
:code:`NUM_OF_COEFF` is the number of coefficients in the :code:`COEFF` line.
|
||||
All the numbers in the BSPLINE_KNOTS and COEFF line should be space-separated.
|
||||
Similar to the 2-body potential block, the third line sets the cutoffs and
|
||||
length of the knots. The cutoff distance between atom-type I and J is
|
||||
:code:`Rij_CUTOFF`, atom-type I and K is :code:`Rik_CUTOFF` and between
|
||||
J and K is :code:`Rjk_CUTOFF`.
|
||||
|
||||
.. note::
|
||||
|
||||
The current implementation only works for UF3 potentials with cutoff
|
||||
distances for 3-body interactions that follows
|
||||
:code:`2Rij_CUTOFF=2Rik_CUTOFF=Rjk_CUTOFF` relation.
|
||||
|
||||
The :code:`BSPLINE_KNOTS_FOR_JK`, :code:`BSPLINE_KNOTS_FOR_IK`, and
|
||||
:code:`BSPLINE_KNOTS_FOR_IJ` lines (note the order) contain the knots in
|
||||
increasing order for atoms J and K, I and K, and atoms I and J
|
||||
respectively. The number of knots is defined by the
|
||||
:code:`NUM_OF_KNOTS_*` characters in the previous line. The shape of
|
||||
the coefficient matrix is defined on the
|
||||
:code:`SHAPE_OF_COEFF_MATRIX[I][J][K]` line followed by the columns of
|
||||
the coefficient matrix, one per line, as shown above. For example, if
|
||||
the coefficient matrix has the shape of 8x8x13, then
|
||||
:code:`SHAPE_OF_COEFF_MATRIX[I][J][K]` will be :code:`8 8 13` followed
|
||||
by 64 (8x8) lines each containing 13 coefficients separated by space.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
For atom type pairs I,J and I != J, where types I and J correspond to
|
||||
two different element types, mixing is performed by LAMMPS as described
|
||||
above from values in the potential file.
|
||||
|
||||
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 file.
|
||||
|
||||
This pair style can only be used via the *pair* keyword of the
|
||||
:doc:`run_style respa <run_style>` command. It does not support the
|
||||
*inner*, *middle*, *outer* keywords.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
The 'uf3' pair style is part of the ML-UF3 package. It is only enabled
|
||||
if LAMMPS was built with that package. See the :doc:`Build package
|
||||
<Build_package>` page for more info.
|
||||
|
||||
This pair style requires the :doc:`newton <newton>` setting to be "on".
|
||||
|
||||
The UF3 LAMMPS potential file provided with LAMMPS (see the potentials
|
||||
directory) are parameterized for metal :doc:`units <units>`.
|
||||
|
||||
The single() function of 'uf3' pair style only return the 2-body
|
||||
interaction energy.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`pair_coeff <pair_coeff>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
|
||||
----------
|
||||
|
||||
.. _Xie23:
|
||||
|
||||
**(Xie23)** Xie, S.R., Rupp, M. & Hennig, R.G. Ultra-fast interpretable machine-learning potentials. npj Comput Mater 9, 162 (2023). https://doi.org/10.1038/s41524-023-01092-7
|
||||
@ -1434,6 +1434,7 @@ Hendrik
|
||||
Henin
|
||||
Henkelman
|
||||
Henkes
|
||||
Hennig
|
||||
henrich
|
||||
Henrich
|
||||
Hermitian
|
||||
@ -1595,6 +1596,7 @@ interlayer
|
||||
intermolecular
|
||||
interoperable
|
||||
Interparticle
|
||||
interpretable
|
||||
interstitials
|
||||
intertube
|
||||
Intr
|
||||
@ -1817,6 +1819,7 @@ Koziol
|
||||
Kp
|
||||
kradius
|
||||
Kraker
|
||||
Krass
|
||||
Kraus
|
||||
Kremer
|
||||
Kress
|
||||
@ -3271,6 +3274,7 @@ Rudranarayan
|
||||
Rudzinski
|
||||
Runge
|
||||
runtime
|
||||
Rupp
|
||||
Rutuparna
|
||||
rx
|
||||
rxd
|
||||
@ -3820,6 +3824,8 @@ uChem
|
||||
uCond
|
||||
uef
|
||||
UEF
|
||||
uf
|
||||
uf3
|
||||
ufm
|
||||
Uhlenbeck
|
||||
Ui
|
||||
|
||||
1
examples/PACKAGES/uf3/Nb.uf3
Symbolic link
1
examples/PACKAGES/uf3/Nb.uf3
Symbolic link
@ -0,0 +1 @@
|
||||
../../../potentials/Nb.uf3
|
||||
46
examples/PACKAGES/uf3/in.uf3.Nb
Normal file
46
examples/PACKAGES/uf3/in.uf3.Nb
Normal file
@ -0,0 +1,46 @@
|
||||
# Demonstrate UF3 W potential
|
||||
|
||||
# # ============= Initialize simulation
|
||||
|
||||
variable nsteps index 100
|
||||
variable nrep equal 4
|
||||
variable a equal 3.3005
|
||||
units metal
|
||||
|
||||
# generate the box and atom positions using a BCC lattice
|
||||
|
||||
variable nx equal ${nrep}
|
||||
variable ny equal ${nrep}
|
||||
variable nz equal ${nrep}
|
||||
|
||||
boundary p p p
|
||||
|
||||
lattice bcc $a
|
||||
region box block 0 ${nx} 0 ${ny} 0 ${nz}
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
|
||||
mass 1 92.906
|
||||
|
||||
# # ============= set pair style
|
||||
|
||||
pair_style uf3 3
|
||||
pair_coeff * * Nb.uf3 Nb
|
||||
|
||||
|
||||
# # ============= Setup output
|
||||
|
||||
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 300.0 2367804 loop geom
|
||||
fix 1 all nve
|
||||
run ${nsteps}
|
||||
118
examples/PACKAGES/uf3/log.13May24.Nb.uf3.g++.1
Normal file
118
examples/PACKAGES/uf3/log.13May24.Nb.uf3.g++.1
Normal file
@ -0,0 +1,118 @@
|
||||
LAMMPS (17 Apr 2024 - Development - patch_17Apr2024-199-g49f20229ad-modified)
|
||||
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Demonstrate UF3 W potential
|
||||
|
||||
# # ============= Initialize simulation
|
||||
|
||||
variable nsteps index 100
|
||||
variable nrep equal 4
|
||||
variable a equal 3.3005
|
||||
units metal
|
||||
|
||||
# generate the box and atom positions using a BCC lattice
|
||||
|
||||
variable nx equal ${nrep}
|
||||
variable nx equal 4
|
||||
variable ny equal ${nrep}
|
||||
variable ny equal 4
|
||||
variable nz equal ${nrep}
|
||||
variable nz equal 4
|
||||
|
||||
boundary p p p
|
||||
|
||||
lattice bcc $a
|
||||
lattice bcc 3.3005
|
||||
Lattice spacing in x,y,z = 3.3005 3.3005 3.3005
|
||||
region box block 0 ${nx} 0 ${ny} 0 ${nz}
|
||||
region box block 0 4 0 ${ny} 0 ${nz}
|
||||
region box block 0 4 0 4 0 ${nz}
|
||||
region box block 0 4 0 4 0 4
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (13.202 13.202 13.202)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 128 atoms
|
||||
using lattice units in orthogonal box = (0 0 0) to (13.202 13.202 13.202)
|
||||
create_atoms CPU = 0.000 seconds
|
||||
|
||||
mass 1 92.906
|
||||
|
||||
# # ============= set pair style
|
||||
|
||||
pair_style uf3 3
|
||||
pair_coeff * * Nb.uf3 Nb
|
||||
Reading potential file Nb.uf3 with DATE: 2024-04-02
|
||||
|
||||
|
||||
# # ============= Setup output
|
||||
|
||||
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 300.0 2367804 loop geom
|
||||
fix 1 all nve
|
||||
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 = 9
|
||||
ghost atom cutoff = 9
|
||||
binsize = 4.5, bins = 3 3 3
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair uf3, perpetual
|
||||
attributes: full, newton on
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 3.376 | 3.376 | 3.376 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 300 -4.4256832 0 -4.3872081 90756.437
|
||||
10 294.36659 -4.4249607 0 -4.3872081 91006.427
|
||||
20 277.9021 -4.422849 0 -4.387208 91716.126
|
||||
30 251.88303 -4.4195119 0 -4.3872078 92789.12
|
||||
40 218.42803 -4.4152211 0 -4.3872076 94118.45
|
||||
50 180.40641 -4.4103445 0 -4.3872073 95579.009
|
||||
60 141.2326 -4.4053202 0 -4.3872071 97031.816
|
||||
70 104.54429 -4.4006146 0 -4.3872068 98332.882
|
||||
80 73.787889 -4.3966699 0 -4.3872066 99351.332
|
||||
90 51.759956 -4.3938446 0 -4.3872064 99992.934
|
||||
100 40.209821 -4.3923633 0 -4.3872064 100211.98
|
||||
Loop time of 0.385575 on 1 procs for 100 steps with 128 atoms
|
||||
|
||||
Performance: 11.204 ns/day, 2.142 hours/ns, 259.353 timesteps/s, 33.197 katom-step/s
|
||||
99.7% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.38403 | 0.38403 | 0.38403 | 0.0 | 99.60
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.00090609 | 0.00090609 | 0.00090609 | 0.0 | 0.23
|
||||
Output | 0.00017626 | 0.00017626 | 0.00017626 | 0.0 | 0.05
|
||||
Modify | 0.00018204 | 0.00018204 | 0.00018204 | 0.0 | 0.05
|
||||
Other | | 0.0002795 | | | 0.07
|
||||
|
||||
Nlocal: 128 ave 128 max 128 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 1601 ave 1601 max 1601 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 21504 ave 21504 max 21504 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 21504
|
||||
Ave neighs/atom = 168
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:00
|
||||
118
examples/PACKAGES/uf3/log.13May24.Nb.uf3.g++.4
Normal file
118
examples/PACKAGES/uf3/log.13May24.Nb.uf3.g++.4
Normal file
@ -0,0 +1,118 @@
|
||||
LAMMPS (17 Apr 2024 - Development - patch_17Apr2024-199-g49f20229ad-modified)
|
||||
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Demonstrate UF3 W potential
|
||||
|
||||
# # ============= Initialize simulation
|
||||
|
||||
variable nsteps index 100
|
||||
variable nrep equal 4
|
||||
variable a equal 3.3005
|
||||
units metal
|
||||
|
||||
# generate the box and atom positions using a BCC lattice
|
||||
|
||||
variable nx equal ${nrep}
|
||||
variable nx equal 4
|
||||
variable ny equal ${nrep}
|
||||
variable ny equal 4
|
||||
variable nz equal ${nrep}
|
||||
variable nz equal 4
|
||||
|
||||
boundary p p p
|
||||
|
||||
lattice bcc $a
|
||||
lattice bcc 3.3005
|
||||
Lattice spacing in x,y,z = 3.3005 3.3005 3.3005
|
||||
region box block 0 ${nx} 0 ${ny} 0 ${nz}
|
||||
region box block 0 4 0 ${ny} 0 ${nz}
|
||||
region box block 0 4 0 4 0 ${nz}
|
||||
region box block 0 4 0 4 0 4
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (13.202 13.202 13.202)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 128 atoms
|
||||
using lattice units in orthogonal box = (0 0 0) to (13.202 13.202 13.202)
|
||||
create_atoms CPU = 0.001 seconds
|
||||
|
||||
mass 1 92.906
|
||||
|
||||
# # ============= set pair style
|
||||
|
||||
pair_style uf3 3
|
||||
pair_coeff * * Nb.uf3 Nb
|
||||
Reading potential file Nb.uf3 with DATE: 2024-04-02
|
||||
|
||||
|
||||
# # ============= Setup output
|
||||
|
||||
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 300.0 2367804 loop geom
|
||||
fix 1 all nve
|
||||
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 = 9
|
||||
ghost atom cutoff = 9
|
||||
binsize = 4.5, bins = 3 3 3
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair uf3, perpetual
|
||||
attributes: full, newton on
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 3.351 | 3.351 | 3.351 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 300 -4.4256832 0 -4.3872081 90756.437
|
||||
10 294.36659 -4.4249607 0 -4.3872081 91006.427
|
||||
20 277.9021 -4.422849 0 -4.387208 91716.126
|
||||
30 251.88303 -4.4195119 0 -4.3872078 92789.12
|
||||
40 218.42803 -4.4152211 0 -4.3872076 94118.45
|
||||
50 180.40641 -4.4103445 0 -4.3872073 95579.009
|
||||
60 141.2326 -4.4053202 0 -4.3872071 97031.816
|
||||
70 104.54429 -4.4006146 0 -4.3872068 98332.882
|
||||
80 73.787889 -4.3966699 0 -4.3872066 99351.332
|
||||
90 51.759956 -4.3938446 0 -4.3872064 99992.934
|
||||
100 40.209821 -4.3923633 0 -4.3872064 100211.98
|
||||
Loop time of 0.11881 on 4 procs for 100 steps with 128 atoms
|
||||
|
||||
Performance: 36.361 ns/day, 0.660 hours/ns, 841.679 timesteps/s, 107.735 katom-step/s
|
||||
99.3% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.10673 | 0.10875 | 0.11236 | 0.7 | 91.53
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.0057324 | 0.0093477 | 0.011375 | 2.4 | 7.87
|
||||
Output | 0.00016629 | 0.00018236 | 0.00022483 | 0.0 | 0.15
|
||||
Modify | 9.4948e-05 | 0.00010621 | 0.00012066 | 0.0 | 0.09
|
||||
Other | | 0.0004263 | | | 0.36
|
||||
|
||||
Nlocal: 32 ave 32 max 32 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 1049 ave 1049 max 1049 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 5376 ave 5376 max 5376 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 21504
|
||||
Ave neighs/atom = 168
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:00
|
||||
136
potentials/Nb.uf3
Normal file
136
potentials/Nb.uf3
Normal file
@ -0,0 +1,136 @@
|
||||
#UF3 POT UNITS: metal DATE: 2024-04-02 12:18:15.359106 AUTHOR: Ajinkya_Hire CITATION:
|
||||
2B Nb Nb 0 3 nk
|
||||
8.0 31
|
||||
0.001 0.001 0.001 0.001 0.33429166666666665 0.66758333333333331 1.000875 1.3341666666666665 1.6674583333333333 2.00075 2.3340416666666663 2.6673333333333331 3.0006249999999999 3.3339166666666666 3.667208333333333 4.0004999999999997 4.3337916666666665 4.6670833333333333 5.000375 5.3336666666666668 5.6669583333333335 6.0002500000000003 6.3335416666666671 6.6668333333333338 7.0001249999999997 7.3334166666666665 7.6667083333333332 8 8 8 8
|
||||
27
|
||||
79.140244588519465 79.140244588519465 55.85833391113556 36.597903318706138 21.358952811231141 12.290000872768841 1.9593931914091953 -0.65697974623243804 -0.85177956270573463 -0.68929688239869991 -0.46787243412973262 -0.27624655899523165 -0.11912921944351409 -0.056302369393035338 -0.0049812809608429064 0.0085637634684603507 0.0034716161454604712 -0.0058751075573311978 -0.005453415412748467 -0.0015123194244718201 0.0011577919587182201 0.001583772506713282 -0.00049823976100720228 -0.0013902809146717273 0 0 0
|
||||
#
|
||||
#UF3 POT UNITS: metal DATE: 2024-04-02 12:18:15.359106 AUTHOR: Ajinkya_Hire CITATION:
|
||||
3B Nb Nb Nb 0 3 nk
|
||||
8.0 4.0 4.0 23 15 15
|
||||
0.001 0.001 0.001 0.001 0.50093749999999992 1.000875 1.5008124999999999 2.00075 2.5006874999999997 3.0006249999999999 3.5005624999999996 4.0004999999999997 4.5004375000000003 5.000375 5.5003124999999997 6.0002500000000003 6.5001875 7.0001249999999997 7.5000625000000003 8 8 8 8
|
||||
0.001 0.001 0.001 0.001 0.50087499999999996 1.00075 1.5006249999999999 2.0005000000000002 2.500375 3.0002499999999999 3.5001250000000002 4 4 4 4
|
||||
0.001 0.001 0.001 0.001 0.50087499999999996 1.00075 1.5006249999999999 2.0005000000000002 2.500375 3.0002499999999999 3.5001250000000002 4 4 4 4
|
||||
11 11 19
|
||||
-1.1790416072105636e-06 6.589114265858035e-08 2.1094970065385374e-06 4.7014910818419987e-07 8.288423734406254e-06 0.000186151370764668 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
3.2366723157260956e-05 2.6208783380066457e-05 1.0239981836366566e-05 1.8487993936404763e-05 2.1943710009352506e-05 2.6899947783571087e-07 5.002786118380638e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
4.0696915445106504e-05 6.184559535738335e-05 5.870203846064511e-05 -1.112085789465658e-05 -4.7600144351359347e-07 -5.861397594145908e-08 1.4524208784805573e-08 2.300649782987421e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
5.282737863089323e-05 6.328946161646202e-06 1.8329325276370316e-05 1.6423572667388823e-05 1.2653184610977003e-06 7.181714140248046e-06 3.491501462345434e-06 -7.285463619241614e-06 3.2609159022388403e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
6.9413198850914024e-06 2.107626397843018e-05 1.8155172114721186e-05 2.0928626557075606e-06 1.5632037328512312e-06 -2.7335717313450097e-07 -7.2126792356200426e-09 9.213093725547886e-09 4.186629643010996e-08 8.198811769753182e-08 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
1.4231393739579515e-06 3.630746449160232e-07 9.318604659023228e-07 4.92311430374376e-07 -3.701479331898353e-09 2.1280257031614452e-07 1.2240989510544568e-06 5.3432540178806065e-06 2.043230389835189e-06 3.2740024159475547e-07 6.717304982644579e-07 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 5.196157077391817e-07 6.938124100654148e-08 7.597564197383545e-08 1.863740632660483e-07 4.437837629589167e-07 5.453941063185757e-07 1.5602917821833568e-06 3.404289212094662e-07 9.967447994956849e-07 5.8845599651090215e-06 1.5052240335012455e-05 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 3.196534127251379e-06 -1.1872677866681306e-06 -2.5678892066098854e-08 5.139117071436217e-09 1.1142431390092631e-06 2.0605776537608227e-06 5.297265009242829e-06 6.713907186544732e-06 2.7028644452395994e-06 1.149242737988068e-06 2.2449682976927855e-06 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
3.2366723157260956e-05 2.6208783380066457e-05 1.0239981836366566e-05 1.8487993936404763e-05 2.1943710009352506e-05 2.6899947783571087e-07 5.002786118380638e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
9.36844864368356e-06 1.9223644807676324e-05 1.9979026246524356e-05 3.627062812549574e-05 9.775578281629195e-06 -5.894357549683858e-06 6.470814473155067e-07 2.31805322174729e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
2.2218614171918013e-06 5.325319655352672e-06 7.766746363269582e-06 9.361315506075464e-06 5.0417710282874456e-05 9.822946186678772e-05 0.00026400568406806884 0.00033610865151919737 0.00013239814531221768 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
4.4850777249143735e-05 7.094600012126306e-05 0.00030581781354430576 0.00044661036994300023 0.00016699596636619577 1.5860625743775105e-05 9.74250537001798e-07 5.385650613476577e-06 8.091278451728344e-06 1.2460869401480828e-05 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0001028691918645833 0.0002737040057685444 0.0003861446001781946 0.0004042287651515365 0.0017229200225725174 0.003198296698131205 0.008774096120579751 0.011237818178923189 0.004334800036723805 0.0007344916552783145 -0.0001506915192259342 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
-1.2482511756156149e-05 1.365124801275985e-05 1.3894049203809568e-05 2.3985465221727954e-05 3.3458449092465795e-05 0.00028172299406359233 0.00040056109827889085 0.0004621959325200118 0.0034637215474633033 0.009153352872912168 0.012804683731760212 0.010674833967812809 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.005346497059990333 -0.002010348201210142 -0.0010943235863089423 0.0001661513182702165 0.00012025969610516196 2.4949866002221845e-05 6.627236360802077e-06 3.003757825105864e-06 3.997348910159012e-05 0.000427961841918743 0.0007451357800599296 0.0011219432594133996 0.009685550613014016 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.013431011504370738 0.007883426617122005 0.007935899204760883 0.005880150773602205 0.0009832099103910489 0.005414528729313218 0.0015950126575825377 0.00024127039666882992 -1.5674461809944553e-05 1.0711548076574028e-05 7.830483572860064e-06 0.00011012649333888752 0.0005497452692208139 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
4.0696915445106504e-05 6.184559535738335e-05 5.870203846064511e-05 -1.112085789465658e-05 -4.7600144351359347e-07 -5.861397594145908e-08 1.4524208784805573e-08 2.300649782987421e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
2.2218614171918013e-06 5.325319655352672e-06 7.766746363269582e-06 9.361315506075464e-06 5.0417710282874456e-05 9.822946186678772e-05 0.00026400568406806884 0.00033610865151919737 0.00013239814531221768 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.00013804169495254125 0.0012238504051117233 0.01461439973735456 0.010197731078827295 0.009003775355755566 0.030381456320656558 0.024785731678029766 0.004637019267552505 -0.005938106654005813 -0.002605150959220643 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
-0.0002216303488927365 0.0001541319391627563 4.83626397765333e-05 2.1041902272582753e-05 0.00026610797279588076 0.00045665788403242036 0.00017325291338578903 0.0035336618936866277 0.018540440861910777 0.003501320637152642 0.002219074201926699 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.01652594711887213 0.011725805945708163 0.011173124362203699 0.0024178633067081135 -0.01796173780303683 -0.011618890946870497 -0.0008528234196397706 -9.706084806556783e-05 -2.754043401157181e-06 0.0001324948483342069 5.482811058752758e-05 0.0003886706609323921 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.008855607599180339 0.015278371659152929 0.0023879884417463693 0.000935102721182137 0.0034651523786104546 0.005282714096158778 0.0012741283037854573 0.006268847413803995 0.004013755514818873 0.010363477891131097 0.007109323912817858 -0.0002600093944564617 -0.00034633976332068713 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
-2.698386662730078e-05 2.754973422173369e-07 0.0001320534807487939 0.004372176148977807 0.0015642026255259442 0.004248632573013906 0.00040885420395593786 0.001088966135412402 0.004766232525411325 0.002205157762668968 0.007459939889093756 0.005587608653898612 -0.004720162133268877 -0.006593174803103767 0.0 0.0 0.0 0.0 0.0
|
||||
-7.940872165606751e-05 2.276762148612182e-06 0.00010635762128769112 2.049233578255131e-05 0.00042145671490654473 0.01249692872936893 0.0020370917425772224 0.0017316344055948985 0.0006574004028558345 0.0012283310563930355 0.0014629455315045585 -4.492954039177435e-06 0.00029547002108771967 0.002683727758662211 0.004096710661285439 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
5.282737863089323e-05 6.328946161646202e-06 1.8329325276370316e-05 1.6423572667388823e-05 1.2653184610977003e-06 7.181714140248046e-06 3.491501462345434e-06 -7.285463619241614e-06 3.2609159022388403e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
4.4850777249143735e-05 7.094600012126306e-05 0.00030581781354430576 0.00044661036994300023 0.00016699596636619577 1.5860625743775105e-05 9.74250537001798e-07 5.385650613476577e-06 8.091278451728344e-06 1.2460869401480828e-05 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
-0.0002216303488927365 0.0001541319391627563 4.83626397765333e-05 2.1041902272582753e-05 0.00026610797279588076 0.00045665788403242036 0.00017325291338578903 0.0035336618936866277 0.018540440861910777 0.003501320637152642 0.002219074201926699 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.003917873880791907 -0.0007874629498581528 -2.4595030318112164e-05 -2.8508297646329816e-06 1.8504666071760445e-07 0.0001190800388356091 0.0035373487148805376 0.00037674157183609377 0.0012087894330956167 0.0009651695201594091 4.769364472898923e-05 0.0004612591073953361 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.00022640297379380707 -0.0005111351623843819 0.0002024994190007784 0.00044921539785371963 0.001393999756415734 0.0011754659552919043 7.761533188706794e-05 5.8170561410888746e-05 -1.0918989217761552e-05 -2.9455190099531973e-07 2.0845708467284646e-07 1.0072947935068441e-06 2.449241542240889e-06 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
5.3159155089314414e-05 1.2012438398909825e-05 3.274115317951001e-05 1.689353008824745e-05 -4.232110203859359e-07 7.656160171407207e-06 5.754938338062256e-05 0.0002687156220968384 9.768544317740195e-05 1.0129360414562531e-05 2.293272526112481e-05 1.8260890221186993e-05 1.7288534885724222e-06 1.8856324749638164e-06 0.0 0.0 0.0 0.0 0.0
|
||||
4.542360076931743e-06 1.2329326209575631e-05 1.7173803033436737e-05 5.0102066463061734e-05 1.09067765324765e-05 4.930240898900306e-05 0.00028721835291257015 0.0007503332386451459 0.00015238128535605624 -6.391111549761724e-05 -4.677072820313549e-06 -5.572104125200205e-06 2.707663268609677e-05 5.022846595129856e-05 0.00012970076559689836 0.0 0.0 0.0 0.0
|
||||
0.0001650881267658455 6.548635015912796e-05 3.282822556024051e-05 7.205996516588195e-05 0.00030710620226134084 0.0007279352507540159 0.000909918529220897 0.0017257383928761386 0.00047543969768972346 -0.00030462814537952123 2.7321207199326783e-05 0.00010130812246147248 5.4817489360932934e-05 0.00012640103175376577 0.00018995742264027741 0.00023929212126678798 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
6.9413198850914024e-06 2.107626397843018e-05 1.8155172114721186e-05 2.0928626557075606e-06 1.5632037328512312e-06 -2.7335717313450097e-07 -7.2126792356200426e-09 9.213093725547886e-09 4.186629643010996e-08 8.198811769753182e-08 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0001028691918645833 0.0002737040057685444 0.0003861446001781946 0.0004042287651515365 0.0017229200225725174 0.003198296698131205 0.008774096120579751 0.011237818178923189 0.004334800036723805 0.0007344916552783145 -0.0001506915192259342 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.01652594711887213 0.011725805945708163 0.011173124362203699 0.0024178633067081135 -0.01796173780303683 -0.011618890946870497 -0.0008528234196397706 -9.706084806556783e-05 -2.754043401157181e-06 0.0001324948483342069 5.482811058752758e-05 0.0003886706609323921 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.00022640297379380707 -0.0005111351623843819 0.0002024994190007784 0.00044921539785371963 0.001393999756415734 0.0011754659552919043 7.761533188706794e-05 5.8170561410888746e-05 -1.0918989217761552e-05 -2.9455190099531973e-07 2.0845708467284646e-07 1.0072947935068441e-06 2.449241542240889e-06 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0016181071043329578 0.003179470547568356 0.008661622548635572 0.011071785334468471 0.004294892778359652 0.0017845979744737465 0.0034643761195723064 0.015112039067322293 0.022192108732694595 0.008134230944897397 0.0007595380961610584 1.6727218309602107e-05 0.00012823915020345735 0.0001971442066043176 0.0 0.0 0.0 0.0 0.0
|
||||
0.00033854327480422193 0.0032940012133255356 0.008932075729876752 0.012661798131960687 0.013919159699477152 0.08208818801401566 0.15644219608737447 0.4341503084393359 0.557964838826116 0.21173866865770563 0.03478604116524652 -0.007972916161324952 -0.0007132020154210059 0.0004420932693293155 0.0003860741867263207 0.0 0.0 0.0 0.0
|
||||
0.0005943091729493132 0.0009672866630600067 0.009096489467732383 0.01304005169719466 0.01734885651081947 0.1652472792755658 0.44880261475702005 0.6329167707872334 0.5244926606398645 0.26270394857828266 -0.10487776273847933 -0.05845317239353218 0.0032135333670803676 0.003777214235598332 0.0007681993725802362 0.00011959437074006901 0.0 0.0 0.0
|
||||
6.489304732024981e-05 0.0011748014116558024 0.014162497237899634 0.024470256017495366 0.046651858009005745 0.46415330969555396 0.6536160620847673 0.38295932353650225 0.39318393240673155 0.2877811024545165 0.03747496490739291 0.2654106688863148 0.074634565935104 0.012330295300167044 -0.0004996457463809098 0.00023089219471653216 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
1.4231393739579515e-06 3.630746449160232e-07 9.318604659023228e-07 4.92311430374376e-07 -3.701479331898353e-09 2.1280257031614452e-07 1.2240989510544568e-06 5.3432540178806065e-06 2.043230389835189e-06 3.2740024159475547e-07 6.717304982644579e-07 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
-1.2482511756156149e-05 1.365124801275985e-05 1.3894049203809568e-05 2.3985465221727954e-05 3.3458449092465795e-05 0.00028172299406359233 0.00040056109827889085 0.0004621959325200118 0.0034637215474633033 0.009153352872912168 0.012804683731760212 0.010674833967812809 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.008855607599180339 0.015278371659152929 0.0023879884417463693 0.000935102721182137 0.0034651523786104546 0.005282714096158778 0.0012741283037854573 0.006268847413803995 0.004013755514818873 0.010363477891131097 0.007109323912817858 -0.0002600093944564617 -0.00034633976332068713 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
5.3159155089314414e-05 1.2012438398909825e-05 3.274115317951001e-05 1.689353008824745e-05 -4.232110203859359e-07 7.656160171407207e-06 5.754938338062256e-05 0.0002687156220968384 9.768544317740195e-05 1.0129360414562531e-05 2.293272526112481e-05 1.8260890221186993e-05 1.7288534885724222e-06 1.8856324749638164e-06 0.0 0.0 0.0 0.0 0.0
|
||||
0.00033854327480422193 0.0032940012133255356 0.008932075729876752 0.012661798131960687 0.013919159699477152 0.08208818801401566 0.15644219608737447 0.4341503084393359 0.557964838826116 0.21173866865770563 0.03478604116524652 -0.007972916161324952 -0.0007132020154210059 0.0004420932693293155 0.0003860741867263207 0.0 0.0 0.0 0.0
|
||||
0.00018639122271027446 0.0034767153815636618 0.018231622622978436 0.0042988446466234575 0.05300133577632108 0.7250033316881788 0.4935009383219143 0.42606157195551264 1.5039118559972142 1.2303936880370434 0.22548363428435172 -0.30298333788301807 -0.13073656424500055 -0.010403074319359695 0.005059645288601829 0.0015181780063355998 0.0 0.0 0.0
|
||||
0.0005854549915295117 0.008715343377777027 0.015086646356161998 0.00551449475752511 0.16771008674532747 0.9262472909137329 0.16287454314633398 0.10026082406557575 0.8138824998965698 0.5734788502649438 0.5447903546528722 0.10618098607332271 -0.9103493511412221 -0.576660316279193 -0.03402023384277208 -0.0031478924709104684 0.0 0.0 0.0
|
||||
-0.00011090752856021898 0.0043805342288213535 0.0016927729283659975 0.012954305343473369 0.4368797400066579 0.7614408833500013 0.10944765261392181 0.0412051224385603 0.15805652281823218 0.2585893276179897 0.05949650977132904 0.30356693149425945 0.19493804255113664 0.5122323478146567 0.35279041052227494 -0.007488446744915854 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 5.196157077391817e-07 6.938124100654148e-08 7.597564197383545e-08 1.863740632660483e-07 4.437837629589167e-07 5.453941063185757e-07 1.5602917821833568e-06 3.404289212094662e-07 9.967447994956849e-07 5.8845599651090215e-06 1.5052240335012455e-05 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.005346497059990333 -0.002010348201210142 -0.0010943235863089423 0.0001661513182702165 0.00012025969610516196 2.4949866002221845e-05 6.627236360802077e-06 3.003757825105864e-06 3.997348910159012e-05 0.000427961841918743 0.0007451357800599296 0.0011219432594133996 0.009685550613014016 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
-2.698386662730078e-05 2.754973422173369e-07 0.0001320534807487939 0.004372176148977807 0.0015642026255259442 0.004248632573013906 0.00040885420395593786 0.001088966135412402 0.004766232525411325 0.002205157762668968 0.007459939889093756 0.005587608653898612 -0.004720162133268877 -0.006593174803103767 0.0 0.0 0.0 0.0 0.0
|
||||
4.542360076931743e-06 1.2329326209575631e-05 1.7173803033436737e-05 5.0102066463061734e-05 1.09067765324765e-05 4.930240898900306e-05 0.00028721835291257015 0.0007503332386451459 0.00015238128535605624 -6.391111549761724e-05 -4.677072820313549e-06 -5.572104125200205e-06 2.707663268609677e-05 5.022846595129856e-05 0.00012970076559689836 0.0 0.0 0.0 0.0
|
||||
0.0005943091729493132 0.0009672866630600067 0.009096489467732383 0.01304005169719466 0.01734885651081947 0.1652472792755658 0.44880261475702005 0.6329167707872334 0.5244926606398645 0.26270394857828266 -0.10487776273847933 -0.05845317239353218 0.0032135333670803676 0.003777214235598332 0.0007681993725802362 0.00011959437074006901 0.0 0.0 0.0
|
||||
0.0005854549915295117 0.008715343377777027 0.015086646356161998 0.00551449475752511 0.16771008674532747 0.9262472909137329 0.16287454314633398 0.10026082406557575 0.8138824998965698 0.5734788502649438 0.5447903546528722 0.10618098607332271 -0.9103493511412221 -0.576660316279193 -0.03402023384277208 -0.0031478924709104684 0.0 0.0 0.0
|
||||
-0.011510449622067839 -0.0007610595804959427 1.0172131902385016e-05 0.00448473230635448 0.2199020425072735 0.07466247888373397 0.21339517449435372 0.013531084627798973 0.04473458040783101 0.2378714243611067 0.10478901497777 0.37112701147924365 0.27817806337533985 -0.2385293501359752 -0.33578482057600856 -0.004009555340792723 0.0 0.0 0.0
|
||||
4.1934884152796484e-05 0.0035902058234846823 0.0005824017329515572 0.01441762880686721 0.6293209695433368 0.09572421881003676 0.08586090788885907 0.031601835145355577 0.06121858995657405 0.07315778164682188 -0.0013308261229131521 0.012882908917780034 0.13273058077548822 0.2035107778991338 0.1961396131043037 -0.04170252478795313 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 3.196534127251379e-06 -1.1872677866681306e-06 -2.5678892066098854e-08 5.139117071436217e-09 1.1142431390092631e-06 2.0605776537608227e-06 5.297265009242829e-06 6.713907186544732e-06 2.7028644452395994e-06 1.149242737988068e-06 2.2449682976927855e-06 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.013431011504370738 0.007883426617122005 0.007935899204760883 0.005880150773602205 0.0009832099103910489 0.005414528729313218 0.0015950126575825377 0.00024127039666882992 -1.5674461809944553e-05 1.0711548076574028e-05 7.830483572860064e-06 0.00011012649333888752 0.0005497452692208139 0.0 0.0 0.0 0.0 0.0
|
||||
-7.940872165606751e-05 2.276762148612182e-06 0.00010635762128769112 2.049233578255131e-05 0.00042145671490654473 0.01249692872936893 0.0020370917425772224 0.0017316344055948985 0.0006574004028558345 0.0012283310563930355 0.0014629455315045585 -4.492954039177435e-06 0.00029547002108771967 0.002683727758662211 0.004096710661285439 0.0 0.0 0.0 0.0
|
||||
0.0001650881267658455 6.548635015912796e-05 3.282822556024051e-05 7.205996516588195e-05 0.00030710620226134084 0.0007279352507540159 0.000909918529220897 0.0017257383928761386 0.00047543969768972346 -0.00030462814537952123 2.7321207199326783e-05 0.00010130812246147248 5.4817489360932934e-05 0.00012640103175376577 0.00018995742264027741 0.00023929212126678798 0.0 0.0 0.0
|
||||
6.489304732024981e-05 0.0011748014116558024 0.014162497237899634 0.024470256017495366 0.046651858009005745 0.46415330969555396 0.6536160620847673 0.38295932353650225 0.39318393240673155 0.2877811024545165 0.03747496490739291 0.2654106688863148 0.074634565935104 0.012330295300167044 -0.0004996457463809098 0.00023089219471653216 0.0 0.0 0.0
|
||||
-0.00011090752856021898 0.0043805342288213535 0.0016927729283659975 0.012954305343473369 0.4368797400066579 0.7614408833500013 0.10944765261392181 0.0412051224385603 0.15805652281823218 0.2585893276179897 0.05949650977132904 0.30356693149425945 0.19493804255113664 0.5122323478146567 0.35279041052227494 -0.007488446744915854 0.0 0.0 0.0
|
||||
4.1934884152796484e-05 0.0035902058234846823 0.0005824017329515572 0.01441762880686721 0.6293209695433368 0.09572421881003676 0.08586090788885907 0.031601835145355577 0.06121858995657405 0.07315778164682188 -0.0013308261229131521 0.012882908917780034 0.13273058077548822 0.2035107778991338 0.1961396131043037 -0.04170252478795313 0.0 0.0 0.0
|
||||
-0.0008465335016788498 -9.208409992139663e-05 -1.1210629044433908e-05 0.004300763141885697 0.1800503541691201 0.016819879476467067 0.060737350690215776 0.042330087306607714 0.0007006095666399378 0.02251352126872946 0.011185142175963118 -0.02716513333374441 0.00952941322650142 0.02210443704516212 0.07011148238258197 0.057840211345517194 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
#
|
||||
@ -118,4 +118,5 @@ sw Stillinger-Weber potential
|
||||
tersoff Tersoff potential
|
||||
tersoff.mod modified Tersoff potential
|
||||
tersoff.zbl Tersoff with ZBL core
|
||||
uf3 UF3 potential
|
||||
vashishta Vashishta 2-body and 3-body potential
|
||||
|
||||
11
src/.gitignore
vendored
11
src/.gitignore
vendored
@ -169,6 +169,17 @@
|
||||
/rann_*.cpp
|
||||
/rann_*.h
|
||||
|
||||
/pair_uf3.cpp
|
||||
/pair_uf3.h
|
||||
/uf3_bspline_basis2.cpp
|
||||
/uf3_bspline_basis2.h
|
||||
/uf3_bspline_basis3.cpp
|
||||
/uf3_bspline_basis3.h
|
||||
/uf3_pair_bspline.cpp
|
||||
/uf3_pair_bspline.h
|
||||
/uf3_triplet_bspline.cpp
|
||||
/uf3_triplet_bspline.h
|
||||
|
||||
/compute_test_nbl.cpp
|
||||
/compute_test_nbl.h
|
||||
/pair_multi_lucy.cpp
|
||||
|
||||
@ -352,19 +352,32 @@ void BondBPM::process_broken(int i, int j)
|
||||
{
|
||||
if (!break_flag)
|
||||
error->one(FLERR, "BPM bond broke with break no option");
|
||||
if (fix_store_local) {
|
||||
for (int n = 0; n < nvalues; n++) (this->*pack_choice[n])(n, i, j);
|
||||
|
||||
int nlocal = atom->nlocal;
|
||||
if (fix_store_local) {
|
||||
// If newton off, bond can break on two procs so only record if proc owns lower tag
|
||||
// (BPM bond styles should sort so i -> atom with lower tag)
|
||||
if (force->newton_bond || (i < nlocal)) {
|
||||
for (int n = 0; n < nvalues; n++) (this->*pack_choice[n])(n, i, j);
|
||||
fix_store_local->add_data(output_data, i, j);
|
||||
}
|
||||
}
|
||||
|
||||
if (fix_update_special_bonds) fix_update_special_bonds->add_broken_bond(i, j);
|
||||
if (fix_update_special_bonds) {
|
||||
// If this processor owns two copies of the bond (i.e. if the domain is periodic and 1 proc thick),
|
||||
// skip instance where larger tag (j) owned
|
||||
int check = 1;
|
||||
if (i >= nlocal) {
|
||||
int imap = atom->map(atom->tag[i]);
|
||||
if (imap < nlocal) check = 0;
|
||||
}
|
||||
if (check) fix_update_special_bonds->add_broken_bond(i, j);
|
||||
}
|
||||
|
||||
// Manually search and remove from atom arrays
|
||||
// need to remove in case special bonds arrays rebuilt
|
||||
int m, n;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
int m, n;
|
||||
tagint *tag = atom->tag;
|
||||
tagint **bond_atom = atom->bond_atom;
|
||||
int **bond_type = atom->bond_type;
|
||||
|
||||
@ -65,14 +65,13 @@ void ComputeNBondAtom::compute_peratom()
|
||||
tagint **bond_atom = atom->bond_atom;
|
||||
int **bond_type = atom->bond_type;
|
||||
|
||||
int ntotal = nlocal;
|
||||
if (force->newton) ntotal += atom->nghost;
|
||||
|
||||
// set local nbond array
|
||||
int i, j, k;
|
||||
int *num_bond = atom->num_bond;
|
||||
int newton_bond = force->newton_bond;
|
||||
|
||||
int ntotal = nlocal;
|
||||
if (newton_bond) ntotal += atom->nghost;
|
||||
for (i = 0; i < ntotal; i++) nbond[i] = 0;
|
||||
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
@ -88,7 +87,7 @@ void ComputeNBondAtom::compute_peratom()
|
||||
}
|
||||
|
||||
// communicate ghost nbond between neighbor procs
|
||||
if (force->newton) comm->reverse_comm(this);
|
||||
if (newton_bond) comm->reverse_comm(this);
|
||||
|
||||
// zero nbond of atoms not in group
|
||||
// only do this after comm since ghost contributions must be included
|
||||
|
||||
@ -100,6 +100,7 @@ void FixUpdateSpecialBonds::pre_exchange()
|
||||
n1 = nspecial[i][0];
|
||||
for (m = 0; m < n1; m++)
|
||||
if (slist[m] == tagj) break;
|
||||
if (m == n1) error->one(FLERR, "Special bond {} {} not found", tagi, tagj);
|
||||
for (; m < n1 - 1; m++) slist[m] = slist[m + 1];
|
||||
nspecial[i][0]--;
|
||||
nspecial[i][1] = nspecial[i][2] = nspecial[i][0];
|
||||
@ -110,6 +111,7 @@ void FixUpdateSpecialBonds::pre_exchange()
|
||||
n1 = nspecial[j][0];
|
||||
for (m = 0; m < n1; m++)
|
||||
if (slist[m] == tagi) break;
|
||||
if (m == n1) error->one(FLERR, "Special bond {} {} not found", tagi, tagj);
|
||||
for (; m < n1 - 1; m++) slist[m] = slist[m + 1];
|
||||
nspecial[j][0]--;
|
||||
nspecial[j][1] = nspecial[j][2] = nspecial[j][0];
|
||||
|
||||
@ -156,6 +156,7 @@ double GranSubModDampingTsuji::calculate_forces()
|
||||
GranSubModDampingCoeffRestitution::GranSubModDampingCoeffRestitution(GranularModel *gm, LAMMPS *lmp) :
|
||||
GranSubModDamping(gm, lmp)
|
||||
{
|
||||
allow_cohesion = 0;
|
||||
}
|
||||
|
||||
void GranSubModDampingCoeffRestitution::init()
|
||||
@ -173,6 +174,12 @@ void GranSubModDampingCoeffRestitution::init()
|
||||
|
||||
double GranSubModDampingCoeffRestitution::calculate_forces()
|
||||
{
|
||||
damp_prefactor = damp * sqrt(gm->meff * gm->Fnormal / gm->delta);
|
||||
// in case argument <= 0 due to precision issues
|
||||
double sqrt1;
|
||||
if (gm->delta > 0.0)
|
||||
sqrt1 = MAX(0.0, gm->meff * gm->Fnormal / gm->delta);
|
||||
else
|
||||
sqrt1 = 0.0;
|
||||
damp_prefactor = damp * sqrt(sqrt1);
|
||||
return -damp_prefactor * gm->vnnr;
|
||||
}
|
||||
|
||||
@ -74,9 +74,13 @@ void NPairSkipIntel::build_t(NeighList *list, int *numhalf, int *cnumneigh,
|
||||
const int nlocal = atom->nlocal;
|
||||
const int e_nall = nlocal + atom->nghost;
|
||||
const int * _noalias const type = atom->type;
|
||||
const tagint * _noalias const molecule = atom->molecule;
|
||||
|
||||
int * _noalias const ilist = list->ilist;
|
||||
int * _noalias const numneigh = list->numneigh;
|
||||
int ** _noalias const firstneigh = (int ** const)list->firstneigh; // NOLINT
|
||||
const int molskip = list->molskip;
|
||||
|
||||
const int * _noalias const ilist_skip = list->listskip->ilist;
|
||||
const int * _noalias const numneigh_skip = list->listskip->numneigh;
|
||||
const int ** _noalias const firstneigh_skip = (const int ** const)list->listskip->firstneigh; // NOLINT
|
||||
@ -110,7 +114,7 @@ void NPairSkipIntel::build_t(NeighList *list, int *numhalf, int *cnumneigh,
|
||||
for (int ii = ifrom; ii < ito; ii++) {
|
||||
const int i = ilist_skip[ii];
|
||||
const int itype = type[i];
|
||||
if (iskip[itype]) continue;
|
||||
if (!molskip && iskip[itype]) continue;
|
||||
|
||||
int n = 0;
|
||||
int *neighptr = ipage.vget();
|
||||
@ -142,7 +146,11 @@ void NPairSkipIntel::build_t(NeighList *list, int *numhalf, int *cnumneigh,
|
||||
for (int jj = 0; jj < jnum; jj++) {
|
||||
const int joriginal = jlist[jj];
|
||||
const int j = joriginal & NEIGHMASK;
|
||||
if (!ijskip[itype][type[j]]) neighptr[n++] = joriginal;
|
||||
if (!molskip && ijskip[itype][type[j]]) continue;
|
||||
if ((molskip == NeighRequest::INTRA) && (molecule[i] != molecule[j])) continue;
|
||||
if ((molskip == NeighRequest::INTER) && (molecule[i] == molecule[j])) continue;
|
||||
|
||||
neighptr[n++] = joriginal;
|
||||
}
|
||||
}
|
||||
|
||||
@ -269,9 +277,13 @@ void NPairSkipTrimIntel::build_t(NeighList *list, int *numhalf, int *cnumneigh,
|
||||
const int e_nall = nlocal + atom->nghost;
|
||||
const ATOM_T * _noalias const x = buffers->get_x();
|
||||
const int * _noalias const type = atom->type;
|
||||
const tagint * _noalias const molecule = atom->molecule;
|
||||
|
||||
int * _noalias const ilist = list->ilist;
|
||||
int * _noalias const numneigh = list->numneigh;
|
||||
int ** _noalias const firstneigh = (int ** const)list->firstneigh; // NOLINT
|
||||
const int molskip = list->molskip;
|
||||
|
||||
const int * _noalias const ilist_skip = list->listskip->ilist;
|
||||
const int * _noalias const numneigh_skip = list->listskip->numneigh;
|
||||
const int ** _noalias const firstneigh_skip = (const int ** const)list->listskip->firstneigh; // NOLINT
|
||||
@ -306,7 +318,7 @@ void NPairSkipTrimIntel::build_t(NeighList *list, int *numhalf, int *cnumneigh,
|
||||
for (int ii = ifrom; ii < ito; ii++) {
|
||||
const int i = ilist_skip[ii];
|
||||
const int itype = type[i];
|
||||
if (iskip[itype]) continue;
|
||||
if (!molskip && iskip[itype]) continue;
|
||||
|
||||
const flt_t xtmp = x[i].x;
|
||||
const flt_t ytmp = x[i].y;
|
||||
@ -370,7 +382,9 @@ void NPairSkipTrimIntel::build_t(NeighList *list, int *numhalf, int *cnumneigh,
|
||||
const int j = joriginal & NEIGHMASK;
|
||||
|
||||
int addme = 1;
|
||||
if (ijskip[itype][type[j]]) addme = 0;
|
||||
if (!molskip && ijskip[itype][type[j]]) addme = 0;
|
||||
if ((molskip == NeighRequest::INTRA) && (molecule[i] != molecule[j])) addme = 0;
|
||||
if ((molskip == NeighRequest::INTER) && (molecule[i] == molecule[j])) addme = 0;
|
||||
|
||||
// trim to shorter cutoff
|
||||
|
||||
|
||||
@ -365,6 +365,8 @@ action pair_reaxff_kokkos.h pair_reaxff.h
|
||||
action pair_snap_kokkos_impl.h pair_snap.cpp
|
||||
action pair_snap_kokkos.cpp pair_snap.cpp
|
||||
action pair_snap_kokkos.h pair_snap.h
|
||||
action pair_soft_kokkos.cpp
|
||||
action pair_soft_kokkos.h
|
||||
action pair_sw_kokkos.cpp pair_sw.cpp
|
||||
action pair_sw_kokkos.h pair_sw.h
|
||||
action pair_table_kokkos.cpp
|
||||
|
||||
255
src/KOKKOS/pair_soft_kokkos.cpp
Normal file
255
src/KOKKOS/pair_soft_kokkos.cpp
Normal file
@ -0,0 +1,255 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
LAMMPS development team: developers@lammps.org
|
||||
|
||||
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.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "pair_soft_kokkos.h"
|
||||
|
||||
#include "atom_kokkos.h"
|
||||
#include "atom_masks.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "kokkos.h"
|
||||
#include "math_const.h"
|
||||
#include "memory_kokkos.h"
|
||||
#include "neigh_request.h"
|
||||
#include "neighbor.h"
|
||||
#include "respa.h"
|
||||
#include "update.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
template<class DeviceType>
|
||||
PairSoftKokkos<DeviceType>::PairSoftKokkos(LAMMPS *lmp) : PairSoft(lmp)
|
||||
{
|
||||
respa_enable = 0;
|
||||
|
||||
kokkosable = 1;
|
||||
atomKK = (AtomKokkos *) atom;
|
||||
execution_space = ExecutionSpaceFromDevice<DeviceType>::space;
|
||||
datamask_read = X_MASK | F_MASK | TYPE_MASK | ENERGY_MASK | VIRIAL_MASK;
|
||||
datamask_modify = F_MASK | ENERGY_MASK | VIRIAL_MASK;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
template<class DeviceType>
|
||||
PairSoftKokkos<DeviceType>::~PairSoftKokkos()
|
||||
{
|
||||
if (copymode) return;
|
||||
|
||||
if (allocated) {
|
||||
memoryKK->destroy_kokkos(k_eatom,eatom);
|
||||
memoryKK->destroy_kokkos(k_vatom,vatom);
|
||||
memoryKK->destroy_kokkos(k_cutsq,cutsq);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
template<class DeviceType>
|
||||
void PairSoftKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||
{
|
||||
eflag = eflag_in;
|
||||
vflag = vflag_in;
|
||||
|
||||
if (neighflag == FULL) no_virial_fdotr_compute = 1;
|
||||
|
||||
ev_init(eflag,vflag,0);
|
||||
|
||||
// reallocate per-atom arrays if necessary
|
||||
|
||||
if (eflag_atom) {
|
||||
memoryKK->destroy_kokkos(k_eatom,eatom);
|
||||
memoryKK->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom");
|
||||
d_eatom = k_eatom.view<DeviceType>();
|
||||
}
|
||||
if (vflag_atom) {
|
||||
memoryKK->destroy_kokkos(k_vatom,vatom);
|
||||
memoryKK->create_kokkos(k_vatom,vatom,maxvatom,"pair:vatom");
|
||||
d_vatom = k_vatom.view<DeviceType>();
|
||||
}
|
||||
|
||||
atomKK->sync(execution_space,datamask_read);
|
||||
k_cutsq.template sync<DeviceType>();
|
||||
k_params.template sync<DeviceType>();
|
||||
if (eflag || vflag) atomKK->modified(execution_space,datamask_modify);
|
||||
else atomKK->modified(execution_space,F_MASK);
|
||||
|
||||
x = atomKK->k_x.view<DeviceType>();
|
||||
c_x = atomKK->k_x.view<DeviceType>();
|
||||
f = atomKK->k_f.view<DeviceType>();
|
||||
type = atomKK->k_type.view<DeviceType>();
|
||||
nlocal = atom->nlocal;
|
||||
nall = atom->nlocal + atom->nghost;
|
||||
newton_pair = force->newton_pair;
|
||||
special_lj[0] = force->special_lj[0];
|
||||
special_lj[1] = force->special_lj[1];
|
||||
special_lj[2] = force->special_lj[2];
|
||||
special_lj[3] = force->special_lj[3];
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
||||
copymode = 1;
|
||||
|
||||
EV_FLOAT ev = pair_compute<PairSoftKokkos<DeviceType>,void >(this,(NeighListKokkos<DeviceType>*)list);
|
||||
|
||||
if (eflag_global) eng_vdwl += ev.evdwl;
|
||||
if (vflag_global) {
|
||||
virial[0] += ev.v[0];
|
||||
virial[1] += ev.v[1];
|
||||
virial[2] += ev.v[2];
|
||||
virial[3] += ev.v[3];
|
||||
virial[4] += ev.v[4];
|
||||
virial[5] += ev.v[5];
|
||||
}
|
||||
|
||||
if (eflag_atom) {
|
||||
k_eatom.template modify<DeviceType>();
|
||||
k_eatom.template sync<LMPHostType>();
|
||||
}
|
||||
|
||||
if (vflag_atom) {
|
||||
k_vatom.template modify<DeviceType>();
|
||||
k_vatom.template sync<LMPHostType>();
|
||||
}
|
||||
|
||||
if (vflag_fdotr) pair_virial_fdotr_compute(this);
|
||||
|
||||
copymode = 0;
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
template<bool STACKPARAMS, class Specialisation>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
F_FLOAT PairSoftKokkos<DeviceType>::
|
||||
compute_fpair(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const {
|
||||
(void) i;
|
||||
const F_FLOAT r = sqrt(rsq);
|
||||
const F_FLOAT cut_ij = STACKPARAMS?m_params[itype][jtype].cut:params(itype,jtype).cut;
|
||||
const F_FLOAT prefactor_ij = STACKPARAMS?m_params[itype][jtype].prefactor:params(itype,jtype).prefactor;
|
||||
const F_FLOAT arg = MY_PI*r/cut_ij;
|
||||
|
||||
F_FLOAT fpair = 0.0;
|
||||
if (r > 0.0) fpair = prefactor_ij *
|
||||
sin(arg) * MY_PI/cut_ij/r;
|
||||
|
||||
return fpair;
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
template<bool STACKPARAMS, class Specialisation>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
F_FLOAT PairSoftKokkos<DeviceType>::
|
||||
compute_evdwl(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const {
|
||||
(void) i;
|
||||
const F_FLOAT r = sqrt(rsq);
|
||||
const F_FLOAT cut_ij = STACKPARAMS?m_params[itype][jtype].cut:params(itype,jtype).cut;
|
||||
const F_FLOAT prefactor_ij = STACKPARAMS?m_params[itype][jtype].prefactor:params(itype,jtype).prefactor;
|
||||
const F_FLOAT arg = MY_PI*r/cut_ij;
|
||||
|
||||
return prefactor_ij*(1.0+cos(arg));
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
allocate all arrays
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
template<class DeviceType>
|
||||
void PairSoftKokkos<DeviceType>::allocate()
|
||||
{
|
||||
PairSoft::allocate();
|
||||
|
||||
int n = atom->ntypes;
|
||||
memory->destroy(cutsq);
|
||||
memoryKK->create_kokkos(k_cutsq,cutsq,n+1,n+1,"pair:cutsq");
|
||||
d_cutsq = k_cutsq.template view<DeviceType>();
|
||||
k_params = Kokkos::DualView<params_soft**,Kokkos::LayoutRight,DeviceType>("PairSoft::params",n+1,n+1);
|
||||
params = k_params.template view<DeviceType>();
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
global settings
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
template<class DeviceType>
|
||||
void PairSoftKokkos<DeviceType>::settings(int narg, char **arg)
|
||||
{
|
||||
if (narg > 2) error->all(FLERR,"Illegal pair_style command");
|
||||
|
||||
PairSoft::settings(1,arg);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
init specific to this pair style
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
template<class DeviceType>
|
||||
void PairSoftKokkos<DeviceType>::init_style()
|
||||
{
|
||||
PairSoft::init_style();
|
||||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
if (respa)
|
||||
error->all(FLERR,"Cannot use Kokkos pair style with rRESPA inner/middle");
|
||||
}
|
||||
|
||||
// adjust neighbor list request for KOKKOS
|
||||
|
||||
neighflag = lmp->kokkos->neighflag;
|
||||
auto request = neighbor->find_request(this);
|
||||
request->set_kokkos_host(std::is_same_v<DeviceType,LMPHostType> &&
|
||||
!std::is_same_v<DeviceType,LMPDeviceType>);
|
||||
request->set_kokkos_device(std::is_same_v<DeviceType,LMPDeviceType>);
|
||||
if (neighflag == FULL) request->enable_full();
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
init for one type pair i,j and corresponding j,i
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
template<class DeviceType>
|
||||
double PairSoftKokkos<DeviceType>::init_one(int i, int j)
|
||||
{
|
||||
double cutone = PairSoft::init_one(i,j);
|
||||
|
||||
k_params.h_view(i,j).prefactor = prefactor[i][j];
|
||||
k_params.h_view(i,j).cut = cutone;
|
||||
k_params.h_view(i,j).cutsq = cutone*cutone;
|
||||
k_params.h_view(j,i) = k_params.h_view(i,j);
|
||||
if (i<MAX_TYPES_STACKPARAMS+1 && j<MAX_TYPES_STACKPARAMS+1) {
|
||||
m_params[i][j] = m_params[j][i] = k_params.h_view(i,j);
|
||||
m_cutsq[j][i] = m_cutsq[i][j] = cutone*cutone;
|
||||
}
|
||||
|
||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||
k_cutsq.template modify<LMPHostType>();
|
||||
k_params.template modify<LMPHostType>();
|
||||
|
||||
return cutone;
|
||||
}
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
template class PairSoftKokkos<LMPDeviceType>;
|
||||
#ifdef LMP_KOKKOS_GPU
|
||||
template class PairSoftKokkos<LMPHostType>;
|
||||
#endif
|
||||
}
|
||||
|
||||
114
src/KOKKOS/pair_soft_kokkos.h
Normal file
114
src/KOKKOS/pair_soft_kokkos.h
Normal file
@ -0,0 +1,114 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
LAMMPS development team: developers@lammps.org
|
||||
|
||||
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.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
// clang-format off
|
||||
PairStyle(soft/kk,PairSoftKokkos<LMPDeviceType>);
|
||||
PairStyle(soft/kk/device,PairSoftKokkos<LMPDeviceType>);
|
||||
PairStyle(soft/kk/host,PairSoftKokkos<LMPHostType>);
|
||||
// clang-format on
|
||||
#else
|
||||
|
||||
// clang-format off
|
||||
#ifndef LMP_PAIR_SOFT_KOKKOS_H
|
||||
#define LMP_PAIR_SOFT_KOKKOS_H
|
||||
|
||||
#include "pair_kokkos.h"
|
||||
#include "pair_soft.h"
|
||||
#include "neigh_list_kokkos.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
template<class DeviceType>
|
||||
class PairSoftKokkos : public PairSoft {
|
||||
public:
|
||||
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF};
|
||||
enum {COUL_FLAG=0};
|
||||
typedef DeviceType device_type;
|
||||
typedef ArrayTypes<DeviceType> AT;
|
||||
PairSoftKokkos(class LAMMPS *);
|
||||
~PairSoftKokkos() override;
|
||||
|
||||
void compute(int, int) override;
|
||||
|
||||
void settings(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
|
||||
struct params_soft{
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
params_soft() {cutsq=0,cut=0,prefactor=0;};
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
params_soft(int /*i*/) {cutsq=0,cut=0,prefactor=0;};
|
||||
F_FLOAT cutsq,cut,prefactor;
|
||||
};
|
||||
|
||||
protected:
|
||||
template<bool STACKPARAMS, class Specialisation>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
F_FLOAT compute_fpair(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const;
|
||||
|
||||
template<bool STACKPARAMS, class Specialisation>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
F_FLOAT compute_evdwl(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const;
|
||||
|
||||
template<bool STACKPARAMS, class Specialisation>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
F_FLOAT compute_ecoul(const F_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/,
|
||||
const int& /*itype*/, const int& /*jtype*/) const { return 0; }
|
||||
|
||||
Kokkos::DualView<params_soft**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||
typename Kokkos::DualView<params_soft**,Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||
params_soft m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 12 atom types
|
||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||
typename AT::t_x_array_randomread x;
|
||||
typename AT::t_x_array c_x;
|
||||
typename AT::t_f_array f;
|
||||
typename AT::t_int_1d_randomread type;
|
||||
|
||||
DAT::tdual_efloat_1d k_eatom;
|
||||
DAT::tdual_virial_array k_vatom;
|
||||
typename AT::t_efloat_1d d_eatom;
|
||||
typename AT::t_virial_array d_vatom;
|
||||
|
||||
int newton_pair;
|
||||
double special_lj[4];
|
||||
|
||||
typename AT::tdual_ffloat_2d k_cutsq;
|
||||
typename AT::t_ffloat_2d d_cutsq;
|
||||
|
||||
int neighflag;
|
||||
int nlocal,nall,eflag,vflag;
|
||||
|
||||
void allocate() override;
|
||||
friend struct PairComputeFunctor<PairSoftKokkos,FULL,true,0>;
|
||||
friend struct PairComputeFunctor<PairSoftKokkos,FULL,true,1>;
|
||||
friend struct PairComputeFunctor<PairSoftKokkos,HALF,true>;
|
||||
friend struct PairComputeFunctor<PairSoftKokkos,HALFTHREAD,true>;
|
||||
friend struct PairComputeFunctor<PairSoftKokkos,FULL,false,0>;
|
||||
friend struct PairComputeFunctor<PairSoftKokkos,FULL,false,1>;
|
||||
friend struct PairComputeFunctor<PairSoftKokkos,HALF,false>;
|
||||
friend struct PairComputeFunctor<PairSoftKokkos,HALFTHREAD,false>;
|
||||
friend EV_FLOAT pair_compute_neighlist<PairSoftKokkos,FULL,0>(PairSoftKokkos*,NeighListKokkos<DeviceType>*);
|
||||
friend EV_FLOAT pair_compute_neighlist<PairSoftKokkos,FULL,1>(PairSoftKokkos*,NeighListKokkos<DeviceType>*);
|
||||
friend EV_FLOAT pair_compute_neighlist<PairSoftKokkos,HALF>(PairSoftKokkos*,NeighListKokkos<DeviceType>*);
|
||||
friend EV_FLOAT pair_compute_neighlist<PairSoftKokkos,HALFTHREAD>(PairSoftKokkos*,NeighListKokkos<DeviceType>*);
|
||||
friend EV_FLOAT pair_compute<PairSoftKokkos>(PairSoftKokkos*,NeighListKokkos<DeviceType>*);
|
||||
friend void pair_virial_fdotr_compute<PairSoftKokkos>(PairSoftKokkos*);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
1661
src/KOKKOS/pair_uf3_kokkos.cpp
Normal file
1661
src/KOKKOS/pair_uf3_kokkos.cpp
Normal file
File diff suppressed because it is too large
Load Diff
187
src/KOKKOS/pair_uf3_kokkos.h
Normal file
187
src/KOKKOS/pair_uf3_kokkos.h
Normal file
@ -0,0 +1,187 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
LAMMPS development team: developers@lammps.org
|
||||
|
||||
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 author: Ajinkya Hire (Univ. of Florida),
|
||||
Hendrik Kraß (Univ. of Constance),
|
||||
Matthias Rupp (Luxembourg Institute of Science and Technology),
|
||||
Richard Hennig (Univ of Florida)
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
// clang-format off
|
||||
PairStyle(uf3/kk,PairUF3Kokkos<LMPDeviceType>)
|
||||
PairStyle(uf3/kk/device,PairUF3Kokkos<LMPDeviceType>)
|
||||
// clang-format on
|
||||
#else
|
||||
|
||||
#ifndef LMP_PAIR_UF3_KOKKOS_H
|
||||
#define LMP_PAIR_UF3_KOKKOS_H
|
||||
|
||||
#include "kokkos.h"
|
||||
#include "pair_kokkos.h"
|
||||
#include "pair_uf3.h"
|
||||
|
||||
template <int NEIGHFLAG, int EVFLAG> struct TagPairUF3ComputeFullA {};
|
||||
struct TagPairUF3ComputeShortNeigh {};
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
template <class DeviceType> class PairUF3Kokkos : public PairUF3 {
|
||||
public:
|
||||
PairUF3Kokkos(class LAMMPS *);
|
||||
~PairUF3Kokkos() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void allocate();
|
||||
void init_style() override;
|
||||
void init_list(int, class NeighList *) override; // needed for ptr to full neigh list
|
||||
double init_one(int, int) override; // needed for cutoff radius for neighbour list
|
||||
double single(int, int, int, int, double, double, double, double &) override;
|
||||
|
||||
template <typename T, typename V> void copy_2d(V &d, T **h, int m, int n);
|
||||
template <typename T, typename V> void copy_3d(V &d, T ***h, int m, int n, int o);
|
||||
|
||||
template <int NEIGHFLAG, int EVFLAG>
|
||||
KOKKOS_INLINE_FUNCTION void operator()(TagPairUF3ComputeFullA<NEIGHFLAG, EVFLAG>, const int &,
|
||||
EV_FLOAT &) const;
|
||||
|
||||
template <int NEIGHFLAG, int EVFLAG>
|
||||
KOKKOS_INLINE_FUNCTION void operator()(TagPairUF3ComputeFullA<NEIGHFLAG, EVFLAG>,
|
||||
const int &) const;
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator()(TagPairUF3ComputeShortNeigh, const int &) const;
|
||||
|
||||
enum { EnabledNeighFlags = FULL };
|
||||
enum { COUL_FLAG = 0 };
|
||||
typedef DeviceType device_type;
|
||||
typedef ArrayTypes<DeviceType> AT;
|
||||
typedef EV_FLOAT value_type;
|
||||
|
||||
protected:
|
||||
typename AT::tdual_ffloat_2d k_cutsq;//Create a DualView, defination of tdual_ffloat_2d in kokkos_type.h
|
||||
typename AT::t_ffloat_2d d_cutsq; //t_ffloat_2d = t_dev ==> Creates a new View d_cutsq
|
||||
//the type of d_cutsq is decided by the Device(not host) type for the DualView k_cutsq
|
||||
//Meaning the memory location of d_cutsq is the same as the Device(not host) memory location of
|
||||
//k_cutsq
|
||||
typedef Kokkos::DualView<F_FLOAT***, Kokkos::LayoutRight, DeviceType> tdual_ffloat_3d;
|
||||
typedef Kokkos::DualView<F_FLOAT****, Kokkos::LayoutRight, DeviceType> tdual_ffloat_4d;
|
||||
tdual_ffloat_3d k_cut_3b;
|
||||
tdual_ffloat_4d k_min_cut_3b;
|
||||
typename tdual_ffloat_3d::t_dev d_cut_3b;
|
||||
typename tdual_ffloat_4d::t_dev d_min_cut_3b;
|
||||
template <typename TYPE> void destroy_3d(TYPE data, typename TYPE::value_type*** &array);
|
||||
template <typename TYPE> void destroy_4d(TYPE data, typename TYPE::value_type**** &array);
|
||||
Kokkos::View<F_FLOAT **, LMPDeviceType::array_layout, LMPDeviceType> /*d_cutsq,*/ d_cut_3b_list;
|
||||
//Kokkos::View<F_FLOAT ***, LMPDeviceType::array_layout, LMPDeviceType> d_cut_3b;
|
||||
|
||||
Kokkos::View<F_FLOAT **, LMPDeviceType::array_layout, LMPDeviceType> d_coefficients_2b;
|
||||
Kokkos::View<F_FLOAT **, LMPDeviceType::array_layout, LMPDeviceType> d_dncoefficients_2b;
|
||||
Kokkos::View<F_FLOAT **, LMPDeviceType::array_layout, LMPDeviceType> d_n2b_knot;
|
||||
Kokkos::View<F_FLOAT *, LMPDeviceType::array_layout, LMPDeviceType> d_n2b_knot_spacings;
|
||||
Kokkos::View<int **, LMPDeviceType::array_layout, LMPDeviceType> map2b;
|
||||
Kokkos::View<F_FLOAT[4][4], LMPDeviceType::array_layout, LMPDeviceType> constants;
|
||||
Kokkos::View<F_FLOAT[3][3], LMPDeviceType::array_layout, LMPDeviceType> dnconstants;
|
||||
Kokkos::View<F_FLOAT ***, LMPDeviceType::array_layout, LMPDeviceType> d_n3b_knot_matrix;
|
||||
Kokkos::View<F_FLOAT ****, LMPDeviceType::array_layout, LMPDeviceType> d_coefficients_3b;
|
||||
Kokkos::View<F_FLOAT *****, LMPDeviceType::array_layout, LMPDeviceType> d_dncoefficients_3b;
|
||||
Kokkos::View<F_FLOAT **, LMPDeviceType::array_layout, LMPDeviceType> d_n3b_knot_spacings;
|
||||
Kokkos::View<F_FLOAT **, LMPDeviceType::array_layout, LMPDeviceType> d_n3b_knot_matrix_spacings;
|
||||
Kokkos::View<int ***, LMPDeviceType::array_layout, LMPDeviceType> map3b;
|
||||
|
||||
Kokkos::View<F_FLOAT **[16], LMPDeviceType::array_layout, LMPDeviceType> constants_2b;
|
||||
Kokkos::View<F_FLOAT **[9], LMPDeviceType::array_layout, LMPDeviceType> dnconstants_2b;
|
||||
Kokkos::View<F_FLOAT ***[16], LMPDeviceType::array_layout, LMPDeviceType> constants_3b;
|
||||
Kokkos::View<F_FLOAT ***[9], LMPDeviceType::array_layout, LMPDeviceType> dnconstants_3b;
|
||||
|
||||
std::vector<F_FLOAT> get_constants(double *knots, double coefficient);
|
||||
std::vector<F_FLOAT> get_dnconstants(double *knots, double coefficient);
|
||||
|
||||
int coefficients_created = 0;
|
||||
void create_coefficients();
|
||||
void create_3b_coefficients();
|
||||
void create_2b_coefficients();
|
||||
std::vector<F_FLOAT> get_coefficients(const double *knots, const double coefficient) const;
|
||||
std::vector<F_FLOAT> get_dncoefficients(const double *knots, const double coefficient) const;
|
||||
|
||||
template <int EVFLAG>
|
||||
void twobody(const int itype, const int jtype, const F_FLOAT r, F_FLOAT &evdwl,
|
||||
F_FLOAT &fpair) const;
|
||||
template <int EVFLAG>
|
||||
void threebody(const int itype, const int jtype, const int ktype, const F_FLOAT value_rij,
|
||||
const F_FLOAT value_rik, const F_FLOAT value_rjk, F_FLOAT &evdwl3,
|
||||
F_FLOAT (&fforce)[3]) const;
|
||||
|
||||
template <int NEIGHFLAG>
|
||||
KOKKOS_INLINE_FUNCTION void
|
||||
ev_tally(EV_FLOAT &ev, const int &i, const int &j, const F_FLOAT &epair, const F_FLOAT &fpair,
|
||||
const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const;
|
||||
|
||||
template <int NEIGHFLAG>
|
||||
KOKKOS_INLINE_FUNCTION void ev_tally3(EV_FLOAT &ev, const int &i, const int &j, int &k,
|
||||
const F_FLOAT &evdwl, const F_FLOAT &ecoul, F_FLOAT *fj,
|
||||
F_FLOAT *fk, F_FLOAT *drji, F_FLOAT *drki) const;
|
||||
|
||||
typename AT::t_x_array_randomread x;
|
||||
typename AT::t_f_array f;
|
||||
typename AT::t_tagint_1d tag;
|
||||
typename AT::t_int_1d_randomread type;
|
||||
|
||||
DAT::tdual_efloat_1d k_eatom;
|
||||
DAT::tdual_virial_array k_vatom;
|
||||
typename AT::t_efloat_1d d_eatom;
|
||||
typename AT::t_virial_array d_vatom;
|
||||
|
||||
using ScatterFType = Kokkos::Experimental::ScatterView<F_FLOAT *[3], Kokkos::LayoutRight,
|
||||
typename DeviceType::memory_space>;
|
||||
ScatterFType fscatter;
|
||||
using ScatterVType = Kokkos::Experimental::ScatterView<F_FLOAT *[6], Kokkos::LayoutRight,
|
||||
typename DeviceType::memory_space>;
|
||||
ScatterVType vscatter;
|
||||
using ScatterCVType = Kokkos::Experimental::ScatterView<F_FLOAT *[9], Kokkos::LayoutRight,
|
||||
typename DeviceType::memory_space>;
|
||||
ScatterCVType cvscatter;
|
||||
using ScatterEType = Kokkos::Experimental::ScatterView<E_FLOAT *, LMPDeviceType::array_layout,
|
||||
typename DeviceType::memory_space>;
|
||||
ScatterEType escatter;
|
||||
|
||||
typename AT::t_neighbors_2d d_neighbors;
|
||||
typename AT::t_int_1d_randomread d_ilist;
|
||||
typename AT::t_int_1d_randomread d_numneigh;
|
||||
|
||||
int neighflag, newton_pair;
|
||||
int nlocal, nall, eflag, vflag;
|
||||
|
||||
int inum;
|
||||
Kokkos::View<int **, DeviceType> d_neighbors_short;
|
||||
Kokkos::View<int *, DeviceType> d_numneigh_short;
|
||||
|
||||
friend void pair_virial_fdotr_compute<PairUF3Kokkos>(PairUF3Kokkos *);
|
||||
};
|
||||
|
||||
KOKKOS_INLINE_FUNCTION int min(int i, int j)
|
||||
{
|
||||
return i < j ? i : j;
|
||||
}
|
||||
KOKKOS_INLINE_FUNCTION int max(int i, int j)
|
||||
{
|
||||
return i > j ? i : j;
|
||||
}
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
1984
src/ML-UF3/pair_uf3.cpp
Normal file
1984
src/ML-UF3/pair_uf3.cpp
Normal file
File diff suppressed because it is too large
Load Diff
95
src/ML-UF3/pair_uf3.h
Normal file
95
src/ML-UF3/pair_uf3.h
Normal file
@ -0,0 +1,95 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
LAMMPS development team: developers@lammps.org
|
||||
|
||||
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 author: Ajinkya Hire (Univ. of Florida),
|
||||
Hendrik Kraß (Univ. of Constance),
|
||||
Matthias Rupp (Luxembourg Institute of Science and Technology),
|
||||
Richard Hennig (Univ of Florida)
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
// clang-format off
|
||||
PairStyle(uf3,PairUF3);
|
||||
// clang-format on
|
||||
#else
|
||||
|
||||
#ifndef LMP_PAIR_UF3_H
|
||||
#define LMP_PAIR_UF3_H
|
||||
|
||||
#include "pair.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class PairUF3 : public Pair {
|
||||
public:
|
||||
PairUF3(class LAMMPS *);
|
||||
~PairUF3() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
void init_list(int, class NeighList *) override; // needed for ptr to full neigh list
|
||||
double init_one(int, int) override; // needed for cutoff radius for neighbour list
|
||||
double single(int, int, int, int, double, double, double, double &) override;
|
||||
|
||||
double memory_usage() override;
|
||||
|
||||
protected:
|
||||
int ***setflag_3b, **knot_spacing_type_2b, ***knot_spacing_type_3b;
|
||||
double **cut, ***cut_3b, **cut_3b_list, ****min_cut_3b;
|
||||
double **knot_spacing_2b, ****knot_spacing_3b;
|
||||
|
||||
double ***n2b_knots_array, ***n2b_coeff_array;
|
||||
int **n2b_knots_array_size, **n2b_coeff_array_size;
|
||||
double ****cached_constants_2b, ****cached_constants_2b_deri;
|
||||
|
||||
int ***map_3b;
|
||||
double ***n3b_knots_array, ****n3b_coeff_array;
|
||||
int **n3b_knots_array_size, **n3b_coeff_array_size;
|
||||
double ****coeff_for_der_jk, ****coeff_for_der_ik,****coeff_for_der_ij;
|
||||
double ****cached_constants_3b, ****cached_constants_3b_deri;
|
||||
|
||||
int *neighshort, maxshort; // short neighbor list array for 3body interaction
|
||||
|
||||
void uf3_read_unified_pot_file(char *potf_name);
|
||||
void communicate();
|
||||
int bsplines_created;
|
||||
bool pot_3b;
|
||||
virtual void allocate();
|
||||
void create_bsplines();
|
||||
void create_cached_constants_2b();
|
||||
void create_cached_constants_3b();
|
||||
|
||||
int get_starting_index_uniform_2b(int i, int j, double r);
|
||||
int get_starting_index_uniform_3b(int i, int j, int k, double r, int knot_dim);
|
||||
|
||||
int get_starting_index_nonuniform_2b(int i, int j, double r);
|
||||
int get_starting_index_nonuniform_3b(int i, int j, int k, double r, int knot_dim);
|
||||
|
||||
int (PairUF3::*get_starting_index_2b)(int i, int j, double r);
|
||||
int (PairUF3::*get_starting_index_3b)(int i, int j, int k, double r, int knot_dim);
|
||||
|
||||
int nbody_flag = 3;
|
||||
int max_num_knots_2b = 0;
|
||||
int max_num_coeff_2b = 0;
|
||||
int max_num_knots_3b = 0;
|
||||
int max_num_coeff_3b = 0;
|
||||
int tot_interaction_count_3b = 0;
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
111
src/ML-UF3/uf3_bspline_basis2.cpp
Normal file
111
src/ML-UF3/uf3_bspline_basis2.cpp
Normal file
@ -0,0 +1,111 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
lammps - large-scale atomic/molecular massively parallel simulator
|
||||
https://www.lammps.org/, sandia national laboratories
|
||||
lammps development team: developers@lammps.org
|
||||
|
||||
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.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "uf3_bspline_basis2.h"
|
||||
|
||||
#include "math_special.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using MathSpecial::square;
|
||||
|
||||
// Constructor
|
||||
// Initializes coefficients and knots
|
||||
// Requires [knots] to have length 4
|
||||
uf3_bspline_basis2::uf3_bspline_basis2(LAMMPS *ulmp, const double *knots, double coefficient)
|
||||
{
|
||||
lmp = ulmp;
|
||||
|
||||
double c0, c1, c2;
|
||||
|
||||
c0 = coefficient
|
||||
* (square(knots[0])
|
||||
/ (square(knots[0]) - knots[0] * knots[1] - knots[0] * knots[2] + knots[1] * knots[2]));
|
||||
c1 = coefficient *
|
||||
(-2.0 * knots[0] /
|
||||
(square(knots[0]) - knots[0] * knots[1] - knots[0] * knots[2] + knots[1] * knots[2]));
|
||||
c2 = coefficient *
|
||||
(1.0 / (square(knots[0]) - knots[0] * knots[1] - knots[0] * knots[2] + knots[1] * knots[2]));
|
||||
//constants.push_back(c0);
|
||||
//constants.push_back(c1);
|
||||
//constants.push_back(c2);
|
||||
constants[0] = c0;
|
||||
constants[1] = c1;
|
||||
constants[2] = c2;
|
||||
c0 = coefficient *
|
||||
(-knots[1] * knots[3] /
|
||||
(square(knots[1]) - knots[1] * knots[2] - knots[1] * knots[3] + knots[2] * knots[3]) -
|
||||
knots[0] * knots[2] /
|
||||
(knots[0] * knots[1] - knots[0] * knots[2] - knots[1] * knots[2] + square(knots[2])));
|
||||
c1 = coefficient *
|
||||
(knots[1] /
|
||||
(square(knots[1]) - knots[1] * knots[2] - knots[1] * knots[3] + knots[2] * knots[3]) +
|
||||
knots[3] /
|
||||
(square(knots[1]) - knots[1] * knots[2] - knots[1] * knots[3] + knots[2] * knots[3]) +
|
||||
knots[0] /
|
||||
(knots[0] * knots[1] - knots[0] * knots[2] - knots[1] * knots[2] + square(knots[2])) +
|
||||
knots[2] /
|
||||
(knots[0] * knots[1] - knots[0] * knots[2] - knots[1] * knots[2] + square(knots[2])));
|
||||
c2 = coefficient *
|
||||
(-1.0 / (square(knots[1]) - knots[1] * knots[2] - knots[1] * knots[3] + knots[2] * knots[3]) -
|
||||
1.0 / (knots[0] * knots[1] - knots[0] * knots[2] - knots[1] * knots[2] + square(knots[2])));
|
||||
//constants.push_back(c0);
|
||||
//constants.push_back(c1);
|
||||
//constants.push_back(c2);
|
||||
constants[3] = c0;
|
||||
constants[4] = c1;
|
||||
constants[5] = c2;
|
||||
c0 = coefficient *
|
||||
(square(knots[3]) /
|
||||
(knots[1] * knots[2] - knots[1] * knots[3] - knots[2] * knots[3] + square(knots[3])));
|
||||
c1 = coefficient *
|
||||
(-2.0 * knots[3] /
|
||||
(knots[1] * knots[2] - knots[1] * knots[3] - knots[2] * knots[3] + square(knots[3])));
|
||||
c2 = coefficient *
|
||||
(1.0 / (knots[1] * knots[2] - knots[1] * knots[3] - knots[2] * knots[3] + square(knots[3])));
|
||||
//constants.push_back(c0);
|
||||
//constants.push_back(c1);
|
||||
//constants.push_back(c2);
|
||||
constants[6] = c0;
|
||||
constants[7] = c1;
|
||||
constants[8] = c2;
|
||||
}
|
||||
|
||||
uf3_bspline_basis2::~uf3_bspline_basis2() {}
|
||||
|
||||
// Evaluate outer-left part of spline
|
||||
double uf3_bspline_basis2::eval0(double rsq, double r)
|
||||
{
|
||||
return rsq * constants[2] + r * constants[1] + constants[0];
|
||||
}
|
||||
|
||||
// Evaluate center-left part of spline
|
||||
double uf3_bspline_basis2::eval1(double rsq, double r)
|
||||
{
|
||||
return rsq * constants[5] + r * constants[4] + constants[3];
|
||||
}
|
||||
|
||||
// Evaluate center-right part of spline
|
||||
double uf3_bspline_basis2::eval2(double rsq, double r)
|
||||
{
|
||||
return rsq * constants[8] + r * constants[7] + constants[6];
|
||||
}
|
||||
|
||||
double uf3_bspline_basis2::memory_usage()
|
||||
{
|
||||
double bytes = 0;
|
||||
|
||||
bytes += (double)9*sizeof(double);
|
||||
|
||||
return bytes;
|
||||
}
|
||||
41
src/ML-UF3/uf3_bspline_basis2.h
Normal file
41
src/ML-UF3/uf3_bspline_basis2.h
Normal file
@ -0,0 +1,41 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
lammps - large-scale atomic/molecular massively parallel simulator
|
||||
https://www.lammps.org/, sandia national laboratories
|
||||
lammps development team: developers@lammps.org
|
||||
|
||||
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.
|
||||
------------------------------------------------------------------------- */
|
||||
#include "pointers.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#ifndef UF3_BSPLINE_BASIS2_H
|
||||
#define UF3_BSPLINE_BASIS2_H
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class uf3_bspline_basis2 {
|
||||
private:
|
||||
LAMMPS *lmp;
|
||||
//std::vector<double> constants;
|
||||
|
||||
public:
|
||||
uf3_bspline_basis2(LAMMPS *ulmp, const double *knots, double coefficient);
|
||||
~uf3_bspline_basis2();
|
||||
//std::vector<double> constants;
|
||||
double constants[9] = {};
|
||||
double eval0(double, double);
|
||||
double eval1(double, double);
|
||||
double eval2(double, double);
|
||||
|
||||
double memory_usage();
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
#endif
|
||||
355
src/ML-UF3/uf3_bspline_basis3.cpp
Normal file
355
src/ML-UF3/uf3_bspline_basis3.cpp
Normal file
@ -0,0 +1,355 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
lammps - large-scale atomic/molecular massively parallel simulator
|
||||
https://www.lammps.org/, sandia national laboratories
|
||||
lammps development team: developers@lammps.org
|
||||
|
||||
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.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "uf3_bspline_basis3.h"
|
||||
|
||||
#include "math_special.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using MathSpecial::cube;
|
||||
using MathSpecial::square;
|
||||
|
||||
// Constructor
|
||||
// Initializes coefficients and knots
|
||||
// [knots] needs to have length 4
|
||||
uf3_bspline_basis3::uf3_bspline_basis3(LAMMPS *ulmp, const double *knots, double coefficient)
|
||||
{
|
||||
lmp = ulmp;
|
||||
|
||||
double c0, c1, c2, c3;
|
||||
|
||||
c0 = coefficient *
|
||||
(-cube(knots[0]) /
|
||||
(-cube(knots[0]) + square(knots[0]) * knots[1] + square(knots[0]) * knots[2] +
|
||||
square(knots[0]) * knots[3] - knots[0] * knots[1] * knots[2] -
|
||||
knots[0] * knots[1] * knots[3] - knots[0] * knots[2] * knots[3] +
|
||||
knots[1] * knots[2] * knots[3]));
|
||||
c1 = coefficient *
|
||||
(3.0 * square(knots[0]) /
|
||||
(-cube(knots[0]) + square(knots[0]) * knots[1] + square(knots[0]) * knots[2] +
|
||||
square(knots[0]) * knots[3] - knots[0] * knots[1] * knots[2] -
|
||||
knots[0] * knots[1] * knots[3] - knots[0] * knots[2] * knots[3] +
|
||||
knots[1] * knots[2] * knots[3]));
|
||||
c2 = coefficient *
|
||||
(-3.0 * knots[0] /
|
||||
(-cube(knots[0]) + square(knots[0]) * knots[1] + square(knots[0]) * knots[2] +
|
||||
square(knots[0]) * knots[3] - knots[0] * knots[1] * knots[2] -
|
||||
knots[0] * knots[1] * knots[3] - knots[0] * knots[2] * knots[3] +
|
||||
knots[1] * knots[2] * knots[3]));
|
||||
c3 = coefficient *
|
||||
(1.0 /
|
||||
(-cube(knots[0]) + square(knots[0]) * knots[1] + square(knots[0]) * knots[2] +
|
||||
square(knots[0]) * knots[3] - knots[0] * knots[1] * knots[2] -
|
||||
knots[0] * knots[1] * knots[3] - knots[0] * knots[2] * knots[3] +
|
||||
knots[1] * knots[2] * knots[3]));
|
||||
//constants.push_back(c0);
|
||||
//constants.push_back(c1);
|
||||
//constants.push_back(c2);
|
||||
//constants.push_back(c3);
|
||||
constants[0] = c0;
|
||||
constants[1] = c1;
|
||||
constants[2] = c2;
|
||||
constants[3] = c3;
|
||||
c0 = coefficient *
|
||||
(square(knots[1]) * knots[4] /
|
||||
(-cube(knots[1]) + square(knots[1]) * knots[2] + square(knots[1]) * knots[3] +
|
||||
square(knots[1]) * knots[4] - knots[1] * knots[2] * knots[3] -
|
||||
knots[1] * knots[2] * knots[4] - knots[1] * knots[3] * knots[4] +
|
||||
knots[2] * knots[3] * knots[4]) +
|
||||
square(knots[0]) * knots[2] /
|
||||
(-square(knots[0]) * knots[1] + square(knots[0]) * knots[2] +
|
||||
knots[0] * knots[1] * knots[2] + knots[0] * knots[1] * knots[3] -
|
||||
knots[0] * square(knots[2]) - knots[0] * knots[2] * knots[3] -
|
||||
knots[1] * knots[2] * knots[3] + square(knots[2]) * knots[3]) +
|
||||
knots[0] * knots[1] * knots[3] /
|
||||
(-knots[0] * square(knots[1]) + knots[0] * knots[1] * knots[2] +
|
||||
knots[0] * knots[1] * knots[3] - knots[0] * knots[2] * knots[3] +
|
||||
square(knots[1]) * knots[3] - knots[1] * knots[2] * knots[3] -
|
||||
knots[1] * square(knots[3]) + knots[2] * square(knots[3])));
|
||||
c1 = coefficient *
|
||||
(-square(knots[1]) /
|
||||
(-cube(knots[1]) + square(knots[1]) * knots[2] + square(knots[1]) * knots[3] +
|
||||
square(knots[1]) * knots[4] - knots[1] * knots[2] * knots[3] -
|
||||
knots[1] * knots[2] * knots[4] - knots[1] * knots[3] * knots[4] +
|
||||
knots[2] * knots[3] * knots[4]) -
|
||||
2.0 * knots[1] * knots[4] /
|
||||
(-cube(knots[1]) + square(knots[1]) * knots[2] + square(knots[1]) * knots[3] +
|
||||
square(knots[1]) * knots[4] - knots[1] * knots[2] * knots[3] -
|
||||
knots[1] * knots[2] * knots[4] - knots[1] * knots[3] * knots[4] +
|
||||
knots[2] * knots[3] * knots[4]) -
|
||||
square(knots[0]) /
|
||||
(-square(knots[0]) * knots[1] + square(knots[0]) * knots[2] +
|
||||
knots[0] * knots[1] * knots[2] + knots[0] * knots[1] * knots[3] -
|
||||
knots[0] * square(knots[2]) - knots[0] * knots[2] * knots[3] -
|
||||
knots[1] * knots[2] * knots[3] + square(knots[2]) * knots[3]) -
|
||||
2.0 * knots[0] * knots[2] /
|
||||
(-square(knots[0]) * knots[1] + square(knots[0]) * knots[2] +
|
||||
knots[0] * knots[1] * knots[2] + knots[0] * knots[1] * knots[3] -
|
||||
knots[0] * square(knots[2]) - knots[0] * knots[2] * knots[3] -
|
||||
knots[1] * knots[2] * knots[3] + square(knots[2]) * knots[3]) -
|
||||
knots[0] * knots[1] /
|
||||
(-knots[0] * square(knots[1]) + knots[0] * knots[1] * knots[2] +
|
||||
knots[0] * knots[1] * knots[3] - knots[0] * knots[2] * knots[3] +
|
||||
square(knots[1]) * knots[3] - knots[1] * knots[2] * knots[3] -
|
||||
knots[1] * square(knots[3]) + knots[2] * square(knots[3])) -
|
||||
knots[0] * knots[3] /
|
||||
(-knots[0] * square(knots[1]) + knots[0] * knots[1] * knots[2] +
|
||||
knots[0] * knots[1] * knots[3] - knots[0] * knots[2] * knots[3] +
|
||||
square(knots[1]) * knots[3] - knots[1] * knots[2] * knots[3] -
|
||||
knots[1] * square(knots[3]) + knots[2] * square(knots[3])) -
|
||||
knots[1] * knots[3] /
|
||||
(-knots[0] * square(knots[1]) + knots[0] * knots[1] * knots[2] +
|
||||
knots[0] * knots[1] * knots[3] - knots[0] * knots[2] * knots[3] +
|
||||
square(knots[1]) * knots[3] - knots[1] * knots[2] * knots[3] -
|
||||
knots[1] * square(knots[3]) + knots[2] * square(knots[3])));
|
||||
c2 = coefficient *
|
||||
(2.0 * knots[1] /
|
||||
(-cube(knots[1]) + square(knots[1]) * knots[2] + square(knots[1]) * knots[3] +
|
||||
square(knots[1]) * knots[4] - knots[1] * knots[2] * knots[3] -
|
||||
knots[1] * knots[2] * knots[4] - knots[1] * knots[3] * knots[4] +
|
||||
knots[2] * knots[3] * knots[4]) +
|
||||
knots[4] /
|
||||
(-cube(knots[1]) + square(knots[1]) * knots[2] + square(knots[1]) * knots[3] +
|
||||
square(knots[1]) * knots[4] - knots[1] * knots[2] * knots[3] -
|
||||
knots[1] * knots[2] * knots[4] - knots[1] * knots[3] * knots[4] +
|
||||
knots[2] * knots[3] * knots[4]) +
|
||||
2.0 * knots[0] /
|
||||
(-square(knots[0]) * knots[1] + square(knots[0]) * knots[2] +
|
||||
knots[0] * knots[1] * knots[2] + knots[0] * knots[1] * knots[3] -
|
||||
knots[0] * square(knots[2]) - knots[0] * knots[2] * knots[3] -
|
||||
knots[1] * knots[2] * knots[3] + square(knots[2]) * knots[3]) +
|
||||
knots[2] /
|
||||
(-square(knots[0]) * knots[1] + square(knots[0]) * knots[2] +
|
||||
knots[0] * knots[1] * knots[2] + knots[0] * knots[1] * knots[3] -
|
||||
knots[0] * square(knots[2]) - knots[0] * knots[2] * knots[3] -
|
||||
knots[1] * knots[2] * knots[3] + square(knots[2]) * knots[3]) +
|
||||
knots[0] /
|
||||
(-knots[0] * square(knots[1]) + knots[0] * knots[1] * knots[2] +
|
||||
knots[0] * knots[1] * knots[3] - knots[0] * knots[2] * knots[3] +
|
||||
square(knots[1]) * knots[3] - knots[1] * knots[2] * knots[3] -
|
||||
knots[1] * square(knots[3]) + knots[2] * square(knots[3])) +
|
||||
knots[1] /
|
||||
(-knots[0] * square(knots[1]) + knots[0] * knots[1] * knots[2] +
|
||||
knots[0] * knots[1] * knots[3] - knots[0] * knots[2] * knots[3] +
|
||||
square(knots[1]) * knots[3] - knots[1] * knots[2] * knots[3] -
|
||||
knots[1] * square(knots[3]) + knots[2] * square(knots[3])) +
|
||||
knots[3] /
|
||||
(-knots[0] * square(knots[1]) + knots[0] * knots[1] * knots[2] +
|
||||
knots[0] * knots[1] * knots[3] - knots[0] * knots[2] * knots[3] +
|
||||
square(knots[1]) * knots[3] - knots[1] * knots[2] * knots[3] -
|
||||
knots[1] * square(knots[3]) + knots[2] * square(knots[3])));
|
||||
c3 = coefficient *
|
||||
(-1.0 /
|
||||
(-cube(knots[1]) + square(knots[1]) * knots[2] + square(knots[1]) * knots[3] +
|
||||
square(knots[1]) * knots[4] - knots[1] * knots[2] * knots[3] -
|
||||
knots[1] * knots[2] * knots[4] - knots[1] * knots[3] * knots[4] +
|
||||
knots[2] * knots[3] * knots[4]) -
|
||||
1.0 /
|
||||
(-square(knots[0]) * knots[1] + square(knots[0]) * knots[2] +
|
||||
knots[0] * knots[1] * knots[2] + knots[0] * knots[1] * knots[3] -
|
||||
knots[0] * square(knots[2]) - knots[0] * knots[2] * knots[3] -
|
||||
knots[1] * knots[2] * knots[3] + square(knots[2]) * knots[3]) -
|
||||
1.0 /
|
||||
(-knots[0] * square(knots[1]) + knots[0] * knots[1] * knots[2] +
|
||||
knots[0] * knots[1] * knots[3] - knots[0] * knots[2] * knots[3] +
|
||||
square(knots[1]) * knots[3] - knots[1] * knots[2] * knots[3] -
|
||||
knots[1] * square(knots[3]) + knots[2] * square(knots[3])));
|
||||
//constants.push_back(c0);
|
||||
//constants.push_back(c1);
|
||||
//constants.push_back(c2);
|
||||
//constants.push_back(c3);
|
||||
constants[4] = c0;
|
||||
constants[5] = c1;
|
||||
constants[6] = c2;
|
||||
constants[7] = c3;
|
||||
c0 = coefficient *
|
||||
(-knots[0] * square(knots[3]) /
|
||||
(-knots[0] * knots[1] * knots[2] + knots[0] * knots[1] * knots[3] +
|
||||
knots[0] * knots[2] * knots[3] - knots[0] * square(knots[3]) +
|
||||
knots[1] * knots[2] * knots[3] - knots[1] * square(knots[3]) -
|
||||
knots[2] * square(knots[3]) + cube(knots[3])) -
|
||||
knots[1] * knots[3] * knots[4] /
|
||||
(-square(knots[1]) * knots[2] + square(knots[1]) * knots[3] +
|
||||
knots[1] * knots[2] * knots[3] + knots[1] * knots[2] * knots[4] -
|
||||
knots[1] * square(knots[3]) - knots[1] * knots[3] * knots[4] -
|
||||
knots[2] * knots[3] * knots[4] + square(knots[3]) * knots[4]) -
|
||||
knots[2] * square(knots[4]) /
|
||||
(-knots[1] * square(knots[2]) + knots[1] * knots[2] * knots[3] +
|
||||
knots[1] * knots[2] * knots[4] - knots[1] * knots[3] * knots[4] +
|
||||
square(knots[2]) * knots[4] - knots[2] * knots[3] * knots[4] -
|
||||
knots[2] * square(knots[4]) + knots[3] * square(knots[4])));
|
||||
c1 = coefficient *
|
||||
(2.0 * knots[0] * knots[3] /
|
||||
(-knots[0] * knots[1] * knots[2] + knots[0] * knots[1] * knots[3] +
|
||||
knots[0] * knots[2] * knots[3] - knots[0] * square(knots[3]) +
|
||||
knots[1] * knots[2] * knots[3] - knots[1] * square(knots[3]) -
|
||||
knots[2] * square(knots[3]) + cube(knots[3])) +
|
||||
square(knots[3]) /
|
||||
(-knots[0] * knots[1] * knots[2] + knots[0] * knots[1] * knots[3] +
|
||||
knots[0] * knots[2] * knots[3] - knots[0] * square(knots[3]) +
|
||||
knots[1] * knots[2] * knots[3] - knots[1] * square(knots[3]) -
|
||||
knots[2] * square(knots[3]) + cube(knots[3])) +
|
||||
knots[1] * knots[3] /
|
||||
(-square(knots[1]) * knots[2] + square(knots[1]) * knots[3] +
|
||||
knots[1] * knots[2] * knots[3] + knots[1] * knots[2] * knots[4] -
|
||||
knots[1] * square(knots[3]) - knots[1] * knots[3] * knots[4] -
|
||||
knots[2] * knots[3] * knots[4] + square(knots[3]) * knots[4]) +
|
||||
knots[1] * knots[4] /
|
||||
(-square(knots[1]) * knots[2] + square(knots[1]) * knots[3] +
|
||||
knots[1] * knots[2] * knots[3] + knots[1] * knots[2] * knots[4] -
|
||||
knots[1] * square(knots[3]) - knots[1] * knots[3] * knots[4] -
|
||||
knots[2] * knots[3] * knots[4] + square(knots[3]) * knots[4]) +
|
||||
knots[3] * knots[4] /
|
||||
(-square(knots[1]) * knots[2] + square(knots[1]) * knots[3] +
|
||||
knots[1] * knots[2] * knots[3] + knots[1] * knots[2] * knots[4] -
|
||||
knots[1] * square(knots[3]) - knots[1] * knots[3] * knots[4] -
|
||||
knots[2] * knots[3] * knots[4] + square(knots[3]) * knots[4]) +
|
||||
2.0 * knots[2] * knots[4] /
|
||||
(-knots[1] * square(knots[2]) + knots[1] * knots[2] * knots[3] +
|
||||
knots[1] * knots[2] * knots[4] - knots[1] * knots[3] * knots[4] +
|
||||
square(knots[2]) * knots[4] - knots[2] * knots[3] * knots[4] -
|
||||
knots[2] * square(knots[4]) + knots[3] * square(knots[4])) +
|
||||
square(knots[4]) /
|
||||
(-knots[1] * square(knots[2]) + knots[1] * knots[2] * knots[3] +
|
||||
knots[1] * knots[2] * knots[4] - knots[1] * knots[3] * knots[4] +
|
||||
square(knots[2]) * knots[4] - knots[2] * knots[3] * knots[4] -
|
||||
knots[2] * square(knots[4]) + knots[3] * square(knots[4])));
|
||||
c2 = coefficient *
|
||||
(-knots[0] /
|
||||
(-knots[0] * knots[1] * knots[2] + knots[0] * knots[1] * knots[3] +
|
||||
knots[0] * knots[2] * knots[3] - knots[0] * square(knots[3]) +
|
||||
knots[1] * knots[2] * knots[3] - knots[1] * square(knots[3]) -
|
||||
knots[2] * square(knots[3]) + cube(knots[3])) -
|
||||
2.0 * knots[3] /
|
||||
(-knots[0] * knots[1] * knots[2] + knots[0] * knots[1] * knots[3] +
|
||||
knots[0] * knots[2] * knots[3] - knots[0] * square(knots[3]) +
|
||||
knots[1] * knots[2] * knots[3] - knots[1] * square(knots[3]) -
|
||||
knots[2] * square(knots[3]) + cube(knots[3])) -
|
||||
knots[1] /
|
||||
(-square(knots[1]) * knots[2] + square(knots[1]) * knots[3] +
|
||||
knots[1] * knots[2] * knots[3] + knots[1] * knots[2] * knots[4] -
|
||||
knots[1] * square(knots[3]) - knots[1] * knots[3] * knots[4] -
|
||||
knots[2] * knots[3] * knots[4] + square(knots[3]) * knots[4]) -
|
||||
knots[3] /
|
||||
(-square(knots[1]) * knots[2] + square(knots[1]) * knots[3] +
|
||||
knots[1] * knots[2] * knots[3] + knots[1] * knots[2] * knots[4] -
|
||||
knots[1] * square(knots[3]) - knots[1] * knots[3] * knots[4] -
|
||||
knots[2] * knots[3] * knots[4] + square(knots[3]) * knots[4]) -
|
||||
knots[4] /
|
||||
(-square(knots[1]) * knots[2] + square(knots[1]) * knots[3] +
|
||||
knots[1] * knots[2] * knots[3] + knots[1] * knots[2] * knots[4] -
|
||||
knots[1] * square(knots[3]) - knots[1] * knots[3] * knots[4] -
|
||||
knots[2] * knots[3] * knots[4] + square(knots[3]) * knots[4]) -
|
||||
knots[2] /
|
||||
(-knots[1] * square(knots[2]) + knots[1] * knots[2] * knots[3] +
|
||||
knots[1] * knots[2] * knots[4] - knots[1] * knots[3] * knots[4] +
|
||||
square(knots[2]) * knots[4] - knots[2] * knots[3] * knots[4] -
|
||||
knots[2] * square(knots[4]) + knots[3] * square(knots[4])) -
|
||||
2.0 * knots[4] /
|
||||
(-knots[1] * square(knots[2]) + knots[1] * knots[2] * knots[3] +
|
||||
knots[1] * knots[2] * knots[4] - knots[1] * knots[3] * knots[4] +
|
||||
square(knots[2]) * knots[4] - knots[2] * knots[3] * knots[4] -
|
||||
knots[2] * square(knots[4]) + knots[3] * square(knots[4])));
|
||||
c3 = coefficient *
|
||||
(1.0 /
|
||||
(-knots[0] * knots[1] * knots[2] + knots[0] * knots[1] * knots[3] +
|
||||
knots[0] * knots[2] * knots[3] - knots[0] * square(knots[3]) +
|
||||
knots[1] * knots[2] * knots[3] - knots[1] * square(knots[3]) -
|
||||
knots[2] * square(knots[3]) + cube(knots[3])) +
|
||||
1.0 /
|
||||
(-square(knots[1]) * knots[2] + square(knots[1]) * knots[3] +
|
||||
knots[1] * knots[2] * knots[3] + knots[1] * knots[2] * knots[4] -
|
||||
knots[1] * square(knots[3]) - knots[1] * knots[3] * knots[4] -
|
||||
knots[2] * knots[3] * knots[4] + square(knots[3]) * knots[4]) +
|
||||
1.0 /
|
||||
(-knots[1] * square(knots[2]) + knots[1] * knots[2] * knots[3] +
|
||||
knots[1] * knots[2] * knots[4] - knots[1] * knots[3] * knots[4] +
|
||||
square(knots[2]) * knots[4] - knots[2] * knots[3] * knots[4] -
|
||||
knots[2] * square(knots[4]) + knots[3] * square(knots[4])));
|
||||
//constants.push_back(c0);
|
||||
//constants.push_back(c1);
|
||||
//constants.push_back(c2);
|
||||
//constants.push_back(c3);
|
||||
constants[8] = c0;
|
||||
constants[9] = c1;
|
||||
constants[10] = c2;
|
||||
constants[11] = c3;
|
||||
c0 = coefficient *
|
||||
(cube(knots[4]) /
|
||||
(-knots[1] * knots[2] * knots[3] + knots[1] * knots[2] * knots[4] +
|
||||
knots[1] * knots[3] * knots[4] - knots[1] * square(knots[4]) +
|
||||
knots[2] * knots[3] * knots[4] - knots[2] * square(knots[4]) - knots[3] * square(knots[4]) +
|
||||
cube(knots[4])));
|
||||
c1 = coefficient *
|
||||
(-3.0 * square(knots[4]) /
|
||||
(-knots[1] * knots[2] * knots[3] + knots[1] * knots[2] * knots[4] +
|
||||
knots[1] * knots[3] * knots[4] - knots[1] * square(knots[4]) +
|
||||
knots[2] * knots[3] * knots[4] - knots[2] * square(knots[4]) - knots[3] * square(knots[4]) +
|
||||
cube(knots[4])));
|
||||
c2 = coefficient *
|
||||
(3.0 * knots[4] /
|
||||
(-knots[1] * knots[2] * knots[3] + knots[1] * knots[2] * knots[4] +
|
||||
knots[1] * knots[3] * knots[4] - knots[1] * square(knots[4]) +
|
||||
knots[2] * knots[3] * knots[4] - knots[2] * square(knots[4]) - knots[3] * square(knots[4]) +
|
||||
cube(knots[4])));
|
||||
c3 = coefficient *
|
||||
(-1.0 /
|
||||
(-knots[1] * knots[2] * knots[3] + knots[1] * knots[2] * knots[4] +
|
||||
knots[1] * knots[3] * knots[4] - knots[1] * square(knots[4]) +
|
||||
knots[2] * knots[3] * knots[4] - knots[2] * square(knots[4]) - knots[3] * square(knots[4]) +
|
||||
cube(knots[4])));
|
||||
//constants.push_back(c0);
|
||||
//constants.push_back(c1);
|
||||
//constants.push_back(c2);
|
||||
//constants.push_back(c3);
|
||||
constants[12] = c0;
|
||||
constants[13] = c1;
|
||||
constants[14] = c2;
|
||||
constants[15] = c3;
|
||||
}
|
||||
|
||||
uf3_bspline_basis3::~uf3_bspline_basis3() {}
|
||||
|
||||
// Evaluate outer-left part of spline
|
||||
double uf3_bspline_basis3::eval0(double rth, double rsq, double r)
|
||||
{
|
||||
return rth * constants[3] + rsq * constants[2] + r * constants[1] + constants[0];
|
||||
}
|
||||
|
||||
// Evaluate center-left part of spline
|
||||
double uf3_bspline_basis3::eval1(double rth, double rsq, double r)
|
||||
{
|
||||
return rth * constants[7] + rsq * constants[6] + r * constants[5] + constants[4];
|
||||
}
|
||||
|
||||
// Evaluate center-right part of spline
|
||||
double uf3_bspline_basis3::eval2(double rth, double rsq, double r)
|
||||
{
|
||||
return rth * constants[11] + rsq * constants[10] + r * constants[9] + constants[8];
|
||||
}
|
||||
|
||||
// Evaluate outer-right part of spline
|
||||
double uf3_bspline_basis3::eval3(double rth, double rsq, double r)
|
||||
{
|
||||
return rth * constants[15] + rsq * constants[14] + r * constants[13] + constants[12];
|
||||
}
|
||||
|
||||
double uf3_bspline_basis3::memory_usage()
|
||||
{
|
||||
double bytes = 0;
|
||||
|
||||
bytes += (double)16*sizeof(double);
|
||||
|
||||
return bytes;
|
||||
}
|
||||
42
src/ML-UF3/uf3_bspline_basis3.h
Normal file
42
src/ML-UF3/uf3_bspline_basis3.h
Normal file
@ -0,0 +1,42 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
lammps - large-scale atomic/molecular massively parallel simulator
|
||||
https://www.lammps.org/, sandia national laboratories
|
||||
lammps development team: developers@lammps.org
|
||||
|
||||
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.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "pointers.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#ifndef UF3_BSPLINE_BASIS3_H
|
||||
#define UF3_BSPLINE_BASIS3_H
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class uf3_bspline_basis3 {
|
||||
private:
|
||||
LAMMPS *lmp;
|
||||
//std::vector<double> constants;
|
||||
|
||||
public:
|
||||
uf3_bspline_basis3(LAMMPS *ulmp, const double *knots, double coefficient);
|
||||
~uf3_bspline_basis3();
|
||||
double constants[16] = {};
|
||||
double eval0(double, double, double);
|
||||
double eval1(double, double, double);
|
||||
double eval2(double, double, double);
|
||||
double eval3(double, double, double);
|
||||
|
||||
double memory_usage();
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
#endif
|
||||
@ -104,6 +104,7 @@ PACKAGE = \
|
||||
ml-quip \
|
||||
ml-rann \
|
||||
ml-snap \
|
||||
ml-uf3 \
|
||||
mofff \
|
||||
molfile \
|
||||
netcdf \
|
||||
|
||||
@ -229,7 +229,13 @@ void FixOMP::init()
|
||||
check_hybrid = 0; \
|
||||
if (force->name) { \
|
||||
if ( (strcmp(force->name ## _style,"hybrid") == 0) || \
|
||||
(strcmp(force->name ## _style,"hybrid/overlay") == 0) ) \
|
||||
(strcmp(force->name ## _style,"hybrid/overlay") == 0) || \
|
||||
(strcmp(force->name ## _style,"hybrid/scaled") == 0) || \
|
||||
(strcmp(force->name ## _style,"hybrid/molecular") == 0) || \
|
||||
(strcmp(force->name ## _style,"hybrid/omp") == 0) || \
|
||||
(strcmp(force->name ## _style,"hybrid/overlay/omp") == 0) || \
|
||||
(strcmp(force->name ## _style,"hybrid/scaled/omp") == 0) || \
|
||||
(strcmp(force->name ## _style,"hybrid/molecular/omp") == 0) ) \
|
||||
check_hybrid=1; \
|
||||
if (force->name->suffix_flag & Suffix::OMP) { \
|
||||
last_force_name = (const char *) #name; \
|
||||
|
||||
@ -19,14 +19,12 @@
|
||||
|
||||
NPairStyle(skip/omp,
|
||||
NPairSkip,
|
||||
NP_SKIP | NP_HALF | NP_FULL |
|
||||
NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_SKIP | NP_HALF | NP_FULL | NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_OMP);
|
||||
|
||||
NPairStyle(skip/half/respa/omp,
|
||||
NPairSkipRespa,
|
||||
NP_SKIP | NP_RESPA | NP_HALF | NP_FULL |
|
||||
NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_SKIP | NP_RESPA | NP_HALF | NP_FULL | NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_OMP);
|
||||
|
||||
NPairStyle(skip/half/size/omp,
|
||||
@ -36,32 +34,27 @@ NPairStyle(skip/half/size/omp,
|
||||
|
||||
NPairStyle(skip/size/off2on/omp,
|
||||
NPairSkipSizeOff2on,
|
||||
NP_SKIP | NP_SIZE | NP_OFF2ON | NP_HALF |
|
||||
NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD | NP_MULTI_OLD |
|
||||
NP_SKIP | NP_SIZE | NP_OFF2ON | NP_HALF | NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_OMP);
|
||||
|
||||
NPairStyle(skip/size/off2on/oneside/omp,
|
||||
NPairSkipSizeOff2onOneside,
|
||||
NP_SKIP | NP_SIZE | NP_OFF2ON | NP_ONESIDE | NP_HALF |
|
||||
NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD | NP_NEWTON | NP_NEWTOFF |
|
||||
NP_ORTHO | NP_TRI | NP_OMP);
|
||||
NP_SKIP | NP_SIZE | NP_OFF2ON | NP_ONESIDE | NP_HALF | NP_NSQ | NP_BIN | NP_MULTI |
|
||||
NP_MULTI_OLD | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_OMP);
|
||||
|
||||
NPairStyle(skip/ghost/omp,
|
||||
NPairSkip,
|
||||
NP_SKIP | NP_HALF | NP_FULL |
|
||||
NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_SKIP | NP_HALF | NP_FULL | NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_OMP | NP_GHOST);
|
||||
|
||||
NPairStyle(skip/trim/omp,
|
||||
NPairSkipTrim,
|
||||
NP_SKIP | NP_HALF | NP_FULL |
|
||||
NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_SKIP | NP_HALF | NP_FULL | NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_TRIM | NP_OMP);
|
||||
|
||||
NPairStyle(skip/trim/half/respa/omp,
|
||||
NPairSkipTrimRespa,
|
||||
NP_SKIP | NP_RESPA | NP_HALF | NP_FULL |
|
||||
NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_SKIP | NP_RESPA | NP_HALF | NP_FULL | NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_TRIM | NP_OMP);
|
||||
|
||||
NPairStyle(skip/trim/half/size/omp,
|
||||
@ -71,20 +64,17 @@ NPairStyle(skip/trim/half/size/omp,
|
||||
|
||||
NPairStyle(skip/trim/size/off2on/omp,
|
||||
NPairSkipTrimSizeOff2on,
|
||||
NP_SKIP | NP_SIZE | NP_OFF2ON | NP_HALF |
|
||||
NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD | NP_MULTI_OLD |
|
||||
NP_SKIP | NP_SIZE | NP_OFF2ON | NP_HALF | NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_TRIM | NP_OMP);
|
||||
|
||||
NPairStyle(skip/trim/size/off2on/oneside/omp,
|
||||
NPairSkipTrimSizeOff2onOneside,
|
||||
NP_SKIP | NP_SIZE | NP_OFF2ON | NP_ONESIDE | NP_HALF |
|
||||
NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD | NP_NEWTON | NP_NEWTOFF |
|
||||
NP_ORTHO | NP_TRI | NP_TRIM | NP_OMP);
|
||||
NP_SKIP | NP_SIZE | NP_OFF2ON | NP_ONESIDE | NP_HALF | NP_NSQ | NP_BIN | NP_MULTI |
|
||||
NP_MULTI_OLD | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_TRIM | NP_OMP);
|
||||
|
||||
NPairStyle(skip/trim/ghost/omp,
|
||||
NPairSkipTrim,
|
||||
NP_SKIP | NP_HALF | NP_FULL |
|
||||
NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_SKIP | NP_HALF | NP_FULL | NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_TRIM | NP_OMP | NP_GHOST);
|
||||
// clang-format off
|
||||
#endif
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include "comm.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "fix_bond_history.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "input.h"
|
||||
@ -754,6 +755,10 @@ void DeleteAtoms::bondring(int nbuf, char *cbuf, void *ptr)
|
||||
|
||||
int nlocal = daptr->atom->nlocal;
|
||||
|
||||
// find instances of bond history to delete data
|
||||
auto histories = daptr->modify->get_fix_by_style("BOND_HISTORY");
|
||||
int n_histories = histories.size();
|
||||
|
||||
// cbuf = list of N deleted atom IDs from other proc, put them in hash
|
||||
|
||||
hash->clear();
|
||||
@ -771,6 +776,11 @@ void DeleteAtoms::bondring(int nbuf, char *cbuf, void *ptr)
|
||||
if (hash->find(bond_atom[i][m]) != hash->end()) {
|
||||
bond_type[i][m] = bond_type[i][n - 1];
|
||||
bond_atom[i][m] = bond_atom[i][n - 1];
|
||||
if (n_histories > 0)
|
||||
for (auto &ihistory: histories) {
|
||||
dynamic_cast<FixBondHistory *>(ihistory)->shift_history(i,m,n-1);
|
||||
dynamic_cast<FixBondHistory *>(ihistory)->delete_history(i,n-1);
|
||||
}
|
||||
n--;
|
||||
} else
|
||||
m++;
|
||||
|
||||
@ -44,6 +44,7 @@ class FixBondHistory : public Fix {
|
||||
|
||||
void update_atom_value(int, int, int, double);
|
||||
double get_atom_value(int, int, int);
|
||||
int get_ndata() const { return ndata; }
|
||||
|
||||
// methods to reorder/delete elements of atom->bond_atom
|
||||
void delete_history(int, int);
|
||||
|
||||
@ -148,6 +148,7 @@ void NeighList::post_constructor(NeighRequest *nq)
|
||||
copy = nq->copy;
|
||||
trim = nq->trim;
|
||||
id = nq->id;
|
||||
molskip = nq->molskip;
|
||||
|
||||
if (nq->copy) {
|
||||
listcopy = neighbor->lists[nq->copylist];
|
||||
@ -157,6 +158,7 @@ void NeighList::post_constructor(NeighRequest *nq)
|
||||
|
||||
if (nq->skip) {
|
||||
listskip = neighbor->lists[nq->skiplist];
|
||||
if (!molskip) {
|
||||
int ntypes = atom->ntypes;
|
||||
iskip = new int[ntypes+1];
|
||||
memory->create(ijskip,ntypes+1,ntypes+1,"neigh_list:ijskip");
|
||||
@ -166,6 +168,7 @@ void NeighList::post_constructor(NeighRequest *nq)
|
||||
for (j = 1; j <= ntypes; j++)
|
||||
ijskip[i][j] = nq->ijskip[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
if (nq->halffull)
|
||||
listfull = neighbor->lists[nq->halffulllist];
|
||||
|
||||
@ -46,6 +46,7 @@ class NeighList : protected Pointers {
|
||||
int kk2cpu; // 1 if this list is copied from Kokkos to CPU
|
||||
int copymode; // 1 if this is a Kokkos on-device copy
|
||||
int id; // copied from neighbor list request
|
||||
int molskip; // 1/2 if this is an intra-/inter-molecular skip list
|
||||
|
||||
// data structs to store neighbor pairs I,J and associated values
|
||||
|
||||
|
||||
@ -76,6 +76,7 @@ NeighRequest::NeighRequest(LAMMPS *_lmp) : Pointers(_lmp)
|
||||
skip = 0;
|
||||
iskip = nullptr;
|
||||
ijskip = nullptr;
|
||||
molskip = REGULAR;
|
||||
|
||||
// only set when command = 1;
|
||||
|
||||
@ -183,6 +184,8 @@ int NeighRequest::identical(NeighRequest *other)
|
||||
|
||||
int NeighRequest::same_skip(NeighRequest *other)
|
||||
{
|
||||
if (molskip != other->molskip) return 0;
|
||||
|
||||
const int ntypes = atom->ntypes;
|
||||
int same = 1;
|
||||
|
||||
@ -307,6 +310,12 @@ void NeighRequest::set_skip(int *_iskip, int **_ijskip)
|
||||
ijskip = _ijskip;
|
||||
}
|
||||
|
||||
void NeighRequest::set_molskip(int _molskip)
|
||||
{
|
||||
skip = 1;
|
||||
molskip = _molskip;
|
||||
}
|
||||
|
||||
void NeighRequest::enable_full()
|
||||
{
|
||||
half = 0;
|
||||
|
||||
@ -29,6 +29,9 @@ class NeighRequest : protected Pointers {
|
||||
friend class NPairSkipTrimIntel;
|
||||
friend class FixIntel;
|
||||
|
||||
public:
|
||||
enum { REGULAR, INTRA, INTER };
|
||||
|
||||
protected:
|
||||
void *requestor; // class that made request
|
||||
int requestor_instance; // instance of that class (only Fix, Compute, Pair)
|
||||
@ -88,6 +91,7 @@ class NeighRequest : protected Pointers {
|
||||
int skip; // 1 if this list skips atom types from another list
|
||||
int *iskip; // iskip[i] if atoms of type I are not in list
|
||||
int **ijskip; // ijskip[i][j] if pairs of type I,J are not in list
|
||||
int molskip; // 0 reqular list, 1 keep only intra-molecular entries, 2 keep inter-molecular
|
||||
|
||||
// command_style only set if command = 1
|
||||
// allows print_pair_info() to access command name
|
||||
@ -137,6 +141,7 @@ class NeighRequest : protected Pointers {
|
||||
void set_kokkos_device(int);
|
||||
void set_kokkos_host(int);
|
||||
void set_skip(int *, int **);
|
||||
void set_molskip(int);
|
||||
void enable_full();
|
||||
void enable_ghost();
|
||||
void enable_intel();
|
||||
|
||||
@ -1800,11 +1800,18 @@ void Neighbor::print_pairwise_info()
|
||||
else
|
||||
out += fmt::format(", half/full from ({})",rq->halffulllist+1);
|
||||
} else if (rq->skip) {
|
||||
if (rq->molskip) {
|
||||
if (rq->trim)
|
||||
out += fmt::format(", molskip trim from ({})",rq->skiplist+1);
|
||||
else
|
||||
out += fmt::format(", molskip from ({})",rq->skiplist+1);
|
||||
} else {
|
||||
if (rq->trim)
|
||||
out += fmt::format(", skip trim from ({})",rq->skiplist+1);
|
||||
else
|
||||
out += fmt::format(", skip from ({})",rq->skiplist+1);
|
||||
}
|
||||
}
|
||||
out += "\n";
|
||||
|
||||
// list of neigh list attributes
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include "error.h"
|
||||
#include "my_page.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -41,11 +42,13 @@ void NPairSkipTemp<TRIM>::build(NeighList *list)
|
||||
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
tagint *molecule = atom->molecule;
|
||||
|
||||
int *ilist = list->ilist;
|
||||
int *numneigh = list->numneigh;
|
||||
int **firstneigh = list->firstneigh;
|
||||
MyPage<int> *ipage = list->ipage;
|
||||
int molskip = list->molskip;
|
||||
|
||||
int *ilist_skip = list->listskip->ilist;
|
||||
int *numneigh_skip = list->listskip->numneigh;
|
||||
@ -71,7 +74,8 @@ void NPairSkipTemp<TRIM>::build(NeighList *list)
|
||||
for (ii = 0; ii < num_skip; ii++) {
|
||||
i = ilist_skip[ii];
|
||||
itype = type[i];
|
||||
if (iskip[itype]) continue;
|
||||
|
||||
if (!molskip && iskip[itype]) continue;
|
||||
|
||||
if (TRIM) {
|
||||
xtmp = x[i][0];
|
||||
@ -90,7 +94,9 @@ void NPairSkipTemp<TRIM>::build(NeighList *list)
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
joriginal = jlist[jj];
|
||||
j = joriginal & NEIGHMASK;
|
||||
if (ijskip[itype][type[j]]) continue;
|
||||
if (!molskip && ijskip[itype][type[j]]) continue;
|
||||
if ((molskip == NeighRequest::INTRA) && (molecule[i] != molecule[j])) continue;
|
||||
if ((molskip == NeighRequest::INTER) && (molecule[i] == molecule[j])) continue;
|
||||
|
||||
if (TRIM) {
|
||||
delx = xtmp - x[j][0];
|
||||
|
||||
@ -30,7 +30,8 @@ NPairStyle(skip/ghost,
|
||||
typedef NPairSkipTemp<0> NPairSkipSize;
|
||||
NPairStyle(skip/half/size,
|
||||
NPairSkipSize,
|
||||
NP_SKIP | NP_SIZE | NP_HALF | NP_FULL | NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_SKIP | NP_SIZE | NP_HALF | NP_FULL |
|
||||
NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI);
|
||||
|
||||
typedef NPairSkipTemp<1> NPairSkipTrim;
|
||||
@ -50,7 +51,8 @@ NPairStyle(skip/ghost/trim,
|
||||
typedef NPairSkipTemp<1> NPairSkipTrimSize;
|
||||
NPairStyle(skip/trim/half/size,
|
||||
NPairSkipTrimSize,
|
||||
NP_SKIP | NP_SIZE | NP_HALF | NP_FULL | NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_SKIP | NP_SIZE | NP_HALF | NP_FULL |
|
||||
NP_NSQ | NP_BIN | NP_MULTI | NP_MULTI_OLD |
|
||||
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_TRIM);
|
||||
|
||||
// clang-format on
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
#include "error.h"
|
||||
#include "my_page.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -39,11 +40,13 @@ void NPairSkipRespaTemp<TRIM>::build(NeighList *list)
|
||||
int *neighptr, *jlist, *neighptr_inner, *neighptr_middle;
|
||||
|
||||
int *type = atom->type;
|
||||
tagint *molecule = atom->molecule;
|
||||
|
||||
int *ilist = list->ilist;
|
||||
int *numneigh = list->numneigh;
|
||||
int **firstneigh = list->firstneigh;
|
||||
MyPage<int> *ipage = list->ipage;
|
||||
int molskip = list->molskip;
|
||||
|
||||
int *ilist_skip = list->listskip->ilist;
|
||||
int *numneigh_skip = list->listskip->numneigh;
|
||||
@ -90,7 +93,7 @@ void NPairSkipRespaTemp<TRIM>::build(NeighList *list)
|
||||
for (ii = 0; ii < inum_skip; ii++) {
|
||||
i = ilist_skip[ii];
|
||||
itype = type[i];
|
||||
if (iskip[itype]) continue;
|
||||
if (!molskip && iskip[itype]) continue;
|
||||
|
||||
if (TRIM) {
|
||||
xtmp = x[i][0];
|
||||
@ -114,7 +117,9 @@ void NPairSkipRespaTemp<TRIM>::build(NeighList *list)
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
joriginal = jlist[jj];
|
||||
j = joriginal & NEIGHMASK;
|
||||
if (ijskip[itype][type[j]]) continue;
|
||||
if (!molskip && ijskip[itype][type[j]]) continue;
|
||||
if ((molskip == NeighRequest::INTRA) && (molecule[i] != molecule[j])) continue;
|
||||
if ((molskip == NeighRequest::INTER) && (molecule[i] == molecule[j])) continue;
|
||||
|
||||
if (TRIM) {
|
||||
delx = xtmp - x[j][0];
|
||||
@ -135,7 +140,9 @@ void NPairSkipRespaTemp<TRIM>::build(NeighList *list)
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
joriginal = jlist[jj];
|
||||
j = joriginal & NEIGHMASK;
|
||||
if (ijskip[itype][type[j]]) continue;
|
||||
if (!molskip && ijskip[itype][type[j]]) continue;
|
||||
if ((molskip == NeighRequest::INTRA) && (molecule[i] != molecule[j])) continue;
|
||||
if ((molskip == NeighRequest::INTER) && (molecule[i] == molecule[j])) continue;
|
||||
|
||||
if (TRIM) {
|
||||
delx = xtmp - x[j][0];
|
||||
@ -157,7 +164,9 @@ void NPairSkipRespaTemp<TRIM>::build(NeighList *list)
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
joriginal = jlist[jj];
|
||||
j = joriginal & NEIGHMASK;
|
||||
if (ijskip[itype][type[j]]) continue;
|
||||
if (!molskip && ijskip[itype][type[j]]) continue;
|
||||
if ((molskip == NeighRequest::INTRA) && (molecule[i] != molecule[j])) continue;
|
||||
if ((molskip == NeighRequest::INTER) && (molecule[i] == molecule[j])) continue;
|
||||
|
||||
if (TRIM) {
|
||||
delx = xtmp - x[j][0];
|
||||
|
||||
@ -321,11 +321,12 @@ void PairHybrid::settings(int narg, char **arg)
|
||||
|
||||
iarg = 0;
|
||||
nstyles = 0;
|
||||
const std::string mystyle = force->pair_style;
|
||||
while (iarg < narg) {
|
||||
if (utils::strmatch(arg[iarg],"^hybrid"))
|
||||
error->all(FLERR,"Pair style hybrid cannot have hybrid as a sub-style");
|
||||
error->all(FLERR,"Pair style {} cannot have hybrid as a sub-style", mystyle);
|
||||
if (strcmp(arg[iarg],"none") == 0)
|
||||
error->all(FLERR,"Pair style hybrid cannot have none as a sub-style");
|
||||
error->all(FLERR,"Pair style {} cannot have none as a sub-style", mystyle);
|
||||
|
||||
styles[nstyles] = force->new_pair(arg[iarg],1,dummy);
|
||||
keywords[nstyles] = force->store_style(arg[iarg],0);
|
||||
@ -345,6 +346,9 @@ void PairHybrid::settings(int narg, char **arg)
|
||||
nstyles++;
|
||||
}
|
||||
|
||||
if (utils::strmatch(mystyle,"^hybrid/molecular") && (nstyles != 2))
|
||||
error->all(FLERR, "Pair style {} must have exactly two sub-styles", mystyle);
|
||||
|
||||
delete[] cutmax_style;
|
||||
cutmax_style = new double[nstyles];
|
||||
memset(cutmax_style, 0, nstyles*sizeof(double));
|
||||
@ -394,8 +398,7 @@ void PairHybrid::flags()
|
||||
for (m = 0; m < nstyles; m++) {
|
||||
if (styles[m]) comm_forward = MAX(comm_forward,styles[m]->comm_forward);
|
||||
if (styles[m]) comm_reverse = MAX(comm_reverse,styles[m]->comm_reverse);
|
||||
if (styles[m]) comm_reverse_off = MAX(comm_reverse_off,
|
||||
styles[m]->comm_reverse_off);
|
||||
if (styles[m]) comm_reverse_off = MAX(comm_reverse_off,styles[m]->comm_reverse_off);
|
||||
}
|
||||
|
||||
// single_enable = 1 if all sub-styles are set
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
#ifdef PAIR_CLASS
|
||||
// clang-format off
|
||||
PairStyle(hybrid,PairHybrid);
|
||||
PairStyle(hybrid/omp,PairHybrid);
|
||||
// clang-format on
|
||||
#else
|
||||
|
||||
|
||||
162
src/pair_hybrid_molecular.cpp
Normal file
162
src/pair_hybrid_molecular.cpp
Normal file
@ -0,0 +1,162 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
LAMMPS development team: developers@lammps.org
|
||||
|
||||
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.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "pair_hybrid_molecular.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "error.h"
|
||||
#include "neigh_request.h"
|
||||
#include "neighbor.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairHybridMolecular::PairHybridMolecular(LAMMPS *lmp) : PairHybridOverlay(lmp) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
modify neighbor list requests
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairHybridMolecular::init_style()
|
||||
{
|
||||
if (!atom->molecule_flag)
|
||||
error->all(FLERR, "Pair style hybrid/molecular requires atom attribute molecule");
|
||||
if (manybody_flag)
|
||||
error->all(FLERR, "Pair style hybrid/molecular is not compatible with manybody potentials");
|
||||
|
||||
PairHybridOverlay::init_style();
|
||||
|
||||
// modify neighbor list requests
|
||||
|
||||
bool first = true;
|
||||
for (auto &request : neighbor->get_pair_requests()) {
|
||||
if (first) {
|
||||
request->set_molskip(NeighRequest::INTRA);
|
||||
first = false;
|
||||
} else {
|
||||
request->set_molskip(NeighRequest::INTER);
|
||||
}
|
||||
}
|
||||
born_matrix_enable = 0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
init for one type pair i,j and corresponding j,i
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
double PairHybridMolecular::init_one(int i, int j)
|
||||
{
|
||||
// if I,J is not set explicitly:
|
||||
// perform mixing only if I,I sub-style = J,J sub-style
|
||||
// plus I,I and J,J need the same number of substyles
|
||||
|
||||
if (setflag[i][j] == 0) {
|
||||
if (nmap[i][i] != nmap[j][j])
|
||||
error->one(FLERR,"All pair coeffs are not set");
|
||||
int num = 0;
|
||||
for (int k = 0; k < nmap[i][i]; ++k) {
|
||||
for (int l = 0; l < nmap[j][j]; ++l) {
|
||||
if (map[i][i][k] == map[j][j][l]) {
|
||||
map[i][j][num] = map[i][i][k];
|
||||
++num;
|
||||
nmap[i][j] = num;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nmap[i][i] != nmap[i][j])
|
||||
error->one(FLERR,"All pair coeffs are not set");
|
||||
}
|
||||
nmap[j][i] = nmap[i][j];
|
||||
|
||||
// call init/mixing for all sub-styles of I,J
|
||||
// set cutsq in sub-style just as Pair::init() does via call to init_one()
|
||||
// set cutghost for I,J and J,I just as sub-style does
|
||||
// sum tail corrections for I,J
|
||||
// return max cutoff of all sub-styles assigned to I,J
|
||||
// if no sub-styles assigned to I,J (pair_coeff none), cutmax = 0.0 returned
|
||||
|
||||
double cutmax = 0.0;
|
||||
cutghost[i][j] = cutghost[j][i] = 0.0;
|
||||
if (tail_flag) etail_ij = ptail_ij = 0.0;
|
||||
|
||||
for (int k = 0; k < nmap[i][j]; k++) {
|
||||
map[j][i][k] = map[i][j][k];
|
||||
double cut = styles[map[i][j][k]]->init_one(i,j);
|
||||
if (styles[map[i][j][k]]->did_mix) did_mix = true;
|
||||
styles[map[i][j][k]]->cutsq[i][j] = styles[map[i][j][k]]->cutsq[j][i] = cut*cut;
|
||||
if (styles[map[i][j][k]]->ghostneigh)
|
||||
cutghost[i][j] = cutghost[j][i] = MAX(cutghost[i][j],styles[map[i][j][k]]->cutghost[i][j]);
|
||||
if (tail_flag) {
|
||||
etail_ij += styles[map[i][j][k]]->etail_ij;
|
||||
ptail_ij += styles[map[i][j][k]]->ptail_ij;
|
||||
}
|
||||
cutmax = MAX(cutmax,cut);
|
||||
|
||||
int istyle;
|
||||
for (istyle = 0; istyle < nstyles; istyle++)
|
||||
if (styles[istyle] == styles[map[i][j][k]]) break;
|
||||
|
||||
if (styles[istyle]->trim_flag) {
|
||||
|
||||
if (cut > cutmax_style[istyle]) {
|
||||
cutmax_style[istyle] = cut;
|
||||
|
||||
for (auto &request : neighbor->get_pair_requests()) {
|
||||
if (styles[istyle] == request->get_requestor()) {
|
||||
request->set_cutoff(cutmax_style[istyle]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return cutmax;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
call sub-style to compute single interaction
|
||||
error if sub-style does not support single() call
|
||||
since overlay could have multiple sub-styles, sum results explicitly
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
double PairHybridMolecular::single(int i, int j, int itype, int jtype, double rsq,
|
||||
double factor_coul, double factor_lj, double &fforce)
|
||||
{
|
||||
if (nmap[itype][jtype] == 0)
|
||||
error->one(FLERR,"Invoked pair single() on sub-style none");
|
||||
|
||||
double fone;
|
||||
fforce = 0.0;
|
||||
double esum = 0.0;
|
||||
if (nmap[itype][jtype] == 2) {
|
||||
int m = 0;
|
||||
if (atom->molecule[i] != atom->molecule[j]) m = 1;
|
||||
const int mystyle = map[itype][jtype][m];
|
||||
if (rsq < styles[mystyle]->cutsq[itype][jtype]) {
|
||||
if (styles[mystyle]->single_enable == 0)
|
||||
error->one(FLERR,"Pair hybrid/molecular sub-style {} does not support single() call",
|
||||
keywords[mystyle]);
|
||||
|
||||
if ((special_lj[mystyle] != nullptr) || (special_coul[mystyle] != nullptr))
|
||||
error->one(FLERR,"Pair hybrid/molecular single() calls do not support per sub-style "
|
||||
"special bond values");
|
||||
|
||||
esum += styles[mystyle]->single(i,j,itype,jtype,rsq,factor_coul,factor_lj,fone);
|
||||
fforce += fone;
|
||||
}
|
||||
}
|
||||
|
||||
if (single_extra) copy_svector(itype,jtype);
|
||||
return esum;
|
||||
}
|
||||
41
src/pair_hybrid_molecular.h
Normal file
41
src/pair_hybrid_molecular.h
Normal file
@ -0,0 +1,41 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
LAMMPS development team: developers@lammps.org
|
||||
|
||||
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.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
// clang-format off
|
||||
PairStyle(hybrid/molecular,PairHybridMolecular);
|
||||
PairStyle(hybrid/molecular/omp,PairHybridMolecular);
|
||||
// clang-format on
|
||||
#else
|
||||
|
||||
#ifndef LMP_PAIR_HYBRID_MOLECULAR_H
|
||||
#define LMP_PAIR_HYBRID_MOLECULAR_H
|
||||
|
||||
#include "pair_hybrid_overlay.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class PairHybridMolecular : public PairHybridOverlay {
|
||||
public:
|
||||
PairHybridMolecular(class LAMMPS *);
|
||||
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
|
||||
double single(int, int, int, int, double, double, double, double &) override;
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -14,6 +14,7 @@
|
||||
#ifdef PAIR_CLASS
|
||||
// clang-format off
|
||||
PairStyle(hybrid/overlay,PairHybridOverlay);
|
||||
PairStyle(hybrid/overlay/omp,PairHybridOverlay);
|
||||
// clang-format on
|
||||
#else
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
#ifdef PAIR_CLASS
|
||||
// clang-format off
|
||||
PairStyle(hybrid/scaled,PairHybridScaled);
|
||||
PairStyle(hybrid/scaled/omp,PairHybridScaled);
|
||||
// clang-format on
|
||||
#else
|
||||
|
||||
|
||||
@ -39,6 +39,8 @@ PairSoft::PairSoft(LAMMPS *lmp) : Pair(lmp)
|
||||
|
||||
PairSoft::~PairSoft()
|
||||
{
|
||||
if (copymode) return;
|
||||
|
||||
if (allocated) {
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(cutsq);
|
||||
|
||||
@ -49,7 +49,7 @@ class PairSoft : public Pair {
|
||||
double **prefactor;
|
||||
double **cut;
|
||||
|
||||
void allocate();
|
||||
virtual void allocate();
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -2,23 +2,40 @@
|
||||
# fep.py - calculate free energy from compute fep results
|
||||
|
||||
import sys
|
||||
from argparse import ArgumentParser
|
||||
import math
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print("Free Energy Perturbation")
|
||||
print("usage: fep.py temperature < out.fep")
|
||||
sys.exit()
|
||||
def compute_fep():
|
||||
|
||||
rt = 0.008314 / 4.184 * float(sys.argv[1]) # in kcal/mol
|
||||
parser = ArgumentParser(description='A python script to calculate free energy from compute fep results')
|
||||
|
||||
parser.add_argument("units", help="unit system can be lj, real or si")
|
||||
parser.add_argument("Temperature", type=float, help="The temperature of the system")
|
||||
parser.add_argument("InputFile", help="The name of the file with the data from compute fep.")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
r_value = {'lj': 1.0, 'real': 0.0019872036, 'si': 8.31446}
|
||||
|
||||
if args.units in r_value:
|
||||
rt = r_value[args.units] * args.Temperature
|
||||
else:
|
||||
sys.exit("The provided units keyword is not valid")
|
||||
|
||||
v = 1.0
|
||||
sum = 0.0
|
||||
for line in sys.stdin:
|
||||
mysum = 0.0
|
||||
|
||||
with open(args.InputFile, "r") as input_file:
|
||||
for line in input_file:
|
||||
if line.startswith("#"):
|
||||
continue
|
||||
tok = line.split()
|
||||
if len(tok) == 4:
|
||||
v = float(tok[3])
|
||||
sum += math.log(float(tok[2]) / v)
|
||||
mysum += math.log(float(tok[2]) / v)
|
||||
|
||||
print(-rt * mysum)
|
||||
|
||||
if __name__ == "__main__":
|
||||
compute_fep()
|
||||
|
||||
print(-rt * sum)
|
||||
|
||||
158
unittest/force-styles/tests/manybody-pair-uf3.yaml
Normal file
158
unittest/force-styles/tests/manybody-pair-uf3.yaml
Normal file
@ -0,0 +1,158 @@
|
||||
---
|
||||
lammps_version: 24 Mar 2022
|
||||
tags:
|
||||
date_generated: Tue Nov 28 14:51:03 2023
|
||||
epsilon: 1e-09
|
||||
skip_tests:
|
||||
prerequisites: ! |
|
||||
pair uf3
|
||||
pre_commands: ! |
|
||||
variable newton_pair delete
|
||||
variable newton_pair index on
|
||||
variable newton_bond delete
|
||||
post_commands: ! ""
|
||||
input_file: in.manybody
|
||||
pair_style: uf3 3
|
||||
pair_coeff: ! |
|
||||
* * Nb.uf3 Nb Nb Nb Nb Nb Nb Nb Nb
|
||||
extract: ! ""
|
||||
natoms: 64
|
||||
init_vdwl: -76.14388662099438
|
||||
init_coul: 0
|
||||
init_stress: ! |2-
|
||||
3.1223073343802071e+02 3.1503555484293474e+02 3.2087032195384182e+02 -5.2677023646012433e+00 4.1046361968856566e+01 -2.2705704820012654e-01
|
||||
init_forces: ! |2
|
||||
1 -1.0963106297354930e+00 1.9921565797217811e+00 2.0176595423650685e+00
|
||||
2 -2.5744974244934786e+00 8.6065313692841872e-01 -1.3343920771683084e+00
|
||||
3 -7.5762202587571881e-01 -5.1086473746213934e-01 1.7774798100697495e+00
|
||||
4 -1.2651178900120015e+00 2.5481168050091734e+00 1.0332353551246649e+00
|
||||
5 -3.3301075059618213e-02 -8.6936885426915711e-01 -8.0361144939346540e-01
|
||||
6 5.9576544655966956e-02 -5.7569733665007693e-02 -2.5260577270195245e-01
|
||||
7 -7.8223973805485159e-01 -1.5872724248886485e+00 -4.0690678808175756e-01
|
||||
8 1.2837377243355602e-01 6.8616887866365453e-02 3.9279992110159728e-02
|
||||
9 1.3013607224018784e+00 -2.2234802020121042e-01 -2.5820065882172409e+00
|
||||
10 -3.5389541898719123e-01 1.0418734269769769e+00 -6.7534263859128518e-01
|
||||
11 1.5048713773196754e+00 -1.1607474819622305e+00 -4.1343086960946002e-01
|
||||
12 -3.8382036374205457e+00 -1.8953194768009614e+00 -1.5975045274049304e+00
|
||||
13 -5.1243974635480005e-01 2.8005048190722506e+00 -8.5188627697957486e-01
|
||||
14 -4.3260615266171099e-01 1.7104546503175775e+00 4.8896255947620082e-01
|
||||
15 -2.1729171109783061e+00 1.9610148525080886e+00 -1.7550881080125238e+00
|
||||
16 1.3063694982664014e+00 4.0801741093678640e-01 3.3816303090167859e+00
|
||||
17 1.0103076935514768e+00 1.3062727533124225e+00 -3.0591856171743643e+00
|
||||
18 6.6364797168941592e-01 1.3269858177825717e+00 1.0859880651465830e+00
|
||||
19 -4.3237772669504843e-01 1.5179601478654310e+00 -8.9399081937433889e-01
|
||||
20 -4.1109776137187977e+00 4.8942123015814726e-01 3.0324705210921541e-02
|
||||
21 1.0443613152888414e+00 -2.7611218991110009e-01 -3.2334333893456133e+00
|
||||
22 -3.8840635954358733e+00 1.8543888965122868e+00 -2.7044170995178298e+00
|
||||
23 6.4824470795616951e-01 1.1930964693491897e+00 2.3472683895454201e+00
|
||||
24 5.6518885203578750e-01 8.9024666222906623e-01 9.9558410495963645e-01
|
||||
25 -2.3884920507811258e-01 -1.2236748552119361e-01 9.6166740424011798e-04
|
||||
26 -9.4060753459907698e-01 -2.9688412181022056e-01 6.7007032584453752e-01
|
||||
27 5.0390685311588923e-01 -5.8477364114704944e-01 1.6320689076693460e+00
|
||||
28 -8.1564347181637331e-01 1.9951358496458818e-01 3.2879220126777038e+00
|
||||
29 -1.6141037582891811e+00 3.7621933923780954e-01 5.6865013193370151e-01
|
||||
30 -1.2051389982059610e+00 6.5471000907223187e-02 4.6548238063076404e-02
|
||||
31 -8.3799333021355227e-01 -4.3387478264068147e-01 -3.4488785440063413e-01
|
||||
32 -1.8712481645378094e+00 3.1431436055998407e-02 1.1920833582466677e+00
|
||||
33 2.1132311819974756e+00 -7.8762333052322075e-01 2.9319369786200289e+00
|
||||
34 -7.4212669325944880e-01 1.5089695276247311e-01 6.4837671979385259e-01
|
||||
35 4.7876606586762549e-01 -5.2894027298845681e-01 6.5312176822087242e-01
|
||||
36 9.4335406181387005e-01 -7.7270400013223828e-01 4.8506498341757304e-01
|
||||
37 -6.9776523536821422e-01 1.5814045923629079e+00 -1.7145687025150753e+00
|
||||
38 8.3390581678419395e-01 -2.3460369438656256e-01 -8.1845978792256724e-01
|
||||
39 7.9082785819764490e-01 -1.4014821253885934e+00 -3.6171284136791626e+00
|
||||
40 1.5528260681499937e+00 -1.9423308463414859e+00 2.7454733155675826e-01
|
||||
41 1.6230449781222470e-01 4.0254440068393893e-01 -1.0728426614941826e+00
|
||||
42 -2.5760797297848943e+00 -2.3727612877133377e+00 -7.3694736943877159e-01
|
||||
43 -1.4658113294445060e-01 -3.7059450064886161e+00 -2.2611910919567893e-01
|
||||
44 2.6125365540590240e+00 -2.0393457867642488e+00 -1.7353429519549574e-01
|
||||
45 9.1508218547652620e-01 3.2090468646350390e-01 -1.3730810235354041e+00
|
||||
46 -1.2861926535120600e+00 -1.8325412123528377e+00 2.7409156132103112e+00
|
||||
47 5.2214882788544981e-01 9.0702150750152088e-02 1.3758849361839385e+00
|
||||
48 8.7060691872545093e-01 1.0333012026994193e+00 -8.8450736609033931e-01
|
||||
49 1.6921455867723978e-01 -3.2865843167979367e+00 -2.3941507623279072e+00
|
||||
50 1.3029435213640246e+00 1.1566980491369294e+00 -7.8373321422495534e-02
|
||||
51 1.7782167191801962e-01 3.5869618077998595e+00 2.1417753790319543e+00
|
||||
52 3.4939214706481048e+00 -2.4127970289820255e+00 4.1443505260596725e+00
|
||||
53 4.5955988135622799e-01 1.4913218496577223e+00 1.3076728090591363e+00
|
||||
54 7.0400726037068106e-01 -9.4898269328552198e-01 -7.0340401843204670e-01
|
||||
55 1.1319661424097816e+00 -2.3442414589969114e+00 -7.7166661047173946e-01
|
||||
56 7.7292681497946214e-01 5.4202239892193216e-01 -1.0429033367200278e+00
|
||||
57 1.1664627895682855e+00 1.9743121270468009e-01 -3.8302192241786348e-01
|
||||
58 1.3342985230821185e+00 -2.6808564460978351e-01 -9.3875599645237040e-01
|
||||
59 2.1547446695381884e+00 2.5922697594917221e-01 5.5883175680123842e-01
|
||||
60 -1.1202730918333845e+00 -4.0836109063032069e+00 -3.1463158656990915e+00
|
||||
61 7.5258775499505959e-01 1.4742795022217277e+00 -2.2056849646259416e-01
|
||||
62 -2.1194607090574338e+00 9.6304617778841872e-01 -5.8648933450219842e-01
|
||||
63 2.2116847362243819e+00 -6.9485816680348522e-01 -1.2888780585377166e+00
|
||||
64 2.0946943533672595e+00 1.7817828615230797e+00 5.2222100516662051e+00
|
||||
run_vdwl: -76.1335425447406
|
||||
run_coul: 0
|
||||
run_stress: ! |2-
|
||||
3.1227357278065733e+02 3.1510436259931976e+02 3.2097655273455166e+02 -5.2932374901106582e+00 4.0956468170617640e+01 1.5018802669860862e-01
|
||||
run_forces: ! |2
|
||||
1 -1.1136068191144672e+00 1.9868928531451695e+00 2.0284715885889444e+00
|
||||
2 -2.5718148688418596e+00 8.3532761170683545e-01 -1.3404690568364115e+00
|
||||
3 -7.6676194475345183e-01 -5.0716795928532021e-01 1.7997537336742999e+00
|
||||
4 -1.2720923579033645e+00 2.5419855255447907e+00 1.0258862987566395e+00
|
||||
5 -4.3524258688024453e-02 -8.8004954612209696e-01 -7.9382095260610019e-01
|
||||
6 8.9678254474529928e-02 -5.0742940694548030e-02 -2.4348008365156723e-01
|
||||
7 -7.7364435925734953e-01 -1.5558296160053275e+00 -4.2051790182009818e-01
|
||||
8 1.1143851887986839e-01 7.2497057799814191e-02 3.6624183488660304e-02
|
||||
9 1.2839141188983776e+00 -2.4381166390795905e-01 -2.5926851536420066e+00
|
||||
10 -3.6606370803571597e-01 1.0472513106007628e+00 -6.5579353351390024e-01
|
||||
11 1.4796344435746969e+00 -1.1469564140842350e+00 -4.2766370678100751e-01
|
||||
12 -3.8341194520315707e+00 -1.8877013457658414e+00 -1.5901839974079914e+00
|
||||
13 -4.6650968579193675e-01 2.7962961910932282e+00 -8.2237329615475063e-01
|
||||
14 -4.5362402854231521e-01 1.7048830533652388e+00 4.9165017205992945e-01
|
||||
15 -2.1790730324228798e+00 1.9552241266001966e+00 -1.7453842965710837e+00
|
||||
16 1.3028733875052598e+00 4.1039519382071737e-01 3.3783851223727419e+00
|
||||
17 1.0049330607671125e+00 1.3021263787131616e+00 -3.0544446010601831e+00
|
||||
18 6.3052176771903379e-01 1.3324251901771336e+00 1.0977786571785106e+00
|
||||
19 -4.5964705284123741e-01 1.4850585747490403e+00 -8.9955925151919691e-01
|
||||
20 -4.0843338981113764e+00 4.6843741575982639e-01 4.6947857407657889e-03
|
||||
21 1.0581909871649149e+00 -2.9084634536392007e-01 -3.2540160500533157e+00
|
||||
22 -3.8927799316015426e+00 1.8587085622785937e+00 -2.7125312751977178e+00
|
||||
23 6.6350903350923252e-01 1.1973095378961089e+00 2.3524290511459478e+00
|
||||
24 5.7143336751982488e-01 8.7715571174154605e-01 9.9432218349388102e-01
|
||||
25 -2.4703347062300032e-01 -1.2710986429222224e-01 -1.5749033311971992e-02
|
||||
26 -9.3451713960198701e-01 -2.7778133649821901e-01 6.6713867661147919e-01
|
||||
27 4.9808843860149610e-01 -5.8536464204160887e-01 1.6301914265685915e+00
|
||||
28 -8.2771277475903027e-01 2.1570720428840873e-01 3.2880151472957344e+00
|
||||
29 -1.6048620343875755e+00 3.8486480806372897e-01 5.6967398899129529e-01
|
||||
30 -1.1973961350199096e+00 5.1593120685595580e-02 4.1293831832017062e-02
|
||||
31 -8.4115448475027121e-01 -4.4444260925279200e-01 -3.3858426829044269e-01
|
||||
32 -1.8597577591090164e+00 1.2810085646854485e-02 1.1797889462030640e+00
|
||||
33 2.1159519472471811e+00 -7.8729199670032701e-01 2.9290939088097181e+00
|
||||
34 -7.4188497270023746e-01 1.5645497560825464e-01 6.6033973957472436e-01
|
||||
35 4.8203360935099837e-01 -5.2533146218590032e-01 6.5589135580856639e-01
|
||||
36 9.4037223416537397e-01 -7.6094150822319195e-01 4.5734538655438040e-01
|
||||
37 -6.9906373360474205e-01 1.5746536313295925e+00 -1.7263112595330459e+00
|
||||
38 8.5615988284237132e-01 -2.2431722964535125e-01 -8.0332888328255958e-01
|
||||
39 7.8065137836247200e-01 -1.3983715176027893e+00 -3.6344006191116991e+00
|
||||
40 1.5756754145077525e+00 -1.9548680562354619e+00 2.4171639489710248e-01
|
||||
41 1.7946227297557377e-01 4.1626928569421628e-01 -1.0542445180049111e+00
|
||||
42 -2.5855819286639807e+00 -2.3809591696792194e+00 -7.5444018878363772e-01
|
||||
43 -1.5651979567151933e-01 -3.7133196766462597e+00 -2.3417783002479109e-01
|
||||
44 2.6088788324017109e+00 -2.0370826629544276e+00 -1.7748087222007777e-01
|
||||
45 9.0750981150111454e-01 3.1320571808181447e-01 -1.3570279945304848e+00
|
||||
46 -1.2844641842483453e+00 -1.8271514736854049e+00 2.7652384797305016e+00
|
||||
47 5.2355177969578193e-01 9.5756521123463834e-02 1.3725765177085687e+00
|
||||
48 8.7731662768264451e-01 1.0414860079651591e+00 -9.0032888888892382e-01
|
||||
49 1.4644557239036082e-01 -3.3233388609839873e+00 -2.4250592659007468e+00
|
||||
50 1.3159886335597091e+00 1.1534831728413786e+00 -7.9023436269654135e-02
|
||||
51 1.5810961991408728e-01 3.6227053406802825e+00 2.1622129324293375e+00
|
||||
52 3.5238822669377128e+00 -2.4112486219526210e+00 4.1691651240037055e+00
|
||||
53 4.6279178075715538e-01 1.5349821135997805e+00 1.3624008261786760e+00
|
||||
54 7.0473247201702627e-01 -9.3593778743269240e-01 -7.0089892988315006e-01
|
||||
55 1.1161312397801737e+00 -2.3385526086116117e+00 -7.5151515336312336e-01
|
||||
56 7.6996392118239054e-01 5.3225925152027631e-01 -1.0367667800909899e+00
|
||||
57 1.1705705890031866e+00 1.9234764366836088e-01 -3.8394944778612211e-01
|
||||
58 1.3292217712869172e+00 -2.6420177775466325e-01 -9.5699172084102668e-01
|
||||
59 2.1842122534627268e+00 2.6220494593377625e-01 5.4393643560229021e-01
|
||||
60 -1.1457317620961742e+00 -4.1194027577964150e+00 -3.1920012226137322e+00
|
||||
61 7.5501968427331045e-01 1.4824037577796831e+00 -2.0845605296052469e-01
|
||||
62 -2.1181153169676303e+00 9.6226604332888710e-01 -5.7042120154066434e-01
|
||||
63 2.2161829432347631e+00 -7.0548049758710407e-01 -1.3062673143062038e+00
|
||||
64 2.1263589729936818e+00 1.8281740261598369e+00 5.2543331430537403e+00
|
||||
...
|
||||
100
unittest/force-styles/tests/mol-pair-hybrid_molecular.yaml
Normal file
100
unittest/force-styles/tests/mol-pair-hybrid_molecular.yaml
Normal file
@ -0,0 +1,100 @@
|
||||
---
|
||||
lammps_version: 17 Apr 2024
|
||||
tags:
|
||||
date_generated: Sun Jun 9 11:41:13 2024
|
||||
epsilon: 1e-13
|
||||
skip_tests:
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
pair lj/cut
|
||||
pair hybrid/molecular
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
pair_modify mix arithmetic
|
||||
pair_modify shift yes
|
||||
input_file: in.fourmol
|
||||
pair_style: hybrid/molecular lj/cut 8.0 lj/cut 8.0
|
||||
pair_coeff: ! |
|
||||
1 1 lj/cut 1 0.02 2.5
|
||||
2 2 lj/cut 1 0.005 1.0
|
||||
2 4 lj/cut 1 0.005 0.5
|
||||
3 3 lj/cut 1 0.02 3.2
|
||||
4 4 lj/cut 1 0.015 3.1
|
||||
5 5 lj/cut 1 0.015 3.1
|
||||
1 1 lj/cut 2 0.02 2.5
|
||||
2 2 lj/cut 2 0.005 1.0
|
||||
2 4 lj/cut 2 0.005 0.5
|
||||
3 3 lj/cut 2 0.02 3.2
|
||||
4 4 lj/cut 2 0.015 3.1
|
||||
5 5 lj/cut 2 0.015 3.1
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_vdwl: 749.2470096189497
|
||||
init_coul: 0
|
||||
init_stress: ! |2-
|
||||
2.1793857186503237e+03 2.1988957679770601e+03 4.6653994738862348e+03 -7.5956544622684351e+02 2.4751393539193327e+01 6.6652061873806679e+02
|
||||
init_forces: ! |2
|
||||
1 -2.3333390274530565e+01 2.6994567613591136e+02 3.3272827850621587e+02
|
||||
2 1.5828554630423909e+02 1.3025008843536872e+02 -1.8629682358915150e+02
|
||||
3 -1.3528903744071786e+02 -3.8704313350789641e+02 -1.4568978426110147e+02
|
||||
4 -7.8711096705734178e+00 2.1350518625352004e+00 -5.5954532185292400e+00
|
||||
5 -2.5176757267276137e+00 -4.0521510680612876e+00 1.2152704057983799e+01
|
||||
6 -8.3190665562047559e+02 9.6394165349388811e+02 1.1509101492424440e+03
|
||||
7 5.8203416066164465e+01 -3.3609013622052356e+02 -1.7179626006587687e+03
|
||||
8 1.4451392646293456e+02 -1.0927476052490437e+02 3.9990594285329479e+02
|
||||
9 7.9156945283109025e+01 8.5273009784086469e+01 3.5032175698457496e+02
|
||||
10 5.3118875219106917e+02 -6.1040990846582008e+02 -1.8355872692632028e+02
|
||||
11 -2.3530157265571860e+00 -5.9077640075588906e+00 -9.6590723956614433e+00
|
||||
12 1.7527155197359406e+01 1.0633119514682473e+01 -7.9254397903886158e+00
|
||||
13 8.0986409580712841e+00 -3.2098088269317300e+00 -1.4896399871387667e-01
|
||||
14 -3.3852721291218524e+00 6.8636181224987947e-01 -8.7507190862837803e+00
|
||||
15 -2.0454999188607306e-01 8.4846165523012136e+00 3.0131615419840623e+00
|
||||
16 4.6326331471561195e+02 -3.3087730492363477e+02 -1.1893030175606582e+03
|
||||
17 -4.5334322060634048e+02 3.1554297967975305e+02 1.2058423415744451e+03
|
||||
18 -1.8862629870158503e-02 -3.3402022492930034e-02 3.1000492146377390e-02
|
||||
19 3.1843079948447594e-04 -2.3918628211596124e-04 1.7427252652160224e-03
|
||||
20 -9.9760831169755002e-04 -1.0209184785886856e-03 3.6910973051849135e-04
|
||||
21 -7.1566158640374354e+01 -8.1615716383825756e+01 2.2589571940670788e+02
|
||||
22 -1.0808840769631149e+02 -2.6193799449067580e+01 -1.6957912849816358e+02
|
||||
23 1.7964463850759611e+02 1.0782102722442450e+02 -5.6305812731665995e+01
|
||||
24 3.6591423637378952e+01 -2.1181597497621908e+02 1.1218307103182993e+02
|
||||
25 -1.4851496072162067e+02 2.3907129270267117e+01 -1.2485640694398953e+02
|
||||
26 1.1191134671510581e+02 1.8789783424990625e+02 1.2650143102803206e+01
|
||||
27 5.1810412832328005e+01 -2.2705468907750404e+02 9.0849153441059272e+01
|
||||
28 -1.8041315533250560e+02 7.7534079082878250e+01 -1.2206962452216493e+02
|
||||
29 1.2861063251415737e+02 1.4952718246094852e+02 3.1216040111076957e+01
|
||||
run_vdwl: 719.4532389988315
|
||||
run_coul: 0
|
||||
run_stress: ! |2-
|
||||
2.1330157554553725e+03 2.1547730555430494e+03 4.3976512412988704e+03 -7.3873325485023713e+02 4.1743707190785464e+01 6.2788040986774649e+02
|
||||
run_forces: ! |2
|
||||
1 -2.0299419744961813e+01 2.6686193379336868e+02 3.2358785871037435e+02
|
||||
2 1.5298617928501707e+02 1.2596516341411086e+02 -1.7961292655320207e+02
|
||||
3 -1.3353630670276331e+02 -3.7923748676909099e+02 -1.4291839777232488e+02
|
||||
4 -7.8374717836014449e+00 2.1276610789788282e+00 -5.5845014473593917e+00
|
||||
5 -2.5014258629959465e+00 -4.0250131424457543e+00 1.2103512372172734e+01
|
||||
6 -8.0681466162480240e+02 9.2165651041424792e+02 1.0270802401119468e+03
|
||||
7 5.5780302775854636e+01 -3.1117544157318952e+02 -1.5746997989226002e+03
|
||||
8 1.3452983973683914e+02 -1.0064660034658647e+02 3.8851792520911863e+02
|
||||
9 7.6746213900459239e+01 8.2501469902247337e+01 3.3944351209160595e+02
|
||||
10 5.2128033526109800e+02 -5.9920098832868109e+02 -1.8126029871233905e+02
|
||||
11 -2.3573118088794365e+00 -5.8616944553482799e+00 -9.6049808813641686e+00
|
||||
12 1.7503975897697526e+01 1.0626930302269722e+01 -8.0603160114673926e+00
|
||||
13 8.0530313324242382e+00 -3.1756495175042607e+00 -1.4618315691984204e-01
|
||||
14 -3.3416065166863160e+00 6.6492606318663194e-01 -8.6345131440736740e+00
|
||||
15 -2.2253843262483208e-01 8.5025661635305205e+00 3.0369735873547175e+00
|
||||
16 4.3476329769010198e+02 -3.1171099668258080e+02 -1.1135222104230593e+03
|
||||
17 -4.2469864617016134e+02 2.9615424659116553e+02 1.1302578406458213e+03
|
||||
18 -1.8849988250623853e-02 -3.3371648038832503e-02 3.0986306282264790e-02
|
||||
19 3.0940278115793517e-04 -2.4634536779368854e-04 1.7433360016754921e-03
|
||||
20 -9.8648131231171901e-04 -1.0112587092668940e-03 3.6932949186791977e-04
|
||||
21 -7.0490777148272102e+01 -7.9749189729874402e+01 2.2171013458550721e+02
|
||||
22 -1.0638722739944252e+02 -2.5949513934649758e+01 -1.6645597092015180e+02
|
||||
23 1.7686805727889882e+02 1.0571023691370021e+02 -5.5243362166860535e+01
|
||||
24 3.8206035227327128e+01 -2.1022829679057401e+02 1.1260716393332925e+02
|
||||
25 -1.4918888258035886e+02 2.3762162241718102e+01 -1.2549193847418989e+02
|
||||
26 1.1097064525776705e+02 1.8645512086371158e+02 1.2861565481437628e+01
|
||||
27 5.0800867695850577e+01 -2.2296598219372004e+02 8.8607407764830413e+01
|
||||
28 -1.7694198509380672e+02 7.6029979926844575e+01 -1.1950523558040683e+02
|
||||
29 1.2614900659680345e+02 1.4694257504728049e+02 3.0893400701043564e+01
|
||||
...
|
||||
@ -0,0 +1,119 @@
|
||||
---
|
||||
lammps_version: 17 Apr 2024
|
||||
tags:
|
||||
date_generated: Sun Jun 9 11:41:13 2024
|
||||
epsilon: 1e-13
|
||||
skip_tests:
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
pair lj/cut
|
||||
pair morse
|
||||
pair hybrid/molecular
|
||||
pre_commands: ! ""
|
||||
post_commands: ! |
|
||||
pair_modify mix arithmetic
|
||||
pair_modify shift yes
|
||||
input_file: in.fourmol
|
||||
pair_style: hybrid/molecular lj/cut 8.0 morse 8.0
|
||||
pair_coeff: ! |
|
||||
1 1 lj/cut 0.02 2.5
|
||||
1 2 lj/cut 0.01 1.75
|
||||
1 3 lj/cut 0.02 2.85
|
||||
1 4 lj/cut 0.01732050807568877293 2.8
|
||||
1 5 lj/cut 0.01732050807568877293 2.8
|
||||
2 2 lj/cut 0.005 1.0
|
||||
2 3 lj/cut 0.01 2.1
|
||||
2 4 lj/cut 0.005 0.5
|
||||
2 5 lj/cut 0.00866025403784438646 2.05
|
||||
3 3 lj/cut 0.02 3.2
|
||||
3 4 lj/cut 0.01732050807568877293 3.15
|
||||
3 5 lj/cut 0.01732050807568877293 3.15
|
||||
4 4 lj/cut 0.015 3.1
|
||||
4 5 lj/cut 0.015 3.1
|
||||
5 5 lj/cut 0.015 3.1
|
||||
1 1 morse 0.0202798941614106 2.78203488021395 2.725417159299
|
||||
1 2 morse 0.0101167811264648 3.9793050302425 1.90749569018897
|
||||
1 3 morse 0.0202934330695928 2.43948720203264 3.10711749999622
|
||||
1 4 morse 0.0175731334238374 2.48316585521317 3.05258880102438
|
||||
1 5 morse 0.0175731334238374 2.48316585521317 3.05258880102438
|
||||
2 2 morse 0.00503064360487288 6.98433077606902 1.08960295117864
|
||||
2 3 morse 0.0101296013842819 3.31380153807866 2.28919067558352
|
||||
2 4 morse 0.00497405122588691 14.0508902925745 0.544416409093563
|
||||
2 5 morse 0.00877114211614446 3.39491256196178 2.23466262511073
|
||||
3 3 morse 0.0203039874239943 2.17204344301477 3.48881895084762
|
||||
3 4 morse 0.0175825321440736 2.20660439192238 3.43428999287994
|
||||
3 5 morse 0.0175825321440736 2.20660439192238 3.43428999287994
|
||||
4 4 morse 0.0152259201379927 2.24227873774009 3.37976131582396
|
||||
4 5 morse 0.0152259201379927 2.24227873774009 3.37976131582396
|
||||
5 5 morse 0.0152259201379927 2.24227873774009 3.37976131582396
|
||||
extract: ! ""
|
||||
natoms: 29
|
||||
init_vdwl: 642.2857035487534
|
||||
init_coul: 0
|
||||
init_stress: ! |2-
|
||||
1.5446101412530770e+03 1.7762864877230827e+03 4.3406629723991382e+03 -2.4168966825090698e+02 -4.2399281241000449e+02 1.0313398732648857e+03
|
||||
init_forces: ! |2
|
||||
1 -2.3337658999820331e+01 2.6994849929388920e+02 3.3272731927204762e+02
|
||||
2 1.5828475525620013e+02 1.3025198646645657e+02 -1.8629727921784635e+02
|
||||
3 -1.3530883593401191e+02 -3.8702990176780906e+02 -1.4568955729804821e+02
|
||||
4 -7.8720974048138279e+00 2.1357285334450031e+00 -5.5956697614574145e+00
|
||||
5 -2.5179872246085657e+00 -4.0521698308193113e+00 1.2152426584580066e+01
|
||||
6 -1.0627539753780246e+02 3.7096636535889553e+02 1.6577829288882351e+03
|
||||
7 6.2545311732649182e+01 -3.3857732069504033e+02 -1.7085638850072914e+03
|
||||
8 -5.8544805218664203e+02 4.8619364551174579e+02 -1.1637016110669298e+02
|
||||
9 7.9157108381891348e+01 8.5271268694585373e+01 3.5031950365280102e+02
|
||||
10 5.3119792393751504e+02 -6.1042010285634149e+02 -1.8355328074325874e+02
|
||||
11 -2.3525975498215241e+00 -5.9087312467830966e+00 -9.6592450379633981e+00
|
||||
12 1.7514418718210869e+01 1.0633490551535797e+01 -7.9269392455530774e+00
|
||||
13 8.0989976759274995e+00 -3.2092537736156967e+00 -1.4857368826935238e-01
|
||||
14 -3.3831155658252769e+00 6.8583230320825528e-01 -8.7521044176224088e+00
|
||||
15 -2.0078689909299524e-01 8.4842702953333049e+00 3.0127255727602438e+00
|
||||
16 4.6326713730462569e+02 -3.3088113342819690e+02 -1.1892994362776039e+03
|
||||
17 -4.5333858978430715e+02 3.1553830929611308e+02 1.2058459850635415e+03
|
||||
18 -2.0452760511035117e-02 -3.1643654311568722e-02 2.7038063904994043e-02
|
||||
19 6.7683676563436612e-04 5.5257878746558435e-04 3.4368881128008698e-04
|
||||
20 -7.2687428125721442e-04 -6.4369255876917293e-04 -7.3055429537143658e-05
|
||||
21 -7.1559739956792001e+01 -8.1623086552077027e+01 2.2588907386171752e+02
|
||||
22 -1.0808827580116072e+02 -2.6193999003846525e+01 -1.6957935616989226e+02
|
||||
23 1.7964485683675787e+02 1.0782085824265097e+02 -5.6306005220676077e+01
|
||||
24 3.6592705490564995e+01 -2.1181065162415683e+02 1.1218892889291895e+02
|
||||
25 -1.4851386780240065e+02 2.3908077402265249e+01 -1.2485428291933182e+02
|
||||
26 1.1191162087301427e+02 1.8789805761651786e+02 1.2650515090480996e+01
|
||||
27 5.1805674347396028e+01 -2.2705907095144718e+02 9.0852216146745278e+01
|
||||
28 -1.8041330407833553e+02 7.7533936594765862e+01 -1.2206953762508090e+02
|
||||
29 1.2861029896870866e+02 1.4952683033680830e+02 3.1216382013473979e+01
|
||||
run_vdwl: 612.532027437114
|
||||
run_coul: 0
|
||||
run_stress: ! |2-
|
||||
1.5079612443981077e+03 1.7300922919292559e+03 4.0645404509935297e+03 -2.2501656863720930e+02 -3.8440649220519191e+02 9.6872117407090468e+02
|
||||
run_forces: ! |2
|
||||
1 -2.0303664163328520e+01 2.6686344032747223e+02 3.2358595259116754e+02
|
||||
2 1.5298537986232245e+02 1.2596704781215615e+02 -1.7961336269199933e+02
|
||||
3 -1.3340899705451542e+02 -3.7937983996408559e+02 -1.4304731523709151e+02
|
||||
4 -7.8384621494638589e+00 2.1283385602122546e+00 -5.5847156581558837e+00
|
||||
5 -2.5017213737297879e+00 -4.0250398342732856e+00 1.2103221315331954e+01
|
||||
6 -1.0069389067343234e+02 3.4070704568948952e+02 1.4995989516904360e+03
|
||||
7 5.6637967265264535e+01 -3.0800622792471370e+02 -1.5506690902144287e+03
|
||||
8 -5.6211472712331181e+02 4.6807109251305587e+02 -1.0712697415342610e+02
|
||||
9 7.6069407842570087e+01 8.0619386602314336e+01 3.3418245682682038e+02
|
||||
10 5.1153094792744940e+02 -5.8811350830044319e+02 -1.7678443640175220e+02
|
||||
11 -2.3568347685072353e+00 -5.8621926046697821e+00 -9.6044928327397194e+00
|
||||
12 1.7464493846680174e+01 1.0623724119993449e+01 -8.0428896399820058e+00
|
||||
13 8.0533880511151636e+00 -3.1750913604087598e+00 -1.4579751155151741e-01
|
||||
14 -3.3394709175794697e+00 6.6440083564233665e-01 -8.6358918170724337e+00
|
||||
15 -2.1889102849274136e-01 8.5021207266300767e+00 3.0365920030191385e+00
|
||||
16 4.3476429812120438e+02 -3.1171100998816553e+02 -1.1135203700101538e+03
|
||||
17 -4.2469867717957146e+02 2.9615706504039451e+02 1.1302529422580635e+03
|
||||
18 -2.0438484585882859e-02 -3.1629705308846789e-02 2.7018991453856001e-02
|
||||
19 6.6852492737214141e-04 5.4625495751892833e-04 3.4152455215868423e-04
|
||||
20 -7.1620896561888831e-04 -6.3500663583982407e-04 -7.1700429767679216e-05
|
||||
21 -7.0484355349417541e+01 -7.9756579011007801e+01 2.2170349595393003e+02
|
||||
22 -1.0638710558378827e+02 -2.5949713015442118e+01 -1.6645620880910886e+02
|
||||
23 1.7686828769914484e+02 1.0571007956441812e+02 -5.5243556600722584e+01
|
||||
24 3.8207315780355771e+01 -2.1022299522635379e+02 1.1261302962088173e+02
|
||||
25 -1.4918780612527124e+02 2.3763111781582175e+01 -1.2548982817638399e+02
|
||||
26 1.1097093258138914e+02 1.8645536456663984e+02 1.2861936841695268e+01
|
||||
27 5.0796145560529055e+01 -2.2297034959629724e+02 8.8610475497234873e+01
|
||||
28 -1.7694213444502824e+02 7.6029840540845129e+01 -1.1950515191029582e+02
|
||||
29 1.2614865956603674e+02 1.4694220660200173e+02 3.0893738250707873e+01
|
||||
...
|
||||
Reference in New Issue
Block a user