Merge branch 'lammps:develop' into improve_type_label_support
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
message(STATUS "Downloading and building OpenCL loader library")
|
message(STATUS "Downloading and building OpenCL loader library")
|
||||||
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2024.02.09.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
|
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2024.05.09.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
|
||||||
set(OPENCL_LOADER_MD5 "f3573cf9daa3558ba46fd5866517f38f" CACHE STRING "MD5 checksum of OpenCL loader tarball")
|
set(OPENCL_LOADER_MD5 "e7796826b21c059224fabe997e0f2075" CACHE STRING "MD5 checksum of OpenCL loader tarball")
|
||||||
mark_as_advanced(OPENCL_LOADER_URL)
|
mark_as_advanced(OPENCL_LOADER_URL)
|
||||||
mark_as_advanced(OPENCL_LOADER_MD5)
|
mark_as_advanced(OPENCL_LOADER_MD5)
|
||||||
|
|
||||||
|
|||||||
@ -45,8 +45,8 @@ if(DOWNLOAD_KOKKOS)
|
|||||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
|
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
|
||||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/4.3.00.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/4.3.01.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
||||||
set(KOKKOS_MD5 "889dcea2b5ced3debdc5b0820044bdc4" CACHE STRING "MD5 checksum of KOKKOS tarball")
|
set(KOKKOS_MD5 "243de871b3dc2cf3990c1c404032df83" CACHE STRING "MD5 checksum of KOKKOS tarball")
|
||||||
mark_as_advanced(KOKKOS_URL)
|
mark_as_advanced(KOKKOS_URL)
|
||||||
mark_as_advanced(KOKKOS_MD5)
|
mark_as_advanced(KOKKOS_MD5)
|
||||||
GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK)
|
GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK)
|
||||||
@ -71,7 +71,7 @@ if(DOWNLOAD_KOKKOS)
|
|||||||
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
|
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
|
||||||
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
|
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
|
||||||
elseif(EXTERNAL_KOKKOS)
|
elseif(EXTERNAL_KOKKOS)
|
||||||
find_package(Kokkos 4.3.00 REQUIRED CONFIG)
|
find_package(Kokkos 4.3.01 REQUIRED CONFIG)
|
||||||
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
|
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
|
||||||
else()
|
else()
|
||||||
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
||||||
|
|||||||
@ -72,7 +72,7 @@ OPT.
|
|||||||
|
|
||||||
* :doc:`none <angle_none>`
|
* :doc:`none <angle_none>`
|
||||||
* :doc:`zero <angle_zero>`
|
* :doc:`zero <angle_zero>`
|
||||||
* :doc:`hybrid <angle_hybrid>`
|
* :doc:`hybrid (k) <angle_hybrid>`
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|||||||
@ -148,6 +148,14 @@ performance characteristics on NVIDIA GPUs. Both, the KOKKOS
|
|||||||
and the :ref:`GPU package <PKG-GPU>` are maintained
|
and the :ref:`GPU package <PKG-GPU>` are maintained
|
||||||
and allow running LAMMPS with GPU acceleration.
|
and allow running LAMMPS with GPU acceleration.
|
||||||
|
|
||||||
|
i-PI tool
|
||||||
|
---------
|
||||||
|
|
||||||
|
.. versionchanged:: TBD
|
||||||
|
|
||||||
|
The i-PI tool has been removed from the LAMMPS distribution. Instead,
|
||||||
|
instructions to install i-PI from PyPi via pip are provided.
|
||||||
|
|
||||||
restart2data tool
|
restart2data tool
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
|||||||
@ -305,6 +305,8 @@ of the contents of the :f:mod:`LIBLAMMPS` Fortran interface to LAMMPS.
|
|||||||
:ftype extract_setting: function
|
:ftype extract_setting: function
|
||||||
:f extract_global: :f:func:`extract_global`
|
:f extract_global: :f:func:`extract_global`
|
||||||
:ftype extract_global: function
|
:ftype extract_global: function
|
||||||
|
:f map_atom: :f:func:`map_atom`
|
||||||
|
:ftype map_atom: function
|
||||||
:f extract_atom: :f:func:`extract_atom`
|
:f extract_atom: :f:func:`extract_atom`
|
||||||
:ftype extract_atom: function
|
:ftype extract_atom: function
|
||||||
:f extract_compute: :f:func:`extract_compute`
|
:f extract_compute: :f:func:`extract_compute`
|
||||||
|
|||||||
@ -15,7 +15,8 @@ orientation for rotational models. This produces a stress-free initial
|
|||||||
state. Furthermore, bonds are allowed to break under large strains,
|
state. Furthermore, bonds are allowed to break under large strains,
|
||||||
producing fracture. The examples/bpm directory has sample input scripts
|
producing fracture. The examples/bpm directory has sample input scripts
|
||||||
for simulations of the fragmentation of an impacted plate and the
|
for simulations of the fragmentation of an impacted plate and the
|
||||||
pouring of extended, elastic bodies.
|
pouring of extended, elastic bodies. See :ref:`(Clemmer) <howto-Clemmer>`
|
||||||
|
for more general information on the approach and the LAMMPS implementation.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
@ -150,3 +151,9 @@ the following are currently compatible with BPM bond styles:
|
|||||||
interactions, one will need to switch between different *special_bonds*
|
interactions, one will need to switch between different *special_bonds*
|
||||||
settings in the input script. An example is found in
|
settings in the input script. An example is found in
|
||||||
``examples/bpm/impact``.
|
``examples/bpm/impact``.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. _howto-Clemmer:
|
||||||
|
|
||||||
|
**(Clemmer)** Clemmer, Monti, Lechman, Soft Matter, 20, 1702 (2024).
|
||||||
|
|||||||
@ -13,6 +13,7 @@ This section documents the following functions:
|
|||||||
- :cpp:func:`lammps_extract_setting`
|
- :cpp:func:`lammps_extract_setting`
|
||||||
- :cpp:func:`lammps_extract_global_datatype`
|
- :cpp:func:`lammps_extract_global_datatype`
|
||||||
- :cpp:func:`lammps_extract_global`
|
- :cpp:func:`lammps_extract_global`
|
||||||
|
- :cpp:func:`lammps_map_atom`
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
@ -120,3 +121,8 @@ subdomains and processors.
|
|||||||
.. doxygenfunction:: lammps_extract_global
|
.. doxygenfunction:: lammps_extract_global
|
||||||
:project: progguide
|
:project: progguide
|
||||||
|
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
.. doxygenfunction:: lammps_map_atom
|
||||||
|
:project: progguide
|
||||||
|
|
||||||
|
|||||||
@ -90,7 +90,7 @@ Miscellaneous tools
|
|||||||
|
|
||||||
* :ref:`LAMMPS coding standards <coding_standard>`
|
* :ref:`LAMMPS coding standards <coding_standard>`
|
||||||
* :ref:`emacs <emacs>`
|
* :ref:`emacs <emacs>`
|
||||||
* :ref:`i-pi <ipi>`
|
* :ref:`i-PI <ipi>`
|
||||||
* :ref:`kate <kate>`
|
* :ref:`kate <kate>`
|
||||||
* :ref:`LAMMPS shell <lammps_shell>`
|
* :ref:`LAMMPS shell <lammps_shell>`
|
||||||
* :ref:`LAMMPS GUI <lammps_gui>`
|
* :ref:`LAMMPS GUI <lammps_gui>`
|
||||||
@ -376,21 +376,40 @@ See README file in the tools/fep directory.
|
|||||||
|
|
||||||
.. _ipi:
|
.. _ipi:
|
||||||
|
|
||||||
i-pi tool
|
i-PI tool
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
The tools/i-pi directory contains a version of the i-PI package, with
|
.. versionchanged:: TBD
|
||||||
all the LAMMPS-unrelated files removed. It is provided so that it can
|
|
||||||
be used with the :doc:`fix ipi <fix_ipi>` command to perform
|
The tools/i-pi directory used to contain a bundled version of the i-PI
|
||||||
path-integral molecular dynamics (PIMD).
|
software package for use with LAMMPS. This version, however, was
|
||||||
|
removed in 06/2024.
|
||||||
|
|
||||||
The i-PI package was created and is maintained by Michele Ceriotti,
|
The i-PI package was created and is maintained by Michele Ceriotti,
|
||||||
michele.ceriotti at gmail.com, to interface to a variety of molecular
|
michele.ceriotti at gmail.com, to interface to a variety of molecular
|
||||||
dynamics codes.
|
dynamics codes.
|
||||||
|
|
||||||
See the tools/i-pi/manual.pdf file for an overview of i-PI, and the
|
i-PI is now available via PyPi using the pip package manager at:
|
||||||
:doc:`fix ipi <fix_ipi>` page for further details on running PIMD
|
https://pypi.org/project/ipi/
|
||||||
calculations with LAMMPS.
|
|
||||||
|
Here are the commands to set up a virtual environment and install
|
||||||
|
i-PI into it with all its dependencies.
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
python -m venv ipienv
|
||||||
|
source ipienv/bin/activate
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install ipi
|
||||||
|
|
||||||
|
To install the development version from GitHub, please use:
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
pip install git+https://github.com/i-pi/i-pi.git
|
||||||
|
|
||||||
|
For further information, please consult the [i-PI home
|
||||||
|
page](https://ipi-code.org).
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
.. index:: bond_style hybrid
|
.. index:: bond_style hybrid
|
||||||
|
.. index:: bond_style hybrid/kk
|
||||||
|
|
||||||
bond_style hybrid command
|
bond_style hybrid command
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
|
Accelerator Variants: *hybrid/kk*
|
||||||
|
|
||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
@ -15,7 +18,7 @@ Syntax
|
|||||||
Examples
|
Examples
|
||||||
""""""""
|
""""""""
|
||||||
|
|
||||||
.. code-block: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
bond_style hybrid harmonic fene
|
bond_style hybrid harmonic fene
|
||||||
bond_coeff 1 harmonic 80.0 1.2
|
bond_coeff 1 harmonic 80.0 1.2
|
||||||
@ -60,6 +63,10 @@ bond types.
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
.. include:: accel_styles.rst
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
Restrictions
|
Restrictions
|
||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ Syntax
|
|||||||
|
|
||||||
* ID, group-ID are documented in :doc:`compute <compute>` command
|
* ID, group-ID are documented in :doc:`compute <compute>` command
|
||||||
* count/type = style name of this compute command
|
* count/type = style name of this compute command
|
||||||
* mode = {atom} or {bond} or {angle} or {dihedral} or {improper}
|
* mode = *atom* or *bond* or *angle* or *dihedral* or *improper*
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
""""""""
|
""""""""
|
||||||
@ -69,29 +69,42 @@ for each type:
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
If the {mode} setting is {atom} then the count of atoms for each atom
|
If the *mode* setting is *atom* then the count of atoms for each atom
|
||||||
type is tallied. Only atoms in the specified group are counted.
|
type is tallied. Only atoms in the specified group are counted.
|
||||||
|
|
||||||
If the {mode} setting is {bond} then the count of bonds for each bond
|
The atom count for each type can be normalized by the total number of
|
||||||
|
atoms like so:
|
||||||
|
|
||||||
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
compute typevec all count/type atom # number of atoms of each type
|
||||||
|
variable normtypes vector c_typevec/atoms # divide by total number of atoms
|
||||||
|
variable ntypes equal extract_setting(ntypes) # number of atom types
|
||||||
|
thermo_style custom step v_normtypes[*${ntypes}] # vector variable needs upper limit
|
||||||
|
|
||||||
|
Similarly, bond counts can be normalized by the total number of bonds.
|
||||||
|
The same goes for angles, dihedrals, and impropers (see below).
|
||||||
|
|
||||||
|
If the *mode* setting is *bond* then the count of bonds for each bond
|
||||||
type is tallied. Only bonds with both atoms in the specified group
|
type is tallied. Only bonds with both atoms in the specified group
|
||||||
are counted.
|
are counted.
|
||||||
|
|
||||||
For {mode} = {bond}, broken bonds with a bond type of zero are also
|
For *mode* = *bond*, broken bonds with a bond type of zero are also
|
||||||
counted. The :doc:`bond_style quartic <bond_quartic>` and :doc:`BPM
|
counted. The :doc:`bond_style quartic <bond_quartic>` and :doc:`BPM
|
||||||
bond styles <Howto_bpm>` break bonds by doing this. See the :doc:`
|
bond styles <Howto_bpm>` break bonds by doing this. See the
|
||||||
Howto broken bonds <Howto_broken_bonds>` doc page for more details.
|
:doc:`Howto broken bonds <Howto_broken_bonds>` doc page for more details.
|
||||||
Note that the group setting is ignored for broken bonds; all broken
|
Note that the group setting is ignored for broken bonds; all broken
|
||||||
bonds in the system are counted.
|
bonds in the system are counted.
|
||||||
|
|
||||||
If the {mode} setting is {angle} then the count of angles for each
|
If the *mode* setting is *angle* then the count of angles for each
|
||||||
angle type is tallied. Only angles with all 3 atoms in the specified
|
angle type is tallied. Only angles with all 3 atoms in the specified
|
||||||
group are counted.
|
group are counted.
|
||||||
|
|
||||||
If the {mode} setting is {dihedral} then the count of dihedrals for
|
If the *mode* setting is *dihedral* then the count of dihedrals for
|
||||||
each dihedral type is tallied. Only dihedrals with all 4 atoms in the
|
each dihedral type is tallied. Only dihedrals with all 4 atoms in the
|
||||||
specified group are counted.
|
specified group are counted.
|
||||||
|
|
||||||
If the {mode} setting is {improper} then the count of impropers for
|
If the *mode* setting is *improper* then the count of impropers for
|
||||||
each improper type is tallied. Only impropers with all 4 atoms in the
|
each improper type is tallied. Only impropers with all 4 atoms in the
|
||||||
specified group are counted.
|
specified group are counted.
|
||||||
|
|
||||||
@ -101,18 +114,19 @@ Output info
|
|||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
This compute calculates a global vector of counts. If the mode is
|
This compute calculates a global vector of counts. If the mode is
|
||||||
{atom} or {bond} or {angle} or {dihedral} or {improper}, then the
|
*atom* or *bond* or *angle* or *dihedral* or *improper*, then the
|
||||||
vector length is the number of atom types or bond types or angle types
|
vector length is the number of atom types or bond types or angle types
|
||||||
or dihedral types or improper types, respectively.
|
or dihedral types or improper types, respectively.
|
||||||
|
|
||||||
If the mode is {bond} this compute also calculates a global scalar
|
If the mode is *bond* this compute also calculates a global scalar
|
||||||
which is the number of broken bonds with type = 0, as explained above.
|
which is the number of broken bonds with type = 0, as explained above.
|
||||||
|
|
||||||
These values can be used by any command that uses global scalar or
|
These values can be used by any command that uses global scalar or
|
||||||
vector values from a compute as input. See the :doc:`Howto output
|
vector values from a compute as input. See the :doc:`Howto output
|
||||||
<Howto_output>` page for an overview of LAMMPS output options.
|
<Howto_output>` page for an overview of LAMMPS output options.
|
||||||
|
|
||||||
The scalar and vector values calculated by this compute are "extensive".
|
The scalar and vector values calculated by this compute are both
|
||||||
|
"intensive".
|
||||||
|
|
||||||
Restrictions
|
Restrictions
|
||||||
""""""""""""
|
""""""""""""
|
||||||
|
|||||||
@ -126,7 +126,7 @@ These styles are part of the EXTRA-COMPUTE package. They are only
|
|||||||
enabled if LAMMPS is built with that package. See the :doc:`Build
|
enabled if LAMMPS is built with that package. See the :doc:`Build
|
||||||
package <Build_package>` doc page on for more info.
|
package <Build_package>` doc page on for more info.
|
||||||
|
|
||||||
The method is only implemented for 3d orthogonal simulation boxes whose
|
The method is implemented for orthogonal simulation boxes whose
|
||||||
size does not change in time, and axis-aligned planes.
|
size does not change in time, and axis-aligned planes.
|
||||||
|
|
||||||
The method only works with two-body pair interactions, because it
|
The method only works with two-body pair interactions, because it
|
||||||
|
|||||||
@ -475,12 +475,13 @@ to.
|
|||||||
|
|
||||||
The *overlap* keyword only applies to the *random* style. It prevents
|
The *overlap* keyword only applies to the *random* style. It prevents
|
||||||
newly created particles from being created closer than the specified
|
newly created particles from being created closer than the specified
|
||||||
*Doverlap* distance from any other particle. When the particles being
|
*Doverlap* distance from any other particle. If particles have finite
|
||||||
created are molecules, the radius of the molecule (from its geometric
|
size (see :doc:`atom_style sphere <atom_style>` for example) *Doverlap*
|
||||||
center) is added to *Doverlap*. If particles have finite size (see
|
should be specified large enough to include the particle size in the
|
||||||
:doc:`atom_style sphere <atom_style>` for example) *Doverlap* should
|
non-overlapping criterion. If molecules are being randomly inserted, then
|
||||||
be specified large enough to include the particle size in the
|
an insertion is only accepted if each particle in the molecule meets the
|
||||||
non-overlapping criterion.
|
overlap criterion with respect to other particles (not including particles
|
||||||
|
in the molecule itself).
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|||||||
@ -168,7 +168,7 @@ the following global cumulative quantities:
|
|||||||
* 1 = swap attempts
|
* 1 = swap attempts
|
||||||
* 2 = swap accepts
|
* 2 = swap accepts
|
||||||
|
|
||||||
The vector values calculated by this fix are "extensive".
|
The vector values calculated by this fix are "intensive".
|
||||||
|
|
||||||
No parameter of this fix can be used with the *start/stop* keywords of
|
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
|
the :doc:`run <run>` command. This fix is not invoked during
|
||||||
|
|||||||
@ -29,10 +29,12 @@ Syntax
|
|||||||
NOTE: All other styles are documented by the :doc:`fix deform <fix_deform>` command
|
NOTE: All other styles are documented by the :doc:`fix deform <fix_deform>` command
|
||||||
|
|
||||||
*xy*, *xz*, *yz* args = style value
|
*xy*, *xz*, *yz* args = style value
|
||||||
style = *final* or *delta* or *vel* or *erate* or *trate* or *wiggle* or *variable* or *pressure*
|
style = *final* or *delta* or *vel* or *erate* or *trate* or *wiggle* or *variable* or *pressure* or *erate/rescale*
|
||||||
*pressure* values = target gain
|
*pressure* values = target gain
|
||||||
target = target pressure (pressure units)
|
target = target pressure (pressure units)
|
||||||
gain = proportional gain constant (1/(time * pressure) or 1/time units)
|
gain = proportional gain constant (1/(time * pressure) or 1/time units)
|
||||||
|
*erate/rescale* value = R
|
||||||
|
R = engineering shear strain rate (1/time units)
|
||||||
NOTE: All other styles are documented by the :doc:`fix deform <fix_deform>` command
|
NOTE: All other styles are documented by the :doc:`fix deform <fix_deform>` command
|
||||||
|
|
||||||
*box* = style value
|
*box* = style value
|
||||||
@ -159,6 +161,21 @@ details of a simulation and testing different values is
|
|||||||
recommended. One can also apply a maximum limit to the magnitude of
|
recommended. One can also apply a maximum limit to the magnitude of
|
||||||
the applied strain using the :ref:`max/rate <deform_max_rate>` option.
|
the applied strain using the :ref:`max/rate <deform_max_rate>` option.
|
||||||
|
|
||||||
|
The *erate/rescale* style operates similarly to the *erate* style with
|
||||||
|
a specified strain rate in units of 1/time. The difference is that
|
||||||
|
the change in the tilt factor will depend on the current length of
|
||||||
|
the box perpendicular to the shear direction, L, instead of the
|
||||||
|
original length, L0. The tilt factor T as a function of time will
|
||||||
|
change as
|
||||||
|
|
||||||
|
.. parsed-literal::
|
||||||
|
|
||||||
|
T(t) = T(t-1) + L\*erate\* \Delta t
|
||||||
|
|
||||||
|
where T(t-1) is the tilt factor on the previous timestep and :math:`\Delta t`
|
||||||
|
is the timestep size. This option may be useful in scenarios where
|
||||||
|
L changes in time.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
The *box* parameter provides an additional control over the *x*, *y*,
|
The *box* parameter provides an additional control over the *x*, *y*,
|
||||||
@ -294,6 +311,10 @@ This fix is not invoked during :doc:`energy minimization <minimize>`.
|
|||||||
Restrictions
|
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.
|
||||||
|
|
||||||
You cannot apply x, y, or z deformations to a dimension that is
|
You cannot apply x, y, or z deformations to a dimension that is
|
||||||
shrink-wrapped via the :doc:`boundary <boundary>` command.
|
shrink-wrapped via the :doc:`boundary <boundary>` command.
|
||||||
|
|
||||||
|
|||||||
@ -422,7 +422,7 @@ the following global cumulative quantities:
|
|||||||
* 7 = rotation attempts
|
* 7 = rotation attempts
|
||||||
* 8 = rotation successes
|
* 8 = rotation successes
|
||||||
|
|
||||||
The vector values calculated by this fix are "extensive".
|
The vector values calculated by this fix are "intensive".
|
||||||
|
|
||||||
No parameter of this fix can be used with the *start/stop* keywords of
|
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
|
the :doc:`run <run>` command. This fix is not invoked during
|
||||||
|
|||||||
@ -512,8 +512,7 @@ Value 27 computes the average boost for biased bonds only on this step.
|
|||||||
Value 28 is the count of bonds with an absolute value of strain >= q
|
Value 28 is the count of bonds with an absolute value of strain >= q
|
||||||
on this step.
|
on this step.
|
||||||
|
|
||||||
The scalar value is an "extensive" quantity since it grows with the
|
The scalar value and vector values are all "intensive".
|
||||||
system size; the vector values are all "intensive".
|
|
||||||
|
|
||||||
This fix also computes a local vector of length the number of bonds
|
This fix also computes a local vector of length the number of bonds
|
||||||
currently in the system. The value for each bond is its :math:`C_{ij}`
|
currently in the system. The value for each bond is its :math:`C_{ij}`
|
||||||
|
|||||||
@ -35,23 +35,24 @@ Description
|
|||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
This fix enables LAMMPS to be run as a client for the i-PI Python
|
This fix enables LAMMPS to be run as a client for the i-PI Python
|
||||||
wrapper :ref:`(IPI) <ipihome>` for performing a path integral molecular dynamics
|
wrapper :ref:`(IPI) <ipihome>`. i-PI is a universal force engine,
|
||||||
(PIMD) simulation. The philosophy behind i-PI is described in the
|
designed to perform advanced molecular simulations, with a special
|
||||||
following publication :ref:`(IPI-CPC) <IPICPC>`.
|
focus on path integral molecular dynamics (PIMD) simulation.
|
||||||
|
The philosophy behind i-PI is to separate the evaluation of the
|
||||||
|
energy and forces, which is delegated to the client, and the evolution
|
||||||
|
of the dynamics, that is the responsibility of i-PI. This approach also
|
||||||
|
simplifies combining energies computed from different codes, which
|
||||||
|
can for instance be useful to mix first-principles calculations,
|
||||||
|
empirical force fields or machine-learning potentials.
|
||||||
|
The following publication :ref:`(IPI-CPC-2014) <IPICPC>` discusses the
|
||||||
|
overall implementation of i-PI, and focuses on path-integral techniques,
|
||||||
|
while a later release :ref:`(IPI-CPC-2019) <IPICPC2>` introduces several
|
||||||
|
additional features and simulation schemes.
|
||||||
|
|
||||||
A version of the i-PI package, containing only files needed for use
|
The communication between i-PI and LAMMPS takes place using sockets,
|
||||||
with LAMMPS, is provided in the tools/i-pi directory. See the
|
and is reduced to the bare minimum. All the parameters of the dynamics
|
||||||
tools/i-pi/manual.pdf for an introduction to i-PI. The
|
are specified in the input of i-PI, and all the parameters of the force
|
||||||
examples/PACKAGES/i-pi directory contains example scripts for using i-PI
|
field must be specified as LAMMPS inputs, preceding the *fix ipi* command.
|
||||||
with LAMMPS.
|
|
||||||
|
|
||||||
In brief, the path integral molecular dynamics is performed by the
|
|
||||||
Python wrapper, while the client (LAMMPS in this case) simply computes
|
|
||||||
forces and energy for each configuration. The communication between
|
|
||||||
the two components takes place using sockets, and is reduced to the
|
|
||||||
bare minimum. All the parameters of the dynamics are specified in the
|
|
||||||
input of i-PI, and all the parameters of the force field must be
|
|
||||||
specified as LAMMPS inputs, preceding the *fix ipi* command.
|
|
||||||
|
|
||||||
The server address must be specified by the *address* argument, and
|
The server address must be specified by the *address* argument, and
|
||||||
can be either the IP address, the fully-qualified name of the server,
|
can be either the IP address, the fully-qualified name of the server,
|
||||||
@ -75,6 +76,20 @@ If the cell varies too wildly, it may be advisable to re-initialize
|
|||||||
these interactions at each call. This behavior can be requested by
|
these interactions at each call. This behavior can be requested by
|
||||||
setting the *reset* switch.
|
setting the *reset* switch.
|
||||||
|
|
||||||
|
Obtaining i-PI
|
||||||
|
""""""""""""""
|
||||||
|
|
||||||
|
Here are the commands to set up a virtual environment and install
|
||||||
|
i-PI into it with all its dependencies via the PyPi repository and
|
||||||
|
the pip package manager.
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
python -m venv ipienv
|
||||||
|
source ipienv/bin/activate
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install ipi
|
||||||
|
|
||||||
Restart, fix_modify, output, run start/stop, minimize info
|
Restart, fix_modify, output, run start/stop, minimize info
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
@ -111,9 +126,14 @@ Related commands
|
|||||||
|
|
||||||
.. _IPICPC:
|
.. _IPICPC:
|
||||||
|
|
||||||
**(IPI-CPC)** Ceriotti, More and Manolopoulos, Comp Phys Comm, 185,
|
**(IPI-CPC-2014)** Ceriotti, More and Manolopoulos, Comp Phys Comm 185,
|
||||||
1019-1026 (2014).
|
1019-1026 (2014).
|
||||||
|
|
||||||
|
.. _IPICPC2:
|
||||||
|
|
||||||
|
**(IPI-CPC-2019)** Kapil et al., Comp Phys Comm 236, 214-223 (2019).
|
||||||
|
|
||||||
|
|
||||||
.. _ipihome:
|
.. _ipihome:
|
||||||
|
|
||||||
**(IPI)**
|
**(IPI)**
|
||||||
|
|||||||
@ -149,7 +149,7 @@ the following global cumulative quantities:
|
|||||||
* 1 = swap attempts
|
* 1 = swap attempts
|
||||||
* 2 = swap accepts
|
* 2 = swap accepts
|
||||||
|
|
||||||
The vector values calculated by this fix are "extensive".
|
The vector values calculated by this fix are "intensive".
|
||||||
|
|
||||||
No parameter of this fix can be used with the *start/stop* keywords of
|
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
|
the :doc:`run <run>` command. This fix is not invoked during
|
||||||
|
|||||||
@ -8,7 +8,7 @@ Syntax
|
|||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
fix ID group nonaffine/displacement style args reference/style nstep
|
fix ID group nonaffine/displacement style args reference/style nstep keyword values
|
||||||
|
|
||||||
* ID, group are documented in :doc:`fix <fix>` command
|
* ID, group are documented in :doc:`fix <fix>` command
|
||||||
* nonaffine/displacement = style name of this fix command
|
* nonaffine/displacement = style name of this fix command
|
||||||
@ -32,6 +32,13 @@ Syntax
|
|||||||
*update* = update the reference frame every *nstep* timesteps
|
*update* = update the reference frame every *nstep* timesteps
|
||||||
*offset* = update the reference frame *nstep* timesteps before calculating the nonaffine displacement
|
*offset* = update the reference frame *nstep* timesteps before calculating the nonaffine displacement
|
||||||
|
|
||||||
|
* zero or more keyword/value pairs may be appended
|
||||||
|
|
||||||
|
.. parsed-literal::
|
||||||
|
|
||||||
|
*z/min* values = zmin
|
||||||
|
zmin = minimum coordination number to calculate D2min
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
""""""""
|
""""""""
|
||||||
|
|
||||||
@ -76,6 +83,12 @@ is the identity tensor. This calculation is only performed on timesteps that
|
|||||||
are a multiple of *nevery* (including timestep zero). Data accessed before
|
are a multiple of *nevery* (including timestep zero). Data accessed before
|
||||||
this occurs will simply be zeroed.
|
this occurs will simply be zeroed.
|
||||||
|
|
||||||
|
For particles with low coordination numbers, calculations of :math:`D^2_\mathrm{min}`
|
||||||
|
may not be accurate. An optional minimum coordination number can be defined using
|
||||||
|
the *z/min* keyword. If any particle has fewer than the specified number of particles
|
||||||
|
in the cutoff distance or in contact, the above calculations will be skipped and the
|
||||||
|
corresponding peratom array entries will be zero.
|
||||||
|
|
||||||
The *integrated* style simply integrates the velocity of particles
|
The *integrated* style simply integrates the velocity of particles
|
||||||
every timestep to calculate a displacement. This style only works if
|
every timestep to calculate a displacement. This style only works if
|
||||||
used in conjunction with another fix that deforms the box and displaces
|
used in conjunction with another fix that deforms the box and displaces
|
||||||
|
|||||||
@ -20,7 +20,7 @@ Syntax
|
|||||||
* Nfreq = calculate average bond-order every this many timesteps
|
* Nfreq = calculate average bond-order every this many timesteps
|
||||||
* filename = name of output file
|
* filename = name of output file
|
||||||
* zero or more keyword/value pairs may be appended
|
* zero or more keyword/value pairs may be appended
|
||||||
* keyword = *cutoff* or *element* or *position* or *delete*
|
* keyword = *cutoff* or *element* or *position* or *delete* or *delete_rate_limit*
|
||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
@ -110,10 +110,10 @@ all types from 1 to :math:`N`. A leading asterisk means all types from
|
|||||||
The optional keyword *element* can be used to specify the chemical
|
The optional keyword *element* can be used to specify the chemical
|
||||||
symbol printed for each LAMMPS atom type. The number of symbols must
|
symbol printed for each LAMMPS atom type. The number of symbols must
|
||||||
match the number of LAMMPS atom types and each symbol must consist of
|
match the number of LAMMPS atom types and each symbol must consist of
|
||||||
1 or 2 alphanumeric characters. Normally, these symbols should be
|
1 or 2 alphanumeric characters. By default, these symbols are the same
|
||||||
chosen to match the chemical identity of each LAMMPS atom type, as
|
as the chemical identity of each LAMMPS atom type, as specified by the
|
||||||
specified using the :doc:`reaxff pair_coeff <pair_reaxff>` command and
|
:doc:`ReaxFF pair_coeff <pair_reaxff>` command and the ReaxFF force
|
||||||
the ReaxFF force field file.
|
field file.
|
||||||
|
|
||||||
The optional keyword *position* writes center-of-mass positions of
|
The optional keyword *position* writes center-of-mass positions of
|
||||||
each identified molecules to file *filepos* every *posfreq* timesteps.
|
each identified molecules to file *filepos* every *posfreq* timesteps.
|
||||||
@ -134,36 +134,34 @@ value. For example, AuO.pos.\* becomes AuO.pos.0, AuO.pos.1000, etc.
|
|||||||
|
|
||||||
.. versionadded:: 3Aug2022
|
.. versionadded:: 3Aug2022
|
||||||
|
|
||||||
The optional keyword *delete* enables the periodic removal of
|
The optional keyword *delete* enables the periodic removal of molecules
|
||||||
molecules from the system. Criteria for deletion can be either a list
|
from the system :ref:`(Gissinger) <Delete>`. Criteria for deletion can
|
||||||
of specific chemical formulae or a range of molecular weights.
|
be either a list of specific chemical formulae or a range of molecular
|
||||||
Molecules are deleted every *Nfreq* timesteps, and bond connectivity
|
weights. Molecules are deleted every *Nfreq* timesteps, and bond
|
||||||
is determined using the *Nevery* and *Nrepeat* keywords. The
|
connectivity is determined using the *Nevery* and *Nrepeat* keywords. The
|
||||||
*filedel* argument is the name of the output file that records the
|
*filedel* argument is the name of the output file that records the species
|
||||||
species that are removed from the system. The *specieslist* keyword
|
that are removed from the system. The *specieslist* keyword permits
|
||||||
permits specific chemical species to be deleted. The *Nspecies*
|
specific chemical species to be deleted. The *Nspecies* argument specifies
|
||||||
argument specifies how many species are eligible for deletion and is
|
how many species are eligible for deletion and is followed by a list of
|
||||||
followed by a list of chemical formulae, whose strings are compared to
|
chemical formulae, whose strings are compared to species identified by this
|
||||||
species identified by this fix. For example, "specieslist 2 CO CO2"
|
fix. For example, "specieslist 2 CO CO2" deletes molecules that are
|
||||||
deletes molecules that are identified as "CO" and "CO2" in the species
|
identified as "CO" and "CO2" in the species output file. When using the
|
||||||
output file. When using the *specieslist* keyword, the *filedel* file
|
*specieslist* keyword, the *filedel* file has the following format: the
|
||||||
has the following format: the first line lists the chemical formulae
|
first line lists the chemical formulae eligible for deletion, and each
|
||||||
eligible for deletion, and each additional line contains the timestep
|
additional line contains the timestep on which a molecule deletion occurs
|
||||||
on which a molecule deletion occurs and the number of each species
|
and the number of each species deleted on that timestep. The *masslimit*
|
||||||
deleted on that timestep. The *masslimit* keyword permits deletion of
|
keyword permits deletion of molecules with molecular weights between
|
||||||
molecules with molecular weights between *massmin* and *massmax*.
|
*massmin* and *massmax*. When using the *masslimit* keyword, each line of
|
||||||
When using the *masslimit* keyword, each line of the *filedel* file
|
the *filedel* file contains the timestep on which deletions occurs,
|
||||||
contains the timestep on which deletions occurs, followed by how many
|
followed by how many of each species are deleted (with quantities preceding
|
||||||
of each species are deleted (with quantities preceding chemical
|
chemical formulae). The *specieslist* and *masslimit* keywords cannot both
|
||||||
formulae). The *specieslist* and *masslimit* keywords cannot both be
|
be used in the same *reaxff/species* fix. The *delete_rate_limit* keyword
|
||||||
used in the same *reaxff/species* fix. The *delete_rate_limit*
|
can enforce an upper limit on the overall rate of molecule deletion. The
|
||||||
keyword can enforce an upper limit on the overall rate of molecule
|
number of deletion occurrences is limited to Nlimit within an interval of
|
||||||
deletion. The number of deletion occurrences is limited to Nlimit
|
Nsteps timesteps. Nlimit can be specified with an equal-style
|
||||||
within an interval of Nsteps timesteps. Nlimit can be specified with
|
:doc:`variable <variable>`. When using the *delete_rate_limit* keyword, no
|
||||||
an equal-style :doc:`variable <variable>`. When using the
|
deletions are permitted to occur within the first Nsteps timesteps of the
|
||||||
*delete_rate_limit* keyword, no deletions are permitted to occur
|
first run (after reading a either a data or restart file).
|
||||||
within the first Nsteps timesteps of the first run (after reading a
|
|
||||||
either a data or restart file).
|
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
@ -233,5 +231,9 @@ Default
|
|||||||
"""""""
|
"""""""
|
||||||
|
|
||||||
The default values for bond-order cutoffs are 0.3 for all I-J pairs.
|
The default values for bond-order cutoffs are 0.3 for all I-J pairs.
|
||||||
The default element symbols are C, H, O, N.
|
The default element symbols are taken from the ReaxFF pair_coeff command.
|
||||||
Position files are not written by default.
|
Position files are not written by default.
|
||||||
|
|
||||||
|
.. _Delete:
|
||||||
|
|
||||||
|
**(Gissinger)** Jacob R. Gissinger, Scott R. Zavada, Joseph G. Smith, Josh Kemppainen, Ivan Gallegos, Gregory M. Odegard, Emilie J. Siochi, and Kristopher E. Wise, Carbon, 202, 336-347 (2023).
|
||||||
|
|||||||
@ -148,6 +148,8 @@ components of the vector represent the following quantities:
|
|||||||
* ...
|
* ...
|
||||||
* N+2: The current global concentration of species *X* (= number of atoms of type *N* / total number of atoms)
|
* N+2: The current global concentration of species *X* (= number of atoms of type *N* / total number of atoms)
|
||||||
|
|
||||||
|
The vector values calculated by this fix are "intensive".
|
||||||
|
|
||||||
Restrictions
|
Restrictions
|
||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
|
|||||||
@ -182,7 +182,7 @@ the following global cumulative quantities:
|
|||||||
* 2 = average difference in potential energy on each timestep
|
* 2 = average difference in potential energy on each timestep
|
||||||
* 3 = volume of the insertion region
|
* 3 = volume of the insertion region
|
||||||
|
|
||||||
The vector values calculated by this fix are "extensive".
|
The vector values calculated by this fix are "intensive".
|
||||||
|
|
||||||
No parameter of this fix can be used with the *start/stop* keywords of
|
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
|
the :doc:`run <run>` command. This fix is not invoked during
|
||||||
|
|||||||
@ -64,8 +64,8 @@ Restrictions
|
|||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
This improper style can only be used if LAMMPS was built with the
|
This improper style can only be used if LAMMPS was built with the
|
||||||
MOLECULE package. See the :doc:`Build package <Build_package>` doc
|
EXTRA-MOLECULE package. See the :doc:`Build package <Build_package>`
|
||||||
page for more info.
|
doc page for more info.
|
||||||
|
|
||||||
Related commands
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|||||||
@ -54,8 +54,8 @@ Restrictions
|
|||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
This improper style can only be used if LAMMPS was built with the
|
This improper style can only be used if LAMMPS was built with the
|
||||||
MOLECULE package. See the :doc:`Build package <Build_package>` doc
|
EXTRA-MOLECULE package. See the :doc:`Build package <Build_package>`
|
||||||
page for more info.
|
doc page for more info.
|
||||||
|
|
||||||
Related commands
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|||||||
@ -60,8 +60,8 @@ Restrictions
|
|||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
This angle style can only be used if LAMMPS was built with the
|
This angle style can only be used if LAMMPS was built with the
|
||||||
MOLECULE package. See the :doc:`Build package <Build_package>` doc
|
EXTRA-MOLECULE package. See the :doc:`Build package <Build_package>`
|
||||||
page for more info.
|
doc page for more info.
|
||||||
|
|
||||||
Related commands
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|||||||
@ -72,8 +72,8 @@ Restrictions
|
|||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
This improper style can only be used if LAMMPS was built with the
|
This improper style can only be used if LAMMPS was built with the
|
||||||
MOLECULE package. See the :doc:`Build package <Build_package>` doc
|
EXTRA-MOLECULE package. See the :doc:`Build package <Build_package>`
|
||||||
page for more info.
|
doc page for more info.
|
||||||
|
|
||||||
Related commands
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|||||||
@ -379,10 +379,11 @@ These pair styles can only be used via the *pair* keyword of the
|
|||||||
Restrictions
|
Restrictions
|
||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
The *coul/cut/global*, *coul/long*, *coul/msm*, *coul/streitz*, and *tip4p/long* styles
|
The *coul/long*, *coul/msm*, *coul/streitz*, and *tip4p/long* styles are
|
||||||
are part of the KSPACE package. They are only enabled if LAMMPS was built
|
part of the KSPACE package. The *coul/cut/global* and *coul/exclude* are
|
||||||
with that package. See the :doc:`Build package <Build_package>` doc page
|
part of the EXTRA-PAIR package. A pair style is only enabled if LAMMPS was
|
||||||
for more info.
|
built with its corresponding package. See the :doc:`Build package <Build_package>`
|
||||||
|
doc page for more info.
|
||||||
|
|
||||||
Related commands
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|||||||
@ -187,6 +187,7 @@ for the damping model currently supported are:
|
|||||||
2. *mass_velocity*
|
2. *mass_velocity*
|
||||||
3. *viscoelastic*
|
3. *viscoelastic*
|
||||||
4. *tsuji*
|
4. *tsuji*
|
||||||
|
5. *coeff_restitution*
|
||||||
|
|
||||||
If the *damping* keyword is not specified, the *viscoelastic* model is
|
If the *damping* keyword is not specified, the *viscoelastic* model is
|
||||||
used by default.
|
used by default.
|
||||||
@ -248,6 +249,29 @@ The dimensionless coefficient of restitution :math:`e` specified as part
|
|||||||
of the normal contact model parameters should be between 0 and 1, but
|
of the normal contact model parameters should be between 0 and 1, but
|
||||||
no error check is performed on this.
|
no error check is performed on this.
|
||||||
|
|
||||||
|
The *coeff_restitution* model is useful when a specific normal coefficient of
|
||||||
|
restitution :math:`e` is required. In these models, the normal coefficient of
|
||||||
|
restitution :math:`e` is specified as an input. Following the approach of
|
||||||
|
:ref:`(Brilliantov et al) <Brill1996>`, when using the *hooke* normal model,
|
||||||
|
*coeff_restitution* calculates the damping coefficient as:
|
||||||
|
|
||||||
|
.. math::
|
||||||
|
|
||||||
|
\eta_n = \sqrt{\frac{4m_{eff}k_n}{1+\left( \frac{\pi}{\log(e)}\right)^2}} ,
|
||||||
|
|
||||||
|
For any other normal model, e.g. the *hertz* and *hertz/material* models, the damping
|
||||||
|
coefficient is:
|
||||||
|
|
||||||
|
.. math::
|
||||||
|
|
||||||
|
\eta_n = -2\sqrt{\frac{5}{6}}\frac{\log(e)}{\sqrt{\pi^2+(\log(e))^2}}(R_{eff} \delta_{ij})^{\frac{1}{4}}\sqrt{\frac{3}{2}k_n m_{eff}} ,
|
||||||
|
|
||||||
|
where :math:`k_n = \frac{4}{3} E_{eff}` for the *hertz/material* model. Since
|
||||||
|
*coeff_restitution* accounts for the effective mass, effective radius, and
|
||||||
|
pairwise overlaps (except when used with the *hooke* normal model) when calculating
|
||||||
|
the damping coefficient, it accurately reproduces the specified coefficient of
|
||||||
|
restitution for both monodisperse and polydisperse particle pairs.
|
||||||
|
|
||||||
The total normal force is computed as the sum of the elastic and
|
The total normal force is computed as the sum of the elastic and
|
||||||
damping components:
|
damping components:
|
||||||
|
|
||||||
|
|||||||
@ -8,56 +8,118 @@ Syntax
|
|||||||
|
|
||||||
.. code-block:: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
replicate nx ny nz *keyword*
|
replicate nx ny nz keyword ...
|
||||||
|
|
||||||
nx,ny,nz = replication factors in each dimension
|
nx,ny,nz = replication factors in each dimension
|
||||||
|
|
||||||
* optional *keyword* = *bbox*
|
* zero or more keywords may be appended
|
||||||
|
* keyword = *bbox* or *bond/periodic*
|
||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
*bbox* = only check atoms in replicas that overlap with a processor's subdomain
|
*bbox* = use a bounding-box algorithm which is faster for large proc counts
|
||||||
|
*bond/periodic* = use an algorithm that correctly replicates periodic bond loops
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
""""""""
|
""""""""
|
||||||
|
|
||||||
|
For examples of replicating simple linear polymer chains (periodic or
|
||||||
|
non-periodic) or periodic carbon nanotubes, see examples/replicate.
|
||||||
|
|
||||||
.. code-block:: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
replicate 2 3 2
|
replicate 2 3 2
|
||||||
|
replicate 2 3 2 bbox
|
||||||
|
replicate 2 3 2 bond/periodic
|
||||||
|
|
||||||
Description
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
Replicate the current simulation one or more times in each dimension.
|
Replicate the current system one or more times in each dimension. For
|
||||||
For example, replication factors of 2,2,2 will create a simulation
|
example, replication factors of 2,2,2 will create a simulation with 8x
|
||||||
with 8x as many atoms by doubling the simulation domain in each
|
as many atoms by doubling the size of the simulation box in each
|
||||||
dimension. A replication factor of 1 in a dimension leaves the
|
dimension. A replication factor of 1 leaves the simulation domain
|
||||||
simulation domain unchanged. When the new simulation box is created
|
unchanged in that dimension.
|
||||||
it is also partitioned into a regular 3d grid of rectangular bricks,
|
|
||||||
one per processor, based on the number of processors being used and
|
|
||||||
the settings of the :doc:`processors <processors>` command. The
|
|
||||||
partitioning can later be changed by the :doc:`balance <balance>` or
|
|
||||||
:doc:`fix balance <fix_balance>` commands.
|
|
||||||
|
|
||||||
All properties of the atoms are replicated, including their
|
When the new simulation box is created it is partitioned into a
|
||||||
velocities, which may or may not be desirable. New atom IDs are
|
regular 3d grid of rectangular bricks, one per processor, based on the
|
||||||
assigned to new atoms, as are molecule IDs. Bonds and other topology
|
number of processors being used and the settings of the
|
||||||
interactions are created between pairs of new atoms as well as between
|
:doc:`processors <processors>` command. The partitioning can be
|
||||||
old and new atoms. This is done by using the image flag for each atom
|
changed by subsequent :doc:`balance <balance>` or :doc:`fix balance
|
||||||
to "unwrap" it out of the periodic box before replicating it.
|
<fix_balance>` commands.
|
||||||
|
|
||||||
This means that any molecular bond you specify in the original data
|
All properties of each atom are replicated (except per-atom fix data,
|
||||||
file that crosses a periodic boundary should be between two atoms with
|
see the Restrictions section below). This includes their velocities,
|
||||||
image flags that differ by 1. This will allow the bond to be
|
which may or may not be desirable. New atom IDs are assigned to new
|
||||||
unwrapped appropriately.
|
atoms, as are new molecule IDs. Bonds and other topology interactions
|
||||||
|
are created between pairs of new atoms as well as between old and new
|
||||||
|
atoms.
|
||||||
|
|
||||||
The optional keyword *bbox* uses a bounding box to only check atoms in
|
.. note::
|
||||||
replicas that overlap with a processor's subdomain when assigning
|
|
||||||
atoms to processors. It typically results in a substantial speedup
|
The bond discussion which follows only refers to models with
|
||||||
when using the replicate command on a large number of processors. It
|
permanent covalent bonds typically defined in LAMMPS via a data
|
||||||
does require temporary use of more memory, specifically that each
|
file. It is not relevant to systems modeled with many-body
|
||||||
processor can store all atoms in the entire system before it is
|
potentials which can define bonds on-the-fly, based on the current
|
||||||
replicated.
|
positions of nearby atoms, e.g. models using the :doc:`AIREBO
|
||||||
|
<pair_airebo>` or :doc:`ReaxFF <pair_reaxff>` potentials.
|
||||||
|
|
||||||
|
If the *bond/periodic* keyword is not specified, bond replication is
|
||||||
|
done by using the image flag for each atom to "unwrap" it out of the
|
||||||
|
periodic box before replicating it. After replication is performed,
|
||||||
|
atoms outside the new periodic box are wrapped back into it. This
|
||||||
|
assigns correct images flags to all atoms in the system. For this to
|
||||||
|
work, all original atoms in the original simulation box must have
|
||||||
|
consistent image flags. This means that if two atoms have a bond
|
||||||
|
between them which crosses a periodic boundary, their respective image
|
||||||
|
flags will differ by 1 in that dimension.
|
||||||
|
|
||||||
|
Image flag consistency is not possible if a system has a periodic bond
|
||||||
|
loop, meaning there is a chain of bonds which crosses an entire
|
||||||
|
dimension and re-connects to itself across a periodic boundary. In
|
||||||
|
this case you MUST use the *bond/periodic* keyword to correctly
|
||||||
|
replicate the system. This option zeroes the image flags for all
|
||||||
|
atoms and uses a different algorithm to find new (nearby) bond
|
||||||
|
neighbors in the replicated system. In the final replicated system
|
||||||
|
all image flags are zero (in each dimension).
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
LAMMPS does not check for image flag consistency before performing
|
||||||
|
the replication (it does issue a warning about this before a
|
||||||
|
simulation is run). If the original image flags are inconsistent,
|
||||||
|
the replicated system will also have inconsistent image flags, but
|
||||||
|
will otherwise be correctly replicated. This is NOT the case if
|
||||||
|
there is a periodic bond loop. See the next note.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
LAMMPS does not check for periodic bond loops. If you use the
|
||||||
|
*bond/periodic* keyword for a system without periodic bond loops,
|
||||||
|
the system will be correctly replicated, but image flag information
|
||||||
|
will be lost (which may or may not be important to your model). If
|
||||||
|
you do not use the *bond/periodic* keyword for a system with
|
||||||
|
periodic bond loops, the replicated system will have invalid bonds
|
||||||
|
(typically very long), resulting in bad dynamics.
|
||||||
|
|
||||||
|
If possible, the *bbox* keyword should be used when running on a large
|
||||||
|
number of processors, as it can result in a substantial speed-up for
|
||||||
|
the replication operation. It uses a bounding box to only check atoms
|
||||||
|
in replicas that overlap with each processor's new subdomain when
|
||||||
|
assigning atoms to processors. It also preserves image flag
|
||||||
|
information. The only drawback to the *bbox* option is that it
|
||||||
|
requires a temporary use of more memory. Each processor must be able
|
||||||
|
to store all atoms (and their per-atom data) in the original system,
|
||||||
|
before it is replicated.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
The algorithm used by the *bond/periodic* keyword builds on the
|
||||||
|
algorithm used by the *bbox* keyword and thus has the same memory
|
||||||
|
requirements. If you specify only the *bond/peridoic* keyword it
|
||||||
|
will internally set the *bbox* keyword as well.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
Restrictions
|
Restrictions
|
||||||
""""""""""""
|
""""""""""""
|
||||||
@ -65,49 +127,30 @@ Restrictions
|
|||||||
A 2d simulation cannot be replicated in the z dimension.
|
A 2d simulation cannot be replicated in the z dimension.
|
||||||
|
|
||||||
If a simulation is non-periodic in a dimension, care should be used
|
If a simulation is non-periodic in a dimension, care should be used
|
||||||
when replicating it in that dimension, as it may put atoms nearly on
|
when replicating it in that dimension, as it may generate atoms nearly
|
||||||
top of each other.
|
on top of each other.
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
You cannot use the replicate command on a system which has a
|
|
||||||
molecule that spans the box and is bonded to itself across a periodic
|
|
||||||
boundary, so that the molecule is effectively a loop. A simple
|
|
||||||
example would be a linear polymer chain that spans the simulation box
|
|
||||||
and bonds back to itself across the periodic boundary. More realistic
|
|
||||||
examples would be a CNT (meant to be an infinitely long CNT) or a
|
|
||||||
graphene sheet or a bulk periodic crystal where there are explicit
|
|
||||||
bonds specified between near neighbors. (Note that this only applies
|
|
||||||
to systems that have permanent bonds as specified in the data file. A
|
|
||||||
CNT that is just atoms modeled with the :doc:`AIREBO potential <pair_airebo>` has no such permanent bonds, so it can be
|
|
||||||
replicated.) The reason replication does not work with those systems
|
|
||||||
is that the image flag settings described above cannot be made
|
|
||||||
consistent. I.e. it is not possible to define images flags so that
|
|
||||||
when every pair of bonded atoms is unwrapped (using the image flags),
|
|
||||||
they will be close to each other. The only way the replicate command
|
|
||||||
could work in this scenario is for it to break a bond, insert more
|
|
||||||
atoms, and re-connect the loop for the larger simulation box. But it
|
|
||||||
is not clever enough to do this. So you will have to construct a
|
|
||||||
larger version of your molecule as a pre-processing step and input a
|
|
||||||
new data file to LAMMPS.
|
|
||||||
|
|
||||||
If the current simulation was read in from a restart file (before a
|
If the current simulation was read in from a restart file (before a
|
||||||
run is performed), there must not be any fix information stored in
|
run is performed), there must not be any fix information stored in the
|
||||||
the file for individual atoms. Similarly, no fixes can be defined at
|
file for individual atoms. Similarly, no fixes can be defined at the
|
||||||
the time the replicate command is used that require vectors of atom
|
time the replicate command is used that require vectors of atom
|
||||||
information to be stored. This is because the replicate command does
|
information to be stored. This is because the replicate command does
|
||||||
not know how to replicate that information for new atoms it creates.
|
not know how to replicate that information for new atoms it creates.
|
||||||
To work around this restriction, restart files may be converted into
|
|
||||||
data files and fixes may be undefined via the :doc:`unfix <unfix>`
|
To work around this restriction two options are possible. (1) Fixes
|
||||||
command before and redefined after the replicate command.
|
which use the stored data in the restart file can be defined before
|
||||||
|
replication and then deleted via the :doc:`unfix <unfix>` command and
|
||||||
|
re-defined after it. Or (2) the restart file can be converted to a
|
||||||
|
data file (which deletes the stored fix information) and fixes defined
|
||||||
|
after the replicate command. In both these scenarios, the per-atom
|
||||||
|
fix information in the restart file is lost.
|
||||||
|
|
||||||
Related commands
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|
||||||
none
|
none
|
||||||
|
|
||||||
|
|
||||||
Default
|
Default
|
||||||
"""""""
|
"""""""
|
||||||
|
|
||||||
none
|
No settings for using the *bbox* or *bond/periodic* algorithms.
|
||||||
|
|||||||
@ -67,7 +67,7 @@ Syntax
|
|||||||
bound(group,dir,region), gyration(group,region), ke(group,reigon),
|
bound(group,dir,region), gyration(group,region), ke(group,reigon),
|
||||||
angmom(group,dim,region), torque(group,dim,region),
|
angmom(group,dim,region), torque(group,dim,region),
|
||||||
inertia(group,dimdim,region), omega(group,dim,region)
|
inertia(group,dimdim,region), omega(group,dim,region)
|
||||||
special functions = sum(x), min(x), max(x), ave(x), trap(x), slope(x), gmask(x), rmask(x), grmask(x,y), next(x), is_file(name), is_os(name), extract_setting(name), label2type(kind,label), is_typelabel(kind,label)
|
special functions = sum(x), min(x), max(x), ave(x), trap(x), slope(x), sort(x), rsort(x), gmask(x), rmask(x), grmask(x,y), next(x), is_file(name), is_os(name), extract_setting(name), label2type(kind,label), is_typelabel(kind,label)
|
||||||
feature functions = is_available(category,feature), is_active(category,feature), is_defined(category,id)
|
feature functions = is_available(category,feature), is_active(category,feature), is_defined(category,id)
|
||||||
atom value = id[i], mass[i], type[i], mol[i], x[i], y[i], z[i], vx[i], vy[i], vz[i], fx[i], fy[i], fz[i], q[i]
|
atom value = id[i], mass[i], type[i], mol[i], x[i], y[i], z[i], vx[i], vy[i], vz[i], fx[i], fy[i], fz[i], q[i]
|
||||||
atom vector = id, mass, type, mol, radius, q, x, y, z, vx, vy, vz, fx, fy, fz
|
atom vector = id, mass, type, mol, radius, q, x, y, z, vx, vy, vz, fx, fy, fz
|
||||||
@ -547,7 +547,7 @@ variables.
|
|||||||
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
| Region functions | count(ID,IDR), mass(ID,IDR), charge(ID,IDR), xcm(ID,dim,IDR), vcm(ID,dim,IDR), fcm(ID,dim,IDR), bound(ID,dir,IDR), gyration(ID,IDR), ke(ID,IDR), angmom(ID,dim,IDR), torque(ID,dim,IDR), inertia(ID,dimdim,IDR), omega(ID,dim,IDR) |
|
| Region functions | count(ID,IDR), mass(ID,IDR), charge(ID,IDR), xcm(ID,dim,IDR), vcm(ID,dim,IDR), fcm(ID,dim,IDR), bound(ID,dir,IDR), gyration(ID,IDR), ke(ID,IDR), angmom(ID,dim,IDR), torque(ID,dim,IDR), inertia(ID,dimdim,IDR), omega(ID,dim,IDR) |
|
||||||
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
| Special functions | sum(x), min(x), max(x), ave(x), trap(x), slope(x), gmask(x), rmask(x), grmask(x,y), next(x), is_file(name), is_os(name), extract_setting(name), label2type(kind,label), is_typelabel(kind,label) |
|
| Special functions | sum(x), min(x), max(x), ave(x), trap(x), slope(x), sort(x), rsort(x), gmask(x), rmask(x), grmask(x,y), next(x), is_file(name), is_os(name), extract_setting(name), label2type(kind,label), is_typelabel(kind,label) |
|
||||||
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
| Feature functions | is_available(category,feature), is_active(category,feature), is_defined(category,id) |
|
| Feature functions | is_available(category,feature), is_active(category,feature), is_defined(category,id) |
|
||||||
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
@ -913,23 +913,27 @@ Special Functions
|
|||||||
Special functions take specific kinds of arguments, meaning their
|
Special functions take specific kinds of arguments, meaning their
|
||||||
arguments cannot be formulas themselves.
|
arguments cannot be formulas themselves.
|
||||||
|
|
||||||
The sum(x), min(x), max(x), ave(x), trap(x), and slope(x) functions
|
The sum(x), min(x), max(x), ave(x), trap(x), slope(x), sort(x), and
|
||||||
each take 1 argument which is of the form "c_ID" or "c_ID[N]" or
|
rsort(x) functions each take 1 argument which is of the form "c_ID" or
|
||||||
"f_ID" or "f_ID[N]" or "v_name". The first two are computes and the
|
"c_ID[N]" or "f_ID" or "f_ID[N]" or "v_name". The first two are
|
||||||
second two are fixes; the ID in the reference should be replaced by
|
computes and the second two are fixes; the ID in the reference should be
|
||||||
the ID of a compute or fix defined elsewhere in the input script. The
|
replaced by the ID of a compute or fix defined elsewhere in the input
|
||||||
compute or fix must produce either a global vector or array. If it
|
script. The compute or fix must produce either a global vector or
|
||||||
produces a global vector, then the notation without "[N]" should be
|
array. If it produces a global vector, then the notation without "[N]"
|
||||||
used. If it produces a global array, then the notation with "[N]"
|
should be used. If it produces a global array, then the notation with
|
||||||
should be used, when N is an integer, to specify which column of the
|
"[N]" should be used, where N is an integer, to specify which column of
|
||||||
global array is being referenced. The last form of argument "v_name"
|
the global array is being referenced. The last form of argument
|
||||||
is for a vector-style variable where "name" is replaced by the name of
|
"v_name" is for a vector-style variable where "name" is replaced by the
|
||||||
the variable.
|
name of the variable.
|
||||||
|
|
||||||
These functions operate on a global vector of inputs and reduce it to
|
The sum(x), min(x), max(x), ave(x), trap(x), and slope(x) functions
|
||||||
a single scalar value. This is analogous to the operation of the
|
operate on a global vector of inputs and reduce it to a single scalar
|
||||||
:doc:`compute reduce <compute_reduce>` command, which performs similar
|
value. This is analogous to the operation of the :doc:`compute reduce
|
||||||
operations on per-atom and local vectors.
|
<compute_reduce>` command, which performs similar operations on per-atom
|
||||||
|
and local vectors.
|
||||||
|
|
||||||
|
The sort(x) and rsort(x) functions operate on a global vector of inputs
|
||||||
|
and return a global vector of the same length.
|
||||||
|
|
||||||
The sum() function calculates the sum of all the vector elements. The
|
The sum() function calculates the sum of all the vector elements. The
|
||||||
min() and max() functions find the minimum and maximum element
|
min() and max() functions find the minimum and maximum element
|
||||||
@ -953,6 +957,12 @@ of points, equally spaced by 1 in their x coordinate: (1,V1), (2,V2),
|
|||||||
length N. The returned value is the slope of the line. If the line
|
length N. The returned value is the slope of the line. If the line
|
||||||
has a single point or is vertical, it returns 1.0e20.
|
has a single point or is vertical, it returns 1.0e20.
|
||||||
|
|
||||||
|
.. versionadded:: TBD
|
||||||
|
|
||||||
|
The sort(x) and rsort(x) functions sort the data of the input vector by
|
||||||
|
their numeric value: sort(x) sorts in ascending order, rsort(x) sorts
|
||||||
|
in descending order.
|
||||||
|
|
||||||
The gmask(x) function takes 1 argument which is a group ID. It
|
The gmask(x) function takes 1 argument which is a group ID. It
|
||||||
can only be used in atom-style variables. It returns a 1 for
|
can only be used in atom-style variables. It returns a 1 for
|
||||||
atoms that are in the group, and a 0 for atoms that are not.
|
atoms that are in the group, and a 0 for atoms that are not.
|
||||||
|
|||||||
@ -12,14 +12,14 @@ Syntax
|
|||||||
|
|
||||||
* file = name of data file to write out
|
* file = name of data file to write out
|
||||||
* zero or more keyword/value pairs may be appended
|
* zero or more keyword/value pairs may be appended
|
||||||
* keyword = *pair* or *nocoeff* or *nofix* or *nolabelmap*
|
* keyword = *nocoeff* or *nofix* or *nolabelmap* or *triclinic/general* or *types* or *pair*
|
||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
*nocoeff* = do not write out force field info
|
*nocoeff* = do not write out force field info
|
||||||
*nofix* = do not write out extra sections read by fixes
|
*nofix* = do not write out extra sections read by fixes
|
||||||
*nolabelmap* = do not write out type labels
|
*nolabelmap* = do not write out type labels
|
||||||
*triclinic/general = write data file in general triclinic format
|
*triclinic/general* = write data file in general triclinic format
|
||||||
*types* value = *numeric* or *labels*
|
*types* value = *numeric* or *labels*
|
||||||
*pair* value = *ii* or *ij*
|
*pair* value = *ii* or *ij*
|
||||||
*ii* = write one line of pair coefficient info per atom type
|
*ii* = write one line of pair coefficient info per atom type
|
||||||
@ -189,4 +189,4 @@ Related commands
|
|||||||
Default
|
Default
|
||||||
"""""""
|
"""""""
|
||||||
|
|
||||||
The option defaults are pair = ii and types_style = numeric.
|
The option defaults are pair = ii and types = numeric.
|
||||||
|
|||||||
@ -992,6 +992,7 @@ emax
|
|||||||
Emax
|
Emax
|
||||||
Embt
|
Embt
|
||||||
emi
|
emi
|
||||||
|
Emilie
|
||||||
Emmrich
|
Emmrich
|
||||||
emol
|
emol
|
||||||
eN
|
eN
|
||||||
@ -1732,6 +1733,7 @@ Kalia
|
|||||||
Kamberaj
|
Kamberaj
|
||||||
Kantorovich
|
Kantorovich
|
||||||
Kapfer
|
Kapfer
|
||||||
|
Kapil
|
||||||
Karhunen
|
Karhunen
|
||||||
Karls
|
Karls
|
||||||
Karlsruhe
|
Karlsruhe
|
||||||
@ -1763,8 +1765,10 @@ keflag
|
|||||||
Keir
|
Keir
|
||||||
Kelchner
|
Kelchner
|
||||||
Kelkar
|
Kelkar
|
||||||
|
Kemppainen
|
||||||
Kemper
|
Kemper
|
||||||
kepler
|
kepler
|
||||||
|
Kemppainen
|
||||||
keV
|
keV
|
||||||
Keyes
|
Keyes
|
||||||
keyfile
|
keyfile
|
||||||
@ -2483,6 +2487,7 @@ Nevery
|
|||||||
newfile
|
newfile
|
||||||
Newns
|
Newns
|
||||||
newtype
|
newtype
|
||||||
|
nextsort
|
||||||
Neyts
|
Neyts
|
||||||
Nf
|
Nf
|
||||||
nfft
|
nfft
|
||||||
@ -2672,6 +2677,7 @@ nzlo
|
|||||||
ocl
|
ocl
|
||||||
octahedral
|
octahedral
|
||||||
octants
|
octants
|
||||||
|
Odegard
|
||||||
Ohara
|
Ohara
|
||||||
O'Hearn
|
O'Hearn
|
||||||
ohenrich
|
ohenrich
|
||||||
@ -3252,6 +3258,7 @@ rRESPA
|
|||||||
Rsi
|
Rsi
|
||||||
Rso
|
Rso
|
||||||
Rspace
|
Rspace
|
||||||
|
rsort
|
||||||
rsq
|
rsq
|
||||||
rst
|
rst
|
||||||
rstyle
|
rstyle
|
||||||
@ -3287,6 +3294,7 @@ Saidi
|
|||||||
saip
|
saip
|
||||||
Salanne
|
Salanne
|
||||||
Salles
|
Salles
|
||||||
|
sametag
|
||||||
sandia
|
sandia
|
||||||
Sandia
|
Sandia
|
||||||
sandybrown
|
sandybrown
|
||||||
@ -3404,6 +3412,7 @@ sinh
|
|||||||
sinusoid
|
sinusoid
|
||||||
sinusoidally
|
sinusoidally
|
||||||
SiO
|
SiO
|
||||||
|
Siochi
|
||||||
Sirk
|
Sirk
|
||||||
Sival
|
Sival
|
||||||
sizeI
|
sizeI
|
||||||
@ -3451,6 +3460,7 @@ solvated
|
|||||||
solvation
|
solvation
|
||||||
someuser
|
someuser
|
||||||
Sorensen
|
Sorensen
|
||||||
|
sortfreq
|
||||||
soundspeed
|
soundspeed
|
||||||
sourceforge
|
sourceforge
|
||||||
Souza
|
Souza
|
||||||
@ -4149,6 +4159,7 @@ yy
|
|||||||
yz
|
yz
|
||||||
Zagaceta
|
Zagaceta
|
||||||
Zannoni
|
Zannoni
|
||||||
|
Zavada
|
||||||
Zavattieri
|
Zavattieri
|
||||||
zbl
|
zbl
|
||||||
ZBL
|
ZBL
|
||||||
@ -4162,6 +4173,7 @@ zenodo
|
|||||||
Zepeda
|
Zepeda
|
||||||
zflag
|
zflag
|
||||||
Zhang
|
Zhang
|
||||||
|
Zhao
|
||||||
Zhen
|
Zhen
|
||||||
zhi
|
zhi
|
||||||
Zhigilei
|
Zhigilei
|
||||||
|
|||||||
@ -101,6 +101,7 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib)
|
|||||||
ADDSYM(extract_setting);
|
ADDSYM(extract_setting);
|
||||||
ADDSYM(extract_global_datatype);
|
ADDSYM(extract_global_datatype);
|
||||||
ADDSYM(extract_global);
|
ADDSYM(extract_global);
|
||||||
|
ADDSYM(map_atom);
|
||||||
|
|
||||||
ADDSYM(extract_atom_datatype);
|
ADDSYM(extract_atom_datatype);
|
||||||
ADDSYM(extract_atom);
|
ADDSYM(extract_atom);
|
||||||
|
|||||||
@ -146,6 +146,7 @@ struct _liblammpsplugin {
|
|||||||
int (*extract_setting)(void *, const char *);
|
int (*extract_setting)(void *, const char *);
|
||||||
int *(*extract_global_datatype)(void *, const char *);
|
int *(*extract_global_datatype)(void *, const char *);
|
||||||
void *(*extract_global)(void *, const char *);
|
void *(*extract_global)(void *, const char *);
|
||||||
|
void *(*map_atom)(void *, const void *);
|
||||||
|
|
||||||
int *(*extract_atom_datatype)(void *, const char *);
|
int *(*extract_atom_datatype)(void *, const char *);
|
||||||
void *(*extract_atom)(void *, const char *);
|
void *(*extract_atom)(void *, const char *);
|
||||||
|
|||||||
@ -1,17 +1,17 @@
|
|||||||
i-PI path integral interface examples
|
i-PI path integral interface examples
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
This folder contains a couple of examples to run LAMMPS as a client,
|
This folder contains an example to run LAMMPS as a client,
|
||||||
exchanging information on the atomic configurations, energy and forces
|
exchanging information on the atomic configurations, energy and forces
|
||||||
with the i-PI Python interface
|
with the [http://ipi-code.org](i-PI Python interface). These
|
||||||
[http://epfl-cosmo.github.io/gle4md/index.html?page=ipi]. These
|
|
||||||
examples require a working copy of i-PI and compiling LAMMPS in a UNIX
|
examples require a working copy of i-PI and compiling LAMMPS in a UNIX
|
||||||
environment. Note that a copy of i-PI is provided with LAMMPS, in the
|
environment.
|
||||||
tools/i-pi directory.
|
i-PI can be installed from source or from `pip`. Please refer to the
|
||||||
|
documentation for up-to-date installation instruction.
|
||||||
|
|
||||||
Note that the i-PI examples listed here are designed for the public V1.0
|
Note that the i-PI examples listed here have been tested to work with the
|
||||||
version of i-PI. Refer to the LAMMPS examples distributed with i-PI if you
|
3.0 version of i-PI. Refer to the LAMMPS examples distributed with i-PI if you
|
||||||
are using a development version.
|
are using a different version.
|
||||||
|
|
||||||
Path integral simulation of graphene
|
Path integral simulation of graphene
|
||||||
------------------------------------
|
------------------------------------
|
||||||
@ -25,7 +25,7 @@ and the format of the output.
|
|||||||
How to run i-PI
|
How to run i-PI
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
You should have a relatively recent (>=2.5) version of Python and Numpy,
|
You should have a relatively recent (>=3.5) version of Python and Numpy,
|
||||||
and the public version of i-PI. You can then run i-PI by executing
|
and the public version of i-PI. You can then run i-PI by executing
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@ -33,7 +33,7 @@ and the public version of i-PI. You can then run i-PI by executing
|
|||||||
```
|
```
|
||||||
|
|
||||||
In a separate terminal, then, you should run LAMMPS compiled to provide
|
In a separate terminal, then, you should run LAMMPS compiled to provide
|
||||||
fix_ipi functionalities.
|
`fix_ipi` functionalities.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$LAMMPS -in in.graphene
|
$LAMMPS -in in.graphene
|
||||||
@ -41,6 +41,3 @@ fix_ipi functionalities.
|
|||||||
|
|
||||||
You can run multiple instances of LAMMPS if you want to exploit the
|
You can run multiple instances of LAMMPS if you want to exploit the
|
||||||
parallelism over the path integral beads.
|
parallelism over the path integral beads.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,31 +1,37 @@
|
|||||||
<simulation verbosity="medium">
|
<simulation verbosity='medium'>
|
||||||
<initialize nbeads='8'>
|
<output prefix='simulation'>
|
||||||
<file mode='xyz' units="angstrom"> i-pi_positions.xyz </file>
|
<properties stride='5' filename='out' flush="10" > [ step, time{picosecond}, conserved{kelvin}, temperature{kelvin}, kinetic_cv{kelvin}, potential{kelvin}, pressure_cv{megapascal}] </properties>
|
||||||
<cell mode='manual' units="angstrom"> [ 51.8,0,0,0, 49.84,0,0,0, 200 ] </cell>
|
|
||||||
<velocities mode='thermal' units='kelvin'> 300 </velocities>
|
|
||||||
</initialize>
|
|
||||||
<output prefix='graphene'>
|
|
||||||
<properties stride='5' filename='out' flush="10" > [ step, time{picosecond}, conserved{electronvolt}, temperature{kelvin}, kinetic_cv{electronvolt}, potential{electronvolt}, pressure_cv{megapascal}] </properties>
|
|
||||||
<properties stride='5' filename='iso' flush="10" > [ isotope_tdfep(1.167;C), isotope_scfep(1.167;0) ] </properties>
|
<properties stride='5' filename='iso' flush="10" > [ isotope_tdfep(1.167;C), isotope_scfep(1.167;0) ] </properties>
|
||||||
<trajectory stride='20' filename='pos' flush="100"> positions{angstrom}</trajectory>
|
<properties stride='1' filename='kc'> [ kinetic_cv{kelvin}(C) ] </properties>
|
||||||
<checkpoint stride='2000' />
|
<trajectory stride='5' filename='pos' flush="100">positions{angstrom}</trajectory>
|
||||||
</output>
|
<trajectory stride='5' filename='kin' flush="100"> kinetic_cv </trajectory>
|
||||||
<total_steps>1000</total_steps>
|
<checkpoint stride='20000'/>
|
||||||
<total_time>128000</total_time>
|
</output>
|
||||||
<prng><seed>8417</seed></prng>
|
<total_steps>1000000</total_steps>
|
||||||
<forces>
|
<prng>
|
||||||
<socket mode="unix">
|
<seed>31415</seed>
|
||||||
<address>graphene</address>
|
</prng>
|
||||||
</socket>
|
<ffsocket name='lammps' mode='unix'>
|
||||||
</forces>
|
<address> graphene </address>
|
||||||
<ensemble mode='nvt'>
|
</ffsocket>
|
||||||
<thermostat mode='gle'>
|
<system>
|
||||||
<A shape='(5,5)'>
|
<initialize nbeads='8'>
|
||||||
[ 1.124524713863e-3, 1.648702679619e-6, 6.970075857471e-5, -2.202066291263e-4, 1.401342873485e-3, -1.681700567912e-6, 5.197673899653e-10, 4.365423872046e-6, -1.200041116490e-6, 2.564577183580e-6, -8.965478630849e-5, -4.365423872046e-6, 8.218704940997e-6, 3.114246791997e-5, -6.044142906315e-5, -6.272281358913e-5, 1.200041116490e-6, -3.114246791997e-5, 1.612301941566e-4, 6.958958085115e-5, 1.318373360752e-3, -2.564577183580e-6, 6.044142906315e-5, -6.958958085115e-5, 1.872119364197e-3]
|
<file mode='xyz'> i-pi_positions.xyz </file>
|
||||||
</A>
|
<velocities mode='thermal' units='kelvin'> 300 </velocities>
|
||||||
</thermostat>
|
</initialize>
|
||||||
<timestep units="femtosecond">1.0</timestep>
|
<forces>
|
||||||
<temperature units='kelvin'>300</temperature>
|
<force forcefield='lammps'> </force>
|
||||||
<fixcom> True </fixcom>
|
</forces>
|
||||||
</ensemble>
|
<motion mode='dynamics'>
|
||||||
|
<dynamics mode='nvt'>
|
||||||
|
<timestep units='femtosecond'> 1.0 </timestep>
|
||||||
|
<thermostat mode='langevin'>
|
||||||
|
<tau units='femtosecond'> 100 </tau>
|
||||||
|
</thermostat>
|
||||||
|
</dynamics>
|
||||||
|
</motion>
|
||||||
|
<ensemble>
|
||||||
|
<temperature units='kelvin'> 300 </temperature>
|
||||||
|
</ensemble>
|
||||||
|
</system>
|
||||||
</simulation>
|
</simulation>
|
||||||
|
|||||||
@ -104,6 +104,7 @@ prd: parallel replica dynamics of vacancy diffusion in bulk Si
|
|||||||
python: use of PYTHON package to invoke Python code from input script
|
python: use of PYTHON package to invoke Python code from input script
|
||||||
qeq: use of QEQ package for charge equilibration
|
qeq: use of QEQ package for charge equilibration
|
||||||
reaxff: RDX and TATB and several other models using ReaxFF
|
reaxff: RDX and TATB and several other models using ReaxFF
|
||||||
|
replicate: use of replicate command
|
||||||
rerun: use of rerun and read_dump commands
|
rerun: use of rerun and read_dump commands
|
||||||
rigid: rigid bodies modeled as independent or coupled
|
rigid: rigid bodies modeled as independent or coupled
|
||||||
shear: sideways shear applied to 2d solid, with and without a void
|
shear: sideways shear applied to 2d solid, with and without a void
|
||||||
|
|||||||
18
examples/granular/data.particles
Normal file
18
examples/granular/data.particles
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
Python generated LAMMPS data file
|
||||||
|
|
||||||
|
2 atoms
|
||||||
|
1 atom types
|
||||||
|
|
||||||
|
0 0.08 xlo xhi
|
||||||
|
0 0.04 ylo yhi
|
||||||
|
0 0.08 zlo zhi
|
||||||
|
|
||||||
|
Atoms # sphere
|
||||||
|
|
||||||
|
1 1 0.004 2500 0.04 0.02 0.04 0 0 0
|
||||||
|
2 1 0.004 2500 0.04 0.02 0.04416 0 0 0
|
||||||
|
|
||||||
|
Velocities
|
||||||
|
|
||||||
|
1 0.0 0.0 1 0 0 0
|
||||||
|
2 0.0 0.0 -1 0 0 0
|
||||||
24
examples/granular/in.restitution
Normal file
24
examples/granular/in.restitution
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
units si
|
||||||
|
atom_style sphere
|
||||||
|
|
||||||
|
boundary p p f
|
||||||
|
region box block 0 80e-3 0 40e-3 0 80e-3 open 3 open 4
|
||||||
|
create_box 2 box
|
||||||
|
|
||||||
|
read_data data.particles add append
|
||||||
|
group mb type 1
|
||||||
|
|
||||||
|
pair_style granular
|
||||||
|
pair_coeff * * hertz/material 1e6 0.8 0.4 tangential mindlin NULL 0.0 0.5 damping coeff_restitution
|
||||||
|
# pair_coeff * * hooke 1e6 0.5 tangential mindlin 1 1.0 0.0 damping coeff_restitution
|
||||||
|
comm_modify vel yes
|
||||||
|
|
||||||
|
timestep 1e-9
|
||||||
|
fix 1 all nve/sphere
|
||||||
|
compute s all stress/atom NULL pair
|
||||||
|
|
||||||
|
#dump 1 all custom 2000000 op.dump id x y z vx vy vz
|
||||||
|
#dump_modify 1 pad 8
|
||||||
|
thermo_style custom step ke
|
||||||
|
run_style verlet
|
||||||
|
run 10000000
|
||||||
80
examples/granular/log.13May23.restitution.g++.1
Normal file
80
examples/granular/log.13May23.restitution.g++.1
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
LAMMPS (17 Apr 2024 - Development - patch_17Apr2024-93-g4e7bddaa0b)
|
||||||
|
using 1 OpenMP thread(s) per MPI task
|
||||||
|
units si
|
||||||
|
atom_style sphere
|
||||||
|
|
||||||
|
boundary p p f
|
||||||
|
region box block 0 80e-3 0 40e-3 0 80e-3 open 3 open 4
|
||||||
|
create_box 2 box
|
||||||
|
Created orthogonal box = (0 0 0) to (0.08 0.04 0.08)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
|
||||||
|
read_data data.particles add append
|
||||||
|
Reading data file ...
|
||||||
|
orthogonal box = (0 0 0) to (0.08 0.04 0.08)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
reading atoms ...
|
||||||
|
2 atoms
|
||||||
|
reading velocities ...
|
||||||
|
2 velocities
|
||||||
|
read_data CPU = 0.002 seconds
|
||||||
|
group mb type 1
|
||||||
|
2 atoms in group mb
|
||||||
|
|
||||||
|
pair_style granular
|
||||||
|
pair_coeff * * hertz/material 1e6 0.8 0.4 tangential mindlin NULL 0.0 0.5 damping coeff_restitution
|
||||||
|
# pair_coeff * * hooke 1e6 0.5 tangential mindlin 1 1.0 0.0 damping coeff_restitution
|
||||||
|
comm_modify vel yes
|
||||||
|
|
||||||
|
timestep 1e-9
|
||||||
|
fix 1 all nve/sphere
|
||||||
|
compute s all stress/atom NULL pair
|
||||||
|
|
||||||
|
#dump 1 all custom 2000000 op.dump id x y z vx vy vz
|
||||||
|
#dump_modify 1 pad 8
|
||||||
|
thermo_style custom step ke
|
||||||
|
run_style verlet
|
||||||
|
run 10000000
|
||||||
|
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 0.005
|
||||||
|
ghost atom cutoff = 0.005
|
||||||
|
binsize = 0.0025, bins = 32 16 32
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair granular, perpetual
|
||||||
|
attributes: half, newton on, size, history
|
||||||
|
pair build: half/size/bin/atomonly/newton
|
||||||
|
stencil: half/bin/3d
|
||||||
|
bin: standard
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 10.1 | 10.1 | 10.1 Mbytes
|
||||||
|
Step KinEng
|
||||||
|
0 8.3775804e-05
|
||||||
|
10000000 5.3616513e-05
|
||||||
|
Loop time of 5.99782 on 1 procs for 10000000 steps with 2 atoms
|
||||||
|
|
||||||
|
77.9% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 0.60235 | 0.60235 | 0.60235 | 0.0 | 10.04
|
||||||
|
Neigh | 0.00021965 | 0.00021965 | 0.00021965 | 0.0 | 0.00
|
||||||
|
Comm | 1.7939 | 1.7939 | 1.7939 | 0.0 | 29.91
|
||||||
|
Output | 2.5955e-05 | 2.5955e-05 | 2.5955e-05 | 0.0 | 0.00
|
||||||
|
Modify | 1.7622 | 1.7622 | 1.7622 | 0.0 | 29.38
|
||||||
|
Other | | 1.839 | | | 30.66
|
||||||
|
|
||||||
|
Nlocal: 2 ave 2 max 2 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 0 ave 0 max 0 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 0 ave 0 max 0 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 0
|
||||||
|
Ave neighs/atom = 0
|
||||||
|
Neighbor list builds = 14
|
||||||
|
Dangerous builds = 0
|
||||||
|
Total wall time: 0:00:06
|
||||||
32
examples/replicate/README
Normal file
32
examples/replicate/README
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
This directory has input scripts which demonstrate how to use the
|
||||||
|
replicate command both for systems with and without periodic bond
|
||||||
|
loops. A periodic bond loop is where a chain of bonds spans a
|
||||||
|
periodic dimension of the box and includes one or more bonds which
|
||||||
|
cross the periodic boundary to close the loop.
|
||||||
|
|
||||||
|
To run these scripts, LAMMPS should be built with the MOLECULE and
|
||||||
|
CLASS2 packages. The latter is only needed for the CNT example.
|
||||||
|
|
||||||
|
--------
|
||||||
|
|
||||||
|
These scripts are tiny examples which illustrate both kinds of
|
||||||
|
systems. Each produces a series of images which can be visualized.
|
||||||
|
If the 3 lines for a dump movie command are uncommented, a MPG movie
|
||||||
|
is produced, assuming LAMMPS is build with FFMPEG support.
|
||||||
|
|
||||||
|
in.replicate.bond.x # linear chains in x direction, bond loop in x
|
||||||
|
in.replcate.bond.x.y # 2d grid of bonded atoms, bond loops in x and y
|
||||||
|
in.replicate.bond.xy # linear chains in diagonal direction, bond loop in x and y
|
||||||
|
in.replicate.bond.noloop # linear chains in x direction, no bond loop
|
||||||
|
|
||||||
|
If you do not use the bond/periodic keyword with the replicate command
|
||||||
|
in the first 3 of these scripts (which have periodic bond loops), and
|
||||||
|
visualize the dynamics of hee simulation, you will see how the
|
||||||
|
replication creates a bogus system.
|
||||||
|
|
||||||
|
--------
|
||||||
|
|
||||||
|
This script is for a complex system of 3 orthogonal CNTs which has
|
||||||
|
periodic bond loops in all 3 dimensions xyz.
|
||||||
|
|
||||||
|
in.replicate.cnt
|
||||||
22
examples/replicate/data.bond.x
Normal file
22
examples/replicate/data.bond.x
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# system with periodic bonds in x
|
||||||
|
|
||||||
|
3 atoms
|
||||||
|
3 bonds
|
||||||
|
|
||||||
|
1 atom types
|
||||||
|
1 bond types
|
||||||
|
|
||||||
|
0 3 xlo xhi
|
||||||
|
0 1 ylo yhi
|
||||||
|
|
||||||
|
Atoms
|
||||||
|
|
||||||
|
1 1 1 0.5 0.5 0
|
||||||
|
2 1 1 1.5 0.5 0
|
||||||
|
3 1 1 2.5 0.5 0
|
||||||
|
|
||||||
|
Bonds
|
||||||
|
|
||||||
|
1 1 1 2
|
||||||
|
2 1 2 3
|
||||||
|
3 1 3 1
|
||||||
21
examples/replicate/data.bond.x.noloop
Normal file
21
examples/replicate/data.bond.x.noloop
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# system with non-periodic bonds in x
|
||||||
|
|
||||||
|
3 atoms
|
||||||
|
2 bonds
|
||||||
|
|
||||||
|
1 atom types
|
||||||
|
1 bond types
|
||||||
|
|
||||||
|
0 3 xlo xhi
|
||||||
|
0 1 ylo yhi
|
||||||
|
|
||||||
|
Atoms
|
||||||
|
|
||||||
|
1 1 1 0.5 0.5 0 0 0 0
|
||||||
|
2 1 1 1.5 0.5 0 0 0 0
|
||||||
|
3 1 1 2.5 0.5 0 -1 0 0
|
||||||
|
|
||||||
|
Bonds
|
||||||
|
|
||||||
|
1 1 1 2
|
||||||
|
2 1 3 1
|
||||||
43
examples/replicate/data.bond.x.y
Normal file
43
examples/replicate/data.bond.x.y
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# system with periodic bonds in both x and y
|
||||||
|
|
||||||
|
9 atoms
|
||||||
|
18 bonds
|
||||||
|
|
||||||
|
1 atom types
|
||||||
|
1 bond types
|
||||||
|
|
||||||
|
0 3 xlo xhi
|
||||||
|
0 3 ylo yhi
|
||||||
|
|
||||||
|
Atoms
|
||||||
|
|
||||||
|
1 1 1 0.5 0.5 0
|
||||||
|
2 1 1 1.5 0.5 0
|
||||||
|
3 1 1 2.5 0.5 0
|
||||||
|
4 1 1 0.5 1.5 0
|
||||||
|
5 1 1 1.5 1.5 0
|
||||||
|
6 1 1 2.5 1.5 0
|
||||||
|
7 1 1 0.5 2.5 0
|
||||||
|
8 1 1 1.5 2.5 0
|
||||||
|
9 1 1 2.5 2.5 0
|
||||||
|
|
||||||
|
Bonds
|
||||||
|
|
||||||
|
1 1 1 2
|
||||||
|
2 1 2 3
|
||||||
|
3 1 3 1
|
||||||
|
4 1 4 5
|
||||||
|
5 1 5 6
|
||||||
|
6 1 6 4
|
||||||
|
7 1 7 8
|
||||||
|
8 1 8 9
|
||||||
|
9 1 9 7
|
||||||
|
10 1 1 4
|
||||||
|
11 1 4 7
|
||||||
|
12 1 7 1
|
||||||
|
13 1 2 5
|
||||||
|
14 1 5 8
|
||||||
|
15 1 8 2
|
||||||
|
16 1 3 6
|
||||||
|
17 1 6 9
|
||||||
|
18 1 9 3
|
||||||
22
examples/replicate/data.bond.xy
Normal file
22
examples/replicate/data.bond.xy
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# system with periodic bonds in xy direction
|
||||||
|
|
||||||
|
3 atoms
|
||||||
|
3 bonds
|
||||||
|
|
||||||
|
1 atom types
|
||||||
|
1 bond types
|
||||||
|
|
||||||
|
0 3 xlo xhi
|
||||||
|
0 3 ylo yhi
|
||||||
|
|
||||||
|
Atoms
|
||||||
|
|
||||||
|
1 1 1 0.5 0.5 0
|
||||||
|
2 1 1 1.5 1.5 0
|
||||||
|
3 1 1 2.5 2.5 0
|
||||||
|
|
||||||
|
Bonds
|
||||||
|
|
||||||
|
1 1 1 2
|
||||||
|
2 1 2 3
|
||||||
|
3 1 3 1
|
||||||
34
examples/replicate/in.replicate.bond.x
Normal file
34
examples/replicate/in.replicate.bond.x
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# test of replicating system with periodic bonds in x
|
||||||
|
|
||||||
|
dimension 2
|
||||||
|
atom_style molecular
|
||||||
|
|
||||||
|
read_data data.bond.x
|
||||||
|
|
||||||
|
#replicate 3 3 1
|
||||||
|
replicate 3 3 1 bond/periodic
|
||||||
|
|
||||||
|
mass 1 1.0
|
||||||
|
velocity all create 0.02 87287 loop geom
|
||||||
|
|
||||||
|
pair_style lj/cut 2.5
|
||||||
|
pair_coeff 1 1 1.0 1.0
|
||||||
|
|
||||||
|
bond_style harmonic
|
||||||
|
bond_coeff 1 50.0 1.0
|
||||||
|
|
||||||
|
special_bonds fene
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
write_data tmp.data.x
|
||||||
|
|
||||||
|
dump 1 all image 100 tmp.image.x.*.ppm type type &
|
||||||
|
adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
dump_modify 1 pad 5
|
||||||
|
|
||||||
|
#dump 2 all movie 100 tmp.movie.x.mpg type type &
|
||||||
|
# adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
#dump_modify 2 pad 5
|
||||||
|
|
||||||
|
run 5000
|
||||||
34
examples/replicate/in.replicate.bond.x.noloop
Normal file
34
examples/replicate/in.replicate.bond.x.noloop
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# test of replicating system with periodic bonds in x
|
||||||
|
|
||||||
|
dimension 2
|
||||||
|
atom_style molecular
|
||||||
|
|
||||||
|
read_data data.bond.x.noloop
|
||||||
|
|
||||||
|
replicate 3 3 1
|
||||||
|
#replicate 3 3 1 bond/periodic
|
||||||
|
|
||||||
|
mass 1 1.0
|
||||||
|
velocity all create 0.001 87287 loop geom
|
||||||
|
|
||||||
|
pair_style lj/cut 2.5
|
||||||
|
pair_coeff 1 1 1.0 1.0
|
||||||
|
|
||||||
|
bond_style harmonic
|
||||||
|
bond_coeff 1 50.0 1.0
|
||||||
|
|
||||||
|
special_bonds fene
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
write_data tmp.data.x.non
|
||||||
|
|
||||||
|
dump 1 all image 100 tmp.image.x.non.*.ppm type type &
|
||||||
|
adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
dump_modify 1 pad 5
|
||||||
|
|
||||||
|
#dump 2 all movie 100 tmp.movie.x.non.mpg type type &
|
||||||
|
# adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
#dump_modify 2 pad 5
|
||||||
|
|
||||||
|
run 5000
|
||||||
34
examples/replicate/in.replicate.bond.x.y
Normal file
34
examples/replicate/in.replicate.bond.x.y
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# test of replicating system with periodic bonds in both x and y
|
||||||
|
|
||||||
|
dimension 2
|
||||||
|
atom_style molecular
|
||||||
|
|
||||||
|
read_data data.bond.x.y
|
||||||
|
|
||||||
|
#replicate 3 3 1
|
||||||
|
replicate 3 3 1 bond/periodic
|
||||||
|
|
||||||
|
mass 1 1.0
|
||||||
|
velocity all create 0.02 87287 loop geom
|
||||||
|
|
||||||
|
pair_style lj/cut 2.5
|
||||||
|
pair_coeff 1 1 1.0 1.0
|
||||||
|
|
||||||
|
bond_style harmonic
|
||||||
|
bond_coeff 1 50.0 1.0
|
||||||
|
|
||||||
|
special_bonds fene
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
write_data tmp.data.x.y
|
||||||
|
|
||||||
|
dump 1 all image 100 tmp.image.x.y.*.ppm type type &
|
||||||
|
adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
dump_modify 1 pad 5
|
||||||
|
|
||||||
|
#dump 2 all movie 100 tmp.movie.x.y.mpg type type &
|
||||||
|
# adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
#dump_modify 2 pad 5
|
||||||
|
|
||||||
|
run 5000
|
||||||
34
examples/replicate/in.replicate.bond.xy
Normal file
34
examples/replicate/in.replicate.bond.xy
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# test of replicating system with periodic bonds in xy diagonal direction
|
||||||
|
|
||||||
|
dimension 2
|
||||||
|
atom_style molecular
|
||||||
|
|
||||||
|
read_data data.bond.xy
|
||||||
|
|
||||||
|
#replicate 3 3 1
|
||||||
|
replicate 3 3 1 bond/periodic
|
||||||
|
|
||||||
|
mass 1 1.0
|
||||||
|
velocity all create 0.02 87287 loop geom
|
||||||
|
|
||||||
|
pair_style lj/cut 2.5
|
||||||
|
pair_coeff 1 1 1.0 1.5
|
||||||
|
|
||||||
|
bond_style harmonic
|
||||||
|
bond_coeff 1 50.0 1.414
|
||||||
|
|
||||||
|
special_bonds fene
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
write_data tmp.data.xy
|
||||||
|
|
||||||
|
dump 1 all image 100 tmp.image.xy.*.ppm type type &
|
||||||
|
adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
dump_modify 1 pad 5
|
||||||
|
|
||||||
|
#dump 2 all movie 100 tmp.movie.xy.mpg type type &
|
||||||
|
# adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
#dump_modify 2 pad 5
|
||||||
|
|
||||||
|
run 5000
|
||||||
32
examples/replicate/in.replicate.cnt
Normal file
32
examples/replicate/in.replicate.cnt
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# three orthogonal periodic CNTs
|
||||||
|
# demo for replicating triply looped system
|
||||||
|
# infinite loops in x, y, z
|
||||||
|
# includes bonded interactions across box corners
|
||||||
|
# includes bonds, angles, dihedrals, impropers (class2)
|
||||||
|
|
||||||
|
units real
|
||||||
|
|
||||||
|
boundary p p p
|
||||||
|
|
||||||
|
atom_style full
|
||||||
|
|
||||||
|
pair_style lj/class2 10
|
||||||
|
|
||||||
|
angle_style class2
|
||||||
|
|
||||||
|
bond_style class2
|
||||||
|
|
||||||
|
dihedral_style class2
|
||||||
|
|
||||||
|
improper_style class2
|
||||||
|
|
||||||
|
read_data three_periodic_CNTs.data.gz
|
||||||
|
|
||||||
|
replicate 2 2 2 bond/periodic
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
run 100
|
||||||
|
|
||||||
|
# write_restart replicate.restart
|
||||||
|
# write_data replicate.data
|
||||||
125
examples/replicate/log.6May24.replicate.bond.x.g++.1
Normal file
125
examples/replicate/log.6May24.replicate.bond.x.g++.1
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
LAMMPS (17 Apr 2024)
|
||||||
|
# test of replicating system with periodic bonds in x
|
||||||
|
|
||||||
|
dimension 2
|
||||||
|
atom_style molecular
|
||||||
|
|
||||||
|
read_data data.bond.x
|
||||||
|
Reading data file ...
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 1 0.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
reading atoms ...
|
||||||
|
3 atoms
|
||||||
|
scanning bonds ...
|
||||||
|
1 = max bonds/atom
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 1 0.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
reading bonds ...
|
||||||
|
3 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
2 = max # of 1-3 neighbors
|
||||||
|
4 = max # of 1-4 neighbors
|
||||||
|
2 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
read_data CPU = 0.004 seconds
|
||||||
|
|
||||||
|
#replicate 3 3 1
|
||||||
|
replicate 3 3 1 bond/periodic
|
||||||
|
Replication is creating a 3x3x1 = 9 times larger system...
|
||||||
|
orthogonal box = (0 0 -0.5) to (9 3 0.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
bounding box image = (0 0 0) to (0 0 0)
|
||||||
|
bounding box extra memory = 0.00 MB
|
||||||
|
average # of replicas added to proc = 9.00 out of 9 (100.00%)
|
||||||
|
27 atoms
|
||||||
|
27 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
2 = max # of 1-3 neighbors
|
||||||
|
4 = max # of 1-4 neighbors
|
||||||
|
6 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
replicate CPU = 0.001 seconds
|
||||||
|
|
||||||
|
mass 1 1.0
|
||||||
|
velocity all create 0.02 87287 loop geom
|
||||||
|
|
||||||
|
pair_style lj/cut 2.5
|
||||||
|
pair_coeff 1 1 1.0 1.0
|
||||||
|
|
||||||
|
bond_style harmonic
|
||||||
|
bond_coeff 1 50.0 1.0
|
||||||
|
|
||||||
|
special_bonds fene
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 1 1
|
||||||
|
special bond factors coul: 0 1 1
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
6 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
write_data tmp.data.x
|
||||||
|
System init for write_data ...
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 2.8
|
||||||
|
ghost atom cutoff = 2.8
|
||||||
|
binsize = 1.4, bins = 7 3 1
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair lj/cut, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/newton
|
||||||
|
stencil: half/bin/2d
|
||||||
|
bin: standard
|
||||||
|
|
||||||
|
dump 1 all image 100 tmp.image.x.*.ppm type type adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
dump_modify 1 pad 5
|
||||||
|
|
||||||
|
#dump 2 all movie 100 tmp.movie.x.mpg type type # adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
#dump_modify 2 pad 5
|
||||||
|
|
||||||
|
run 5000
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
WARNING: Inconsistent image flags (../domain.cpp:1051)
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 6.302 | 6.302 | 6.302 Mbytes
|
||||||
|
Step Temp E_pair E_mol TotEng Press
|
||||||
|
0 0.02 -1.1250229 0 -1.1057636 9.028122
|
||||||
|
5000 0.54111971 -1.9054641 0.29066874 -1.0937172 3.4346743
|
||||||
|
Loop time of 0.0764878 on 1 procs for 5000 steps with 27 atoms
|
||||||
|
|
||||||
|
Performance: 28239805.842 tau/day, 65369.921 timesteps/s, 1.765 Matom-step/s
|
||||||
|
66.5% CPU use with 1 MPI tasks x no OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 0.0048837 | 0.0048837 | 0.0048837 | 0.0 | 6.38
|
||||||
|
Bond | 0.00065879 | 0.00065879 | 0.00065879 | 0.0 | 0.86
|
||||||
|
Neigh | 0.0019897 | 0.0019897 | 0.0019897 | 0.0 | 2.60
|
||||||
|
Comm | 0.0012815 | 0.0012815 | 0.0012815 | 0.0 | 1.68
|
||||||
|
Output | 0.066351 | 0.066351 | 0.066351 | 0.0 | 86.75
|
||||||
|
Modify | 0.00069789 | 0.00069789 | 0.00069789 | 0.0 | 0.91
|
||||||
|
Other | | 0.0006247 | | | 0.82
|
||||||
|
|
||||||
|
Nlocal: 27 ave 27 max 27 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 108 ave 108 max 108 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 284 ave 284 max 284 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 284
|
||||||
|
Ave neighs/atom = 10.518519
|
||||||
|
Ave special neighs/atom = 2
|
||||||
|
Neighbor list builds = 287
|
||||||
|
Dangerous builds = 0
|
||||||
|
Total wall time: 0:00:00
|
||||||
126
examples/replicate/log.6May24.replicate.bond.x.g++.4
Normal file
126
examples/replicate/log.6May24.replicate.bond.x.g++.4
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
LAMMPS (17 Apr 2024)
|
||||||
|
WARNING: Using I/O redirection is unreliable with parallel runs. Better to use the -in switch to read input files. (../lammps.cpp:551)
|
||||||
|
# test of replicating system with periodic bonds in x
|
||||||
|
|
||||||
|
dimension 2
|
||||||
|
atom_style molecular
|
||||||
|
|
||||||
|
read_data data.bond.x
|
||||||
|
Reading data file ...
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 1 0.5)
|
||||||
|
4 by 1 by 1 MPI processor grid
|
||||||
|
reading atoms ...
|
||||||
|
3 atoms
|
||||||
|
scanning bonds ...
|
||||||
|
1 = max bonds/atom
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 1 0.5)
|
||||||
|
4 by 1 by 1 MPI processor grid
|
||||||
|
reading bonds ...
|
||||||
|
3 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
2 = max # of 1-3 neighbors
|
||||||
|
4 = max # of 1-4 neighbors
|
||||||
|
2 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
read_data CPU = 0.003 seconds
|
||||||
|
|
||||||
|
#replicate 3 3 1
|
||||||
|
replicate 3 3 1 bond/periodic
|
||||||
|
Replication is creating a 3x3x1 = 9 times larger system...
|
||||||
|
orthogonal box = (0 0 -0.5) to (9 3 0.5)
|
||||||
|
4 by 1 by 1 MPI processor grid
|
||||||
|
bounding box image = (0 0 0) to (0 0 0)
|
||||||
|
bounding box extra memory = 0.00 MB
|
||||||
|
average # of replicas added to proc = 5.25 out of 9 (58.33%)
|
||||||
|
27 atoms
|
||||||
|
27 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
2 = max # of 1-3 neighbors
|
||||||
|
4 = max # of 1-4 neighbors
|
||||||
|
6 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
replicate CPU = 0.002 seconds
|
||||||
|
|
||||||
|
mass 1 1.0
|
||||||
|
velocity all create 0.02 87287 loop geom
|
||||||
|
|
||||||
|
pair_style lj/cut 2.5
|
||||||
|
pair_coeff 1 1 1.0 1.0
|
||||||
|
|
||||||
|
bond_style harmonic
|
||||||
|
bond_coeff 1 50.0 1.0
|
||||||
|
|
||||||
|
special_bonds fene
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 1 1
|
||||||
|
special bond factors coul: 0 1 1
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
6 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
write_data tmp.data.x
|
||||||
|
System init for write_data ...
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 2.8
|
||||||
|
ghost atom cutoff = 2.8
|
||||||
|
binsize = 1.4, bins = 7 3 1
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair lj/cut, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/newton
|
||||||
|
stencil: half/bin/2d
|
||||||
|
bin: standard
|
||||||
|
|
||||||
|
dump 1 all image 100 tmp.image.x.*.ppm type type adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
dump_modify 1 pad 5
|
||||||
|
|
||||||
|
#dump 2 all movie 100 tmp.movie.x.mpg type type # adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
#dump_modify 2 pad 5
|
||||||
|
|
||||||
|
run 5000
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
WARNING: Inconsistent image flags (../domain.cpp:1051)
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 6.309 | 6.309 | 6.309 Mbytes
|
||||||
|
Step Temp E_pair E_mol TotEng Press
|
||||||
|
0 0.02 -1.1250229 0 -1.1057636 9.028122
|
||||||
|
5000 0.50911963 -1.7968226 0.21209852 -1.0944607 4.1676488
|
||||||
|
Loop time of 0.21682 on 4 procs for 5000 steps with 27 atoms
|
||||||
|
|
||||||
|
Performance: 9962160.612 tau/day, 23060.557 timesteps/s, 622.635 katom-step/s
|
||||||
|
93.9% 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.001787 | 0.0021247 | 0.0028772 | 1.0 | 0.98
|
||||||
|
Bond | 0.00039682 | 0.00045617 | 0.00059887 | 0.0 | 0.21
|
||||||
|
Neigh | 0.0013626 | 0.0014006 | 0.0014798 | 0.1 | 0.65
|
||||||
|
Comm | 0.017009 | 0.01791 | 0.018656 | 0.5 | 8.26
|
||||||
|
Output | 0.06892 | 0.12188 | 0.18918 | 13.7 | 56.21
|
||||||
|
Modify | 0.00060336 | 0.00072159 | 0.00088047 | 0.0 | 0.33
|
||||||
|
Other | | 0.07233 | | | 33.36
|
||||||
|
|
||||||
|
Nlocal: 6.75 ave 7 max 6 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 3
|
||||||
|
Nghost: 64.5 ave 65 max 63 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 3
|
||||||
|
Neighs: 70.25 ave 77 max 60 min
|
||||||
|
Histogram: 1 0 0 0 0 1 0 0 1 1
|
||||||
|
|
||||||
|
Total # of neighbors = 281
|
||||||
|
Ave neighs/atom = 10.407407
|
||||||
|
Ave special neighs/atom = 2
|
||||||
|
Neighbor list builds = 287
|
||||||
|
Dangerous builds = 0
|
||||||
|
Total wall time: 0:00:00
|
||||||
121
examples/replicate/log.6May24.replicate.bond.x.noloop.g++.1
Normal file
121
examples/replicate/log.6May24.replicate.bond.x.noloop.g++.1
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
LAMMPS (17 Apr 2024)
|
||||||
|
# test of replicating system with periodic bonds in x
|
||||||
|
|
||||||
|
dimension 2
|
||||||
|
atom_style molecular
|
||||||
|
|
||||||
|
read_data data.bond.x.non
|
||||||
|
Reading data file ...
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 1 0.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
reading atoms ...
|
||||||
|
3 atoms
|
||||||
|
scanning bonds ...
|
||||||
|
1 = max bonds/atom
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 1 0.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
reading bonds ...
|
||||||
|
2 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
1 = max # of 1-3 neighbors
|
||||||
|
1 = max # of 1-4 neighbors
|
||||||
|
2 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
read_data CPU = 0.004 seconds
|
||||||
|
|
||||||
|
replicate 3 3 1
|
||||||
|
Replication is creating a 3x3x1 = 9 times larger system...
|
||||||
|
orthogonal box = (0 0 -0.5) to (9 3 0.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
27 atoms
|
||||||
|
18 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
1 = max # of 1-3 neighbors
|
||||||
|
1 = max # of 1-4 neighbors
|
||||||
|
2 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
replicate CPU = 0.001 seconds
|
||||||
|
#replicate 3 3 1 bond/periodic
|
||||||
|
|
||||||
|
mass 1 1.0
|
||||||
|
velocity all create 0.001 87287 loop geom
|
||||||
|
|
||||||
|
pair_style lj/cut 2.5
|
||||||
|
pair_coeff 1 1 1.0 1.0
|
||||||
|
|
||||||
|
bond_style harmonic
|
||||||
|
bond_coeff 1 50.0 1.0
|
||||||
|
|
||||||
|
special_bonds fene
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 1 1
|
||||||
|
special bond factors coul: 0 1 1
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
2 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
write_data tmp.data.x.non
|
||||||
|
System init for write_data ...
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 2.8
|
||||||
|
ghost atom cutoff = 2.8
|
||||||
|
binsize = 1.4, bins = 7 3 1
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair lj/cut, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/newton
|
||||||
|
stencil: half/bin/2d
|
||||||
|
bin: standard
|
||||||
|
|
||||||
|
dump 1 all image 100 tmp.image.x.non.*.ppm type type adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
dump_modify 1 pad 5
|
||||||
|
|
||||||
|
#dump 2 all movie 100 tmp.movie.x.non.mpg type type # adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
#dump_modify 2 pad 5
|
||||||
|
|
||||||
|
run 5000
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 6.052 | 6.052 | 6.052 Mbytes
|
||||||
|
Step Temp E_pair E_mol TotEng Press
|
||||||
|
0 0.001 -1.1250229 0 -1.1240599 13.009826
|
||||||
|
5000 0.62003692 -2.0147214 0.30861545 -1.1090334 8.0279226
|
||||||
|
Loop time of 0.0734456 on 1 procs for 5000 steps with 27 atoms
|
||||||
|
|
||||||
|
Performance: 29409520.548 tau/day, 68077.594 timesteps/s, 1.838 Matom-step/s
|
||||||
|
94.4% 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.0051444 | 0.0051444 | 0.0051444 | 0.0 | 7.00
|
||||||
|
Bond | 0.00048789 | 0.00048789 | 0.00048789 | 0.0 | 0.66
|
||||||
|
Neigh | 0.0019333 | 0.0019333 | 0.0019333 | 0.0 | 2.63
|
||||||
|
Comm | 0.001332 | 0.001332 | 0.001332 | 0.0 | 1.81
|
||||||
|
Output | 0.063139 | 0.063139 | 0.063139 | 0.0 | 85.97
|
||||||
|
Modify | 0.00077014 | 0.00077014 | 0.00077014 | 0.0 | 1.05
|
||||||
|
Other | | 0.0006387 | | | 0.87
|
||||||
|
|
||||||
|
Nlocal: 27 ave 27 max 27 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 101 ave 101 max 101 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 288 ave 288 max 288 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 288
|
||||||
|
Ave neighs/atom = 10.666667
|
||||||
|
Ave special neighs/atom = 1.3333333
|
||||||
|
Neighbor list builds = 322
|
||||||
|
Dangerous builds = 0
|
||||||
|
Total wall time: 0:00:00
|
||||||
122
examples/replicate/log.6May24.replicate.bond.x.noloop.g++.4
Normal file
122
examples/replicate/log.6May24.replicate.bond.x.noloop.g++.4
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
LAMMPS (17 Apr 2024)
|
||||||
|
WARNING: Using I/O redirection is unreliable with parallel runs. Better to use the -in switch to read input files. (../lammps.cpp:551)
|
||||||
|
# test of replicating system with periodic bonds in x
|
||||||
|
|
||||||
|
dimension 2
|
||||||
|
atom_style molecular
|
||||||
|
|
||||||
|
read_data data.bond.x.non
|
||||||
|
Reading data file ...
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 1 0.5)
|
||||||
|
4 by 1 by 1 MPI processor grid
|
||||||
|
reading atoms ...
|
||||||
|
3 atoms
|
||||||
|
scanning bonds ...
|
||||||
|
1 = max bonds/atom
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 1 0.5)
|
||||||
|
4 by 1 by 1 MPI processor grid
|
||||||
|
reading bonds ...
|
||||||
|
2 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
1 = max # of 1-3 neighbors
|
||||||
|
1 = max # of 1-4 neighbors
|
||||||
|
2 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
read_data CPU = 0.004 seconds
|
||||||
|
|
||||||
|
replicate 3 3 1
|
||||||
|
Replication is creating a 3x3x1 = 9 times larger system...
|
||||||
|
orthogonal box = (0 0 -0.5) to (9 3 0.5)
|
||||||
|
4 by 1 by 1 MPI processor grid
|
||||||
|
27 atoms
|
||||||
|
18 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
1 = max # of 1-3 neighbors
|
||||||
|
1 = max # of 1-4 neighbors
|
||||||
|
2 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
replicate CPU = 0.002 seconds
|
||||||
|
#replicate 3 3 1 bond/periodic
|
||||||
|
|
||||||
|
mass 1 1.0
|
||||||
|
velocity all create 0.001 87287 loop geom
|
||||||
|
|
||||||
|
pair_style lj/cut 2.5
|
||||||
|
pair_coeff 1 1 1.0 1.0
|
||||||
|
|
||||||
|
bond_style harmonic
|
||||||
|
bond_coeff 1 50.0 1.0
|
||||||
|
|
||||||
|
special_bonds fene
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 1 1
|
||||||
|
special bond factors coul: 0 1 1
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
2 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
write_data tmp.data.x.non
|
||||||
|
System init for write_data ...
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 2.8
|
||||||
|
ghost atom cutoff = 2.8
|
||||||
|
binsize = 1.4, bins = 7 3 1
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair lj/cut, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/newton
|
||||||
|
stencil: half/bin/2d
|
||||||
|
bin: standard
|
||||||
|
|
||||||
|
dump 1 all image 100 tmp.image.x.non.*.ppm type type adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
dump_modify 1 pad 5
|
||||||
|
|
||||||
|
#dump 2 all movie 100 tmp.movie.x.non.mpg type type # adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
#dump_modify 2 pad 5
|
||||||
|
|
||||||
|
run 5000
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 6.059 | 6.059 | 6.059 Mbytes
|
||||||
|
Step Temp E_pair E_mol TotEng Press
|
||||||
|
0 0.001 -1.1250229 0 -1.1240599 13.009826
|
||||||
|
5000 0.74931971 -2.233724 0.40158766 -1.1105692 5.6354701
|
||||||
|
Loop time of 0.197835 on 4 procs for 5000 steps with 27 atoms
|
||||||
|
|
||||||
|
Performance: 10918214.594 tau/day, 25273.645 timesteps/s, 682.388 katom-step/s
|
||||||
|
88.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.0018771 | 0.0021131 | 0.0027188 | 0.8 | 1.07
|
||||||
|
Bond | 0.00032659 | 0.00038248 | 0.00049555 | 0.0 | 0.19
|
||||||
|
Neigh | 0.001385 | 0.0014211 | 0.0014704 | 0.1 | 0.72
|
||||||
|
Comm | 0.017163 | 0.017405 | 0.017805 | 0.2 | 8.80
|
||||||
|
Output | 0.070971 | 0.11052 | 0.17112 | 12.1 | 55.87
|
||||||
|
Modify | 0.00058993 | 0.00067708 | 0.00075608 | 0.0 | 0.34
|
||||||
|
Other | | 0.06532 | | | 33.02
|
||||||
|
|
||||||
|
Nlocal: 6.75 ave 7 max 6 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 3
|
||||||
|
Nghost: 59.75 ave 60 max 59 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 3
|
||||||
|
Neighs: 72 ave 79 max 63 min
|
||||||
|
Histogram: 1 0 0 0 0 0 2 0 0 1
|
||||||
|
|
||||||
|
Total # of neighbors = 288
|
||||||
|
Ave neighs/atom = 10.666667
|
||||||
|
Ave special neighs/atom = 1.3333333
|
||||||
|
Neighbor list builds = 323
|
||||||
|
Dangerous builds = 0
|
||||||
|
Total wall time: 0:00:00
|
||||||
125
examples/replicate/log.6May24.replicate.bond.x.y.g++.1
Normal file
125
examples/replicate/log.6May24.replicate.bond.x.y.g++.1
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
LAMMPS (17 Apr 2024)
|
||||||
|
# test of replicating system with periodic bonds in both x and y
|
||||||
|
|
||||||
|
dimension 2
|
||||||
|
atom_style molecular
|
||||||
|
|
||||||
|
read_data data.bond.x.y
|
||||||
|
Reading data file ...
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 3 0.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
reading atoms ...
|
||||||
|
9 atoms
|
||||||
|
scanning bonds ...
|
||||||
|
2 = max bonds/atom
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 3 0.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
reading bonds ...
|
||||||
|
18 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
4 = max # of 1-2 neighbors
|
||||||
|
12 = max # of 1-3 neighbors
|
||||||
|
48 = max # of 1-4 neighbors
|
||||||
|
8 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
read_data CPU = 0.004 seconds
|
||||||
|
|
||||||
|
#replicate 3 3 1
|
||||||
|
replicate 3 3 1 bond/periodic
|
||||||
|
Replication is creating a 3x3x1 = 9 times larger system...
|
||||||
|
orthogonal box = (0 0 -0.5) to (9 9 0.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
bounding box image = (0 0 0) to (0 0 0)
|
||||||
|
bounding box extra memory = 0.00 MB
|
||||||
|
average # of replicas added to proc = 9.00 out of 9 (100.00%)
|
||||||
|
81 atoms
|
||||||
|
162 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
4 = max # of 1-2 neighbors
|
||||||
|
12 = max # of 1-3 neighbors
|
||||||
|
48 = max # of 1-4 neighbors
|
||||||
|
24 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
replicate CPU = 0.001 seconds
|
||||||
|
|
||||||
|
mass 1 1.0
|
||||||
|
velocity all create 0.02 87287 loop geom
|
||||||
|
|
||||||
|
pair_style lj/cut 2.5
|
||||||
|
pair_coeff 1 1 1.0 1.0
|
||||||
|
|
||||||
|
bond_style harmonic
|
||||||
|
bond_coeff 1 50.0 1.0
|
||||||
|
|
||||||
|
special_bonds fene
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 1 1
|
||||||
|
special bond factors coul: 0 1 1
|
||||||
|
4 = max # of 1-2 neighbors
|
||||||
|
24 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
write_data tmp.data.x.y
|
||||||
|
System init for write_data ...
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 2.8
|
||||||
|
ghost atom cutoff = 2.8
|
||||||
|
binsize = 1.4, bins = 7 7 1
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair lj/cut, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/newton
|
||||||
|
stencil: half/bin/2d
|
||||||
|
bin: standard
|
||||||
|
|
||||||
|
dump 1 all image 100 tmp.image.x.y.*.ppm type type adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
dump_modify 1 pad 5
|
||||||
|
|
||||||
|
#dump 2 all movie 100 tmp.movie.x.y.mpg type type # adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
#dump_modify 2 pad 5
|
||||||
|
|
||||||
|
run 5000
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
WARNING: Inconsistent image flags (../domain.cpp:1051)
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 7.555 | 7.555 | 7.555 Mbytes
|
||||||
|
Step Temp E_pair E_mol TotEng Press
|
||||||
|
0 0.02 -1.1250229 0 -1.1052698 -2.9713842
|
||||||
|
5000 0.046175679 -1.2280388 0.080003864 -1.1024293 -4.1097897
|
||||||
|
Loop time of 0.212344 on 1 procs for 5000 steps with 81 atoms
|
||||||
|
|
||||||
|
Performance: 10172161.526 tau/day, 23546.670 timesteps/s, 1.907 Matom-step/s
|
||||||
|
93.0% CPU use with 1 MPI tasks x no OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 0.01283 | 0.01283 | 0.01283 | 0.0 | 6.04
|
||||||
|
Bond | 0.0032785 | 0.0032785 | 0.0032785 | 0.0 | 1.54
|
||||||
|
Neigh | 0.0018379 | 0.0018379 | 0.0018379 | 0.0 | 0.87
|
||||||
|
Comm | 0.0016247 | 0.0016247 | 0.0016247 | 0.0 | 0.77
|
||||||
|
Output | 0.18991 | 0.18991 | 0.18991 | 0.0 | 89.44
|
||||||
|
Modify | 0.0018198 | 0.0018198 | 0.0018198 | 0.0 | 0.86
|
||||||
|
Other | | 0.001039 | | | 0.49
|
||||||
|
|
||||||
|
Nlocal: 81 ave 81 max 81 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 144 ave 144 max 144 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 714 ave 714 max 714 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 714
|
||||||
|
Ave neighs/atom = 8.8148148
|
||||||
|
Ave special neighs/atom = 4
|
||||||
|
Neighbor list builds = 72
|
||||||
|
Dangerous builds = 0
|
||||||
|
Total wall time: 0:00:00
|
||||||
126
examples/replicate/log.6May24.replicate.bond.x.y.g++.4
Normal file
126
examples/replicate/log.6May24.replicate.bond.x.y.g++.4
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
LAMMPS (17 Apr 2024)
|
||||||
|
WARNING: Using I/O redirection is unreliable with parallel runs. Better to use the -in switch to read input files. (../lammps.cpp:551)
|
||||||
|
# test of replicating system with periodic bonds in both x and y
|
||||||
|
|
||||||
|
dimension 2
|
||||||
|
atom_style molecular
|
||||||
|
|
||||||
|
read_data data.bond.x.y
|
||||||
|
Reading data file ...
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 3 0.5)
|
||||||
|
2 by 2 by 1 MPI processor grid
|
||||||
|
reading atoms ...
|
||||||
|
9 atoms
|
||||||
|
scanning bonds ...
|
||||||
|
2 = max bonds/atom
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 3 0.5)
|
||||||
|
2 by 2 by 1 MPI processor grid
|
||||||
|
reading bonds ...
|
||||||
|
18 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
4 = max # of 1-2 neighbors
|
||||||
|
12 = max # of 1-3 neighbors
|
||||||
|
48 = max # of 1-4 neighbors
|
||||||
|
8 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
read_data CPU = 0.003 seconds
|
||||||
|
|
||||||
|
#replicate 3 3 1
|
||||||
|
replicate 3 3 1 bond/periodic
|
||||||
|
Replication is creating a 3x3x1 = 9 times larger system...
|
||||||
|
orthogonal box = (0 0 -0.5) to (9 9 0.5)
|
||||||
|
2 by 2 by 1 MPI processor grid
|
||||||
|
bounding box image = (0 0 0) to (0 0 0)
|
||||||
|
bounding box extra memory = 0.00 MB
|
||||||
|
average # of replicas added to proc = 6.25 out of 9 (69.44%)
|
||||||
|
81 atoms
|
||||||
|
162 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
4 = max # of 1-2 neighbors
|
||||||
|
12 = max # of 1-3 neighbors
|
||||||
|
48 = max # of 1-4 neighbors
|
||||||
|
24 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
replicate CPU = 0.001 seconds
|
||||||
|
|
||||||
|
mass 1 1.0
|
||||||
|
velocity all create 0.02 87287 loop geom
|
||||||
|
|
||||||
|
pair_style lj/cut 2.5
|
||||||
|
pair_coeff 1 1 1.0 1.0
|
||||||
|
|
||||||
|
bond_style harmonic
|
||||||
|
bond_coeff 1 50.0 1.0
|
||||||
|
|
||||||
|
special_bonds fene
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 1 1
|
||||||
|
special bond factors coul: 0 1 1
|
||||||
|
4 = max # of 1-2 neighbors
|
||||||
|
24 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
write_data tmp.data.x.y
|
||||||
|
System init for write_data ...
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 2.8
|
||||||
|
ghost atom cutoff = 2.8
|
||||||
|
binsize = 1.4, bins = 7 7 1
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair lj/cut, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/newton
|
||||||
|
stencil: half/bin/2d
|
||||||
|
bin: standard
|
||||||
|
|
||||||
|
dump 1 all image 100 tmp.image.x.y.*.ppm type type adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
dump_modify 1 pad 5
|
||||||
|
|
||||||
|
#dump 2 all movie 100 tmp.movie.x.y.mpg type type # adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
#dump_modify 2 pad 5
|
||||||
|
|
||||||
|
run 5000
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
WARNING: Inconsistent image flags (../domain.cpp:1051)
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 7.552 | 7.552 | 7.552 Mbytes
|
||||||
|
Step Temp E_pair E_mol TotEng Press
|
||||||
|
0 0.02 -1.1250229 0 -1.1052698 -2.9713842
|
||||||
|
5000 0.046175679 -1.2280388 0.080003864 -1.1024293 -4.1097897
|
||||||
|
Loop time of 0.273847 on 4 procs for 5000 steps with 81 atoms
|
||||||
|
|
||||||
|
Performance: 7887622.810 tau/day, 18258.386 timesteps/s, 1.479 Matom-step/s
|
||||||
|
92.4% CPU use with 4 MPI tasks x no OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 0.0039465 | 0.0042593 | 0.0046129 | 0.4 | 1.56
|
||||||
|
Bond | 0.0011489 | 0.001207 | 0.0012757 | 0.2 | 0.44
|
||||||
|
Neigh | 0.00079819 | 0.0008044 | 0.00081324 | 0.0 | 0.29
|
||||||
|
Comm | 0.024107 | 0.024703 | 0.025269 | 0.3 | 9.02
|
||||||
|
Output | 0.14406 | 0.18123 | 0.23779 | 8.7 | 66.18
|
||||||
|
Modify | 0.00089401 | 0.00095321 | 0.0010422 | 0.0 | 0.35
|
||||||
|
Other | | 0.06069 | | | 22.16
|
||||||
|
|
||||||
|
Nlocal: 20.25 ave 22 max 19 min
|
||||||
|
Histogram: 2 0 0 0 0 0 1 0 0 1
|
||||||
|
Nghost: 81.5 ave 82 max 80 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 3
|
||||||
|
Neighs: 178.5 ave 195 max 165 min
|
||||||
|
Histogram: 2 0 0 0 0 0 0 1 0 1
|
||||||
|
|
||||||
|
Total # of neighbors = 714
|
||||||
|
Ave neighs/atom = 8.8148148
|
||||||
|
Ave special neighs/atom = 4
|
||||||
|
Neighbor list builds = 72
|
||||||
|
Dangerous builds = 0
|
||||||
|
Total wall time: 0:00:00
|
||||||
125
examples/replicate/log.6May24.replicate.bond.xy.g++.1
Normal file
125
examples/replicate/log.6May24.replicate.bond.xy.g++.1
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
LAMMPS (17 Apr 2024)
|
||||||
|
# test of replicating system with periodic bonds in xy diagonal direction
|
||||||
|
|
||||||
|
dimension 2
|
||||||
|
atom_style molecular
|
||||||
|
|
||||||
|
read_data data.bond.xy
|
||||||
|
Reading data file ...
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 3 0.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
reading atoms ...
|
||||||
|
3 atoms
|
||||||
|
scanning bonds ...
|
||||||
|
1 = max bonds/atom
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 3 0.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
reading bonds ...
|
||||||
|
3 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
2 = max # of 1-3 neighbors
|
||||||
|
4 = max # of 1-4 neighbors
|
||||||
|
2 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
read_data CPU = 0.004 seconds
|
||||||
|
|
||||||
|
#replicate 3 3 1
|
||||||
|
replicate 3 3 1 bond/periodic
|
||||||
|
Replication is creating a 3x3x1 = 9 times larger system...
|
||||||
|
orthogonal box = (0 0 -0.5) to (9 9 0.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
bounding box image = (0 0 0) to (0 0 0)
|
||||||
|
bounding box extra memory = 0.00 MB
|
||||||
|
average # of replicas added to proc = 9.00 out of 9 (100.00%)
|
||||||
|
27 atoms
|
||||||
|
27 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
2 = max # of 1-3 neighbors
|
||||||
|
4 = max # of 1-4 neighbors
|
||||||
|
6 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
replicate CPU = 0.001 seconds
|
||||||
|
|
||||||
|
mass 1 1.0
|
||||||
|
velocity all create 0.02 87287 loop geom
|
||||||
|
|
||||||
|
pair_style lj/cut 2.5
|
||||||
|
pair_coeff 1 1 1.0 1.5
|
||||||
|
|
||||||
|
bond_style harmonic
|
||||||
|
bond_coeff 1 50.0 1.414
|
||||||
|
|
||||||
|
special_bonds fene
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 1 1
|
||||||
|
special bond factors coul: 0 1 1
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
6 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
write_data tmp.data.xy
|
||||||
|
System init for write_data ...
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 2.8
|
||||||
|
ghost atom cutoff = 2.8
|
||||||
|
binsize = 1.4, bins = 7 7 1
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair lj/cut, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/newton
|
||||||
|
stencil: half/bin/2d
|
||||||
|
bin: standard
|
||||||
|
|
||||||
|
dump 1 all image 100 tmp.image.xy.*.ppm type type adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
dump_modify 1 pad 5
|
||||||
|
|
||||||
|
#dump 2 all movie 100 tmp.movie.xy.mpg type type # adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
#dump_modify 2 pad 5
|
||||||
|
|
||||||
|
run 5000
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
WARNING: Inconsistent image flags (../domain.cpp:1051)
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 6.302 | 6.302 | 6.302 Mbytes
|
||||||
|
Step Temp E_pair E_mol TotEng Press
|
||||||
|
0 0.02 -0.66256987 2.2804444e-06 -0.64330834 -0.59475371
|
||||||
|
5000 0.43110862 -1.1484506 0.16888799 -0.56442095 -0.3683968
|
||||||
|
Loop time of 0.124095 on 1 procs for 5000 steps with 27 atoms
|
||||||
|
|
||||||
|
Performance: 17406010.885 tau/day, 40291.692 timesteps/s, 1.088 Matom-step/s
|
||||||
|
82.3% 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.0013734 | 0.0013734 | 0.0013734 | 0.0 | 1.11
|
||||||
|
Bond | 0.00064058 | 0.00064058 | 0.00064058 | 0.0 | 0.52
|
||||||
|
Neigh | 0.00090424 | 0.00090424 | 0.00090424 | 0.0 | 0.73
|
||||||
|
Comm | 0.00081732 | 0.00081732 | 0.00081732 | 0.0 | 0.66
|
||||||
|
Output | 0.11905 | 0.11905 | 0.11905 | 0.0 | 95.93
|
||||||
|
Modify | 0.0007252 | 0.0007252 | 0.0007252 | 0.0 | 0.58
|
||||||
|
Other | | 0.0005888 | | | 0.47
|
||||||
|
|
||||||
|
Nlocal: 27 ave 27 max 27 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 45 ave 45 max 45 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 66 ave 66 max 66 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 66
|
||||||
|
Ave neighs/atom = 2.4444444
|
||||||
|
Ave special neighs/atom = 2
|
||||||
|
Neighbor list builds = 244
|
||||||
|
Dangerous builds = 0
|
||||||
|
Total wall time: 0:00:00
|
||||||
126
examples/replicate/log.6May24.replicate.bond.xy.g++.4
Normal file
126
examples/replicate/log.6May24.replicate.bond.xy.g++.4
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
LAMMPS (17 Apr 2024)
|
||||||
|
WARNING: Using I/O redirection is unreliable with parallel runs. Better to use the -in switch to read input files. (../lammps.cpp:551)
|
||||||
|
# test of replicating system with periodic bonds in xy diagonal direction
|
||||||
|
|
||||||
|
dimension 2
|
||||||
|
atom_style molecular
|
||||||
|
|
||||||
|
read_data data.bond.xy
|
||||||
|
Reading data file ...
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 3 0.5)
|
||||||
|
2 by 2 by 1 MPI processor grid
|
||||||
|
reading atoms ...
|
||||||
|
3 atoms
|
||||||
|
scanning bonds ...
|
||||||
|
1 = max bonds/atom
|
||||||
|
orthogonal box = (0 0 -0.5) to (3 3 0.5)
|
||||||
|
2 by 2 by 1 MPI processor grid
|
||||||
|
reading bonds ...
|
||||||
|
3 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
2 = max # of 1-3 neighbors
|
||||||
|
4 = max # of 1-4 neighbors
|
||||||
|
2 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
read_data CPU = 0.003 seconds
|
||||||
|
|
||||||
|
#replicate 3 3 1
|
||||||
|
replicate 3 3 1 bond/periodic
|
||||||
|
Replication is creating a 3x3x1 = 9 times larger system...
|
||||||
|
orthogonal box = (0 0 -0.5) to (9 9 0.5)
|
||||||
|
2 by 2 by 1 MPI processor grid
|
||||||
|
bounding box image = (0 0 0) to (0 0 0)
|
||||||
|
bounding box extra memory = 0.00 MB
|
||||||
|
average # of replicas added to proc = 6.25 out of 9 (69.44%)
|
||||||
|
27 atoms
|
||||||
|
27 bonds
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
2 = max # of 1-3 neighbors
|
||||||
|
4 = max # of 1-4 neighbors
|
||||||
|
6 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
replicate CPU = 0.001 seconds
|
||||||
|
|
||||||
|
mass 1 1.0
|
||||||
|
velocity all create 0.02 87287 loop geom
|
||||||
|
|
||||||
|
pair_style lj/cut 2.5
|
||||||
|
pair_coeff 1 1 1.0 1.5
|
||||||
|
|
||||||
|
bond_style harmonic
|
||||||
|
bond_coeff 1 50.0 1.414
|
||||||
|
|
||||||
|
special_bonds fene
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 1 1
|
||||||
|
special bond factors coul: 0 1 1
|
||||||
|
2 = max # of 1-2 neighbors
|
||||||
|
6 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.000 seconds
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
write_data tmp.data.xy
|
||||||
|
System init for write_data ...
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 2.8
|
||||||
|
ghost atom cutoff = 2.8
|
||||||
|
binsize = 1.4, bins = 7 7 1
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair lj/cut, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/newton
|
||||||
|
stencil: half/bin/2d
|
||||||
|
bin: standard
|
||||||
|
|
||||||
|
dump 1 all image 100 tmp.image.xy.*.ppm type type adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
dump_modify 1 pad 5
|
||||||
|
|
||||||
|
#dump 2 all movie 100 tmp.movie.xy.mpg type type # adiam 0.2 bond type 0.1 zoom 1.6
|
||||||
|
#dump_modify 2 pad 5
|
||||||
|
|
||||||
|
run 5000
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||||
|
WARNING: Inconsistent image flags (../domain.cpp:1051)
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 6.301 | 6.301 | 6.301 Mbytes
|
||||||
|
Step Temp E_pair E_mol TotEng Press
|
||||||
|
0 0.02 -0.66256988 2.2804444e-06 -0.64330834 -0.59475371
|
||||||
|
5000 0.43110877 -1.1484507 0.168888 -0.56442093 -0.36839692
|
||||||
|
Loop time of 0.286423 on 4 procs for 5000 steps with 27 atoms
|
||||||
|
|
||||||
|
Performance: 7541285.935 tau/day, 17456.680 timesteps/s, 471.330 katom-step/s
|
||||||
|
92.9% 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.00054941 | 0.00084836 | 0.0013689 | 0.0 | 0.30
|
||||||
|
Bond | 0.00034068 | 0.00045816 | 0.00068461 | 0.0 | 0.16
|
||||||
|
Neigh | 0.00092076 | 0.00098494 | 0.0010463 | 0.0 | 0.34
|
||||||
|
Comm | 0.018151 | 0.018737 | 0.019531 | 0.4 | 6.54
|
||||||
|
Output | 0.13261 | 0.19363 | 0.2596 | 10.7 | 67.60
|
||||||
|
Modify | 0.00053153 | 0.00071381 | 0.0010268 | 0.0 | 0.25
|
||||||
|
Other | | 0.07105 | | | 24.81
|
||||||
|
|
||||||
|
Nlocal: 6.75 ave 9 max 5 min
|
||||||
|
Histogram: 2 0 0 0 0 0 0 1 0 1
|
||||||
|
Nghost: 26.25 ave 28 max 25 min
|
||||||
|
Histogram: 2 0 0 0 0 0 1 0 0 1
|
||||||
|
Neighs: 16.5 ave 23 max 10 min
|
||||||
|
Histogram: 1 1 0 0 0 0 0 0 1 1
|
||||||
|
|
||||||
|
Total # of neighbors = 66
|
||||||
|
Ave neighs/atom = 2.4444444
|
||||||
|
Ave special neighs/atom = 2
|
||||||
|
Neighbor list builds = 244
|
||||||
|
Dangerous builds = 0
|
||||||
|
Total wall time: 0:00:00
|
||||||
134
examples/replicate/log.6May24.replicate.cnt.g++.1
Normal file
134
examples/replicate/log.6May24.replicate.cnt.g++.1
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
LAMMPS (17 Apr 2024)
|
||||||
|
# three orthogonal periodic CNTs
|
||||||
|
# demo for replicating triply looped system
|
||||||
|
# infinite loops in x, y, z
|
||||||
|
# includes bonded interactions across box corners
|
||||||
|
# includes bonds, angles, dihedrals, impropers (class2)
|
||||||
|
|
||||||
|
units real
|
||||||
|
|
||||||
|
boundary p p p
|
||||||
|
|
||||||
|
atom_style full
|
||||||
|
|
||||||
|
pair_style lj/class2 10
|
||||||
|
|
||||||
|
angle_style class2
|
||||||
|
|
||||||
|
bond_style class2
|
||||||
|
|
||||||
|
dihedral_style class2
|
||||||
|
|
||||||
|
improper_style class2
|
||||||
|
|
||||||
|
read_data three_periodic_CNTs.data.gz
|
||||||
|
Reading data file ...
|
||||||
|
orthogonal box = (0 0 0) to (80.96 80.96 80.96)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
reading atoms ...
|
||||||
|
3168 atoms
|
||||||
|
reading velocities ...
|
||||||
|
3168 velocities
|
||||||
|
scanning bonds ...
|
||||||
|
3 = max bonds/atom
|
||||||
|
scanning angles ...
|
||||||
|
3 = max angles/atom
|
||||||
|
scanning dihedrals ...
|
||||||
|
12 = max dihedrals/atom
|
||||||
|
scanning impropers ...
|
||||||
|
1 = max impropers/atom
|
||||||
|
orthogonal box = (0 0 0) to (80.96 80.96 80.96)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
reading bonds ...
|
||||||
|
4752 bonds
|
||||||
|
reading angles ...
|
||||||
|
9504 angles
|
||||||
|
reading dihedrals ...
|
||||||
|
19008 dihedrals
|
||||||
|
reading impropers ...
|
||||||
|
3168 impropers
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
3 = max # of 1-2 neighbors
|
||||||
|
6 = max # of 1-3 neighbors
|
||||||
|
18 = max # of 1-4 neighbors
|
||||||
|
18 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.002 seconds
|
||||||
|
read_data CPU = 0.056 seconds
|
||||||
|
|
||||||
|
replicate 2 2 2 bond/periodic
|
||||||
|
Replication is creating a 2x2x2 = 8 times larger system...
|
||||||
|
orthogonal box = (0 0 0) to (161.92 161.92 161.92)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
bounding box image = (0 0 0) to (0 0 0)
|
||||||
|
bounding box extra memory = 1.62 MB
|
||||||
|
average # of replicas added to proc = 8.00 out of 8 (100.00%)
|
||||||
|
25344 atoms
|
||||||
|
38016 bonds
|
||||||
|
76032 angles
|
||||||
|
152064 dihedrals
|
||||||
|
25344 impropers
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
3 = max # of 1-2 neighbors
|
||||||
|
6 = max # of 1-3 neighbors
|
||||||
|
18 = max # of 1-4 neighbors
|
||||||
|
18 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.012 seconds
|
||||||
|
replicate CPU = 0.027 seconds
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
run 100
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from sixthpower/geometric mixing rule
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 12
|
||||||
|
ghost atom cutoff = 12
|
||||||
|
binsize = 6, bins = 27 27 27
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair lj/class2, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/newton
|
||||||
|
stencil: half/bin/3d
|
||||||
|
bin: standard
|
||||||
|
WARNING: Inconsistent image flags (../domain.cpp:1051)
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 51.87 | 51.87 | 51.87 Mbytes
|
||||||
|
Step Temp E_pair E_mol TotEng Press
|
||||||
|
0 0 -14266.189 1466925.5 1452659.3 -29908.753
|
||||||
|
100 2155.9128 -17224.188 1306769.8 1452409 1985.2082
|
||||||
|
Loop time of 5.0155 on 1 procs for 100 steps with 25344 atoms
|
||||||
|
|
||||||
|
Performance: 1.723 ns/day, 13.932 hours/ns, 19.938 timesteps/s, 505.314 katom-step/s
|
||||||
|
100.0% CPU use with 1 MPI tasks x no OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 1.6557 | 1.6557 | 1.6557 | 0.0 | 33.01
|
||||||
|
Bond | 3.2813 | 3.2813 | 3.2813 | 0.0 | 65.42
|
||||||
|
Neigh | 0.047025 | 0.047025 | 0.047025 | 0.0 | 0.94
|
||||||
|
Comm | 0.0085317 | 0.0085317 | 0.0085317 | 0.0 | 0.17
|
||||||
|
Output | 7.8551e-05 | 7.8551e-05 | 7.8551e-05 | 0.0 | 0.00
|
||||||
|
Modify | 0.014635 | 0.014635 | 0.014635 | 0.0 | 0.29
|
||||||
|
Other | | 0.008159 | | | 0.16
|
||||||
|
|
||||||
|
Nlocal: 25344 ave 25344 max 25344 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 22737 ave 22737 max 22737 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 2.89358e+06 ave 2.89358e+06 max 2.89358e+06 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 2893576
|
||||||
|
Ave neighs/atom = 114.17203
|
||||||
|
Ave special neighs/atom = 18
|
||||||
|
Neighbor list builds = 1
|
||||||
|
Dangerous builds = 0
|
||||||
|
|
||||||
|
# write_restart replicate.restart
|
||||||
|
# write_data replicate.data
|
||||||
|
Total wall time: 0:00:05
|
||||||
135
examples/replicate/log.6May24.replicate.cnt.g++.4
Normal file
135
examples/replicate/log.6May24.replicate.cnt.g++.4
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
LAMMPS (17 Apr 2024)
|
||||||
|
WARNING: Using I/O redirection is unreliable with parallel runs. Better to use the -in switch to read input files. (../lammps.cpp:551)
|
||||||
|
# three orthogonal periodic CNTs
|
||||||
|
# demo for replicating triply looped system
|
||||||
|
# infinite loops in x, y, z
|
||||||
|
# includes bonded interactions across box corners
|
||||||
|
# includes bonds, angles, dihedrals, impropers (class2)
|
||||||
|
|
||||||
|
units real
|
||||||
|
|
||||||
|
boundary p p p
|
||||||
|
|
||||||
|
atom_style full
|
||||||
|
|
||||||
|
pair_style lj/class2 10
|
||||||
|
|
||||||
|
angle_style class2
|
||||||
|
|
||||||
|
bond_style class2
|
||||||
|
|
||||||
|
dihedral_style class2
|
||||||
|
|
||||||
|
improper_style class2
|
||||||
|
|
||||||
|
read_data three_periodic_CNTs.data.gz
|
||||||
|
Reading data file ...
|
||||||
|
orthogonal box = (0 0 0) to (80.96 80.96 80.96)
|
||||||
|
1 by 2 by 2 MPI processor grid
|
||||||
|
reading atoms ...
|
||||||
|
3168 atoms
|
||||||
|
reading velocities ...
|
||||||
|
3168 velocities
|
||||||
|
scanning bonds ...
|
||||||
|
3 = max bonds/atom
|
||||||
|
scanning angles ...
|
||||||
|
3 = max angles/atom
|
||||||
|
scanning dihedrals ...
|
||||||
|
12 = max dihedrals/atom
|
||||||
|
scanning impropers ...
|
||||||
|
1 = max impropers/atom
|
||||||
|
orthogonal box = (0 0 0) to (80.96 80.96 80.96)
|
||||||
|
1 by 2 by 2 MPI processor grid
|
||||||
|
reading bonds ...
|
||||||
|
4752 bonds
|
||||||
|
reading angles ...
|
||||||
|
9504 angles
|
||||||
|
reading dihedrals ...
|
||||||
|
19008 dihedrals
|
||||||
|
reading impropers ...
|
||||||
|
3168 impropers
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
3 = max # of 1-2 neighbors
|
||||||
|
6 = max # of 1-3 neighbors
|
||||||
|
18 = max # of 1-4 neighbors
|
||||||
|
18 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.001 seconds
|
||||||
|
read_data CPU = 0.064 seconds
|
||||||
|
|
||||||
|
replicate 2 2 2 bond/periodic
|
||||||
|
Replication is creating a 2x2x2 = 8 times larger system...
|
||||||
|
orthogonal box = (0 0 0) to (161.92 161.92 161.92)
|
||||||
|
1 by 2 by 2 MPI processor grid
|
||||||
|
bounding box image = (0 0 0) to (0 0 0)
|
||||||
|
bounding box extra memory = 1.62 MB
|
||||||
|
average # of replicas added to proc = 4.50 out of 8 (56.25%)
|
||||||
|
25344 atoms
|
||||||
|
38016 bonds
|
||||||
|
76032 angles
|
||||||
|
152064 dihedrals
|
||||||
|
25344 impropers
|
||||||
|
Finding 1-2 1-3 1-4 neighbors ...
|
||||||
|
special bond factors lj: 0 0 0
|
||||||
|
special bond factors coul: 0 0 0
|
||||||
|
3 = max # of 1-2 neighbors
|
||||||
|
6 = max # of 1-3 neighbors
|
||||||
|
18 = max # of 1-4 neighbors
|
||||||
|
18 = max # of special neighbors
|
||||||
|
special bonds CPU = 0.004 seconds
|
||||||
|
replicate CPU = 0.012 seconds
|
||||||
|
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
run 100
|
||||||
|
Generated 0 of 0 mixed pair_coeff terms from sixthpower/geometric mixing rule
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 12
|
||||||
|
ghost atom cutoff = 12
|
||||||
|
binsize = 6, bins = 27 27 27
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair lj/class2, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/newton
|
||||||
|
stencil: half/bin/3d
|
||||||
|
bin: standard
|
||||||
|
WARNING: Inconsistent image flags (../domain.cpp:1051)
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 28.69 | 28.69 | 28.69 Mbytes
|
||||||
|
Step Temp E_pair E_mol TotEng Press
|
||||||
|
0 0 -14266.189 1466925.5 1452659.3 -29908.753
|
||||||
|
100 2155.9128 -17224.188 1306769.8 1452409 1985.2082
|
||||||
|
Loop time of 1.3667 on 4 procs for 100 steps with 25344 atoms
|
||||||
|
|
||||||
|
Performance: 6.322 ns/day, 3.796 hours/ns, 73.169 timesteps/s, 1.854 Matom-step/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.43424 | 0.43539 | 0.43741 | 0.2 | 31.86
|
||||||
|
Bond | 0.88613 | 0.89013 | 0.90094 | 0.7 | 65.13
|
||||||
|
Neigh | 0.013198 | 0.013199 | 0.013201 | 0.0 | 0.97
|
||||||
|
Comm | 0.010742 | 0.020522 | 0.02546 | 4.1 | 1.50
|
||||||
|
Output | 3.2788e-05 | 3.6302e-05 | 4.4556e-05 | 0.0 | 0.00
|
||||||
|
Modify | 0.0042029 | 0.0042366 | 0.004267 | 0.0 | 0.31
|
||||||
|
Other | | 0.003188 | | | 0.23
|
||||||
|
|
||||||
|
Nlocal: 6336 ave 6336 max 6336 min
|
||||||
|
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 10558 ave 10558 max 10558 min
|
||||||
|
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 723394 ave 723394 max 723394 min
|
||||||
|
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 2893576
|
||||||
|
Ave neighs/atom = 114.17203
|
||||||
|
Ave special neighs/atom = 18
|
||||||
|
Neighbor list builds = 1
|
||||||
|
Dangerous builds = 0
|
||||||
|
|
||||||
|
# write_restart replicate.restart
|
||||||
|
# write_data replicate.data
|
||||||
|
Total wall time: 0:00:01
|
||||||
BIN
examples/replicate/three_periodic_CNTs.data.gz
Normal file
BIN
examples/replicate/three_periodic_CNTs.data.gz
Normal file
Binary file not shown.
@ -113,6 +113,9 @@ MODULE LIBLAMMPS
|
|||||||
PROCEDURE :: get_mpi_comm => lmp_get_mpi_comm
|
PROCEDURE :: get_mpi_comm => lmp_get_mpi_comm
|
||||||
PROCEDURE :: extract_setting => lmp_extract_setting
|
PROCEDURE :: extract_setting => lmp_extract_setting
|
||||||
PROCEDURE :: extract_global => lmp_extract_global
|
PROCEDURE :: extract_global => lmp_extract_global
|
||||||
|
PROCEDURE, PRIVATE :: lmp_map_atom_int
|
||||||
|
PROCEDURE, PRIVATE :: lmp_map_atom_big
|
||||||
|
GENERIC :: map_atom => lmp_map_atom_int, lmp_map_atom_big
|
||||||
PROCEDURE :: extract_atom => lmp_extract_atom
|
PROCEDURE :: extract_atom => lmp_extract_atom
|
||||||
PROCEDURE :: extract_compute => lmp_extract_compute
|
PROCEDURE :: extract_compute => lmp_extract_compute
|
||||||
PROCEDURE :: extract_fix => lmp_extract_fix
|
PROCEDURE :: extract_fix => lmp_extract_fix
|
||||||
@ -508,6 +511,13 @@ MODULE LIBLAMMPS
|
|||||||
TYPE(c_ptr) :: lammps_extract_global
|
TYPE(c_ptr) :: lammps_extract_global
|
||||||
END FUNCTION lammps_extract_global
|
END FUNCTION lammps_extract_global
|
||||||
|
|
||||||
|
FUNCTION lammps_map_atom(handle, tag) BIND(C)
|
||||||
|
IMPORT :: c_ptr, c_int
|
||||||
|
IMPLICIT NONE
|
||||||
|
TYPE(c_ptr), INTENT(IN), VALUE :: handle, tag
|
||||||
|
INTEGER(c_int) :: lammps_map_atom
|
||||||
|
END FUNCTION lammps_map_atom
|
||||||
|
|
||||||
FUNCTION lammps_extract_atom_datatype(handle, name) BIND(C)
|
FUNCTION lammps_extract_atom_datatype(handle, name) BIND(C)
|
||||||
IMPORT :: c_ptr, c_int
|
IMPORT :: c_ptr, c_int
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
@ -1323,6 +1333,38 @@ CONTAINS
|
|||||||
END SELECT
|
END SELECT
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
|
||||||
|
! equivalent function to lammps_map_atom (for 32-bit integer tags)
|
||||||
|
INTEGER FUNCTION lmp_map_atom_int(self, id)
|
||||||
|
CLASS(lammps), INTENT(IN) :: self
|
||||||
|
INTEGER(c_int), INTENT(IN), TARGET :: id
|
||||||
|
INTEGER(c_int64_t), TARGET :: id64
|
||||||
|
TYPE(c_ptr) :: Cptr
|
||||||
|
|
||||||
|
IF (SIZE_TAGINT == 8) THEN
|
||||||
|
id64 = id
|
||||||
|
Cptr = C_LOC(id64)
|
||||||
|
ELSE
|
||||||
|
Cptr = C_LOC(id)
|
||||||
|
END IF
|
||||||
|
lmp_map_atom_int = lammps_map_atom(self%handle, Cptr) + 1
|
||||||
|
END FUNCTION lmp_map_atom_int
|
||||||
|
|
||||||
|
! equivalent function to lammps_map_atom (for 64-bit integer tags)
|
||||||
|
INTEGER FUNCTION lmp_map_atom_big(self, id)
|
||||||
|
CLASS(lammps), INTENT(IN) :: self
|
||||||
|
INTEGER(c_int64_t), INTENT(IN), TARGET :: id
|
||||||
|
INTEGER(c_int), TARGET :: id32
|
||||||
|
TYPE(c_ptr) :: Cptr
|
||||||
|
|
||||||
|
IF (SIZE_TAGINT == 8) THEN
|
||||||
|
Cptr = C_LOC(id)
|
||||||
|
ELSE
|
||||||
|
id32 = id
|
||||||
|
Cptr = C_LOC(id32)
|
||||||
|
END IF
|
||||||
|
lmp_map_atom_big = lammps_map_atom(self%handle, Cptr) + 1
|
||||||
|
END FUNCTION lmp_map_atom_big
|
||||||
|
|
||||||
! equivalent function to lammps_extract_atom
|
! equivalent function to lammps_extract_atom
|
||||||
! the assignment is actually overloaded so as to bind the pointers to
|
! the assignment is actually overloaded so as to bind the pointers to
|
||||||
! lammps data based on the information available from LAMMPS
|
! lammps data based on the information available from LAMMPS
|
||||||
|
|||||||
@ -1,5 +1,18 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## [4.3.01](https://github.com/kokkos/kokkos/tree/4.3.01)
|
||||||
|
[Full Changelog](https://github.com/kokkos/kokkos/compare/4.3.00...4.3.01)
|
||||||
|
|
||||||
|
### Backend and Architecture Enhancements:
|
||||||
|
|
||||||
|
#### HIP:
|
||||||
|
* MI300 support unified memory support [\#6877](https://github.com/kokkos/kokkos/pull/6877)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
* Serial: Use the provided execution space instance in TeamPolicy [\#6951](https://github.com/kokkos/kokkos/pull/6951)
|
||||||
|
* `nvcc_wrapper`: bring back support for `--fmad` option [\#6931](https://github.com/kokkos/kokkos/pull/6931)
|
||||||
|
* Fix CUDA reduction overflow for `RangePolicy` [\#6578](https://github.com/kokkos/kokkos/pull/6578)
|
||||||
|
|
||||||
## [4.3.00](https://github.com/kokkos/kokkos/tree/4.3.00) (2024-03-19)
|
## [4.3.00](https://github.com/kokkos/kokkos/tree/4.3.00) (2024-03-19)
|
||||||
[Full Changelog](https://github.com/kokkos/kokkos/compare/4.2.01...4.3.00)
|
[Full Changelog](https://github.com/kokkos/kokkos/compare/4.2.01...4.3.00)
|
||||||
|
|
||||||
@ -39,7 +52,7 @@
|
|||||||
* Make the OpenACC backend asynchronous [\#6772](https://github.com/kokkos/kokkos/pull/6772)
|
* Make the OpenACC backend asynchronous [\#6772](https://github.com/kokkos/kokkos/pull/6772)
|
||||||
|
|
||||||
#### Threads:
|
#### Threads:
|
||||||
* Add missing broadcast to TeamThreadRange parallel_scan [\#6601](https://github.com/kokkos/kokkos/pull/6446)
|
* Add missing broadcast to TeamThreadRange parallel_scan [\#6601](https://github.com/kokkos/kokkos/pull/6601)
|
||||||
|
|
||||||
#### OpenMP:
|
#### OpenMP:
|
||||||
* Improve performance of view initializations and filling with zeros [\#6573](https://github.com/kokkos/kokkos/pull/6573)
|
* Improve performance of view initializations and filling with zeros [\#6573](https://github.com/kokkos/kokkos/pull/6573)
|
||||||
|
|||||||
@ -151,7 +151,7 @@ ENDIF()
|
|||||||
|
|
||||||
set(Kokkos_VERSION_MAJOR 4)
|
set(Kokkos_VERSION_MAJOR 4)
|
||||||
set(Kokkos_VERSION_MINOR 3)
|
set(Kokkos_VERSION_MINOR 3)
|
||||||
set(Kokkos_VERSION_PATCH 0)
|
set(Kokkos_VERSION_PATCH 1)
|
||||||
set(Kokkos_VERSION "${Kokkos_VERSION_MAJOR}.${Kokkos_VERSION_MINOR}.${Kokkos_VERSION_PATCH}")
|
set(Kokkos_VERSION "${Kokkos_VERSION_MAJOR}.${Kokkos_VERSION_MINOR}.${Kokkos_VERSION_PATCH}")
|
||||||
message(STATUS "Kokkos version: ${Kokkos_VERSION}")
|
message(STATUS "Kokkos version: ${Kokkos_VERSION}")
|
||||||
math(EXPR KOKKOS_VERSION "${Kokkos_VERSION_MAJOR} * 10000 + ${Kokkos_VERSION_MINOR} * 100 + ${Kokkos_VERSION_PATCH}")
|
math(EXPR KOKKOS_VERSION "${Kokkos_VERSION_MAJOR} * 10000 + ${Kokkos_VERSION_MINOR} * 100 + ${Kokkos_VERSION_PATCH}")
|
||||||
|
|||||||
@ -1,41 +1,8 @@
|
|||||||
//@HEADER
|
************************************************************************
|
||||||
// ************************************************************************
|
|
||||||
//
|
Kokkos v. 4.0
|
||||||
// Kokkos v. 3.0
|
Copyright (2022) National Technology & Engineering
|
||||||
// Copyright (2020) National Technology & Engineering
|
Solutions of Sandia, LLC (NTESS).
|
||||||
// Solutions of Sandia, LLC (NTESS).
|
|
||||||
//
|
Under the terms of Contract DE-NA0003525 with NTESS,
|
||||||
// Under the terms of Contract DE-NA0003525 with NTESS,
|
the U.S. Government retains certain rights in this software.
|
||||||
// the U.S. Government retains certain rights in this software.
|
|
||||||
//
|
|
||||||
// Redistribution and use in source and binary forms, with or without
|
|
||||||
// modification, are permitted provided that the following conditions are
|
|
||||||
// met:
|
|
||||||
//
|
|
||||||
// 1. Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer in the
|
|
||||||
// documentation and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the Corporation nor the names of the
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE
|
|
||||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
|
||||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
|
||||||
//
|
|
||||||
// ************************************************************************
|
|
||||||
//@HEADER
|
|
||||||
|
|||||||
@ -1,13 +1,3 @@
|
|||||||
************************************************************************
|
|
||||||
|
|
||||||
Kokkos v. 4.0
|
|
||||||
Copyright (2022) National Technology & Engineering
|
|
||||||
Solutions of Sandia, LLC (NTESS).
|
|
||||||
|
|
||||||
Under the terms of Contract DE-NA0003525 with NTESS,
|
|
||||||
the U.S. Government retains certain rights in this software.
|
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
Kokkos is under the Apache License v2.0 with LLVM Exceptions:
|
Kokkos is under the Apache License v2.0 with LLVM Exceptions:
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|||||||
@ -12,7 +12,7 @@ endif
|
|||||||
|
|
||||||
KOKKOS_VERSION_MAJOR = 4
|
KOKKOS_VERSION_MAJOR = 4
|
||||||
KOKKOS_VERSION_MINOR = 3
|
KOKKOS_VERSION_MINOR = 3
|
||||||
KOKKOS_VERSION_PATCH = 0
|
KOKKOS_VERSION_PATCH = 1
|
||||||
KOKKOS_VERSION = $(shell echo $(KOKKOS_VERSION_MAJOR)*10000+$(KOKKOS_VERSION_MINOR)*100+$(KOKKOS_VERSION_PATCH) | bc)
|
KOKKOS_VERSION = $(shell echo $(KOKKOS_VERSION_MAJOR)*10000+$(KOKKOS_VERSION_MINOR)*100+$(KOKKOS_VERSION_PATCH) | bc)
|
||||||
|
|
||||||
# Options: Cuda,HIP,SYCL,OpenMPTarget,OpenMP,Threads,Serial
|
# Options: Cuda,HIP,SYCL,OpenMPTarget,OpenMP,Threads,Serial
|
||||||
@ -1232,6 +1232,22 @@ ifneq ($(KOKKOS_INTERNAL_NEW_CONFIG), 0)
|
|||||||
tmp := $(call kokkos_update_config_header, KOKKOS_FWD_HPP_, "KokkosCore_Config_FwdBackend.tmp", "KokkosCore_Config_FwdBackend.hpp")
|
tmp := $(call kokkos_update_config_header, KOKKOS_FWD_HPP_, "KokkosCore_Config_FwdBackend.tmp", "KokkosCore_Config_FwdBackend.hpp")
|
||||||
tmp := $(call kokkos_update_config_header, KOKKOS_SETUP_HPP_, "KokkosCore_Config_SetupBackend.tmp", "KokkosCore_Config_SetupBackend.hpp")
|
tmp := $(call kokkos_update_config_header, KOKKOS_SETUP_HPP_, "KokkosCore_Config_SetupBackend.tmp", "KokkosCore_Config_SetupBackend.hpp")
|
||||||
tmp := $(call kokkos_update_config_header, KOKKOS_DECLARE_HPP_, "KokkosCore_Config_DeclareBackend.tmp", "KokkosCore_Config_DeclareBackend.hpp")
|
tmp := $(call kokkos_update_config_header, KOKKOS_DECLARE_HPP_, "KokkosCore_Config_DeclareBackend.tmp", "KokkosCore_Config_DeclareBackend.hpp")
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
|
||||||
|
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_OPENMP.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
||||||
|
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_OPENMP.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
||||||
|
endif
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_THREADS), 1)
|
||||||
|
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_THREADS.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
||||||
|
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_THREADS.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
||||||
|
endif
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
|
||||||
|
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_HPX.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
||||||
|
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_HPX.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
||||||
|
endif
|
||||||
|
ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
|
||||||
|
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_SERIAL.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
||||||
|
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_SERIAL.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
||||||
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_CUDA.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_CUDA.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_CUDA.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_CUDA.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
||||||
@ -1251,26 +1267,10 @@ ifneq ($(KOKKOS_INTERNAL_NEW_CONFIG), 0)
|
|||||||
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_HIP.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_HIP.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <setup/Kokkos_Setup_HIP.hpp>","KokkosCore_Config_SetupBackend.hpp")
|
tmp := $(call kokkos_append_config_header,"$H""include <setup/Kokkos_Setup_HIP.hpp>","KokkosCore_Config_SetupBackend.hpp")
|
||||||
endif
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
|
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_OPENMP.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_OPENMP.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
|
||||||
endif
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_OPENACC), 1)
|
ifeq ($(KOKKOS_INTERNAL_USE_OPENACC), 1)
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_OPENACC.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_OPENACC.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_OPENACC.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_OPENACC.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
||||||
endif
|
endif
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_THREADS), 1)
|
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_THREADS.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_THREADS.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
|
||||||
endif
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
|
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_HPX.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_HPX.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
|
||||||
endif
|
|
||||||
ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
|
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <fwd/Kokkos_Fwd_SERIAL.hpp>","KokkosCore_Config_FwdBackend.hpp")
|
|
||||||
tmp := $(call kokkos_append_config_header,"$H""include <decl/Kokkos_Declare_SERIAL.hpp>","KokkosCore_Config_DeclareBackend.hpp")
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/*.hpp)
|
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/*.hpp)
|
||||||
|
|||||||
@ -399,9 +399,14 @@ sort_device_view_with_comparator(
|
|||||||
|
|
||||||
using ViewType = Kokkos::View<DataType, Properties...>;
|
using ViewType = Kokkos::View<DataType, Properties...>;
|
||||||
using MemSpace = typename ViewType::memory_space;
|
using MemSpace = typename ViewType::memory_space;
|
||||||
|
// Note with HIP unified memory this code path is still the right thing to do
|
||||||
|
// if we end up here when RocThrust is not enabled.
|
||||||
|
// The create_mirror_view_and_copy will do the right thing (no copy).
|
||||||
|
#ifndef KOKKOS_ENABLE_IMPL_HIP_UNIFIED_MEMORY
|
||||||
static_assert(!SpaceAccessibility<HostSpace, MemSpace>::accessible,
|
static_assert(!SpaceAccessibility<HostSpace, MemSpace>::accessible,
|
||||||
"Impl::sort_device_view_with_comparator: should not be called "
|
"Impl::sort_device_view_with_comparator: should not be called "
|
||||||
"on a view that is already accessible on the host");
|
"on a view that is already accessible on the host");
|
||||||
|
#endif
|
||||||
|
|
||||||
copy_to_host_run_stdsort_copy_back(exec, view, comparator);
|
copy_to_host_run_stdsort_copy_back(exec, view, comparator);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -229,7 +229,7 @@ do
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
#Handle known nvcc args
|
#Handle known nvcc args
|
||||||
--dryrun|-dryrun|--verbose|--keep|-keep|--source-in-ptx|-src-in-ptx|--keep-dir*|-keep-dir*|-G|-lineinfo|--generate-line-info|-extended-lambda|-expt-extended-lambda|-expt-relaxed-constexpr|--resource-usage|-res-usage|-fmad=*|--use_fast_math|-use_fast_math|--Wext-lambda-captures-this|-Wext-lambda-captures-this)
|
--dryrun|-dryrun|--verbose|--keep|-keep|--source-in-ptx|-src-in-ptx|--keep-dir*|-keep-dir*|-G|-lineinfo|--generate-line-info|-extended-lambda|-expt-extended-lambda|-expt-relaxed-constexpr|--resource-usage|-res-usage|--fmad=*|-fmad=*|--use_fast_math|-use_fast_math|--Wext-lambda-captures-this|-Wext-lambda-captures-this)
|
||||||
cuda_args="$cuda_args $1"
|
cuda_args="$cuda_args $1"
|
||||||
;;
|
;;
|
||||||
#Handle more known nvcc args
|
#Handle more known nvcc args
|
||||||
|
|||||||
@ -39,6 +39,7 @@
|
|||||||
#cmakedefine KOKKOS_ENABLE_IMPL_CUDA_MALLOC_ASYNC
|
#cmakedefine KOKKOS_ENABLE_IMPL_CUDA_MALLOC_ASYNC
|
||||||
#cmakedefine KOKKOS_ENABLE_HIP_RELOCATABLE_DEVICE_CODE
|
#cmakedefine KOKKOS_ENABLE_HIP_RELOCATABLE_DEVICE_CODE
|
||||||
#cmakedefine KOKKOS_ENABLE_HIP_MULTIPLE_KERNEL_INSTANTIATIONS
|
#cmakedefine KOKKOS_ENABLE_HIP_MULTIPLE_KERNEL_INSTANTIATIONS
|
||||||
|
#cmakedefine KOKKOS_ENABLE_IMPL_HIP_UNIFIED_MEMORY
|
||||||
#cmakedefine KOKKOS_ENABLE_IMPL_HPX_ASYNC_DISPATCH
|
#cmakedefine KOKKOS_ENABLE_IMPL_HPX_ASYNC_DISPATCH
|
||||||
#cmakedefine KOKKOS_ENABLE_DEBUG
|
#cmakedefine KOKKOS_ENABLE_DEBUG
|
||||||
#cmakedefine KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK
|
#cmakedefine KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK
|
||||||
|
|||||||
@ -40,6 +40,26 @@ ELSE()
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
KOKKOS_DEVICE_OPTION(OPENMP ${OMP_DEFAULT} HOST "Whether to build OpenMP backend")
|
KOKKOS_DEVICE_OPTION(OPENMP ${OMP_DEFAULT} HOST "Whether to build OpenMP backend")
|
||||||
|
|
||||||
|
|
||||||
|
# We want this to default to OFF for cache reasons, but if no
|
||||||
|
# host space is given, then activate serial
|
||||||
|
IF (KOKKOS_HAS_TRILINOS)
|
||||||
|
#However, Trilinos always wants Serial ON
|
||||||
|
SET(SERIAL_DEFAULT ON)
|
||||||
|
ELSEIF (KOKKOS_HAS_HOST)
|
||||||
|
SET(SERIAL_DEFAULT OFF)
|
||||||
|
ELSE()
|
||||||
|
SET(SERIAL_DEFAULT ON)
|
||||||
|
IF (NOT DEFINED Kokkos_ENABLE_SERIAL)
|
||||||
|
MESSAGE(STATUS "SERIAL backend is being turned on to ensure there is at least one Host space. To change this, you must enable another host execution space and configure with -DKokkos_ENABLE_SERIAL=OFF or change CMakeCache.txt")
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
KOKKOS_DEVICE_OPTION(SERIAL ${SERIAL_DEFAULT} HOST "Whether to build serial backend")
|
||||||
|
|
||||||
|
KOKKOS_DEVICE_OPTION(HPX OFF HOST "Whether to build HPX backend (experimental)")
|
||||||
|
|
||||||
|
# Device backends have to come after host backends for header include order reasons
|
||||||
|
# Without this we can't make e.g. CudaSpace accessible by HostSpace
|
||||||
KOKKOS_DEVICE_OPTION(OPENACC OFF DEVICE "Whether to build the OpenACC backend")
|
KOKKOS_DEVICE_OPTION(OPENACC OFF DEVICE "Whether to build the OpenACC backend")
|
||||||
IF (KOKKOS_ENABLE_OPENACC)
|
IF (KOKKOS_ENABLE_OPENACC)
|
||||||
COMPILER_SPECIFIC_FLAGS(
|
COMPILER_SPECIFIC_FLAGS(
|
||||||
@ -90,23 +110,6 @@ IF (KOKKOS_ENABLE_CUDA)
|
|||||||
LIST(APPEND DEVICE_SETUP_LIST Cuda)
|
LIST(APPEND DEVICE_SETUP_LIST Cuda)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# We want this to default to OFF for cache reasons, but if no
|
|
||||||
# host space is given, then activate serial
|
|
||||||
IF (KOKKOS_HAS_TRILINOS)
|
|
||||||
#However, Trilinos always wants Serial ON
|
|
||||||
SET(SERIAL_DEFAULT ON)
|
|
||||||
ELSEIF (KOKKOS_HAS_HOST)
|
|
||||||
SET(SERIAL_DEFAULT OFF)
|
|
||||||
ELSE()
|
|
||||||
SET(SERIAL_DEFAULT ON)
|
|
||||||
IF (NOT DEFINED Kokkos_ENABLE_SERIAL)
|
|
||||||
MESSAGE(STATUS "SERIAL backend is being turned on to ensure there is at least one Host space. To change this, you must enable another host execution space and configure with -DKokkos_ENABLE_SERIAL=OFF or change CMakeCache.txt")
|
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
|
||||||
KOKKOS_DEVICE_OPTION(SERIAL ${SERIAL_DEFAULT} HOST "Whether to build serial backend")
|
|
||||||
|
|
||||||
KOKKOS_DEVICE_OPTION(HPX OFF HOST "Whether to build HPX backend (experimental)")
|
|
||||||
|
|
||||||
KOKKOS_DEVICE_OPTION(HIP OFF DEVICE "Whether to build HIP backend")
|
KOKKOS_DEVICE_OPTION(HIP OFF DEVICE "Whether to build HIP backend")
|
||||||
|
|
||||||
## HIP has extra setup requirements, turn on Kokkos_Setup_HIP.hpp in macros
|
## HIP has extra setup requirements, turn on Kokkos_Setup_HIP.hpp in macros
|
||||||
|
|||||||
@ -70,6 +70,7 @@ KOKKOS_ENABLE_OPTION(TUNING OFF "Whether to create bindings for tu
|
|||||||
KOKKOS_ENABLE_OPTION(AGGRESSIVE_VECTORIZATION OFF "Whether to aggressively vectorize loops")
|
KOKKOS_ENABLE_OPTION(AGGRESSIVE_VECTORIZATION OFF "Whether to aggressively vectorize loops")
|
||||||
KOKKOS_ENABLE_OPTION(COMPILE_AS_CMAKE_LANGUAGE OFF "Whether to use native cmake language support")
|
KOKKOS_ENABLE_OPTION(COMPILE_AS_CMAKE_LANGUAGE OFF "Whether to use native cmake language support")
|
||||||
KOKKOS_ENABLE_OPTION(HIP_MULTIPLE_KERNEL_INSTANTIATIONS OFF "Whether multiple kernels are instantiated at compile time - improve performance but increase compile time")
|
KOKKOS_ENABLE_OPTION(HIP_MULTIPLE_KERNEL_INSTANTIATIONS OFF "Whether multiple kernels are instantiated at compile time - improve performance but increase compile time")
|
||||||
|
KOKKOS_ENABLE_OPTION(IMPL_HIP_UNIFIED_MEMORY OFF "Whether to leverage unified memory architectures for HIP")
|
||||||
|
|
||||||
# This option will go away eventually, but allows fallback to old implementation when needed.
|
# This option will go away eventually, but allows fallback to old implementation when needed.
|
||||||
KOKKOS_ENABLE_OPTION(DESUL_ATOMICS_EXTERNAL OFF "Whether to use an external desul installation")
|
KOKKOS_ENABLE_OPTION(DESUL_ATOMICS_EXTERNAL OFF "Whether to use an external desul installation")
|
||||||
|
|||||||
@ -312,8 +312,9 @@ class ParallelReduce<CombinedFunctorReducerType, Kokkos::RangePolicy<Traits...>,
|
|||||||
// REQUIRED ( 1 , N , 1 )
|
// REQUIRED ( 1 , N , 1 )
|
||||||
dim3 block(1, block_size, 1);
|
dim3 block(1, block_size, 1);
|
||||||
// Required grid.x <= block.y
|
// Required grid.x <= block.y
|
||||||
dim3 grid(std::min(int(block.y), int((nwork + block.y - 1) / block.y)), 1,
|
dim3 grid(std::min(index_type(block.y),
|
||||||
1);
|
index_type((nwork + block.y - 1) / block.y)),
|
||||||
|
1, 1);
|
||||||
|
|
||||||
// TODO @graph We need to effectively insert this in to the graph
|
// TODO @graph We need to effectively insert this in to the graph
|
||||||
const int shmem =
|
const int shmem =
|
||||||
|
|||||||
@ -146,6 +146,10 @@ void HIP::print_configuration(std::ostream& os, bool /*verbose*/) const {
|
|||||||
#else
|
#else
|
||||||
os << "no\n";
|
os << "no\n";
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef KOKKOS_ENABLE_IMPL_HIP_UNIFIED_MEMORY
|
||||||
|
os << " KOKKOS_ENABLE_IMPL_HIP_UNIFIED_MEMORY: ";
|
||||||
|
os << "yes\n";
|
||||||
|
#endif
|
||||||
|
|
||||||
os << "\nRuntime Configuration:\n";
|
os << "\nRuntime Configuration:\n";
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,12 @@
|
|||||||
#include <HIP/Kokkos_HIP_SharedAllocationRecord.hpp>
|
#include <HIP/Kokkos_HIP_SharedAllocationRecord.hpp>
|
||||||
#include <impl/Kokkos_SharedAlloc_timpl.hpp>
|
#include <impl/Kokkos_SharedAlloc_timpl.hpp>
|
||||||
|
|
||||||
|
#ifndef KOKKOS_ENABLE_IMPL_HIP_UNIFIED_MEMORY
|
||||||
KOKKOS_IMPL_HOST_INACCESSIBLE_SHARED_ALLOCATION_RECORD_EXPLICIT_INSTANTIATION(
|
KOKKOS_IMPL_HOST_INACCESSIBLE_SHARED_ALLOCATION_RECORD_EXPLICIT_INSTANTIATION(
|
||||||
Kokkos::HIPSpace);
|
Kokkos::HIPSpace);
|
||||||
|
#else
|
||||||
|
KOKKOS_IMPL_SHARED_ALLOCATION_RECORD_EXPLICIT_INSTANTIATION(Kokkos::HIPSpace);
|
||||||
|
#endif
|
||||||
KOKKOS_IMPL_SHARED_ALLOCATION_RECORD_EXPLICIT_INSTANTIATION(
|
KOKKOS_IMPL_SHARED_ALLOCATION_RECORD_EXPLICIT_INSTANTIATION(
|
||||||
Kokkos::HIPHostPinnedSpace);
|
Kokkos::HIPHostPinnedSpace);
|
||||||
KOKKOS_IMPL_SHARED_ALLOCATION_RECORD_EXPLICIT_INSTANTIATION(
|
KOKKOS_IMPL_SHARED_ALLOCATION_RECORD_EXPLICIT_INSTANTIATION(
|
||||||
|
|||||||
@ -20,8 +20,12 @@
|
|||||||
#include <HIP/Kokkos_HIP_Space.hpp>
|
#include <HIP/Kokkos_HIP_Space.hpp>
|
||||||
#include <impl/Kokkos_SharedAlloc.hpp>
|
#include <impl/Kokkos_SharedAlloc.hpp>
|
||||||
|
|
||||||
|
#if defined(KOKKOS_ENABLE_IMPL_HIP_UNIFIED_MEMORY)
|
||||||
|
KOKKOS_IMPL_SHARED_ALLOCATION_SPECIALIZATION(Kokkos::HIPSpace);
|
||||||
|
#else
|
||||||
KOKKOS_IMPL_HOST_INACCESSIBLE_SHARED_ALLOCATION_SPECIALIZATION(
|
KOKKOS_IMPL_HOST_INACCESSIBLE_SHARED_ALLOCATION_SPECIALIZATION(
|
||||||
Kokkos::HIPSpace);
|
Kokkos::HIPSpace);
|
||||||
|
#endif
|
||||||
KOKKOS_IMPL_SHARED_ALLOCATION_SPECIALIZATION(Kokkos::HIPHostPinnedSpace);
|
KOKKOS_IMPL_SHARED_ALLOCATION_SPECIALIZATION(Kokkos::HIPHostPinnedSpace);
|
||||||
KOKKOS_IMPL_SHARED_ALLOCATION_SPECIALIZATION(Kokkos::HIPManagedSpace);
|
KOKKOS_IMPL_SHARED_ALLOCATION_SPECIALIZATION(Kokkos::HIPManagedSpace);
|
||||||
|
|
||||||
|
|||||||
@ -65,6 +65,18 @@ class HIPSpace {
|
|||||||
~HIPSpace() = default;
|
~HIPSpace() = default;
|
||||||
|
|
||||||
/**\brief Allocate untracked memory in the hip space */
|
/**\brief Allocate untracked memory in the hip space */
|
||||||
|
#ifdef KOKKOS_ENABLE_IMPL_HIP_UNIFIED_MEMORY
|
||||||
|
template <typename ExecutionSpace>
|
||||||
|
void* allocate(const ExecutionSpace&, const size_t arg_alloc_size) const {
|
||||||
|
return allocate(arg_alloc_size);
|
||||||
|
}
|
||||||
|
template <typename ExecutionSpace>
|
||||||
|
void* allocate(const ExecutionSpace&, const char* arg_label,
|
||||||
|
const size_t arg_alloc_size,
|
||||||
|
const size_t arg_logical_size = 0) const {
|
||||||
|
return allocate(arg_label, arg_alloc_size, arg_logical_size);
|
||||||
|
}
|
||||||
|
#else
|
||||||
// FIXME_HIP Use execution space instance
|
// FIXME_HIP Use execution space instance
|
||||||
void* allocate(const HIP&, const size_t arg_alloc_size) const {
|
void* allocate(const HIP&, const size_t arg_alloc_size) const {
|
||||||
return allocate(arg_alloc_size);
|
return allocate(arg_alloc_size);
|
||||||
@ -74,6 +86,7 @@ class HIPSpace {
|
|||||||
const size_t arg_logical_size = 0) const {
|
const size_t arg_logical_size = 0) const {
|
||||||
return allocate(arg_label, arg_alloc_size, arg_logical_size);
|
return allocate(arg_label, arg_alloc_size, arg_logical_size);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
void* allocate(const size_t arg_alloc_size) const;
|
void* allocate(const size_t arg_alloc_size) const;
|
||||||
void* allocate(const char* arg_label, const size_t arg_alloc_size,
|
void* allocate(const char* arg_label, const size_t arg_alloc_size,
|
||||||
const size_t arg_logical_size = 0) const;
|
const size_t arg_logical_size = 0) const;
|
||||||
@ -267,7 +280,11 @@ static_assert(Kokkos::Impl::MemorySpaceAccess<HIPSpace, HIPSpace>::assignable);
|
|||||||
template <>
|
template <>
|
||||||
struct MemorySpaceAccess<HostSpace, HIPSpace> {
|
struct MemorySpaceAccess<HostSpace, HIPSpace> {
|
||||||
enum : bool { assignable = false };
|
enum : bool { assignable = false };
|
||||||
enum : bool { accessible = false };
|
#if !defined(KOKKOS_ENABLE_IMPL_HIP_UNIFIED_MEMORY)
|
||||||
|
enum : bool{accessible = false};
|
||||||
|
#else
|
||||||
|
enum : bool { accessible = true };
|
||||||
|
#endif
|
||||||
enum : bool { deepcopy = true };
|
enum : bool { deepcopy = true };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -37,6 +37,8 @@ class TeamPolicyInternal<Kokkos::Serial, Properties...>
|
|||||||
int m_league_size;
|
int m_league_size;
|
||||||
int m_chunk_size;
|
int m_chunk_size;
|
||||||
|
|
||||||
|
Kokkos::Serial m_space;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! Tag this class as a kokkos execution policy
|
//! Tag this class as a kokkos execution policy
|
||||||
using execution_policy = TeamPolicyInternal;
|
using execution_policy = TeamPolicyInternal;
|
||||||
@ -46,10 +48,7 @@ class TeamPolicyInternal<Kokkos::Serial, Properties...>
|
|||||||
//! Execution space of this execution policy:
|
//! Execution space of this execution policy:
|
||||||
using execution_space = Kokkos::Serial;
|
using execution_space = Kokkos::Serial;
|
||||||
|
|
||||||
const typename traits::execution_space& space() const {
|
const typename traits::execution_space& space() const { return m_space; }
|
||||||
static typename traits::execution_space m_space;
|
|
||||||
return m_space;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class ExecSpace, class... OtherProperties>
|
template <class ExecSpace, class... OtherProperties>
|
||||||
friend class TeamPolicyInternal;
|
friend class TeamPolicyInternal;
|
||||||
@ -116,12 +115,13 @@ class TeamPolicyInternal<Kokkos::Serial, Properties...>
|
|||||||
return (level == 0 ? 1024 * 32 : 20 * 1024 * 1024);
|
return (level == 0 ? 1024 * 32 : 20 * 1024 * 1024);
|
||||||
}
|
}
|
||||||
/** \brief Specify league size, request team size */
|
/** \brief Specify league size, request team size */
|
||||||
TeamPolicyInternal(const execution_space&, int league_size_request,
|
TeamPolicyInternal(const execution_space& space, int league_size_request,
|
||||||
int team_size_request, int /* vector_length_request */ = 1)
|
int team_size_request, int /* vector_length_request */ = 1)
|
||||||
: m_team_scratch_size{0, 0},
|
: m_team_scratch_size{0, 0},
|
||||||
m_thread_scratch_size{0, 0},
|
m_thread_scratch_size{0, 0},
|
||||||
m_league_size(league_size_request),
|
m_league_size(league_size_request),
|
||||||
m_chunk_size(32) {
|
m_chunk_size(32),
|
||||||
|
m_space(space) {
|
||||||
if (team_size_request > 1)
|
if (team_size_request > 1)
|
||||||
Kokkos::abort("Kokkos::abort: Requested Team Size is too large!");
|
Kokkos::abort("Kokkos::abort: Requested Team Size is too large!");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,6 +28,17 @@ struct SumFunctor {
|
|||||||
void operator()(int i, int& lsum) const { lsum += i; }
|
void operator()(int i, int& lsum) const { lsum += i; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <class ExecSpace>
|
||||||
|
void check_space_member_for_policies(const ExecSpace& exec) {
|
||||||
|
Kokkos::RangePolicy<ExecSpace> range_policy(exec, 0, 1);
|
||||||
|
ASSERT_EQ(range_policy.space(), exec);
|
||||||
|
Kokkos::MDRangePolicy<ExecSpace, Kokkos::Rank<2>> mdrange_policy(exec, {0, 0},
|
||||||
|
{1, 1});
|
||||||
|
ASSERT_EQ(mdrange_policy.space(), exec);
|
||||||
|
Kokkos::TeamPolicy<ExecSpace> team_policy(exec, 1, Kokkos::AUTO);
|
||||||
|
ASSERT_EQ(team_policy.space(), exec);
|
||||||
|
}
|
||||||
|
|
||||||
template <class ExecSpace>
|
template <class ExecSpace>
|
||||||
void check_distinctive([[maybe_unused]] ExecSpace exec1,
|
void check_distinctive([[maybe_unused]] ExecSpace exec1,
|
||||||
[[maybe_unused]] ExecSpace exec2) {
|
[[maybe_unused]] ExecSpace exec2) {
|
||||||
@ -89,6 +100,9 @@ void run_threaded_test(const Lambda1 l1, const Lambda2 l2) {
|
|||||||
|
|
||||||
void test_partitioning(std::vector<TEST_EXECSPACE>& instances) {
|
void test_partitioning(std::vector<TEST_EXECSPACE>& instances) {
|
||||||
check_distinctive(instances[0], instances[1]);
|
check_distinctive(instances[0], instances[1]);
|
||||||
|
check_space_member_for_policies(instances[0]);
|
||||||
|
check_space_member_for_policies(instances[1]);
|
||||||
|
|
||||||
int sum1, sum2;
|
int sum1, sum2;
|
||||||
int N = 3910;
|
int N = 3910;
|
||||||
run_threaded_test(
|
run_threaded_test(
|
||||||
|
|||||||
@ -625,4 +625,30 @@ TEST(TEST_CATEGORY, int_combined_reduce_mixed) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(NDEBUG)
|
||||||
|
// the following test was made for:
|
||||||
|
// https://github.com/kokkos/kokkos/issues/6517
|
||||||
|
|
||||||
|
struct FunctorReductionWithLargeIterationCount {
|
||||||
|
KOKKOS_FUNCTION void operator()(const int64_t /*i*/, double& update) const {
|
||||||
|
update += 1.0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST(TEST_CATEGORY, reduction_with_large_iteration_count) {
|
||||||
|
if constexpr (std::is_same_v<typename TEST_EXECSPACE::memory_space,
|
||||||
|
Kokkos::HostSpace>) {
|
||||||
|
GTEST_SKIP() << "Disabling for host backends";
|
||||||
|
}
|
||||||
|
|
||||||
|
const int64_t N = pow(2LL, 39LL) - pow(2LL, 8LL) + 1;
|
||||||
|
Kokkos::RangePolicy<TEST_EXECSPACE, Kokkos::IndexType<int64_t>> p(0, N);
|
||||||
|
double nu = 0;
|
||||||
|
EXPECT_NO_THROW(Kokkos::parallel_reduce(
|
||||||
|
"sample reduction", p, FunctorReductionWithLargeIterationCount(), nu));
|
||||||
|
ASSERT_DOUBLE_EQ(nu, double(N));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace Test
|
} // namespace Test
|
||||||
|
|||||||
@ -38,8 +38,13 @@ TEST(hip, space_access) {
|
|||||||
static_assert(!Kokkos::Impl::MemorySpaceAccess<Kokkos::HostSpace,
|
static_assert(!Kokkos::Impl::MemorySpaceAccess<Kokkos::HostSpace,
|
||||||
Kokkos::HIPSpace>::assignable);
|
Kokkos::HIPSpace>::assignable);
|
||||||
|
|
||||||
|
#if !defined(KOKKOS_ENABLE_IMPL_HIP_UNIFIED_MEMORY)
|
||||||
static_assert(!Kokkos::Impl::MemorySpaceAccess<Kokkos::HostSpace,
|
static_assert(!Kokkos::Impl::MemorySpaceAccess<Kokkos::HostSpace,
|
||||||
Kokkos::HIPSpace>::accessible);
|
Kokkos::HIPSpace>::accessible);
|
||||||
|
#else
|
||||||
|
static_assert(Kokkos::Impl::MemorySpaceAccess<Kokkos::HostSpace,
|
||||||
|
Kokkos::HIPSpace>::accessible);
|
||||||
|
#endif
|
||||||
|
|
||||||
static_assert(
|
static_assert(
|
||||||
!Kokkos::Impl::MemorySpaceAccess<Kokkos::HostSpace,
|
!Kokkos::Impl::MemorySpaceAccess<Kokkos::HostSpace,
|
||||||
@ -149,8 +154,13 @@ TEST(hip, space_access) {
|
|||||||
Kokkos::SpaceAccessibility<Kokkos::HIP,
|
Kokkos::SpaceAccessibility<Kokkos::HIP,
|
||||||
Kokkos::HIPManagedSpace>::accessible);
|
Kokkos::HIPManagedSpace>::accessible);
|
||||||
|
|
||||||
|
#if !defined(KOKKOS_ENABLE_IMPL_HIP_UNIFIED_MEMORY)
|
||||||
static_assert(!Kokkos::SpaceAccessibility<Kokkos::HostSpace,
|
static_assert(!Kokkos::SpaceAccessibility<Kokkos::HostSpace,
|
||||||
Kokkos::HIPSpace>::accessible);
|
Kokkos::HIPSpace>::accessible);
|
||||||
|
#else
|
||||||
|
static_assert(Kokkos::SpaceAccessibility<Kokkos::HostSpace,
|
||||||
|
Kokkos::HIPSpace>::accessible);
|
||||||
|
#endif
|
||||||
|
|
||||||
static_assert(
|
static_assert(
|
||||||
Kokkos::SpaceAccessibility<Kokkos::HostSpace,
|
Kokkos::SpaceAccessibility<Kokkos::HostSpace,
|
||||||
@ -160,8 +170,14 @@ TEST(hip, space_access) {
|
|||||||
Kokkos::SpaceAccessibility<Kokkos::HostSpace,
|
Kokkos::SpaceAccessibility<Kokkos::HostSpace,
|
||||||
Kokkos::HIPManagedSpace>::accessible);
|
Kokkos::HIPManagedSpace>::accessible);
|
||||||
|
|
||||||
|
#if !defined(KOKKOS_ENABLE_IMPL_HIP_UNIFIED_MEMORY)
|
||||||
static_assert(std::is_same<Kokkos::Impl::HostMirror<Kokkos::HIPSpace>::Space,
|
static_assert(std::is_same<Kokkos::Impl::HostMirror<Kokkos::HIPSpace>::Space,
|
||||||
Kokkos::HostSpace>::value);
|
Kokkos::HostSpace>::value);
|
||||||
|
#else
|
||||||
|
static_assert(std::is_same<Kokkos::Impl::HostMirror<Kokkos::HIPSpace>::Space,
|
||||||
|
Kokkos::Device<Kokkos::HostSpace::execution_space,
|
||||||
|
Kokkos::HIPSpace>>::value);
|
||||||
|
#endif
|
||||||
|
|
||||||
static_assert(
|
static_assert(
|
||||||
std::is_same<Kokkos::Impl::HostMirror<Kokkos::HIPHostPinnedSpace>::Space,
|
std::is_same<Kokkos::Impl::HostMirror<Kokkos::HIPHostPinnedSpace>::Space,
|
||||||
|
|||||||
@ -36,3 +36,4 @@ tag: 4.1.00 date: 06:20:2023 master: 62d2b6c8 release: adde1e6a
|
|||||||
tag: 4.2.00 date: 11:09:2023 master: 1a3ea28f release: abe01c88
|
tag: 4.2.00 date: 11:09:2023 master: 1a3ea28f release: abe01c88
|
||||||
tag: 4.2.01 date: 01:30:2024 master: 71a9bcae release: 221e5f7a
|
tag: 4.2.01 date: 01:30:2024 master: 71a9bcae release: 221e5f7a
|
||||||
tag: 4.3.00 date: 04:03:2024 master: e0dc0128 release: f08217a4
|
tag: 4.3.00 date: 04:03:2024 master: e0dc0128 release: f08217a4
|
||||||
|
tag: 4.3.01 date: 05:07:2024 master: 486cc745 release: 262d2d6e
|
||||||
|
|||||||
@ -269,6 +269,9 @@ class lammps(object):
|
|||||||
self.lib.lammps_extract_global_datatype.restype = c_int
|
self.lib.lammps_extract_global_datatype.restype = c_int
|
||||||
self.lib.lammps_extract_compute.argtypes = [c_void_p, c_char_p, c_int, c_int]
|
self.lib.lammps_extract_compute.argtypes = [c_void_p, c_char_p, c_int, c_int]
|
||||||
|
|
||||||
|
self.lib.lammps_map_atom.argtypes = [c_void_p, c_void_p]
|
||||||
|
self.lib.lammps_map_atom.restype = c_int
|
||||||
|
|
||||||
self.lib.lammps_get_thermo.argtypes = [c_void_p, c_char_p]
|
self.lib.lammps_get_thermo.argtypes = [c_void_p, c_char_p]
|
||||||
self.lib.lammps_get_thermo.restype = c_double
|
self.lib.lammps_get_thermo.restype = c_double
|
||||||
|
|
||||||
@ -376,12 +379,16 @@ class lammps(object):
|
|||||||
narg = 0
|
narg = 0
|
||||||
cargs = None
|
cargs = None
|
||||||
if cmdargs is not None:
|
if cmdargs is not None:
|
||||||
cmdargs.insert(0,"lammps")
|
myargs = ["lammps".encode()]
|
||||||
narg = len(cmdargs)
|
narg = len(cmdargs) + 1
|
||||||
for i in range(narg):
|
for arg in cmdargs:
|
||||||
if type(cmdargs[i]) is str:
|
if type(arg) is str:
|
||||||
cmdargs[i] = cmdargs[i].encode()
|
myargs.append(arg.encode())
|
||||||
cargs = (c_char_p*(narg+1))(*cmdargs)
|
elif type(arg) is bytes:
|
||||||
|
myargs.append(arg)
|
||||||
|
else:
|
||||||
|
raise TypeError('Unsupported cmdargs type ', type(arg))
|
||||||
|
cargs = (c_char_p*(narg+1))(*myargs)
|
||||||
cargs[narg] = None
|
cargs[narg] = None
|
||||||
self.lib.lammps_open.argtypes = [c_int, c_char_p*(narg+1), MPI_Comm, c_void_p]
|
self.lib.lammps_open.argtypes = [c_int, c_char_p*(narg+1), MPI_Comm, c_void_p]
|
||||||
else:
|
else:
|
||||||
@ -397,12 +404,16 @@ class lammps(object):
|
|||||||
self.comm = self.MPI.COMM_WORLD
|
self.comm = self.MPI.COMM_WORLD
|
||||||
self.opened = 1
|
self.opened = 1
|
||||||
if cmdargs is not None:
|
if cmdargs is not None:
|
||||||
cmdargs.insert(0,"lammps")
|
myargs = ["lammps".encode()]
|
||||||
narg = len(cmdargs)
|
narg = len(cmdargs) + 1
|
||||||
for i in range(narg):
|
for arg in cmdargs:
|
||||||
if type(cmdargs[i]) is str:
|
if type(arg) is str:
|
||||||
cmdargs[i] = cmdargs[i].encode()
|
myargs.append(arg.encode())
|
||||||
cargs = (c_char_p*(narg+1))(*cmdargs)
|
elif type(arg) is bytes:
|
||||||
|
myargs.append(arg)
|
||||||
|
else:
|
||||||
|
raise TypeError('Unsupported cmdargs type ', type(arg))
|
||||||
|
cargs = (c_char_p*(narg+1))(*myargs)
|
||||||
cargs[narg] = None
|
cargs[narg] = None
|
||||||
self.lib.lammps_open_no_mpi.argtypes = [c_int, c_char_p*(narg+1), c_void_p]
|
self.lib.lammps_open_no_mpi.argtypes = [c_int, c_char_p*(narg+1), c_void_p]
|
||||||
self.lmp = c_void_p(self.lib.lammps_open_no_mpi(narg,cargs,None))
|
self.lmp = c_void_p(self.lib.lammps_open_no_mpi(narg,cargs,None))
|
||||||
@ -885,6 +896,8 @@ class lammps(object):
|
|||||||
veclen = vec_dict[name]
|
veclen = vec_dict[name]
|
||||||
elif name == 'respa_dt':
|
elif name == 'respa_dt':
|
||||||
veclen = self.extract_global('respa_levels',LAMMPS_INT)
|
veclen = self.extract_global('respa_levels',LAMMPS_INT)
|
||||||
|
elif name == 'sametag':
|
||||||
|
veclen = self.extract_setting('nall')
|
||||||
else:
|
else:
|
||||||
veclen = 1
|
veclen = 1
|
||||||
|
|
||||||
@ -918,6 +931,24 @@ class lammps(object):
|
|||||||
else: return target_type(ptr[0])
|
else: return target_type(ptr[0])
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
# map global atom ID to local atom index
|
||||||
|
|
||||||
|
def map_atom(self, id):
|
||||||
|
"""Map a global atom ID (aka tag) to the local atom index
|
||||||
|
|
||||||
|
This is a wrapper around the :cpp:func:`lammps_map_atom`
|
||||||
|
function of the C-library interface.
|
||||||
|
|
||||||
|
:param id: atom ID
|
||||||
|
:type id: int
|
||||||
|
:return: local index
|
||||||
|
:rtype: int
|
||||||
|
"""
|
||||||
|
|
||||||
|
tag = self.c_tagint(id)
|
||||||
|
return self.lib.lammps_map_atom(self.lmp, pointer(tag))
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
# extract per-atom info datatype
|
# extract per-atom info datatype
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,7 @@
|
|||||||
#include "bond_bpm.h"
|
#include "bond_bpm.h"
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
|
#include "citeme.h"
|
||||||
#include "comm.h"
|
#include "comm.h"
|
||||||
#include "domain.h"
|
#include "domain.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
@ -30,6 +31,19 @@
|
|||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
|
static const char cite_bpm[] =
|
||||||
|
"BPM bond style: doi:10.1039/D3SM01373A\n\n"
|
||||||
|
"@Article{Clemmer2024,\n"
|
||||||
|
" author = {Clemmer, Joel T. and Monti, Joseph M. and Lechman, Jeremy B.},\n"
|
||||||
|
" title = {A soft departure from jamming: the compaction of deformable\n"
|
||||||
|
" granular matter under high pressures},\n"
|
||||||
|
" journal = {Soft Matter},\n"
|
||||||
|
" year = 2024,\n"
|
||||||
|
" volume = 20,\n"
|
||||||
|
" number = 8,\n"
|
||||||
|
" pages = {1702--1718}\n"
|
||||||
|
"}\n\n";
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
BondBPM::BondBPM(LAMMPS *_lmp) :
|
BondBPM::BondBPM(LAMMPS *_lmp) :
|
||||||
@ -55,6 +69,8 @@ BondBPM::BondBPM(LAMMPS *_lmp) :
|
|||||||
|
|
||||||
id_fix_dummy2 = utils::strdup("BPM_DUMMY2");
|
id_fix_dummy2 = utils::strdup("BPM_DUMMY2");
|
||||||
modify->add_fix(fmt::format("{} all DUMMY ", id_fix_dummy2));
|
modify->add_fix(fmt::format("{} all DUMMY ", id_fix_dummy2));
|
||||||
|
|
||||||
|
if (lmp->citeme) lmp->citeme->add(cite_bpm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -386,7 +386,7 @@ void ComputeStressCartesian::compute_array()
|
|||||||
if (tag[i] > tag[j]) {
|
if (tag[i] > tag[j]) {
|
||||||
if ((tag[i] + tag[j]) % 2 == 0) continue;
|
if ((tag[i] + tag[j]) % 2 == 0) continue;
|
||||||
} else if (tag[i] < tag[j]) {
|
} else if (tag[i] < tag[j]) {
|
||||||
if ((tag[i] < tag[j]) % 2 == 1) continue;
|
if ((tag[i] + tag[j]) % 2 == 1) continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -89,7 +89,7 @@ ComputeStressMop::ComputeStressMop(LAMMPS *lmp, int narg, char **arg) : Compute(
|
|||||||
error->all(FLERR, "Plane for compute stress/mop is out of bounds");
|
error->all(FLERR, "Plane for compute stress/mop is out of bounds");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pos < (domain->boxlo[dir] + domain->prd_half[dir])) {
|
if (pos < (domain->boxlo[dir] + domain->prd_half[dir])) {
|
||||||
pos1 = pos + domain->prd[dir];
|
pos1 = pos + domain->prd[dir];
|
||||||
} else {
|
} else {
|
||||||
pos1 = pos - domain->prd[dir];
|
pos1 = pos - domain->prd[dir];
|
||||||
@ -146,14 +146,14 @@ ComputeStressMop::ComputeStressMop(LAMMPS *lmp, int narg, char **arg) : Compute(
|
|||||||
|
|
||||||
// Error checks:
|
// Error checks:
|
||||||
|
|
||||||
// 3D only
|
|
||||||
|
|
||||||
if (domain->dimension != 3) error->all(FLERR, "Compute stress/mop requires a 3d system");
|
|
||||||
|
|
||||||
// orthogonal simulation box
|
// orthogonal simulation box
|
||||||
if (domain->triclinic != 0)
|
if (domain->triclinic != 0)
|
||||||
error->all(FLERR, "Compute stress/mop is incompatible with triclinic simulation box");
|
error->all(FLERR, "Compute stress/mop is incompatible with triclinic simulation box");
|
||||||
|
|
||||||
|
// 2D and pressure calculation in the Z coordinate
|
||||||
|
if (domain->dimension == 2 && dir == Z)
|
||||||
|
error->all(FLERR, "Compute stress/mop is incompatible with Z in 2d system");
|
||||||
|
|
||||||
// Initialize some variables
|
// Initialize some variables
|
||||||
|
|
||||||
values_local = values_global = vector = nullptr;
|
values_local = values_global = vector = nullptr;
|
||||||
@ -210,10 +210,14 @@ void ComputeStressMop::init()
|
|||||||
|
|
||||||
// Plane area
|
// Plane area
|
||||||
|
|
||||||
area = 1;
|
if (domain->dimension == 3) {
|
||||||
int i;
|
area = 1;
|
||||||
for (i = 0; i < 3; i++) {
|
int i;
|
||||||
if (i != dir) area = area * domain->prd[i];
|
for (i = 0; i < 3; i++) {
|
||||||
|
if (i != dir) area = area * domain->prd[i];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
area = (dir == X) ? domain->prd[1] : domain->prd[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Timestep Value
|
// Timestep Value
|
||||||
@ -404,6 +408,7 @@ void ComputeStressMop::compute_pairs()
|
|||||||
xj[0] = atom->x[j][0];
|
xj[0] = atom->x[j][0];
|
||||||
xj[1] = atom->x[j][1];
|
xj[1] = atom->x[j][1];
|
||||||
xj[2] = atom->x[j][2];
|
xj[2] = atom->x[j][2];
|
||||||
|
|
||||||
delx = xi[0] - xj[0];
|
delx = xi[0] - xj[0];
|
||||||
dely = xi[1] - xj[1];
|
dely = xi[1] - xj[1];
|
||||||
delz = xi[2] - xj[2];
|
delz = xi[2] - xj[2];
|
||||||
@ -420,7 +425,7 @@ void ComputeStressMop::compute_pairs()
|
|||||||
values_local[m + 1] += fpair * (xi[1] - xj[1]) / area * nktv2p;
|
values_local[m + 1] += fpair * (xi[1] - xj[1]) / area * nktv2p;
|
||||||
values_local[m + 2] += fpair * (xi[2] - xj[2]) / area * nktv2p;
|
values_local[m + 2] += fpair * (xi[2] - xj[2]) / area * nktv2p;
|
||||||
} else if (((xi[dir] < pos) && (xj[dir] > pos)) ||
|
} else if (((xi[dir] < pos) && (xj[dir] > pos)) ||
|
||||||
((xi[dir] < pos1) && (xj[dir] > pos1))) {
|
((xi[dir] < pos1) && (xj[dir] > pos1))) {
|
||||||
pair->single(i, j, itype, jtype, rsq, factor_coul, factor_lj, fpair);
|
pair->single(i, j, itype, jtype, rsq, factor_coul, factor_lj, fpair);
|
||||||
values_local[m] -= fpair * (xi[0] - xj[0]) / area * nktv2p;
|
values_local[m] -= fpair * (xi[0] - xj[0]) / area * nktv2p;
|
||||||
values_local[m + 1] -= fpair * (xi[1] - xj[1]) / area * nktv2p;
|
values_local[m + 1] -= fpair * (xi[1] - xj[1]) / area * nktv2p;
|
||||||
|
|||||||
@ -133,8 +133,8 @@ ComputeStressMopProfile::ComputeStressMopProfile(LAMMPS *lmp, int narg, char **a
|
|||||||
|
|
||||||
// 3D only
|
// 3D only
|
||||||
|
|
||||||
if (domain->dimension < 3)
|
if (domain->dimension == 2 && dir == Z)
|
||||||
error->all(FLERR, "Compute stress/mop/profile incompatible with simulation dimension");
|
error->all(FLERR, "Compute stress/mop/profile incompatible with Z in 2d system");
|
||||||
|
|
||||||
// orthogonal simulation box
|
// orthogonal simulation box
|
||||||
|
|
||||||
@ -198,11 +198,14 @@ void ComputeStressMopProfile::init()
|
|||||||
ftm2v = force->ftm2v;
|
ftm2v = force->ftm2v;
|
||||||
|
|
||||||
// plane area
|
// plane area
|
||||||
|
if (domain->dimension == 3) {
|
||||||
area = 1;
|
area = 1;
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
if (i != dir) area = area * domain->prd[i];
|
if (i != dir) area = area * domain->prd[i];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
area = (dir == X) ? domain->prd[1] : domain->prd[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
// timestep Value
|
// timestep Value
|
||||||
|
|||||||
@ -110,6 +110,11 @@ FixDeformPressure::FixDeformPressure(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
}
|
}
|
||||||
set_extra[index].pgain = utils::numeric(FLERR, arg[iarg + 3], false, lmp);
|
set_extra[index].pgain = utils::numeric(FLERR, arg[iarg + 3], false, lmp);
|
||||||
i += 4;
|
i += 4;
|
||||||
|
} else if (strcmp(arg[iarg + 1], "erate/rescale") == 0) {
|
||||||
|
if (iarg + 3 > narg) utils::missing_cmd_args(FLERR, "fix deform/pressure erate/rescale", error);
|
||||||
|
set[index].style = ERATERS;
|
||||||
|
set[index].rate = utils::numeric(FLERR, arg[iarg + 2], false, lmp);
|
||||||
|
i += 3;
|
||||||
} else error->all(FLERR, "Illegal fix deform/pressure command: {}", arg[iarg + 1]);
|
} else error->all(FLERR, "Illegal fix deform/pressure command: {}", arg[iarg + 1]);
|
||||||
|
|
||||||
} else if (strcmp(arg[iarg], "box") == 0) {
|
} else if (strcmp(arg[iarg], "box") == 0) {
|
||||||
@ -424,16 +429,29 @@ void FixDeformPressure::init()
|
|||||||
if (!pressure)
|
if (!pressure)
|
||||||
error->all(FLERR, "Pressure ID {} for fix deform/pressure does not exist", id_press);
|
error->all(FLERR, "Pressure ID {} for fix deform/pressure does not exist", id_press);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if yz [3] changes and will cause box flip, then xy [5] cannot be changing
|
||||||
|
// this is b/c the flips would induce continuous changes in xz
|
||||||
|
// in order to keep the edge vectors of the flipped shape matrix
|
||||||
|
// an integer combination of the edge vectors of the unflipped shape matrix
|
||||||
|
// error if style PRESSURE/ERATEER for yz, can't calculate if box flip occurs
|
||||||
|
|
||||||
|
if (set[3].style && set[5].style) {
|
||||||
|
if (flipflag && set[3].style == PRESSURE)
|
||||||
|
error->all(FLERR, "Fix {} cannot use yz pressure with xy", style);
|
||||||
|
if (flipflag && set[3].style == ERATERS)
|
||||||
|
error->all(FLERR, "Fix {} cannot use yz erate/rescale with xy", style);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
compute T,P if needed before integrator starts
|
compute T,P before integrator starts
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void FixDeformPressure::setup(int /*vflag*/)
|
void FixDeformPressure::setup(int /*vflag*/)
|
||||||
{
|
{
|
||||||
// trigger virial computation on next timestep
|
// trigger virial computation, if needed, on next timestep
|
||||||
if (pressure_flag) pressure->addstep(update->ntimestep+1);
|
if (pressure_flag) pressure->addstep(update->ntimestep + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -446,7 +464,20 @@ void FixDeformPressure::end_of_step()
|
|||||||
|
|
||||||
// set new box size for strain-based dims
|
// set new box size for strain-based dims
|
||||||
|
|
||||||
if (strain_flag) FixDeform::apply_strain();
|
if (strain_flag) {
|
||||||
|
FixDeform::apply_strain();
|
||||||
|
|
||||||
|
for (int i = 3; i < 6; i++) {
|
||||||
|
if (set[i].style == ERATERS) {
|
||||||
|
double L = domain->zprd;
|
||||||
|
if (i == 5) L = domain->yprd;
|
||||||
|
|
||||||
|
h_rate[i] = set[i].rate * L;
|
||||||
|
set_extra[i].cumulative_shift += update->dt * h_rate[i];
|
||||||
|
set[i].tilt_target = set[i].tilt_start + set_extra[i].cumulative_shift;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// set new box size for pressure-based dims
|
// set new box size for pressure-based dims
|
||||||
|
|
||||||
@ -479,12 +510,33 @@ void FixDeformPressure::end_of_step()
|
|||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
set_extra[i].prior_pressure = pressure->vector[i];
|
set_extra[i].prior_pressure = pressure->vector[i];
|
||||||
set_extra[i].prior_rate = ((set[i].hi_target - set[i].lo_target) /
|
set_extra[i].prior_rate = ((set[i].hi_target - set[i].lo_target) /
|
||||||
(domain->boxhi[i] - domain->boxlo[i]) - 1.0) / update->dt;
|
domain->prd[i] - 1.0) / update->dt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (varflag) modify->addstep_compute(update->ntimestep + nevery);
|
if (varflag) modify->addstep_compute(update->ntimestep + nevery);
|
||||||
|
|
||||||
|
// If tilting while evolving linear dimension, sum remapping effects
|
||||||
|
// otherwise, update_domain() will inaccurately use the current
|
||||||
|
// linear dimension to apply prior remappings
|
||||||
|
|
||||||
|
for (int i = 3; i < 6; i++) {
|
||||||
|
int idenom = 0;
|
||||||
|
if (i == 3) idenom = 1;
|
||||||
|
if (set[i].style && (set_box.style || set[idenom].style) && domain->periodicity[idenom]) {
|
||||||
|
// Add prior remappings. If the box remaps this timestep, don't
|
||||||
|
// add it yet so update_domain() will first detect the remapping
|
||||||
|
set[i].tilt_target += set_extra[i].cumulative_remap;
|
||||||
|
|
||||||
|
// Update remapping for next timestep
|
||||||
|
double prd = set[idenom].hi_target - set[idenom].lo_target;
|
||||||
|
double prdinv = 1.0 / prd;
|
||||||
|
if (set[i].tilt_target * prdinv < -0.5)
|
||||||
|
set_extra[i].cumulative_remap += prd;
|
||||||
|
if (set[i].tilt_target * prdinv > 0.5)
|
||||||
|
set_extra[i].cumulative_remap -= prd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FixDeform::update_domain();
|
FixDeform::update_domain();
|
||||||
|
|
||||||
@ -502,7 +554,7 @@ void FixDeformPressure::apply_pressure()
|
|||||||
{
|
{
|
||||||
// If variable pressure, calculate current target
|
// If variable pressure, calculate current target
|
||||||
for (int i = 0; i < 6; i++)
|
for (int i = 0; i < 6; i++)
|
||||||
if (set[i].style == PRESSURE)
|
if (set[i].style == PRESSURE || set[i].style == PMEAN)
|
||||||
if (set_extra[i].pvar_flag)
|
if (set_extra[i].pvar_flag)
|
||||||
set_extra[i].ptarget = input->variable->compute_equal(set_extra[i].pvar);
|
set_extra[i].ptarget = input->variable->compute_equal(set_extra[i].pvar);
|
||||||
|
|
||||||
@ -556,26 +608,24 @@ void FixDeformPressure::apply_pressure()
|
|||||||
|
|
||||||
h_ratelo[i] = -0.5 * h_rate[i];
|
h_ratelo[i] = -0.5 * h_rate[i];
|
||||||
|
|
||||||
double offset = 0.5 * (domain->boxhi[i] - domain->boxlo[i]) * (1.0 + update->dt * h_rate[i]);
|
double shift = domain->prd[i] * update->dt * h_rate[i];
|
||||||
set[i].lo_target = 0.5 * (set[i].lo_start + set[i].hi_start) - offset;
|
set_extra[i].cumulative_shift += shift;
|
||||||
set[i].hi_target = 0.5 * (set[i].lo_start + set[i].hi_start) + offset;
|
set[i].lo_target = set[i].lo_start - 0.5 * set_extra[i].cumulative_shift;
|
||||||
|
set[i].hi_target = set[i].hi_start + 0.5 * set_extra[i].cumulative_shift;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 3; i < 6; i++) {
|
for (int i = 3; i < 6; i++) {
|
||||||
if (set[i].style != PRESSURE) continue;
|
if (set[i].style != PRESSURE) continue;
|
||||||
|
|
||||||
double L, tilt, pcurrent;
|
double L, pcurrent;
|
||||||
if (i == 3) {
|
if (i == 3) {
|
||||||
L = domain->zprd;
|
L = domain->zprd;
|
||||||
tilt = domain->yz;
|
|
||||||
pcurrent = tensor[5];
|
pcurrent = tensor[5];
|
||||||
} else if (i == 4) {
|
} else if (i == 4) {
|
||||||
L = domain->zprd;
|
L = domain->zprd;
|
||||||
tilt = domain->xz + update->dt;
|
|
||||||
pcurrent = tensor[4];
|
pcurrent = tensor[4];
|
||||||
} else {
|
} else {
|
||||||
L = domain->yprd;
|
L = domain->yprd;
|
||||||
tilt = domain->xy;
|
|
||||||
pcurrent = tensor[3];
|
pcurrent = tensor[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -592,7 +642,8 @@ void FixDeformPressure::apply_pressure()
|
|||||||
if (fabs(h_rate[i]) > max_h_rate)
|
if (fabs(h_rate[i]) > max_h_rate)
|
||||||
h_rate[i] = max_h_rate * h_rate[i] / fabs(h_rate[i]);
|
h_rate[i] = max_h_rate * h_rate[i] / fabs(h_rate[i]);
|
||||||
|
|
||||||
set[i].tilt_target = tilt + update->dt * h_rate[i];
|
set_extra[i].cumulative_shift += update->dt * h_rate[i];
|
||||||
|
set[i].tilt_target = set[i].tilt_start + set_extra[i].cumulative_shift;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -629,9 +680,9 @@ void FixDeformPressure::apply_volume()
|
|||||||
double dt = update->dt;
|
double dt = update->dt;
|
||||||
double e1i = set_extra[i].prior_rate;
|
double e1i = set_extra[i].prior_rate;
|
||||||
double e2i = set_extra[fixed].prior_rate;
|
double e2i = set_extra[fixed].prior_rate;
|
||||||
double L1i = domain->boxhi[i] - domain->boxlo[i];
|
double L1i = domain->prd[i];
|
||||||
double L2i = domain->boxhi[fixed] - domain->boxlo[fixed];
|
double L2i = domain->prd[fixed];
|
||||||
double L3i = domain->boxhi[dynamic1] - domain->boxlo[dynamic1];
|
double L3i = domain->prd[dynamic1];
|
||||||
double L3 = (set[dynamic1].hi_target - set[dynamic1].lo_target);
|
double L3 = (set[dynamic1].hi_target - set[dynamic1].lo_target);
|
||||||
double Vi = L1i * L2i * L3i;
|
double Vi = L1i * L2i * L3i;
|
||||||
double V = L3 * L1i * L2i;
|
double V = L3 * L1i * L2i;
|
||||||
@ -680,7 +731,7 @@ void FixDeformPressure::apply_volume()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
h_rate[i] = (2.0 * shift / (domain->boxhi[i] - domain->boxlo[i]) - 1.0) / update->dt;
|
h_rate[i] = (2.0 * shift / domain->prd[i] - 1.0) / update->dt;
|
||||||
h_ratelo[i] = -0.5 * h_rate[i];
|
h_ratelo[i] = -0.5 * h_rate[i];
|
||||||
|
|
||||||
set[i].lo_target = 0.5 * (set[i].lo_start + set[i].hi_start) - shift;
|
set[i].lo_target = 0.5 * (set[i].lo_start + set[i].hi_start) - shift;
|
||||||
@ -742,7 +793,7 @@ void FixDeformPressure::apply_box()
|
|||||||
set[i].hi_target = 0.5 * (set[i].lo_start + set[i].hi_start) + shift;
|
set[i].hi_target = 0.5 * (set[i].lo_start + set[i].hi_start) + shift;
|
||||||
|
|
||||||
// Recalculate h_rate
|
// Recalculate h_rate
|
||||||
h_rate[i] = (set[i].hi_target - set[i].lo_target) / (domain->boxhi[i] - domain->boxlo[i]) - 1.0;
|
h_rate[i] = (set[i].hi_target - set[i].lo_target) / domain->prd[i] - 1.0;
|
||||||
h_rate[i] /= update->dt;
|
h_rate[i] /= update->dt;
|
||||||
h_ratelo[i] = -0.5 * h_rate[i];
|
h_ratelo[i] = -0.5 * h_rate[i];
|
||||||
}
|
}
|
||||||
@ -767,14 +818,21 @@ void FixDeformPressure::apply_box()
|
|||||||
if (fabs(v_rate) > max_h_rate)
|
if (fabs(v_rate) > max_h_rate)
|
||||||
v_rate = max_h_rate * v_rate / fabs(v_rate);
|
v_rate = max_h_rate * v_rate / fabs(v_rate);
|
||||||
|
|
||||||
scale = (1.0 + update->dt * v_rate);
|
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
shift = 0.5 * (set[i].hi_target - set[i].lo_target) * scale;
|
shift = (set[i].hi_target - set[i].lo_target) * update->dt * v_rate;
|
||||||
set[i].lo_target = 0.5 * (set[i].lo_start + set[i].hi_start) - shift;
|
set_extra[6].cumulative_vshift[i] += shift;
|
||||||
set[i].hi_target = 0.5 * (set[i].lo_start + set[i].hi_start) + shift;
|
|
||||||
|
if (set[i].style == NONE) {
|
||||||
|
// Overwrite default targets of current length
|
||||||
|
set[i].lo_target = set[i].lo_start;
|
||||||
|
set[i].hi_target = set[i].hi_start;
|
||||||
|
}
|
||||||
|
|
||||||
|
set[i].lo_target -= 0.5 * set_extra[6].cumulative_vshift[i];
|
||||||
|
set[i].hi_target += 0.5 * set_extra[6].cumulative_vshift[i];
|
||||||
|
|
||||||
// Recalculate h_rate
|
// Recalculate h_rate
|
||||||
h_rate[i] = (set[i].hi_target - set[i].lo_target) / (domain->boxhi[i] - domain->boxlo[i]) - 1.0;
|
h_rate[i] = (set[i].hi_target - set[i].lo_target) / domain->prd[i] - 1.0;
|
||||||
h_rate[i] /= update->dt;
|
h_rate[i] /= update->dt;
|
||||||
h_ratelo[i] = -0.5 * h_rate[i];
|
h_ratelo[i] = -0.5 * h_rate[i];
|
||||||
}
|
}
|
||||||
@ -788,7 +846,7 @@ void FixDeformPressure::apply_box()
|
|||||||
void FixDeformPressure::write_restart(FILE *fp)
|
void FixDeformPressure::write_restart(FILE *fp)
|
||||||
{
|
{
|
||||||
if (comm->me == 0) {
|
if (comm->me == 0) {
|
||||||
int size = 9 * sizeof(double) + 7 * sizeof(Set) + 7 * sizeof(SetExtra);
|
int size = 7 * sizeof(Set) + 7 * sizeof(SetExtra);
|
||||||
fwrite(&size, sizeof(int), 1, fp);
|
fwrite(&size, sizeof(int), 1, fp);
|
||||||
fwrite(set, sizeof(Set), 6, fp);
|
fwrite(set, sizeof(Set), 6, fp);
|
||||||
fwrite(&set_box, sizeof(Set), 1, fp);
|
fwrite(&set_box, sizeof(Set), 1, fp);
|
||||||
@ -803,22 +861,16 @@ void FixDeformPressure::write_restart(FILE *fp)
|
|||||||
void FixDeformPressure::restart(char *buf)
|
void FixDeformPressure::restart(char *buf)
|
||||||
{
|
{
|
||||||
int n = 0;
|
int n = 0;
|
||||||
auto list = (double *) buf;
|
|
||||||
for (int i = 0; i < 6; i++)
|
|
||||||
h_rate[i] = list[n++];
|
|
||||||
for (int i = 0; i < 3; i++)
|
|
||||||
h_ratelo[i] = list[n++];
|
|
||||||
|
|
||||||
n = n * sizeof(double);
|
|
||||||
int samestyle = 1;
|
int samestyle = 1;
|
||||||
Set *set_restart = (Set *) &buf[n];
|
Set *set_restart = (Set *) buf;
|
||||||
for (int i = 0; i < 6; ++i) {
|
for (int i = 0; i < 6; ++i) {
|
||||||
// restore data from initial state
|
// restore data from initial state
|
||||||
set[i].lo_initial = set_restart[i].lo_initial;
|
set[i].lo_initial = set_restart[i].lo_initial;
|
||||||
set[i].hi_initial = set_restart[i].hi_initial;
|
set[i].hi_initial = set_restart[i].hi_initial;
|
||||||
set[i].vol_initial = set_restart[i].vol_initial;
|
set[i].vol_initial = set_restart[i].vol_initial;
|
||||||
set[i].tilt_initial = set_restart[i].tilt_initial;
|
set[i].tilt_initial = set_restart[i].tilt_initial;
|
||||||
// check if style settings are consistent (should do the whole set?)
|
|
||||||
|
// check if style settings are consistent
|
||||||
if (set[i].style != set_restart[i].style)
|
if (set[i].style != set_restart[i].style)
|
||||||
samestyle = 0;
|
samestyle = 0;
|
||||||
if (set[i].substyle != set_restart[i].substyle)
|
if (set[i].substyle != set_restart[i].substyle)
|
||||||
|
|||||||
@ -51,6 +51,9 @@ class FixDeformPressure : public FixDeform {
|
|||||||
struct SetExtra {
|
struct SetExtra {
|
||||||
double ptarget, pgain;
|
double ptarget, pgain;
|
||||||
double prior_pressure, prior_rate;
|
double prior_pressure, prior_rate;
|
||||||
|
double cumulative_shift;
|
||||||
|
double cumulative_vshift[3];
|
||||||
|
double cumulative_remap;
|
||||||
int saved;
|
int saved;
|
||||||
char *pstr;
|
char *pstr;
|
||||||
int pvar, pvar_flag;
|
int pvar, pvar_flag;
|
||||||
|
|||||||
@ -46,6 +46,8 @@ enum { TYPE, RADIUS, CUSTOM };
|
|||||||
enum { INTEGRATED, D2MIN };
|
enum { INTEGRATED, D2MIN };
|
||||||
enum { FIXED, OFFSET, UPDATE };
|
enum { FIXED, OFFSET, UPDATE };
|
||||||
|
|
||||||
|
static constexpr double EPSILON = 1.0e-15;
|
||||||
|
|
||||||
static const char cite_nonaffine_d2min[] =
|
static const char cite_nonaffine_d2min[] =
|
||||||
"@article{PhysRevE.57.7192,\n"
|
"@article{PhysRevE.57.7192,\n"
|
||||||
" title = {Dynamics of viscoplastic deformation in amorphous solids},\n"
|
" title = {Dynamics of viscoplastic deformation in amorphous solids},\n"
|
||||||
@ -66,7 +68,7 @@ static const char cite_nonaffine_d2min[] =
|
|||||||
|
|
||||||
FixNonaffineDisplacement::FixNonaffineDisplacement(LAMMPS *lmp, int narg, char **arg) :
|
FixNonaffineDisplacement::FixNonaffineDisplacement(LAMMPS *lmp, int narg, char **arg) :
|
||||||
Fix(lmp, narg, arg), id_fix(nullptr), fix(nullptr), D2min(nullptr), X(nullptr), Y(nullptr),
|
Fix(lmp, narg, arg), id_fix(nullptr), fix(nullptr), D2min(nullptr), X(nullptr), Y(nullptr),
|
||||||
F(nullptr), norm(nullptr)
|
F(nullptr), norm(nullptr), singular(nullptr)
|
||||||
{
|
{
|
||||||
if (narg < 4) utils::missing_cmd_args(FLERR,"fix nonaffine/displacement", error);
|
if (narg < 4) utils::missing_cmd_args(FLERR,"fix nonaffine/displacement", error);
|
||||||
|
|
||||||
@ -74,6 +76,8 @@ FixNonaffineDisplacement::FixNonaffineDisplacement(LAMMPS *lmp, int narg, char *
|
|||||||
if (nevery <= 0) error->all(FLERR,"Illegal nevery value {} in fix nonaffine/displacement", nevery);
|
if (nevery <= 0) error->all(FLERR,"Illegal nevery value {} in fix nonaffine/displacement", nevery);
|
||||||
|
|
||||||
reference_timestep = update_timestep = offset_timestep = -1;
|
reference_timestep = update_timestep = offset_timestep = -1;
|
||||||
|
z_min = 0;
|
||||||
|
|
||||||
int iarg = 4;
|
int iarg = 4;
|
||||||
if (strcmp(arg[iarg], "integrated") == 0) {
|
if (strcmp(arg[iarg], "integrated") == 0) {
|
||||||
nad_style = INTEGRATED;
|
nad_style = INTEGRATED;
|
||||||
@ -117,6 +121,16 @@ FixNonaffineDisplacement::FixNonaffineDisplacement(LAMMPS *lmp, int narg, char *
|
|||||||
if ((offset_timestep <= 0) || (offset_timestep > nevery))
|
if ((offset_timestep <= 0) || (offset_timestep > nevery))
|
||||||
error->all(FLERR, "Illegal offset timestep {} in fix nonaffine/displacement", arg[iarg + 1]);
|
error->all(FLERR, "Illegal offset timestep {} in fix nonaffine/displacement", arg[iarg + 1]);
|
||||||
} else error->all(FLERR,"Illegal reference style {} in fix nonaffine/displacement", arg[iarg]);
|
} else error->all(FLERR,"Illegal reference style {} in fix nonaffine/displacement", arg[iarg]);
|
||||||
|
iarg += 2;
|
||||||
|
|
||||||
|
while (iarg < narg) {
|
||||||
|
if (strcmp(arg[iarg], "z/min") == 0) {
|
||||||
|
if (iarg + 2 > narg) utils::missing_cmd_args(FLERR,"fix nonaffine/displacement", error);
|
||||||
|
z_min = utils::inumeric(FLERR, arg[iarg + 1], false, lmp);
|
||||||
|
if (z_min < 0) error->all(FLERR, "Minimum coordination must be positive");
|
||||||
|
iarg += 2;
|
||||||
|
} else error->all(FLERR,"Illegal keyword {} in fix nonaffine/displacement", arg[iarg]);
|
||||||
|
}
|
||||||
|
|
||||||
if (nad_style == D2MIN)
|
if (nad_style == D2MIN)
|
||||||
if (cut_style == RADIUS && (!atom->radius_flag))
|
if (cut_style == RADIUS && (!atom->radius_flag))
|
||||||
@ -151,6 +165,7 @@ FixNonaffineDisplacement::~FixNonaffineDisplacement()
|
|||||||
memory->destroy(Y);
|
memory->destroy(Y);
|
||||||
memory->destroy(F);
|
memory->destroy(F);
|
||||||
memory->destroy(norm);
|
memory->destroy(norm);
|
||||||
|
memory->destroy(singular);
|
||||||
memory->destroy(D2min);
|
memory->destroy(D2min);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -395,6 +410,7 @@ void FixNonaffineDisplacement::calculate_D2Min()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
norm[i] = 0;
|
norm[i] = 0;
|
||||||
|
singular[i] = 0;
|
||||||
D2min[i] = 0;
|
D2min[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -471,14 +487,29 @@ void FixNonaffineDisplacement::calculate_D2Min()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dim == 3) {
|
if (dim == 3) {
|
||||||
invert3(Y_tmp, Y_inv);
|
denom = det3(Y_tmp);
|
||||||
|
if (fabs(denom) < EPSILON) {
|
||||||
|
singular[i] = 1;
|
||||||
|
for (j = 0; j < 3; j++)
|
||||||
|
for (k = 0; k < 3; k++)
|
||||||
|
Y_inv[j][k] = 0.0;
|
||||||
|
} else {
|
||||||
|
invert3(Y_tmp, Y_inv);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
denom = Y_tmp[0][0] * Y_tmp[1][1] - Y_tmp[0][1] * Y_tmp[1][0];
|
denom = Y_tmp[0][0] * Y_tmp[1][1] - Y_tmp[0][1] * Y_tmp[1][0];
|
||||||
if (denom != 0.0) denom = 1.0 / denom;
|
if (fabs(denom) < EPSILON) {
|
||||||
Y_inv[0][0] = Y_tmp[1][1] * denom;
|
singular[i] = 1;
|
||||||
Y_inv[0][1] = -Y_tmp[0][1] * denom;
|
for (j = 0; j < 2; j++)
|
||||||
Y_inv[1][0] = -Y_tmp[1][0] * denom;
|
for (k = 0; k < 2; k++)
|
||||||
Y_inv[1][1] = Y_tmp[0][0] * denom;
|
Y_inv[j][k] = 0.0;
|
||||||
|
} else {
|
||||||
|
denom = 1.0 / denom;
|
||||||
|
Y_inv[0][0] = Y_tmp[1][1] * denom;
|
||||||
|
Y_inv[0][1] = -Y_tmp[0][1] * denom;
|
||||||
|
Y_inv[1][0] = -Y_tmp[1][0] * denom;
|
||||||
|
Y_inv[1][1] = Y_tmp[0][0] * denom;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
times3(X_tmp, Y_inv, F_tmp);
|
times3(X_tmp, Y_inv, F_tmp);
|
||||||
@ -559,10 +590,16 @@ void FixNonaffineDisplacement::calculate_D2Min()
|
|||||||
for (i = 0; i < nlocal; i++) {
|
for (i = 0; i < nlocal; i++) {
|
||||||
if (!(mask[i] & groupbit)) continue;
|
if (!(mask[i] & groupbit)) continue;
|
||||||
|
|
||||||
if (norm[i] != 0)
|
if (norm[i] < z_min || singular[i] == 1) {
|
||||||
D2min[i] /= norm[i];
|
if (norm[i] >= z_min)
|
||||||
else
|
error->warning(FLERR, "Singular matrix detected for atom {}, defaulting output to zero", atom->tag[i]);
|
||||||
D2min[i] = 0.0;
|
array_atom[i][0] = 0.0;
|
||||||
|
array_atom[i][1] = 0.0;
|
||||||
|
array_atom[i][2] = 0.0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
D2min[i] /= norm[i];
|
||||||
|
|
||||||
for (j = 0; j < 3; j++)
|
for (j = 0; j < 3; j++)
|
||||||
for (k = 0; k < 3; k++)
|
for (k = 0; k < 3; k++)
|
||||||
@ -743,10 +780,12 @@ void FixNonaffineDisplacement::grow_arrays(int nmax_new)
|
|||||||
memory->destroy(F);
|
memory->destroy(F);
|
||||||
memory->destroy(D2min);
|
memory->destroy(D2min);
|
||||||
memory->destroy(norm);
|
memory->destroy(norm);
|
||||||
|
memory->destroy(singular);
|
||||||
memory->create(X, nmax, 3, 3, "fix_nonaffine_displacement:X");
|
memory->create(X, nmax, 3, 3, "fix_nonaffine_displacement:X");
|
||||||
memory->create(Y, nmax, 3, 3, "fix_nonaffine_displacement:Y");
|
memory->create(Y, nmax, 3, 3, "fix_nonaffine_displacement:Y");
|
||||||
memory->create(F, nmax, 3, 3, "fix_nonaffine_displacement:F");
|
memory->create(F, nmax, 3, 3, "fix_nonaffine_displacement:F");
|
||||||
memory->create(D2min, nmax, "fix_nonaffine_displacement:D2min");
|
memory->create(D2min, nmax, "fix_nonaffine_displacement:D2min");
|
||||||
memory->create(norm, nmax, "fix_nonaffine_displacement:norm");
|
memory->create(norm, nmax, "fix_nonaffine_displacement:norm");
|
||||||
|
memory->create(singular, nmax, "fix_nonaffine_displacement:singular");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,12 +48,12 @@ class FixNonaffineDisplacement : public Fix {
|
|||||||
int nmax, comm_flag;
|
int nmax, comm_flag;
|
||||||
int nad_style, cut_style;
|
int nad_style, cut_style;
|
||||||
int reference_style, offset_timestep, reference_timestep, update_timestep;
|
int reference_style, offset_timestep, reference_timestep, update_timestep;
|
||||||
int reference_saved;
|
int reference_saved, z_min;
|
||||||
double cutoff_custom, cutsq_custom, mycutneigh;
|
double cutoff_custom, cutsq_custom, mycutneigh;
|
||||||
double xprd0, yprd0, zprd0, xprd0_half, yprd0_half, zprd0_half, xy0, xz0, yz0;
|
double xprd0, yprd0, zprd0, xprd0_half, yprd0_half, zprd0_half, xy0, xz0, yz0;
|
||||||
|
|
||||||
double *D2min, ***X, ***Y, ***F;
|
double *D2min, ***X, ***Y, ***F;
|
||||||
int *norm;
|
int *norm, *singular;
|
||||||
|
|
||||||
class NeighList *list; // half neighbor list
|
class NeighList *list; // half neighbor list
|
||||||
|
|
||||||
|
|||||||
@ -46,6 +46,7 @@ FixSpringRG::FixSpringRG(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
|
|
||||||
restart_global = 1;
|
restart_global = 1;
|
||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
|
extscalar = 0;
|
||||||
restart_global = 1;
|
restart_global = 1;
|
||||||
dynamic_group_allow = 1;
|
dynamic_group_allow = 1;
|
||||||
respa_level_support = 1;
|
respa_level_support = 1;
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "comm.h"
|
#include "comm.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "force.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "modify.h"
|
#include "modify.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
@ -127,7 +128,7 @@ void FixHeatFlow::final_integrate()
|
|||||||
if (igroup == atom->firstgroup) nlocal = atom->nfirst;
|
if (igroup == atom->firstgroup) nlocal = atom->nfirst;
|
||||||
|
|
||||||
// add ghost contributions to heatflow if first instance of fix
|
// add ghost contributions to heatflow if first instance of fix
|
||||||
if (first_flag) comm->reverse_comm(this);
|
if (force->newton_pair && first_flag) comm->reverse_comm(this);
|
||||||
|
|
||||||
if (rmass) {
|
if (rmass) {
|
||||||
for (int i = 0; i < nlocal; i++)
|
for (int i = 0; i < nlocal; i++)
|
||||||
|
|||||||
@ -59,6 +59,7 @@ FixPour::FixPour(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
if (lmp->kokkos) error->all(FLERR, "Cannot yet use fix pour with the KOKKOS package");
|
if (lmp->kokkos) error->all(FLERR, "Cannot yet use fix pour with the KOKKOS package");
|
||||||
|
|
||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
|
extscalar = 0;
|
||||||
time_depend = 1;
|
time_depend = 1;
|
||||||
|
|
||||||
if (!atom->radius_flag || !atom->rmass_flag)
|
if (!atom->radius_flag || !atom->rmass_flag)
|
||||||
|
|||||||
@ -16,16 +16,23 @@
|
|||||||
#include "gran_sub_mod_normal.h"
|
#include "gran_sub_mod_normal.h"
|
||||||
#include "granular_model.h"
|
#include "granular_model.h"
|
||||||
#include "math_special.h"
|
#include "math_special.h"
|
||||||
|
#include "math_const.h"
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace Granular_NS;
|
using namespace Granular_NS;
|
||||||
|
using namespace MathConst;
|
||||||
|
|
||||||
using MathSpecial::cube;
|
using MathSpecial::cube;
|
||||||
using MathSpecial::powint;
|
using MathSpecial::powint;
|
||||||
using MathSpecial::square;
|
using MathSpecial::square;
|
||||||
|
|
||||||
|
static constexpr double TWOROOTFIVEBYSIX = 1.82574185835055380345; // 2/sqrt(5/6)
|
||||||
|
static constexpr double ROOTTHREEBYTWO = 1.22474487139158894067; // sqrt(3/2)
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
Default damping model
|
Default damping model
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
@ -141,3 +148,31 @@ double GranSubModDampingTsuji::calculate_forces()
|
|||||||
damp_prefactor = damp * sqrt(sqrt1);
|
damp_prefactor = damp * sqrt(sqrt1);
|
||||||
return -damp_prefactor * gm->vnnr;
|
return -damp_prefactor * gm->vnnr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
Coefficient of restitution damping
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
GranSubModDampingCoeffRestitution::GranSubModDampingCoeffRestitution(GranularModel *gm, LAMMPS *lmp) :
|
||||||
|
GranSubModDamping(gm, lmp)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void GranSubModDampingCoeffRestitution::init()
|
||||||
|
{
|
||||||
|
// Calculate prefactor, assume Hertzian as default
|
||||||
|
double cor = gm->normal_model->get_damp();
|
||||||
|
double logcor = log(cor);
|
||||||
|
if (gm->normal_model->name == "hooke") {
|
||||||
|
damp = -2 * logcor / sqrt(MY_PI * MY_PI + logcor * logcor);
|
||||||
|
} else {
|
||||||
|
damp = -ROOTTHREEBYTWO * TWOROOTFIVEBYSIX * logcor;
|
||||||
|
damp /= sqrt(MY_PI * MY_PI + logcor * logcor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
double GranSubModDampingCoeffRestitution::calculate_forces()
|
||||||
|
{
|
||||||
|
damp_prefactor = damp * sqrt(gm->meff * gm->Fnormal / gm->delta);
|
||||||
|
return -damp_prefactor * gm->vnnr;
|
||||||
|
}
|
||||||
|
|||||||
@ -18,6 +18,7 @@ GranSubModStyle(velocity,GranSubModDampingVelocity,DAMPING);
|
|||||||
GranSubModStyle(mass_velocity,GranSubModDampingMassVelocity,DAMPING);
|
GranSubModStyle(mass_velocity,GranSubModDampingMassVelocity,DAMPING);
|
||||||
GranSubModStyle(viscoelastic,GranSubModDampingViscoelastic,DAMPING);
|
GranSubModStyle(viscoelastic,GranSubModDampingViscoelastic,DAMPING);
|
||||||
GranSubModStyle(tsuji,GranSubModDampingTsuji,DAMPING);
|
GranSubModStyle(tsuji,GranSubModDampingTsuji,DAMPING);
|
||||||
|
GranSubModStyle(coeff_restitution,GranSubModDampingCoeffRestitution,DAMPING);
|
||||||
// clang-format on
|
// clang-format on
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@ -84,6 +85,17 @@ namespace Granular_NS {
|
|||||||
double calculate_forces() override;
|
double calculate_forces() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
class GranSubModDampingCoeffRestitution : public GranSubModDamping {
|
||||||
|
public:
|
||||||
|
GranSubModDampingCoeffRestitution(class GranularModel *, class LAMMPS *);
|
||||||
|
void init() override;
|
||||||
|
double calculate_forces() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
} // namespace Granular_NS
|
} // namespace Granular_NS
|
||||||
} // namespace LAMMPS_NS
|
} // namespace LAMMPS_NS
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ namespace Granular_NS {
|
|||||||
virtual double calculate_contact_radius();
|
virtual double calculate_contact_radius();
|
||||||
virtual double calculate_forces() = 0;
|
virtual double calculate_forces() = 0;
|
||||||
|
|
||||||
double get_cohesive_flag() const { return cohesive_flag; }
|
int get_cohesive_flag() const { return cohesive_flag; }
|
||||||
double get_damp() const { return damp; }
|
double get_damp() const { return damp; }
|
||||||
double get_emod() const { return Emod; }
|
double get_emod() const { return Emod; }
|
||||||
double get_fncrit() const { return Fncrit; }
|
double get_fncrit() const { return Fncrit; }
|
||||||
@ -49,6 +49,7 @@ namespace Granular_NS {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
double damp; // argument historically needed by damping
|
double damp; // argument historically needed by damping
|
||||||
|
// typically (but not always) equals eta_n0
|
||||||
double Emod, poiss;
|
double Emod, poiss;
|
||||||
double Fncrit;
|
double Fncrit;
|
||||||
int material_properties, cohesive_flag;
|
int material_properties, cohesive_flag;
|
||||||
|
|||||||
@ -216,9 +216,15 @@ int GranularModel::define_classic_model(char **arg, int iarg, int narg)
|
|||||||
// manually parse coeffs
|
// manually parse coeffs
|
||||||
normal_model->coeffs[0] = kn;
|
normal_model->coeffs[0] = kn;
|
||||||
normal_model->coeffs[1] = gamman;
|
normal_model->coeffs[1] = gamman;
|
||||||
tangential_model->coeffs[0] = kt;
|
|
||||||
tangential_model->coeffs[1] = gammat / gamman;
|
if (tangential_model->num_coeffs == 2) {
|
||||||
tangential_model->coeffs[2] = xmu;
|
tangential_model->coeffs[0] = gammat / gamman;
|
||||||
|
tangential_model->coeffs[1] = xmu;
|
||||||
|
} else {
|
||||||
|
tangential_model->coeffs[0] = kt;
|
||||||
|
tangential_model->coeffs[1] = gammat / gamman;
|
||||||
|
tangential_model->coeffs[2] = xmu;
|
||||||
|
}
|
||||||
|
|
||||||
normal_model->coeffs_to_local();
|
normal_model->coeffs_to_local();
|
||||||
tangential_model->coeffs_to_local();
|
tangential_model->coeffs_to_local();
|
||||||
|
|||||||
@ -769,7 +769,7 @@ double PairGranular::single(int i, int j, int itype, int jtype,
|
|||||||
|
|
||||||
// apply forces & torques
|
// apply forces & torques
|
||||||
// Calculate normal component, normalized by r
|
// Calculate normal component, normalized by r
|
||||||
fforce = model->Fnormal * model->rinv;
|
fforce = model->Fntot * model->rinv;
|
||||||
|
|
||||||
// set single_extra quantities
|
// set single_extra quantities
|
||||||
svector[0] = model->fs[0];
|
svector[0] = model->fs[0];
|
||||||
|
|||||||
@ -86,6 +86,8 @@ action bond_fene_kokkos.cpp bond_fene.cpp
|
|||||||
action bond_fene_kokkos.h bond_fene.h
|
action bond_fene_kokkos.h bond_fene.h
|
||||||
action bond_harmonic_kokkos.cpp bond_harmonic.cpp
|
action bond_harmonic_kokkos.cpp bond_harmonic.cpp
|
||||||
action bond_harmonic_kokkos.h bond_harmonic.h
|
action bond_harmonic_kokkos.h bond_harmonic.h
|
||||||
|
action bond_hybrid_kokkos.cpp bond_hybrid.cpp
|
||||||
|
action bond_hybrid_kokkos.h bond_hybrid.h
|
||||||
action comm_kokkos.cpp
|
action comm_kokkos.cpp
|
||||||
action comm_kokkos.h
|
action comm_kokkos.h
|
||||||
action comm_tiled_kokkos.cpp
|
action comm_tiled_kokkos.cpp
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user