Merge branch 'develop' into collected-small-changes

This commit is contained in:
Axel Kohlmeyer
2024-02-26 17:14:18 -05:00
35 changed files with 4356 additions and 30 deletions

View File

@ -877,6 +877,9 @@ Bibliography
**(PLUMED)** **(PLUMED)**
G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014) G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014)
**(Pavlov)**
D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Journal of High Performance Computing Applications, 38, 34-49 (2024).
**(Paquay)** **(Paquay)**
Paquay and Kusters, Biophys. J., 110, 6, (2016). preprint available at `arXiv:1411.3019 <https://arxiv.org/abs/1411.3019/>`_. Paquay and Kusters, Biophys. J., 110, 6, (2016). preprint available at `arXiv:1411.3019 <https://arxiv.org/abs/1411.3019/>`_.

View File

@ -263,6 +263,7 @@ OPT.
* :doc:`wall/body/polyhedron <fix_wall_body_polyhedron>` * :doc:`wall/body/polyhedron <fix_wall_body_polyhedron>`
* :doc:`wall/colloid <fix_wall>` * :doc:`wall/colloid <fix_wall>`
* :doc:`wall/ees <fix_wall_ees>` * :doc:`wall/ees <fix_wall_ees>`
* :doc:`wall/flow (k) <fix_wall_flow>`
* :doc:`wall/gran (k) <fix_wall_gran>` * :doc:`wall/gran (k) <fix_wall_gran>`
* :doc:`wall/gran/region <fix_wall_gran_region>` * :doc:`wall/gran/region <fix_wall_gran_region>`
* :doc:`wall/harmonic <fix_wall>` * :doc:`wall/harmonic <fix_wall>`

View File

@ -256,6 +256,7 @@ OPT.
* :doc:`rann <pair_rann>` * :doc:`rann <pair_rann>`
* :doc:`reaxff (ko) <pair_reaxff>` * :doc:`reaxff (ko) <pair_reaxff>`
* :doc:`rebo (io) <pair_airebo>` * :doc:`rebo (io) <pair_airebo>`
* :doc:`rebomos (o) <pair_rebomos>`
* :doc:`resquared (go) <pair_resquared>` * :doc:`resquared (go) <pair_resquared>`
* :doc:`saip/metal (t) <pair_saip_metal>` * :doc:`saip/metal (t) <pair_saip_metal>`
* :doc:`sdpd/taitwater/isothermal <pair_sdpd_taitwater_isothermal>` * :doc:`sdpd/taitwater/isothermal <pair_sdpd_taitwater_isothermal>`

View File

@ -428,6 +428,7 @@ accelerated styles exist.
* :doc:`wall/body/polyhedron <fix_wall_body_polyhedron>` - time integration for body particles of style :doc:`rounded/polyhedron <Howto_body>` * :doc:`wall/body/polyhedron <fix_wall_body_polyhedron>` - time integration for body particles of style :doc:`rounded/polyhedron <Howto_body>`
* :doc:`wall/colloid <fix_wall>` - Lennard-Jones wall interacting with finite-size particles * :doc:`wall/colloid <fix_wall>` - Lennard-Jones wall interacting with finite-size particles
* :doc:`wall/ees <fix_wall_ees>` - wall for ellipsoidal particles * :doc:`wall/ees <fix_wall_ees>` - wall for ellipsoidal particles
* :doc:`wall/flow <fix_wall_flow>` - flow boundary conditions
* :doc:`wall/gran <fix_wall_gran>` - frictional wall(s) for granular simulations * :doc:`wall/gran <fix_wall_gran>` - frictional wall(s) for granular simulations
* :doc:`wall/gran/region <fix_wall_gran_region>` - :doc:`fix wall/region <fix_wall_region>` equivalent for use with granular particles * :doc:`wall/gran/region <fix_wall_gran_region>` - :doc:`fix wall/region <fix_wall_region>` equivalent for use with granular particles
* :doc:`wall/harmonic <fix_wall>` - harmonic spring wall * :doc:`wall/harmonic <fix_wall>` - harmonic spring wall

175
doc/src/fix_wall_flow.rst Normal file
View File

@ -0,0 +1,175 @@
.. index:: fix wall/flow
.. index:: fix wall/flow/kk
fix wall/flow command
=====================
Accelerator Variants: *wall/flow/kk*
Syntax
""""""
.. code-block:: LAMMPS
fix ID group-ID wall/flow axis vflow T seed N coords ... keyword value
* ID, group-ID are documented in :doc:`fix <fix>` command
* wall/flow = style name of this fix command
* axis = flow axis (*x*, *y*, or *z*)
* vflow = generated flow velocity in *axis* direction (velocity units)
* T = flow temperature (temperature units)
* seed = random seed for stochasticity (positive integer)
* N = number of walls
* coords = list of N wall positions along the *axis* direction in ascending order (distance units)
* zero or more keyword/value pairs may be appended
* keyword = *units*
.. parsed-literal::
*units* value = *lattice* or *box*
*lattice* = wall positions are defined in lattice units
*box* = the wall positions are defined in simulation box units
Examples
""""""""
.. code-block:: LAMMPS
fix 1 all wall/flow x 0.4 1.5 593894 4 2.0 4.0 6.0 8.0
Description
"""""""""""
.. versionadded:: TBD
This fix implements flow boundary conditions (FBC) introduced in
:ref:`(Pavlov1) <fbc-Pavlov1>` and :ref:`(Pavlov2) <fbc-Pavlov2>`.
The goal is to generate a stationary flow with a shifted Maxwell
velocity distribution:
.. math::
f_a(v_a) \propto \exp{\left(-\frac{m (v_a-v_{\text{flow}})^2}{2 kB T}\right)}
where :math:`v_a` is the component of velocity along the specified
*axis* argument (a = x,y,z), :math:`v_{\text{flow}}` is the flow
velocity specified as the *vflow* argument, *T* is the specified flow
temperature, *m* is the particle mass, and *kB* is the Boltzmann
constant.
This is achieved by defining a series of *N* transparent walls along
the flow *axis* direction. Each wall is at the specified position
listed in the *coords* argument. Note that an additional transparent
wall is defined by the code at the boundary of the (periodic)
simulation domain in the *axis* direction. So there are effectively
N+1 walls.
Each time a particle in the specified group passes through one of the
transparent walls, its velocity is re-assigned. Particles not in the
group do not interact with the wall. This can be used, for example, to
add obstacles composed of atoms, or to simulate a solution of complex
molecules in a one-atom liquid (note that the fix has been tested for
one-atom systems only).
Conceptually, the velocity re-assignment represents creation of a new
particle within the system with simultaneous removal of the particle
which passed through the wall. The velocity components in directions
parallel to the wall are re-assigned according to the standard Maxwell
velocity distribution for the specified temperature *T*. The velocity
component perpendicular to the wall is re-assigned according to the
shifted Maxwell distribution defined above:
.. math::
f_{\text{a generated}}(v_a) \propto v_a f_a(v_a)
It can be shown that for an ideal-gas scenario this procedure makes
the velocity distribution of particles between walls exactly as
desired.
Since in most cases simulated systems are not an ideal gas, multiple
walls can be defined, since a single wall may not be sufficient for
maintaining a stationary flow without "congestion" which can manifest
itself as regions in the flow with increased particle density located
upstream from static obstacles.
For the same reason, the actual temperature and velocity of the
generated flow may differ from what is requested. The degree of
discrepancy is determined by how different from an ideal gas the
simulated system is. Therefore, a calibration procedure may be
required for such a system as described in :ref:`(Pavlov)
<fbc-Pavlov2>`.
Note that the interactions between particles on different sides of a
transparent wall are not disabled or neglected. Likewise particle
positions are not altered by the velocity reassignment. This removes
the need to modify the force field to work correctly in cases when a
particle is close to a wall.
For example, if particle positions were uniformly redistributed across
the surface of a wall, two particles could end up too close to each
other, potentially causing the simulation to explode. However due to
this compromise, some collective phenomena such as regions with
increased/decreased density or collective movements are not fully
removed when particles cross a wall. This unwanted consequence can
also be potentially mitigated by using more multiple walls.
.. note::
When the specified flow has a high velocity, a lost atoms error can
occur (see :doc:`error messages <Errors_messages>`). If this
happens, you should ensure the checks for neighbor list rebuilds,
set via the :doc:`neigh_modify <neigh_modify>` command, are as
conservative as possible (every timestep if needed). Those are the
default settings.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files
<restart>`.
None of the :doc:`fix_modify <fix_modify>` options are relevant to
this fix.
No global or per-atom quantities are stored by this fix for access by
various :doc:`output commands <Howto_output>`.
No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command.
This fix is not invoked during :doc:`energy minimization <minimize>`.
Restrictions
""""""""""""
Fix *wall_flow* 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.
Flow boundary conditions should not be used with rigid bodies such as
those defined by a "fix rigid" command.
This fix can only be used with periodic boundary conditions along the
flow axis. The size of the box in this direction must not change. Also,
the fix is designed to work only in an orthogonal simulation box.
Related commands
""""""""""""""""
:doc:`fix wall/reflect <fix_wall>` command
Default
"""""""
The default for the units keyword is lattice.
----------
.. _fbc-Pavlov1:
**(Pavlov1)** Pavlov, Kolotinskii, Stegailov, "GPU-Based Molecular Dynamics of Turbulent Liquid Flows with OpenMM", Proceedings of PPAM-2022, LNCS (Springer), vol. 13826, pp. 346-358 (2023)
.. _fbc-Pavlov2:
**(Pavlov2)** Pavlov, Galigerov, Kolotinskii, Nikolskiy, Stegailov, "GPU-based Molecular Dynamics of Fluid Flows: Reaching for Turbulence", Int. J. High Perf. Comp. Appl., (2024)

150
doc/src/pair_rebomos.rst Normal file
View File

@ -0,0 +1,150 @@
.. index:: pair_style rebomos
.. index:: pair_style rebomos/omp
pair_style rebomos command
==========================
Accelerator Variants: *rebomos/omp*
Syntax
""""""
.. code-block:: LAMMPS
pair_style rebomos
* rebomos = name of this pair style
Examples
""""""""
.. code-block:: LAMMPS
pair_style rebomos
pair_coeff * * ../potentials/MoS.rebomos Mo S
Example input scripts available: examples/threebody/
Description
"""""""""""
.. versionadded:: TBD
The *rebomos* pair style computes the interactions between molybdenum
and sulfur atoms :ref:`(Stewart) <Stewart>` utilizing an adaptive
interatomic reactive empirical bond order potential that is similar in
form to the AIREBO potential :ref:`(Stuart) <Stuart2>`. The potential
is based on an earlier parameterizations for :math:`\text{MoS}_2`
developed by :ref:`(Liang) <Liang>`.
The REBOMoS potential consists of two terms:
.. math::
E & = \frac{1}{2} \sum_i \sum_{j \neq i}
\left[ E^{\text{REBO}}_{ij} + E^{\text{LJ}}_{ij} \right] \\
The :math:`E^{\text{REBO}}` term describes the covalently bonded
interactions between Mo and S atoms while the :math:`E^{\text{LJ}}` term
describes longer range dispersion forces between layers. A cubic spline
function is applied to smoothly switch between covalent bonding at short
distances to dispersion interactions at longer distances. This allows
the model to capture bond formation and breaking events which may occur
between adjacent MoS2 layers, edges, defects, and more.
----------
Only a single pair_coeff command is used with the *rebomos* pair style
which specifies an REBOMoS potential file with parameters for Mo and S.
These are mapped to LAMMPS atom types by specifying N additional
arguments after the filename in the pair_coeff command, where N is the
number of LAMMPS atom types:
* filename
* :math:`N` element names = mapping of REBOMoS elements to atom types
See the :doc:`pair_coeff <pair_coeff>` page for alternate ways
to specify the path for the potential file.
As an example, if your LAMMPS simulation has three atom types and you want
the first two to be Mo, and the third to be S, you would use the following
pair_coeff command:
.. code-block:: LAMMPS
pair_coeff * * MoS.rebomos Mo Mo S
The first 2 arguments must be \* \* so as to span all LAMMPS atom types.
The first two Mo arguments map LAMMPS atom types 1 and 2 to the Mo
element in the REBOMoS file. The final S argument maps LAMMPS atom type
3 to the S element in the REBOMoS file. If a mapping value is specified
as NULL, the mapping is not performed. This can be used when a
*rebomos* potential is used as part of the *hybrid* pair style. The
NULL values are placeholders for atom types that will be used with other
potentials.
----------
.. include:: accel_styles.rst
----------
Mixing, shift, table, tail correction, restart, rRESPA info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
This pair style does not support the :doc:`pair_modify <pair_modify>`
mix, shift, table, and tail options.
This pair style does not write their information to :doc:`binary restart
files <restart>`, since it is stored in potential files. Thus, you need
to re-specify the pair_style and pair_coeff commands in an input script
that reads a restart file.
This pair styles can only be used via the *pair* keyword of the
:doc:`run_style respa <run_style>` command. It does not support the
*inner*, *middle*, *outer* keywords.
Restrictions
""""""""""""
This pair style is part of the MANYBODY package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
These pair potentials require the :doc:`newton <newton>` setting to be
"on" for pair interactions.
The MoS.rebomos potential file provided with LAMMPS (see the potentials
directory) is parameterized for metal :doc:`units <units>`. You can use
the *rebomos* pair style with any LAMMPS units setting, but you would
need to create your own REBOMoS potential file with coefficients listed
in the appropriate units.
The pair style provided here **only** supports potential files parameterized
for the elements molybdenum and sulfur (designated with "Mo" and "S" in the
*pair_coeff* command. Using potential files for other elements will trigger
an error.
Related commands
""""""""""""""""
:doc:`pair_coeff <pair_coeff>`, :doc:`pair style rebo <pair_airebo>`
Default
"""""""
none
----------
.. _Stewart:
**(Steward)** Stewart, Spearot, Modelling Simul. Mater. Sci. Eng. 21, 045003, (2013).
.. _Stuart2:
**(Stuart)** Stuart, Tutein, Harrison, J Chem Phys, 112, 6472-6486, (2000).
.. _Liang:
**(Liang)** Liang, Phillpot, Sinnott Phys. Rev. B79 245110, (2009), Erratum: Phys. Rev. B85 199903(E), (2012)

View File

@ -333,6 +333,7 @@ accelerated styles exist.
* :doc:`rann <pair_rann>` - * :doc:`rann <pair_rann>` -
* :doc:`reaxff <pair_reaxff>` - ReaxFF potential * :doc:`reaxff <pair_reaxff>` - ReaxFF potential
* :doc:`rebo <pair_airebo>` - second generation REBO potential of Brenner * :doc:`rebo <pair_airebo>` - second generation REBO potential of Brenner
* :doc:`rebomos <pair_rebomos>` - REBOMoS potential for MoS2
* :doc:`resquared <pair_resquared>` - Everaers RE-Squared ellipsoidal potential * :doc:`resquared <pair_resquared>` - Everaers RE-Squared ellipsoidal potential
* :doc:`saip/metal <pair_saip_metal>` - interlayer potential for hetero-junctions formed with hexagonal 2D materials and metal surfaces * :doc:`saip/metal <pair_saip_metal>` - interlayer potential for hetero-junctions formed with hexagonal 2D materials and metal surfaces
* :doc:`sdpd/taitwater/isothermal <pair_sdpd_taitwater_isothermal>` - smoothed dissipative particle dynamics for water at isothermal conditions * :doc:`sdpd/taitwater/isothermal <pair_sdpd_taitwater_isothermal>` - smoothed dissipative particle dynamics for water at isothermal conditions

View File

@ -1770,6 +1770,7 @@ Kolafa
Kollman Kollman
kolmogorov kolmogorov
Kolmogorov Kolmogorov
Kolotinskii
Kondor Kondor
konglt konglt
Koning Koning
@ -2266,6 +2267,7 @@ morris
Morriss Morriss
morse morse
Morteza Morteza
MoS
Mosayebi Mosayebi
Moseler Moseler
Moskalev Moskalev
@ -2774,6 +2776,7 @@ PEigenDense
Peng Peng
peptide peptide
peratom peratom
Perf
Pergamon Pergamon
pergrid pergrid
peri peri
@ -3070,6 +3073,7 @@ reaxff
ReaxFF ReaxFF
REAXFF REAXFF
rebo rebo
rebomos
recurse recurse
recursing recursing
Ree Ree
@ -3597,6 +3601,7 @@ tesselation
tesselations tesselations
Tetot Tetot
tex tex
textrm
tfac tfac
tfmc tfmc
tfMC tfMC
@ -3884,7 +3889,9 @@ Verlet
versa versa
Verstraelen Verstraelen
ves ves
vf
vflag vflag
vflow
vfrac vfrac
vhi vhi
vibrational vibrational

View File

@ -0,0 +1 @@
../../potentials/MoS.rebomos

View File

@ -0,0 +1,35 @@
units metal
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 &
a2 -1.5964590311 2.7651481541 0.0000000000 &
a3 0.0000000000 0.0000000000 13.9827680588 &
basis 0.0000000000 0.000000000 $(3.0/4.0) &
basis 0.0000000000 0.000000000 $(1.0/4.0) &
basis $(2.0/3.0) $(1.0/3.0) 0.862008989 &
basis $(1.0/3.0) $(2.0/3.0) 0.137990996 &
basis $(1.0/3.0) $(2.0/3.0) 0.362008989 &
basis $(2.0/3.0) $(1.0/3.0) 0.637991011 &
origin 0.1 0.1 0.1
region box prism 0 4 0 8 0 1 -2.0 0.0 0.0
create_box 2 box
create_atoms 2 box &
basis 1 1 &
basis 2 1 &
basis 3 2 &
basis 4 2 &
basis 5 2 &
basis 6 2
mass 1 95.95 #Mo
mass 2 32.065 #S
pair_style rebomos
pair_coeff * * MoS.rebomos Mo S
thermo_style custom step temp press pe ke cellgamma vol
thermo 10
#dump 1 all atom 10 MoS.lammpstrj
fix 1 all nve
run 20

View File

@ -0,0 +1,31 @@
# monolayer MoS2
units metal
boundary p p f
processors * * 1
atom_modify map array
atom_style atomic
read_data single_layer_MoS2.data
mass * 32.065 # mass of sulphur atom , uint: a.u.=1.66X10^(-27)kg
mass 1 95.94 # mass of molebdenum atom , uint: a.u.=1.66X10^(-27)kg
########################## Define potentials ################################
pair_style rebomos
pair_coeff * * MoS.rebomos Mo S S
#########################################################################
### Simulation settings ####
timestep 0.001
velocity all create 300.0 12345 loop geom
############################
# Output
thermo 500
thermo_style custom step etotal pe ke temp
thermo_modify lost warn
###### Run molecular dynamics ######
fix thermostat all nve
run 5000

View File

@ -0,0 +1,85 @@
LAMMPS (7 Feb 2024 - Development - patch_7Feb2024_update1-73-g36fa601fe0)
using 1 OpenMP thread(s) per MPI task
units metal
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 $(3.0/4.0) basis 0.0000000000 0.000000000 $(1.0/4.0) basis $(2.0/3.0) $(1.0/3.0) 0.862008989 basis $(1.0/3.0) $(2.0/3.0) 0.137990996 basis $(1.0/3.0) $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 $(1.0/4.0) basis $(2.0/3.0) $(1.0/3.0) 0.862008989 basis $(1.0/3.0) $(2.0/3.0) 0.137990996 basis $(1.0/3.0) $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis $(2.0/3.0) $(1.0/3.0) 0.862008989 basis $(1.0/3.0) $(2.0/3.0) 0.137990996 basis $(1.0/3.0) $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 $(1.0/3.0) 0.862008989 basis $(1.0/3.0) $(2.0/3.0) 0.137990996 basis $(1.0/3.0) $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 0.33333333333333331483 0.862008989 basis $(1.0/3.0) $(2.0/3.0) 0.137990996 basis $(1.0/3.0) $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 0.33333333333333331483 0.862008989 basis 0.33333333333333331483 $(2.0/3.0) 0.137990996 basis $(1.0/3.0) $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 0.33333333333333331483 0.862008989 basis 0.33333333333333331483 0.66666666666666662966 0.137990996 basis $(1.0/3.0) $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 0.33333333333333331483 0.862008989 basis 0.33333333333333331483 0.66666666666666662966 0.137990996 basis 0.33333333333333331483 $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 0.33333333333333331483 0.862008989 basis 0.33333333333333331483 0.66666666666666662966 0.137990996 basis 0.33333333333333331483 0.66666666666666662966 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 0.33333333333333331483 0.862008989 basis 0.33333333333333331483 0.66666666666666662966 0.137990996 basis 0.33333333333333331483 0.66666666666666662966 0.362008989 basis 0.66666666666666662966 $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 0.33333333333333331483 0.862008989 basis 0.33333333333333331483 0.66666666666666662966 0.137990996 basis 0.33333333333333331483 0.66666666666666662966 0.362008989 basis 0.66666666666666662966 0.33333333333333331483 0.637991011 origin 0.1 0.1 0.1
Lattice spacing in x,y,z = 4.7867748 2.7651482 13.982768
region box prism 0 4 0 8 0 1 -2.0 0.0 0.0
create_box 2 box
Created triclinic box = (0 0 0) to (19.147099 22.121185 13.982768) with tilt (-9.5735495 0 0)
1 by 1 by 1 MPI processor grid
create_atoms 2 box basis 1 1 basis 2 1 basis 3 2 basis 4 2 basis 5 2 basis 6 2
Created 288 atoms
using lattice units in triclinic box = (0 0 0) to (19.147099 22.121185 13.982768) with tilt (-9.5735495 0 0)
create_atoms CPU = 0.000 seconds
mass 1 95.95 #Mo
mass 2 32.065 #S
pair_style rebomos
pair_coeff * * MoS.rebomos Mo S
Reading rebomos potential file MoS.rebomos with DATE: 2013-11-04
thermo_style custom step temp press pe ke cellgamma vol
thermo 10
#dump 1 all atom 10 MoS.lammpstrj
fix 1 all nve
run 20
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 13.4
ghost atom cutoff = 13.4
binsize = 6.7, bins = 5 4 3
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair rebomos, perpetual
attributes: full, newton on, ghost
pair build: full/bin/ghost
stencil: full/ghost/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 4.996 | 4.996 | 4.996 Mbytes
Step Temp Press PotEng KinEng CellGamma Volume
0 0 28799.53 -2061.6112 0 113.40187 5922.4926
10 80.776057 13540.088 -2064.6132 2.9966028 113.40187 5922.4926
20 146.17503 -20669.371 -2067.0428 5.4227518 113.40187 5922.4926
Loop time of 0.058071 on 1 procs for 20 steps with 288 atoms
Performance: 29.757 ns/day, 0.807 hours/ns, 344.406 timesteps/s, 99.189 katom-step/s
99.8% 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.057666 | 0.057666 | 0.057666 | 0.0 | 99.30
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.00024654 | 0.00024654 | 0.00024654 | 0.0 | 0.42
Output | 2.3975e-05 | 2.3975e-05 | 2.3975e-05 | 0.0 | 0.04
Modify | 3.8394e-05 | 3.8394e-05 | 3.8394e-05 | 0.0 | 0.07
Other | | 9.596e-05 | | | 0.17
Nlocal: 288 ave 288 max 288 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 4285 ave 4285 max 4285 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
FullNghs: 142848 ave 142848 max 142848 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 142848
Ave neighs/atom = 496
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:00

View File

@ -0,0 +1,85 @@
LAMMPS (7 Feb 2024 - Development - patch_7Feb2024_update1-73-g36fa601fe0)
using 1 OpenMP thread(s) per MPI task
units metal
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 $(3.0/4.0) basis 0.0000000000 0.000000000 $(1.0/4.0) basis $(2.0/3.0) $(1.0/3.0) 0.862008989 basis $(1.0/3.0) $(2.0/3.0) 0.137990996 basis $(1.0/3.0) $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 $(1.0/4.0) basis $(2.0/3.0) $(1.0/3.0) 0.862008989 basis $(1.0/3.0) $(2.0/3.0) 0.137990996 basis $(1.0/3.0) $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis $(2.0/3.0) $(1.0/3.0) 0.862008989 basis $(1.0/3.0) $(2.0/3.0) 0.137990996 basis $(1.0/3.0) $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 $(1.0/3.0) 0.862008989 basis $(1.0/3.0) $(2.0/3.0) 0.137990996 basis $(1.0/3.0) $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 0.33333333333333331483 0.862008989 basis $(1.0/3.0) $(2.0/3.0) 0.137990996 basis $(1.0/3.0) $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 0.33333333333333331483 0.862008989 basis 0.33333333333333331483 $(2.0/3.0) 0.137990996 basis $(1.0/3.0) $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 0.33333333333333331483 0.862008989 basis 0.33333333333333331483 0.66666666666666662966 0.137990996 basis $(1.0/3.0) $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 0.33333333333333331483 0.862008989 basis 0.33333333333333331483 0.66666666666666662966 0.137990996 basis 0.33333333333333331483 $(2.0/3.0) 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 0.33333333333333331483 0.862008989 basis 0.33333333333333331483 0.66666666666666662966 0.137990996 basis 0.33333333333333331483 0.66666666666666662966 0.362008989 basis $(2.0/3.0) $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 0.33333333333333331483 0.862008989 basis 0.33333333333333331483 0.66666666666666662966 0.137990996 basis 0.33333333333333331483 0.66666666666666662966 0.362008989 basis 0.66666666666666662966 $(1.0/3.0) 0.637991011 origin 0.1 0.1 0.1
lattice custom 1.0 a1 3.1903157234 0.0000000000 0.0000000000 a2 -1.5964590311 2.7651481541 0.0000000000 a3 0.0000000000 0.0000000000 13.9827680588 basis 0.0000000000 0.000000000 0.75 basis 0.0000000000 0.000000000 0.25 basis 0.66666666666666662966 0.33333333333333331483 0.862008989 basis 0.33333333333333331483 0.66666666666666662966 0.137990996 basis 0.33333333333333331483 0.66666666666666662966 0.362008989 basis 0.66666666666666662966 0.33333333333333331483 0.637991011 origin 0.1 0.1 0.1
Lattice spacing in x,y,z = 4.7867748 2.7651482 13.982768
region box prism 0 4 0 8 0 1 -2.0 0.0 0.0
create_box 2 box
Created triclinic box = (0 0 0) to (19.147099 22.121185 13.982768) with tilt (-9.5735495 0 0)
2 by 2 by 1 MPI processor grid
create_atoms 2 box basis 1 1 basis 2 1 basis 3 2 basis 4 2 basis 5 2 basis 6 2
Created 288 atoms
using lattice units in triclinic box = (0 0 0) to (19.147099 22.121185 13.982768) with tilt (-9.5735495 0 0)
create_atoms CPU = 0.000 seconds
mass 1 95.95 #Mo
mass 2 32.065 #S
pair_style rebomos
pair_coeff * * MoS.rebomos Mo S
Reading rebomos potential file MoS.rebomos with DATE: 2013-11-04
thermo_style custom step temp press pe ke cellgamma vol
thermo 10
#dump 1 all atom 10 MoS.lammpstrj
fix 1 all nve
run 20
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 13.4
ghost atom cutoff = 13.4
binsize = 6.7, bins = 5 4 3
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair rebomos, perpetual
attributes: full, newton on, ghost
pair build: full/bin/ghost
stencil: full/ghost/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 4.15 | 4.151 | 4.151 Mbytes
Step Temp Press PotEng KinEng CellGamma Volume
0 0 28799.53 -2061.6112 0 113.40187 5922.4926
10 80.776057 13540.088 -2064.6132 2.9966028 113.40187 5922.4926
20 146.17503 -20669.371 -2067.0428 5.4227518 113.40187 5922.4926
Loop time of 0.0219485 on 4 procs for 20 steps with 288 atoms
Performance: 78.730 ns/day, 0.305 hours/ns, 911.225 timesteps/s, 262.433 katom-step/s
96.3% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.018118 | 0.019372 | 0.020087 | 0.5 | 88.26
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.0015635 | 0.0023195 | 0.0035967 | 1.6 | 10.57
Output | 2.5017e-05 | 4.6834e-05 | 0.00010543 | 0.0 | 0.21
Modify | 1.3954e-05 | 1.423e-05 | 1.4594e-05 | 0.0 | 0.06
Other | | 0.0001957 | | | 0.89
Nlocal: 72 ave 72 max 72 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Nghost: 2771.5 ave 2775 max 2768 min
Histogram: 2 0 0 0 0 0 0 0 0 2
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
FullNghs: 35712 ave 35712 max 35712 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Total # of neighbors = 142848
Ave neighs/atom = 496
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:00

View File

@ -0,0 +1,95 @@
LAMMPS (7 Feb 2024 - Development - patch_7Feb2024_update1-73-g36fa601fe0)
using 1 OpenMP thread(s) per MPI task
# monolayer MoS2
units metal
boundary p p f
processors * * 1
atom_modify map array
atom_style atomic
read_data single_layer_MoS2.data
Reading data file ...
triclinic box = (0 0 -100) to (51.15232 44.299209 100) with tilt (25.57616 0 0)
WARNING: Triclinic box skew is large. LAMMPS will run inefficiently. (src/domain.cpp:219)
1 by 1 by 1 MPI processor grid
reading atoms ...
768 atoms
read_data CPU = 0.002 seconds
mass * 32.065 # mass of sulphur atom , uint: a.u.=1.66X10^(-27)kg
mass 1 95.94 # mass of molebdenum atom , uint: a.u.=1.66X10^(-27)kg
########################## Define potentials ################################
pair_style rebomos
pair_coeff * * MoS.rebomos Mo S S
Reading rebomos potential file MoS.rebomos with DATE: 2013-11-04
#########################################################################
### Simulation settings ####
timestep 0.001
velocity all create 300.0 12345 loop geom
############################
# Output
thermo 500
thermo_style custom step etotal pe ke temp
thermo_modify lost warn
###### Run molecular dynamics ######
fix thermostat all nve
run 5000
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 13.4
ghost atom cutoff = 13.4
binsize = 6.7, bins = 12 7 30
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair rebomos, perpetual
attributes: full, newton on, ghost
pair build: full/bin/ghost
stencil: full/ghost/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 4.473 | 4.473 | 4.473 Mbytes
Step TotEng PotEng KinEng Temp
0 -5466.9785 -5496.7212 29.742759 300
500 -5466.964 -5482.6985 15.734505 158.7059
1000 -5466.9615 -5480.9492 13.98763 141.08607
1500 -5466.964 -5482.6912 15.727258 158.63281
2000 -5466.9657 -5483.3606 16.394878 165.36675
2500 -5466.9624 -5481.6253 14.662948 147.89765
3000 -5466.9642 -5482.7515 15.7873 159.23842
3500 -5466.9654 -5483.3789 16.413502 165.5546
4000 -5466.9628 -5481.848 14.885236 150.13977
4500 -5466.9648 -5483.5045 16.539775 166.82825
5000 -5466.9649 -5483.4932 16.528298 166.71249
Loop time of 19.1009 on 1 procs for 5000 steps with 768 atoms
Performance: 22.617 ns/day, 1.061 hours/ns, 261.768 timesteps/s, 201.038 katom-step/s
99.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 | 19.042 | 19.042 | 19.042 | 0.0 | 99.69
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.018451 | 0.018451 | 0.018451 | 0.0 | 0.10
Output | 0.00015575 | 0.00015575 | 0.00015575 | 0.0 | 0.00
Modify | 0.023931 | 0.023931 | 0.023931 | 0.0 | 0.13
Other | | 0.01658 | | | 0.09
Nlocal: 768 ave 768 max 768 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 1158 ave 1158 max 1158 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
FullNghs: 141824 ave 141824 max 141824 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 141824
Ave neighs/atom = 184.66667
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:19

View File

@ -0,0 +1,95 @@
LAMMPS (7 Feb 2024 - Development - patch_7Feb2024_update1-73-g36fa601fe0)
using 1 OpenMP thread(s) per MPI task
# monolayer MoS2
units metal
boundary p p f
processors * * 1
atom_modify map array
atom_style atomic
read_data single_layer_MoS2.data
Reading data file ...
triclinic box = (0 0 -100) to (51.15232 44.299209 100) with tilt (25.57616 0 0)
WARNING: Triclinic box skew is large. LAMMPS will run inefficiently. (src/domain.cpp:219)
2 by 2 by 1 MPI processor grid
reading atoms ...
768 atoms
read_data CPU = 0.002 seconds
mass * 32.065 # mass of sulphur atom , uint: a.u.=1.66X10^(-27)kg
mass 1 95.94 # mass of molebdenum atom , uint: a.u.=1.66X10^(-27)kg
########################## Define potentials ################################
pair_style rebomos
pair_coeff * * MoS.rebomos Mo S S
Reading rebomos potential file MoS.rebomos with DATE: 2013-11-04
#########################################################################
### Simulation settings ####
timestep 0.001
velocity all create 300.0 12345 loop geom
############################
# Output
thermo 500
thermo_style custom step etotal pe ke temp
thermo_modify lost warn
###### Run molecular dynamics ######
fix thermostat all nve
run 5000
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 13.4
ghost atom cutoff = 13.4
binsize = 6.7, bins = 12 7 30
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair rebomos, perpetual
attributes: full, newton on, ghost
pair build: full/bin/ghost
stencil: full/ghost/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 4.045 | 4.045 | 4.045 Mbytes
Step TotEng PotEng KinEng Temp
0 -5466.9785 -5496.7212 29.742759 300
500 -5466.964 -5482.6985 15.734505 158.7059
1000 -5466.9615 -5480.9492 13.98763 141.08607
1500 -5466.964 -5482.6912 15.727258 158.63281
2000 -5466.9657 -5483.3606 16.394878 165.36675
2500 -5466.9624 -5481.6253 14.662948 147.89765
3000 -5466.9642 -5482.7515 15.7873 159.23842
3500 -5466.9654 -5483.3789 16.413502 165.5546
4000 -5466.9628 -5481.848 14.885236 150.13977
4500 -5466.9648 -5483.5045 16.539775 166.82825
5000 -5466.9649 -5483.4932 16.528298 166.71249
Loop time of 5.69326 on 4 procs for 5000 steps with 768 atoms
Performance: 75.879 ns/day, 0.316 hours/ns, 878.231 timesteps/s, 674.482 katom-step/s
98.6% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 5.2611 | 5.3666 | 5.4358 | 3.0 | 94.26
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.23476 | 0.30106 | 0.40642 | 12.8 | 5.29
Output | 0.00014996 | 0.0004478 | 0.0013353 | 0.0 | 0.01
Modify | 0.0068861 | 0.0069917 | 0.0072247 | 0.2 | 0.12
Other | | 0.01814 | | | 0.32
Nlocal: 192 ave 194 max 190 min
Histogram: 1 0 0 0 0 2 0 0 0 1
Nghost: 710 ave 712 max 708 min
Histogram: 1 0 0 0 0 2 0 0 0 1
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
FullNghs: 35456 ave 35824 max 35088 min
Histogram: 1 0 0 0 0 2 0 0 0 1
Total # of neighbors = 141824
Ave neighs/atom = 184.66667
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:05

View File

@ -0,0 +1,79 @@
variable nrun equal 1000
variable dump_count equal 10
variable nwall equal 4
variable w1 equal 67
variable w2 equal 71
variable w3 equal 75
variable w4 equal 79
variable x_cylinder equal 20
variable y_cylinder equal 17
variable r_cylinder equal 4
variable MASS equal 1
variable TEMP equal 0.4
variable VFLOW equal 0.5
units lj
atom_style atomic
lattice fcc 0.3
region sim_box block 0 84 0 34 0 10
boundary p p p
create_box 2 sim_box
region reg_cylinder cylinder z ${x_cylinder} ${y_cylinder} ${r_cylinder} EDGE EDGE
create_atoms 1 box
## setup obstacle ##
group g_obst region reg_cylinder
group g_flow subtract all g_obst
set group g_obst type 2
mass 1 ${MASS}
mass 2 ${MASS}
velocity g_flow create ${TEMP} 4928459 rot yes dist gaussian
velocity g_obst set 0.0 0.0 0.0
pair_style lj/cut 1.122462
pair_coeff 1 1 1.0 1.0
pair_coeff 1 2 1.0 1.0
pair_coeff 2 2 1.0 1.0
pair_modify shift yes
neighbor 0.3 bin
neigh_modify delay 0 every 20 check no
fix 1 g_flow nve
fix 2 g_flow wall/flow x ${VFLOW} ${TEMP} 123 ${nwall} ${w1} ${w2} ${w3} ${w4}
variable dump_every equal ${nrun}/${dump_count}
variable thermo_every equal ${dump_every}
variable restart_every equal ${nrun}/10
##### uncomment for grid aggregation #####
#variable gr_Nx equal 42
#variable gr_Ny equal 17
#variable gr_Nz equal 1
#variable gr_Nevery equal ${dump_every}
#variable gr_Nrepeat equal 1
#variable gr_Nfreq equal ${dump_every}
#fix 3 g_flow ave/grid ${gr_Nevery} ${gr_Nrepeat} ${gr_Nfreq} ${gr_Nx} ${gr_Ny} ${gr_Nz} vx vy vz density/mass norm all ave one
#compute ct_gridId g_flow property/grid ${gr_Nx} ${gr_Ny} ${gr_Nz} id
#dump dmp_grid g_flow grid ${dump_every} grid.lammpstrj c_ct_gridId:grid:data f_3:grid:data[*]
##########################################
#dump dmp_coord all atom ${dump_every} dump.lammpstrj
#compute ct_Temp g_flow temp/com
#thermo_style custom step temp epair emol etotal press c_ct_Temp
#restart ${restart_every} flow.restart
timestep 0.005
thermo ${thermo_every}
run ${nrun}

View File

@ -0,0 +1,182 @@
LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-758-ge33590b2fc-modified)
using 1 OpenMP thread(s) per MPI task
variable nrun equal 1000
variable dump_count equal 10
variable nwall equal 4
variable w1 equal 67
variable w2 equal 71
variable w3 equal 75
variable w4 equal 79
variable x_cylinder equal 20
variable y_cylinder equal 17
variable r_cylinder equal 4
variable MASS equal 1
variable TEMP equal 0.4
variable VFLOW equal 0.5
units lj
atom_style atomic
lattice fcc 0.3
Lattice spacing in x,y,z = 2.3712622 2.3712622 2.3712622
region sim_box block 0 84 0 34 0 10
boundary p p p
create_box 2 sim_box
Created orthogonal box = (0 0 0) to (199.18603 80.622915 23.712622)
1 by 1 by 1 MPI processor grid
region reg_cylinder cylinder z ${x_cylinder} ${y_cylinder} ${r_cylinder} EDGE EDGE
region reg_cylinder cylinder z 20 ${y_cylinder} ${r_cylinder} EDGE EDGE
region reg_cylinder cylinder z 20 17 ${r_cylinder} EDGE EDGE
region reg_cylinder cylinder z 20 17 4 EDGE EDGE
create_atoms 1 box
Created 114240 atoms
using lattice units in orthogonal box = (0 0 0) to (199.18603 80.622915 23.712622)
create_atoms CPU = 0.010 seconds
## setup obstacle ##
group g_obst region reg_cylinder
1950 atoms in group g_obst
group g_flow subtract all g_obst
112290 atoms in group g_flow
set group g_obst type 2
Setting atom values ...
1950 settings made for type
mass 1 ${MASS}
mass 1 1
mass 2 ${MASS}
mass 2 1
velocity g_flow create ${TEMP} 4928459 rot yes dist gaussian
velocity g_flow create 0.4 4928459 rot yes dist gaussian
velocity g_obst set 0.0 0.0 0.0
pair_style lj/cut 1.122462
pair_coeff 1 1 1.0 1.0
pair_coeff 1 2 1.0 1.0
pair_coeff 2 2 1.0 1.0
pair_modify shift yes
neighbor 0.3 bin
neigh_modify delay 0 every 20 check no
fix 1 g_flow nve
fix 2 g_flow wall/flow x ${VFLOW} ${TEMP} 123 ${nwall} ${w1} ${w2} ${w3} ${w4}
fix 2 g_flow wall/flow x 0.5 ${TEMP} 123 ${nwall} ${w1} ${w2} ${w3} ${w4}
fix 2 g_flow wall/flow x 0.5 0.4 123 ${nwall} ${w1} ${w2} ${w3} ${w4}
fix 2 g_flow wall/flow x 0.5 0.4 123 4 ${w1} ${w2} ${w3} ${w4}
fix 2 g_flow wall/flow x 0.5 0.4 123 4 67 ${w2} ${w3} ${w4}
fix 2 g_flow wall/flow x 0.5 0.4 123 4 67 71 ${w3} ${w4}
fix 2 g_flow wall/flow x 0.5 0.4 123 4 67 71 75 ${w4}
fix 2 g_flow wall/flow x 0.5 0.4 123 4 67 71 75 79
variable dump_every equal ${nrun}/${dump_count}
variable dump_every equal 1000/${dump_count}
variable dump_every equal 1000/10
variable thermo_every equal ${dump_every}
variable thermo_every equal 100
variable restart_every equal ${nrun}/10
variable restart_every equal 1000/10
##### uncomment for grid aggregation #####
#variable gr_Nx equal 42
#variable gr_Ny equal 17
#variable gr_Nz equal 1
#variable gr_Nevery equal ${dump_every}
#variable gr_Nrepeat equal 1
#variable gr_Nfreq equal ${dump_every}
#fix 3 g_flow ave/grid ${gr_Nevery} ${gr_Nrepeat} ${gr_Nfreq} ${gr_Nx} ${gr_Ny} ${gr_Nz} vx vy vz density/mass norm all ave one
#compute ct_gridId g_flow property/grid ${gr_Nx} ${gr_Ny} ${gr_Nz} id
#dump dmp_grid g_flow grid ${dump_every} grid.lammpstrj c_ct_gridId:grid:data f_3:grid:data[*]
##########################################
#dump dmp_coord all atom ${dump_every} dump.lammpstrj
#compute ct_Temp g_flow temp/com
#thermo_style custom step temp epair emol etotal press c_ct_Temp
#restart ${restart_every} flow.restart
timestep 0.005
thermo ${thermo_every}
thermo 100
run ${nrun}
run 1000
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- fix wall/flow command: doi:10.1177/10943420231213013
@Article{Pavlov-etal-IJHPCA-2024,
author = {Daniil Pavlov and Vladislav Galigerov and Daniil Kolotinskii and Vsevolod Nikolskiy and Vladimir Stegailov},
title = {GPU-based molecular dynamics of fluid flows: Reaching for turbulence},
journal = {The International Journal of High Performance Computing Applications},
year = 2024,
volume = 38,
number = 1,
pages = 34-49
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update: every = 20 steps, delay = 0 steps, check = no
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 1.422462
ghost atom cutoff = 1.422462
binsize = 0.711231, bins = 281 114 34
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 26.69 | 26.69 | 26.69 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0.39317221 0 0 0.58975315 0.11795063
100 0.3671684 0.045118445 0 0.59586622 0.27378331
200 0.3732041 0.036897471 0 0.59669873 0.24917809
300 0.37432305 0.036501844 0 0.5979815 0.24715194
400 0.37603886 0.035350565 0 0.59940392 0.24480762
500 0.37617142 0.036949771 0 0.60120196 0.24862985
600 0.37751983 0.036484268 0 0.60275905 0.24784635
700 0.37787831 0.037327783 0 0.60414029 0.25060427
800 0.37959242 0.036206184 0 0.60558983 0.2476903
900 0.38019033 0.036874395 0 0.6071549 0.24984211
1000 0.38070666 0.037068948 0 0.60812395 0.25041936
Loop time of 5.61598 on 1 procs for 1000 steps with 114240 atoms
Performance: 76923.319 tau/day, 178.063 timesteps/s, 20.342 Matom-step/s
99.7% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 2.6351 | 2.6351 | 2.6351 | 0.0 | 46.92
Neigh | 1.2994 | 1.2994 | 1.2994 | 0.0 | 23.14
Comm | 0.26576 | 0.26576 | 0.26576 | 0.0 | 4.73
Output | 0.0030531 | 0.0030531 | 0.0030531 | 0.0 | 0.05
Modify | 1.3019 | 1.3019 | 1.3019 | 0.0 | 23.18
Other | | 0.1107 | | | 1.97
Nlocal: 114240 ave 114240 max 114240 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 20119 ave 20119 max 20119 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 164018 ave 164018 max 164018 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 164018
Ave neighs/atom = 1.4357318
Neighbor list builds = 50
Dangerous builds not checked
Total wall time: 0:00:05

View File

@ -0,0 +1,182 @@
LAMMPS (21 Nov 2023 - Development - patch_21Nov2023-758-ge33590b2fc-modified)
using 1 OpenMP thread(s) per MPI task
variable nrun equal 1000
variable dump_count equal 10
variable nwall equal 4
variable w1 equal 67
variable w2 equal 71
variable w3 equal 75
variable w4 equal 79
variable x_cylinder equal 20
variable y_cylinder equal 17
variable r_cylinder equal 4
variable MASS equal 1
variable TEMP equal 0.4
variable VFLOW equal 0.5
units lj
atom_style atomic
lattice fcc 0.3
Lattice spacing in x,y,z = 2.3712622 2.3712622 2.3712622
region sim_box block 0 84 0 34 0 10
boundary p p p
create_box 2 sim_box
Created orthogonal box = (0 0 0) to (199.18603 80.622915 23.712622)
4 by 1 by 1 MPI processor grid
region reg_cylinder cylinder z ${x_cylinder} ${y_cylinder} ${r_cylinder} EDGE EDGE
region reg_cylinder cylinder z 20 ${y_cylinder} ${r_cylinder} EDGE EDGE
region reg_cylinder cylinder z 20 17 ${r_cylinder} EDGE EDGE
region reg_cylinder cylinder z 20 17 4 EDGE EDGE
create_atoms 1 box
Created 114240 atoms
using lattice units in orthogonal box = (0 0 0) to (199.18603 80.622915 23.712622)
create_atoms CPU = 0.003 seconds
## setup obstacle ##
group g_obst region reg_cylinder
1950 atoms in group g_obst
group g_flow subtract all g_obst
112290 atoms in group g_flow
set group g_obst type 2
Setting atom values ...
1950 settings made for type
mass 1 ${MASS}
mass 1 1
mass 2 ${MASS}
mass 2 1
velocity g_flow create ${TEMP} 4928459 rot yes dist gaussian
velocity g_flow create 0.4 4928459 rot yes dist gaussian
velocity g_obst set 0.0 0.0 0.0
pair_style lj/cut 1.122462
pair_coeff 1 1 1.0 1.0
pair_coeff 1 2 1.0 1.0
pair_coeff 2 2 1.0 1.0
pair_modify shift yes
neighbor 0.3 bin
neigh_modify delay 0 every 20 check no
fix 1 g_flow nve
fix 2 g_flow wall/flow x ${VFLOW} ${TEMP} 123 ${nwall} ${w1} ${w2} ${w3} ${w4}
fix 2 g_flow wall/flow x 0.5 ${TEMP} 123 ${nwall} ${w1} ${w2} ${w3} ${w4}
fix 2 g_flow wall/flow x 0.5 0.4 123 ${nwall} ${w1} ${w2} ${w3} ${w4}
fix 2 g_flow wall/flow x 0.5 0.4 123 4 ${w1} ${w2} ${w3} ${w4}
fix 2 g_flow wall/flow x 0.5 0.4 123 4 67 ${w2} ${w3} ${w4}
fix 2 g_flow wall/flow x 0.5 0.4 123 4 67 71 ${w3} ${w4}
fix 2 g_flow wall/flow x 0.5 0.4 123 4 67 71 75 ${w4}
fix 2 g_flow wall/flow x 0.5 0.4 123 4 67 71 75 79
variable dump_every equal ${nrun}/${dump_count}
variable dump_every equal 1000/${dump_count}
variable dump_every equal 1000/10
variable thermo_every equal ${dump_every}
variable thermo_every equal 100
variable restart_every equal ${nrun}/10
variable restart_every equal 1000/10
##### uncomment for grid aggregation #####
#variable gr_Nx equal 42
#variable gr_Ny equal 17
#variable gr_Nz equal 1
#variable gr_Nevery equal ${dump_every}
#variable gr_Nrepeat equal 1
#variable gr_Nfreq equal ${dump_every}
#fix 3 g_flow ave/grid ${gr_Nevery} ${gr_Nrepeat} ${gr_Nfreq} ${gr_Nx} ${gr_Ny} ${gr_Nz} vx vy vz density/mass norm all ave one
#compute ct_gridId g_flow property/grid ${gr_Nx} ${gr_Ny} ${gr_Nz} id
#dump dmp_grid g_flow grid ${dump_every} grid.lammpstrj c_ct_gridId:grid:data f_3:grid:data[*]
##########################################
#dump dmp_coord all atom ${dump_every} dump.lammpstrj
#compute ct_Temp g_flow temp/com
#thermo_style custom step temp epair emol etotal press c_ct_Temp
#restart ${restart_every} flow.restart
timestep 0.005
thermo ${thermo_every}
thermo 100
run ${nrun}
run 1000
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- fix wall/flow command: doi:10.1177/10943420231213013
@Article{Pavlov-etal-IJHPCA-2024,
author = {Daniil Pavlov and Vladislav Galigerov and Daniil Kolotinskii and Vsevolod Nikolskiy and Vladimir Stegailov},
title = {GPU-based molecular dynamics of fluid flows: Reaching for turbulence},
journal = {The International Journal of High Performance Computing Applications},
year = 2024,
volume = 38,
number = 1,
pages = 34-49
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update: every = 20 steps, delay = 0 steps, check = no
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 1.422462
ghost atom cutoff = 1.422462
binsize = 0.711231, bins = 281 114 34
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 8.496 | 8.496 | 8.496 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0.39317221 0 0 0.58975315 0.11795063
100 0.36726398 0.045386014 0 0.59627716 0.27402111
200 0.37384538 0.036574547 0 0.5973377 0.24836729
300 0.37487455 0.036519645 0 0.59882654 0.24691726
400 0.37591417 0.036405755 0 0.60027207 0.24700641
500 0.37654714 0.037008829 0 0.60182459 0.24883444
600 0.3778008 0.03663706 0 0.6033333 0.24874392
700 0.37851338 0.036714175 0 0.60447928 0.24881829
800 0.37984876 0.036237049 0 0.6060052 0.24843003
900 0.38022763 0.036847615 0 0.60718407 0.24987198
1000 0.38084717 0.037139994 0 0.60840575 0.25070072
Loop time of 2.20347 on 4 procs for 1000 steps with 114240 atoms
Performance: 196054.093 tau/day, 453.829 timesteps/s, 51.845 Matom-step/s
95.6% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.67927 | 0.70882 | 0.73473 | 2.4 | 32.17
Neigh | 0.32928 | 0.34467 | 0.36084 | 2.0 | 15.64
Comm | 0.3211 | 0.36609 | 0.40741 | 6.1 | 16.61
Output | 0.0017748 | 0.0032465 | 0.0046508 | 2.1 | 0.15
Modify | 0.71135 | 0.74424 | 0.76001 | 2.3 | 33.78
Other | | 0.03641 | | | 1.65
Nlocal: 28560 ave 29169 max 27884 min
Histogram: 1 0 0 0 0 2 0 0 0 1
Nghost: 6452.25 ave 6546 max 6368 min
Histogram: 1 0 0 0 2 0 0 0 0 1
Neighs: 40893 ave 42032 max 39445 min
Histogram: 1 0 0 0 1 0 0 1 0 1
Total # of neighbors = 163572
Ave neighs/atom = 1.4318277
Neighbor list builds = 50
Dangerous builds not checked
Total wall time: 0:00:02

65
potentials/MoS.rebomos Normal file
View File

@ -0,0 +1,65 @@
# DATE: 2013-11-04 UNITS: metal CONTRIBUTOR: J Stewart, K Dang, D Spearot (UArk) CITATION: Stewart J A and Spearot D E, Modelling Simul. Mater. Sci. Eng. 21.
# MoS-S REBO Brenner/Sinnot Potential as published in
# Liang T, Phillpot S R and Sinnott S B (2009) Phys. Rev. B79 245110, Erratum: Phys. Rev. B85 199903(E).
3.50 rcmin_MM
2.75 rcmin_MS
2.30 rcmin_SS
3.80 rcmax_MM
3.05 rcmax_MS
3.00 rcmax_SS
3.419129390005910 Q_MM
1.505537839153790 Q_MS
0.254959104053671 Q_SS
1.07500712999340 alpha_MM
1.19267902218820 alpha_MS
1.10775022439715 alpha_SS
179.008013654688 A_MM
575.509677721866 A_MS
1228.43233679426 A_SS
706.247903589221 BIJc_MM1
1344.46820036159 BIJc_MS1
1498.64815404145 BIJc_SS1
1.16100322369589 Beta_MM1
1.26973752204290 Beta_MS1
1.12673623610320 Beta_SS1
0.1326842550663270 M_b0
-0.007642788338017 M_b1
0.0341395775059370 M_b2
0.2523050971380870 M_b3
0.1227287372225670 M_b4
-0.361387798398897 M_b5
-0.282577591351457 M_b6
0.120194301035280 M_bg0
0.045238287358190 M_bg1
0.067922807244030 M_bg2
-0.03672511378682 M_bg3
0.107516477513860 M_bg4
0.004964711984940 M_bg5
-0.12997598358652 M_bg6
0.006848761596750 S_b0
-0.02389964401024 S_b1
0.137457353311170 S_b2
0.033016467497740 S_b3
-0.31064291544850 S_b4
-0.08550273135791 S_b5
0.149252790306880 S_b6
-0.2850852 S_bg0
1.67102480 S_bg1
-3.5678516 S_bg2
3.45054990 S_bg3
-1.2186289 S_bg4
0.0 S_bg5
0.0 S_bg6
0.138040769883614 M_a0
0.803625443023934 M_a1
0.292412960851064 M_a2
0.640588078946224 M_a3
0.062978539843324 S_a0
2.478617619878250 S_a1
0.036666243238154 S_a2
2.386431372486710 S_a3
0.00058595 epsilon_MM
0.01386 epsilon_SS
4.200 sigma_MM
3.130 sigma_SS

View File

@ -84,7 +84,7 @@ Au_u3 = Gold universal 3
The suffix of each file indicates the pair style it is used with: The suffix of each file indicates the pair style it is used with:
adp ADP angular dependent potential adp ADP angular dependent potential
airebo AI-REBO and REBO potentials airebo AI-REBO potentials
bop.table BOP potential, tabulated form bop.table BOP potential, tabulated form
cdeam concentration-dependent EAM cdeam concentration-dependent EAM
comb COMB potential comb COMB potential
@ -107,6 +107,8 @@ nb3b.harmonic nonbonded 3-body harmonic potential
pod ML potential with proper orthogonal descriptors (POD) pod ML potential with proper orthogonal descriptors (POD)
poly polymorphic 3-body potential poly polymorphic 3-body potential
reax ReaxFF potential (see README.reax for more info) reax ReaxFF potential (see README.reax for more info)
rebo REBO potentials
rebomos REBOMoS potential
smtbq second moment tight binding QEq (SMTBQ) potential smtbq second moment tight binding QEq (SMTBQ) potential
snap SNAP potential snap SNAP potential
snapcoeff SNAP potential snapcoeff SNAP potential

4
src/.gitignore vendored
View File

@ -1025,6 +1025,8 @@
/fix_wall_colloid.h /fix_wall_colloid.h
/fix_wall_ees.cpp /fix_wall_ees.cpp
/fix_wall_ees.h /fix_wall_ees.h
/fix_wall_flow.cpp
/fix_wall_flow.h
/fix_wall_region_ees.cpp /fix_wall_region_ees.cpp
/fix_wall_region_ees.h /fix_wall_region_ees.h
/fix_wall_reflect_stochastic.cpp /fix_wall_reflect_stochastic.cpp
@ -1371,6 +1373,8 @@
/pair_reaxff.h /pair_reaxff.h
/pair_rebo.cpp /pair_rebo.cpp
/pair_rebo.h /pair_rebo.h
/pair_rebomos.cpp
/pair_rebomos.h
/pair_resquared.cpp /pair_resquared.cpp
/pair_resquared.h /pair_resquared.h
/pair_saip_metal.cpp /pair_saip_metal.cpp

View File

@ -0,0 +1,325 @@
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Contributing authors: Vladislav Galigerov (HSE),
Daniil Pavlov (MIPT)
------------------------------------------------------------------------- */
#include "fix_wall_flow.h"
#include "atom.h"
#include "citeme.h"
#include "comm.h"
#include "domain.h"
#include "error.h"
#include "force.h"
#include "input.h"
#include "lattice.h"
#include "math_const.h"
#include "memory.h"
#include "modify.h"
#include "random_mars.h"
#include "update.h"
#include "variable.h"
#include <algorithm>
#include <cstring>
#include <functional>
using namespace LAMMPS_NS;
using namespace FixConst;
/* ---------------------------------------------------------------------- */
static const char cite_fix_wall_flow_c[] =
"fix wall/flow command: doi:10.1177/10943420231213013\n\n"
"@Article{Pavlov-etal-IJHPCA-2024,\n"
" author = {Daniil Pavlov and Vladislav Galigerov and Daniil Kolotinskii and Vsevolod "
"Nikolskiy and Vladimir Stegailov},\n"
" title = {GPU-based molecular dynamics of fluid flows: Reaching for turbulence},\n"
" journal = {The International Journal of High Performance Computing Applications},\n"
" year = 2024,\n"
" volume = 38,\n"
" number = 1,\n"
" pages = 34-49\n"
"}\n\n";
FixWallFlow::FixWallFlow(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg), flowax(FlowAxis::AX_X), flowvel(0.0), flowdir(0), rndseed(0),
current_segment(nullptr)
{
if (lmp->citeme) lmp->citeme->add(cite_fix_wall_flow_c);
if (narg < 9) utils::missing_cmd_args(FLERR, "fix wall/flow", error);
if (domain->triclinic != 0)
error->all(FLERR, "Fix wall/flow cannot be used with triclinic simulation box");
dynamic_group_allow = 1;
bool do_abort = false;
int iarg = 3;
// parsing axis
if (strcmp(arg[iarg], "x") == 0)
flowax = FlowAxis::AX_X;
else if (strcmp(arg[iarg], "y") == 0)
flowax = FlowAxis::AX_Y;
else if (strcmp(arg[iarg], "z") == 0)
flowax = FlowAxis::AX_Z;
else
error->all(FLERR, "Illegal fix wall/flow argument: axis must by x or y or z, but {} specified",
arg[iarg]);
if (domain->periodicity[flowax] != 1)
error->all(FLERR,
"Fix wall/flow cannot be used with a non-periodic boundary along the flow axis");
++iarg;
// parsing velocity
flowvel = utils::numeric(FLERR, arg[iarg], do_abort, lmp);
if (flowvel == 0.0) error->all(FLERR, "Illegal fix wall/flow argument: velocity cannot be 0");
if (flowvel > 0.0)
flowdir = 1;
else
flowdir = -1;
if (flowdir < 0)
error->all(FLERR, "Illegal fix wall/flow argument: negative direction is not supported yet");
++iarg;
// parsing temperature
double flowtemp = utils::numeric(FLERR, arg[iarg], do_abort, lmp);
kT = lmp->force->boltz * flowtemp / force->mvv2e;
++iarg;
// parsing seed
rndseed = utils::inumeric(FLERR, arg[iarg], do_abort, lmp);
if (rndseed <= 0)
error->all(FLERR, "Illegal fix wall/flow argument: random seed must be positive integer");
++iarg;
// parsing wall count
int wallcount = utils::inumeric(FLERR, arg[iarg], do_abort, lmp);
if (wallcount <= 0)
error->all(FLERR, "Illegal fix wall/flow argument: wall count must be positive integer");
++iarg;
// parsing walls
if (narg - iarg != wallcount && narg - iarg != wallcount + 2)
error->all(FLERR, "Wrong fix wall/flow wall count");
double scale = 0.0;
if (flowax == FlowAxis::AX_X)
scale = domain->lattice->xlattice;
else if (flowax == FlowAxis::AX_Y)
scale = domain->lattice->ylattice;
else if (flowax == FlowAxis::AX_Z)
scale = domain->lattice->zlattice;
if (narg - iarg == wallcount + 2) {
if (strcmp(arg[narg - 2], "units") != 0) error->all(FLERR, "Wrong fix wall/flow units command");
if (strcmp(arg[narg - 1], "box") == 0)
scale = 1.0;
else if (strcmp(arg[narg - 1], "lattice") != 0)
error->all(FLERR, "Wrong fix wall/flow units command");
}
walls.resize(wallcount + 2);
walls.front() = domain->boxlo[flowax];
for (int w = 1; w <= wallcount; ++w, ++iarg) {
walls[w] = utils::numeric(FLERR, arg[iarg], do_abort, lmp) * scale;
}
walls.back() = domain->boxhi[flowax];
if (!std::is_sorted(walls.begin(), walls.end(), std::less_equal<double>())) {
error->all(FLERR,
"Wrong fix wall/flow wall ordering or some walls are outside simulation domain");
}
if (std::adjacent_find(walls.begin(), walls.end()) != walls.end()) {
error->all(FLERR,
"Wrong fix wall/flow wall coordinates: some walls have the same coordinates or lie "
"on the boundary");
}
memory->grow(current_segment, atom->nmax, "WallFlow::current_segment");
atom->add_callback(Atom::GROW);
if (restart_peratom) atom->add_callback(Atom::RESTART);
maxexchange = 1;
random = new RanMars(lmp, rndseed + comm->me);
}
/* ---------------------------------------------------------------------- */
FixWallFlow::~FixWallFlow()
{
if (copymode) return;
atom->delete_callback(id, Atom::GROW);
if (restart_peratom) atom->delete_callback(id, Atom::RESTART);
memory->destroy(current_segment);
delete random;
}
/* ---------------------------------------------------------------------- */
int FixWallFlow::setmask()
{
int mask = 0;
mask |= END_OF_STEP;
return mask;
}
/* ---------------------------------------------------------------------- */
void FixWallFlow::init()
{
if (domain->triclinic != 0)
error->all(FLERR, "Fix wall/flow cannot be used with triclinic simulation box");
int nrigid = 0;
int box_change_flowax = 0;
for (const auto &ifix : modify->get_fix_list()) {
if (ifix->rigid_flag) nrigid++;
switch (flowax) {
case FlowAxis::AX_X:
if (ifix->box_change & Fix::BOX_CHANGE_X) box_change_flowax++;
break;
case FlowAxis::AX_Y:
if (ifix->box_change & Fix::BOX_CHANGE_Y) box_change_flowax++;
break;
case FlowAxis::AX_Z:
if (ifix->box_change & Fix::BOX_CHANGE_Z) box_change_flowax++;
break;
}
}
if (nrigid) error->all(FLERR, "Fix wall/flow is not compatible with rigid bodies");
if (box_change_flowax)
error->all(
FLERR,
"Fix wall/flow is not compatible with simulation box size changing along flow direction");
for (int i = 0; i < atom->nlocal; ++i) {
double pos = atom->x[i][flowax];
current_segment[i] = compute_current_segment(pos);
}
}
/* ---------------------------------------------------------------------- */
void FixWallFlow::end_of_step()
{
double **x = atom->x;
int *mask = atom->mask;
int nlocal = atom->nlocal;
for (int i = 0; i < nlocal; ++i) {
if (mask[i] & groupbit) {
double pos = x[i][flowax];
int prev_segment = current_segment[i];
current_segment[i] = compute_current_segment(pos);
if (prev_segment != current_segment[i]) generate_velocity(i);
}
}
}
/* ---------------------------------------------------------------------- */
void FixWallFlow::generate_velocity(int atom_i)
{
const int newton_iteration_count = 10;
double *vel = atom->v[atom_i];
double *prmass = atom->rmass;
double *pmass = atom->mass;
double mass = 0.0;
if (prmass)
mass = prmass[atom_i];
else
mass = pmass[atom->type[atom_i]];
const double gamma = 1.0 / std::sqrt(2.0 * kT / mass);
double delta = gamma * flowvel;
const double edd = std::exp(-delta * delta) / MathConst::MY_PIS + delta * std::erf(delta);
const double probability_threshold = 0.5f * (1.f + delta / edd);
double direction = 1.0;
if (random->uniform() > probability_threshold) {
delta = -delta;
direction = -direction;
}
const double xi_0 = random->uniform();
const double F_inf = edd + delta;
const double xi = xi_0 * F_inf;
const double x_0 = (std::sqrt(delta * delta + 2) - delta) * 0.5;
double x = x_0;
for (int i = 0; i < newton_iteration_count; ++i) {
x -= (std::exp(x * x) * MathConst::MY_PIS * (xi - delta * std::erfc(x)) - 1.0) / (x + delta) *
0.5;
}
const double nu = x + delta;
const double v = nu / gamma;
vel[flowax] = v * direction;
vel[(flowax + 1) % 3] = random->gaussian() / (gamma * MathConst::MY_SQRT2);
vel[(flowax + 2) % 3] = random->gaussian() / (gamma * MathConst::MY_SQRT2);
}
/* ---------------------------------------------------------------------- */
int FixWallFlow::compute_current_segment(double pos) const
{
int result = 0;
for (; result < (int)walls.size() - 1; ++result) {
if (pos >= walls[result] && pos < walls[result + 1]) { return result; }
}
return -1; // -1 is "out of box" region
}
/* ---------------------------------------------------------------------- */
void FixWallFlow::grow_arrays(int nmax)
{
memory->grow(current_segment, nmax, "WallFlow::current_segment");
}
/* ---------------------------------------------------------------------- */
void FixWallFlow::copy_arrays(int i, int j, int)
{
current_segment[j] = current_segment[i];
}
/* ---------------------------------------------------------------------- */
int FixWallFlow::pack_exchange(int i, double *buf)
{
buf[0] = static_cast<double>(current_segment[i]);
return 1;
}
/* ---------------------------------------------------------------------- */
int FixWallFlow::unpack_exchange(int i, double *buf)
{
current_segment[i] = static_cast<int>(buf[0]);
return 1;
}

View File

@ -0,0 +1,61 @@
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef FIX_CLASS
// clang-format off
FixStyle(wall/flow,FixWallFlow);
// clang-format on
#else
#ifndef LMP_FIX_WALL_FLOW_H
#define LMP_FIX_WALL_FLOW_H
#include "fix.h"
namespace LAMMPS_NS {
class FixWallFlow : public Fix {
public:
enum FlowAxis { AX_X = 0, AX_Y = 1, AX_Z = 2 };
FixWallFlow(class LAMMPS *, int, char **);
~FixWallFlow() override;
int setmask() override;
void init() override;
void end_of_step() override;
void grow_arrays(int) override;
void copy_arrays(int, int, int) override;
int pack_exchange(int, double *) override;
int unpack_exchange(int, double *) override;
protected:
FlowAxis flowax;
double flowvel;
double kT;
std::vector<double> walls;
int flowdir;
int rndseed;
class RanMars *random;
int *current_segment;
int compute_current_segment(double pos) const;
void generate_velocity(int i);
};
} // namespace LAMMPS_NS
#endif
#endif

View File

@ -187,6 +187,8 @@ action fix_temp_rescale_kokkos.cpp
action fix_temp_rescale_kokkos.h action fix_temp_rescale_kokkos.h
action fix_viscous_kokkos.cpp action fix_viscous_kokkos.cpp
action fix_viscous_kokkos.h action fix_viscous_kokkos.h
action fix_wall_flow_kokkos.cpp fix_wall_flow.cpp
action fix_wall_flow_kokkos.h fix_wall_flow.h
action fix_wall_gran_kokkos.cpp fix_wall_gran.cpp action fix_wall_gran_kokkos.cpp fix_wall_gran.cpp
action fix_wall_gran_kokkos.h fix_wall_gran.h action fix_wall_gran_kokkos.h fix_wall_gran.h
action fix_wall_gran_old.cpp fix_wall_gran.cpp action fix_wall_gran_old.cpp fix_wall_gran.cpp

View File

@ -0,0 +1,291 @@
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Contributing authors: Vladislav Galigerov (HSE),
Daniil Pavlov (MIPT)
------------------------------------------------------------------------- */
#include "fix_wall_flow_kokkos.h"
#include "atom_kokkos.h"
#include "atom_masks.h"
#include "force.h"
#include "math_const.h"
#include "memory_kokkos.h"
using namespace LAMMPS_NS;
template <class DeviceType>
FixWallFlowKokkos<DeviceType>::FixWallFlowKokkos(LAMMPS *lmp, int narg, char **arg) :
FixWallFlow(lmp, narg, arg), rand_pool(rndseed + comm->me)
{
kokkosable = 1;
exchange_comm_device = sort_device = 1;
atomKK = (AtomKokkos *) atom;
execution_space = ExecutionSpaceFromDevice<DeviceType>::space;
datamask_read = X_MASK | RMASS_MASK | TYPE_MASK | MASK_MASK;
datamask_modify = V_MASK;
memory->destroy(current_segment);
current_segment = nullptr;
grow_arrays(atomKK->nmax);
d_walls = d_walls_t("FixWallFlowKokkos::walls", walls.size());
auto h_walls = Kokkos::create_mirror_view(d_walls);
for (int i = 0; i < (int) walls.size(); ++i) h_walls(i) = walls[i];
Kokkos::deep_copy(d_walls, h_walls);
}
template <class DeviceType> FixWallFlowKokkos<DeviceType>::~FixWallFlowKokkos()
{
if (copymode) return;
memoryKK->destroy_kokkos(k_current_segment, current_segment);
}
template <class DeviceType> void FixWallFlowKokkos<DeviceType>::init()
{
atomKK->sync(execution_space, datamask_read);
k_current_segment.template sync<DeviceType>();
d_x = atomKK->k_x.template view<DeviceType>();
copymode = 1;
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagFixWallFlowInit>(0, atom->nlocal), *this);
copymode = 0;
k_current_segment.template modify<DeviceType>();
}
template <class DeviceType>
KOKKOS_INLINE_FUNCTION void FixWallFlowKokkos<DeviceType>::operator()(TagFixWallFlowInit,
const int &i) const
{
double pos = d_x(i, flowax);
d_current_segment(i) = compute_current_segment_kk(pos);
}
template <class DeviceType> void FixWallFlowKokkos<DeviceType>::end_of_step()
{
atomKK->sync(execution_space, datamask_read);
k_current_segment.template sync<DeviceType>();
d_x = atomKK->k_x.template view<DeviceType>();
d_v = atomKK->k_v.template view<DeviceType>();
d_type = atomKK->k_type.template view<DeviceType>();
d_mask = atomKK->k_mask.template view<DeviceType>();
d_mass = atomKK->k_mass.template view<DeviceType>();
d_rmass = atomKK->k_rmass.template view<DeviceType>();
copymode = 1;
if (d_rmass.data()) {
Kokkos::parallel_for(
Kokkos::RangePolicy<DeviceType, TagFixWallFlowEndOfStep<RMassTag>>(0, atom->nlocal), *this);
} else {
Kokkos::parallel_for(
Kokkos::RangePolicy<DeviceType, TagFixWallFlowEndOfStep<MassTag>>(0, atom->nlocal), *this);
}
copymode = 0;
atomKK->modified(execution_space, datamask_modify);
k_current_segment.template modify<DeviceType>();
}
template <class DeviceType>
template <class MTag>
KOKKOS_INLINE_FUNCTION void FixWallFlowKokkos<DeviceType>::operator()(TagFixWallFlowEndOfStep<MTag>,
const int &atom_i) const
{
if (d_mask[atom_i] & groupbit) {
double pos = d_x(atom_i, flowax);
int prev_segment = d_current_segment(atom_i);
d_current_segment(atom_i) = compute_current_segment_kk(pos);
if (prev_segment != d_current_segment(atom_i)) { generate_velocity_kk<MTag>(atom_i); }
}
}
template <class DeviceType>
template <class MTag>
KOKKOS_INLINE_FUNCTION void FixWallFlowKokkos<DeviceType>::generate_velocity_kk(int atom_i) const
{
const int newton_iteration_count = 10;
double mass = get_mass(MTag(), atom_i);
const double gamma = 1.0 / std::sqrt(2.0 * kT / mass);
double delta = gamma * flowvel;
const double edd = std::exp(-delta * delta) / MathConst::MY_PIS + delta * std::erf(delta);
const double probability_threshold = 0.5 * (1. + delta / edd);
double direction = 1.0;
rand_type_t rand_gen = rand_pool.get_state();
if (/*random->uniform()*/ rand_gen.drand() > probability_threshold) {
delta = -delta;
direction = -direction;
}
const double xi_0 = rand_gen.drand(); //random->uniform();
const double F_inf = edd + delta;
const double xi = xi_0 * F_inf;
const double x_0 = (std::sqrt(delta * delta + 2) - delta) * 0.5;
double x = x_0;
for (int i = 0; i < newton_iteration_count; ++i) {
x -= (std::exp(x * x) * MathConst::MY_PIS * (xi - delta * std::erfc(x)) - 1.0) / (x + delta) *
0.5;
}
const double nu = x + delta;
const double v = nu / gamma;
d_v(atom_i, flowax) = v * direction;
d_v(atom_i, (flowax + 1) % 3) =
/*random->gaussian()*/ rand_gen.normal() / (gamma * MathConst::MY_SQRT2);
d_v(atom_i, (flowax + 2) % 3) =
/*random->gaussian()*/ rand_gen.normal() / (gamma * MathConst::MY_SQRT2);
rand_pool.free_state(rand_gen);
}
template <class DeviceType>
KOKKOS_INLINE_FUNCTION int
FixWallFlowKokkos<DeviceType>::compute_current_segment_kk(double pos) const
{
int result = 0;
for (; result < (int) d_walls.extent(0) - 1; ++result) {
if (pos >= d_walls[result] && pos < d_walls[result + 1]) { return result; }
}
return -1; // -1 is "out of box" region
}
template <class DeviceType> void FixWallFlowKokkos<DeviceType>::grow_arrays(int nmax)
{
k_current_segment.template sync<DeviceType>();
memoryKK->grow_kokkos(k_current_segment, current_segment, nmax, "WallFlowKK::current_segment");
k_current_segment.template modify<DeviceType>();
d_current_segment = k_current_segment.template view<DeviceType>();
h_current_segment = k_current_segment.template view<LMPHostType>();
}
template <class DeviceType> void FixWallFlowKokkos<DeviceType>::copy_arrays(int i, int j, int)
{
k_current_segment.template sync<LMPHostType>();
h_current_segment(j) = h_current_segment(i);
k_current_segment.template modify<LMPHostType>();
}
/* ----------------------------------------------------------------------
sort local atom-based arrays
------------------------------------------------------------------------- */
template <class DeviceType>
void FixWallFlowKokkos<DeviceType>::sort_kokkos(Kokkos::BinSort<KeyViewType, BinOp> &Sorter)
{
// always sort on the device
k_current_segment.sync_device();
Sorter.sort(LMPDeviceType(), k_current_segment.d_view);
k_current_segment.modify_device();
}
template <class DeviceType> int FixWallFlowKokkos<DeviceType>::pack_exchange(int i, double *buf)
{
k_current_segment.sync_host();
buf[0] = static_cast<double>(h_current_segment(i));
return 1;
}
template <class DeviceType>
KOKKOS_INLINE_FUNCTION void FixWallFlowKokkos<DeviceType>::operator()(TagFixWallFlowPackExchange,
const int &mysend) const
{
const int send_i = d_sendlist(mysend);
const int segment = d_current_segment(send_i);
d_buf(mysend) = static_cast<double>(segment);
const int copy_i = d_copylist(mysend);
if (copy_i > -1) { d_current_segment(send_i) = d_current_segment(copy_i); }
}
template <class DeviceType>
int FixWallFlowKokkos<DeviceType>::pack_exchange_kokkos(const int &nsend,
DAT::tdual_xfloat_2d &k_buf,
DAT::tdual_int_1d k_sendlist,
DAT::tdual_int_1d k_copylist,
ExecutionSpace /*space*/)
{
k_current_segment.template sync<DeviceType>();
k_buf.template sync<DeviceType>();
k_sendlist.template sync<DeviceType>();
k_copylist.template sync<DeviceType>();
d_sendlist = k_sendlist.view<DeviceType>();
d_copylist = k_copylist.view<DeviceType>();
d_buf = typename ArrayTypes<DeviceType>::t_xfloat_1d_um(k_buf.template view<DeviceType>().data(),
k_buf.extent(0) * k_buf.extent(1));
copymode = 1;
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagFixWallFlowPackExchange>(0, nsend),
*this);
copymode = 0;
k_buf.template modify<DeviceType>();
k_current_segment.template modify<DeviceType>();
return nsend;
}
template <class DeviceType> int FixWallFlowKokkos<DeviceType>::unpack_exchange(int i, double *buf)
{
k_current_segment.sync_host();
h_current_segment(i) = static_cast<int>(buf[0]);
k_current_segment.modify_host();
return 1;
}
template <class DeviceType>
KOKKOS_INLINE_FUNCTION void FixWallFlowKokkos<DeviceType>::operator()(TagFixWallFlowUnpackExchange,
const int &i) const
{
int index = d_indices(i);
if (index > -1) { d_current_segment(index) = static_cast<int>(d_buf(i)); }
}
template <class DeviceType>
void FixWallFlowKokkos<DeviceType>::unpack_exchange_kokkos(DAT::tdual_xfloat_2d &k_buf,
DAT::tdual_int_1d &k_indices, int nrecv,
int /*nrecv1*/, int /*nextrarecv1*/,
ExecutionSpace /*space*/)
{
d_buf = typename ArrayTypes<DeviceType>::t_xfloat_1d_um(k_buf.template view<DeviceType>().data(),
k_buf.extent(0) * k_buf.extent(1));
d_indices = k_indices.view<DeviceType>();
copymode = 1;
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagFixWallFlowUnpackExchange>(0, nrecv),
*this);
copymode = 0;
k_current_segment.template modify<DeviceType>();
}
namespace LAMMPS_NS {
template class FixWallFlowKokkos<LMPDeviceType>;
#ifdef LMP_KOKKOS_GPU
template class FixWallFlowKokkos<LMPHostType>;
#endif
} // namespace LAMMPS_NS

View File

@ -0,0 +1,130 @@
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef FIX_CLASS
// clang-format off
FixStyle(wall/flow/kk,FixWallFlowKokkos<LMPDeviceType>);
FixStyle(wall/flow/kk/device,FixWallFlowKokkos<LMPDeviceType>);
FixStyle(wall/flow/kk/host,FixWallFlowKokkos<LMPHostType>);
// clang-format on
#else
// clang-format off
#ifndef LMP_FIX_WALL_FLOW_KOKKOS_H
#define LMP_FIX_WALL_FLOW_KOKKOS_H
#include "fix_wall_flow.h"
#include "kokkos_type.h"
#include "kokkos_base.h"
#include "Kokkos_Random.hpp"
#include "comm_kokkos.h"
namespace LAMMPS_NS {
struct TagFixWallFlowInit{};
template<class MTag>
struct TagFixWallFlowEndOfStep{};
struct TagFixWallFlowPackExchange{};
struct TagFixWallFlowUnpackExchange{};
template<class DeviceType>
class FixWallFlowKokkos : public FixWallFlow, public KokkosBase {
public:
typedef DeviceType device_type;
typedef ArrayTypes<DeviceType> AT;
struct MassTag{};
struct RMassTag{};
FixWallFlowKokkos(class LAMMPS *, int, char **);
~FixWallFlowKokkos();
void init() override;
void end_of_step() override;
void grow_arrays(int) override;
void copy_arrays(int, int, int) override;
void sort_kokkos(Kokkos::BinSort<KeyViewType, BinOp> &Sorter) override;
int pack_exchange(int, double *) override;
int unpack_exchange(int, double *) override;
KOKKOS_INLINE_FUNCTION
void operator() (TagFixWallFlowInit, const int&) const;
template<class MTag>
KOKKOS_INLINE_FUNCTION
void operator()(TagFixWallFlowEndOfStep<MTag>, const int&) const;
KOKKOS_INLINE_FUNCTION
void operator()(TagFixWallFlowPackExchange, const int&) const;
KOKKOS_INLINE_FUNCTION
void operator()(TagFixWallFlowUnpackExchange, const int&) const;
int pack_exchange_kokkos(const int &nsend,DAT::tdual_xfloat_2d &buf,
DAT::tdual_int_1d k_sendlist,
DAT::tdual_int_1d k_copylist,
ExecutionSpace space) override;
void unpack_exchange_kokkos(DAT::tdual_xfloat_2d &k_buf,
DAT::tdual_int_1d &indices,int nrecv,
int /*nrecv1*/, int /*nextrarecv1*/,
ExecutionSpace space) override;
protected:
typename AT::t_x_array d_x;
typename AT::t_v_array d_v;
typename AT::t_int_1d d_type;
typename AT::t_int_1d d_mask;
typename AT::t_float_1d d_mass;
typename AT::t_float_1d d_rmass;
typedef typename AT::t_xfloat_1d d_walls_t;
typedef Kokkos::Random_XorShift64_Pool<DeviceType> rand_pool_t;
typedef typename rand_pool_t::generator_type rand_type_t;
typename AT::tdual_int_1d k_current_segment;
typename AT::t_int_1d d_current_segment;
typename HAT::t_int_1d h_current_segment;
typename AT::t_int_1d d_sendlist;
typename AT::t_xfloat_1d d_buf;
typename AT::t_int_1d d_copylist;
typename AT::t_int_1d d_indices;
d_walls_t d_walls;
rand_pool_t rand_pool;
template<class MTag>
KOKKOS_INLINE_FUNCTION
void generate_velocity_kk(int atom_i) const;
KOKKOS_INLINE_FUNCTION
int compute_current_segment_kk(double pos) const;
KOKKOS_INLINE_FUNCTION
double get_mass(MassTag, int atom_i) const
{
return d_mass(d_type(atom_i));
}
KOKKOS_INLINE_FUNCTION
double get_mass(RMassTag, int atom_i) const
{
return d_rmass(atom_i);
}
};
}
#endif
#endif

View File

@ -13,6 +13,7 @@ from libc.stdint cimport uintptr_t
cimport cython cimport cython
from cpython.ref cimport PyObject from cpython.ref cimport PyObject
from libc.stdlib cimport malloc, free from libc.stdlib cimport malloc, free
from libc.string cimport memcpy
cdef extern from "lammps.h" namespace "LAMMPS_NS": cdef extern from "lammps.h" namespace "LAMMPS_NS":
@ -451,15 +452,24 @@ cdef public object mliap_unified_connect_kokkos(char *fname, MLIAPDummyModel * m
cdef int nelements = <int>len(unified.element_types) cdef int nelements = <int>len(unified.element_types)
cdef char **elements = <char**>malloc(nelements * sizeof(char*)) cdef char **elements = <char**>malloc(nelements * sizeof(char*))
cdef char * c_str
cdef char * s
cdef ssize_t slen
if not elements: if not elements:
raise MemoryError("failed to allocate memory for element names") raise MemoryError("failed to allocate memory for element names")
cdef char *elem_name
for i, elem in enumerate(unified.element_types): for i, elem in enumerate(unified.element_types):
elem_name_bytes = elem.encode('UTF-8') py_str = elem.encode('UTF-8')
elem_name = elem_name_bytes s = py_str
elements[i] = &elem_name[0] slen = len(py_str)
c_str = <char *>malloc((slen+1)*sizeof(char))
if not c_str:
raise MemoryError("failed to allocate memory for element names")
memcpy(c_str, s, slen)
c_str[slen] = 0
elements[i] = c_str
unified_int.descriptor.set_elements(elements, nelements) unified_int.descriptor.set_elements(elements, nelements)
unified_int.model.nelements = nelements unified_int.model.nelements = nelements

View File

@ -315,7 +315,6 @@ void LAMMPS_NS::update_pair_forces(MLIAPDataKokkosDevice *data, double *fij)
int i = pair_i[ii]; int i = pair_i[ii];
int j = j_atoms[ii]; int j = j_atoms[ii];
// must not count any contribution where i is not a local atom // must not count any contribution where i is not a local atom
if (i < nlocal) {
Kokkos::atomic_add(&f[i*3+0], fij[ii3+0]); Kokkos::atomic_add(&f[i*3+0], fij[ii3+0]);
Kokkos::atomic_add(&f[i*3+1], fij[ii3+1]); Kokkos::atomic_add(&f[i*3+1], fij[ii3+1]);
Kokkos::atomic_add(&f[i*3+2], fij[ii3+2]); Kokkos::atomic_add(&f[i*3+2], fij[ii3+2]);
@ -354,7 +353,6 @@ void LAMMPS_NS::update_pair_forces(MLIAPDataKokkosDevice *data, double *fij)
Kokkos::atomic_add(&d_vatom(j,5), 0.5*v[5]); Kokkos::atomic_add(&d_vatom(j,5), 0.5*v[5]);
} }
} }
}
}); });
if (vflag) { if (vflag) {
@ -382,11 +380,9 @@ void LAMMPS_NS::update_atom_energy(MLIAPDataKokkosDevice *data, double *ei)
Kokkos::parallel_reduce(nlocal, KOKKOS_LAMBDA(int i, double &local_sum){ Kokkos::parallel_reduce(nlocal, KOKKOS_LAMBDA(int i, double &local_sum){
double e = ei[i]; double e = ei[i];
// must not count any contribution where i is not a local atom
if (i < nlocal) {
d_eatoms[i] = e; d_eatoms[i] = e;
local_sum += e; local_sum += e;
}
},*data->energy); },*data->energy);
} }

File diff suppressed because it is too large Load Diff

220
src/MANYBODY/pair_rebomos.h Normal file
View File

@ -0,0 +1,220 @@
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS Development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef PAIR_CLASS
// clang-format off
PairStyle(rebomos,PairREBOMoS);
// clang-format on
#else
#ifndef LMP_PAIR_REBOMOS_H
#define LMP_PAIR_REBOMOS_H
#include "pair.h"
#include "math_const.h"
#include <cmath>
namespace LAMMPS_NS {
class PairREBOMoS : public Pair {
public:
PairREBOMoS(class LAMMPS *);
~PairREBOMoS() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
double init_one(int, int) override;
double memory_usage() override;
protected:
double cutljrebosq; // cut for when to compute
// REBO neighs of ghost atoms
double **lj1, **lj2, **lj3, **lj4; // pre-computed LJ coeffs for M,S types
double cut3rebo; // maximum distance for 3rd REBO neigh
int maxlocal; // size of numneigh, firstneigh arrays
int pgsize; // size of neighbor page
int oneatom; // max # of neighbors for one atom
MyPage<int> *ipage; // neighbor list pages
int *REBO_numneigh; // # of pair neighbors for each atom
int **REBO_firstneigh; // ptr to 1st neighbor of each atom
double *closestdistsq; // closest owned atom dist to each ghost
double *nM, *nS; // sum of weighting fns with REBO neighs
double rcmin[2][2], rcmax[2][2], rcmaxsq[2][2], rcmaxp[2][2];
double Q[2][2], alpha[2][2], A[2][2], BIJc[2][2], Beta[2][2];
double b0[2], b1[2], b2[2], b3[2], b4[2], b5[2], b6[2];
double bg0[2], bg1[2], bg2[2], bg3[2], bg4[2], bg5[2], bg6[2];
double a0[2], a1[2], a2[2], a3[2];
double rcLJmin[2][2], rcLJmax[2][2], rcLJmaxsq[2][2];
double epsilon[2][2], sigma[2][2];
void REBO_neigh();
void FREBO(int);
void FLJ(int);
double bondorder(int, int, double *, double, double, double **);
inline double gSpline(const double costh, const int typei, double &dgdc) const
{
const double b0i = b0[typei];
const double b1i = b1[typei];
const double b2i = b2[typei];
const double b3i = b3[typei];
const double b4i = b4[typei];
const double b5i = b5[typei];
const double b6i = b6[typei];
double g = 0.0;
if (costh >= -1.0 && costh < 0.5) {
g = b6i * costh;
double dg = 6.0 * b6i * costh;
g += b5i;
dg += 5.0 * b5i;
g *= costh;
dg *= costh;
g += b4i;
dg += 4.0 * b4i;
g *= costh;
dg *= costh;
g += b3i;
dg += 3.0 * b3i;
g *= costh;
dg *= costh;
g += b2i;
dg += 2.0 * b2i;
g *= costh;
dg *= costh;
g += b1i;
dg += b1i;
g *= costh;
g += b0i;
dgdc = dg;
} else if (costh >= 0.5 && costh <= 1.0) {
double gcos = b6i * costh;
double dgcos = 6.0 * b6i * costh;
gcos += b5i;
dgcos += 5.0 * b5i;
gcos *= costh;
dgcos *= costh;
gcos += b4i;
dgcos += 4.0 * b4i;
gcos *= costh;
dgcos *= costh;
gcos += b3i;
dgcos += 3.0 * b3i;
gcos *= costh;
dgcos *= costh;
gcos += b2i;
dgcos += 2.0 * b2i;
gcos *= costh;
dgcos *= costh;
gcos += b1i;
dgcos += b1i;
gcos *= costh;
gcos += b0i;
const double bg0i = bg0[typei];
const double bg1i = bg1[typei];
const double bg2i = bg2[typei];
const double bg3i = bg3[typei];
const double bg4i = bg4[typei];
const double bg5i = bg5[typei];
const double bg6i = bg6[typei];
double gamma = bg6i * costh;
double dgamma = 6.0 * bg6i * costh;
gamma += bg5i;
dgamma += 5.0 * bg5i;
gamma *= costh;
dgamma *= costh;
gamma += bg4i;
dgamma += 4.0 * bg4i;
gamma *= costh;
dgamma *= costh;
gamma += bg3i;
dgamma += 3.0 * bg3i;
gamma *= costh;
dgamma *= costh;
gamma += bg2i;
dgamma += 2.0 * bg2i;
gamma *= costh;
dgamma *= costh;
gamma += bg1i;
dgamma += bg1i;
gamma *= costh;
gamma += bg0i;
const double tmp = MathConst::MY_2PI * (costh - 0.5);
const double psi = 0.5 * (1 - cos(tmp));
const double dpsi = MathConst::MY_PI * sin(tmp);
g = gcos + psi * (gamma - gcos);
dgdc = dgcos + dpsi * (gamma - gcos) + psi * (dgamma - dgcos);
} else {
dgdc = 0.0;
}
return g;
}
/* ----------------------------------------------------------------------
Pij calculation
------------------------------------------------------------------------- */
inline double PijSpline(const double NM, const double NS, const int typei, double &dp) const
{
const double N = NM + NS;
dp = -a0[typei] + a1[typei] * a2[typei] * exp(-a2[typei] * N);
return -a0[typei] * (N - 1) - a1[typei] * exp(-a2[typei] * N) + a3[typei];
}
void read_file(char *);
void allocate();
// ----------------------------------------------------------------------
// S'(t) and S(t) cutoff functions
// added to header for inlining
// ----------------------------------------------------------------------
/* ----------------------------------------------------------------------
cutoff function Sprime
return cutoff and dX = derivative
no side effects
------------------------------------------------------------------------- */
inline double Sp(double Xij, double Xmin, double Xmax, double &dX) const
{
double cutoff;
const double t = (Xij - Xmin) / (Xmax - Xmin);
if (t <= 0.0) {
cutoff = 1.0;
dX = 0.0;
} else if (t >= 1.0) {
cutoff = 0.0;
dX = 0.0;
} else {
cutoff = 0.5 * (1.0 + cos(t * MathConst::MY_PI));
dX = (-0.5 * MathConst::MY_PI * sin(t * MathConst::MY_PI)) / (Xmax - Xmin);
}
return cutoff;
};
};
} // namespace LAMMPS_NS
#endif
#endif

View File

@ -254,11 +254,9 @@ void LAMMPS_NS::update_pair_energy(MLIAPData *data, double *eij)
double e = 0.5 * eij[ii]; double e = 0.5 * eij[ii];
// must not count any contribution where i is not a local atom // must not count any contribution where i is not a local atom
if (i < nlocal) {
data->eatoms[i] += e; data->eatoms[i] += e;
e_total += e; e_total += e;
} }
}
data->energy = e_total; data->energy = e_total;
} }
@ -277,8 +275,6 @@ void LAMMPS_NS::update_pair_forces(MLIAPData *data, double *fij)
int i = data->pair_i[ii]; int i = data->pair_i[ii];
int j = data->jatoms[ii]; int j = data->jatoms[ii];
// must not count any contribution where i is not a local atom
if (i < nlocal) {
f[i][0] += fij[ii3]; f[i][0] += fij[ii3];
f[i][1] += fij[ii3 + 1]; f[i][1] += fij[ii3 + 1];
f[i][2] += fij[ii3 + 2]; f[i][2] += fij[ii3 + 2];
@ -288,7 +284,6 @@ void LAMMPS_NS::update_pair_forces(MLIAPData *data, double *fij)
if (data->vflag) data->pairmliap->v_tally(i, j, &fij[ii3], data->rij[ii]); if (data->vflag) data->pairmliap->v_tally(i, j, &fij[ii3], data->rij[ii]);
} }
}
} }
#endif #endif

View File

@ -8,6 +8,7 @@ import lammps.mliap
cimport cython cimport cython
from cpython.ref cimport PyObject from cpython.ref cimport PyObject
from libc.stdlib cimport malloc, free from libc.stdlib cimport malloc, free
from libc.string cimport memcpy
cdef extern from "lammps.h" namespace "LAMMPS_NS": cdef extern from "lammps.h" namespace "LAMMPS_NS":
@ -387,15 +388,26 @@ cdef public object mliap_unified_connect(char *fname, MLIAPDummyModel * model,
cdef int nelements = <int>len(unified.element_types) cdef int nelements = <int>len(unified.element_types)
cdef char **elements = <char**>malloc(nelements * sizeof(char*)) cdef char **elements = <char**>malloc(nelements * sizeof(char*))
cdef char * c_str
cdef char * s
cdef ssize_t slen
if not elements: if not elements:
raise MemoryError("failed to allocate memory for element names") raise MemoryError("failed to allocate memory for element names")
cdef char *elem_name
for i, elem in enumerate(unified.element_types): for i, elem in enumerate(unified.element_types):
elem_name_bytes = elem.encode('UTF-8') py_str = elem.encode('UTF-8')
elem_name = elem_name_bytes
elements[i] = &elem_name[0] s = py_str
slen = len(py_str)
c_str = <char *>malloc((slen+1)*sizeof(char))
if not c_str:
raise MemoryError("failed to allocate memory for element names")
memcpy(c_str, s, slen)
c_str[slen] = 0
elements[i] = c_str
unified_int.descriptor.set_elements(elements, nelements) unified_int.descriptor.set_elements(elements, nelements)
unified_int.model.nelements = nelements unified_int.model.nelements = nelements

View File

@ -0,0 +1,702 @@
// clang-format off
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS Development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
References:
This code:
Stewart J A and Spearot D E (2013) Atomistic simulations of nanoindentation on the basal plane of crystalline molybdenum disulfide. Modelling Simul. Mater. Sci. Eng. 21.
Based on:
Liang T, Phillpot S R and Sinnott S B (2009) Parameterization of a reactive many-body potential for Mo2S systems. Phys. Rev. B79 245110.
Liang T, Phillpot S R and Sinnott S B (2012) Erratum: Parameterization of a reactive many-body potential for Mo-S systems. (Phys. Rev. B79 245110 (2009)) Phys. Rev. B85 199903(E).
LAMMPS file contributing authors: James Stewart, Khanh Dang and Douglas Spearot (University of Arkansas)
------------------------------------------------------------------------- */
// clang-format on
#include "pair_rebomos_omp.h"
#include "atom.h"
#include "comm.h"
#include "error.h"
#include "math_special.h"
#include "memory.h"
#include "my_page.h"
#include "neigh_list.h"
#include "suffix.h"
#include <cmath>
#include "omp_compat.h"
#if defined(_OPENMP)
#include <omp.h>
#endif
using namespace LAMMPS_NS;
using namespace MathConst;
using MathSpecial::cube;
using MathSpecial::powint;
using MathSpecial::square;
static constexpr double TOL = 1.0e-9;
/* ---------------------------------------------------------------------- */
PairREBOMoSOMP::PairREBOMoSOMP(LAMMPS *lmp) : PairREBOMoS(lmp), ThrOMP(lmp, THR_PAIR)
{
suffix_flag |= Suffix::OMP;
respa_enable = 0;
}
// clang-format off
/* ---------------------------------------------------------------------- */
void PairREBOMoSOMP::compute(int eflag, int vflag)
{
ev_init(eflag,vflag);
REBO_neigh_thr();
const int nall = atom->nlocal + atom->nghost;
const int nthreads = comm->nthreads;
const int inum = list->inum;
#if defined(_OPENMP)
#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag)
#endif
{
int ifrom, ito, tid;
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
ThrData *thr = fix->get_thr(tid);
thr->timer(Timer::START);
ev_setup_thr(eflag, vflag, nall, eatom, vatom, nullptr, thr);
FREBO_thr(ifrom,ito,eflag,thr);
FLJ_thr(ifrom,ito,eflag,thr);
thr->timer(Timer::PAIR);
reduce_thr(this, eflag, vflag, thr);
} // end of omp parallel region
}
/* ----------------------------------------------------------------------
create REBO neighbor list from main neighbor list
REBO neighbor list stores neighbors of ghost atoms
------------------------------------------------------------------------- */
void PairREBOMoSOMP::REBO_neigh_thr()
{
const int nthreads = comm->nthreads;
if (atom->nmax > maxlocal) {
maxlocal = atom->nmax;
memory->destroy(REBO_numneigh);
memory->sfree(REBO_firstneigh);
memory->destroy(nM);
memory->destroy(nS);
memory->create(REBO_numneigh,maxlocal,"REBOMoS:numneigh");
REBO_firstneigh = (int **) memory->smalloc(maxlocal*sizeof(int *),
"REBOMoS:firstneigh");
memory->create(nM,maxlocal,"REBOMoS:nM");
memory->create(nS,maxlocal,"REBOMoS:nS");
}
#if defined(_OPENMP)
#pragma omp parallel LMP_DEFAULT_NONE
#endif
{
int i,j,ii,jj,n,jnum,itype,jtype;
double xtmp,ytmp,ztmp,delx,dely,delz,rsq,dS;
int *ilist,*jlist,*numneigh,**firstneigh;
int *neighptr;
double **x = atom->x;
int *type = atom->type;
const int allnum = list->inum + list->gnum;
ilist = list->ilist;
numneigh = list->numneigh;
firstneigh = list->firstneigh;
#if defined(_OPENMP)
const int tid = omp_get_thread_num();
#else
const int tid = 0;
#endif
const int iidelta = 1 + allnum/nthreads;
const int iifrom = tid*iidelta;
const int iito = ((iifrom+iidelta)>allnum) ? allnum : (iifrom+iidelta);
// store all REBO neighs of owned and ghost atoms
// scan full neighbor list of I
// each thread has its own page allocator
MyPage<int> &ipg = ipage[tid];
ipg.reset();
for (ii = iifrom; ii < iito; ii++) {
i = ilist[ii];
n = 0;
neighptr = ipg.vget();
xtmp = x[i][0];
ytmp = x[i][1];
ztmp = x[i][2];
itype = map[type[i]];
nM[i] = nS[i] = 0.0;
jlist = firstneigh[i];
jnum = numneigh[i];
for (jj = 0; jj < jnum; jj++) {
j = jlist[jj];
j &= NEIGHMASK;
jtype = map[type[j]];
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];
delz = ztmp - x[j][2];
rsq = delx*delx + dely*dely + delz*delz;
if (rsq < rcmaxsq[itype][jtype]) {
neighptr[n++] = j;
if (jtype == 0)
nM[i] += Sp(sqrt(rsq),rcmin[itype][jtype],rcmax[itype][jtype],dS);
else
nS[i] += Sp(sqrt(rsq),rcmin[itype][jtype],rcmax[itype][jtype],dS);
}
}
REBO_firstneigh[i] = neighptr;
REBO_numneigh[i] = n;
ipg.vgot(n);
if (ipg.status())
error->one(FLERR,"REBO list overflow, boost neigh_modify one");
}
}
}
/* ----------------------------------------------------------------------
REBO forces and energy
------------------------------------------------------------------------- */
void PairREBOMoSOMP::FREBO_thr(int ifrom, int ito, int eflag, ThrData * const thr)
{
int i,j,k,ii,itype,jtype;
tagint itag, jtag;
double delx,dely,delz,evdwl,fpair,xtmp,ytmp,ztmp;
double rsq,rij,wij;
double Qij,Aij,alphaij,VR,pre,dVRdi,VA,bij,dVAdi,dVA;
double dwij,del[3];
int *ilist,*REBO_neighs;
evdwl = 0.0;
const double * const * const x = atom->x;
double * const * const f = thr->get_f();
const int * const type = atom->type;
const tagint * const tag = atom->tag;
const int nlocal = atom->nlocal;
ilist = list->ilist;
// two-body interactions from REBO neighbor list, skip half of them
for (ii = ifrom; ii < ito; ii++) {
i = ilist[ii];
itag = tag[i];
itype = map[type[i]];
xtmp = x[i][0];
ytmp = x[i][1];
ztmp = x[i][2];
REBO_neighs = REBO_firstneigh[i];
for (k = 0; k < REBO_numneigh[i]; k++) {
j = REBO_neighs[k];
jtag = tag[j];
if (itag > jtag) {
if ((itag+jtag) % 2 == 0) continue;
} else if (itag < jtag) {
if ((itag+jtag) % 2 == 1) continue;
} else {
if (x[j][2] < ztmp) continue;
if (x[j][2] == ztmp && x[j][1] < ytmp) continue;
if (x[j][2] == ztmp && x[j][1] == ytmp && x[j][0] < xtmp) continue;
}
jtype = map[type[j]];
delx = x[i][0] - x[j][0];
dely = x[i][1] - x[j][1];
delz = x[i][2] - x[j][2];
rsq = delx*delx + dely*dely + delz*delz;
rij = sqrt(rsq);
wij = Sp(rij,rcmin[itype][jtype],rcmax[itype][jtype],dwij);
if (wij <= TOL) continue;
Qij = Q[itype][jtype];
Aij = A[itype][jtype];
alphaij = alpha[itype][jtype];
VR = wij*(1.0+(Qij/rij)) * Aij*exp(-alphaij*rij);
pre = wij*Aij * exp(-alphaij*rij);
dVRdi = pre * ((-alphaij)-(Qij/rsq)-(Qij*alphaij/rij));
dVRdi += VR/wij * dwij;
VA = dVA = 0.0;
VA = -wij * BIJc[itype][jtype] * exp(-Beta[itype][jtype]*rij);
dVA = -Beta[itype][jtype] * VA;
dVA += VA/wij * dwij;
del[0] = delx;
del[1] = dely;
del[2] = delz;
bij = bondorder_thr(i,j,del,rij,VA,thr);
dVAdi = bij*dVA;
fpair = -(dVRdi+dVAdi) / rij;
f[i][0] += delx*fpair;
f[i][1] += dely*fpair;
f[i][2] += delz*fpair;
f[j][0] -= delx*fpair;
f[j][1] -= dely*fpair;
f[j][2] -= delz*fpair;
if (eflag) evdwl = VR + bij*VA;
if (evflag) ev_tally_thr(this,i,j,nlocal,/* newton_pair */1,evdwl,0.0,fpair,delx,dely,delz,thr);
}
}
}
/* ----------------------------------------------------------------------
compute LJ forces and energy
------------------------------------------------------------------------- */
void PairREBOMoSOMP::FLJ_thr(int ifrom, int ito, int eflag, ThrData * const thr)
{
int i,j,ii,jj,jnum,itype,jtype;
tagint itag,jtag;
double evdwl,fpair,xtmp,ytmp,ztmp;
double rij,delij[3],rijsq;
double VLJ,dVLJ;
double vdw,dvdw;
double r2inv,r6inv;
int *ilist,*jlist,*numneigh,**firstneigh;
double c2,c3,dr,drp,r6;
// I-J interaction from full neighbor list
// skip 1/2 of interactions since only consider each pair once
evdwl = 0.0;
const double * const * const x = atom->x;
double * const * const f = thr->get_f();
const tagint * const tag = atom->tag;
const int * const type = atom->type;
const int nlocal = atom->nlocal;
ilist = list->ilist;
numneigh = list->numneigh;
firstneigh = list->firstneigh;
// loop over neighbors of my atoms
for (ii = ifrom; ii < ito; ii++) {
i = ilist[ii];
itag = tag[i];
itype = map[type[i]];
xtmp = x[i][0];
ytmp = x[i][1];
ztmp = x[i][2];
jlist = firstneigh[i];
jnum = numneigh[i];
for (jj = 0; jj < jnum; jj++) {
j = jlist[jj];
j &= NEIGHMASK;
jtag = tag[j];
if (itag > jtag) {
if ((itag+jtag) % 2 == 0) continue;
} else if (itag < jtag) {
if ((itag+jtag) % 2 == 1) continue;
} else {
if (x[j][2] < ztmp) continue;
if (x[j][2] == ztmp && x[j][1] < ytmp) continue;
if (x[j][2] == ztmp && x[j][1] == ytmp && x[j][0] < xtmp) continue;
}
jtype = map[type[j]];
delij[0] = xtmp - x[j][0];
delij[1] = ytmp - x[j][1];
delij[2] = ztmp - x[j][2];
rijsq = delij[0]*delij[0] + delij[1]*delij[1] + delij[2]*delij[2];
rij = sqrt(rijsq);
// compute LJ forces and energy
// Outside Rmax
if (rij > rcLJmax[itype][jtype] || rij < rcLJmin[itype][jtype]){
VLJ = 0;
dVLJ = 0;
}
// Inside Rmax and above 0.95*sigma
else if (rij <= rcLJmax[itype][jtype] && rij >= 0.95*sigma[itype][jtype]){
r2inv = 1.0/rijsq;
r6inv = r2inv*r2inv*r2inv;
VLJ = r6inv*(lj3[itype][jtype]*r6inv-lj4[itype][jtype]);
dVLJ = -r6inv*(lj1[itype][jtype]*r6inv - lj2[itype][jtype])/rij;
}
// Below 0.95*sigma
else if (rij < 0.95*sigma[itype][jtype] && rij >= rcLJmin[itype][jtype]){
dr = 0.95*sigma[itype][jtype] - rcLJmin[itype][jtype];
r6 = powint((sigma[itype][jtype]/(0.95*sigma[itype][jtype])),6);
vdw = 4*epsilon[itype][jtype]*r6*(r6 - 1.0);
dvdw = (-4*epsilon[itype][jtype]/(0.95*sigma[itype][jtype]))*r6*(12.0*r6 - 6.0);
c2 = ((3.0/dr)*vdw - dvdw)/dr;
c3 = (vdw/(dr*dr) - c2)/dr;
drp = rij - rcLJmin[itype][jtype];
VLJ = drp*drp*(drp*c3 + c2);
dVLJ = drp*(3.0*drp*c3 + 2.0*c2);
}
fpair = -dVLJ/rij;
f[i][0] += delij[0]*fpair;
f[i][1] += delij[1]*fpair;
f[i][2] += delij[2]*fpair;
f[j][0] -= delij[0]*fpair;
f[j][1] -= delij[1]*fpair;
f[j][2] -= delij[2]*fpair;
if (eflag) evdwl = VLJ;
if (evflag) ev_tally_thr(this,i,j,nlocal,/*newton_pair*/1,evdwl,0.0,fpair,delij[0],delij[1],delij[2],thr);
}
}
}
/* ----------------------------------------------------------------------
Bij function
The bond order term modified the attractive portion of the REBO
potential based on the number of atoms around a specific pair
and the bond angle between sets of three atoms.
The functions G(cos(theta)) and P(N) are evaluated and their
derivatives are also computed for use in the force calculation.
------------------------------------------------------------------------- */
double PairREBOMoSOMP::bondorder_thr(int i, int j, double rij[3], double rijmag, double VA, ThrData *thr)
{
int atomi,atomj,atomk,atoml;
int k,l;
int itype, jtype, ktype, ltype;
double rik[3], rjl[3], rji[3], rki[3],rlj[3], dwjl, bij;
double NijM,NijS,NjiM,NjiS,wik,dwik,wjl;
double rikmag,rjlmag,cosjik,cosijl,g,tmp2;
double Etmp,pij,tmp,dwij,dS;
double dgdc,pji;
double dcosjikdri[3],dcosijldri[3],dcosjikdrk[3];
double dp;
double dcosjikdrj[3],dcosijldrj[3],dcosijldrl[3];
double fi[3],fj[3],fk[3],fl[3];
double PijS, PjiS;
int *REBO_neighs;
const double * const * const x = atom->x;
double * const * const f = thr->get_f();
const int * const type = atom->type;
atomi = i;
atomj = j;
itype = map[type[i]];
jtype = map[type[j]];
Sp(rijmag,rcmin[itype][jtype],rcmax[itype][jtype],dwij);
NijM = nM[i];
NijS = nS[i];
NjiM = nM[j];
NjiS = nS[j];
bij = 0.0;
tmp = 0.0;
tmp2 = 0.0;
dgdc = 0.0;
Etmp = 0.0;
REBO_neighs = REBO_firstneigh[i];
for (k = 0; k < REBO_numneigh[i]; k++) {
atomk = REBO_neighs[k];
if (atomk != atomj) {
ktype = map[type[atomk]];
rik[0] = x[atomi][0]-x[atomk][0];
rik[1] = x[atomi][1]-x[atomk][1];
rik[2] = x[atomi][2]-x[atomk][2];
rikmag = sqrt((rik[0]*rik[0])+(rik[1]*rik[1])+(rik[2]*rik[2]));
wik = Sp(rikmag,rcmin[itype][ktype],rcmax[itype][ktype],dS);
cosjik = ((rij[0]*rik[0])+(rij[1]*rik[1])+(rij[2]*rik[2])) / (rijmag*rikmag);
cosjik = MIN(cosjik,1.0);
cosjik = MAX(cosjik,-1.0);
// evaluate g and derivative dg
g = gSpline(cosjik,itype,dgdc);
Etmp = Etmp+(wik*g);
}
}
dp = 0.0;
PijS = PijSpline(NijM,NijS,itype,dp);
pij = 1.0/sqrt(1.0+Etmp+PijS);
tmp = -0.5*cube(pij);
// derivative calculations
REBO_neighs = REBO_firstneigh[i];
for (k = 0; k < REBO_numneigh[i]; k++) {
atomk = REBO_neighs[k];
if (atomk != atomj) {
ktype = map[type[atomk]];
rik[0] = x[atomi][0]-x[atomk][0];
rik[1] = x[atomi][1]-x[atomk][1];
rik[2] = x[atomi][2]-x[atomk][2];
rikmag = sqrt((rik[0]*rik[0])+(rik[1]*rik[1])+(rik[2]*rik[2]));
wik = Sp(rikmag,rcmin[itype][ktype],rcmax[itype][ktype],dwik);
cosjik = (rij[0]*rik[0] + rij[1]*rik[1] + rij[2]*rik[2]) / (rijmag*rikmag);
cosjik = MIN(cosjik,1.0);
cosjik = MAX(cosjik,-1.0);
dcosjikdri[0] = ((rij[0]+rik[0])/(rijmag*rikmag)) -
(cosjik*((rij[0]/(rijmag*rijmag))+(rik[0]/(rikmag*rikmag))));
dcosjikdri[1] = ((rij[1]+rik[1])/(rijmag*rikmag)) -
(cosjik*((rij[1]/(rijmag*rijmag))+(rik[1]/(rikmag*rikmag))));
dcosjikdri[2] = ((rij[2]+rik[2])/(rijmag*rikmag)) -
(cosjik*((rij[2]/(rijmag*rijmag))+(rik[2]/(rikmag*rikmag))));
dcosjikdrk[0] = (-rij[0]/(rijmag*rikmag)) +
(cosjik*(rik[0]/(rikmag*rikmag)));
dcosjikdrk[1] = (-rij[1]/(rijmag*rikmag)) +
(cosjik*(rik[1]/(rikmag*rikmag)));
dcosjikdrk[2] = (-rij[2]/(rijmag*rikmag)) +
(cosjik*(rik[2]/(rikmag*rikmag)));
dcosjikdrj[0] = (-rik[0]/(rijmag*rikmag)) +
(cosjik*(rij[0]/(rijmag*rijmag)));
dcosjikdrj[1] = (-rik[1]/(rijmag*rikmag)) +
(cosjik*(rij[1]/(rijmag*rijmag)));
dcosjikdrj[2] = (-rik[2]/(rijmag*rikmag)) +
(cosjik*(rij[2]/(rijmag*rijmag)));
g = gSpline(cosjik,itype,dgdc);
tmp2 = VA*0.5*(tmp*wik*dgdc);
fj[0] = -tmp2*dcosjikdrj[0];
fj[1] = -tmp2*dcosjikdrj[1];
fj[2] = -tmp2*dcosjikdrj[2];
fi[0] = -tmp2*dcosjikdri[0];
fi[1] = -tmp2*dcosjikdri[1];
fi[2] = -tmp2*dcosjikdri[2];
fk[0] = -tmp2*dcosjikdrk[0];
fk[1] = -tmp2*dcosjikdrk[1];
fk[2] = -tmp2*dcosjikdrk[2];
// coordination forces
// dwik forces (from partial derivative)
tmp2 = VA*0.5*(tmp*dwik*g)/rikmag;
fi[0] -= tmp2*rik[0];
fi[1] -= tmp2*rik[1];
fi[2] -= tmp2*rik[2];
fk[0] += tmp2*rik[0];
fk[1] += tmp2*rik[1];
fk[2] += tmp2*rik[2];
// PIJ forces (from coordination P(N) term)
tmp2 = VA*0.5*(tmp*dp*dwik)/rikmag;
fi[0] -= tmp2*rik[0];
fi[1] -= tmp2*rik[1];
fi[2] -= tmp2*rik[2];
fk[0] += tmp2*rik[0];
fk[1] += tmp2*rik[1];
fk[2] += tmp2*rik[2];
// dgdN forces are removed
f[atomi][0] += fi[0]; f[atomi][1] += fi[1]; f[atomi][2] += fi[2];
f[atomj][0] += fj[0]; f[atomj][1] += fj[1]; f[atomj][2] += fj[2];
f[atomk][0] += fk[0]; f[atomk][1] += fk[1]; f[atomk][2] += fk[2];
if (vflag_either) {
rji[0] = -rij[0]; rji[1] = -rij[1]; rji[2] = -rij[2];
rki[0] = -rik[0]; rki[1] = -rik[1]; rki[2] = -rik[2];
v_tally3_thr(this,atomi,atomj,atomk,fj,fk,rji,rki,thr);
}
}
}
// PIJ force contribution additional term
tmp2 = -VA*0.5*(tmp*dp*dwij)/rijmag;
f[atomi][0] += rij[0]*tmp2;
f[atomi][1] += rij[1]*tmp2;
f[atomi][2] += rij[2]*tmp2;
f[atomj][0] -= rij[0]*tmp2;
f[atomj][1] -= rij[1]*tmp2;
f[atomj][2] -= rij[2]*tmp2;
if (vflag_either) v_tally2_thr(this,atomi,atomj,tmp2,rij,thr);
tmp = 0.0;
tmp2 = 0.0;
Etmp = 0.0;
REBO_neighs = REBO_firstneigh[j];
for (l = 0; l < REBO_numneigh[j]; l++) {
atoml = REBO_neighs[l];
if (atoml != atomi) {
ltype = map[type[atoml]];
rjl[0] = x[atomj][0]-x[atoml][0];
rjl[1] = x[atomj][1]-x[atoml][1];
rjl[2] = x[atomj][2]-x[atoml][2];
rjlmag = sqrt((rjl[0]*rjl[0])+(rjl[1]*rjl[1])+(rjl[2]*rjl[2]));
wjl = Sp(rjlmag,rcmin[jtype][ltype],rcmax[jtype][ltype],dS);
cosijl = -1.0*((rij[0]*rjl[0])+(rij[1]*rjl[1])+(rij[2]*rjl[2])) / (rijmag*rjlmag);
cosijl = MIN(cosijl,1.0);
cosijl = MAX(cosijl,-1.0);
// evaluate g and derivative dg
g = gSpline(cosijl,jtype,dgdc);
Etmp = Etmp+(wjl*g);
}
}
dp = 0.0;
PjiS = PijSpline(NjiM,NjiS,jtype,dp);
pji = 1.0/sqrt(1.0+Etmp+PjiS);
tmp = -0.5*cube(pji);
REBO_neighs = REBO_firstneigh[j];
for (l = 0; l < REBO_numneigh[j]; l++) {
atoml = REBO_neighs[l];
if (atoml != atomi) {
ltype = map[type[atoml]];
rjl[0] = x[atomj][0]-x[atoml][0];
rjl[1] = x[atomj][1]-x[atoml][1];
rjl[2] = x[atomj][2]-x[atoml][2];
rjlmag = sqrt((rjl[0]*rjl[0])+(rjl[1]*rjl[1])+(rjl[2]*rjl[2]));
wjl = Sp(rjlmag,rcmin[jtype][ltype],rcmax[jtype][ltype],dwjl);
cosijl = (-1.0*((rij[0]*rjl[0])+(rij[1]*rjl[1])+(rij[2]*rjl[2]))) / (rijmag*rjlmag);
cosijl = MIN(cosijl,1.0);
cosijl = MAX(cosijl,-1.0);
dcosijldri[0] = (-rjl[0]/(rijmag*rjlmag)) -
(cosijl*rij[0]/(rijmag*rijmag));
dcosijldri[1] = (-rjl[1]/(rijmag*rjlmag)) -
(cosijl*rij[1]/(rijmag*rijmag));
dcosijldri[2] = (-rjl[2]/(rijmag*rjlmag)) -
(cosijl*rij[2]/(rijmag*rijmag));
dcosijldrj[0] = ((-rij[0]+rjl[0])/(rijmag*rjlmag)) +
(cosijl*((rij[0]/square(rijmag))-(rjl[0]/(rjlmag*rjlmag))));
dcosijldrj[1] = ((-rij[1]+rjl[1])/(rijmag*rjlmag)) +
(cosijl*((rij[1]/square(rijmag))-(rjl[1]/(rjlmag*rjlmag))));
dcosijldrj[2] = ((-rij[2]+rjl[2])/(rijmag*rjlmag)) +
(cosijl*((rij[2]/square(rijmag))-(rjl[2]/(rjlmag*rjlmag))));
dcosijldrl[0] = (rij[0]/(rijmag*rjlmag))+(cosijl*rjl[0]/(rjlmag*rjlmag));
dcosijldrl[1] = (rij[1]/(rijmag*rjlmag))+(cosijl*rjl[1]/(rjlmag*rjlmag));
dcosijldrl[2] = (rij[2]/(rijmag*rjlmag))+(cosijl*rjl[2]/(rjlmag*rjlmag));
// evaluate g and derivatives dg
g = gSpline(cosijl,jtype,dgdc);
tmp2 = VA*0.5*(tmp*wjl*dgdc);
fi[0] = -tmp2*dcosijldri[0];
fi[1] = -tmp2*dcosijldri[1];
fi[2] = -tmp2*dcosijldri[2];
fj[0] = -tmp2*dcosijldrj[0];
fj[1] = -tmp2*dcosijldrj[1];
fj[2] = -tmp2*dcosijldrj[2];
fl[0] = -tmp2*dcosijldrl[0];
fl[1] = -tmp2*dcosijldrl[1];
fl[2] = -tmp2*dcosijldrl[2];
// coordination forces
// dwik forces (from partial derivative)
tmp2 = VA*0.5*(tmp*dwjl*g)/rjlmag;
fj[0] -= tmp2*rjl[0];
fj[1] -= tmp2*rjl[1];
fj[2] -= tmp2*rjl[2];
fl[0] += tmp2*rjl[0];
fl[1] += tmp2*rjl[1];
fl[2] += tmp2*rjl[2];
// PIJ forces (coordination)
tmp2 = VA*0.5*(tmp*dp*dwjl)/rjlmag;
fj[0] -= tmp2*rjl[0];
fj[1] -= tmp2*rjl[1];
fj[2] -= tmp2*rjl[2];
fl[0] += tmp2*rjl[0];
fl[1] += tmp2*rjl[1];
fl[2] += tmp2*rjl[2];
// dgdN forces are removed
f[atomi][0] += fi[0]; f[atomi][1] += fi[1]; f[atomi][2] += fi[2];
f[atomj][0] += fj[0]; f[atomj][1] += fj[1]; f[atomj][2] += fj[2];
f[atoml][0] += fl[0]; f[atoml][1] += fl[1]; f[atoml][2] += fl[2];
if (vflag_either) {
rlj[0] = -rjl[0]; rlj[1] = -rjl[1]; rlj[2] = -rjl[2];
v_tally3_thr(this,atomi,atomj,atoml,fi,fl,rij,rlj,thr);
}
}
}
// PIJ force contribution additional term
tmp2 = -VA*0.5*(tmp*dp*dwij)/rijmag;
f[atomi][0] += rij[0]*tmp2;
f[atomi][1] += rij[1]*tmp2;
f[atomi][2] += rij[2]*tmp2;
f[atomj][0] -= rij[0]*tmp2;
f[atomj][1] -= rij[1]*tmp2;
f[atomj][2] -= rij[2]*tmp2;
if (vflag_either) v_tally2_thr(this,atomi,atomj,tmp2,rij,thr);
bij = (0.5*(pij+pji));
return bij;
}
/* ----------------------------------------------------------------------
memory usage of local atom-based arrays
------------------------------------------------------------------------- */
double PairREBOMoSOMP::memory_usage()
{
double bytes = memory_usage_thr();
bytes += PairREBOMoS::memory_usage();
return bytes;
}

View File

@ -0,0 +1,46 @@
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS Development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef PAIR_CLASS
// clang-format off
PairStyle(rebomos/omp,PairREBOMoSOMP);
// clang-format on
#else
#ifndef LMP_PAIR_REBOMOS_OMP_H
#define LMP_PAIR_REBOMOS_OMP_H
#include "pair_rebomos.h"
#include "thr_omp.h"
namespace LAMMPS_NS {
class PairREBOMoSOMP : public PairREBOMoS, public ThrOMP {
public:
PairREBOMoSOMP(class LAMMPS *);
void compute(int, int) override;
double memory_usage() override;
protected:
void FREBO_thr(int ifrom, int ito, int eflag, ThrData *const thr);
void FLJ_thr(int ifrom, int ito, int eflag, ThrData *const thr);
void REBO_neigh_thr();
double bondorder_thr(int, int, double *, double, double, ThrData *const thr);
};
} // namespace LAMMPS_NS
#endif
#endif

View File

@ -0,0 +1,125 @@
---
lammps_version: 7 Feb 2024
tags: slow
date_generated: Thu Feb 22 09:08:59 2024
epsilon: 1e-12
skip_tests:
prerequisites: ! |
pair rebomos
pre_commands: ! |
variable newton_pair delete
if "$(is_active(package,gpu)) > 0.0" then "variable newton_pair index off" else "variable newton_pair index on"
post_commands: ! ""
input_file: in.airebo
pair_style: rebomos
pair_coeff: ! |
* * MoS.rebomos Mo S
extract: ! ""
natoms: 48
init_vdwl: 3158.017726833385
init_coul: 0
init_stress: ! |2-
6.8398718310371441e+03 6.7325636075141883e+03 6.1154248388685965e+03 -3.2850057579078185e+02 -6.6397329123828470e+01 -3.4208234997867203e+02
init_forces: ! |2
1 -3.7681565852737293e+00 2.4378308384489483e+02 -2.6969740060923279e+01
2 2.6266038011491645e+02 -2.0681295165426090e+02 -1.9964225279104706e+01
3 -2.5778010496370018e+02 -2.3678496612327552e+02 4.3829487525746238e+01
4 -1.0244959408607365e+01 -2.6794342328905179e+02 -2.6250177085935768e+01
5 2.2561151172717553e+02 2.0458598509633319e+02 -4.2183143539914880e+01
6 -2.4766208404861507e+02 1.8231884233051196e+02 1.2358374858464346e+01
7 -2.8974107341390795e+01 1.1031227139363692e+02 -1.2014739688866064e+02
8 2.1125868843851663e+02 -2.8863731327540540e+02 1.6869558243398984e+01
9 -3.1045083889038222e+02 -1.7569259168198960e+02 7.9653354234911163e+01
10 3.9886149586070935e+01 -1.0347554263069082e+02 1.5430519714983259e+02
11 1.8975960895859026e+02 1.4943835159807929e+02 -7.3224202319244824e+01
12 -2.1525843617159188e+02 2.2144411990369784e+02 -1.4893230739895195e+01
13 -4.5214798787473534e+00 1.1303681465405538e+02 -1.1385660017739841e+02
14 2.3203040375527121e+02 -3.4422786145586961e+01 1.8438743650405590e+02
15 -9.7170644212253990e+01 -2.9205504121924292e+02 1.9237141908302370e+01
16 -5.1044169101209107e+01 -1.4503490444304657e+02 1.5798442448724001e+02
17 2.8968061091312188e+02 8.7626477818666558e+01 -5.8802357863256212e+01
18 -1.7269858357220591e+02 8.9805161881631591e+01 -1.7847636055101773e+02
19 1.0760757939777642e+02 1.2642591396366257e+02 1.5914528700154095e+01
20 8.4608047558760049e+01 -2.4114295115066687e+02 -8.5792447633922421e+01
21 -8.8196263713344706e+01 -1.2718199182512282e+02 -7.0146571930858386e+01
22 -9.8957412653883708e+01 -1.4706747771082254e+02 -4.1887992372999022e+01
23 1.3739608451158423e+02 2.5576040689729510e+02 3.0309933932861746e+01
24 -1.7919184387909232e+02 1.4014151619269020e+02 1.6188399417577682e+02
25 -7.7347072523993347e+01 1.5555894832740958e+02 2.6182670200573220e+01
26 7.1360176064432650e+01 -2.9346871053231695e+02 -4.0766232856732509e+00
27 -2.6964124483003886e+01 9.8094028485618843e+00 2.4520760165936114e+01
28 1.2261226472559841e+02 -2.1507437048459283e+02 -3.0529457478077248e+01
29 2.2123474818204119e+01 2.8827028167050270e+02 1.0492685172067040e+02
30 -3.0573547162322302e+02 6.5880918489915032e+01 -1.1459287271946665e+02
31 6.0299759271951014e+00 1.7876996651274851e+02 -1.2964028093837922e+02
32 2.3752911820416773e+02 -1.2903240767402318e+02 1.2355068302179771e+02
33 -2.7462402312452838e+02 -5.3957296643601545e+01 9.5908146508348565e+01
34 -2.4514118579997412e+01 -1.0385194449627924e+02 1.4149428440602534e+02
35 1.2613298864651166e+02 6.2171771831118461e+00 -2.0642312645163636e+02
36 -6.9996802234927173e+01 2.9354514776980676e+02 -2.0963604805137543e+01
37 5.0241789394721707e+01 2.4495589528252060e+02 -1.1814425338523709e+01
38 2.2684897209808264e+02 -1.8673318434123004e+02 1.5220428086050066e+00
39 -2.5107271651763259e+02 -1.6443685417603410e+02 -3.8081572318769169e+01
40 -5.6754727284178912e+01 -2.5956532443118618e+02 -5.9343761520548126e+00
41 2.7426370608616236e+02 1.7742153146823480e+02 1.3451000229991498e+01
42 -2.2732796257204490e+02 2.5279459742055184e+02 -2.7020668313372529e+01
43 1.6217419052721431e+02 1.3946372126978235e+02 -2.0623397237537300e+00
44 3.0490806490775839e+01 2.1072542774667330e+01 8.2426559376766466e+00
45 -1.8440339212966003e+02 -2.5521581334939563e+02 2.6487508881411735e+01
46 -3.5020523296396959e+01 -2.5119105337038474e+02 8.0096253171487604e+00
47 3.2722641189388571e+02 9.7949745935413119e+01 -1.1898751818014821e+01
48 -1.3785292104885133e+02 3.2239007811982697e+02 2.4602884867061839e+01
run_vdwl: 838.005031679853
run_coul: 0
run_stress: ! |2-
2.0454406617512559e+03 2.1642975706136021e+03 3.2875013790709349e+03 2.4615001869678809e+02 9.3532964794023911e+01 -1.6795786485689854e+02
run_forces: ! |2
1 -2.5386905249574866e+01 -9.9909927316940710e+01 1.9622022776949393e+00
2 -3.6801215363277215e+01 1.3354608905768052e+02 1.3651128931415545e+02
3 2.1845136723115344e+00 2.3527273580981478e+00 2.4005941692097457e+00
4 -3.7818914621624749e+01 3.2946537814811997e+01 4.3018847892043375e+01
5 9.6010433504280890e+00 4.3327442916171194e+01 -1.0513311611209312e+02
6 8.4308572792324540e+01 -2.3503352214725012e+01 5.0539884405443850e+01
7 -1.1497740491253731e+01 -6.4938790153209212e+01 3.8948855627091397e+01
8 -4.2897157525993697e+00 -3.3530261299383611e+01 9.5574489119024229e+00
9 4.8767710902858741e-01 -3.5176606358955858e+00 -1.4806227207057554e-01
10 -1.4766722110672411e+01 2.3818988804615220e+01 -5.3134339246512809e+01
11 -1.3935431402422819e+02 -1.5665571900752980e+02 -3.7627334252485582e+01
12 7.7074185304589484e+00 -1.2031768398608595e+01 1.8274050209872662e+01
13 2.3670515505343992e+01 -6.4282829210616583e+01 4.6336363412751325e+01
14 -2.5980738378663424e+00 8.4167979467127569e+00 -2.3849686761968631e+00
15 2.6909213334137871e+01 9.4711670949167956e+00 1.4728430099051328e+00
16 2.6072330920174934e+01 1.5861581881675242e+01 -5.1429144994723586e+01
17 -4.5656802478750279e+01 -1.0557685195759221e+02 -1.8486644164722456e+01
18 1.3345348571390588e+02 5.3791289185967734e+01 3.1330462313925089e+01
19 -3.4744179120880638e+01 -2.9727735009574776e+01 1.3758697899848009e+01
20 3.5805745710027459e+00 2.3635583506556830e+00 -9.8641913612550636e-01
21 -1.9112967021807076e+01 2.4093036642722907e+01 -1.8643238887150801e+01
22 -9.0201617792954476e+00 3.7160721932912736e+01 -5.0873237843214003e+00
23 -2.0559670924056718e+01 -1.3037172781831362e+01 -4.1555140102832148e+01
24 3.5016464856031341e+01 -1.2488249708112150e+02 -5.5132899737529639e+00
25 2.4856779395007460e+00 -6.7533673428345381e+01 -1.7153563726726016e+01
26 -8.6470517146734750e+01 -7.9057942497429794e+00 3.8434105758101332e+01
27 3.1062776626038996e+01 2.5568916700234454e+00 -2.3812255018358194e+01
28 -3.6128021960690276e+01 8.8535946500139033e+01 -3.1718315624050986e-01
29 -1.7473599694524488e+01 5.1605700760038529e+00 3.1477016370448561e+00
30 3.2722165297173231e+00 -5.9807188688706105e+00 3.0903475914489444e+01
31 -5.5852599877204412e-01 -3.7635607965114964e+01 5.5407547347738578e+01
32 -4.8419811021707950e+01 1.2083134296973620e+02 -1.4299477119499166e+01
33 2.5993167832212944e+01 5.4415694550334088e+01 -2.2817585641730194e+01
34 1.3632918027769463e+01 1.0165209000060044e+02 -6.0709294862836366e+01
35 -1.7896100047169217e+01 5.7265522876438499e+00 6.7274680861552483e+00
36 -1.8125137765726237e+01 2.7564787465936047e+00 -9.5278575701404478e+00
37 -3.5898678616111592e+00 -7.2362382910010311e+01 -9.3588358281326709e+00
38 -3.6726824963125949e+01 2.0008528283799198e+01 4.2387983046244827e+01
39 1.4756349734330427e+00 3.4387817449154888e+01 4.6004570693407864e+01
40 1.3004687263347805e+01 6.5948251357408196e+01 -9.3870897441198231e+00
41 -9.2360908880622592e+00 3.0113497063365648e+00 -1.1785409504259610e+01
42 -1.1795417170666214e+01 -1.1546754933247897e+01 -1.2188857610119777e+01
43 -6.5511968637617390e-01 -3.9133448932537512e+01 5.5788437875425423e-01
44 -4.2976958767216473e+01 1.8814792063050870e+01 -3.2742042602021932e+01
45 1.8589630046648591e+02 5.3367997582431663e+01 3.8324469380182308e+01
46 2.2463767362468872e+01 7.7485287617829670e+01 2.6113916756613811e+01
47 3.0703470673161828e+00 2.4966324680483410e+01 -5.0826014249556524e+00
48 7.6310071304830785e+01 -9.3082908173611301e+01 -1.1280958703044767e+02
...