Update from upstream
This commit is contained in:
@ -339,7 +339,6 @@ pkg_depends(ML-IAP ML-SNAP)
|
||||
pkg_depends(MPIIO MPI)
|
||||
pkg_depends(ATC MANYBODY)
|
||||
pkg_depends(LATBOLTZ MPI)
|
||||
pkg_depends(PHONON KSPACE)
|
||||
pkg_depends(SCAFACOS MPI)
|
||||
pkg_depends(DIELECTRIC KSPACE)
|
||||
pkg_depends(DIELECTRIC EXTRA-PAIR)
|
||||
@ -609,7 +608,7 @@ endif()
|
||||
# packages which selectively include variants based on enabled styles
|
||||
# e.g. accelerator packages
|
||||
######################################################################
|
||||
foreach(PKG_WITH_INCL CORESHELL QEQ OPENMP DPD-SMOOTH KOKKOS OPT INTEL GPU)
|
||||
foreach(PKG_WITH_INCL CORESHELL DPD-SMOOTH PHONON QEQ OPENMP KOKKOS OPT INTEL GPU)
|
||||
if(PKG_${PKG_WITH_INCL})
|
||||
include(Packages/${PKG_WITH_INCL})
|
||||
endif()
|
||||
|
||||
@ -306,12 +306,12 @@ elseif(GPU_API STREQUAL "HIP")
|
||||
|
||||
if(HIP_COMPILER STREQUAL "clang")
|
||||
add_custom_command(OUTPUT ${CUBIN_FILE}
|
||||
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --genco --offload-arch=${HIP_ARCH} -O3 -ffast-math -DUSE_HIP -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES} -I${LAMMPS_LIB_SOURCE_DIR}/gpu -o ${CUBIN_FILE} ${CU_CPP_FILE}
|
||||
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --genco --offload-arch=${HIP_ARCH} -O3 -DUSE_HIP -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES} -I${LAMMPS_LIB_SOURCE_DIR}/gpu -o ${CUBIN_FILE} ${CU_CPP_FILE}
|
||||
DEPENDS ${CU_CPP_FILE}
|
||||
COMMENT "Generating ${CU_NAME}.cubin")
|
||||
else()
|
||||
add_custom_command(OUTPUT ${CUBIN_FILE}
|
||||
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --genco -t="${HIP_ARCH}" -f=\"-O3 -ffast-math -DUSE_HIP -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES} -I${LAMMPS_LIB_SOURCE_DIR}/gpu\" -o ${CUBIN_FILE} ${CU_CPP_FILE}
|
||||
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --genco -t="${HIP_ARCH}" -f=\"-O3 -DUSE_HIP -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES} -I${LAMMPS_LIB_SOURCE_DIR}/gpu\" -o ${CUBIN_FILE} ${CU_CPP_FILE}
|
||||
DEPENDS ${CU_CPP_FILE}
|
||||
COMMENT "Generating ${CU_NAME}.cubin")
|
||||
endif()
|
||||
|
||||
@ -109,6 +109,12 @@ if(PKG_KSPACE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if(PKG_PHONON)
|
||||
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/dynamical_matrix_kokkos.cpp)
|
||||
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/third_order_kokkos.cpp)
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL PROPERTY "KOKKOS_PKG_SOURCES" "${KOKKOS_PKG_SOURCES}")
|
||||
|
||||
# detects styles which have KOKKOS version
|
||||
|
||||
9
cmake/Modules/Packages/PHONON.cmake
Normal file
9
cmake/Modules/Packages/PHONON.cmake
Normal file
@ -0,0 +1,9 @@
|
||||
# fix phonon may only be installed if also the FFT wrappers from KSPACE are installed
|
||||
if(NOT PKG_KSPACE)
|
||||
get_property(LAMMPS_FIX_HEADERS GLOBAL PROPERTY FIX)
|
||||
list(REMOVE_ITEM LAMMPS_FIX_HEADERS ${LAMMPS_SOURCE_DIR}/PHONON/fix_phonon.h)
|
||||
set_property(GLOBAL PROPERTY FIX "${LAMMPS_FIX_HEADERS}")
|
||||
get_target_property(LAMMPS_SOURCES lammps SOURCES)
|
||||
list(REMOVE_ITEM LAMMPS_SOURCES ${LAMMPS_SOURCE_DIR}/PHONON/fix_phonon.cpp)
|
||||
set_property(TARGET lammps PROPERTY SOURCES "${LAMMPS_SOURCES}")
|
||||
endif()
|
||||
@ -1,4 +1,4 @@
|
||||
.TH LAMMPS "1" "14 December 2021" "2021-12-14"
|
||||
.TH LAMMPS "1" "7 January 2022" "2022-1-7"
|
||||
.SH NAME
|
||||
.B LAMMPS
|
||||
\- Molecular Dynamics Simulator.
|
||||
|
||||
@ -1123,9 +1123,12 @@ Bibliography
|
||||
**(Sun)**
|
||||
Sun, J. Phys. Chem. B, 102, 7338-7364 (1998).
|
||||
|
||||
**(Surblys)**
|
||||
**(Surblys2019)**
|
||||
Surblys, Matsubara, Kikugawa, Ohara, Phys Rev E, 99, 051301(R) (2019).
|
||||
|
||||
**(Surblys2021)**
|
||||
Surblys, Matsubara, Kikugawa, Ohara, J Appl Phys 130, 215104 (2021).
|
||||
|
||||
**(Sutmann)**
|
||||
Sutmann, Arnold, Fahrenberger, et. al., Physical review / E 88(6), 063308 (2013)
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ An alphabetic list of all general LAMMPS commands.
|
||||
* :doc:`displace_atoms <displace_atoms>`
|
||||
* :doc:`dump <dump>`
|
||||
* :doc:`dump_modify <dump_modify>`
|
||||
* :doc:`dynamical_matrix <dynamical_matrix>`
|
||||
* :doc:`dynamical_matrix (k) <dynamical_matrix>`
|
||||
* :doc:`echo <echo>`
|
||||
* :doc:`fix <fix>`
|
||||
* :doc:`fix_modify <fix_modify>`
|
||||
@ -117,7 +117,7 @@ An alphabetic list of all general LAMMPS commands.
|
||||
* :doc:`thermo <thermo>`
|
||||
* :doc:`thermo_modify <thermo_modify>`
|
||||
* :doc:`thermo_style <thermo_style>`
|
||||
* :doc:`third_order <third_order>`
|
||||
* :doc:`third_order (k) <third_order>`
|
||||
* :doc:`timer <timer>`
|
||||
* :doc:`timestep <timestep>`
|
||||
* :doc:`uncompute <uncompute>`
|
||||
|
||||
@ -28,6 +28,7 @@ KOKKOS, o = OPENMP, t = OPT.
|
||||
* :doc:`angle <compute_angle>`
|
||||
* :doc:`angle/local <compute_angle_local>`
|
||||
* :doc:`angmom/chunk <compute_angmom_chunk>`
|
||||
* :doc:`ave/sphere/atom (k) <compute_ave_sphere_atom>`
|
||||
* :doc:`basal/atom <compute_basal_atom>`
|
||||
* :doc:`body/local <compute_body_local>`
|
||||
* :doc:`bond <compute_bond>`
|
||||
|
||||
@ -129,6 +129,7 @@ OPT.
|
||||
* :doc:`npt/sphere (o) <fix_npt_sphere>`
|
||||
* :doc:`npt/uef <fix_nh_uef>`
|
||||
* :doc:`numdiff <fix_numdiff>`
|
||||
* :doc:`numdiff/virial <fix_numdiff_virial>`
|
||||
* :doc:`nve (giko) <fix_nve>`
|
||||
* :doc:`nve/asphere (gi) <fix_nve_asphere>`
|
||||
* :doc:`nve/asphere/noforce <fix_nve_asphere_noforce>`
|
||||
|
||||
@ -119,6 +119,7 @@ OPT.
|
||||
* :doc:`granular <pair_granular>`
|
||||
* :doc:`gw <pair_gw>`
|
||||
* :doc:`gw/zbl <pair_gw>`
|
||||
* :doc:`harmonic/cut (o) <pair_harmonic_cut>`
|
||||
* :doc:`hbond/dreiding/lj (o) <pair_hbond_dreiding>`
|
||||
* :doc:`hbond/dreiding/morse (o) <pair_hbond_dreiding>`
|
||||
* :doc:`hdnnp <pair_hdnnp>`
|
||||
|
||||
@ -225,7 +225,7 @@ follows:
|
||||
commands in an input script.
|
||||
|
||||
- The Force class computes various forces between atoms. The Pair
|
||||
parent class is for non-bonded or pair-wise forces, which in LAMMPS
|
||||
parent class is for non-bonded or pairwise forces, which in LAMMPS
|
||||
also includes many-body forces such as the Tersoff 3-body potential if
|
||||
those are computed by walking pairwise neighbor lists. The Bond,
|
||||
Angle, Dihedral, Improper parent classes are styles for bonded
|
||||
|
||||
@ -56,11 +56,11 @@ String to number conversions with validity check
|
||||
|
||||
These functions should be used to convert strings to numbers. They are
|
||||
are strongly preferred over C library calls like ``atoi()`` or
|
||||
``atof()`` since they check if the **entire** provided string is a valid
|
||||
``atof()`` since they check if the **entire** string is a valid
|
||||
(floating-point or integer) number, and will error out instead of
|
||||
silently returning the result of a partial conversion or zero in cases
|
||||
where the string is not a valid number. This behavior allows to more
|
||||
easily detect typos or issues when processing input files.
|
||||
where the string is not a valid number. This behavior improves
|
||||
detecting typos or issues when processing input files.
|
||||
|
||||
Similarly the :cpp:func:`logical() <LAMMPS_NS::utils::logical>` function
|
||||
will convert a string into a boolean and will only accept certain words.
|
||||
@ -76,19 +76,34 @@ strings for compliance without conversion.
|
||||
|
||||
----------
|
||||
|
||||
.. doxygenfunction:: numeric
|
||||
.. doxygenfunction:: numeric(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp)
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: inumeric
|
||||
.. doxygenfunction:: numeric(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp)
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: bnumeric
|
||||
.. doxygenfunction:: inumeric(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp)
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: tnumeric
|
||||
.. doxygenfunction:: inumeric(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp)
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: logical
|
||||
.. doxygenfunction:: bnumeric(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp)
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: bnumeric(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp)
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: tnumeric(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp)
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: tnumeric(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp)
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: logical(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp)
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: logical(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp)
|
||||
:project: progguide
|
||||
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ of each timestep. First of all, implement a constructor:
|
||||
if (narg < 4)
|
||||
error->all(FLERR,"Illegal fix print/vel command");
|
||||
|
||||
nevery = force->inumeric(FLERR,arg[3]);
|
||||
nevery = utils::inumeric(FLERR,arg[3],false,lmp);
|
||||
if (nevery <= 0)
|
||||
error->all(FLERR,"Illegal fix print/vel command");
|
||||
}
|
||||
|
||||
@ -1941,6 +1941,9 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
|
||||
*Compute ID for fix numdiff does not exist*
|
||||
Self-explanatory.
|
||||
|
||||
*Compute ID for fix numdiff/virial does not exist*
|
||||
Self-explanatory.
|
||||
|
||||
*Compute ID for fix store/state does not exist*
|
||||
Self-explanatory.
|
||||
|
||||
@ -3796,6 +3799,10 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
|
||||
Self-explanatory. Efficient loop over all atoms for numerical
|
||||
difference requires consecutive atom IDs.
|
||||
|
||||
*Fix numdiff/virial must use group all*
|
||||
Virial contributions computed by this fix are
|
||||
computed on all atoms.
|
||||
|
||||
*Fix nve/asphere requires extended particles*
|
||||
This fix can only be used for particles with a shape setting.
|
||||
|
||||
@ -7772,9 +7779,6 @@ keyword to allow for additional bonds to be formed
|
||||
The system size must fit in a 32-bit integer to use this dump
|
||||
style.
|
||||
|
||||
*Too many atoms to dump sort*
|
||||
Cannot sort when running with more than 2\^31 atoms.
|
||||
|
||||
*Too many elements extracted from MEAM library.*
|
||||
Increase 'maxelt' in meam.h and recompile.
|
||||
|
||||
|
||||
@ -416,7 +416,7 @@ This will most likely cause errors in kinetic fluctuations.
|
||||
not defined for the specified atom style.
|
||||
|
||||
*Molecule has bond topology but no special bond settings*
|
||||
This means the bonded atoms will not be excluded in pair-wise
|
||||
This means the bonded atoms will not be excluded in pairwise
|
||||
interactions.
|
||||
|
||||
*Molecule template for create_atoms has multiple molecules*
|
||||
|
||||
@ -12,24 +12,24 @@ includes some optional methods to enable its use with rRESPA.
|
||||
|
||||
Here is a brief description of the class methods in pair.h:
|
||||
|
||||
+---------------------------------+-------------------------------------------------------------------+
|
||||
| compute | workhorse routine that computes pairwise interactions |
|
||||
+---------------------------------+-------------------------------------------------------------------+
|
||||
| settings | reads the input script line with arguments you define |
|
||||
+---------------------------------+-------------------------------------------------------------------+
|
||||
| coeff | set coefficients for one i,j type pair |
|
||||
+---------------------------------+-------------------------------------------------------------------+
|
||||
| init_one | perform initialization for one i,j type pair |
|
||||
+---------------------------------+-------------------------------------------------------------------+
|
||||
| init_style | initialization specific to this pair style |
|
||||
+---------------------------------+-------------------------------------------------------------------+
|
||||
| write & read_restart | write/read i,j pair coeffs to restart files |
|
||||
+---------------------------------+-------------------------------------------------------------------+
|
||||
| write & read_restart_settings | write/read global settings to restart files |
|
||||
+---------------------------------+-------------------------------------------------------------------+
|
||||
| single | force and energy of a single pairwise interaction between 2 atoms |
|
||||
+---------------------------------+-------------------------------------------------------------------+
|
||||
| compute_inner/middle/outer | versions of compute used by rRESPA |
|
||||
+---------------------------------+-------------------------------------------------------------------+
|
||||
+---------------------------------+---------------------------------------------------------------------+
|
||||
| compute | workhorse routine that computes pairwise interactions |
|
||||
+---------------------------------+---------------------------------------------------------------------+
|
||||
| settings | reads the input script line with arguments you define |
|
||||
+---------------------------------+---------------------------------------------------------------------+
|
||||
| coeff | set coefficients for one i,j type pair |
|
||||
+---------------------------------+---------------------------------------------------------------------+
|
||||
| init_one | perform initialization for one i,j type pair |
|
||||
+---------------------------------+---------------------------------------------------------------------+
|
||||
| init_style | initialization specific to this pair style |
|
||||
+---------------------------------+---------------------------------------------------------------------+
|
||||
| write & read_restart | write/read i,j pair coeffs to restart files |
|
||||
+---------------------------------+---------------------------------------------------------------------+
|
||||
| write & read_restart_settings | write/read global settings to restart files |
|
||||
+---------------------------------+---------------------------------------------------------------------+
|
||||
| single | force/r and energy of a single pairwise interaction between 2 atoms |
|
||||
+---------------------------------+---------------------------------------------------------------------+
|
||||
| compute_inner/middle/outer | versions of compute used by rRESPA |
|
||||
+---------------------------------+---------------------------------------------------------------------+
|
||||
|
||||
The inner/middle/outer routines are optional.
|
||||
|
||||
@ -305,6 +305,40 @@ you are uncertain, please ask.
|
||||
FILE pointers and only be done on MPI rank 0. Use the :cpp:func:`utils::logmesg`
|
||||
convenience function where possible.
|
||||
|
||||
- Usage of C++11 `virtual`, `override`, `final` keywords: Please follow the
|
||||
`C++ Core Guideline C.128 <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rh-override>`_.
|
||||
That means, you should only use `virtual` to declare a new virtual
|
||||
function, `override` to indicate you are overriding an existing virtual
|
||||
function, and `final` to prevent any further overriding.
|
||||
|
||||
- Trivial destructors: Prefer not writing destructors when they are empty and `default`.
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
// don't write destructors for A or B like this
|
||||
class A : protected Pointers {
|
||||
public:
|
||||
A();
|
||||
~A() override {}
|
||||
};
|
||||
|
||||
class B : protected Pointers {
|
||||
public:
|
||||
B();
|
||||
~B() override = default;
|
||||
};
|
||||
|
||||
// instead, let the compiler create the implicit default destructor by not writing it
|
||||
class A : protected Pointers {
|
||||
public:
|
||||
A();
|
||||
};
|
||||
|
||||
class B : protected Pointers {
|
||||
public:
|
||||
B();
|
||||
};
|
||||
|
||||
- Header files, especially those defining a "style", should only use
|
||||
the absolute minimum number of include files and **must not** contain
|
||||
any ``using`` statements. Typically that would be only the header for
|
||||
|
||||
@ -1880,6 +1880,12 @@ MPIIO library. It adds :doc:`dump styles <dump>` with a "mpiio" in
|
||||
their style name. Restart files with an ".mpiio" suffix are also
|
||||
written and read in parallel.
|
||||
|
||||
.. warning::
|
||||
|
||||
The MPIIO package is currently unmaintained and has become
|
||||
unreliable. Use with caution.
|
||||
|
||||
|
||||
**Install:**
|
||||
|
||||
The MPIIO package requires that LAMMPS is build in :ref:`MPI parallel mode <serial>`.
|
||||
|
||||
@ -106,7 +106,7 @@ individual ranks. Here is an example output for this section:
|
||||
----------
|
||||
|
||||
The third section above lists the number of owned atoms (Nlocal),
|
||||
ghost atoms (Nghost), and pair-wise neighbors stored per processor.
|
||||
ghost atoms (Nghost), and pairwise neighbors stored per processor.
|
||||
The max and min values give the spread of these values across
|
||||
processors with a 10-bin histogram showing the distribution. The total
|
||||
number of histogram counts is equal to the number of processors.
|
||||
@ -114,7 +114,7 @@ number of histogram counts is equal to the number of processors.
|
||||
----------
|
||||
|
||||
The last section gives aggregate statistics (across all processors)
|
||||
for pair-wise neighbors and special neighbors that LAMMPS keeps track
|
||||
for pairwise neighbors and special neighbors that LAMMPS keeps track
|
||||
of (see the :doc:`special_bonds <special_bonds>` command). The number
|
||||
of times neighbor lists were rebuilt is tallied, as is the number of
|
||||
potentially *dangerous* rebuilds. If atom movement triggered neighbor
|
||||
|
||||
@ -214,7 +214,7 @@ threads/task as Nt. The product of these two values should be N, i.e.
|
||||
The default for the :doc:`package kokkos <package>` command when
|
||||
running on KNL is to use "half" neighbor lists and set the Newton flag
|
||||
to "on" for both pairwise and bonded interactions. This will typically
|
||||
be best for many-body potentials. For simpler pair-wise potentials, it
|
||||
be best for many-body potentials. For simpler pairwise potentials, it
|
||||
may be faster to use a "full" neighbor list with Newton flag to "off".
|
||||
Use the "-pk kokkos" :doc:`command-line switch <Run_options>` to change
|
||||
the default :doc:`package kokkos <package>` options. See its page for
|
||||
|
||||
@ -64,34 +64,44 @@ These are the 4 coefficients for the :math:`E_a` formula:
|
||||
radians internally; hence the various :math:`K` are effectively energy
|
||||
per radian\^2 or radian\^3 or radian\^4.
|
||||
|
||||
For the :math:`E_{bb}` formula, each line in a :doc:`angle_coeff <angle_coeff>`
|
||||
command in the input script lists 4 coefficients, the first of which
|
||||
is "bb" to indicate they are BondBond coefficients. In a data file,
|
||||
these coefficients should be listed under a "BondBond Coeffs" heading
|
||||
and you must leave out the "bb", i.e. only list 3 coefficients after
|
||||
the angle type.
|
||||
For the :math:`E_{bb}` formula, each line in a :doc:`angle_coeff
|
||||
<angle_coeff>` command in the input script lists 4 coefficients, the
|
||||
first of which is "bb" to indicate they are BondBond coefficients. In
|
||||
a data file, these coefficients should be listed under a "BondBond
|
||||
Coeffs" heading and you must leave out the "bb", i.e. only list 3
|
||||
coefficients after the angle type.
|
||||
|
||||
* bb
|
||||
* :math:`M` (energy/distance\^2)
|
||||
* :math:`r_1` (distance)
|
||||
* :math:`r_2` (distance)
|
||||
|
||||
For the :math:`E_{ba}` formula, each line in a :doc:`angle_coeff <angle_coeff>`
|
||||
command in the input script lists 5 coefficients, the first of which
|
||||
is "ba" to indicate they are BondAngle coefficients. In a data file,
|
||||
these coefficients should be listed under a "BondAngle Coeffs" heading
|
||||
and you must leave out the "ba", i.e. only list 4 coefficients after
|
||||
the angle type.
|
||||
For the :math:`E_{ba}` formula, each line in a :doc:`angle_coeff
|
||||
<angle_coeff>` command in the input script lists 5 coefficients, the
|
||||
first of which is "ba" to indicate they are BondAngle coefficients.
|
||||
In a data file, these coefficients should be listed under a "BondAngle
|
||||
Coeffs" heading and you must leave out the "ba", i.e. only list 4
|
||||
coefficients after the angle type.
|
||||
|
||||
* ba
|
||||
* :math:`N_1` (energy/distance\^2)
|
||||
* :math:`N_2` (energy/distance\^2)
|
||||
* :math:`N_1` (energy/distance)
|
||||
* :math:`N_2` (energy/distance)
|
||||
* :math:`r_1` (distance)
|
||||
* :math:`r_2` (distance)
|
||||
|
||||
The :math:`\theta_0` value in the :math:`E_{ba}` formula is not specified,
|
||||
since it is the same value from the :math:`E_a` formula.
|
||||
|
||||
.. note::
|
||||
|
||||
It is important that the order of the I,J,K atoms in each angle
|
||||
listed in the Angles section of the data file read by the
|
||||
:doc:`read_data <read_data>` command be consistent with the order
|
||||
of the :math:`r_1` and :math:`r_2` BondBond and BondAngle
|
||||
coefficients. This is because the terms in the formulas for
|
||||
:math:`E_{bb}` and :math:`E_{ba}` will use the I,J atoms to compute
|
||||
:math:`r_{ij}` and the J,K atoms to compute :math:`r_{jk}`.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
@ -383,7 +383,7 @@ multiple groups, its weight is the product of the weight factors.
|
||||
|
||||
This weight style is useful in combination with pair style
|
||||
:doc:`hybrid <pair_hybrid>`, e.g. when combining a more costly many-body
|
||||
potential with a fast pair-wise potential. It is also useful when
|
||||
potential with a fast pairwise potential. It is also useful when
|
||||
using :doc:`run_style respa <run_style>` where some portions of the
|
||||
system have many bonded interactions and others none. It assumes that
|
||||
the computational cost for each group remains constant over time.
|
||||
|
||||
@ -174,6 +174,7 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` pag
|
||||
* :doc:`angle <compute_angle>` - energy of each angle sub-style
|
||||
* :doc:`angle/local <compute_angle_local>` - theta and energy of each angle
|
||||
* :doc:`angmom/chunk <compute_angmom_chunk>` - angular momentum for each chunk
|
||||
* :doc:`ave/sphere/atom <compute_ave_sphere_atom>` - compute local density and temperature around each atom
|
||||
* :doc:`basal/atom <compute_basal_atom>` - calculates the hexagonal close-packed "c" lattice vector of each atom
|
||||
* :doc:`body/local <compute_body_local>` - attributes of body sub-particles
|
||||
* :doc:`bond <compute_bond>` - energy of each bond sub-style
|
||||
|
||||
101
doc/src/compute_ave_sphere_atom.rst
Normal file
101
doc/src/compute_ave_sphere_atom.rst
Normal file
@ -0,0 +1,101 @@
|
||||
.. index:: compute ave/sphere/atom
|
||||
.. index:: compute ave/sphere/atom/kk
|
||||
|
||||
compute ave/sphere/atom command
|
||||
================================
|
||||
|
||||
Accelerator Variants: *ave/sphere/atom/kk*
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
compute ID group-ID ave/sphere/atom keyword values ...
|
||||
|
||||
* ID, group-ID are documented in :doc:`compute <compute>` command
|
||||
* ave/sphere/atom = style name of this compute command
|
||||
* one or more keyword/value pairs may be appended
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
keyword = *cutoff*
|
||||
*cutoff* value = distance cutoff
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all ave/sphere/atom
|
||||
|
||||
compute 1 all ave/sphere/atom cutoff 5.0
|
||||
comm_modify cutoff 5.0
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
Define a computation that calculates the local density and temperature
|
||||
for each atom and neighbors inside a spherical cutoff.
|
||||
|
||||
The optional keyword *cutoff* defines the distance cutoff
|
||||
used when searching for neighbors. The default value is the cutoff
|
||||
specified by the pair style. If no pair style is defined, then a cutoff
|
||||
must be defined using this keyword. If the specified cutoff is larger than
|
||||
that of the pair_style plus neighbor skin (or no pair style is defined),
|
||||
the *comm_modify cutoff* option must also be set to match that of the
|
||||
*cutoff* keyword.
|
||||
|
||||
The neighbor list needed to compute this quantity is constructed each
|
||||
time the calculation is performed (i.e. each time a snapshot of atoms
|
||||
is dumped). Thus it can be inefficient to compute/dump this quantity
|
||||
too frequently.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a bonded system, then the settings of
|
||||
:doc:`special_bonds <special_bonds>` command can remove pairwise
|
||||
interactions between atoms in the same bond, angle, or dihedral. This
|
||||
is the default setting for the :doc:`special_bonds <special_bonds>`
|
||||
command, and means those pairwise interactions do not appear in the
|
||||
neighbor list. Because this fix uses the neighbor list, it also means
|
||||
those pairs will not be included in the order parameter. This
|
||||
difficulty can be circumvented by writing a dump file, and using the
|
||||
:doc:`rerun <rerun>` command to compute the order parameter for
|
||||
snapshots in the dump file. The rerun script can use a
|
||||
:doc:`special_bonds <special_bonds>` command that includes all pairs in
|
||||
the neighbor list.
|
||||
|
||||
----------
|
||||
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
|
||||
----------
|
||||
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a per-atom array with two columns: density and temperature.
|
||||
|
||||
These values can be accessed by any command that uses per-atom values
|
||||
from a compute as input. See the :doc:`Howto output <Howto_output>` doc
|
||||
page for an overview of LAMMPS output options.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This compute is part of the EXTRA-COMPUTE package. It is only enabled if
|
||||
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`comm_modify <comm_modify>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
The option defaults are *cutoff* = pair style cutoff
|
||||
|
||||
@ -89,13 +89,20 @@ included in the calculation.
|
||||
.. warning::
|
||||
|
||||
The compute *heat/flux* has been reported to produce unphysical
|
||||
values for angle, dihedral and improper contributions
|
||||
values for angle, dihedral, improper and constraint force contributions
|
||||
when used with :doc:`compute stress/atom <compute_stress_atom>`,
|
||||
as discussed in :ref:`(Surblys) <Surblys2>` and :ref:`(Boone) <Boone>`.
|
||||
You are strongly advised to
|
||||
as discussed in :ref:`(Surblys2019) <Surblys3>`, :ref:`(Boone) <Boone>`
|
||||
and :ref:`(Surblys2021) <Surblys4>`. You are strongly advised to
|
||||
use :doc:`compute centroid/stress/atom <compute_stress_atom>`,
|
||||
which has been implemented specifically for such cases.
|
||||
|
||||
.. warning::
|
||||
|
||||
Due to an implementation detail, the :math:`y` and :math:`z`
|
||||
components of heat flux from :doc:`fix rigid <fix_rigid>`
|
||||
contribution when computed via :doc:`compute stress/atom <compute_stress_atom>`
|
||||
are highly unphysical and should not be used.
|
||||
|
||||
The Green-Kubo formulas relate the ensemble average of the
|
||||
auto-correlation of the heat flux :math:`\mathbf{J}`
|
||||
to the thermal conductivity :math:`\kappa`:
|
||||
@ -232,10 +239,14 @@ none
|
||||
|
||||
----------
|
||||
|
||||
.. _Surblys2:
|
||||
.. _Surblys3:
|
||||
|
||||
**(Surblys)** Surblys, Matsubara, Kikugawa, Ohara, Phys Rev E, 99, 051301(R) (2019).
|
||||
**(Surblys2019)** Surblys, Matsubara, Kikugawa, Ohara, Phys Rev E, 99, 051301(R) (2019).
|
||||
|
||||
.. _Boone:
|
||||
|
||||
**(Boone)** Boone, Babaei, Wilmer, J Chem Theory Comput, 15, 5579--5587 (2019).
|
||||
|
||||
.. _Surblys4:
|
||||
|
||||
**(Surblys2021)** Surblys, Matsubara, Kikugawa, Ohara, J Appl Phys 130, 215104 (2021).
|
||||
|
||||
@ -141,7 +141,7 @@ Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`compute temp <compute_temp>`, :doc:`compute stress/atom <compute_stress_atom>`,
|
||||
:doc:`thermo_style <thermo_style>`,
|
||||
:doc:`thermo_style <thermo_style>`, :doc:`fix numdiff/virial <fix_numdiff_virial>`,
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
@ -61,7 +61,7 @@ Restrictions
|
||||
This compute currently calculates the pressure tensor contributions
|
||||
for pair styles only (i.e. no bond, angle, dihedral, etc. contributions
|
||||
and in the presence of bonded interactions, the result will be incorrect
|
||||
due to exclusions for special bonds) and requires pair-wise force
|
||||
due to exclusions for special bonds) and requires pairwise force
|
||||
calculations not available for most many-body pair styles. K-space
|
||||
calculations are also excluded. Note that this pressure compute outputs
|
||||
the configurational terms only; the kinetic contribution is not included
|
||||
|
||||
@ -87,6 +87,10 @@ Tersoff 3-body interaction) is assigned in equal portions to each atom
|
||||
in the set. E.g. 1/4 of the dihedral virial to each of the 4 atoms,
|
||||
or 1/3 of the fix virial due to SHAKE constraints applied to atoms in
|
||||
a water molecule via the :doc:`fix shake <fix_shake>` command.
|
||||
As an exception, the virial contribution from
|
||||
constraint forces in :doc:`fix rigid <fix_rigid>` on each atom
|
||||
is computed from the constraint force acting on the corresponding atom
|
||||
and its position, i.e. the total virial is not equally distributed.
|
||||
|
||||
In case of compute *centroid/stress/atom*, the virial contribution is:
|
||||
|
||||
@ -103,13 +107,25 @@ atom :math:`I` due to the interaction and the relative position
|
||||
:math:`\mathbf{r}_{I0}` of the atom :math:`I` to the geometric center
|
||||
of the interacting atoms, i.e. centroid, is used. As the geometric
|
||||
center is different for each interaction, the :math:`\mathbf{r}_{I0}`
|
||||
also differs. The sixth and seventh terms, Kspace and :doc:`fix
|
||||
<fix>` contribution respectively, are computed identical to compute
|
||||
*stress/atom*. Although the total system virial is the same as
|
||||
also differs. The sixth term, Kspace contribution,
|
||||
is computed identically to compute *stress/atom*.
|
||||
The seventh term is handed differently depending on
|
||||
if the constraint forces are due to :doc:`fix shake <fix_shake>`
|
||||
or :doc:`fix rigid <fix_rigid>`.
|
||||
In case of SHAKE constraints, each distance constraint is
|
||||
handed as a pairwise interaction.
|
||||
E.g. in case of a water molecule, two OH and one HH distance
|
||||
constraints are treated as three pairwise interactions.
|
||||
In case of :doc:`fix rigid <fix_rigid>`,
|
||||
all constraint forces in the molecule are treated
|
||||
as a single many-body interaction with a single centroid position.
|
||||
In case of water molecule, the formula expression would become
|
||||
identical to that of the three-body angle interaction.
|
||||
Although the total system virial is the same as
|
||||
compute *stress/atom*, compute *centroid/stress/atom* is know to
|
||||
result in more consistent heat flux values for angle, dihedrals and
|
||||
improper contributions when computed via :doc:`compute heat/flux
|
||||
<compute_heat_flux>`.
|
||||
result in more consistent heat flux values for angle, dihedrals,
|
||||
improper and constraint force contributions
|
||||
when computed via :doc:`compute heat/flux <compute_heat_flux>`.
|
||||
|
||||
If no extra keywords are listed, the kinetic contribution all of the
|
||||
virial contribution terms are included in the per-atom stress tensor.
|
||||
@ -134,7 +150,8 @@ contribution for the cluster interaction is divided evenly among those
|
||||
atoms.
|
||||
|
||||
Details of how compute *centroid/stress/atom* obtains the virial for
|
||||
individual atoms is given in :ref:`(Surblys) <Surblys1>`, where the
|
||||
individual atoms are given in :ref:`(Surblys2019) <Surblys1>` and
|
||||
:ref:`(Surblys2021) <Surblys2>`, where the
|
||||
idea is that the virial of the atom :math:`I` is the result of only
|
||||
the force :math:`\mathbf{F}_I` on the atom due to the interaction and
|
||||
its positional vector :math:`\mathbf{r}_{I0}`, relative to the
|
||||
@ -235,10 +252,10 @@ between the pair of particles. All bond styles are supported. All
|
||||
angle, dihedral, improper styles are supported with the exception of
|
||||
INTEL and KOKKOS variants of specific styles. It also does not
|
||||
support models with long-range Coulombic or dispersion forces,
|
||||
i.e. the kspace_style command in LAMMPS. It also does not support the
|
||||
following fixes which add rigid-body constraints: :doc:`fix shake
|
||||
<fix_shake>`, :doc:`fix rattle <fix_shake>`, :doc:`fix rigid
|
||||
<fix_rigid>`, :doc:`fix rigid/small <fix_rigid>`.
|
||||
i.e. the kspace_style command in LAMMPS. It also does not implement the
|
||||
following fixes which add rigid-body constraints:
|
||||
:doc:`fix rigid/* <fix_rigid>` and the OpenMP accelerated version of :doc:`fix rigid/small <fix_rigid>`,
|
||||
while all other :doc:`fix rigid/*/small <fix_rigid>` are implemented.
|
||||
|
||||
LAMMPS will generate an error if one of these options is included in
|
||||
your model. Extension of centroid stress calculations to these force
|
||||
@ -270,4 +287,8 @@ none
|
||||
|
||||
.. _Surblys1:
|
||||
|
||||
**(Surblys)** Surblys, Matsubara, Kikugawa, Ohara, Phys Rev E, 99, 051301(R) (2019).
|
||||
**(Surblys2019)** Surblys, Matsubara, Kikugawa, Ohara, Phys Rev E, 99, 051301(R) (2019).
|
||||
|
||||
.. _Surblys2:
|
||||
|
||||
**(Surblys2021)** Surblys, Matsubara, Kikugawa, Ohara, J Appl Phys 130, 215104 (2021).
|
||||
|
||||
@ -137,7 +137,7 @@ Examples
|
||||
dump myDump all atom/gz 100 dump.atom.gz
|
||||
dump myDump all atom/zstd 100 dump.atom.zst
|
||||
dump 2 subgroup atom 50 dump.run.bin
|
||||
dump 2 subgroup atom 50 dump.run.mpiio.bin
|
||||
dump 2 subgroup atom/mpiio 50 dump.run.mpiio.bin
|
||||
dump 4a all custom 100 dump.myforce.* id type x y vx fx
|
||||
dump 4b flow custom 100 dump.%.myforce id type c_myF[3] v_ke
|
||||
dump 4b flow custom 100 dump.%.myforce id type c_myF[*] v_ke
|
||||
@ -169,11 +169,12 @@ or multiple smaller files).
|
||||
|
||||
.. note::
|
||||
|
||||
Because periodic boundary conditions are enforced only on
|
||||
timesteps when neighbor lists are rebuilt, the coordinates of an atom
|
||||
written to a dump file may be slightly outside the simulation box.
|
||||
Re-neighbor timesteps will not typically coincide with the timesteps
|
||||
dump snapshots are written. See the :doc:`dump_modify pbc <dump_modify>` command if you with to force coordinates to be
|
||||
Because periodic boundary conditions are enforced only on timesteps
|
||||
when neighbor lists are rebuilt, the coordinates of an atom written
|
||||
to a dump file may be slightly outside the simulation box.
|
||||
Re-neighbor timesteps will not typically coincide with the
|
||||
timesteps dump snapshots are written. See the :doc:`dump_modify
|
||||
pbc <dump_modify>` command if you with to force coordinates to be
|
||||
strictly inside the simulation box.
|
||||
|
||||
.. note::
|
||||
@ -189,20 +190,21 @@ or multiple smaller files).
|
||||
multiple processors, each of which owns a subset of the atoms.
|
||||
|
||||
For the *atom*, *custom*, *cfg*, and *local* styles, sorting is off by
|
||||
default. For the *dcd*, *xtc*, *xyz*, and *molfile* styles, sorting by
|
||||
atom ID is on by default. See the :doc:`dump_modify <dump_modify>` doc
|
||||
page for details.
|
||||
default. For the *dcd*, *xtc*, *xyz*, and *molfile* styles, sorting
|
||||
by atom ID is on by default. See the :doc:`dump_modify <dump_modify>`
|
||||
doc page for details.
|
||||
|
||||
The *atom/gz*, *cfg/gz*, *custom/gz*, *local/gz*, and *xyz/gz* styles are identical
|
||||
in command syntax to the corresponding styles without "gz", however,
|
||||
they generate compressed files using the zlib library. Thus the filename
|
||||
suffix ".gz" is mandatory. This is an alternative approach to writing
|
||||
compressed files via a pipe, as done by the regular dump styles, which
|
||||
may be required on clusters where the interface to the high-speed network
|
||||
disallows using the fork() library call (which is needed for a pipe).
|
||||
For the remainder of this doc page, you should thus consider the *atom*
|
||||
and *atom/gz* styles (etc) to be inter-changeable, with the exception
|
||||
of the required filename suffix.
|
||||
The *atom/gz*, *cfg/gz*, *custom/gz*, *local/gz*, and *xyz/gz* styles
|
||||
are identical in command syntax to the corresponding styles without
|
||||
"gz", however, they generate compressed files using the zlib
|
||||
library. Thus the filename suffix ".gz" is mandatory. This is an
|
||||
alternative approach to writing compressed files via a pipe, as done
|
||||
by the regular dump styles, which may be required on clusters where
|
||||
the interface to the high-speed network disallows using the fork()
|
||||
library call (which is needed for a pipe). For the remainder of this
|
||||
doc page, you should thus consider the *atom* and *atom/gz* styles
|
||||
(etc) to be inter-changeable, with the exception of the required
|
||||
filename suffix.
|
||||
|
||||
Similarly, the *atom/zstd*, *cfg/zstd*, *custom/zstd*, *local/zstd*,
|
||||
and *xyz/zstd* styles are identical to the gz styles, but use the Zstd
|
||||
@ -219,6 +221,11 @@ you should thus consider the *atom* and *atom/mpiio* styles (etc) to
|
||||
be inter-changeable. The one exception is how the filename is
|
||||
specified for the MPI-IO styles, as explained below.
|
||||
|
||||
.. warning::
|
||||
|
||||
The MPIIO package is currently unmaintained and has become
|
||||
unreliable. Use with caution.
|
||||
|
||||
The precision of values output to text-based dump files can be
|
||||
controlled by the :doc:`dump_modify format <dump_modify>` command and
|
||||
its options.
|
||||
@ -275,10 +282,11 @@ This bounding box is convenient for many visualization programs. The
|
||||
meaning of the 6 character flags for "xx yy zz" is the same as above.
|
||||
|
||||
Note that the first two numbers on each line are now xlo_bound instead
|
||||
of xlo, etc, since they represent a bounding box. See the :doc:`Howto triclinic <Howto_triclinic>` page for a geometric description
|
||||
of triclinic boxes, as defined by LAMMPS, simple formulas for how the
|
||||
6 bounding box extents (xlo_bound,xhi_bound,etc) are calculated from
|
||||
the triclinic parameters, and how to transform those parameters to and
|
||||
of xlo, etc, since they represent a bounding box. See the :doc:`Howto
|
||||
triclinic <Howto_triclinic>` page for a geometric description of
|
||||
triclinic boxes, as defined by LAMMPS, simple formulas for how the 6
|
||||
bounding box extents (xlo_bound,xhi_bound,etc) are calculated from the
|
||||
triclinic parameters, and how to transform those parameters to and
|
||||
from other commonly used triclinic representations.
|
||||
|
||||
The "ITEM: ATOMS" line in each snapshot lists column descriptors for
|
||||
@ -310,23 +318,24 @@ written to the dump file. This local data is typically calculated by
|
||||
each processor based on the atoms it owns, but there may be zero or
|
||||
more entities per atom, e.g. a list of bond distances. An explanation
|
||||
of the possible dump local attributes is given below. Note that by
|
||||
using input from the :doc:`compute property/local <compute_property_local>` command with dump local,
|
||||
it is possible to generate information on bonds, angles, etc that can
|
||||
be cut and pasted directly into a data file read by the
|
||||
:doc:`read_data <read_data>` command.
|
||||
using input from the :doc:`compute property/local
|
||||
<compute_property_local>` command with dump local, it is possible to
|
||||
generate information on bonds, angles, etc that can be cut and pasted
|
||||
directly into a data file read by the :doc:`read_data <read_data>`
|
||||
command.
|
||||
|
||||
Style *cfg* has the same command syntax as style *custom* and writes
|
||||
extended CFG format files, as used by the
|
||||
`AtomEye <http://li.mit.edu/Archive/Graphics/A/>`_ visualization
|
||||
package. Since the extended CFG format uses a single snapshot of the
|
||||
system per file, a wildcard "\*" must be included in the filename, as
|
||||
discussed below. The list of atom attributes for style *cfg* must
|
||||
begin with either "mass type xs ys zs" or "mass type xsu ysu zsu"
|
||||
since these quantities are needed to write the CFG files in the
|
||||
appropriate format (though the "mass" and "type" fields do not appear
|
||||
explicitly in the file). Any remaining attributes will be stored as
|
||||
"auxiliary properties" in the CFG files. Note that you will typically
|
||||
want to use the :doc:`dump_modify element <dump_modify>` command with
|
||||
extended CFG format files, as used by the `AtomEye
|
||||
<http://li.mit.edu/Archive/Graphics/A/>`_ visualization package.
|
||||
Since the extended CFG format uses a single snapshot of the system per
|
||||
file, a wildcard "\*" must be included in the filename, as discussed
|
||||
below. The list of atom attributes for style *cfg* must begin with
|
||||
either "mass type xs ys zs" or "mass type xsu ysu zsu" since these
|
||||
quantities are needed to write the CFG files in the appropriate format
|
||||
(though the "mass" and "type" fields do not appear explicitly in the
|
||||
file). Any remaining attributes will be stored as "auxiliary
|
||||
properties" in the CFG files. Note that you will typically want to
|
||||
use the :doc:`dump_modify element <dump_modify>` command with
|
||||
CFG-formatted files, to associate element names with atom types, so
|
||||
that AtomEye can render atoms appropriately. When unwrapped
|
||||
coordinates *xsu*, *ysu*, and *zsu* are requested, the nominal AtomEye
|
||||
@ -452,6 +461,11 @@ use the :doc:`read_dump <read_dump>` command or perform other
|
||||
post-processing, just as if the dump file was not written using
|
||||
MPI-IO.
|
||||
|
||||
.. warning::
|
||||
|
||||
The MPIIO package is currently unmaintained and has become
|
||||
unreliable. Use with caution.
|
||||
|
||||
Note that MPI-IO dump files are one large file which all processors
|
||||
write to. You thus cannot use the "%" wildcard character described
|
||||
above in the filename since that specifies generation of multiple
|
||||
|
||||
@ -17,13 +17,14 @@ Syntax
|
||||
* one or more keyword/value pairs may be appended
|
||||
|
||||
* these keywords apply to various dump styles
|
||||
* keyword = *append* or *at* or *buffer* or *delay* or *element* or *every* or *fileper* or *first* or *flush* or *format* or *header* or *image* or *label* or *maxfiles* or *nfile* or *pad* or *pbc* or *precision* or *region* or *refresh* or *scale* or *sfactor* or *sort* or *tfactor* or *thermo* or *thresh* or *time* or *units* or *unwrap*
|
||||
* keyword = *append* or *at* or *balance* or *buffer* or *delay* or *element* or *every* or *every/time* or *fileper* or *first* or *flush* or *format* or *header* or *image* or *label* or *maxfiles* or *nfile* or *pad* or *pbc* or *precision* or *region* or *refresh* or *scale* or *sfactor* or *sort* or *tfactor* or *thermo* or *thresh* or *time* or *units* or *unwrap*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*append* arg = *yes* or *no*
|
||||
*at* arg = N
|
||||
N = index of frame written upon first dump
|
||||
*balance* arg = *yes* or *no*
|
||||
*buffer* arg = *yes* or *no*
|
||||
*delay* arg = Dstep
|
||||
Dstep = delay output until this timestep
|
||||
@ -32,6 +33,9 @@ Syntax
|
||||
*every* arg = N
|
||||
N = dump every this many timesteps
|
||||
N can be a variable (see below)
|
||||
*every/time* arg = Delta
|
||||
Delta = dump every this interval in simulation time (time units)
|
||||
Delta can be a variable (see below)
|
||||
*fileper* arg = Np
|
||||
Np = write one file for every this many processors
|
||||
*first* arg = *yes* or *no*
|
||||
@ -197,11 +201,19 @@ will be accepted.
|
||||
|
||||
----------
|
||||
|
||||
The *every* keyword changes the dump frequency originally specified by
|
||||
the :doc:`dump <dump>` command to a new value. The every keyword can be
|
||||
specified in one of two ways. It can be a numeric value in which case
|
||||
it must be > 0. Or it can be an :doc:`equal-style variable <variable>`,
|
||||
which should be specified as v_name, where name is the variable name.
|
||||
The *every* keyword can be used with any dump style except the *dcd*
|
||||
and *xtc* styles. It does two things. It specifies that the interval
|
||||
between dump snapshots will be set in timesteps, which is the default
|
||||
if the *every* or *every/time* keywords are not used. See the
|
||||
*every/time* keyword for how to specify the interval in simulation
|
||||
time, i.e. in time units of the :doc:`units <units>` command. The
|
||||
*every* keyword also sets the interval value, which overrides the dump
|
||||
frequency originally specified by the :doc:`dump <dump>` command.
|
||||
|
||||
The *every* keyword can be specified in one of two ways. It can be a
|
||||
numeric value in which case it must be > 0. Or it can be an
|
||||
:doc:`equal-style variable <variable>`, which should be specified as
|
||||
v_name, where name is the variable name.
|
||||
|
||||
In this case, the variable is evaluated at the beginning of a run to
|
||||
determine the next timestep at which a dump snapshot will be written
|
||||
@ -210,11 +222,12 @@ determine the next timestep, etc. Thus the variable should return
|
||||
timestep values. See the stagger() and logfreq() and stride() math
|
||||
functions for :doc:`equal-style variables <variable>`, as examples of
|
||||
useful functions to use in this context. Other similar math functions
|
||||
could easily be added as options for :doc:`equal-style variables <variable>`. Also see the next() function, which allows
|
||||
use of a file-style variable which reads successive values from a
|
||||
file, each time the variable is evaluated. Used with the *every*
|
||||
keyword, if the file contains a list of ascending timesteps, you can
|
||||
output snapshots whenever you wish.
|
||||
could easily be added as options for :doc:`equal-style variables
|
||||
<variable>`. Also see the next() function, which allows use of a
|
||||
file-style variable which reads successive values from a file, each
|
||||
time the variable is evaluated. Used with the *every* keyword, if the
|
||||
file contains a list of ascending timesteps, you can output snapshots
|
||||
whenever you wish.
|
||||
|
||||
Note that when using the variable option with the *every* keyword, you
|
||||
need to use the *first* option if you want an initial snapshot written
|
||||
@ -255,14 +268,103 @@ in file tmp.times:
|
||||
|
||||
----------
|
||||
|
||||
The *every/time* keyword can be used with any dump style except the
|
||||
*dcd* and *xtc* styles. It does two things. It specifies that the
|
||||
interval between dump snapshots will be set in simulation time,
|
||||
i.e. in time units of the :doc:`units <units>` command. This can be
|
||||
useful when the timestep size varies during a simulation run, e.g. by
|
||||
use of the :doc:`fix dt/reset <fix_dt_reset>` command. The default is
|
||||
to specify the interval in timesteps; see the *every* keyword. The
|
||||
*every/time* command also sets the interval value.
|
||||
|
||||
.. note::
|
||||
|
||||
If you wish dump styles *atom*, *custom*, *local*, or *xyz* to
|
||||
include the simulation time as a field in the header portion of
|
||||
each snapshot, you also need to use the dump_modify *time* keyword
|
||||
with a setting of *yes*. See its documentation below.
|
||||
|
||||
Note that since snapshots are output on simulation steps, each
|
||||
snapshot will be written on the first timestep whose associated
|
||||
simulation time is >= the exact snapshot time value.
|
||||
|
||||
As with the *every* option, the *Delta* value can be specified in one
|
||||
of two ways. It can be a numeric value in which case it must be >
|
||||
0.0. Or it can be an :doc:`equal-style variable <variable>`, which
|
||||
should be specified as v_name, where name is the variable name.
|
||||
|
||||
In this case, the variable is evaluated at the beginning of a run to
|
||||
determine the next simulation time at which a dump snapshot will be
|
||||
written out. On that timestep the variable will be evaluated again to
|
||||
determine the next simulation time, etc. Thus the variable should
|
||||
return values in time units. Note the current timestep or simulation
|
||||
time can be used in an :doc:`equal-style variables <variable>` since
|
||||
they are both thermodynamic keywords. Also see the next() function,
|
||||
which allows use of a file-style variable which reads successive
|
||||
values from a file, each time the variable is evaluated. Used with
|
||||
the *every/time* keyword, if the file contains a list of ascending
|
||||
simulation times, you can output snapshots whenever you wish.
|
||||
|
||||
Note that when using the variable option with the *every/time*
|
||||
keyword, you need to use the *first* option if you want an initial
|
||||
snapshot written to the dump file. The *every/time* keyword cannot be
|
||||
used with the dump *dcd* style.
|
||||
|
||||
For example, the following commands will write snapshots at successive
|
||||
simulation times which grow by a factor of 1.5 with each interval.
|
||||
The dt value used in the variable is to avoid a zero result when the
|
||||
initial simulation time is 0.0.
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable increase equal 1.5*(time+dt)
|
||||
dump 1 all atom 100 tmp.dump
|
||||
dump_modify 1 every/time v_increase first yes
|
||||
|
||||
The following commands would write snapshots at the times listed in
|
||||
file tmp.times:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable f file tmp.times
|
||||
variable s equal next(f)
|
||||
dump 1 all atom 100 tmp.dump
|
||||
dump_modify 1 every/time v_s
|
||||
|
||||
.. note::
|
||||
|
||||
When using a file-style variable with the *every/time* keyword, the
|
||||
file of timesteps must list a first time that is beyond the time
|
||||
associated with the current timestep (e.g. it cannot be 0.0). And
|
||||
it must list one or more times beyond the length of the run you
|
||||
perform. This is because the dump command will generate an error
|
||||
if the next time it reads from the file is not a value greater than
|
||||
the current time. Thus if you wanted output at times 0,15,100 of a
|
||||
run of length 100 in simulation time, the file should contain the
|
||||
values 15,100,101 and you should also use the dump_modify first
|
||||
command. Any final value > 100 could be used in place of 101.
|
||||
|
||||
----------
|
||||
|
||||
The *first* keyword determines whether a dump snapshot is written on
|
||||
the very first timestep after the dump command is invoked. This will
|
||||
always occur if the current timestep is a multiple of N, the frequency
|
||||
specified in the :doc:`dump <dump>` command, including timestep 0. But
|
||||
if this is not the case, a dump snapshot will only be written if the
|
||||
setting of this keyword is *yes*\ . If it is *no*, which is the
|
||||
always occur if the current timestep is a multiple of $N$, the
|
||||
frequency specified in the :doc:`dump <dump>` command or
|
||||
:doc:`dump_modify every <dump_modify>` command, including timestep 0.
|
||||
It will also always occur if the current simulation time is a multiple
|
||||
of *Delta*, the time interval specified in the doc:`dump_modify
|
||||
every/time <dump_modify>` command.
|
||||
|
||||
But if this is not the case, a dump snapshot will only be written if
|
||||
the setting of this keyword is *yes*\ . If it is *no*, which is the
|
||||
default, then it will not be written.
|
||||
|
||||
Note that if the argument to the :doc:`dump_modify every
|
||||
<dump_modify>` doc:`dump_modify every/time <dump_modify>` commands is
|
||||
a variable and not a numeric value, then specifying *first yes* is the
|
||||
only way to write a dump snapshot on the first timestep after the dump
|
||||
command is invoked.
|
||||
|
||||
----------
|
||||
|
||||
The *flush* keyword determines whether a flush operation is invoked
|
||||
@ -342,10 +444,10 @@ The *fileper* keyword is documented below with the *nfile* keyword.
|
||||
|
||||
----------
|
||||
|
||||
The *header* keyword toggles whether the dump file will include a header.
|
||||
Excluding a header will reduce the size of the dump file for fixes such as
|
||||
:doc:`fix pair/tracker <fix_pair_tracker>` which do not require the information
|
||||
typically written to the header.
|
||||
The *header* keyword toggles whether the dump file will include a
|
||||
header. Excluding a header will reduce the size of the dump file for
|
||||
fixes such as :doc:`fix pair/tracker <fix_pair_tracker>` which do not
|
||||
require the information typically written to the header.
|
||||
|
||||
----------
|
||||
|
||||
@ -561,9 +663,19 @@ The dump *local* style cannot be sorted by atom ID, since there are
|
||||
typically multiple lines of output per atom. Some dump styles, such
|
||||
as *dcd* and *xtc*, require sorting by atom ID to format the output
|
||||
file correctly. If multiple processors are writing the dump file, via
|
||||
the "%" wildcard in the dump filename, then sorting cannot be
|
||||
the "%" wildcard in the dump filename and the *nfile* or *fileper*
|
||||
keywords are set to non-default values (i.e. the number of dump file
|
||||
pieces is not equal to the number of procs), then sorting cannot be
|
||||
performed.
|
||||
|
||||
In a parallel run, the per-processor dump file pieces can have
|
||||
significant imbalance in number of lines of per-atom info. The *balance*
|
||||
keyword determines whether the number of lines in each processor
|
||||
snapshot are balanced to be nearly the same. A balance value of *no*
|
||||
means no balancing will be done, while *yes* means balancing will be
|
||||
performed. This balancing preserves dump sorting order. For a serial
|
||||
run, this option is ignored since the output is already balanced.
|
||||
|
||||
.. note::
|
||||
|
||||
Unless it is required by the dump style, sorting dump file
|
||||
@ -639,16 +751,20 @@ threshold criterion is met. Otherwise it is not met.
|
||||
|
||||
----------
|
||||
|
||||
The *time* keyword only applies to the dump *atom*, *custom*, and
|
||||
*local* styles (and their COMPRESS package versions *atom/gz*,
|
||||
*custom/gz* and *local/gz*\ ). If set to *yes*, each frame will will
|
||||
contain two extra lines before the "ITEM: TIMESTEP" entry:
|
||||
The *time* keyword only applies to the dump *atom*, *custom*, *local*,
|
||||
and *xyz* styles (and their COMPRESS package versions *atom/gz*,
|
||||
*custom/gz* and *local/gz*\ ). For the first 3 styles, if set to
|
||||
*yes*, each frame will will contain two extra lines before the "ITEM:
|
||||
TIMESTEP" entry:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
ITEM: TIME
|
||||
\<elapsed time\>
|
||||
|
||||
For the *xyz* style, the simulation time is included on the same line
|
||||
as the timestep value.
|
||||
|
||||
This will output the current elapsed simulation time in current
|
||||
time units equivalent to the :doc:`thermo keyword <thermo_style>` *time*\ .
|
||||
This is to simplify post-processing of trajectories using a variable time
|
||||
@ -725,6 +841,7 @@ Default
|
||||
The option defaults are
|
||||
|
||||
* append = no
|
||||
* balance = no
|
||||
* buffer = yes for dump styles *atom*, *custom*, *loca*, and *xyz*
|
||||
* element = "C" for every atom type
|
||||
* every = whatever it was set to via the :doc:`dump <dump>` command
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
.. index:: dynamical_matrix
|
||||
.. index:: dynamical_matrix/kk
|
||||
|
||||
dynamical_matrix command
|
||||
========================
|
||||
|
||||
Accelerator Variants: dynamical_matrix/kk
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
@ -56,6 +59,12 @@ If the style eskm is selected, the dynamical matrix will be in units of
|
||||
inverse squared femtoseconds. These units will then conveniently leave
|
||||
frequencies in THz.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
|
||||
@ -271,7 +271,8 @@ accelerated styles exist.
|
||||
* :doc:`npt/eff <fix_nh_eff>` - NPT for nuclei and electrons in the electron force field model
|
||||
* :doc:`npt/sphere <fix_npt_sphere>` - NPT for spherical particles
|
||||
* :doc:`npt/uef <fix_nh_uef>` - NPT style time integration with diagonal flow
|
||||
* :doc:`numdiff <fix_numdiff>` - compute derivatives of per-atom data from finite differences
|
||||
* :doc:`numdiff <fix_numdiff>` - numerically approximate atomic forces using finite energy differences
|
||||
* :doc:`numdiff/virial <fix_numdiff_virial>` - numerically approximate virial stress tensor using finite energy differences
|
||||
* :doc:`nve <fix_nve>` - constant NVE time integration
|
||||
* :doc:`nve/asphere <fix_nve_asphere>` - NVE for aspherical particles
|
||||
* :doc:`nve/asphere/noforce <fix_nve_asphere_noforce>` - NVE for aspherical particles without forces
|
||||
|
||||
@ -20,13 +20,13 @@ Syntax
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
keyword = *pH*, *pKa*, *pKb*, *pIp*, *pIm*, *pKs*, *acid_type*, *base_type*, *lunit_nm*, *temp*, *tempfixid*, *nevery*, *nmc*, *xrd*, *seed*, *tag*, *group*, *onlysalt*, *pmcmoves*
|
||||
keyword = *pH*, *pKa*, *pKb*, *pIp*, *pIm*, *pKs*, *acid_type*, *base_type*, *lunit_nm*, *temp*, *tempfixid*, *nevery*, *nmc*, *rxd*, *seed*, *tag*, *group*, *onlysalt*, *pmcmoves*
|
||||
*pH* value = pH of the solution (can be specified as an equal-style variable)
|
||||
*pKa* value = acid dissociation constant
|
||||
*pKb* value = base dissociation constant
|
||||
*pIp* value = chemical potential of free cations
|
||||
*pIm* value = chemical potential of free anions
|
||||
*pKs* value = solution self-dissociation constant
|
||||
*pKa* value = acid dissociation constant (in the -log10 representation)
|
||||
*pKb* value = base dissociation constant (in the -log10 representation)
|
||||
*pIp* value = activity (effective concentration) of free cations (in the -log10 representation)
|
||||
*pIm* value = activity (effective concentration) of free anions (in the -log10 representation)
|
||||
*pKs* value = solvent self-dissociation constant (in the -log10 representation)
|
||||
*acid_type* = atom type of acid groups
|
||||
*base_type* = atom type of base groups
|
||||
*lunit_nm* value = unit length used by LAMMPS (# in the units of nanometers)
|
||||
@ -34,7 +34,7 @@ Syntax
|
||||
*tempfixid* value = fix ID of temperature thermostat
|
||||
*nevery* value = invoke this fix every nevery steps
|
||||
*nmc* value = number of charge regulation MC moves to attempt every nevery steps
|
||||
*xrd* value = cutoff distance for acid/base reaction
|
||||
*rxd* value = cutoff distance for acid/base reaction
|
||||
*seed* value = random # seed (positive integer)
|
||||
*tag* value = yes or no (yes: The code assign unique tags to inserted ions; no: The tag of all inserted ions is "0")
|
||||
*group* value = group-ID, inserted ions are assigned to group group-ID. Can be used multiple times to assign inserted ions to multiple groups.
|
||||
@ -47,7 +47,7 @@ Examples
|
||||
""""""""
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix chareg all charge/regulation 1 2 acid_type 3 base_type 4 pKa 5 pKb 7 lb 1.0 nevery 200 nexchange 200 seed 123 tempfixid fT
|
||||
fix chareg all charge/regulation 1 2 acid_type 3 base_type 4 pKa 5.0 pKb 6.0 pH 7.0 pIp 3.0 pIm 3.0 nevery 200 nmc 200 seed 123 tempfixid fT
|
||||
|
||||
fix chareg all charge/regulation 1 2 pIp 3 pIm 3 onlysalt yes 2 -1 seed 123 tag yes temp 1.0
|
||||
|
||||
@ -92,7 +92,11 @@ where the fix attempts to charge :math:`\mathrm{A}` (discharge
|
||||
:math:`\mathrm{A}^-`) to :math:`\mathrm{A}^-` (:math:`\mathrm{A}`) and
|
||||
insert (delete) a proton (atom type 2). Besides, the fix implements
|
||||
self-ionization reaction of water :math:`\emptyset \rightleftharpoons
|
||||
\mathrm{H}^++\mathrm{OH}^-`. However, this approach is highly
|
||||
\mathrm{H}^++\mathrm{OH}^-`.
|
||||
|
||||
|
||||
|
||||
However, this approach is highly
|
||||
inefficient at :math:`\mathrm{pH} \approx 7` when the concentration of
|
||||
both protons and hydroxyl ions is low, resulting in a relatively low
|
||||
acceptance rate of MC moves.
|
||||
@ -102,24 +106,31 @@ reactions, which can be easily achieved via
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix acid_reaction all charge/regulation 4 5 acid_type 1 pH 7.0 pKa 5.0 pIp 2.0 pIm 2.0
|
||||
fix acid_reaction2 all charge/regulation 4 5 acid_type 1 pH 7.0 pKa 5.0 pIp 2.0 pIm 2.0
|
||||
|
||||
where particles of atom type 4 and 5 are the salt cations and anions,
|
||||
both at chemical potential pI=2.0, see :ref:`(Curk1) <Curk1>` and
|
||||
where particles of atom type 4 and 5 are the salt cations and anions, both at activity (effective concentration) of :math:`10^{-2}` mol/l, see :ref:`(Curk1) <Curk1>` and
|
||||
:ref:`(Landsgesell) <Landsgesell>` for more details.
|
||||
|
||||
|
||||
Similarly, we could have simultaneously added a base ionization reaction
|
||||
(:math:`\mathrm{B} \rightleftharpoons \mathrm{B}^++\mathrm{OH}^-`)
|
||||
We could have simultaneously added a base ionization reaction (:math:`\mathrm{B} \rightleftharpoons \mathrm{B}^++\mathrm{OH}^-`)
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix base_reaction all charge/regulation 2 3 base_type 6 pH 7.0 pKb 6.0 pIp 7.0 pIm 7.0
|
||||
fix acid_base_reaction all charge/regulation 2 3 acid_type 1 base_type 6 pH 7.0 pKa 5.0 pKb 6.0 pIp 7.0 pIm 7.0
|
||||
|
||||
where the fix will attempt to charge :math:`\mathrm{B}` (discharge
|
||||
:math:`\mathrm{B}^+`) to :math:`\mathrm{B}^+` (:math:`\mathrm{B}`) and
|
||||
insert (delete) a hydroxyl ion :math:`\mathrm{OH}^-` of atom type 3. If
|
||||
neither the acid or the base type is specified, for example,
|
||||
insert (delete) a hydroxyl ion :math:`\mathrm{OH}^-` of atom type 3.
|
||||
|
||||
|
||||
Dissociated ions and salt ions can be combined into a single particle type, which reduces the number of necessary MC moves and increases sampling performance, see :ref:`(Curk1) <Curk1>`. The :math:`\mathrm{H}^+` and monovalent salt cation (:math:`\mathrm{S}^+`) are combined into a single particle type, :math:`\mathrm{X}^+ = \{\mathrm{H}^+, \mathrm{S}^+\}`. In this case "pIp" refers to the effective concentration of the combined cation type :math:`\mathrm{X}^+` and its value is determined by :math:`10^{-\mathrm{pIp}} = 10^{-\mathrm{pH}} + 10^{-\mathrm{pSp}}`, where :math:`10^{-\mathrm{pSp}}` is the effective concentration of salt cations. For example, at pH=7 and pSp=6 we would find pIp~5.958 and the command that performs reactions with combined ions could read,
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix acid_reaction_combined all charge/regulation 2 3 acid_type 1 pH 7.0 pKa 5.0 pIp 5.958 pIm 5.958
|
||||
|
||||
|
||||
|
||||
If neither the acid or the base type is specified, for example,
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
@ -127,11 +138,11 @@ neither the acid or the base type is specified, for example,
|
||||
|
||||
the fix simply inserts or deletes an ion pair of a free cation (atom
|
||||
type 4) and a free anion (atom type 5) as done in a conventional
|
||||
grand-canonical MC simulation.
|
||||
grand-canonical MC simulation. Multivalent ions can be inserted (deleted) by using the *onlysalt* keyword.
|
||||
|
||||
|
||||
The fix is compatible with LAMMPS sub-packages such as *molecule* or
|
||||
*rigid*. That said, the acid and base particles can be part of larger
|
||||
*rigid*. The acid and base particles can be part of larger
|
||||
molecules or rigid bodies. Free ions that are inserted to or deleted
|
||||
from the system must be defined as single particles (no bonded
|
||||
interactions allowed) and cannot be part of larger molecules or rigid
|
||||
@ -153,14 +164,14 @@ Langevin thermostat:
|
||||
fix fT all langevin 1.0 1.0 1.0 123
|
||||
fix_modify fT temp dtemp
|
||||
|
||||
The chemical potential units (e.g. pH) are in the standard log10
|
||||
The units of pH, pKa, pKb, pIp, pIm are considered to be in the standard -log10
|
||||
representation assuming reference concentration :math:`\rho_0 =
|
||||
\mathrm{mol}/\mathrm{l}`. Therefore, to perform the internal unit
|
||||
conversion, the length (in nanometers) of the LAMMPS unit length must be
|
||||
specified via *lunit_nm* (default is set to the Bjerrum length in water
|
||||
at room temperature *lunit_nm* = 0.71nm). For example, in the dilute
|
||||
ideal solution limit, the concentration of free ions will be
|
||||
:math:`c_\mathrm{I} = 10^{-\mathrm{pIp}}\mathrm{mol}/\mathrm{l}`.
|
||||
\mathrm{mol}/\mathrm{l}`. For example, in the dilute
|
||||
ideal solution limit, the concentration of free cations will be
|
||||
:math:`c_\mathrm{I} = 10^{-\mathrm{pIp}}\mathrm{mol}/\mathrm{l}`. To perform the internal unit
|
||||
conversion, the the value of the LAMMPS unit length must be
|
||||
specified in nanometers via *lunit_nm*. The default value is set to the Bjerrum length in water
|
||||
at room temperature (0.71 nm), *lunit_nm* = 0.71.
|
||||
|
||||
The temperature used in MC acceptance probability is set by *temp*. This
|
||||
temperature should be the same as the temperature set by the molecular
|
||||
@ -171,10 +182,10 @@ thermostat fix-ID is *fT*. The inserted particles attain a random
|
||||
velocity corresponding to the specified temperature. Using *tempfixid*
|
||||
overrides any fixed temperature set by *temp*.
|
||||
|
||||
The *xrd* keyword can be used to restrict the inserted/deleted
|
||||
The *rxd* keyword can be used to restrict the inserted/deleted
|
||||
counterions to a specific radial distance from an acid or base particle
|
||||
that is currently participating in a reaction. This can be used to
|
||||
simulate more realist reaction dynamics. If *xrd* = 0 or *xrd* > *L* /
|
||||
simulate more realist reaction dynamics. If *rxd* = 0 or *rxd* > *L* /
|
||||
2, where *L* is the smallest box dimension, the radial restriction is
|
||||
automatically turned off and free ion can be inserted or deleted
|
||||
anywhere in the simulation box.
|
||||
@ -258,18 +269,18 @@ Default
|
||||
|
||||
pH = 7.0; pKa = 100.0; pKb = 100.0; pIp = 5.0; pIm = 5.0; pKs = 14.0;
|
||||
acid_type = -1; base_type = -1; lunit_nm = 0.71; temp = 1.0; nevery =
|
||||
100; nmc = 100; xrd = 0; seed = 0; tag = no; onlysalt = no, pmcmoves =
|
||||
100; nmc = 100; rxd = 0; seed = 0; tag = no; onlysalt = no, pmcmoves =
|
||||
[1/3, 1/3, 1/3], group-ID = all
|
||||
|
||||
----------
|
||||
|
||||
.. _Curk1:
|
||||
|
||||
**(Curk1)** T. Curk, J. Yuan, and E. Luijten, "Coarse-grained simulation of charge regulation using LAMMPS", preprint (2021).
|
||||
**(Curk1)** T. Curk, J. Yuan, and E. Luijten, "Accelerated simulation method for charge regulation effects", JCP 156 (2022).
|
||||
|
||||
.. _Curk2:
|
||||
|
||||
**(Curk2)** T. Curk and E. Luijten, "Charge-regulation effects in nanoparticle self-assembly", PRL (2021)
|
||||
**(Curk2)** T. Curk and E. Luijten, "Charge-regulation effects in nanoparticle self-assembly", PRL 126 (2021)
|
||||
|
||||
.. _Landsgesell:
|
||||
|
||||
|
||||
@ -78,13 +78,20 @@ outer loop (largest) timestep, which is the same timestep that the
|
||||
|
||||
Note that the cumulative simulation time (in time units), which
|
||||
accounts for changes in the timestep size as a simulation proceeds,
|
||||
can be accessed by the :doc:`thermo_style time <thermo_style>` keyword.
|
||||
can be accessed by the :doc:`thermo_style time <thermo_style>`
|
||||
keyword.
|
||||
|
||||
Also note that the :doc:`dump_modify every/time <dump_modify>` option
|
||||
allows dump files to be written at intervals specified by simulation
|
||||
time, rather than by timesteps. Simulation time is in time units;
|
||||
see the :doc:`units <units>` doc page for details.
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
No information about this fix is written to :doc:`binary restart files <restart>`. None of the :doc:`fix_modify <fix_modify>` options
|
||||
are relevant to this fix.
|
||||
No information about this fix is written to :doc:`binary restart files
|
||||
<restart>`. None of the :doc:`fix_modify <fix_modify>` options are
|
||||
relevant to this fix.
|
||||
|
||||
This fix computes a global scalar which can be accessed by various
|
||||
:doc:`output commands <Howto_output>`. The scalar stores the last
|
||||
@ -93,7 +100,8 @@ timestep on which the timestep was reset to a new value.
|
||||
The scalar value calculated by this fix is "intensive".
|
||||
|
||||
No parameter of this fix can be used with the *start/stop* keywords of
|
||||
the :doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`.
|
||||
the :doc:`run <run>` command. This fix is not invoked during
|
||||
:doc:`energy minimization <minimize>`.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
@ -102,7 +110,7 @@ Restrictions
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`timestep <timestep>`
|
||||
:doc:`timestep <timestep>`, :doc:`dump_modify every/time <dump_modify>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
@ -13,16 +13,15 @@ Syntax
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* numdiff = style name of this fix command
|
||||
* Nevery = calculate force by finite difference every this many timesteps
|
||||
* delta = finite difference displacement length (distance units)
|
||||
* delta = size of atom displacements (distance units)
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix 1 all numdiff 1 0.0001
|
||||
fix 1 all numdiff 10 1e-6
|
||||
fix 1 all numdiff 100 0.01
|
||||
fix 1 movegroup numdiff 100 0.01
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
@ -67,16 +66,17 @@ by two times *delta*.
|
||||
|
||||
The cost of each energy evaluation is essentially the cost of an MD
|
||||
timestep. Thus invoking this fix once for a 3d system has a cost
|
||||
of 6N timesteps, where N is the total number of atoms in the system
|
||||
(assuming all atoms are included in the group). So this fix can be
|
||||
very expensive to use for large systems.
|
||||
of 6N timesteps, where N is the total number of atoms in the system.
|
||||
So this fix can be very expensive to use for large systems.
|
||||
One expedient alternative is to define the fix for a group containing
|
||||
only a few atoms.
|
||||
|
||||
----------
|
||||
|
||||
The *Nevery* argument specifies on what timesteps the force will
|
||||
be used calculated by finite difference.
|
||||
|
||||
The *delta* argument specifies the positional displacement each
|
||||
The *delta* argument specifies the size of the displacement each
|
||||
atom will undergo.
|
||||
|
||||
----------
|
||||
@ -93,7 +93,12 @@ This fix produces a per-atom array which can be accessed by various
|
||||
the force on each atom as calculated by finite difference. The
|
||||
per-atom values can only be accessed on timesteps that are multiples
|
||||
of *Nevery* since that is when the finite difference forces are
|
||||
calculated.
|
||||
calculated. See the examples in *examples/numdiff* directory
|
||||
to see how this fix can be used to directly compare with
|
||||
the analytic forces computed by LAMMPS.
|
||||
|
||||
The array values calculated by this compute
|
||||
will be in force :doc:`units <units>`.
|
||||
|
||||
No parameter of this fix can be used with the *start/stop* keywords of
|
||||
the :doc:`run <run>` command. This fix is invoked during :doc:`energy
|
||||
@ -108,7 +113,7 @@ was built with that package. See the :doc:`Build package <Build_package>` page
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`dynamical_matrix <dynamical_matrix>`,
|
||||
:doc:`dynamical_matrix <dynamical_matrix>`, :doc:`fix numdiff/virial <fix_numdiff_virial>`,
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
115
doc/src/fix_numdiff_virial.rst
Normal file
115
doc/src/fix_numdiff_virial.rst
Normal file
@ -0,0 +1,115 @@
|
||||
.. index:: fix numdiff/virial
|
||||
|
||||
fix numdiff/virial command
|
||||
==========================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
fix ID group-ID numdiff/virial Nevery delta
|
||||
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* numdiff/virial = style name of this fix command
|
||||
* Nevery = calculate virial by finite difference every this many timesteps
|
||||
* delta = magnitude of strain fields (dimensionless)
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix 1 all numdiff/stress 10 1e-6
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
Calculate the virial stress tensor through a finite difference calculation of
|
||||
energy versus strain. These values can be compared to the analytic virial
|
||||
tensor computed by pair styles, bond styles, etc. This can be useful for
|
||||
debugging or other purposes. The specified group must be "all".
|
||||
|
||||
This fix applies linear strain fields of magnitude *delta* to all the
|
||||
atoms relative to a point at the center of the box. The
|
||||
strain fields are in six different directions, corresponding to the
|
||||
six Cartesian components of the stress tensor defined by LAMMPS.
|
||||
For each direction it applies the strain field in both the positive
|
||||
and negative senses, and the new energy of the entire system
|
||||
is calculated after each. The difference in these two energies
|
||||
divided by two times *delta*, approximates the corresponding
|
||||
component of the virial stress tensor, after applying
|
||||
a suitable unit conversion.
|
||||
|
||||
.. note::
|
||||
|
||||
It is important to choose a suitable value for delta, the magnitude of
|
||||
strains that are used to generate finite difference
|
||||
approximations to the exact virial stress. For typical systems, a value in
|
||||
the range of 1 part in 1e5 to 1e6 will be sufficient.
|
||||
However, the best value will depend on a multitude of factors
|
||||
including the stiffness of the interatomic potential, the thermodynamic
|
||||
state of the material being probed, and so on. The only way to be sure
|
||||
that you have made a good choice is to do a sensitivity study on a
|
||||
representative atomic configuration, sweeping over a wide range of
|
||||
values of delta. If delta is too small, the output values will vary
|
||||
erratically due to truncation effects. If delta is increased beyond a
|
||||
certain point, the output values will start to vary smoothly with
|
||||
delta, due to growing contributions from higher order derivatives. In
|
||||
between these two limits, the numerical virial values should be largely
|
||||
independent of delta.
|
||||
|
||||
----------
|
||||
|
||||
The *Nevery* argument specifies on what timesteps the force will
|
||||
be used calculated by finite difference.
|
||||
|
||||
The *delta* argument specifies the size of the displacement each
|
||||
atom will undergo.
|
||||
|
||||
----------
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
No information about this fix is written to :doc:`binary restart files
|
||||
<restart>`. None of the :doc:`fix_modify <fix_modify>` options are
|
||||
relevant to this fix.
|
||||
|
||||
This fix produces a global vector which can be accessed by various
|
||||
:doc:`output commands <Howto_output>`, which stores the components of
|
||||
the virial stress tensor as calculated by finite difference. The
|
||||
global vector can only be accessed on timesteps that are multiples
|
||||
of *Nevery* since that is when the finite difference virial is
|
||||
calculated. See the examples in *examples/numdiff* directory
|
||||
to see how this fix can be used to directly compare with
|
||||
the analytic virial stress tensor computed by LAMMPS.
|
||||
|
||||
The order of the virial stress tensor components is *xx*, *yy*, *zz*,
|
||||
*yz*, *xz*, and *xy*, consistent with Voigt notation. Note that
|
||||
the vector produced by :doc:`compute pressure <compute_pressure>`
|
||||
uses a different ordering, with *yz* and *xy* swapped.
|
||||
|
||||
The vector values calculated by this compute are
|
||||
"intensive". The vector values will be in pressure
|
||||
:doc:`units <units>`.
|
||||
|
||||
No parameter of this fix can be used with the *start/stop* keywords of
|
||||
the :doc:`run <run>` command. This fix is invoked during :doc:`energy
|
||||
minimization <minimize>`.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This fix is part of the EXTRA-FIX package. It is only enabled if LAMMPS
|
||||
was built with that package. See the :doc:`Build package <Build_package>` page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fix numdiff <fix_numdiff>`, :doc:`compute pressure <compute_pressure>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
@ -66,7 +66,10 @@ equivalent to Newton's equations of motion for shear flow by
|
||||
:ref:`(Evans and Morriss) <Evans3>`. They were later shown to generate
|
||||
the desired velocity gradient and the correct production of work by
|
||||
stresses for all forms of homogeneous flow by :ref:`(Daivis and Todd)
|
||||
<Daivis>`. As implemented in LAMMPS, they are coupled to a
|
||||
<Daivis>`.
|
||||
The LAMMPS implementation corresponds to the p-SLLOD variant
|
||||
of SLLOD. :ref:`(Edwards) <Edwards>`.
|
||||
The equations of motion are coupled to a
|
||||
Nose/Hoover chain thermostat in a velocity Verlet formulation, closely
|
||||
following the implementation used for the :doc:`fix nvt <fix_nh>`
|
||||
command.
|
||||
@ -180,6 +183,10 @@ Same as :doc:`fix nvt <fix_nh>`, except tchain = 1.
|
||||
|
||||
**(Daivis and Todd)** Daivis and Todd, J Chem Phys, 124, 194103 (2006).
|
||||
|
||||
.. _Edwards:
|
||||
|
||||
**(Edwards)** Edwards, Baig, and Keffer, J Chem Phys 124, 194104 (2006).
|
||||
|
||||
.. _Daivis-sllod:
|
||||
|
||||
**(Daivis and Todd)** Daivis and Todd, Nonequilibrium Molecular Dynamics (book),
|
||||
|
||||
@ -108,10 +108,11 @@ fluid, in appropriate units. See the :ref:`Muller-Plathe paper <Muller-Plathe2>
|
||||
|
||||
An alternative method for calculating a viscosity is to run a NEMD
|
||||
simulation, as described on the :doc:`Howto nemd <Howto_nemd>` doc page.
|
||||
NEMD simulations deform the simulation box via the :doc:`fix deform <fix_deform>` command. Thus they cannot be run on a charged
|
||||
system using a :doc:`PPPM solver <kspace_style>` since PPPM does not
|
||||
currently support non-orthogonal boxes. Using fix viscosity keeps the
|
||||
box orthogonal; thus it does not suffer from this limitation.
|
||||
NEMD simulations deform the simulation box via the :doc:`fix deform <fix_deform>` command.
|
||||
|
||||
Some features or combination of settings in LAMMPS do not support
|
||||
non-orthogonal boxes. Using fix viscosity keeps the box orthogonal;
|
||||
thus it does not suffer from these limitations.
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
@ -460,7 +460,7 @@ using *neigh/thread* *on*, a full neighbor list must also be used. Using
|
||||
is turned on by default only when there are 16K atoms or less owned by
|
||||
an MPI rank and when using a full neighbor list. Not all KOKKOS-enabled
|
||||
potentials support this keyword yet, and only thread over atoms. Many
|
||||
simple pair-wise potentials such as Lennard-Jones do support threading
|
||||
simple pairwise potentials such as Lennard-Jones do support threading
|
||||
over both atoms and neighbors.
|
||||
|
||||
The *newton* keyword sets the Newton flags for pairwise and bonded
|
||||
|
||||
@ -119,7 +119,7 @@ name are the older, original LAMMPS implementations. They compute the
|
||||
LJ and Coulombic interactions with an energy switching function (esw,
|
||||
shown in the formula below as S(r)), which ramps the energy smoothly
|
||||
to zero between the inner and outer cutoff. This can cause
|
||||
irregularities in pair-wise forces (due to the discontinuous second
|
||||
irregularities in pairwise forces (due to the discontinuous second
|
||||
derivative of energy at the boundaries of the switching region), which
|
||||
in some cases can result in detectable artifacts in an MD simulation.
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ Style *dpd* computes a force field for dissipative particle dynamics
|
||||
|
||||
Style *dpd/tstat* invokes a DPD thermostat on pairwise interactions,
|
||||
which is equivalent to the non-conservative portion of the DPD force
|
||||
field. This pair-wise thermostat can be used in conjunction with any
|
||||
field. This pairwise thermostat can be used in conjunction with any
|
||||
:doc:`pair style <pair_style>`, and in leiu of per-particle thermostats
|
||||
like :doc:`fix langevin <fix_langevin>` or ensemble thermostats like
|
||||
Nose Hoover as implemented by :doc:`fix nvt <fix_nh>`. To use
|
||||
|
||||
90
doc/src/pair_harmonic_cut.rst
Normal file
90
doc/src/pair_harmonic_cut.rst
Normal file
@ -0,0 +1,90 @@
|
||||
.. index:: pair_style harmonic/cut
|
||||
.. index:: pair_style harmonic/cut/omp
|
||||
|
||||
pair_style harmonic/cut command
|
||||
===============================
|
||||
|
||||
Accelerator Variants: *harmonic/cut/omp*
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style style
|
||||
|
||||
* style = *harmonic/cut*
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style harmonic/cut 2.5
|
||||
pair_coeff * * 0.2 2.0
|
||||
pair_coeff 1 1 0.5 2.5
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
Style *harmonic/cut* computes pairwise repulsive-only harmonic interactions with the formula
|
||||
|
||||
.. math::
|
||||
|
||||
E = k (r_c - r)^2 \qquad r < r_c
|
||||
|
||||
:math:`r_c` is the cutoff.
|
||||
|
||||
The following coefficients must be defined for each pair of atoms
|
||||
types via the :doc:`pair_coeff <pair_coeff>` command as in the examples
|
||||
above, or in the data file or restart files read by the
|
||||
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>`
|
||||
commands:
|
||||
|
||||
* :math:`k` (energy units)
|
||||
* :math:`r_c` (distance units)
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
For atom type pairs I,J and I != J, the :math:`k` and :math:`r_c`
|
||||
coefficients can be mixed. The default mix value is *geometric*.
|
||||
See the "pair_modify" command for details.
|
||||
|
||||
Since the potential is zero at and beyond the cutoff parameter by
|
||||
construction, there is no need to support support the :doc:`pair_modify
|
||||
<pair_modify>` shift or tail options for the energy and pressure of the
|
||||
pair interaction.
|
||||
|
||||
These pair styles write their information to :doc:`binary restart files <restart>`,
|
||||
so pair_style and pair_coeff commands do not need to be specified in an input script
|
||||
that reads a restart file.
|
||||
|
||||
These pair styles can only be used via the *pair* keyword of the
|
||||
:doc:`run_style respa <run_style>` command. They do not support the
|
||||
*inner*, *middle*, *outer* keywords.
|
||||
|
||||
----------
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
The *harmonic/cut* pair style is only enabled if LAMMPS was
|
||||
built with the EXTRA-PAIR package.
|
||||
See the :doc:`Build package <Build_package>` page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`pair_coeff <pair_coeff>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
@ -195,5 +195,4 @@ none
|
||||
|
||||
.. _Dietz:
|
||||
|
||||
**(Dietz)** J.D. Dietz, R.S. Hoy, "Facile equilibration of well-entangled
|
||||
semi-flexible bead-spring polymer melts" arXiv:2109.11001
|
||||
**(Dietz)** Dietz and Hoy, J. Chem Phys, 156, 014103 (2022).
|
||||
|
||||
@ -126,11 +126,11 @@ and *compute_energy*, which both take 3 numerical arguments:
|
||||
* itype = the (numerical) type of the first atom
|
||||
* jtype = the (numerical) type of the second atom
|
||||
|
||||
This functions need to compute the force and the energy, respectively,
|
||||
and use the result as return value. The functions need to use the
|
||||
*pmap* dictionary to convert the LAMMPS atom type number to the symbolic
|
||||
value of the internal potential parameter data structure. Following
|
||||
the *LJCutMelt* example, here are the two functions:
|
||||
This functions need to compute the (scaled) force and the energy,
|
||||
respectively, and use the result as return value. The functions need
|
||||
to use the *pmap* dictionary to convert the LAMMPS atom type number
|
||||
to the symbolic value of the internal potential parameter data structure.
|
||||
Following the *LJCutMelt* example, here are the two functions:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@ -154,17 +154,17 @@ the *LJCutMelt* example, here are the two functions:
|
||||
|
||||
for consistency with the C++ pair styles in LAMMPS, the
|
||||
*compute_force* function follows the conventions of the Pair::single()
|
||||
methods and does not return the full force, but the force scaled by
|
||||
the distance between the two atoms, so this value only needs to be
|
||||
multiplied by delta x, delta y, and delta z to conveniently obtain the
|
||||
three components of the force vector between these two atoms.
|
||||
methods and does not return the pairwise force directly, but the force
|
||||
divided by the distance between the two atoms, so this value only needs
|
||||
to be multiplied by delta x, delta y, and delta z to conveniently obtain
|
||||
the three components of the force vector between these two atoms.
|
||||
|
||||
----------
|
||||
|
||||
.. note::
|
||||
|
||||
The evaluation of scripted python code will slow down the
|
||||
computation pair-wise interactions quite significantly. However, this
|
||||
computation pairwise interactions quite significantly. However, this
|
||||
can be largely worked around through using the python pair style not
|
||||
for the actual simulation, but to generate tabulated potentials on the
|
||||
fly using the :doc:`pair_write <pair_write>` command. Please see below
|
||||
|
||||
@ -154,10 +154,10 @@ accelerated styles exist.
|
||||
* :doc:`coul/wolf/cs <pair_cs>` - Coulomb via Wolf potential with core/shell adjustments
|
||||
* :doc:`dpd <pair_dpd>` - dissipative particle dynamics (DPD)
|
||||
* :doc:`dpd/ext <pair_dpd_ext>` - generalized force field for DPD
|
||||
* :doc:`dpd/ext/tstat <pair_dpd_ext>` - pair-wise DPD thermostatting with generalized force field
|
||||
* :doc:`dpd/ext/tstat <pair_dpd_ext>` - pairwise DPD thermostatting with generalized force field
|
||||
* :doc:`dpd/fdt <pair_dpd_fdt>` - DPD for constant temperature and pressure
|
||||
* :doc:`dpd/fdt/energy <pair_dpd_fdt>` - DPD for constant energy and enthalpy
|
||||
* :doc:`dpd/tstat <pair_dpd>` - pair-wise DPD thermostatting
|
||||
* :doc:`dpd/tstat <pair_dpd>` - pairwise DPD thermostatting
|
||||
* :doc:`dsmc <pair_dsmc>` - Direct Simulation Monte Carlo (DSMC)
|
||||
* :doc:`e3b <pair_e3b>` - Explicit-three body (E3B) water model
|
||||
* :doc:`drip <pair_drip>` - Dihedral-angle-corrected registry-dependent interlayer potential (DRIP)
|
||||
@ -183,6 +183,7 @@ accelerated styles exist.
|
||||
* :doc:`gran/hooke/history <pair_gran>` - granular potential without history effects
|
||||
* :doc:`gw <pair_gw>` - Gao-Weber potential
|
||||
* :doc:`gw/zbl <pair_gw>` - Gao-Weber potential with a repulsive ZBL core
|
||||
* :doc:`harmonic/cut <pair_harmonic_cut>` - repulsive-only harmonic potential
|
||||
* :doc:`hbond/dreiding/lj <pair_hbond_dreiding>` - DREIDING hydrogen bonding LJ potential
|
||||
* :doc:`hbond/dreiding/morse <pair_hbond_dreiding>` - DREIDING hydrogen bonding Morse potential
|
||||
* :doc:`hdnnp <pair_hdnnp>` - High-dimensional neural network potential
|
||||
|
||||
@ -202,7 +202,7 @@ elements are the same. Thus the two-body parameters for Si
|
||||
interacting with C, comes from the SiCC entry. The three-body
|
||||
parameters can in principle be specific to the three elements of the
|
||||
configuration. In the literature, however, the three-body parameters
|
||||
are usually defined by simple formulas involving two sets of pair-wise
|
||||
are usually defined by simple formulas involving two sets of pairwise
|
||||
parameters, corresponding to the ij and ik pairs, where i is the
|
||||
center atom. The user must ensure that the correct combining rule is
|
||||
used to calculate the values of the three-body parameters for
|
||||
|
||||
@ -76,8 +76,10 @@ must be set before this command can be invoked.
|
||||
Due to how the pairwise force is computed, an inner value > 0.0 must
|
||||
be specified even if the potential has a finite value at r = 0.0.
|
||||
|
||||
For EAM potentials, the pair_write command only tabulates the
|
||||
pairwise portion of the potential, not the embedding portion.
|
||||
The *pair_write* command can only be used for pairwise additive
|
||||
interactions for which a `Pair::single()` function can be and has
|
||||
been implemented. This excludes for example manybody potentials
|
||||
or TIP4P coulomb styles.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
@ -89,7 +89,7 @@ in its 3d FFTs. In this scenario, splitting your P total processors
|
||||
into 2 subsets of processors, P1 in the first partition and P2 in the
|
||||
second partition, can enable your simulation to run faster. This is
|
||||
because the long-range forces in PPPM can be calculated at the same
|
||||
time as pair-wise and bonded forces are being calculated, and the FFTs
|
||||
time as pairwise and bonded forces are being calculated, and the FFTs
|
||||
can actually speed up when running on fewer processors.
|
||||
|
||||
To use this style, you must define 2 partitions where P1 is a multiple
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
.. index:: third_order
|
||||
.. index:: third_order/kk
|
||||
|
||||
third_order command
|
||||
===================
|
||||
|
||||
Accelerator Variants: third_order/kk
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
@ -49,6 +52,12 @@ If the style eskm is selected, the tensor will be using energy units of 10 J/mol
|
||||
These units conform to eskm style from the dynamical_matrix command, which
|
||||
will simplify operations using dynamical matrices with third order tensors.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
|
||||
@ -194,6 +194,7 @@ Baczewski
|
||||
Bagchi
|
||||
Bagi
|
||||
Bagnold
|
||||
Baig
|
||||
Bajaj
|
||||
Bkappa
|
||||
Bal
|
||||
@ -668,6 +669,7 @@ Derlet
|
||||
Deserno
|
||||
Destree
|
||||
destructor
|
||||
destructors
|
||||
detils
|
||||
Devanathan
|
||||
devel
|
||||
@ -1569,6 +1571,7 @@ ke
|
||||
KE
|
||||
Keblinski
|
||||
Keefe
|
||||
Keffer
|
||||
keflag
|
||||
Keir
|
||||
Kelchner
|
||||
@ -2647,6 +2650,7 @@ pscreen
|
||||
pscrozi
|
||||
pseudodynamics
|
||||
pseudopotential
|
||||
pSp
|
||||
Pstart
|
||||
Pstop
|
||||
pstyle
|
||||
@ -2925,6 +2929,7 @@ Runge
|
||||
runtime
|
||||
Rutuparna
|
||||
rx
|
||||
rxd
|
||||
rxnave
|
||||
rxnsum
|
||||
ry
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
# Electronic stopping for Si in Si
|
||||
# Uses metal units
|
||||
# Electronic stopping for Si in Si UNITS: metal DATE: 2019-02-19 CONTRIBUTOR: Risto Toijala risto.toijala@helsinki.fi
|
||||
# Kinetic energy in eV, stopping power in eV/A
|
||||
# For other atom types, add columns.
|
||||
|
||||
# atom type 1
|
||||
# energy Si in Si
|
||||
3918.2 6.541
|
||||
15672.9 13.091
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
# DATE: 2014-11-24 UNITS: real CONTRIBUTOR: Michele Ceriotti michele.ceriotti@gmail.com
|
||||
|
||||
3.904138445158e-4 4.681059722010e-2 3.079778738058e-2 4.428079381336e-2 5.057825203477e-2 2.591193419597e-2 1.513907125942e-2
|
||||
-4.789343294190e-2 2.037551040972e-2 6.597801861779e-2 -8.528273506602e-3 -2.230839572773e-3 6.593086307870e-3 -6.653653981891e-2
|
||||
-2.905096373618e-2 -6.597801861779e-2 2.086885297843e-2 1.145471984072e-2 3.111465343867e-2 1.101562087523e-2 -3.264959166486e-2
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
# DATE: 2014-11-24 UNITS: real CONTRIBUTOR: Michele Ceriotti michele.ceriotti@gmail.com
|
||||
|
||||
2.999985914100e+2 5.937593337000e+0 2.144376751500e+2 5.883055908000e+1 -1.119803766000e+2 -6.793381764000e+1 1.379789732400e+1
|
||||
5.937593337000e+0 3.781851303000e+2 -5.794518522000e+1 -2.178772681500e+2 -1.649310659100e+2 -6.557113452000e+1 3.833830743000e+1
|
||||
2.144376751500e+2 -5.794518522000e+1 7.325759985000e+2 2.188507713000e+2 -3.704586531000e+2 -3.385193865000e+1 -4.827706758000e+0
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
# DATE: 2014-11-24 UNITS: real CONTRIBUTOR: Michele Ceriotti michele.ceriotti@gmail.com
|
||||
|
||||
4.247358737218e-3 3.231404593065e-2 -9.715629522215e-3 8.199488441225e-3 7.288427565896e-3 -3.634229949055e-3 -3.294395982200e-3
|
||||
4.887738278128e-2 5.978602802893e-1 -2.079222967202e-1 1.088740438247e-1 4.666954324786e-2 -1.334147134493e-2 -3.914996645811e-2
|
||||
4.015863091190e-2 2.079222967202e-1 1.645970119444e-1 8.351952991453e-2 5.114740085468e-2 1.217862237677e-2 -4.506711205974e-2
|
||||
|
||||
@ -94,7 +94,7 @@ msst: MSST shock dynamics
|
||||
nb3b: use of nonbonded 3-body harmonic pair style
|
||||
neb: nudged elastic band (NEB) calculation for barrier finding
|
||||
nemd: non-equilibrium MD of 2d sheared system
|
||||
numdiff: numerical difference computation of forces
|
||||
numdiff: numerical difference computation of forces and virial
|
||||
obstacle: flow around two voids in a 2d channel
|
||||
peptide: dynamics of a small solvated peptide chain (5-mer)
|
||||
peri: Peridynamic model of cylinder impacted by indenter
|
||||
|
||||
@ -1,33 +1,74 @@
|
||||
# Numerical difference calculation of error in forces
|
||||
# Numerical difference calculation
|
||||
# of error in forces and virial stress
|
||||
|
||||
units metal
|
||||
atom_style atomic
|
||||
# adjustable parameters
|
||||
|
||||
atom_modify map yes
|
||||
lattice fcc 5.358000
|
||||
region box block 0 6 0 6 0 6
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 39.903
|
||||
variable nsteps index 500 # length of run
|
||||
variable nthermo index 10 # thermo output interval
|
||||
variable ndump index 500 # dump output interval
|
||||
variable nlat index 3 # size of box
|
||||
variable fdelta index 1.0e-4 # displacement size
|
||||
variable vdelta index 1.0e-6 # strain size
|
||||
variable temp index 10.0 # temperature
|
||||
|
||||
velocity all create 10 2357 mom yes dist gaussian
|
||||
units metal
|
||||
atom_style atomic
|
||||
|
||||
pair_style lj/cubic
|
||||
pair_coeff * * 0.0102701 3.42
|
||||
atom_modify map yes
|
||||
lattice fcc 5.358000
|
||||
region box block 0 ${nlat} 0 ${nlat} 0 ${nlat}
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 39.903
|
||||
|
||||
neighbor 1 bin
|
||||
velocity all create ${temp} 2357 mom yes dist gaussian
|
||||
|
||||
timestep 0.001
|
||||
pair_style lj/cubic
|
||||
pair_coeff * * 0.0102701 3.42
|
||||
|
||||
fix numdiff all numdiff 200 0.0001
|
||||
fix nve all nve
|
||||
neighbor 0.0 bin
|
||||
neigh_modify every 1 delay 0 check no
|
||||
|
||||
variable errx atom fx-f_numdiff[1]
|
||||
variable erry atom fy-f_numdiff[2]
|
||||
variable errz atom fz-f_numdiff[3]
|
||||
timestep 0.001
|
||||
fix nve all nve
|
||||
|
||||
write_dump all custom tmp.error f_numdiff[1] f_numdiff[2] f_numdiff[3]
|
||||
# define numerical force calculation
|
||||
|
||||
dump forces all custom 200 force_error.dump v_errx v_erry v_errz
|
||||
thermo 200
|
||||
run 2000
|
||||
fix numforce all numdiff ${nthermo} ${fdelta}
|
||||
variable ferrx atom f_numforce[1]-fx
|
||||
variable ferry atom f_numforce[2]-fy
|
||||
variable ferrz atom f_numforce[3]-fz
|
||||
variable ferrsq atom v_ferrx^2+v_ferry^2+v_ferrz^2
|
||||
compute faverrsq all reduce ave v_ferrsq
|
||||
variable fsq atom fx^2+fy^2+fz^2
|
||||
compute favsq all reduce ave v_fsq
|
||||
variable frelerr equal sqrt(c_faverrsq/c_favsq)
|
||||
dump errors all custom ${ndump} force_error.dump v_ferrx v_ferry v_ferrz
|
||||
|
||||
# define numerical virial stress tensor calculation
|
||||
|
||||
compute myvirial all pressure NULL virial
|
||||
fix numvirial all numdiff/virial ${nthermo} ${vdelta}
|
||||
variable errxx equal f_numvirial[1]-c_myvirial[1]
|
||||
variable erryy equal f_numvirial[2]-c_myvirial[2]
|
||||
variable errzz equal f_numvirial[3]-c_myvirial[3]
|
||||
variable erryz equal f_numvirial[4]-c_myvirial[6]
|
||||
variable errxz equal f_numvirial[5]-c_myvirial[5]
|
||||
variable errxy equal f_numvirial[6]-c_myvirial[4]
|
||||
variable verrsq equal "v_errxx^2 + &
|
||||
v_erryy^2 + &
|
||||
v_errzz^2 + &
|
||||
v_erryz^2 + &
|
||||
v_errxz^2 + &
|
||||
v_errxy^2"
|
||||
variable vsq equal "c_myvirial[1]^2 + &
|
||||
c_myvirial[3]^2 + &
|
||||
c_myvirial[3]^2 + &
|
||||
c_myvirial[4]^2 + &
|
||||
c_myvirial[5]^2 + &
|
||||
c_myvirial[6]^2"
|
||||
variable vrelerr equal sqrt(v_verrsq/v_vsq)
|
||||
|
||||
thermo_style custom step temp pe etotal press v_frelerr v_vrelerr
|
||||
thermo ${nthermo}
|
||||
run ${nsteps}
|
||||
|
||||
175
examples/numdiff/log.28Jan2022.log.numdiff.g++.1
Normal file
175
examples/numdiff/log.28Jan2022.log.numdiff.g++.1
Normal file
@ -0,0 +1,175 @@
|
||||
LAMMPS (7 Jan 2022)
|
||||
# Numerical difference calculation
|
||||
# of error in forces and virial stress
|
||||
|
||||
# adjustable parameters
|
||||
|
||||
variable nsteps index 500 # length of run
|
||||
variable nthermo index 10 # thermo output interval
|
||||
variable ndump index 500 # dump output interval
|
||||
variable nlat index 3 # size of box
|
||||
variable fdelta index 1.0e-4 # displacement size
|
||||
variable vdelta index 1.0e-6 # strain size
|
||||
variable temp index 10.0 # temperature
|
||||
|
||||
units metal
|
||||
atom_style atomic
|
||||
|
||||
atom_modify map yes
|
||||
lattice fcc 5.358000
|
||||
Lattice spacing in x,y,z = 5.358 5.358 5.358
|
||||
region box block 0 ${nlat} 0 ${nlat} 0 ${nlat}
|
||||
region box block 0 3 0 ${nlat} 0 ${nlat}
|
||||
region box block 0 3 0 3 0 ${nlat}
|
||||
region box block 0 3 0 3 0 3
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (16.074 16.074 16.074)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 108 atoms
|
||||
using lattice units in orthogonal box = (0 0 0) to (16.074 16.074 16.074)
|
||||
create_atoms CPU = 0.000 seconds
|
||||
mass 1 39.903
|
||||
|
||||
velocity all create ${temp} 2357 mom yes dist gaussian
|
||||
velocity all create 10.0 2357 mom yes dist gaussian
|
||||
|
||||
pair_style lj/cubic
|
||||
pair_coeff * * 0.0102701 3.42
|
||||
|
||||
neighbor 0.0 bin
|
||||
neigh_modify every 1 delay 0 check no
|
||||
|
||||
timestep 0.001
|
||||
fix nve all nve
|
||||
|
||||
# define numerical force calculation
|
||||
|
||||
fix numforce all numdiff ${nthermo} ${fdelta}
|
||||
fix numforce all numdiff 10 ${fdelta}
|
||||
fix numforce all numdiff 10 1.0e-4
|
||||
variable ferrx atom f_numforce[1]-fx
|
||||
variable ferry atom f_numforce[2]-fy
|
||||
variable ferrz atom f_numforce[3]-fz
|
||||
variable ferrsq atom v_ferrx^2+v_ferry^2+v_ferrz^2
|
||||
compute faverrsq all reduce ave v_ferrsq
|
||||
variable fsq atom fx^2+fy^2+fz^2
|
||||
compute favsq all reduce ave v_fsq
|
||||
variable frelerr equal sqrt(c_faverrsq/c_favsq)
|
||||
dump errors all custom ${ndump} force_error.dump v_ferrx v_ferry v_ferrz
|
||||
dump errors all custom 500 force_error.dump v_ferrx v_ferry v_ferrz
|
||||
|
||||
# define numerical virial stress tensor calculation
|
||||
|
||||
compute myvirial all pressure NULL virial
|
||||
fix numvirial all numdiff/virial ${nthermo} ${vdelta}
|
||||
fix numvirial all numdiff/virial 10 ${vdelta}
|
||||
fix numvirial all numdiff/virial 10 1.0e-6
|
||||
variable errxx equal f_numvirial[1]-c_myvirial[1]
|
||||
variable erryy equal f_numvirial[2]-c_myvirial[2]
|
||||
variable errzz equal f_numvirial[3]-c_myvirial[3]
|
||||
variable erryz equal f_numvirial[4]-c_myvirial[6]
|
||||
variable errxz equal f_numvirial[5]-c_myvirial[5]
|
||||
variable errxy equal f_numvirial[6]-c_myvirial[4]
|
||||
variable verrsq equal "v_errxx^2 + v_erryy^2 + v_errzz^2 + v_erryz^2 + v_errxz^2 + v_errxy^2"
|
||||
variable vsq equal "c_myvirial[1]^2 + c_myvirial[3]^2 + c_myvirial[3]^2 + c_myvirial[4]^2 + c_myvirial[5]^2 + c_myvirial[6]^2"
|
||||
variable vrelerr equal sqrt(v_verrsq/v_vsq)
|
||||
|
||||
thermo_style custom step temp pe etotal press v_frelerr v_vrelerr
|
||||
thermo ${nthermo}
|
||||
thermo 10
|
||||
run ${nsteps}
|
||||
run 500
|
||||
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check no
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 5.9407173
|
||||
ghost atom cutoff = 5.9407173
|
||||
binsize = 2.9703587, bins = 6 6 6
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cubic, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 6.083 | 6.083 | 6.083 Mbytes
|
||||
Step Temp PotEng TotEng Press v_frelerr v_vrelerr
|
||||
0 10 -7.0259569 -6.8876486 28.564278 19203.344 1.5660292e-06
|
||||
10 9.9376583 -7.0250947 -6.8876486 30.254762 1.5040965e-08 2.1991382e-07
|
||||
20 9.7520139 -7.022527 -6.8876485 35.28505 1.4756358e-08 2.6265315e-06
|
||||
30 9.4477557 -7.0183188 -6.8876485 43.519863 1.4688198e-08 2.6356166e-07
|
||||
40 9.0330215 -7.0125826 -6.8876484 54.727797 1.4637921e-08 5.2292327e-08
|
||||
50 8.5192918 -7.0054772 -6.8876483 68.585553 1.4587854e-08 7.1324716e-08
|
||||
60 7.9212026 -6.997205 -6.8876481 84.684636 1.4525561e-08 3.1108149e-08
|
||||
70 7.2562592 -6.9880081 -6.8876479 102.54088 1.450885e-08 3.2311094e-08
|
||||
80 6.5444294 -6.9781627 -6.8876478 121.60715 1.4444738e-08 2.1776998e-08
|
||||
90 5.8075961 -6.9679715 -6.8876476 141.2895 1.4493562e-08 2.0400898e-08
|
||||
100 5.0688629 -6.957754 -6.8876474 160.9668 1.445455e-08 1.2636688e-08
|
||||
110 4.3517145 -6.947835 -6.8876472 180.0135 1.4460371e-08 1.2528038e-08
|
||||
120 3.6790589 -6.9385314 -6.887647 197.82486 1.4371757e-08 1.4489522e-08
|
||||
130 3.0721984 -6.9301379 -6.8876468 213.84331 1.4364708e-08 1.2461922e-08
|
||||
140 2.5497991 -6.9229125 -6.8876467 227.58429 1.4330926e-08 9.3913926e-09
|
||||
150 2.1269443 -6.917064 -6.8876466 238.6596 1.4287002e-08 4.1510266e-09
|
||||
160 1.8143642 -6.9127407 -6.8876465 246.79599 1.4282669e-08 7.7048281e-09
|
||||
170 1.6179191 -6.9100237 -6.8876465 251.84748 1.42726e-08 1.2719973e-08
|
||||
180 1.5383946 -6.9089239 -6.8876466 253.79991 1.4236534e-08 8.1200831e-09
|
||||
190 1.5716287 -6.9093836 -6.8876467 252.76745 1.41706e-08 6.5670612e-09
|
||||
200 1.7089493 -6.911283 -6.8876468 248.98142 1.4096463e-08 1.1685863e-08
|
||||
210 1.9378716 -6.9144493 -6.8876469 242.77289 1.4008978e-08 1.1226902e-08
|
||||
220 2.2429731 -6.9186692 -6.887647 234.55055 1.3886901e-08 9.9914102e-09
|
||||
230 2.606862 -6.9237023 -6.8876472 224.77626 1.3864576e-08 1.1540228e-08
|
||||
240 3.0111524 -6.9292941 -6.8876474 213.93996 1.3696314e-08 1.1697747e-08
|
||||
250 3.4373794 -6.9351893 -6.8876475 202.53583 1.3626701e-08 1.0398197e-08
|
||||
260 3.8678047 -6.9411426 -6.8876476 191.04084 1.3489489e-08 6.6603364e-09
|
||||
270 4.2860853 -6.9469279 -6.8876478 179.89646 1.3312014e-08 1.1687917e-08
|
||||
280 4.6777954 -6.9523457 -6.8876479 169.49404 1.3081144e-08 1.1336675e-08
|
||||
290 5.030805 -6.9572282 -6.887648 160.16371 1.2947385e-08 1.7342825e-08
|
||||
300 5.3355278 -6.9614428 -6.887648 152.16682 1.2893673e-08 1.7510534e-08
|
||||
310 5.5850532 -6.964894 -6.887648 145.69148 1.2842022e-08 1.2782546e-08
|
||||
320 5.7751794 -6.9675236 -6.8876481 140.85102 1.2903488e-08 1.5319437e-08
|
||||
330 5.9043601 -6.9693103 -6.887648 137.68497 1.3076809e-08 1.1208999e-08
|
||||
340 5.9735784 -6.9702676 -6.887648 136.16232 1.3296904e-08 1.891087e-08
|
||||
350 5.9861549 -6.9704415 -6.887648 136.18679 1.3504051e-08 2.5783601e-08
|
||||
360 5.947496 -6.9699067 -6.8876479 137.60397 1.3731112e-08 2.0556839e-08
|
||||
370 5.8647874 -6.9687627 -6.8876478 140.2101 1.4009878e-08 2.1771736e-08
|
||||
380 5.7466376 -6.9671285 -6.8876477 143.76234 1.4092054e-08 1.1085162e-08
|
||||
390 5.6026773 -6.9651374 -6.8876477 147.99019 1.4282872e-08 2.0221602e-08
|
||||
400 5.4431231 -6.9629305 -6.8876476 152.60787 1.4317739e-08 1.7076065e-08
|
||||
410 5.2783192 -6.960651 -6.8876475 157.32722 1.4415075e-08 2.5031776e-08
|
||||
420 5.1182723 -6.9584374 -6.8876474 161.87063 1.4441435e-08 2.2519289e-08
|
||||
430 4.9722 -6.956417 -6.8876473 165.98344 1.4550624e-08 2.4512613e-08
|
||||
440 4.8481153 -6.9547008 -6.8876473 169.44527 1.4544672e-08 1.4758301e-08
|
||||
450 4.7524707 -6.9533779 -6.8876472 172.07964 1.4546492e-08 1.324687e-08
|
||||
460 4.6898817 -6.9525122 -6.8876472 173.76132 1.4537475e-08 1.351367e-08
|
||||
470 4.6629495 -6.9521397 -6.8876472 174.42109 1.4530458e-08 1.521106e-08
|
||||
480 4.6721922 -6.9522675 -6.8876472 174.04742 1.4543785e-08 1.0905422e-08
|
||||
490 4.7160887 -6.9528747 -6.8876473 172.68525 1.4545591e-08 2.0128525e-08
|
||||
500 4.7912313 -6.953914 -6.8876473 170.43183 1.4438981e-08 1.6062775e-08
|
||||
Loop time of 0.837333 on 1 procs for 500 steps with 108 atoms
|
||||
|
||||
Performance: 51.592 ns/day, 0.465 hours/ns, 597.134 timesteps/s
|
||||
99.8% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.0097726 | 0.0097726 | 0.0097726 | 0.0 | 1.17
|
||||
Neigh | 0.03095 | 0.03095 | 0.03095 | 0.0 | 3.70
|
||||
Comm | 0.005564 | 0.005564 | 0.005564 | 0.0 | 0.66
|
||||
Output | 0.0042451 | 0.0042451 | 0.0042451 | 0.0 | 0.51
|
||||
Modify | 0.78618 | 0.78618 | 0.78618 | 0.0 | 93.89
|
||||
Other | | 0.0006258 | | | 0.07
|
||||
|
||||
Nlocal: 108 ave 108 max 108 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 558 ave 558 max 558 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 972 ave 972 max 972 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 972
|
||||
Ave neighs/atom = 9
|
||||
Neighbor list builds = 500
|
||||
Dangerous builds not checked
|
||||
Total wall time: 0:00:00
|
||||
175
examples/numdiff/log.28Jan2022.log.numdiff.g++.4
Normal file
175
examples/numdiff/log.28Jan2022.log.numdiff.g++.4
Normal file
@ -0,0 +1,175 @@
|
||||
LAMMPS (7 Jan 2022)
|
||||
# Numerical difference calculation
|
||||
# of error in forces and virial stress
|
||||
|
||||
# adjustable parameters
|
||||
|
||||
variable nsteps index 500 # length of run
|
||||
variable nthermo index 10 # thermo output interval
|
||||
variable ndump index 500 # dump output interval
|
||||
variable nlat index 3 # size of box
|
||||
variable fdelta index 1.0e-4 # displacement size
|
||||
variable vdelta index 1.0e-6 # strain size
|
||||
variable temp index 10.0 # temperature
|
||||
|
||||
units metal
|
||||
atom_style atomic
|
||||
|
||||
atom_modify map yes
|
||||
lattice fcc 5.358000
|
||||
Lattice spacing in x,y,z = 5.358 5.358 5.358
|
||||
region box block 0 ${nlat} 0 ${nlat} 0 ${nlat}
|
||||
region box block 0 3 0 ${nlat} 0 ${nlat}
|
||||
region box block 0 3 0 3 0 ${nlat}
|
||||
region box block 0 3 0 3 0 3
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (16.074 16.074 16.074)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 108 atoms
|
||||
using lattice units in orthogonal box = (0 0 0) to (16.074 16.074 16.074)
|
||||
create_atoms CPU = 0.000 seconds
|
||||
mass 1 39.903
|
||||
|
||||
velocity all create ${temp} 2357 mom yes dist gaussian
|
||||
velocity all create 10.0 2357 mom yes dist gaussian
|
||||
|
||||
pair_style lj/cubic
|
||||
pair_coeff * * 0.0102701 3.42
|
||||
|
||||
neighbor 0.0 bin
|
||||
neigh_modify every 1 delay 0 check no
|
||||
|
||||
timestep 0.001
|
||||
fix nve all nve
|
||||
|
||||
# define numerical force calculation
|
||||
|
||||
fix numforce all numdiff ${nthermo} ${fdelta}
|
||||
fix numforce all numdiff 10 ${fdelta}
|
||||
fix numforce all numdiff 10 1.0e-4
|
||||
variable ferrx atom f_numforce[1]-fx
|
||||
variable ferry atom f_numforce[2]-fy
|
||||
variable ferrz atom f_numforce[3]-fz
|
||||
variable ferrsq atom v_ferrx^2+v_ferry^2+v_ferrz^2
|
||||
compute faverrsq all reduce ave v_ferrsq
|
||||
variable fsq atom fx^2+fy^2+fz^2
|
||||
compute favsq all reduce ave v_fsq
|
||||
variable frelerr equal sqrt(c_faverrsq/c_favsq)
|
||||
dump errors all custom ${ndump} force_error.dump v_ferrx v_ferry v_ferrz
|
||||
dump errors all custom 500 force_error.dump v_ferrx v_ferry v_ferrz
|
||||
|
||||
# define numerical virial stress tensor calculation
|
||||
|
||||
compute myvirial all pressure NULL virial
|
||||
fix numvirial all numdiff/virial ${nthermo} ${vdelta}
|
||||
fix numvirial all numdiff/virial 10 ${vdelta}
|
||||
fix numvirial all numdiff/virial 10 1.0e-6
|
||||
variable errxx equal f_numvirial[1]-c_myvirial[1]
|
||||
variable erryy equal f_numvirial[2]-c_myvirial[2]
|
||||
variable errzz equal f_numvirial[3]-c_myvirial[3]
|
||||
variable erryz equal f_numvirial[4]-c_myvirial[6]
|
||||
variable errxz equal f_numvirial[5]-c_myvirial[5]
|
||||
variable errxy equal f_numvirial[6]-c_myvirial[4]
|
||||
variable verrsq equal "v_errxx^2 + v_erryy^2 + v_errzz^2 + v_erryz^2 + v_errxz^2 + v_errxy^2"
|
||||
variable vsq equal "c_myvirial[1]^2 + c_myvirial[3]^2 + c_myvirial[3]^2 + c_myvirial[4]^2 + c_myvirial[5]^2 + c_myvirial[6]^2"
|
||||
variable vrelerr equal sqrt(v_verrsq/v_vsq)
|
||||
|
||||
thermo_style custom step temp pe etotal press v_frelerr v_vrelerr
|
||||
thermo ${nthermo}
|
||||
thermo 10
|
||||
run ${nsteps}
|
||||
run 500
|
||||
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check no
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 5.9407173
|
||||
ghost atom cutoff = 5.9407173
|
||||
binsize = 2.9703587, bins = 6 6 6
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cubic, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 6.067 | 6.067 | 6.067 Mbytes
|
||||
Step Temp PotEng TotEng Press v_frelerr v_vrelerr
|
||||
0 10 -7.0259569 -6.8876486 28.564278 10664.391 9.1481187e-08
|
||||
10 9.9388179 -7.0251107 -6.8876486 30.21736 1.4771865e-08 1.3452512e-07
|
||||
20 9.7572185 -7.022599 -6.8876485 35.123527 1.437525e-08 8.0966999e-07
|
||||
30 9.4606673 -7.0184974 -6.8876484 43.132052 1.4375468e-08 1.990012e-08
|
||||
40 9.0579092 -7.0129268 -6.8876483 54.000927 1.4350331e-08 1.7239028e-08
|
||||
50 8.5607685 -7.0060508 -6.8876482 67.403151 1.4353284e-08 7.813181e-09
|
||||
60 7.9838726 -6.9980717 -6.8876481 82.935358 1.4398078e-08 2.022316e-08
|
||||
70 7.3442875 -6.9892255 -6.8876479 100.12892 1.434409e-08 7.5938179e-09
|
||||
80 6.6610579 -6.9797757 -6.8876477 118.46358 1.4324787e-08 7.1972571e-09
|
||||
90 5.9546462 -6.9700053 -6.8876476 137.38365 1.4322718e-08 4.3978378e-09
|
||||
100 5.2462727 -6.9602077 -6.8876474 156.31651 1.4273172e-08 4.6728038e-09
|
||||
110 4.5571706 -6.9506767 -6.8876472 174.69294 1.4266163e-08 3.522225e-09
|
||||
120 3.9077807 -6.9416949 -6.887647 191.96859 1.42241e-08 3.5357511e-09
|
||||
130 3.3169241 -6.9335227 -6.8876469 207.64566 1.4203813e-08 2.5182488e-09
|
||||
140 2.8010028 -6.926387 -6.8876468 221.29333 1.4164215e-08 2.3112509e-09
|
||||
150 2.3732854 -6.9204712 -6.8876467 232.5658 1.4134122e-08 1.9368963e-09
|
||||
160 2.0433329 -6.9159076 -6.8876466 241.21647 1.4095473e-08 3.6806452e-09
|
||||
170 1.8166184 -6.912772 -6.8876466 247.10715 1.4049531e-08 2.5319322e-09
|
||||
180 1.6943727 -6.9110813 -6.8876467 250.21143 1.3997912e-08 1.952404e-09
|
||||
190 1.6736731 -6.910795 -6.8876467 250.61203 1.3915487e-08 1.4271767e-09
|
||||
200 1.7477659 -6.9118199 -6.8876468 248.49223 1.3850618e-08 2.4515718e-09
|
||||
210 1.9065921 -6.9140167 -6.8876469 244.12226 1.3747916e-08 1.7957531e-09
|
||||
220 2.1374676 -6.91721 -6.887647 237.84173 1.3674779e-08 2.6613511e-09
|
||||
230 2.4258607 -6.9211989 -6.8876472 230.0395 1.3565712e-08 3.0777067e-09
|
||||
240 2.7562034 -6.9257679 -6.8876473 221.13265 1.3440442e-08 1.7111501e-09
|
||||
250 3.1126827 -6.9306984 -6.8876474 211.54566 1.3270914e-08 1.6690112e-09
|
||||
260 3.4799641 -6.9357784 -6.8876476 201.69126 1.3105092e-08 2.1637558e-09
|
||||
270 3.8438148 -6.9408108 -6.8876477 191.95361 1.2962846e-08 4.4613506e-09
|
||||
280 4.191607 -6.9456212 -6.8876478 182.6745 1.2846383e-08 3.3730203e-09
|
||||
290 4.5126922 -6.9500621 -6.8876478 174.14285 1.2710692e-08 2.2809889e-09
|
||||
300 4.7986487 -6.9540172 -6.8876479 166.58747 1.2657778e-08 6.9880891e-09
|
||||
310 5.0434083 -6.9574025 -6.8876479 160.17316 1.266381e-08 4.2486217e-09
|
||||
320 5.243275 -6.9601668 -6.8876479 154.99974 1.279856e-08 5.1505673e-09
|
||||
330 5.3968455 -6.9622908 -6.8876479 151.1038 1.2981831e-08 3.3339333e-09
|
||||
340 5.5048468 -6.9637845 -6.8876479 148.46296 1.3159021e-08 1.7881393e-09
|
||||
350 5.569902 -6.9646843 -6.8876479 147.00205 1.3439465e-08 5.6876219e-09
|
||||
360 5.5962378 -6.9650485 -6.8876478 146.60113 1.3645943e-08 7.233847e-09
|
||||
370 5.5893468 -6.9649531 -6.8876478 147.10471 1.3829581e-08 4.5514318e-09
|
||||
380 5.5556199 -6.9644866 -6.8876477 148.33195 1.4005893e-08 4.2971846e-09
|
||||
390 5.5019639 -6.9637444 -6.8876476 150.08725 1.4157454e-08 3.3564262e-09
|
||||
400 5.4354239 -6.962824 -6.8876476 152.17073 1.4226422e-08 4.2393923e-09
|
||||
410 5.3628267 -6.9618199 -6.8876475 154.38825 1.4302679e-08 3.8937698e-09
|
||||
420 5.2904639 -6.960819 -6.8876475 156.56034 1.4381099e-08 4.315875e-09
|
||||
430 5.2238282 -6.9598973 -6.8876474 158.52969 1.4426567e-08 4.2658185e-09
|
||||
440 5.1674149 -6.9591171 -6.8876474 160.16704 1.4453381e-08 5.7055268e-09
|
||||
450 5.1245913 -6.9585248 -6.8876474 161.37513 1.4449488e-08 4.4308801e-09
|
||||
460 5.0975361 -6.9581506 -6.8876474 162.09077 1.4445596e-08 5.8269923e-09
|
||||
470 5.0872416 -6.9580082 -6.8876474 162.28517 1.4444348e-08 4.8263194e-09
|
||||
480 5.0935712 -6.9580957 -6.8876474 161.96268 1.4411666e-08 6.222228e-09
|
||||
490 5.115362 -6.9583971 -6.8876474 161.15816 1.4369716e-08 3.3926077e-09
|
||||
500 5.1505605 -6.958884 -6.8876474 159.9333 1.4288515e-08 3.8845251e-09
|
||||
Loop time of 0.252598 on 4 procs for 500 steps with 108 atoms
|
||||
|
||||
Performance: 171.023 ns/day, 0.140 hours/ns, 1979.430 timesteps/s
|
||||
99.8% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.0021545 | 0.0022845 | 0.0023794 | 0.2 | 0.90
|
||||
Neigh | 0.0063887 | 0.0067604 | 0.0069752 | 0.3 | 2.68
|
||||
Comm | 0.01048 | 0.010916 | 0.011408 | 0.3 | 4.32
|
||||
Output | 0.0026603 | 0.0027399 | 0.0029738 | 0.3 | 1.08
|
||||
Modify | 0.2295 | 0.22952 | 0.22954 | 0.0 | 90.86
|
||||
Other | | 0.0003814 | | | 0.15
|
||||
|
||||
Nlocal: 27 ave 29 max 25 min
|
||||
Histogram: 1 0 1 0 0 0 0 1 0 1
|
||||
Nghost: 325 ave 327 max 323 min
|
||||
Histogram: 1 0 1 0 0 0 0 1 0 1
|
||||
Neighs: 243 ave 273 max 228 min
|
||||
Histogram: 1 1 1 0 0 0 0 0 0 1
|
||||
|
||||
Total # of neighbors = 972
|
||||
Ave neighs/atom = 9
|
||||
Neighbor list builds = 500
|
||||
Dangerous builds not checked
|
||||
Total wall time: 0:00:00
|
||||
@ -21,17 +21,17 @@ namespace LAMMPS_NS {
|
||||
class AngleZero2 : public Angle {
|
||||
public:
|
||||
AngleZero2(class LAMMPS *);
|
||||
virtual ~AngleZero2();
|
||||
virtual void compute(int, int);
|
||||
virtual void coeff(int, char **);
|
||||
virtual void settings(int, char **);
|
||||
~AngleZero2() override;
|
||||
void compute(int, int) override;
|
||||
void coeff(int, char **) override;
|
||||
void settings(int, char **) override;
|
||||
|
||||
double equilibrium_angle(int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double equilibrium_angle(int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
|
||||
double single(int, int, int, int);
|
||||
double single(int, int, int, int) override;
|
||||
|
||||
protected:
|
||||
double *theta0;
|
||||
|
||||
@ -21,18 +21,18 @@ namespace LAMMPS_NS {
|
||||
class BondZero2 : public Bond {
|
||||
public:
|
||||
BondZero2(class LAMMPS *);
|
||||
virtual ~BondZero2();
|
||||
virtual void compute(int, int);
|
||||
virtual void settings(int, char **);
|
||||
~BondZero2() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
|
||||
void coeff(int, char **);
|
||||
double equilibrium_distance(int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
void coeff(int, char **) override;
|
||||
double equilibrium_distance(int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
|
||||
double single(int, double, int, int, double &);
|
||||
virtual void *extract(const char *, int &);
|
||||
double single(int, double, int, int, double &) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
protected:
|
||||
double *r0;
|
||||
|
||||
@ -25,14 +25,14 @@ namespace LAMMPS_NS {
|
||||
class DihedralZero2 : public Dihedral {
|
||||
public:
|
||||
DihedralZero2(class LAMMPS *);
|
||||
virtual ~DihedralZero2();
|
||||
virtual void compute(int, int);
|
||||
virtual void coeff(int, char **);
|
||||
virtual void settings(int, char **);
|
||||
~DihedralZero2() override;
|
||||
void compute(int, int) override;
|
||||
void coeff(int, char **) override;
|
||||
void settings(int, char **) override;
|
||||
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
|
||||
protected:
|
||||
int coeffflag;
|
||||
|
||||
@ -11,12 +11,6 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef FIX_CLASS
|
||||
|
||||
FixStyle(nve2, FixNVE2)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_FIX_NVE2_H
|
||||
#define LMP_FIX_NVE2_H
|
||||
|
||||
@ -27,14 +21,14 @@ namespace LAMMPS_NS {
|
||||
class FixNVE2 : public Fix {
|
||||
public:
|
||||
FixNVE2(class LAMMPS *, int, char **);
|
||||
virtual ~FixNVE2() {}
|
||||
int setmask();
|
||||
virtual void init();
|
||||
virtual void initial_integrate(int);
|
||||
virtual void final_integrate();
|
||||
virtual void initial_integrate_respa(int, int, int);
|
||||
virtual void final_integrate_respa(int, int);
|
||||
virtual void reset_dt();
|
||||
|
||||
int setmask() override;
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
void final_integrate() override;
|
||||
void initial_integrate_respa(int, int, int) override;
|
||||
void final_integrate_respa(int, int) override;
|
||||
void reset_dt() override;
|
||||
|
||||
protected:
|
||||
double dtv, dtf;
|
||||
@ -44,7 +38,6 @@ class FixNVE2 : public Fix {
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
@ -21,14 +21,14 @@ namespace LAMMPS_NS {
|
||||
class ImproperZero2 : public Improper {
|
||||
public:
|
||||
ImproperZero2(class LAMMPS *);
|
||||
virtual ~ImproperZero2();
|
||||
virtual void compute(int, int);
|
||||
virtual void coeff(int, char **);
|
||||
virtual void settings(int, char **);
|
||||
~ImproperZero2() override;
|
||||
void compute(int, int) override;
|
||||
void coeff(int, char **) override;
|
||||
void settings(int, char **) override;
|
||||
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
|
||||
protected:
|
||||
int coeffflag;
|
||||
|
||||
@ -21,20 +21,20 @@ namespace LAMMPS_NS {
|
||||
class PairMorse2 : public Pair {
|
||||
public:
|
||||
PairMorse2(class LAMMPS *);
|
||||
virtual ~PairMorse2();
|
||||
virtual void compute(int, int);
|
||||
~PairMorse2() override;
|
||||
void compute(int, int) override;
|
||||
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
void *extract(const char *, int &);
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
double single(int, int, int, int, double, double, double, double &) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
protected:
|
||||
double cut_global;
|
||||
|
||||
@ -28,8 +28,8 @@ class PairMorse2OMP : public PairMorse2, public ThrOMP {
|
||||
public:
|
||||
PairMorse2OMP(class LAMMPS *);
|
||||
|
||||
virtual void compute(int, int);
|
||||
virtual double memory_usage();
|
||||
void compute(int, int) override;
|
||||
double memory_usage() override;
|
||||
|
||||
private:
|
||||
template <int EVFLAG, int EFLAG, int NEWTON_PAIR>
|
||||
|
||||
@ -31,19 +31,19 @@ namespace LAMMPS_NS {
|
||||
class PairZero2 : public Pair {
|
||||
public:
|
||||
PairZero2(class LAMMPS *);
|
||||
virtual ~PairZero2();
|
||||
virtual void compute(int, int);
|
||||
virtual void compute_outer(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
~PairZero2() override;
|
||||
void compute(int, int) override;
|
||||
void compute_outer(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
double single(int, int, int, int, double, double, double, double &) override;
|
||||
|
||||
protected:
|
||||
double cut_global;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# /* ----------------------------------------------------------------------
|
||||
# Generic Linux Makefile for CUDA
|
||||
# Generic Linux Makefile for CUDA with the Multi-Process Service (MPS)
|
||||
# - change CUDA_ARCH for your GPU
|
||||
# ------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -39,11 +39,9 @@ HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --platform)
|
||||
HIP_COMPILER=$(shell $(HIP_PATH)/bin/hipconfig --compiler)
|
||||
|
||||
ifeq (hcc,$(HIP_PLATFORM))
|
||||
HIP_OPTS += -ffast-math
|
||||
# possible values: gfx803,gfx900,gfx906
|
||||
HIP_ARCH = gfx906
|
||||
else ifeq (amd,$(HIP_PLATFORM))
|
||||
HIP_OPTS += -ffast-math
|
||||
# possible values: gfx803,gfx900,gfx906
|
||||
HIP_ARCH = gfx906
|
||||
else ifeq (nvcc,$(HIP_PLATFORM))
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# /* ----------------------------------------------------------------------
|
||||
# Generic Linux Makefile for CUDA
|
||||
# Generic Linux Makefile for CUDA
|
||||
# - Change CUDA_ARCH for your GPU
|
||||
# ------------------------------------------------------------------------- */
|
||||
|
||||
@ -13,7 +13,7 @@ endif
|
||||
|
||||
NVCC = nvcc
|
||||
|
||||
# obsolete hardware. not supported by current drivers anymore.
|
||||
# obsolete hardware. not supported by current drivers and toolkits anymore.
|
||||
#CUDA_ARCH = -arch=sm_13
|
||||
#CUDA_ARCH = -arch=sm_10 -DCUDA_PRE_THREE
|
||||
|
||||
@ -28,11 +28,11 @@ NVCC = nvcc
|
||||
#CUDA_ARCH = -arch=sm_37
|
||||
|
||||
# Maxwell hardware
|
||||
CUDA_ARCH = -arch=sm_50
|
||||
#CUDA_ARCH = -arch=sm_50
|
||||
#CUDA_ARCH = -arch=sm_52
|
||||
|
||||
# Pascal hardware
|
||||
#CUDA_ARCH = -arch=sm_60
|
||||
CUDA_ARCH = -arch=sm_60
|
||||
#CUDA_ARCH = -arch=sm_61
|
||||
|
||||
# Volta hardware
|
||||
@ -70,7 +70,7 @@ LIB_DIR = ./
|
||||
AR = ar
|
||||
BSH = /bin/sh
|
||||
|
||||
# GPU binning not recommended with modern GPUs
|
||||
# GPU binning not recommended for most modern GPUs
|
||||
CUDPP_OPT = #-DUSE_CUDPP -Icudpp_mini
|
||||
|
||||
include Nvidia.makefile
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# /* ----------------------------------------------------------------------
|
||||
# Generic Linux Makefile for CUDA
|
||||
# - Change CUDA_ARCH for your GPU
|
||||
# Generic Linux Makefile for CUDA complied for multiple compute capabilities
|
||||
# - Add your GPU to CUDA_CODE
|
||||
# ------------------------------------------------------------------------- */
|
||||
|
||||
# which file will be copied to Makefile.lammps
|
||||
|
||||
1
lib/gpu/Makefile.mpi
Symbolic link
1
lib/gpu/Makefile.mpi
Symbolic link
@ -0,0 +1 @@
|
||||
Makefile.linux
|
||||
@ -1,5 +1,5 @@
|
||||
# /* ----------------------------------------------------------------------
|
||||
# Generic Linux Makefile for CUDA
|
||||
# Generic Linux Makefile for CUDA without MPI libraries
|
||||
# - Change CUDA_ARCH for your GPU
|
||||
# ------------------------------------------------------------------------- */
|
||||
|
||||
@ -28,11 +28,11 @@ NVCC = nvcc
|
||||
#CUDA_ARCH = -arch=sm_37
|
||||
|
||||
# Maxwell hardware
|
||||
CUDA_ARCH = -arch=sm_50
|
||||
#CUDA_ARCH = -arch=sm_50
|
||||
#CUDA_ARCH = -arch=sm_52
|
||||
|
||||
# Pascal hardware
|
||||
#CUDA_ARCH = -arch=sm_60
|
||||
CUDA_ARCH = -arch=sm_60
|
||||
#CUDA_ARCH = -arch=sm_61
|
||||
|
||||
# Volta hardware
|
||||
@ -41,6 +41,10 @@ CUDA_ARCH = -arch=sm_50
|
||||
# Turing hardware
|
||||
#CUDA_ARCH = -arch=sm_75
|
||||
|
||||
# Ampere hardware
|
||||
#CUDA_ARCH = -arch=sm_80
|
||||
#CUDA_ARCH = -arch=sm_86
|
||||
|
||||
# this setting should match LAMMPS Makefile
|
||||
# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL
|
||||
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
NVCC = $(CUDA_HOME)/bin/nvcc
|
||||
EXTRAMAKE = Makefile.lammps.standard
|
||||
|
||||
CUDA_ARCH = -arch=sm_75
|
||||
CUDA_PRECISION = -D_SINGLE_DOUBLE
|
||||
CUDA_INCLUDE = -I$(CUDA_HOME)/include
|
||||
CUDA_LIB = -L$(CUDA_HOME)/lib64 -Xlinker -rpath -Xlinker $(CUDA_HOME)/lib64 -lcudart
|
||||
CUDA_OPTS = -DUNIX -O3 --use_fast_math --ftz=true
|
||||
|
||||
CUDR_CPP = mpic++ -DMPI_GERYON -DUCL_NO_EXIT -I$(CUDA_HOME)/include
|
||||
CUDR_OPTS = -O3 -ffast-math -funroll-loops -DMPI_GERYON -DLAMMPS_SMALLBIG
|
||||
|
||||
BIN_DIR = .
|
||||
OBJ_DIR = obj
|
||||
LIB_DIR = .
|
||||
AR = ar
|
||||
BSH = /bin/sh
|
||||
|
||||
# GPU binning not recommended with most modern GPUs
|
||||
CUDPP_OPT = #-DUSE_CUDPP -Icudpp_mini
|
||||
|
||||
include Nvidia.makefile
|
||||
|
||||
@ -1224,6 +1224,9 @@ ifeq ($(KOKKOS_INTERNAL_USE_HIP), 1)
|
||||
|
||||
|
||||
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/HIP/*.cpp)
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_DESUL_ATOMICS), 1)
|
||||
KOKKOS_SRC += $(KOKKOS_PATH)/core/src/desul/src/Lock_Array_HIP.cpp
|
||||
endif
|
||||
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/HIP/*.hpp)
|
||||
|
||||
KOKKOS_CXXFLAGS+=$(KOKKOS_INTERNAL_HIP_ARCH_FLAG)
|
||||
|
||||
@ -68,6 +68,8 @@ Kokkos_HIP_Instance.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/HIP/Kokkos_
|
||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_Instance.cpp
|
||||
Kokkos_HIP_Locks.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_Locks.cpp
|
||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/HIP/Kokkos_HIP_Locks.cpp
|
||||
Lock_Array_HIP.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/desul/src/Lock_Array_HIP.cpp
|
||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/desul/src/Lock_Array_HIP.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1)
|
||||
|
||||
@ -694,7 +694,7 @@ std::pair<void *, int> CudaInternal::resize_team_scratch_space(
|
||||
int current_team_scratch = 0;
|
||||
int zero = 0;
|
||||
int one = 1;
|
||||
while (m_team_scratch_pool[current_team_scratch].compare_exchange_weak(
|
||||
while (!m_team_scratch_pool[current_team_scratch].compare_exchange_weak(
|
||||
zero, one, std::memory_order_release, std::memory_order_relaxed)) {
|
||||
current_team_scratch = (current_team_scratch + 1) % m_n_team_scratch;
|
||||
}
|
||||
|
||||
@ -122,6 +122,9 @@ class lammps(object):
|
||||
for f in os.listdir(winpath)]):
|
||||
lib_ext = ".dll"
|
||||
modpath = winpath
|
||||
elif any([f.startswith('liblammps') and f.endswith('.so')
|
||||
for f in os.listdir(modpath)]):
|
||||
lib_ext = ".so"
|
||||
else:
|
||||
import platform
|
||||
if platform.system() == "Darwin":
|
||||
|
||||
4
src/.gitignore
vendored
4
src/.gitignore
vendored
@ -429,6 +429,8 @@
|
||||
/commgrid.h
|
||||
/compute_ackland_atom.cpp
|
||||
/compute_ackland_atom.h
|
||||
/compute_ave_sphere_atom.cpp
|
||||
/compute_ave_sphere_atom.h
|
||||
/compute_basal_atom.cpp
|
||||
/compute_basal_atom.h
|
||||
/compute_body_local.cpp
|
||||
@ -1487,6 +1489,8 @@
|
||||
/pair_dpd_fdt.h
|
||||
/pair_dpd_fdt_energy.cpp
|
||||
/pair_dpd_fdt_energy.h
|
||||
/pair_harmonic_cut.cpp
|
||||
/pair_harmonic_cut.h
|
||||
/pair_lennard_mdf.cpp
|
||||
/pair_lennard_mdf.h
|
||||
/pair_lj_cut_coul_long_cs.cpp
|
||||
|
||||
@ -30,12 +30,12 @@ class DumpAtomADIOS : public DumpAtom {
|
||||
|
||||
public:
|
||||
DumpAtomADIOS(class LAMMPS *, int, char **);
|
||||
virtual ~DumpAtomADIOS();
|
||||
~DumpAtomADIOS() override;
|
||||
|
||||
protected:
|
||||
virtual void openfile();
|
||||
virtual void write();
|
||||
virtual void init_style();
|
||||
void openfile() override;
|
||||
void write() override;
|
||||
void init_style() override;
|
||||
|
||||
private:
|
||||
DumpAtomADIOSInternal *internal;
|
||||
|
||||
@ -29,12 +29,12 @@ class DumpCustomADIOSInternal;
|
||||
class DumpCustomADIOS : public DumpCustom {
|
||||
public:
|
||||
DumpCustomADIOS(class LAMMPS *, int, char **);
|
||||
virtual ~DumpCustomADIOS();
|
||||
~DumpCustomADIOS() override;
|
||||
|
||||
protected:
|
||||
virtual void openfile();
|
||||
virtual void write();
|
||||
virtual void init_style();
|
||||
void openfile() override;
|
||||
void write() override;
|
||||
void init_style() override;
|
||||
|
||||
private:
|
||||
DumpCustomADIOSInternal *internal;
|
||||
|
||||
@ -34,18 +34,18 @@ class ReadADIOSInternal;
|
||||
class ReaderADIOS : public Reader {
|
||||
public:
|
||||
ReaderADIOS(class LAMMPS *);
|
||||
virtual ~ReaderADIOS();
|
||||
~ReaderADIOS() override;
|
||||
|
||||
virtual void settings(int, char **);
|
||||
void settings(int, char **) override;
|
||||
|
||||
virtual int read_time(bigint &);
|
||||
virtual void skip();
|
||||
virtual bigint read_header(double[3][3], int &, int &, int, int, int *, char **, int, int, int &,
|
||||
int &, int &, int &);
|
||||
virtual void read_atoms(int, int, double **);
|
||||
int read_time(bigint &) override;
|
||||
void skip() override;
|
||||
bigint read_header(double[3][3], int &, int &, int, int, int *, char **, int, int, int &,
|
||||
int &, int &, int &) override;
|
||||
void read_atoms(int, int, double **) override;
|
||||
|
||||
virtual void open_file(const char *);
|
||||
virtual void close_file();
|
||||
void open_file(const char *) override;
|
||||
void close_file() override;
|
||||
|
||||
private:
|
||||
int *fieldindex; // mapping of input fields to dump
|
||||
|
||||
@ -27,8 +27,8 @@ namespace LAMMPS_NS {
|
||||
class ComputeERotateAsphere : public Compute {
|
||||
public:
|
||||
ComputeERotateAsphere(class LAMMPS *, int, char **);
|
||||
void init();
|
||||
double compute_scalar();
|
||||
void init() override;
|
||||
double compute_scalar() override;
|
||||
|
||||
private:
|
||||
double pfactor;
|
||||
|
||||
@ -27,16 +27,16 @@ namespace LAMMPS_NS {
|
||||
class ComputeTempAsphere : public Compute {
|
||||
public:
|
||||
ComputeTempAsphere(class LAMMPS *, int, char **);
|
||||
~ComputeTempAsphere();
|
||||
void init();
|
||||
void setup();
|
||||
double compute_scalar();
|
||||
void compute_vector();
|
||||
~ComputeTempAsphere() override;
|
||||
void init() override;
|
||||
void setup() override;
|
||||
double compute_scalar() override;
|
||||
void compute_vector() override;
|
||||
|
||||
void remove_bias(int, double *);
|
||||
void restore_bias(int, double *);
|
||||
void remove_bias_thr(int, double *, double *);
|
||||
void restore_bias_thr(int, double *, double *);
|
||||
void remove_bias(int, double *) override;
|
||||
void restore_bias(int, double *) override;
|
||||
void remove_bias_thr(int, double *, double *) override;
|
||||
void restore_bias_thr(int, double *, double *) override;
|
||||
|
||||
private:
|
||||
int mode;
|
||||
|
||||
@ -21,16 +21,15 @@ namespace LAMMPS_NS {
|
||||
class FixNHAsphere : public FixNH {
|
||||
public:
|
||||
FixNHAsphere(class LAMMPS *, int, char **);
|
||||
virtual ~FixNHAsphere() {}
|
||||
void init();
|
||||
void init() override;
|
||||
|
||||
protected:
|
||||
double dtq;
|
||||
class AtomVecEllipsoid *avec;
|
||||
|
||||
void nve_v();
|
||||
void nve_x();
|
||||
void nh_v_temp();
|
||||
void nve_v() override;
|
||||
void nve_x() override;
|
||||
void nh_v_temp() override;
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -27,7 +27,6 @@ namespace LAMMPS_NS {
|
||||
class FixNPHAsphere : public FixNHAsphere {
|
||||
public:
|
||||
FixNPHAsphere(class LAMMPS *, int, char **);
|
||||
~FixNPHAsphere() {}
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -27,7 +27,6 @@ namespace LAMMPS_NS {
|
||||
class FixNPTAsphere : public FixNHAsphere {
|
||||
public:
|
||||
FixNPTAsphere(class LAMMPS *, int, char **);
|
||||
~FixNPTAsphere() {}
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -27,9 +27,9 @@ namespace LAMMPS_NS {
|
||||
class FixNVEAsphere : public FixNVE {
|
||||
public:
|
||||
FixNVEAsphere(class LAMMPS *, int, char **);
|
||||
void init();
|
||||
void initial_integrate(int);
|
||||
void final_integrate();
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
void final_integrate() override;
|
||||
|
||||
private:
|
||||
double dtq;
|
||||
|
||||
@ -27,8 +27,8 @@ namespace LAMMPS_NS {
|
||||
class FixNVEAsphereNoforce : public FixNVENoforce {
|
||||
public:
|
||||
FixNVEAsphereNoforce(class LAMMPS *, int, char **);
|
||||
void initial_integrate(int);
|
||||
void init();
|
||||
void initial_integrate(int) override;
|
||||
void init() override;
|
||||
|
||||
private:
|
||||
double dtq;
|
||||
|
||||
@ -27,11 +27,10 @@ namespace LAMMPS_NS {
|
||||
class FixNVELine : public FixNVE {
|
||||
public:
|
||||
FixNVELine(class LAMMPS *, int, char **);
|
||||
~FixNVELine() {}
|
||||
int setmask();
|
||||
void init();
|
||||
void initial_integrate(int);
|
||||
void final_integrate();
|
||||
int setmask() override;
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
void final_integrate() override;
|
||||
|
||||
private:
|
||||
double MINUSPI, TWOPI;
|
||||
|
||||
@ -27,11 +27,10 @@ namespace LAMMPS_NS {
|
||||
class FixNVETri : public FixNVE {
|
||||
public:
|
||||
FixNVETri(class LAMMPS *, int, char **);
|
||||
~FixNVETri() {}
|
||||
int setmask();
|
||||
void init();
|
||||
void initial_integrate(int);
|
||||
void final_integrate();
|
||||
int setmask() override;
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
void final_integrate() override;
|
||||
|
||||
private:
|
||||
double dtq;
|
||||
|
||||
@ -27,7 +27,6 @@ namespace LAMMPS_NS {
|
||||
class FixNVTAsphere : public FixNHAsphere {
|
||||
public:
|
||||
FixNVTAsphere(class LAMMPS *, int, char **);
|
||||
~FixNVTAsphere() {}
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -18,18 +18,18 @@
|
||||
|
||||
#include "pair_gayberne.h"
|
||||
|
||||
#include <cmath>
|
||||
#include "math_extra.h"
|
||||
#include "atom.h"
|
||||
#include "atom_vec_ellipsoid.h"
|
||||
#include "comm.h"
|
||||
#include "force.h"
|
||||
#include "neighbor.h"
|
||||
#include "neigh_list.h"
|
||||
#include "citeme.h"
|
||||
#include "memory.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "math_extra.h"
|
||||
#include "memory.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neighbor.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
|
||||
@ -27,18 +27,18 @@ namespace LAMMPS_NS {
|
||||
class PairGayBerne : public Pair {
|
||||
public:
|
||||
PairGayBerne(LAMMPS *lmp);
|
||||
virtual ~PairGayBerne();
|
||||
virtual void compute(int, int);
|
||||
virtual void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
virtual void init_style();
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
~PairGayBerne() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
|
||||
protected:
|
||||
enum { SPHERE_SPHERE, SPHERE_ELLIPSE, ELLIPSE_SPHERE, ELLIPSE_ELLIPSE };
|
||||
|
||||
@ -27,12 +27,12 @@ namespace LAMMPS_NS {
|
||||
class PairLineLJ : public Pair {
|
||||
public:
|
||||
PairLineLJ(class LAMMPS *);
|
||||
virtual ~PairLineLJ();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
virtual void init_style();
|
||||
double init_one(int, int);
|
||||
~PairLineLJ() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
|
||||
protected:
|
||||
double cut_global;
|
||||
|
||||
@ -27,16 +27,16 @@ namespace LAMMPS_NS {
|
||||
class PairRESquared : public Pair {
|
||||
public:
|
||||
PairRESquared(LAMMPS *lmp);
|
||||
virtual ~PairRESquared();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
virtual void init_style();
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
~PairRESquared() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
|
||||
protected:
|
||||
enum { SPHERE_SPHERE, SPHERE_ELLIPSE, ELLIPSE_SPHERE, ELLIPSE_ELLIPSE };
|
||||
|
||||
@ -27,12 +27,12 @@ namespace LAMMPS_NS {
|
||||
class PairTriLJ : public Pair {
|
||||
public:
|
||||
PairTriLJ(class LAMMPS *);
|
||||
virtual ~PairTriLJ();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
virtual void init_style();
|
||||
double init_one(int, int);
|
||||
~PairTriLJ() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
|
||||
protected:
|
||||
double cut_global;
|
||||
|
||||
@ -37,91 +37,91 @@ class FixATC : public Fix {
|
||||
public:
|
||||
/** constructor & destructor */
|
||||
FixATC(class LAMMPS *, int, char **);
|
||||
~FixATC();
|
||||
~FixATC() override;
|
||||
|
||||
/** initialization functions */
|
||||
void init();
|
||||
void init_list(int id, NeighList *ptr);
|
||||
void setup(int vflag);
|
||||
void min_setup(int vflag);
|
||||
void init() override;
|
||||
void init_list(int id, NeighList *ptr) override;
|
||||
void setup(int vflag) override;
|
||||
void min_setup(int vflag) override;
|
||||
|
||||
/** setmask: tell LAMMPS which fix methods to call */
|
||||
int setmask();
|
||||
int setmask() override;
|
||||
|
||||
/** initial_integrate */
|
||||
void initial_integrate(int vflag);
|
||||
void initial_integrate(int vflag) override;
|
||||
|
||||
/** after first integrate phase */
|
||||
void post_integrate();
|
||||
void post_integrate() override;
|
||||
|
||||
/** final_integrate */
|
||||
void final_integrate();
|
||||
void final_integrate() override;
|
||||
|
||||
/** end of step for run or minimize */
|
||||
void end_of_step();
|
||||
void end_of_step() override;
|
||||
|
||||
/** pre_exchange is used to modify fix-specific data
|
||||
and is called before domain->pbc() and comm->exchange(). */
|
||||
void setup_pre_exchange();
|
||||
void pre_exchange();
|
||||
void min_pre_exchange();
|
||||
void setup_pre_exchange() override;
|
||||
void pre_exchange() override;
|
||||
void min_pre_exchange() override;
|
||||
|
||||
double memory_usage();
|
||||
void grow_arrays(int);
|
||||
void copy_arrays(int, int, int);
|
||||
double memory_usage() override;
|
||||
void grow_arrays(int) override;
|
||||
void copy_arrays(int, int, int) override;
|
||||
|
||||
/** pack_exchange called from atom_vec->pack_exchange()
|
||||
and packs fix-specific data for a given real (local)
|
||||
atom being sent to another processor. */
|
||||
int pack_exchange(int, double *);
|
||||
int pack_exchange(int, double *) override;
|
||||
|
||||
/** unpack_exchange called from atom_vec->unpack_exchange()
|
||||
and unpacks fix-specific data for a given real (local)
|
||||
atom received from another processor. */
|
||||
int unpack_exchange(int, double *);
|
||||
int unpack_exchange(int, double *) override;
|
||||
|
||||
/** pack_comm called from comm->forward_comm_fix and
|
||||
packs fix-specific data for a given ghost atom
|
||||
from exchange with another proc */
|
||||
int pack_forward_comm(int, int *, double *, int, int *);
|
||||
int pack_forward_comm(int, int *, double *, int, int *) override;
|
||||
|
||||
/** unpack_comm called from comm->forward_comm_fix and
|
||||
unpacks fix-specific data for a given ghost atom
|
||||
from exchange with another proc */
|
||||
void unpack_forward_comm(int, int, double *);
|
||||
void unpack_forward_comm(int, int, double *) override;
|
||||
|
||||
/** pre_neighbor is used to modify fix-specific data
|
||||
and is called before neighbor list is built in
|
||||
neighbor->build(). */
|
||||
void pre_neighbor();
|
||||
void setup_pre_neighbor();
|
||||
void pre_neighbor() override;
|
||||
void setup_pre_neighbor() override;
|
||||
|
||||
/** pre/post_force is used to modify fix-specific data
|
||||
and is before/after the various force computations. */
|
||||
void pre_force(int vflag);
|
||||
void post_force(int vflag);
|
||||
void pre_force(int vflag) override;
|
||||
void post_force(int vflag) override;
|
||||
|
||||
/** post_run is called after a run completes */
|
||||
void post_run();
|
||||
void post_run() override;
|
||||
|
||||
/** min_pre_force is called before forces are calculated in minimize */
|
||||
void min_pre_force(int vflag);
|
||||
void min_pre_force(int vflag) override;
|
||||
|
||||
/** min_post_force is called after forces are calculated in minimize */
|
||||
void min_post_force(int vflag);
|
||||
void min_post_force(int vflag) override;
|
||||
|
||||
/** modify atc parameters (parser) */
|
||||
int modify_param(int narg, char **arg);
|
||||
int modify_param(int narg, char **arg) override;
|
||||
|
||||
/** calls ATC_Method to handle restarting/checkpointing */
|
||||
/** these four methods are for writing per-atom quantities */
|
||||
int pack_restart(int, double *);
|
||||
void unpack_restart(int, int);
|
||||
int size_restart(int);
|
||||
int maxsize_restart();
|
||||
int pack_restart(int, double *) override;
|
||||
void unpack_restart(int, int) override;
|
||||
int size_restart(int) override;
|
||||
int maxsize_restart() override;
|
||||
/** these two methods are for writing all other quantities */
|
||||
void write_restart(FILE *);
|
||||
void restart(char *);
|
||||
void write_restart(FILE *) override;
|
||||
void restart(char *) override;
|
||||
|
||||
/** accessor function for ATC_Method class pointer */
|
||||
const ATC::ATC_Method *atc() { return atc_; }
|
||||
@ -130,9 +130,9 @@ class FixATC : public Fix {
|
||||
LAMMPS *lammps_;
|
||||
|
||||
/** functions for "thermo" output */
|
||||
virtual double compute_scalar();
|
||||
virtual double compute_vector(int n);
|
||||
virtual double compute_array(int irow, int icol);
|
||||
double compute_scalar() override;
|
||||
double compute_vector(int n) override;
|
||||
double compute_array(int irow, int icol) override;
|
||||
double dtv, dtf;
|
||||
ATC::ATC_Method *atc_;
|
||||
};
|
||||
|
||||
@ -28,12 +28,12 @@ class AtomVecWavepacket : public AtomVec {
|
||||
public:
|
||||
AtomVecWavepacket(class LAMMPS *);
|
||||
|
||||
void grow_pointers();
|
||||
void force_clear(int, size_t);
|
||||
void create_atom_post(int);
|
||||
void data_atom_post(int);
|
||||
int property_atom(char *);
|
||||
void pack_property_atom(int, double *, int, int);
|
||||
void grow_pointers() override;
|
||||
void force_clear(int, size_t) override;
|
||||
void create_atom_post(int) override;
|
||||
void data_atom_post(int) override;
|
||||
int property_atom(char *) override;
|
||||
void pack_property_atom(int, double *, int, int) override;
|
||||
|
||||
private:
|
||||
int *spin;
|
||||
|
||||
@ -31,13 +31,13 @@ namespace LAMMPS_NS {
|
||||
class FixNVEAwpmd : public Fix {
|
||||
public:
|
||||
FixNVEAwpmd(class LAMMPS *, int, char **);
|
||||
int setmask();
|
||||
virtual void init();
|
||||
virtual void initial_integrate(int);
|
||||
virtual void final_integrate();
|
||||
void initial_integrate_respa(int, int, int);
|
||||
void final_integrate_respa(int, int);
|
||||
void reset_dt();
|
||||
int setmask() override;
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
void final_integrate() override;
|
||||
void initial_integrate_respa(int, int, int) override;
|
||||
void final_integrate_respa(int, int) override;
|
||||
void reset_dt() override;
|
||||
|
||||
protected:
|
||||
double dtv, dtf;
|
||||
|
||||
@ -34,22 +34,22 @@ class PairAWPMDCut : public Pair {
|
||||
|
||||
public:
|
||||
PairAWPMDCut(class LAMMPS *);
|
||||
virtual ~PairAWPMDCut();
|
||||
virtual void compute(int, int);
|
||||
virtual void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_style();
|
||||
~PairAWPMDCut() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
void min_pointers(double **, double **);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
virtual void write_restart_settings(FILE *);
|
||||
virtual void read_restart_settings(FILE *);
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
|
||||
void min_xf_pointers(int, double **, double **);
|
||||
void min_xf_get(int);
|
||||
void min_x_set(int);
|
||||
double memory_usage();
|
||||
void min_xf_pointers(int, double **, double **) override;
|
||||
void min_xf_get(int) override;
|
||||
void min_x_set(int) override;
|
||||
double memory_usage() override;
|
||||
|
||||
private:
|
||||
int flexible_pressure_flag;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user