Merge branch 'collected-small-changes' into reset-command

This commit is contained in:
Axel Kohlmeyer 2022-11-23 13:38:40 -05:00
commit 4ba604fd37
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
58 changed files with 651 additions and 602 deletions

View File

@ -31,7 +31,6 @@ table above.
* :doc:`bond_style <bond_style>`
* :doc:`bond_write <bond_write>`
* :doc:`boundary <boundary>`
* :doc:`box <box>`
* :doc:`change_box <change_box>`
* :doc:`clear <clear>`
* :doc:`comm_modify <comm_modify>`

View File

@ -25,7 +25,6 @@ Setup simulation box:
:columns: 4
* :doc:`boundary <boundary>`
* :doc:`box <box>`
* :doc:`change_box <change_box>`
* :doc:`create_box <create_box>`
* :doc:`dimension <dimension>`

View File

@ -2,10 +2,11 @@ Removed commands and packages
=============================
This page lists LAMMPS commands and packages that have been removed from
the distribution and provides suggestions for alternatives or replacements.
LAMMPS has special dummy styles implemented, that will stop LAMMPS and
print a suitable error message in most cases, when a style/command is used
that has been removed.
the distribution and provides suggestions for alternatives or
replacements. LAMMPS has special dummy styles implemented, that will
stop LAMMPS and print a suitable error message in most cases, when a
style/command is used that has been removed or will replace the command
with the direct alternative (if available) and print a warning.
Fix ave/spatial and fix ave/spatial/sphere
------------------------------------------
@ -17,6 +18,14 @@ ways through the :doc:`compute chunk/atom <compute_chunk_atom>` command
and then averaging is done using :doc:`fix ave/chunk <fix_ave_chunk>`.
Please refer to the :doc:`chunk HOWTO <Howto_chunk>` section for an overview.
Box command
-----------
.. deprecated:: TBD
The *box* command has been removed and the LAMMPS code changed so it won't
be needed. If present, LAMMPS will ignore the command and print a warning.
Reset_ids, reset_atom_ids, reset_mol_ids commands
-------------------------------------------------

View File

@ -144,11 +144,6 @@ does not change the atom positions due to non-periodicity. In this
mode, if you tilt the system to extreme angles, the simulation will
simply become inefficient, due to the highly skewed simulation box.
The limitation on not creating a simulation box with a tilt factor
skewing the box more than half the distance of the parallel box length
can be overridden via the :doc:`box <box>` command. Setting the *tilt*
keyword to *large* allows any tilt factors to be specified.
Box flips that may occur using the :doc:`fix deform <fix_deform>` or
:doc:`fix npt <fix_nh>` commands can be turned off using the *flip no*
option with either of the commands.

View File

@ -262,6 +262,8 @@ Disable generating a citation reminder (see above) at all.
**-nonbuf**
.. versionadded:: 15Sep2022
Turn off buffering for screen and logfile output. For performance
reasons, output to the screen and logfile is usually buffered, i.e.
output is only written to a file if its buffer - typically 4096 bytes -

View File

@ -25,23 +25,25 @@ The *gaussian* angle style uses the potential:
.. math::
E = -k_B T ln\left(\sum_{i=1}^{n} \frac{A_i}{w_i \sqrt{\pi/2}} exp\left( \frac{-(\theta-\theta_{i})^2}{w_i^2})\right) \right)
E = -k_B T ln\left(\sum_{i=1}^{n} \frac{A_i}{w_i \sqrt{\pi/2}} exp\left( \frac{-2(\theta-\theta_{i})^2}{w_i^2}\right) \right)
This analytical form is a suitable potential for obtaining mesoscale
effective force fields which can reproduce target atomistic
distributions :ref:`(Milano) <Milano1>`.
This analytical form is a suitable potential for obtaining
mesoscale effective force fields which can reproduce target atomistic distributions :ref:`(Milano) <Milano1>`
The following coefficients must be defined for each angle type via the
:doc:`angle_coeff <angle_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read_data <read_data>`
or :doc:`read_restart <read_restart>` commands:
* T temperature at which the potential was derived
* :math:`T` temperature at which the potential was derived
* :math:`n` (integer >=1)
* :math:`A_1` (-)
* :math:`w_1` (-)
* :math:`A_1` (> 0, radians)
* :math:`w_1` (> 0, radians)
* :math:`\theta_1` (degrees)
* ...
* :math:`A_n` (-)
* :math:`w_n` (-)
* :math:`A_n` (> 0, radians)
* :math:`w_n` (> 0, radians)
* :math:`\theta_n` (degrees)

View File

@ -25,33 +25,34 @@ The *gaussian* bond style uses the potential:
.. math::
E = -k_B T ln\left(\sum_{i=1}^{n} \frac{A_i}{w_i \sqrt{\pi/2}} exp\left( \frac{-(r-r_{i})^2}{w_i^2})\right) \right)
E = -k_B T ln\left(\sum_{i=1}^{n} \frac{A_i}{w_i \sqrt{\pi/2}} exp\left( \frac{-2(r-r_{i})^2}{w_i^2}\right)\right)
This analytical form is a suitable potential for obtaining
mesoscale effective force fields which can reproduce target atomistic distributions :ref:`(Milano) <Milano0>`
This analytical form is a suitable potential for obtaining mesoscale
effective force fields which can reproduce target atomistic
distributions :ref:`(Milano) <Milano0>`
The following coefficients must be defined for each bond type via the
:doc:`bond_coeff <bond_coeff>` command as in the example above, or in
the data file or restart files read by the :doc:`read_data <read_data>`
or :doc:`read_restart <read_restart>` commands:
* T temperature at which the potential was derived
* :math:`T` temperature at which the potential was derived
* :math:`n` (integer >=1)
* :math:`A_1` (-)
* :math:`w_1` (-)
* :math:`r_1` (length)
* :math:`A_1` (> 0, distance)
* :math:`w_1` (> 0, distance)
* :math:`r_1` (>= 0, distance)
* ...
* :math:`A_n` (-)
* :math:`w_n` (-)
* :math:`r_n` (length)
* :math:`A_n` (> 0, distance)
* :math:`w_n` (> 0, distance)
* :math:`r_n` (>= 0, distance)
Restrictions
""""""""""""
This bond style can only be used if LAMMPS was built with the
EXTRA-MOLECULE package. See the :doc:`Build package <Build_package>` doc
page for more info.
EXTRA-MOLECULE package. See the :doc:`Build package <Build_package>`
doc page for more info.
Related commands
""""""""""""""""

View File

@ -1,70 +0,0 @@
.. index:: box
box command
===========
Syntax
""""""
.. code-block:: LAMMPS
box keyword value ...
* one or more keyword/value pairs may be appended
* keyword = *tilt*
.. parsed-literal::
*tilt* value = *small* or *large*
Examples
""""""""
.. code-block:: LAMMPS
box tilt large
box tilt small
Description
"""""""""""
Set attributes of the simulation box.
For triclinic (non-orthogonal) simulation boxes, the *tilt* keyword
allows simulation domains to be created with arbitrary tilt factors,
e.g. via the :doc:`create_box <create_box>` or
:doc:`read_data <read_data>` commands. Tilt factors determine how
skewed the triclinic box is; see the :doc:`Howto triclinic <Howto_triclinic>` page for a discussion of triclinic
boxes in LAMMPS.
LAMMPS normally requires that no tilt factor can skew the box more
than half the distance of the parallel box length, which is the first
dimension in the tilt factor (x for xz). If *tilt* is set to
*small*, which is the default, then an error will be
generated if a box is created which exceeds this limit. If *tilt*
is set to *large*, then no limit is enforced. You can create
a box with any tilt factors you wish.
Note that if a simulation box has a large tilt factor, LAMMPS will run
less efficiently, due to the large volume of communication needed to
acquire ghost atoms around a processor's irregular-shaped sub-domain.
For extreme values of tilt, LAMMPS may also lose atoms and generate an
error.
Restrictions
""""""""""""
This command cannot be used after the simulation box is defined by a
:doc:`read_data <read_data>` or :doc:`create_box <create_box>` command or
:doc:`read_restart <read_restart>` command.
Related commands
""""""""""""""""
none
Default
"""""""
The default value is tilt = small.

View File

@ -13,7 +13,6 @@ Commands
bond_style
bond_write
boundary
box
change_box
clear
comm_modify

View File

@ -66,20 +66,21 @@ positive or negative values and are called "tilt factors" because they
are the amount of displacement applied to faces of an originally
orthogonal box to transform it into the parallelepiped.
By default, a *prism* region used with the create_box command must
have tilt factors :math:`(xy,xz,yz)` that do not skew the box more than half
By default, a *prism* region used with the create_box command must have
tilt factors :math:`(xy,xz,yz)` that do not skew the box more than half
the distance of the parallel box length. For example, if
:math:`x_\text{lo} = 2` and :math:`x_\text{hi} = 12`, then the :math:`x`
box length is 10 and the :math:`xy` tilt factor must be between :math:`-5` and
:math:`5`. Similarly, both :math:`xz` and :math:`yz` must be between
:math:`-(x_\text{hi}-x_\text{lo})/2` and :math:`+(y_\text{hi}-y_\text{lo})/2`.
Note that this is not a limitation, since if the maximum tilt factor is 5 (as
in this example), then configurations with tilt :math:`= \dots, -15`,
:math:`-5`, :math:`5`, :math:`15`, :math:`25, \dots`
are all geometrically equivalent. If you wish to define a box with tilt
factors that exceed these limits, you can use the :doc:`box tilt <box>`
command, with a setting of *large*\ ; a setting of *small* is the
default.
box length is 10 and the :math:`xy` tilt factor must be between
:math:`-5` and :math:`5`. Similarly, both :math:`xz` and :math:`yz`
must be between :math:`-(x_\text{hi}-x_\text{lo})/2` and
:math:`+(y_\text{hi}-y_\text{lo})/2`. Note that this is not a
limitation, since if the maximum tilt factor is 5 (as in this example),
then configurations with tilt :math:`= \dots, -15`, :math:`-5`,
:math:`5`, :math:`15`, :math:`25, \dots` are all geometrically
equivalent. Simulations with large tilt factors will run inefficiently,
since they require more ghost atoms and thus more communication. With
very large tilt factors, LAMMPS will eventually produce incorrect
trajectories and stop with errors due to lost atoms or similar.
See the :doc:`Howto triclinic <Howto_triclinic>` page for a
geometric description of triclinic boxes, as defined by LAMMPS, and

View File

@ -69,7 +69,7 @@ Syntax
yes/no = do or do not draw simulation box lines
diam = diameter of box lines as fraction of shortest box length
*axes* values = axes length diam = draw xyz axes
axes = *yes* or *no = do or do not draw xyz axes lines next to simulation box
axes = *yes* or *no* = do or do not draw xyz axes lines next to simulation box
length = length of axes lines as fraction of respective box lengths
diam = diameter of axes lines as fraction of shortest box length
*subbox* values = lines diam = draw outline of processor sub-domains

View File

@ -640,7 +640,7 @@ specified by the *max_rxn* keyword.
.. versionadded:: TBD
The *rate_limit* keyword can enforce an upper limit on the overall
rate of the reaction. The number of reaction occurences is limited to
rate of the reaction. The number of reaction occurrences is limited to
Nlimit within an interval of Nsteps timesteps. No reactions are
permitted to occur within the first Nsteps timesteps of the first run
after reading a data file. Nlimit can be specified with an equal-style

View File

@ -44,19 +44,23 @@ Examples
Description
"""""""""""
This fix can be used to simulate non-equilibrium molecular dynamics
(NEMD) under diagonal flow fields, including uniaxial and bi-axial
flow. Simulations under continuous extensional flow may be carried
out for an indefinite amount of time. It is an implementation of the
boundary conditions from :ref:`(Dobson) <Dobson>`, and also uses numerical
These fixes can be used to simulate non-equilibrium molecular dynamics
(NEMD) under diagonal flow fields, including uniaxial and bi-axial flow.
Simulations under continuous extensional flow may be carried out for an
indefinite amount of time. It is an implementation of the boundary
conditions from :ref:`(Dobson) <Dobson>`, and also uses numerical
lattice reduction as was proposed by :ref:`(Hunt) <Hunt>`. The lattice
reduction algorithm is from :ref:`(Semaev) <Semaev>`. The fix is intended for
simulations of homogeneous flows, and integrates the SLLOD equations
of motion, originally proposed by Hoover and Ladd (see :ref:`(Evans and Morriss) <Sllod>`). Additional detail about this implementation can be
found in :ref:`(Nicholson and Rutledge) <Nicholson>`.
reduction algorithm is from :ref:`(Semaev) <Semaev>`. The fix is
intended for simulations of homogeneous flows, and integrates the SLLOD
equations of motion, originally proposed by Hoover and Ladd (see
:ref:`(Evans and Morriss) <Sllod>`). Additional detail about this
implementation can be found in :ref:`(Nicholson and Rutledge)
<Nicholson>`.
Note that NEMD simulations of a continuously strained system can be
performed using the :doc:`fix deform <fix_deform>`, :doc:`fix nvt/sllod <fix_nvt_sllod>`, and :doc:`compute temp/deform <compute_temp_deform>` commands.
performed using the :doc:`fix deform <fix_deform>`, :doc:`fix nvt/sllod
<fix_nvt_sllod>`, and :doc:`compute temp/deform <compute_temp_deform>`
commands.
The applied flow field is set by the *eps* keyword. The values
*edot_x* and *edot_y* correspond to the strain rates in the xx and yy
@ -73,11 +77,11 @@ to -(*edot_x* + *edot_y*).
The boundary conditions require a simulation box that does not have a
consistent alignment relative to the applied flow field. Since LAMMPS
utilizes an upper-triangular simulation box, it is not possible to
express the evolving simulation box in the same coordinate system as
the flow field. This fix keeps track of two coordinate systems: the
flow frame, and the upper triangular LAMMPS frame. The coordinate
systems are related to each other through the QR decomposition, as is
illustrated in the image below.
express the evolving simulation box in the same coordinate system as the
flow field. These fixes keep track of two coordinate systems: the flow
frame, and the upper triangular LAMMPS frame. The coordinate systems are
related to each other through the QR decomposition, as is illustrated in
the image below.
.. image:: JPG/uef_frames.jpg
:align: center
@ -99,12 +103,12 @@ using the dump command will be in the LAMMPS frame unless the
----------
Temperature control is achieved with the default Nose-Hoover style
thermostat documented in :doc:`fix npt <fix_nh>`. When this fix is
thermostat documented in :doc:`fix nvt <fix_nh>`. When this fix is
active, only the peculiar velocity of each atom is stored, defined as
the velocity relative to the streaming velocity. This is in contrast
to :doc:`fix nvt/sllod <fix_nvt_sllod>`, which uses a lab-frame
velocity, and removes the contribution from the streaming velocity in
order to compute the temperature.
the velocity relative to the streaming velocity. This is in contrast to
:doc:`fix nvt/sllod <fix_nvt_sllod>`, which uses a lab-frame velocity,
and removes the contribution from the streaming velocity in order to
compute the temperature.
Pressure control is achieved using the default Nose-Hoover barostat
documented in :doc:`fix npt <fix_nh>`. There are two ways to control the
@ -156,8 +160,8 @@ The following commands will not work:
----------
These fix computes a temperature and pressure each timestep. To do
this, it creates its own computes of style "temp/uef" and
These fixes compute a temperature and pressure each timestep. To do
this, they create their own computes of style "temp/uef" and
"pressure/uef", as if one of these two sets of commands had been
issued:
@ -169,18 +173,19 @@ issued:
compute fix-ID_temp all temp/uef
compute fix-ID_press all pressure/uef fix-ID_temp
See the :doc:`compute temp/uef <compute_temp_uef>` and :doc:`compute pressure/uef <compute_pressure_uef>` commands for details. Note
that the IDs of the new computes are the fix-ID + underscore + "temp"
or fix_ID + underscore + "press".
See the :doc:`compute temp/uef <compute_temp_uef>` and :doc:`compute
pressure/uef <compute_pressure_uef>` commands for details. Note that
the IDs of the new computes are the fix-ID + underscore + "temp" or
fix_ID + underscore + "press".
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
The fix writes the state of all the thermostat and barostat variables,
as well as the cumulative strain applied, to :doc:`binary restart files <restart>`. See the :doc:`read_restart <read_restart>` command
for info on how to re-specify a fix in an input script that reads a
restart file, so that the operation of the fix continues in an
uninterrupted fashion.
as well as the cumulative strain applied, to :doc:`binary restart files
<restart>`. See the :doc:`read_restart <read_restart>` command for info
on how to re-specify a fix in an input script that reads a restart file,
so that the operation of the fix continues in an uninterrupted fashion.
.. note::
@ -189,43 +194,41 @@ uninterrupted fashion.
not contain the cumulative applied strain, will this keyword be
necessary.
This fix can be used with the :doc:`fix_modify <fix_modify>` *temp* and
*press* options. The temperature and pressure computes used must be of
type *temp/uef* and *pressure/uef*\ .
These fixes can be used with the :doc:`fix_modify <fix_modify>` *temp*
and *press* options. The temperature and pressure computes used must be
of type *temp/uef* and *pressure/uef*\ .
This fix computes the same global scalar and vector quantities as :doc:`fix npt <fix_nh>`.
These fixes compute the same global scalar and vector quantities as
:doc:`fix nvt andnpt <fix_nh>`.
The fix is not invoked during :doc:`energy minimization <minimize>`.
These fixes are not invoked during :doc:`energy minimization <minimize>`.
Restrictions
""""""""""""
This fix is part of the UEF package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package <Build_package>` page for more info.
These fixes are part of the UEF package. They are only enabled if LAMMPS
was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
Due to requirements of the boundary conditions, when the *strain*
keyword is set to zero (or unset), the initial simulation box must be
cubic and have style triclinic. If the box is initially of type ortho,
use :doc:`change_box <change_box>` before invoking the fix.
.. note::
When resuming from restart files, you may need to use :doc:`box tilt
large <box>` since LAMMPS has internal criteria from lattice
reduction that are not the same as the criteria in the numerical
lattice reduction algorithm.
Related commands
""""""""""""""""
:doc:`fix nvt <fix_nh>`, :doc:`fix nvt/sllod <fix_nvt_sllod>`, :doc:`compute temp/uef <compute_temp_uef>`, :doc:`compute pressure/uef <compute_pressure_uef>`, :doc:`dump cfg/uef <dump_cfg_uef>`
:doc:`fix nvt <fix_nh>`, :doc:`fix npt <fix_nh>`, `fix nvt/sllod
:doc:<fix_nvt_sllod>`, `compute temp/uef <compute_temp_uef>`,
:doc::doc:`compute pressure/uef <compute_pressure_uef>`, `dump cfg/uef
:doc:<dump_cfg_uef>`
Default
"""""""
The default keyword values specific to this fix are exy = xyz, strain
= 0 0. The remaining defaults are the same as for :doc:`fix npt <fix_nh>`
except tchain = 1. The reason for this change is given in
The default keyword values specific to these fixes are exy = xyz, strain
= 0 0. The remaining defaults are the same as for :doc:`fix nvt or npt
<fix_nh>` except tchain = 1. The reason for this change is given in
:doc:`fix nvt/sllod <fix_nvt_sllod>`.
----------

View File

@ -82,7 +82,7 @@ mixing as described below:
* :math:`\epsilon` = well depth (energy units)
* :math:`\sigma` = minimum effective particle radii (distance units)
* :math:`\zeta` = tune parameter for the slope of the attractive branch
* :math:`\zeta` = tuning parameter for the slope of the attractive branch
* :math:`\mu` = parameter related to bending rigidity
* :math:`\beta` = parameter related to the spontaneous curvature
* cutoff (distance units)

View File

@ -129,6 +129,8 @@ The first argument of the *python* command is either the *source*
keyword or the name of a Python function. This defines the mode
of the python command.
.. versionchanged:: TBD
If the *source* keyword is used, it is followed by either a file name or
the *here* keyword. No other keywords can be used. The *here* keyword
is followed by a string with python commands, either on a single line

View File

@ -340,16 +340,20 @@ and are called "tilt factors" because they are the amount of
displacement applied to faces of an originally orthogonal box to
transform it into the parallelepiped.
By default, the tilt factors (xy,xz,yz) can not skew the box more than
half the distance of the corresponding parallel box length. For
example, if xlo = 2 and xhi = 12, then the x box length is 10 and the
xy tilt factor must be between -5 and 5. Similarly, both xz and yz
must be between -(xhi-xlo)/2 and +(yhi-ylo)/2. Note that this is not
a limitation, since if the maximum tilt factor is 5 (as in this
example), then configurations with tilt = ..., -15, -5, 5, 15, 25,
... are all geometrically equivalent. If you wish to define a box
with tilt factors that exceed these limits, you can use the :doc:`box tilt <box>` command, with a setting of *large*\ ; a setting of
*small* is the default.
The tilt factors (xy,xz,yz) should not skew the box more than half the
distance of the corresponding parallel box length. For example, if
:math:`x_\text{lo} = 2` and :math:`x_\text{hi} = 12`, then the :math:`x`
box length is 10 and the :math:`xy` tilt factor must be between
:math:`-5` and :math:`5`. Similarly, both :math:`xz` and :math:`yz`
must be between :math:`-(x_\text{hi}-x_\text{lo})/2` and
:math:`+(y_\text{hi}-y_\text{lo})/2`. Note that this is not a
limitation, since if the maximum tilt factor is 5 (as in this example),
then configurations with tilt :math:`= \dots, -15`, :math:`-5`,
:math:`5`, :math:`15`, :math:`25, \dots` are all geometrically
equivalent. Simulations with large tilt factors will run inefficiently,
since they require more ghost atoms and thus more communication. With
very large tilt factors, LAMMPS will eventually produce incorrect
trajectories and stop with errors due to lost atoms or similar.
See the :doc:`Howto triclinic <Howto_triclinic>` page for a
geometric description of triclinic boxes, as defined by LAMMPS, and

View File

@ -2360,6 +2360,7 @@ Ng
nghost
Nghost
Ngpu
ngpus
Ngyuen
nh
nharmonic
@ -2385,6 +2386,7 @@ nktv
nl
nlayers
nlen
Nlimit
nlines
Nlines
nlo
@ -2474,6 +2476,7 @@ nsq
Nstart
nstats
Nstep
Nsteps
nsteplast
Nstop
nsub
@ -3091,6 +3094,7 @@ Rutuparna
rx
rxd
rxnave
rxnbond
rxnsum
ry
Ryckaert

View File

@ -0,0 +1 @@
../mols/data.0.lmp

View File

@ -0,0 +1 @@
../mols/data.1.lmp

View File

@ -0,0 +1 @@
../mols/data.0.lmp

View File

@ -0,0 +1 @@
../mols/data.1.lmp

View File

@ -0,0 +1 @@
../mols/data.0.lmp

View File

@ -0,0 +1 @@
../mols/data.1.lmp

View File

@ -0,0 +1 @@
../mols/data.lmp

View File

@ -0,0 +1 @@
../mols/data.lmp

View File

@ -0,0 +1 @@
../mols/data.lmp

View File

@ -0,0 +1 @@
../mols/data.lmp

View File

@ -0,0 +1 @@
../mols/data.lmp

View File

@ -0,0 +1 @@
../mols/data.lmp

View File

@ -22,7 +22,7 @@ pair_style hybrid/overlay sph/rhosum 1 sph/idealgas
pair_coeff * * sph/rhosum 4.0
pair_coeff * * sph/idealgas 0.75 4.0
compute rhoatom all shp/rho/atom
compute rhoatom all sph/rho/atom
compute ieatom all sph/e/atom
compute esph all reduce sum c_ieatom # total internal energy
compute ke all ke

View File

@ -28,8 +28,8 @@
using namespace LAMMPS_NS;
using namespace MathConst;
#define SMAL 0.001
#define SMALL 1.0e-8
static constexpr double SMALL = 0.001;
static constexpr double SMALLG = 2.0e-308;
/* ---------------------------------------------------------------------- */
@ -112,7 +112,7 @@ void AngleGaussian::compute(int eflag, int vflag)
if (c < -1.0) c = -1.0;
s = sqrt(1.0 - c * c);
if (s < SMAL) s = SMAL;
if (s < SMALL) s = SMALL;
s = 1.0 / s;
// force & energy
@ -123,13 +123,15 @@ void AngleGaussian::compute(int eflag, int vflag)
for (int i = 0; i < nterms[type]; i++) {
dtheta = theta - theta0[type][i];
prefactor = (alpha[type][i] / (width[type][i] * sqrt(MY_PI2)));
exponent = -2 * dtheta * dtheta / (width[type][i] * width[type][i]);
exponent = -2.0 * dtheta * dtheta / (width[type][i] * width[type][i]);
g_i = prefactor * exp(exponent);
sum_g_i += g_i;
sum_numerator += g_i * dtheta / (width[type][i] * width[type][i]);
}
if (sum_g_i < SMALL) sum_g_i = SMALL;
// avoid overflow
if (sum_g_i < sum_numerator * SMALLG) sum_g_i = sum_numerator * SMALLG;
if (eflag) eangle = -(force->boltz * angle_temperature[type]) * log(sum_g_i);
// I should check about the sign of this expression
@ -198,14 +200,16 @@ void AngleGaussian::allocate()
void AngleGaussian::coeff(int narg, char **arg)
{
if (narg < 6) error->all(FLERR, "Incorrect args for angle coefficients");
if (narg < 6) utils::missing_cmd_args(FLERR, "angle_coeff", error);
int ilo, ihi;
utils::bounds(FLERR, arg[0], 1, atom->nangletypes, ilo, ihi, error);
double angle_temperature_one = utils::numeric(FLERR, arg[1], false, lmp);
int n = utils::inumeric(FLERR, arg[2], false, lmp);
if (narg != 3 * n + 3) error->all(FLERR, "Incorrect args for angle coefficients");
if (n < 1) error->all(FLERR, "Invalid angle style gaussian value for n: {}", n);
if (narg != 3 * n + 3) utils::missing_cmd_args(FLERR, "angle_coeff", error);
if (!allocated) allocate();
@ -223,7 +227,9 @@ void AngleGaussian::coeff(int narg, char **arg)
theta0[i] = new double[n];
for (int j = 0; j < n; j++) {
alpha[i][j] = utils::numeric(FLERR, arg[3 + 3 * j], false, lmp);
if (alpha[i][j] <= 0.0) error->all(FLERR, "Invalid value for A_{}: {}", j, alpha[i][j]);
width[i][j] = utils::numeric(FLERR, arg[4 + 3 * j], false, lmp);
if (width[i][j] <= 0.0) error->all(FLERR, "Invalid value for w_{}: {}", j, width[i][j]);
theta0[i][j] = utils::numeric(FLERR, arg[5 + 3 * j], false, lmp) * MY_PI / 180.0;
setflag[i] = 1;
}

View File

@ -27,7 +27,7 @@
using namespace LAMMPS_NS;
using namespace MathConst;
#define SMALL 1.0e-10
static constexpr double SMALL = 2.0e-308;
/* ---------------------------------------------------------------------- */
@ -92,15 +92,16 @@ void BondGaussian::compute(int eflag, int vflag)
for (int i = 0; i < nterms[type]; i++) {
dr = r - r0[type][i];
prefactor = (alpha[type][i] / (width[type][i] * sqrt(MY_PI2)));
exponent = -2 * dr * dr / (width[type][i] * width[type][i]);
exponent = -2.0 * dr * dr / (width[type][i] * width[type][i]);
g_i = prefactor * exp(exponent);
sum_g_i += g_i;
sum_numerator += g_i * dr / (width[type][i] * width[type][i]);
}
// force & energy
if (sum_g_i < SMALL) sum_g_i = SMALL;
// avoid overflow
if (sum_g_i < sum_numerator * SMALL) sum_g_i = sum_numerator * SMALL;
// force & energy
if (r > 0.0)
fbond = -4.0 * (force->boltz * bond_temperature[type]) * (sum_numerator / sum_g_i) / r;
else
@ -153,14 +154,15 @@ void BondGaussian::allocate()
void BondGaussian::coeff(int narg, char **arg)
{
if (narg < 6) error->all(FLERR, "Incorrect args for bond coefficients");
if (narg < 6) utils::missing_cmd_args(FLERR, "bond_coeff", error);
int ilo, ihi;
utils::bounds(FLERR, arg[0], 1, atom->nbondtypes, ilo, ihi, error);
double bond_temp_one = utils::numeric(FLERR, arg[1], false, lmp);
int n = utils::inumeric(FLERR, arg[2], false, lmp);
if (narg != 3 * n + 3) error->all(FLERR, "Incorrect args for bond coefficients");
if (n < 1) error->all(FLERR, "Invalid bond style gaussian value for n: {}", n);
if (narg != 3 * n + 3) utils::missing_cmd_args(FLERR, "bond_coeff", error);
if (!allocated) allocate();
@ -176,8 +178,11 @@ void BondGaussian::coeff(int narg, char **arg)
r0[i] = new double[n];
for (int j = 0; j < n; j++) {
alpha[i][j] = utils::numeric(FLERR, arg[3 + 3 * j], false, lmp);
if (alpha[i][j] <= 0.0) error->all(FLERR, "Invalid value for A_{}: {}", j, alpha[i][j]);
width[i][j] = utils::numeric(FLERR, arg[4 + 3 * j], false, lmp);
if (width[i][j] <= 0.0) error->all(FLERR, "Invalid value for w_{}: {}", j, width[i][j]);
r0[i][j] = utils::numeric(FLERR, arg[5 + 3 * j], false, lmp);
if (r0[i][j] <= 0.0) error->all(FLERR, "Invalid value for r0_{}: {}", j, r0[i][j]);
setflag[i] = 1;
}
count++;

View File

@ -18,8 +18,6 @@
#include "pair_nm_cut.h"
#include <cmath>
#include <cstring>
#include "atom.h"
#include "comm.h"
#include "force.h"
@ -28,6 +26,8 @@
#include "memory.h"
#include "error.h"
#include <cmath>
#include <cstring>
using namespace LAMMPS_NS;
using namespace MathConst;

View File

@ -223,8 +223,7 @@ void PairNMCutCoulCut::settings(int narg, char **arg)
void PairNMCutCoulCut::coeff(int narg, char **arg)
{
if (narg < 6 || narg > 8)
error->all(FLERR,"Incorrect args for pair coefficients");
if (narg < 6 || narg > 8) error->all(FLERR,"Incorrect args for pair coefficients");
if (!allocated) allocate();
int ilo,ihi,jlo,jhi;
@ -238,8 +237,8 @@ void PairNMCutCoulCut::coeff(int narg, char **arg)
double cut_lj_one = cut_lj_global;
double cut_coul_one = cut_coul_global;
if (narg >= 7) cut_coul_one = cut_lj_one = utils::numeric(FLERR,arg[4],false,lmp);
if (narg == 8) cut_coul_one = utils::numeric(FLERR,arg[5],false,lmp);
if (narg >= 7) cut_coul_one = cut_lj_one = utils::numeric(FLERR,arg[6],false,lmp);
if (narg == 8) cut_coul_one = utils::numeric(FLERR,arg[7],false,lmp);
int count = 0;
for (int i = ilo; i <= ihi; i++) {

View File

@ -277,7 +277,7 @@ void PairNMCutCoulLong::coeff(int narg, char **arg)
double mm_one = utils::numeric(FLERR,arg[5],false,lmp);
double cut_lj_one = cut_lj_global;
if (narg == 7) cut_lj_one = utils::numeric(FLERR,arg[4],false,lmp);
if (narg == 7) cut_lj_one = utils::numeric(FLERR,arg[6],false,lmp);
int count = 0;
for (int i = ilo; i <= ihi; i++) {

View File

@ -190,26 +190,34 @@ void ComputeFEP::init()
Perturb *pert = &perturb[m];
pert->ivar = input->variable->find(pert->var);
if (pert->ivar < 0) error->all(FLERR, "Variable name for compute fep does not exist");
if (pert->ivar < 0)
error->all(FLERR, "Variable name {} for compute fep does not exist", pert->var);
if (!input->variable->equalstyle(pert->ivar))
error->all(FLERR, "Variable for compute fep is of invalid style");
error->all(FLERR, "Variable {} for compute fep is of invalid style", pert->var);
if (force->pair == nullptr) error->all(FLERR, "compute fep pair requires pair interactions");
if (pert->which == PAIR) {
pairflag = 1;
Pair *pair = nullptr;
if (lmp->suffix_enable) {
if (lmp->suffix) {
auto pstyle = fmt::format("{}/{}", pert->pstyle, lmp->suffix);
pair = force->pair_match(pstyle, 1);
}
if ((pair == nullptr) && lmp->suffix2) {
auto pstyle = fmt::format("{}/{}", pert->pstyle, lmp->suffix2);
pair = force->pair_match(pstyle, 1);
}
}
if (lmp->suffix_enable)
pair = force->pair_match(std::string(pert->pstyle)+"/"+lmp->suffix,1);
if (pair == nullptr) pair = force->pair_match(pert->pstyle,1);
if (pair == nullptr) pair = force->pair_match(pert->pstyle, 1);
if (pair == nullptr)
error->all(FLERR,
"compute fep pair style "
"does not exist");
error->all(FLERR, "compute fep pair style {} does not exist", pert->pstyle);
void *ptr = pair->extract(pert->pparam, pert->pdim);
if (ptr == nullptr) error->all(FLERR, "compute fep pair style param not supported");
if (ptr == nullptr)
error->all(FLERR, "compute fep pair style param {} not supported", pert->pparam);
pert->array = (double **) ptr;

View File

@ -96,6 +96,7 @@ PairPACEExtrapolation::PairPACEExtrapolation(LAMMPS *lmp) : Pair(lmp)
aceimpl = new ACEALImpl;
scale = nullptr;
flag_compute_extrapolation_grade = 0;
extrapolation_grade_gamma = nullptr;
}

View File

@ -51,7 +51,6 @@ class PairPACEExtrapolation : public Pair {
void allocate();
std::vector<std::string> element_names; // list of elements (used by dump pace/extrapolation)
int nelements; // # of unique elements
double *extrapolation_grade_gamma; //per-atom gamma value
int flag_compute_extrapolation_grade;

View File

@ -22,6 +22,7 @@ Contributing Author: Jacob Gissinger (jacob.r.gissinger@gmail.com)
#include "atom_vec.h"
#include "citeme.h"
#include "comm.h"
#include "compute.h"
#include "domain.h"
#include "error.h"
#include "fix_bond_history.h"
@ -118,10 +119,8 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) :
fix3 = nullptr;
reset_mol_ids = nullptr;
if (narg < 8) error->all(FLERR,"Illegal fix bond/react command: " "too few arguments");
if (narg < 8) utils::missing_cmd_args(FLERR,"fix bond/react", error);
MPI_Comm_rank(world,&me);
MPI_Comm_size(world,&nprocs);
newton_bond = force->newton_bond;
restart_global = 1;
@ -494,7 +493,7 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) :
for (int i = 0; i < nreacts; i++) {
for (int j = 0; j < nconstraints[i]; j++) {
if (constraints[j][i].type == ARRHENIUS) {
rrhandom[tmp++] = new RanMars(lmp,(int) constraints[j][i].par[4] + me);
rrhandom[tmp++] = new RanMars(lmp,(int) constraints[j][i].par[4] + comm->me);
}
}
}
@ -529,7 +528,7 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) :
random = new RanMars*[nreacts];
for (int i = 0; i < nreacts; i++) {
random[i] = new RanMars(lmp,seed[i] + me);
random[i] = new RanMars(lmp,seed[i] + comm->me);
}
// set comm sizes needed by this fix
@ -1251,6 +1250,7 @@ void FixBondReact::close_partner()
void FixBondReact::superimpose_algorithm()
{
const int nprocs = comm->nprocs;
local_num_mega = 0;
ghostly_num_mega = 0;
@ -1400,7 +1400,7 @@ void FixBondReact::superimpose_algorithm()
MPI_Allreduce(&local_rxn_count[0],&reaction_count[0],nreacts,MPI_INT,MPI_SUM,world);
int rxnflag = 0;
if (me == 0)
if (comm->me == 0)
for (int i = 0; i < nreacts; i++) {
reaction_count_total[i] += reaction_count[i] + ghostly_rxn_count[i];
rxnflag += reaction_count[i] + ghostly_rxn_count[i];
@ -1440,7 +1440,7 @@ void FixBondReact::superimpose_algorithm()
memory->create(local_rxncounts,nprocs,"bond/react:local_rxncounts");
memory->create(all_localskips,nprocs,"bond/react:all_localskips");
MPI_Gather(&local_rxn_count[i],1,MPI_INT,local_rxncounts,1,MPI_INT,0,world);
if (me == 0) {
if (comm->me == 0) {
int delta_rxn = reaction_count[i] + ghostly_rxn_count[i];
// when using variable input for rate_limit, rate_limit_overstep could be > delta_rxn (below)
// we need to limit overstep to the number of reactions on this timestep
@ -2615,7 +2615,7 @@ void FixBondReact::find_landlocked_atoms(int myrxn)
}
// also, if atoms change number of bonds, but aren't landlocked, that could be bad
if (me == 0)
if (comm->me == 0)
for (int i = 0; i < twomol->natoms; i++) {
if ((create_atoms[i][myrxn] == 0) &&
(twomol_nxspecial[i][0] != onemol_nxspecial[equivalences[i][1][myrxn]-1][0]) &&
@ -2947,6 +2947,7 @@ broadcast entries of mega_glove which contain nonlocal atoms for perusal by all
void FixBondReact::ghost_glovecast()
{
#if !defined(MPI_STUBS)
const int nprocs = comm->nprocs;
global_megasize = 0;
@ -2965,7 +2966,7 @@ void FixBondReact::ghost_glovecast()
int *allstarts = new int[nprocs];
int start = 0;
for (int i = 0; i < me; i++) {
for (int i = 0; i < comm->me; i++) {
start += allncols[i];
}
MPI_Allgather(&start, 1, MPI_INT, allstarts, 1, MPI_INT, world);
@ -2993,7 +2994,7 @@ void FixBondReact::ghost_glovecast()
}
}
// let's send to root, dedup, then broadcast
if (me == 0) {
if (comm->me == 0) {
MPI_Gatherv(MPI_IN_PLACE, ghostly_num_mega, column, // Note: some values ignored for MPI_IN_PLACE
&(global_mega_glove[0][0]), allncols, allstarts,
column, 0, world);
@ -3003,7 +3004,7 @@ void FixBondReact::ghost_glovecast()
column, 0, world);
}
if (me == 0) dedup_mega_gloves(GLOBAL); // global_mega_glove mode
if (comm->me == 0) dedup_mega_gloves(GLOBAL); // global_mega_glove mode
MPI_Bcast(&global_megasize,1,MPI_INT,0,world);
MPI_Bcast(&(global_mega_glove[0][0]), global_megasize, column, 0, world);
@ -3745,7 +3746,7 @@ int FixBondReact::insert_atoms(tagint **my_mega_glove, int iupdate)
Superpose3D<double, double **> superposer(n2superpose);
int fitroot = 0;
if (ifit >= 0 && ifit < atom->nlocal) {
fitroot = me;
fitroot = comm->me;
// get 'temperatere' averaged over site, used for created atoms' vels
t = get_temperature(my_mega_glove,1,iupdate);
@ -3763,7 +3764,8 @@ int FixBondReact::insert_atoms(tagint **my_mega_glove, int iupdate)
int ipre = equivalences[j][1][rxnID]-1; // equiv pre-reaction template index
if (!create_atoms[j][rxnID] && !delete_atoms[ipre][rxnID]) {
if (atom->map(my_mega_glove[ipre+1][iupdate]) < 0) {
error->warning(FLERR," eligible atoms skipped for created-atoms fit on rank {}\n",me);
error->warning(FLERR," eligible atoms skipped for created-atoms fit on rank {}\n",
comm->me);
continue;
}
iatom = atom->map(my_mega_glove[ipre+1][iupdate]);
@ -3791,7 +3793,7 @@ int FixBondReact::insert_atoms(tagint **my_mega_glove, int iupdate)
if (create_atoms[m][rxnID] == 1) {
// apply optimal rotation/translation for created atom coords
// also map coords back into simulation box
if (fitroot == me) {
if (fitroot == comm->me) {
MathExtra::matvec(rotmat,twomol->x[m],coords[m]);
for (int i = 0; i < 3; i++) coords[m][i] += superposer.T[i];
imageflags[m] = atom->image[ifit];
@ -3879,7 +3881,7 @@ int FixBondReact::insert_atoms(tagint **my_mega_glove, int iupdate)
int root = 0;
if (flag) {
root = me;
root = comm->me;
atom->avec->create_atom(twomol->type[m],coords[m]);
int n = atom->nlocal - 1;
@ -4025,7 +4027,7 @@ void FixBondReact::read_map_file(int myrxn)
while (strlen(keyword)) {
if (strcmp(keyword,"InitiatorIDs") == 0 || strcmp(keyword,"BondingIDs") == 0) {
if (strcmp(keyword,"BondingIDs") == 0)
if (me == 0) error->warning(FLERR,"Fix bond/react: The BondingIDs section title has been deprecated. Please use InitiatorIDs instead.");
if (comm->me == 0) error->warning(FLERR,"Fix bond/react: The BondingIDs section title has been deprecated. Please use InitiatorIDs instead.");
bondflag = 1;
readline(line);
sscanf(line,"%d",&ibonding[myrxn]);
@ -4291,7 +4293,7 @@ void FixBondReact::open(char *file)
void FixBondReact::readline(char *line)
{
int n;
if (me == 0) {
if (comm->me == 0) {
if (fgets(line,MAXLINE,fp) == nullptr) n = 0;
else n = strlen(line) + 1;
}
@ -4308,7 +4310,7 @@ void FixBondReact::parse_keyword(int flag, char *line, char *keyword)
// eof is set to 1 if any read hits end-of-file
int eof = 0;
if (me == 0) {
if (comm->me == 0) {
if (fgets(line,MAXLINE,fp) == nullptr) eof = 1;
while (eof == 0 && strspn(line," \t\n\r") == strlen(line)) {
if (fgets(line,MAXLINE,fp) == nullptr) eof = 1;
@ -4327,7 +4329,7 @@ void FixBondReact::parse_keyword(int flag, char *line, char *keyword)
// bcast keyword line to all procs
int n;
if (me == 0) n = strlen(line) + 1;
if (comm->me == 0) n = strlen(line) + 1;
MPI_Bcast(&n,1,MPI_INT,0,world);
MPI_Bcast(line,n,MPI_CHAR,0,world);
}
@ -4492,7 +4494,7 @@ void FixBondReact::write_restart(FILE *fp)
memcpy(rbuf,&store_rxn_count[0][0],sizeof(int)*rbufcount);
}
if (me == 0) {
if (comm->me == 0) {
int size = nreacts*sizeof(Set)+(rbufcount+1)*sizeof(int);
fwrite(&size,sizeof(int),1,fp);
fwrite(&revision,sizeof(int),1,fp);

View File

@ -25,7 +25,6 @@ FixStyle(bond/react,FixBondReact);
#define LMP_FIX_BOND_REACT_H
#include "fix.h"
#include "compute.h"
#include <map>
#include <set>
@ -55,7 +54,6 @@ class FixBondReact : public Fix {
double memory_usage() override;
private:
int me, nprocs;
int newton_bond;
int nreacts;
int *nevery;
@ -236,7 +234,7 @@ class FixBondReact : public Fix {
std::vector<std::string> customvarstrs;
int nvvec;
double **vvec; // per-atom vector to store custom constraint atom-style variable values
Compute *cperbond; // pointer to 'compute bond/local' used by custom constraint ('rxnbond' function)
class Compute *cperbond; // pointer to 'compute bond/local' used by custom constraint ('rxnbond' function)
std::map<std::set<tagint>, int> atoms2bond; // maps atom pair to index of local bond array
std::vector<std::vector<Constraint>> constraints;

View File

@ -281,9 +281,7 @@ void ChangeBox::command(int narg, char **arg)
} else if (ops[m].style == BOUNDARY) {
domain->set_boundary(3,&arg[ops[m].boundindex],1);
if (domain->dimension == 2 && domain->zperiodic == 0)
error->all(FLERR,
"Cannot change box z boundary to "
"non-periodic for a 2d simulation");
error->all(FLERR, "Cannot change box z boundary to non-periodic for a 2d simulation");
domain->set_initial_box();
domain->set_global_box();
domain->set_local_box();

View File

@ -32,6 +32,10 @@ void Deprecated::command(int narg, char **arg)
if (cmd == "DEPRECATED") {
if (lmp->comm->me == 0) utils::logmesg(lmp, "\nCommand 'DEPRECATED' is a dummy command\n\n");
return;
} else if (cmd == "box") {
if (lmp->comm->me == 0)
utils::logmesg(lmp, "\nThe 'box' command has been removed and will be ignored\n\n");
return;
} else if (utils::strmatch(cmd, "^kim_")) {
std::string newcmd("kim");
newcmd += " " + cmd.substr(4);

View File

@ -14,6 +14,7 @@
#ifdef COMMAND_CLASS
// clang-format off
CommandStyle(DEPRECATED,Deprecated);
CommandStyle(box,Deprecated);
CommandStyle(kim_init,Deprecated);
CommandStyle(kim_interactions,Deprecated);
CommandStyle(kim_param,Deprecated);

View File

@ -82,7 +82,6 @@ Domain::Domain(LAMMPS *lmp) : Pointers(lmp)
minzlo = minzhi = 0.0;
triclinic = 0;
tiltsmall = 1;
boxlo[0] = boxlo[1] = boxlo[2] = -0.5;
boxhi[0] = boxhi[1] = boxhi[2] = 0.5;
@ -212,16 +211,13 @@ void Domain::set_initial_box(int expandflag)
if (dimension == 2 && (xz != 0.0 || yz != 0.0))
error->all(FLERR,"Cannot skew triclinic box in z for 2d simulation");
// error check or warning on triclinic tilt factors
// check on triclinic tilt factors
if (triclinic) {
if ((fabs(xy/(boxhi[0]-boxlo[0])) > 0.5 && xperiodic) ||
(fabs(xz/(boxhi[0]-boxlo[0])) > 0.5 && xperiodic) ||
(fabs(yz/(boxhi[1]-boxlo[1])) > 0.5 && yperiodic)) {
if (tiltsmall)
error->all(FLERR,"Triclinic box skew is too large");
else if (comm->me == 0)
error->warning(FLERR,"Triclinic box skew is large");
if ((fabs(xy/(boxhi[1]-boxlo[1])) > 0.5 && yperiodic) ||
((fabs(xz)+fabs(yz))/(boxhi[2]-boxlo[2]) > 0.5 && zperiodic)) {
if (comm->me == 0)
error->warning(FLERR,"Triclinic box skew is large. LAMMPS will run inefficiently.");
}
}
@ -981,25 +977,33 @@ void Domain::subbox_too_small_check(double thresh)
this should not be used if atom has moved infinitely far outside box
b/c while could iterate forever
e.g. fix shake prediction of new position with highly overlapped atoms
use minimum_image_once() instead
uses minimum_image_once() instead
------------------------------------------------------------------------- */
static constexpr double MAXIMGCOUNT = 16;
void Domain::minimum_image(double &dx, double &dy, double &dz)
{
if (triclinic == 0) {
if (xperiodic) {
if (fabs(dx) > (MAXIMGCOUNT * xprd))
error->one(FLERR, "Atoms have moved too far apart ({}) for minimum image\n", dx);
while (fabs(dx) > xprd_half) {
if (dx < 0.0) dx += xprd;
else dx -= xprd;
}
}
if (yperiodic) {
if (fabs(dy) > (MAXIMGCOUNT * yprd))
error->one(FLERR, "Atoms have moved too far apart ({}) for minimum image\n", dy);
while (fabs(dy) > yprd_half) {
if (dy < 0.0) dy += yprd;
else dy -= yprd;
}
}
if (zperiodic) {
if (fabs(dz) > (MAXIMGCOUNT * zprd))
error->one(FLERR, "Atoms have moved too far apart ({}) for minimum image\n", dz);
while (fabs(dz) > zprd_half) {
if (dz < 0.0) dz += zprd;
else dz -= zprd;
@ -1008,6 +1012,8 @@ void Domain::minimum_image(double &dx, double &dy, double &dz)
} else {
if (zperiodic) {
if (fabs(dz) > (MAXIMGCOUNT * zprd))
error->one(FLERR, "Atoms have moved too far apart ({}) for minimum image\n", dz);
while (fabs(dz) > zprd_half) {
if (dz < 0.0) {
dz += zprd;
@ -1021,6 +1027,8 @@ void Domain::minimum_image(double &dx, double &dy, double &dz)
}
}
if (yperiodic) {
if (fabs(dy) > (MAXIMGCOUNT * yprd))
error->one(FLERR, "Atoms have moved too far apart ({}) for minimum image\n", dy);
while (fabs(dy) > yprd_half) {
if (dy < 0.0) {
dy += yprd;
@ -1032,6 +1040,8 @@ void Domain::minimum_image(double &dx, double &dy, double &dz)
}
}
if (xperiodic) {
if (fabs(dx) > (MAXIMGCOUNT * xprd))
error->one(FLERR, "Atoms have moved too far apart ({}) for minimum image\n", dx);
while (fabs(dx) > xprd_half) {
if (dx < 0.0) dx += xprd;
else dx -= xprd;
@ -1040,75 +1050,6 @@ void Domain::minimum_image(double &dx, double &dy, double &dz)
}
}
/* ----------------------------------------------------------------------
minimum image convention in periodic dimensions
use 1/2 of box size as test
for triclinic, also add/subtract tilt factors in other dims as needed
changed "if" to "while" to enable distance to
far-away ghost atom returned by atom->map() to be wrapped back into box
could be problem for looking up atom IDs when cutoff > boxsize
this should not be used if atom has moved infinitely far outside box
b/c while could iterate forever
e.g. fix shake prediction of new position with highly overlapped atoms
use minimum_image_once() instead
------------------------------------------------------------------------- */
void Domain::minimum_image(double *delta)
{
if (triclinic == 0) {
if (xperiodic) {
while (fabs(delta[0]) > xprd_half) {
if (delta[0] < 0.0) delta[0] += xprd;
else delta[0] -= xprd;
}
}
if (yperiodic) {
while (fabs(delta[1]) > yprd_half) {
if (delta[1] < 0.0) delta[1] += yprd;
else delta[1] -= yprd;
}
}
if (zperiodic) {
while (fabs(delta[2]) > zprd_half) {
if (delta[2] < 0.0) delta[2] += zprd;
else delta[2] -= zprd;
}
}
} else {
if (zperiodic) {
while (fabs(delta[2]) > zprd_half) {
if (delta[2] < 0.0) {
delta[2] += zprd;
delta[1] += yz;
delta[0] += xz;
} else {
delta[2] -= zprd;
delta[1] -= yz;
delta[0] -= xz;
}
}
}
if (yperiodic) {
while (fabs(delta[1]) > yprd_half) {
if (delta[1] < 0.0) {
delta[1] += yprd;
delta[0] += xy;
} else {
delta[1] -= yprd;
delta[0] -= xy;
}
}
}
if (xperiodic) {
while (fabs(delta[0]) > xprd_half) {
if (delta[0] < 0.0) delta[0] += xprd;
else delta[0] -= xprd;
}
}
}
}
/* ----------------------------------------------------------------------
minimum image convention in periodic dimensions
use 1/2 of box size as test
@ -1929,26 +1870,6 @@ void Domain::set_boundary(int narg, char **arg, int flag)
}
}
/* ----------------------------------------------------------------------
set domain attributes
------------------------------------------------------------------------- */
void Domain::set_box(int narg, char **arg)
{
if (narg < 1) utils::missing_cmd_args(FLERR, "box", error);
int iarg = 0;
while (iarg < narg) {
if (strcmp(arg[iarg],"tilt") == 0) {
if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "box tilt", error);
if (strcmp(arg[iarg+1],"small") == 0) tiltsmall = 1;
else if (strcmp(arg[iarg+1],"large") == 0) tiltsmall = 0;
else error->all(FLERR,"Unknown box tilt argument: {}", arg[iarg+1]);
iarg += 2;
} else error->all(FLERR,"Unknown box keyword: {}", arg[iarg]);
}
}
/* ----------------------------------------------------------------------
print box info, orthogonal or triclinic
------------------------------------------------------------------------- */

View File

@ -41,7 +41,6 @@ class Domain : protected Pointers {
// 3 = shrink-wrap non-per w/ min
int triclinic; // 0 = orthog box, 1 = triclinic
int tiltsmall; // 1 if limit tilt, else 0
// orthogonal box
@ -120,7 +119,7 @@ class Domain : protected Pointers {
void box_too_small_check();
void subbox_too_small_check(double);
void minimum_image(double &, double &, double &);
void minimum_image(double *);
void minimum_image(double *delta) { minimum_image(delta[0], delta[1], delta[2]); }
void minimum_image_once(double *);
int closest_image(int, int);
int closest_image(const double *const, int);
@ -141,7 +140,6 @@ class Domain : protected Pointers {
const std::vector<Region *> get_region_by_style(const std::string &) const;
const std::vector<Region *> get_region_list();
void set_boundary(int, char **, int);
void set_box(int, char **);
void print_box(const std::string &);
void boundary_string(char *);

View File

@ -122,7 +122,7 @@ void Error::universe_one(const std::string &file, int line, const std::string &s
void Error::universe_warn(const std::string &file, int line, const std::string &str)
{
++numwarn;
if ((numwarn > maxwarn) || (allwarn > maxwarn) || (maxwarn < 0)) return;
if ((maxwarn != 0) && ((numwarn > maxwarn) || (allwarn > maxwarn) || (maxwarn < 0))) return;
if (universe->uscreen)
fmt::print(universe->uscreen,"WARNING on proc {}: {} ({}:{})\n",
universe->me,str,truncpath(file),line);
@ -254,7 +254,7 @@ void Error::_one(const std::string &file, int line, fmt::string_view format,
void Error::warning(const std::string &file, int line, const std::string &str)
{
++numwarn;
if ((numwarn > maxwarn) || (allwarn > maxwarn) || (maxwarn < 0)) return;
if ((maxwarn != 0) && ((numwarn > maxwarn) || (allwarn > maxwarn) || (maxwarn < 0))) return;
std::string mesg = fmt::format("WARNING: {} ({}:{})\n",
str,truncpath(file),line);
if (screen) fputs(mesg.c_str(),screen);

View File

@ -275,6 +275,7 @@ void FixPropertyAtom::read_data_section(char *keyword, int n, char *buf, tagint
for (int i = 0; i < n; i++) {
next = strchr(buf, '\n');
if (!next) error->all(FLERR, "Unexpected end of file while reading data section");
*next = '\0';
try {
@ -324,12 +325,12 @@ void FixPropertyAtom::read_data_section(char *keyword, int n, char *buf, tagint
}
/* ----------------------------------------------------------------------
return # of lines in section of data file labeled by keyword
return # of lines in section of data file labeled by keyword. -1 signals use # of added atoms
------------------------------------------------------------------------- */
bigint FixPropertyAtom::read_data_skip_lines(char * /*keyword*/)
{
return atom->natoms;
return -1;
}
/* ----------------------------------------------------------------------

View File

@ -773,7 +773,6 @@ int Input::execute_command()
else if (mycmd == "bond_style") bond_style();
else if (mycmd == "bond_write") bond_write();
else if (mycmd == "boundary") boundary();
else if (mycmd == "box") box();
else if (mycmd == "comm_modify") comm_modify();
else if (mycmd == "comm_style") comm_style();
else if (mycmd == "compute") compute();
@ -1417,15 +1416,6 @@ void Input::boundary()
/* ---------------------------------------------------------------------- */
void Input::box()
{
if (domain->box_exist)
error->all(FLERR,"Box command after simulation box is defined");
domain->set_box(narg,arg);
}
/* ---------------------------------------------------------------------- */
void Input::comm_modify()
{
comm->modify_params(narg,arg);

View File

@ -96,7 +96,6 @@ class Input : protected Pointers {
void bond_style();
void bond_write();
void boundary();
void box();
void comm_modify();
void comm_style();
void compute();

View File

@ -983,7 +983,7 @@ be called without a valid LAMMPS object handle (it is ignored).
**Image masks**
These settings are related to how LAMMPS stores and interprets periodic images. The values are used
internally by the Fortran interface and are not likely to be useful to users.
internally by the :doc:`Fortran interface <Fortran>` and are not likely to be useful to users.
.. list-table::
:header-rows: 1
@ -1015,8 +1015,17 @@ internally by the Fortran interface and are not likely to be useful to users.
* - box_exist
- 1 if the simulation box is defined, 0 if not.
See :doc:`create_box`.
* - kokkos_active
- 1 if the KOKKOS package is compiled in **and** activated, 0 if not.
See :doc:`Speed_kokkos`.
* - kokkos_nthreads
- Number of Kokkos threads per MPI process, 0 if Kokkos is not active.
See :doc:`Speed_kokkos`.
* - kokkos_ngpus
- Number of Kokkos gpus per physical node, 0 if Kokkos is not active or no GPU support.
See :doc:`Speed_kokkos`.
* - nthreads
- Number of requested OpenMP threads for LAMMPS' execution
- Number of requested OpenMP threads per MPI process for LAMMPS' execution
* - newton_bond
- 1 if Newton's 3rd law is applied to bonded interactions, 0 if not.
* - newton_pair
@ -1126,6 +1135,9 @@ int lammps_extract_setting(void *handle, const char *keyword)
if (strcmp(keyword,"dimension") == 0) return lmp->domain->dimension;
if (strcmp(keyword,"box_exist") == 0) return lmp->domain->box_exist;
if (strcmp(keyword,"kokkos_active") == 0) return (lmp->kokkos) ? 1 : 0;
if (strcmp(keyword,"kokkos_nthreads") == 0) return (lmp->kokkos) ? lmp->kokkos->nthreads : 0;
if (strcmp(keyword,"kokkos_ngpus") == 0) return (lmp->kokkos) ? lmp->kokkos->ngpus : 0;
if (strcmp(keyword,"newton_bond") == 0) return lmp->force->newton_bond;
if (strcmp(keyword,"newton_pair") == 0) return lmp->force->newton_pair;
if (strcmp(keyword,"triclinic") == 0) return lmp->domain->triclinic;

View File

@ -875,10 +875,13 @@ void ReadData::command(int narg, char **arg)
int i;
for (i = 0; i < nfix; i++)
if (strcmp(keyword, fix_section[i]) == 0) {
if (firstpass)
if (firstpass) {
fix(fix_index[i], keyword);
else
skip_lines(fix_index[i]->read_data_skip_lines(keyword));
} else {
auto nskip = fix_index[i]->read_data_skip_lines(keyword);
if (nskip < 0) nskip = natoms;
skip_lines(nskip);
}
break;
}
if (i == nfix)
@ -2225,6 +2228,7 @@ void ReadData::fix(Fix *ifix, char *keyword)
int nchunk, eof;
bigint nline = ifix->read_data_skip_lines(keyword);
if (nline < 0) nline = natoms;
bigint nread = 0;
while (nread < nline) {

View File

@ -36,7 +36,7 @@ patterns:
"""
def check_pending_tag(f):
pattern = re.compile(r'^ *\.\. +version(changed|added):: +TBD')
pattern = re.compile(r'^ *\.\. +(version(changed|added)|deprecated):: +TBD')
last_line = "\n"
lineno = 1
errors = set()

View File

@ -209,6 +209,10 @@ TEST_F(LibraryProperties, setting)
lammps_command(lmp, "dimension 3");
if (!verbose) ::testing::internal::GetCapturedStdout();
EXPECT_EQ(lammps_extract_setting(lmp, "kokkos_active"), 0);
EXPECT_EQ(lammps_extract_setting(lmp, "kokkos_nthreads"), 0);
EXPECT_EQ(lammps_extract_setting(lmp, "kokkos_ngpus"), 0);
EXPECT_EQ(lammps_extract_setting(lmp, "world_size"), 1);
EXPECT_EQ(lammps_extract_setting(lmp, "world_rank"), 0);
EXPECT_EQ(lammps_extract_setting(lmp, "universe_size"), 1);
@ -545,3 +549,27 @@ TEST_F(AtomProperties, position)
EXPECT_DOUBLE_EQ(x[1][1], 0.1);
EXPECT_DOUBLE_EQ(x[1][2], 0.1);
}
TEST(SystemSettings, kokkos)
{
if (!lammps_config_has_package("KOKKOS")) GTEST_SKIP();
if (!lammps_config_accelerator("KOKKOS", "api", "openmp")) GTEST_SKIP();
// clang-format off
const char *args[] = {"SystemSettings", "-log", "none", "-echo", "screen", "-nocite",
"-k", "on", "t", "4", "-sf", "kk"};
// clang-format on
char **argv = (char **)args;
int argc = sizeof(args) / sizeof(char *);
::testing::internal::CaptureStdout();
void *lmp = lammps_open_no_mpi(argc, argv, nullptr);
std::string output = ::testing::internal::GetCapturedStdout();
if (verbose) std::cout << output;
EXPECT_THAT(output, StartsWith("LAMMPS ("));
EXPECT_EQ(lammps_extract_setting(lmp, "kokkos_active"), 1);
EXPECT_EQ(lammps_extract_setting(lmp, "kokkos_nthreads"), 4);
EXPECT_EQ(lammps_extract_setting(lmp, "kokkos_ngpus"), 0);
lammps_close(lmp);
}

View File

@ -1,6 +1,7 @@
---
lammps_version: 17 Feb 2022
date_generated: Fri Mar 18 22:17:50 2022
lammps_version: 3 Nov 2022
tags: generated
date_generated: Mon Nov 21 21:52:14 2022
epsilon: 1e-12
skip_tests:
prerequisites: ! |
@ -19,70 +20,70 @@ bond_coeff: ! |
equilibrium: 5 1.45 1.37 1.61 2.45 2.85
extract: ! ""
natoms: 29
init_energy: 194.9780382216324
init_stress: ! |-
-2.4024989684355553e+01 -3.8521513996632500e+01 -1.0851224048428129e+01 1.2562604359180053e+01 1.3677283516797356e+01 4.3206731051245653e+00
init_energy: 4638.6541482649545
init_stress: ! |2-
1.8359565872923367e+03 1.1685750963854580e+03 2.2772768476286187e+03 9.0129794950892881e+02 4.5431504423505157e+02 5.8087298633263757e+01
init_forces: ! |2
1 -1.7791337913398690e+00 -5.2745532425491986e+00 -1.9333096530222391e+00
2 7.8999913149794128e-293 6.5010830500033665e-293 -9.2980646648301405e-293
1 -2.6166538657523114e+02 -2.1914087860149658e+02 3.0394540432772982e+02
2 2.5988625278389128e+02 2.1386632535894739e+02 -3.0587871398075208e+02
3 2.4197086198752562e+01 -1.2911571268065043e+01 -1.2153319969868038e+01
4 -3.5002110421521651e+00 9.8124800657318079e-01 -2.4834895420880554e+00
5 -8.7934593181833831e-01 -1.3513167937313169e+00 4.4900533574430685e+00
6 -1.9224405194016612e+01 1.9525383982308810e+01 1.1251608936919853e+01
7 2.6580140740726381e-131 -1.3633763941647238e-130 -6.8018769495047054e-130
8 1.4462104594211977e+00 -1.2568711136582216e+00 7.3991622652588918e-01
9 1.2099652614352605e-300 1.3032068217192395e-300 5.3545155818429412e-300
6 -3.1076039081690663e+01 8.0316024755627467e+01 3.1453576435533836e+02
7 1.1851633887674051e+01 -6.0790640773318657e+01 -3.0328415541841849e+02
8 -9.7268051920198786e+01 -1.0757818812527627e+02 -4.3610490313202450e+02
9 9.8714262379619981e+01 1.0632131701161805e+02 4.3684481935855041e+02
10 1.8282673669124623e+01 -6.7893037436650294e-01 1.0475143579619905e+01
11 -9.5181855408160265e-01 -2.3577388099405021e+00 -3.8685744266264179e+00
12 -1.1761121482537199e+01 -1.1840691118605761e+01 8.9587696830512531e+00
13 3.9348879648968196e+00 -1.5566010373601853e+00 -7.3956496855403397e-02
14 -1.5580348688551586e+00 3.1703943744370217e-01 -4.0404862787928506e+00
15 -1.0483110905921594e-01 4.0280962447539723e+00 1.4354708657826634e+00
16 -8.1019563183350432e+00 1.2376506087197068e+01 -1.2797826282089627e+01
17 -9.6845722000297944e-125 6.7536031200741501e-125 2.5693469616608658e-124
18 5.0042083741224387e-291 3.2014176819490257e-291 6.0624670892900674e-291
19 -5.0042167517970120e-291 -3.2014265949545701e-291 -6.0624614384187022e-291
20 8.3776745733654894e-297 8.9130055442585484e-297 -5.6508713648842736e-297
21 5.0373663727594610e-296 1.1676684296048456e-296 8.1823232295641435e-296
22 -5.1857245273845906e-296 -1.2567112623130275e-296 -8.1358238807042024e-296
23 1.4835815462512912e-297 8.9042832708182009e-298 -4.6499348859940937e-298
24 6.5124799547612842e-295 -1.0579059065054233e-295 5.4786730014873485e-295
25 -6.5176382072810523e-295 1.0492453069148130e-295 -5.4792561056911984e-295
26 5.1582525197680877e-298 8.6605995906103569e-298 5.8310420384964103e-299
27 -1.5677247388593395e-295 -1.8232011058192963e-295 -3.8038051984576450e-296
28 -3.2483754529644398e-299 1.3960035208884715e-299 -2.1978823514938368e-299
29 1.5680495764046360e-295 1.8230615054672073e-295 3.8060030808091389e-296
run_energy: 194.9688901668597
run_stress: ! |-
-2.4084235648269384e+01 -3.8596877573973650e+01 -1.0971337511117875e+01 1.2627485208541385e+01 1.3589007837800324e+01 4.4518443361436777e+00
16 9.5774980977037984e+01 -6.0062791522626100e+01 -2.8838655412045694e+02
17 -1.0387693729537303e+02 7.2439297609823171e+01 2.7558872783836733e+02
18 -1.7290589161548496e+01 -1.3179016873564919e+02 5.1586854877010114e+02
19 -2.6734331696703003e+02 -1.7103176128697325e+02 -3.2387856688053216e+02
20 2.8463390612857853e+02 3.0282193002262244e+02 -1.9198998188956895e+02
21 -1.3595471277589198e+02 -1.6879175531311859e+02 5.0125731248385966e+02
22 -2.4366036541914886e+02 -5.9048783595141884e+01 -3.8227595956741493e+02
23 3.7961507819504084e+02 2.2784053890826047e+02 -1.1898135291644472e+02
24 1.1246873070738241e+02 -4.4920523111996721e+02 2.6503426336875481e+02
25 -3.4676635177604459e+02 5.5824357785083230e+01 -2.9151996318153743e+02
26 2.3429762106866218e+02 3.9338087333488397e+02 2.6485699812782624e+01
27 6.4413473322621542e+01 -4.9624245043025996e+02 1.7125457908457409e+02
28 -3.5866433728099020e+02 1.5413756350253817e+02 -2.4267577083822729e+02
29 2.9425086395836865e+02 3.4210488692772179e+02 7.1421191753653204e+01
run_energy: 4618.705952125554
run_stress: ! |2-
1.8397902589595653e+03 1.1724487863122602e+03 2.2782759319716897e+03 9.0366417527896033e+02 4.5574598799336053e+02 5.9672689485998390e+01
run_forces: ! |2
1 -1.7800915383536471e+00 -5.2662174638478936e+00 -1.9311810441446928e+00
2 9.1200716389742962e-293 7.5205784896271243e-293 -1.0695855329374170e-292
3 2.4188774318819682e+01 -1.2910730800434983e+01 -1.2139174094227805e+01
4 -3.4905807721708837e+00 9.7423802985974728e-01 -2.4827066691937869e+00
5 -8.7826414385513407e-01 -1.3507945719900971e+00 4.4847167409249762e+00
6 -1.9198711248640532e+01 1.9501343007070176e+01 1.1259539605043198e+01
7 4.0781500460380220e-131 -2.0934766207882755e-130 -1.0411772151605081e-129
8 1.4035232720380466e+00 -1.2181526258990241e+00 7.2552718656771575e-01
9 1.4877356608185432e-300 1.5947265521745610e-300 6.5759628249586203e-300
10 1.8340705485218969e+01 -7.9602516938863732e-01 1.0533434146468263e+01
11 -9.4713695434855716e-01 -2.3455928036230933e+00 -3.8477133980837270e+00
12 -1.1753841378581289e+01 -1.1839528950721563e+01 8.9356024501072664e+00
13 3.9289793641831325e+00 -1.5460483921060724e+00 -7.3078087497547045e-02
14 -1.5515717239320088e+00 3.1019421574866657e-01 -4.0233193667488729e+00
15 -1.1312732638809736e-01 4.0290637402465492e+00 1.4439547691915919e+00
16 -8.1486573539896803e+00 1.2458251785086224e+01 -1.2885602238406578e+01
17 -8.5522515805489358e-125 5.9749160301406998e-125 2.2702237597406565e-124
18 2.5382954259673697e-291 1.6282298856292719e-291 3.0672317979786876e-291
19 -2.5383561239391082e-291 -1.6282944740463789e-291 -3.0671910793881731e-291
20 6.0697971738423079e-296 6.4588417107197222e-296 -4.0718590514496707e-296
21 3.1636825215784415e-296 7.4502521705718285e-297 5.0914419661316058e-296
22 -3.2413538119513539e-296 -7.9143971383319095e-297 -5.0672219270657353e-296
23 7.7671290372912634e-298 4.6414496776008138e-298 -2.4220039065870281e-298
24 1.1528889554480086e-295 -1.8584672369333140e-296 9.7061626349018667e-296
25 -1.1544439355951613e-295 1.8323577266329387e-296 -9.7079719071127095e-296
26 1.5549801471527681e-298 2.6109510300375245e-298 1.8092722108425850e-299
27 -1.0502291554946705e-295 -1.2226612584790533e-295 -2.5738911540368265e-296
28 -1.8342692926757559e-299 7.8715078988712594e-300 -1.2385711775450889e-299
29 1.0504125824239381e-295 1.2225825434000646e-295 2.5751297252143716e-296
1 -2.6123247146110606e+02 -2.1919307263372883e+02 3.0237555508171170e+02
2 2.5946481985769248e+02 2.1395800468042034e+02 -3.0429922592566089e+02
3 2.4104808395110172e+01 -1.2865854073142392e+01 -1.2083882913387207e+01
4 -3.4905809559903060e+00 9.7423804418107429e-01 -2.4827069981835161e+00
5 -8.7826407777385485e-01 -1.3507948021059526e+00 4.4847171151687837e+00
6 -3.1019740486745086e+01 8.0315470917380424e+01 3.1385270827879697e+02
7 1.1855512952124167e+01 -6.0859047439602143e+01 -3.0267942216207678e+02
8 -9.7139239668224732e+01 -1.0689115264867354e+02 -4.3492337910287688e+02
9 9.8566534070284817e+01 1.0565669621976006e+02 4.3567718006870649e+02
10 1.8332862345492853e+01 -7.7546447474524260e-01 1.0479498854248916e+01
11 -9.4713700870724160e-01 -2.3455930111707550e+00 -3.8477135785159731e+00
12 -1.1753839309353248e+01 -1.1839526860590677e+01 8.9356008317611710e+00
13 3.9289793641852362e+00 -1.5460483921084245e+00 -7.3078087496756511e-02
14 -1.5515717239340792e+00 3.1019421574772799e-01 -4.0233193667504690e+00
15 -1.1312732638930625e-01 4.0290637402491614e+00 1.4439547691937924e+00
16 9.5584985328403420e+01 -6.0034377008082046e+01 -2.8814471939578698e+02
17 -1.0371253029506924e+02 7.2457263526211193e+01 2.7530823253114755e+02
18 -1.6734173006461219e+01 -1.3081888486925550e+02 5.1373496074962804e+02
19 -2.6689091522155491e+02 -1.7109178558868115e+02 -3.2299073527643651e+02
20 2.8362508822801612e+02 3.0191067045793665e+02 -1.9074422547319156e+02
21 -1.3584009311603779e+02 -1.6741847021957338e+02 4.9993505971275158e+02
22 -2.4342958636297089e+02 -5.9309435913166546e+01 -3.8123078015208006e+02
23 3.7926967947900869e+02 2.2672790613273992e+02 -1.1870427956067151e+02
24 1.1263526323552287e+02 -4.4826736307529882e+02 2.6440276469069875e+02
25 -3.4626849198042515e+02 5.5368312528579615e+01 -2.9134479497708327e+02
26 2.3363322874490228e+02 3.9289905054671920e+02 2.6942030286384533e+01
27 6.4905554146281361e+01 -4.9580198077236491e+02 1.7016719858461872e+02
28 -3.5803172302507875e+02 1.5409360889763499e+02 -2.4188045098816568e+02
29 2.9312616887879739e+02 3.4170837187472995e+02 7.1713252403546960e+01
...

View File

@ -1,7 +1,7 @@
---
lammps_version: 17 Feb 2022
date_generated: Fri Mar 18 22:17:35 2022
epsilon: 5e-13
lammps_version: 3 Nov 2022
date_generated: Wed Nov 23 12:21:08 2022
epsilon: 2e-12
skip_tests:
prerequisites: ! |
atom full
@ -33,72 +33,72 @@ extract: ! |
nn 2
mm 2
natoms: 29
init_vdwl: 184.28678589160327
init_coul: -135.3222017722983
init_vdwl: 184.287044185624
init_coul: -137.87932620011787
init_stress: ! |2-
5.1099535412443879e+02 4.9267015856417487e+02 1.0972826650625757e+03 -1.9179119371088936e+02 -3.5985836516943652e+00 1.6890666491875683e+02
5.0652399415102809e+02 4.9736621002026737e+02 1.0945023745733126e+03 -1.9301832865224381e+02 1.8762224642096914e-01 1.7162238049862481e+02
init_forces: ! |2
1 -3.3237622364758597e+00 6.7713954997753760e+01 8.3067188829067177e+01
2 3.9621008700560012e+01 3.0171229889604540e+01 -4.8145332639882334e+01
3 -3.5364644744971940e+01 -9.6539501255026011e+01 -3.5029548782863188e+01
4 -5.3015461109817663e-01 1.6289587757514515e-01 -7.2423374326431356e-01
5 -5.9482314827521177e-01 3.6012564229132904e-01 7.9763541784878933e-01
6 -2.0517469128198312e+02 2.3641073678086124e+02 2.8403110395134235e+02
7 1.4287738299209584e+01 -8.3042673557006708e+01 -4.2404138177988466e+02
8 3.4432579872496632e+01 -2.3062478463316680e+01 1.0196257581358861e+02
9 2.1504316475975024e+01 1.5520947058320779e+01 8.8721284584619994e+01
10 1.3156277736186865e+02 -1.5256269193303697e+02 -4.7528776206099316e+01
11 -1.1549608580120421e+00 7.0751627315313514e-01 -1.2306532477500820e+00
12 8.2305373454600836e+00 2.8332067643232048e+00 -1.6285990412442382e+00
13 2.2152653863898988e-01 -2.5442239617884921e-01 -1.7821156240885982e-02
14 -1.4864243248803288e+00 4.9691633196181018e-01 -6.5591950906426355e-01
15 1.9536455977505707e-01 4.6553673584615141e-01 -7.3823010387388632e-01
16 1.1408068052592634e+02 -8.3363365075734180e+01 -2.9358101411834207e+02
17 -1.1530269288646562e+02 8.4705249217102178e+01 2.9252691476710731e+02
18 1.2607896146319246e+00 6.6515350853351460e+00 -9.8941034529134715e+00
19 1.6182226631729169e+00 -1.6594283813607693e+00 5.6553541079235838e+00
20 -3.4521573063242741e+00 -3.1789176785999720e+00 4.2591620921699045e+00
21 -1.5230523428245663e+01 -1.8827777303529409e+01 4.5543598985413915e+01
22 -2.5331360436022880e+01 -5.4301878248720961e+00 -3.5349975516643234e+01
23 4.0112972843495513e+01 2.2949867135700025e+01 -9.6970781334064569e+00
1 -3.5396501309981954e+00 6.6944364611585584e+01 8.3059219120660856e+01
2 3.9621008700560019e+01 3.0171229889604543e+01 -4.8145332639882334e+01
3 -3.5309288471259912e+01 -9.6592073986045776e+01 -3.5059191984527324e+01
4 -5.3015461109817674e-01 1.6289587757514493e-01 -7.2423374326431356e-01
5 -5.9482314827521177e-01 3.6012564229132926e-01 7.9763541784878955e-01
6 -2.0517469128198312e+02 2.3641073678086121e+02 2.8403110395134229e+02
7 1.4287738299209584e+01 -8.3042673557006694e+01 -4.2404138177988466e+02
8 3.4432579872496632e+01 -2.3062478463316697e+01 1.0196257581358860e+02
9 2.1504316475975028e+01 1.5520947058320786e+01 8.8721284584619994e+01
10 1.3157989652366749e+02 -1.5248002606214345e+02 -4.7534699865938585e+01
11 -1.1549608580120423e+00 7.0751627315313514e-01 -1.2306532477500822e+00
12 7.2669942071383717e+00 2.0827730884953919e+00 -9.0483043978096866e-01
13 2.2152653863898994e-01 -2.5442239617884937e-01 -1.7821156240885788e-02
14 -1.4864243248803288e+00 4.9691633196180973e-01 -6.5591950906426388e-01
15 1.9536455977505737e-01 4.6553673584615107e-01 -7.3823010387388610e-01
16 1.1427944925864990e+02 -8.2676440560459525e+01 -2.9356712075009648e+02
17 -1.1530269288646562e+02 8.4705249217102164e+01 2.9252691476710731e+02
18 1.2607896146319251e+00 6.6515350853351460e+00 -9.8941034529134697e+00
19 1.6182226631729160e+00 -1.6594283813607693e+00 5.6553541079235821e+00
20 -3.4521573063242741e+00 -3.1789176785999724e+00 4.2591620921699054e+00
21 -1.5285879701957692e+01 -1.8775204572509647e+01 4.5573242187078066e+01
22 -2.5331360436022880e+01 -5.4301878248720943e+00 -3.5349975516643234e+01
23 4.0112972843495520e+01 2.2949867135700025e+01 -9.6970781334064569e+00
24 6.6473466694181287e+00 -4.2720688813774373e+01 2.5475101119120744e+01
25 -3.3278855135511762e+01 2.8247579501663811e+00 -2.7042493390233950e+01
26 2.5709355480930235e+01 3.9014887914531776e+01 2.6900053403817590e+00
27 1.0035511306793698e+01 -4.5249946085110551e+01 1.8136503701331897e+01
28 -3.9953070294941519e+01 1.3962092508592026e+01 -2.6231057257176037e+01
29 3.0657392434855581e+01 3.0940622604427993e+01 8.6697893689665211e+00
run_vdwl: 182.40565476045293
run_coul: -135.3428229317011
27 1.0999054445115412e+01 -4.4499512409282737e+01 1.7412735099868630e+01
28 -3.9953070294941519e+01 1.3962092508592027e+01 -2.6231057257176040e+01
29 3.0657392434855577e+01 3.0940622604427993e+01 8.6697893689665193e+00
run_vdwl: 182.40627457531505
run_coul: -137.89878255208336
run_stress: ! |2-
5.0949331883645084e+02 4.9079274612266465e+02 1.0779924919705209e+03 -1.8978874005409725e+02 -2.3414288930535676e+00 1.6680086396779814e+02
5.0502284487804911e+02 4.9549254038893065e+02 1.0752131218453601e+03 -1.9101402318764428e+02 1.4448370451390913e+00 1.6951693900962570e+02
run_forces: ! |2
1 -3.0222512967714557e+00 6.7548505252631742e+01 8.2368596588550062e+01
2 3.9249247328631569e+01 2.9923489231546629e+01 -4.7570871930892892e+01
3 -3.5327226055520775e+01 -9.6102750283993871e+01 -3.4890589040756382e+01
4 -5.2696455605069259e-01 1.6213860296922811e-01 -7.2430457126338410e-01
5 -5.9400169113171586e-01 3.6136912208033589e-01 7.9530286564994024e-01
6 -2.0274433560773628e+02 2.3284786713406370e+02 2.7401951211582013e+02
7 1.4053553144930220e+01 -8.1102084254822103e+01 -4.1219124551744085e+02
8 3.2718675446198795e+01 -2.1551046804011083e+01 1.0097962112112319e+02
9 2.1323856224128093e+01 1.5222193966786529e+01 8.7834851199368813e+01
10 1.3130268818222987e+02 -1.5219622702094762e+02 -4.7515342312770102e+01
11 -1.1541261444752642e+00 7.1381752451384339e-01 -1.2230561924848902e+00
12 8.2264000446385346e+00 2.8299212831552727e+00 -1.6299507774035358e+00
13 2.1792987819368359e-01 -2.5267817510362128e-01 -1.9040070778804069e-02
14 -1.4863827602148627e+00 4.9691341825375590e-01 -6.4929126993868946e-01
15 1.9516446161304488e-01 4.6409461483290748e-01 -7.4066880359248788e-01
16 1.1245063534493042e+02 -8.2380964098503739e+01 -2.8939941367324343e+02
17 -1.1367888495468203e+02 8.3736413965239862e+01 2.8833591319216583e+02
18 1.2131213413750925e+00 6.6087858905244472e+00 -9.8443684782076062e+00
19 1.6546892701962139e+00 -1.6335518483372100e+00 5.6675264381026587e+00
20 -3.4406155231052553e+00 -3.1608955862760086e+00 4.2021081664244280e+00
21 -1.5380842837515630e+01 -1.8832663749099712e+01 4.5639191584555739e+01
22 -2.5437261250740086e+01 -5.4851555768258553e+00 -3.5409747254511750e+01
23 4.0368809860056317e+01 2.3008461599616822e+01 -9.7324663526701478e+00
24 7.1229399666679027e+00 -4.3444645139181588e+01 2.6085435505612736e+01
25 -3.4137823679541398e+01 2.8946896673905611e+00 -2.7774080649897098e+01
26 2.6093689208699011e+01 3.9671650206452789e+01 2.8124886686652082e+00
27 1.0189565500107717e+01 -4.5358416256293751e+01 1.8141445825723800e+01
28 -4.0123206182868742e+01 1.4015089779144132e+01 -2.6301107890805710e+01
29 3.0672957337757669e+01 3.0995677534193614e+01 8.7335515148952023e+00
1 -3.2370828229989943e+00 6.6780774771428867e+01 8.2360566992843957e+01
2 3.9248669659652556e+01 2.9923101710814461e+01 -4.7570156486162247e+01
3 -3.5272405495891725e+01 -9.6156898011190052e+01 -3.4920858821878639e+01
4 -5.2696307806019427e-01 1.6213782144861011e-01 -7.2430297098202856e-01
5 -5.9400132072875222e-01 3.6136881819958322e-01 7.9530174833943768e-01
6 -2.0274433109253258e+02 2.3284785750828254e+02 2.7401951291433039e+02
7 1.4053553193905296e+01 -8.1102076691627317e+01 -4.1219125509985423e+02
8 3.2718449282709940e+01 -2.1550864085726676e+01 1.0097970359571399e+02
9 2.1323849598698548e+01 1.5222193680732165e+01 8.7834847272654116e+01
10 1.3131984144877813e+02 -1.5211385896116542e+02 -4.7521267129265915e+01
11 -1.1541259655305498e+00 7.1381836660091746e-01 -1.2230539280652590e+00
12 7.2630852175005964e+00 2.0798061880380749e+00 -9.0633631991268937e-01
13 2.1792142656044974e-01 -2.5267485273151963e-01 -1.9040900180560982e-02
14 -1.4863809886398240e+00 4.9691277039032383e-01 -6.4928587974626595e-01
15 1.9516412586808574e-01 4.6408847437290568e-01 -7.4067142611860370e-01
16 1.1264998906650452e+02 -8.1693726909197835e+01 -2.8938652282069330e+02
17 -1.1367940494205878e+02 8.3736184613376594e+01 2.8833692617302631e+02
18 1.2131256191519586e+00 6.6087841118467869e+00 -9.8443636765781175e+00
19 1.6546867296048959e+00 -1.6335521580158148e+00 5.6675246971307507e+00
20 -3.4406162815803181e+00 -3.1608941993411719e+00 4.2021061175034422e+00
21 -1.5436168448451303e+01 -1.8780058922578032e+01 4.5668818732530838e+01
22 -2.5437256643599888e+01 -5.4851610900512116e+00 -3.5409746057405300e+01
23 4.0368779518163102e+01 2.3008433743607917e+01 -9.7324579117657564e+00
24 7.1229403171558960e+00 -4.3444642379685369e+01 2.6085431366299698e+01
25 -3.4137823381351410e+01 2.8946870622451546e+00 -2.7774076485443004e+01
26 2.6093689507109417e+01 3.9671649820489279e+01 2.8124906008412616e+00
27 1.1152133422843132e+01 -4.4609063038241878e+01 1.7417265391517304e+01
28 -4.0123145645809892e+01 1.4014953690801475e+01 -2.6300937504650808e+01
29 3.0673827973027787e+01 3.0996718146876649e+01 8.7338378159710270e+00
...

View File

@ -1,6 +1,6 @@
---
lammps_version: 17 Feb 2022
date_generated: Fri Mar 18 22:17:35 2022
lammps_version: 3 Nov 2022
date_generated: Wed Nov 23 12:21:08 2022
epsilon: 7.5e-13
skip_tests:
prerequisites: ! |
@ -39,72 +39,72 @@ extract: ! |
mm 2
cut_coul 0
natoms: 29
init_vdwl: 184.28678589160327
init_vdwl: 184.287044185624
init_coul: 225.82181512692495
init_stress: ! |2-
5.1535561642229106e+02 5.0058662653359033e+02 1.1159625282020661e+03 -1.8397466102442883e+02 -2.0220636765660638e+00 1.7544854550792292e+02
5.1535625659153879e+02 5.0058721227699067e+02 1.1159628277106565e+03 -1.8397448571567824e+02 -2.0224936628921029e+00 1.7544839728662993e+02
init_forces: ! |2
1 -3.0654526282473653e+00 6.6615864099533127e+01 8.2943973715838268e+01
2 3.9068866013811309e+01 2.9455617832505151e+01 -4.7591021495719247e+01
3 -3.5280048507313708e+01 -9.6589706921967377e+01 -3.5074530442718626e+01
4 -6.6290078829733745e-01 1.7069498108397532e-01 -6.5698974844320646e-01
5 -7.3666031116459629e-01 3.1866503947918778e-01 8.0597153193899140e-01
6 -2.0569141405030027e+02 2.3627567491105717e+02 2.8443813098936624e+02
7 1.4533357696957466e+01 -8.2901362570668283e+01 -4.2411675286042595e+02
8 3.4572734326141102e+01 -2.2709011166557751e+01 1.0190201388959704e+02
9 2.1302134918689685e+01 1.5382116555420744e+01 8.8486496066808485e+01
10 1.3163065394972341e+02 -1.5255187760681488e+02 -4.7566872183542166e+01
11 -1.0673114564038046e+00 6.0655281622864732e-01 -1.2545988594461333e+00
12 7.7809585200300058e+00 3.1160398793201316e+00 -1.4701791888504216e+00
13 5.3014557250212346e-01 -2.5075115207640880e-01 -1.8692015200156273e-01
14 -1.3123789187002088e+00 4.0626415990577358e-01 -7.3662740015731798e-01
15 3.2883564820812672e-01 4.2874288932750715e-01 -7.8340375997477496e-01
16 1.1459556574512777e+02 -8.2820743414973677e+01 -2.9444590351113385e+02
17 -1.1537978255115650e+02 8.4825361701504292e+01 2.9365401995966459e+02
18 3.5910667886316144e-01 4.7762805533526835e+00 -7.8633657965049659e+00
19 1.9899962970618248e+00 -7.2139551998620521e-01 5.5216058955830674e+00
20 -2.9130824841870520e+00 -3.9872076040781708e+00 4.1253374345150986e+00
21 -1.5875835643064573e+01 -1.5889863208570942e+01 4.7172258432278930e+01
22 -2.5015657684773860e+01 -7.0704088600117272e+00 -3.6174324111002065e+01
23 4.0477622003880207e+01 2.3373134480751212e+01 -1.0495870801503438e+01
1 -3.0654561493791848e+00 6.6615850470254358e+01 8.2943973912197166e+01
2 3.9068866013811295e+01 2.9455617832505151e+01 -4.7591021495719239e+01
3 -3.5280084914007190e+01 -9.6589672345953218e+01 -3.5074510946988802e+01
4 -6.6290078829733778e-01 1.7069498108397516e-01 -6.5698974844320646e-01
5 -7.3666031116459629e-01 3.1866503947918762e-01 8.0597153193899174e-01
6 -2.0569141405030027e+02 2.3627567491105717e+02 2.8443813098936630e+02
7 1.4533357696957466e+01 -8.2901362570668297e+01 -4.2411675286042589e+02
8 3.4572734326141102e+01 -2.2709011166557758e+01 1.0190201388959706e+02
9 2.1302134918689685e+01 1.5382116555420737e+01 8.8486496066808471e+01
10 1.3163065501356638e+02 -1.5255187246967631e+02 -4.7566872551658555e+01
11 -1.0673114564038049e+00 6.0655281622864710e-01 -1.2545988594461335e+00
12 7.7810444548679740e+00 3.1161068077157283e+00 -1.4702437390869596e+00
13 5.3014557250212357e-01 -2.5075115207640869e-01 -1.8692015200156262e-01
14 -1.3123789187002091e+00 4.0626415990577341e-01 -7.3662740015731820e-01
15 3.2883564820812672e-01 4.2874288932750720e-01 -7.8340375997477496e-01
16 1.1459556820241663e+02 -8.2820734922833438e+01 -2.9444590333937629e+02
17 -1.1537978255115650e+02 8.4825361701504292e+01 2.9365401995966465e+02
18 3.5910667886316239e-01 4.7762805533526844e+00 -7.8633657965049650e+00
19 1.9899962970618255e+00 -7.2139551998620499e-01 5.5216058955830682e+00
20 -2.9130824841870520e+00 -3.9872076040781712e+00 4.1253374345150977e+00
21 -1.5875799236371092e+01 -1.5889897784585100e+01 4.7172238936549107e+01
22 -2.5015657684773856e+01 -7.0704088600117272e+00 -3.6174324111002072e+01
23 4.0477622003880199e+01 2.3373134480751215e+01 -1.0495870801503438e+01
24 7.4996662349142147e+00 -4.3426856761904077e+01 2.2815324534810056e+01
25 -3.3807147976811798e+01 2.9988027310973613e+00 -2.7577372367283733e+01
26 2.5746888892709649e+01 4.0174454060022633e+01 4.1505216253578832e+00
27 1.0861995979992932e+01 -4.6328822142297405e+01 1.8883010243779164e+01
28 -4.0470174882584459e+01 1.5020795051869365e+01 -2.6766823901697389e+01
29 2.9999319404392626e+01 3.1302945187447804e+01 7.8628922608669090e+00
run_vdwl: 182.40255929507265
run_coul: 225.80523122237145
26 2.5746888892709649e+01 4.0174454060022640e+01 4.1505216253578832e+00
27 1.0861910045154971e+01 -4.6328889070692995e+01 1.8883074794015705e+01
28 -4.0470174882584466e+01 1.5020795051869364e+01 -2.6766823901697389e+01
29 2.9999319404392619e+01 3.1302945187447808e+01 7.8628922608669081e+00
run_vdwl: 182.4028175410934
run_coul: 225.8052312234039
run_stress: ! |2-
5.1384631551491782e+02 4.9870417055031982e+02 1.0966342093912015e+03 -1.8197324336578851e+02 -7.7105078556388151e-01 1.7333789878387816e+02
5.1384695555524797e+02 4.9870475622702440e+02 1.0966345088415544e+03 -1.8197306815785140e+02 -7.7148065920433828e-01 1.7333775064278868e+02
run_forces: ! |2
1 -2.7683190788522740e+00 6.6449095933852917e+01 8.2247798763054263e+01
2 3.8702194737017720e+01 2.9212212087553127e+01 -4.7019606503568262e+01
3 -3.5243454712977965e+01 -9.6154953753202179e+01 -3.4936504547233788e+01
4 -6.5977694961123645e-01 1.7011044348999105e-01 -6.5636000725760957e-01
5 -7.3566520752177100e-01 3.2004552783623724e-01 8.0428279587216267e-01
6 -2.0326269571945986e+02 2.3271299846462981e+02 2.7442711029956843e+02
7 1.4300022426556877e+01 -8.0959802783401827e+01 -4.1226588339681336e+02
8 3.2858865815794836e+01 -2.1199692716643838e+01 1.0091081448967174e+02
9 2.1122712553671928e+01 1.5084944366082448e+01 8.7605507483986727e+01
10 1.3136998924075732e+02 -1.5218480626807963e+02 -4.7552578947927799e+01
11 -1.0661815519248918e+00 6.1243966630893298e-01 -1.2462619432373649e+00
12 7.7760226803888877e+00 3.1127903917502313e+00 -1.4744683960464942e+00
13 5.2674567614856260e-01 -2.4917750370694214e-01 -1.8723948852408964e-01
14 -1.3120520030459297e+00 4.0614121490067551e-01 -7.2914653810616858e-01
15 3.2867638556545775e-01 4.2750422420803547e-01 -7.8475645386864112e-01
16 1.1296204426736116e+02 -8.1834725178344044e+01 -2.9024712497341085e+02
17 -1.1375160210673371e+02 8.3851461683740141e+01 2.8944627577285223e+02
18 3.0738271507674780e-01 4.7275452047652715e+00 -7.8225407640491564e+00
19 2.0274564843313856e+00 -6.9333851982762851e-01 5.5367198586609998e+00
20 -2.8992094355719793e+00 -3.9662518101373307e+00 4.0716447585419049e+00
21 -1.6026802334504676e+01 -1.5883942063853187e+01 4.7256123626066532e+01
22 -2.5118526633549543e+01 -7.1302229414472507e+00 -3.6226155173751806e+01
23 4.0731190500597606e+01 2.3426593800522156e+01 -1.0527512154067734e+01
24 7.9759015134187958e+00 -4.4140032709411031e+01 2.3421942671527756e+01
25 -3.4663427794559517e+01 3.0656502790867206e+00 -2.8305771158291158e+01
26 2.6127821098995337e+01 4.0822834309889892e+01 4.2748874027969199e+00
27 1.1011144648995060e+01 -4.6436392031462617e+01 1.8878782007839565e+01
28 -4.0634772085359785e+01 1.5071357955251854e+01 -2.6829753884337045e+01
29 3.0014314868995513e+01 3.1359612725649200e+01 7.9297744000519685e+00
1 -2.7683225482283809e+00 6.6449082401023148e+01 8.2247798981789643e+01
2 3.8702194726711895e+01 2.9212212080708927e+01 -4.7019606490893651e+01
3 -3.5243491151797656e+01 -9.6154919282511642e+01 -3.4936485094808461e+01
4 -6.5977694998018921e-01 1.7011044357157604e-01 -6.5636000759126256e-01
5 -7.3566520753163211e-01 3.2004552769599226e-01 8.0428279621249554e-01
6 -2.0326269572309553e+02 2.3271299846832454e+02 2.7442711030170454e+02
7 1.4300022426979604e+01 -8.0959802783845490e+01 -4.1226588339625141e+02
8 3.2858865805990142e+01 -2.1199692705942155e+01 1.0091081449262803e+02
9 2.1122712553325698e+01 1.5084944366414280e+01 8.7605507484381420e+01
10 1.3136999033009897e+02 -1.5218480112815018e+02 -4.7552579328976627e+01
11 -1.0661815520486129e+00 6.1243966623508861e-01 -1.2462619432216921e+00
12 7.7761085744513680e+00 3.1128572757481363e+00 -1.4745329169765931e+00
13 5.2674567689395169e-01 -2.4917750397088440e-01 -1.8723948847901425e-01
14 -1.3120520033096184e+00 4.0614121494992139e-01 -7.2914653857642009e-01
15 3.2867638550341521e-01 4.2750422476572436e-01 -7.8475645363096747e-01
16 1.1296204673281163e+02 -8.1834716679121783e+01 -2.9024712481379936e+02
17 -1.1375160211353307e+02 8.3851461680840046e+01 2.8944627578500337e+02
18 3.0738271486215951e-01 4.7275452050710545e+00 -7.8225407641446587e+00
19 2.0274564844173879e+00 -6.9333851990195527e-01 5.5367198587099775e+00
20 -2.8992094355377156e+00 -3.9662518102337199e+00 4.0716447585813889e+00
21 -1.6026765950606343e+01 -1.5883976653313633e+01 4.7256104141803178e+01
22 -2.5118526637643978e+01 -7.1302229387234384e+00 -3.6226155173665845e+01
23 4.0731190519921540e+01 2.3426593817372833e+01 -1.0527512159329465e+01
24 7.9759015134016398e+00 -4.4140032709414839e+01 2.3421942671485997e+01
25 -3.4663427794542088e+01 3.0656502790778966e+00 -2.8305771158233721e+01
26 2.6127821099004976e+01 4.0822834309892897e+01 4.2748874028091679e+00
27 1.1011058821774000e+01 -4.6436458847462333e+01 1.8878846579362040e+01
28 -4.0634772090200137e+01 1.5071357967752173e+01 -2.6829753899915300e+01
29 3.0014314791906596e+01 3.1359612633147766e+01 7.9297743740230970e+00
...

View File

@ -1,6 +1,6 @@
---
lammps_version: 17 Feb 2022
date_generated: Fri Mar 18 22:17:35 2022
lammps_version: 3 Nov 2022
date_generated: Wed Nov 23 12:21:08 2022
epsilon: 5e-12
skip_tests: gpu
prerequisites: ! |
@ -39,72 +39,72 @@ extract: ! |
mm 2
cut_coul 0
natoms: 29
init_vdwl: 184.28678589160327
init_coul: 225.82185134782813
init_vdwl: 184.287044185624
init_coul: 225.8218513478281
init_stress: ! |2-
5.1535563668501300e+02 5.0058663228965906e+02 1.1159625416266908e+03 -1.8397465772983549e+02 -2.0220541814186075e+00 1.7544854959858193e+02
5.1535627685426095e+02 5.0058721803305957e+02 1.1159628411352805e+03 -1.8397448242108504e+02 -2.0224841677449517e+00 1.7544840137728934e+02
init_forces: ! |2
1 -3.0654541322175968e+00 6.6615863677171617e+01 8.2943971924222254e+01
1 -3.0654576533494127e+00 6.6615850047892891e+01 8.2943972120581122e+01
2 3.9068865513677615e+01 2.9455617099928201e+01 -4.7591020157569005e+01
3 -3.5280048398649157e+01 -9.6589707037291518e+01 -3.5074530567243464e+01
4 -6.6290079171346505e-01 1.7069544377339213e-01 -6.5698955820925042e-01
5 -7.3666014335594099e-01 3.1866598696678072e-01 8.0597176706748563e-01
6 -2.0569141450616158e+02 2.3627567585415383e+02 2.8443812919367736e+02
7 1.4533356899344014e+01 -8.2901362616912394e+01 -4.2411675492205256e+02
8 3.4572733596567637e+01 -2.2709011431274082e+01 1.0190201593114163e+02
9 2.1302136717273982e+01 1.5382115964517633e+01 8.8486497965632879e+01
10 1.3163065406656153e+02 -1.5255187717021275e+02 -4.7566872791707098e+01
11 -1.0673115707973471e+00 6.0655351752474329e-01 -1.2545987554013556e+00
12 7.7809586887870594e+00 3.1160399372388605e+00 -1.4701800924466619e+00
13 5.3014565234400191e-01 -2.5075128500262650e-01 -1.8692002168697544e-01
14 -1.3123790631110117e+00 4.0626403937555045e-01 -7.3662725812128549e-01
15 3.2883559728278194e-01 4.2874259749687393e-01 -7.8340316469885862e-01
16 1.1459556694004317e+02 -8.2820744612264363e+01 -2.9444590318663785e+02
17 -1.1537978278388316e+02 8.4825361961770099e+01 2.9365401989722858e+02
18 3.5910722977056597e-01 4.7762805084795117e+00 -7.8633666628226111e+00
19 1.9899942949153411e+00 -7.2139693846497077e-01 5.5216057638120377e+00
20 -2.9130806625761494e+00 -3.9872064081602967e+00 4.1253385233400710e+00
21 -1.5875836014985955e+01 -1.5889862643744696e+01 4.7172259002528357e+01
22 -2.5015660385936844e+01 -7.0704105161901349e+00 -3.6174325746867012e+01
23 4.0477625196492205e+01 2.3373135655738206e+01 -1.0495869916757165e+01
3 -3.5280084805342639e+01 -9.6589672461277360e+01 -3.5074511071513633e+01
4 -6.6290079171346505e-01 1.7069544377339210e-01 -6.5698955820925031e-01
5 -7.3666014335594110e-01 3.1866598696678072e-01 8.0597176706748597e-01
6 -2.0569141450616158e+02 2.3627567585415389e+02 2.8443812919367736e+02
7 1.4533356899344010e+01 -8.2901362616912380e+01 -4.2411675492205251e+02
8 3.4572733596567609e+01 -2.2709011431274096e+01 1.0190201593114163e+02
9 2.1302136717273982e+01 1.5382115964517647e+01 8.8486497965632879e+01
10 1.3163065513040453e+02 -1.5255187203307418e+02 -4.7566873159823480e+01
11 -1.0673115707973471e+00 6.0655351752474307e-01 -1.2545987554013558e+00
12 7.7810446236250250e+00 3.1161068656344568e+00 -1.4702446426831981e+00
13 5.3014565234400202e-01 -2.5075128500262667e-01 -1.8692002168697544e-01
14 -1.3123790631110113e+00 4.0626403937555039e-01 -7.3662725812128527e-01
15 3.2883559728278206e-01 4.2874259749687393e-01 -7.8340316469885873e-01
16 1.1459556939733203e+02 -8.2820736120124138e+01 -2.9444590301488040e+02
17 -1.1537978278388316e+02 8.4825361961770113e+01 2.9365401989722858e+02
18 3.5910722977056608e-01 4.7762805084795099e+00 -7.8633666628226058e+00
19 1.9899942949153395e+00 -7.2139693846497099e-01 5.5216057638120368e+00
20 -2.9130806625761498e+00 -3.9872064081602954e+00 4.1253385233400701e+00
21 -1.5875799608292471e+01 -1.5889897219758861e+01 4.7172239506798533e+01
22 -2.5015660385936840e+01 -7.0704105161901358e+00 -3.6174325746867005e+01
23 4.0477625196492198e+01 2.3373135655738203e+01 -1.0495869916757163e+01
24 7.4996665312988062e+00 -4.3426856369883282e+01 2.2815324088130364e+01
25 -3.3807149952465473e+01 2.9988014337987989e+00 -2.7577373212676150e+01
26 2.5746891183225689e+01 4.0174455514363842e+01 4.1505232593253609e+00
27 1.0861995864629581e+01 -4.6328821976580151e+01 1.8883010049856995e+01
28 -4.0470177594126923e+01 1.5020794116966732e+01 -2.6766825117758021e+01
29 2.9999322027766638e+01 3.1302945696716428e+01 7.8628937666919105e+00
run_vdwl: 182.40255928657774
run_coul: 225.80526621801556
26 2.5746891183225689e+01 4.0174455514363835e+01 4.1505232593253609e+00
27 1.0861909929791622e+01 -4.6328888904975756e+01 1.8883074600093536e+01
28 -4.0470177594126930e+01 1.5020794116966732e+01 -2.6766825117758025e+01
29 2.9999322027766638e+01 3.1302945696716428e+01 7.8628937666919114e+00
run_vdwl: 182.40281753260578
run_coul: 225.80526621917056
run_stress: ! |2-
5.1384633450263470e+02 4.9870417152157029e+02 1.0966342229480442e+03 -1.8197323856665997e+02 -7.7104387031605370e-01 1.7333790492919763e+02
5.1384697454379841e+02 4.9870475719746798e+02 1.0966345223981718e+03 -1.8197306335846980e+02 -7.7147374345845032e-01 1.7333775678806884e+02
run_forces: ! |2
1 -2.7683205204507280e+00 6.6449095490165703e+01 8.2247797711895885e+01
2 3.8702193821877493e+01 2.9212211419425969e+01 -4.7019604804325617e+01
3 -3.5243454585514591e+01 -9.6154953863738911e+01 -3.4936504643788560e+01
4 -6.5977687131041252e-01 1.7011085278366439e-01 -6.5635985341126124e-01
5 -7.3566505234358270e-01 3.2004653103552905e-01 8.0428307532511589e-01
6 -2.0326269614835340e+02 2.3271299913843555e+02 2.7442710822013873e+02
7 1.4300021996054623e+01 -8.0959802494991251e+01 -4.1226588541677728e+02
8 3.2858865265765651e+01 -2.1199693568720125e+01 1.0091081733429107e+02
9 2.1122714604067934e+01 1.5084943250328770e+01 8.7605509332947179e+01
10 1.3136998941143941e+02 -1.5218480590048722e+02 -4.7552579577409830e+01
11 -1.0661815608329375e+00 6.1244026211185132e-01 -1.2462619124968015e+00
12 7.7760233760077231e+00 3.1127902634122728e+00 -1.4744694804987457e+00
13 5.2674586924271427e-01 -2.4917758586878880e-01 -1.8723934835850795e-01
14 -1.3120523259791150e+00 4.0614108203397964e-01 -7.2914636677516875e-01
15 3.2867610981988737e-01 4.2750390948272482e-01 -7.8475586802253572e-01
16 1.1296204447867072e+02 -8.1834725270478103e+01 -2.9024712501702589e+02
17 -1.1375160235079549e+02 8.3851462518713276e+01 2.8944627514695969e+02
18 3.0738345014064944e-01 4.7275451584201162e+00 -7.8225421226147951e+00
19 2.0274544872239728e+00 -6.9334025263478072e-01 5.5367196067976767e+00
20 -2.8992075327228490e+00 -3.9662506277601803e+00 4.0716458277265861e+00
21 -1.6026802838192324e+01 -1.5883941405520059e+01 4.7256124362739875e+01
22 -2.5118529350290316e+01 -7.1302246487029537e+00 -3.6226156710291576e+01
23 4.0731193744183564e+01 2.3426594982025247e+01 -1.0527511305357223e+01
24 7.9759015601633747e+00 -4.4140032390736621e+01 2.3421941942737131e+01
25 -3.4663429593566200e+01 3.0656489475373521e+00 -2.8305771699474640e+01
26 2.6127823323620827e+01 4.0822835743219649e+01 4.2748889953069069e+00
27 1.1011144344413010e+01 -4.6436391929690870e+01 1.8878781879279799e+01
28 -4.0634774700271556e+01 1.5071357061734957e+01 -2.6829755168650092e+01
29 3.0014317587931910e+01 3.1359613328463354e+01 7.9297758591329561e+00
1 -2.7683239898506331e+00 6.6449081957468636e+01 8.2247797930661747e+01
2 3.8702193811582511e+01 2.9212211412571293e+01 -4.7019604791653393e+01
3 -3.5243491024333295e+01 -9.6154919393054271e+01 -3.4936485191359907e+01
4 -6.5977687168190458e-01 1.7011085284653316e-01 -6.5635985375283568e-01
5 -7.3566505234995705e-01 3.2004653083828444e-01 8.0428307567331736e-01
6 -2.0326269615165228e+02 2.3271299914190627e+02 2.7442710822226110e+02
7 1.4300021996095619e+01 -8.0959802495291143e+01 -4.1226588541635073e+02
8 3.2858865255384757e+01 -2.1199693557841638e+01 1.0091081733750200e+02
9 2.1122714603970017e+01 1.5084943250468159e+01 8.7605509333063679e+01
10 1.3136999050087155e+02 -1.5218480076049869e+02 -4.7552579958511345e+01
11 -1.0661815608470382e+00 6.1244026210440039e-01 -1.2462619124717631e+00
12 7.7761092701979475e+00 3.1128571473156490e+00 -1.4745340012267927e+00
13 5.2674586999352180e-01 -2.4917758618970665e-01 -1.8723934833596209e-01
14 -1.3120523262243908e+00 4.0614108204631622e-01 -7.2914636724809301e-01
15 3.2867610975969386e-01 4.2750391001876636e-01 -7.8475586778582129e-01
16 1.1296204694413225e+02 -8.1834716771070589e+01 -2.9024712485782527e+02
17 -1.1375160235744099e+02 8.3851462515852432e+01 2.8944627515943881e+02
18 3.0738344999939127e-01 4.7275451584991384e+00 -7.8225421226024254e+00
19 2.0274544872772347e+00 -6.9334025264774690e-01 5.5367196067971562e+00
20 -2.8992075326987843e+00 -3.9662506277824492e+00 4.0716458277284353e+00
21 -1.6026766454385204e+01 -1.5883975994889351e+01 4.7256104878610991e+01
22 -2.5118529354380893e+01 -7.1302246459886085e+00 -3.6226156710215299e+01
23 4.0731193763533284e+01 2.3426594998848003e+01 -1.0527511310640200e+01
24 7.9759015601568057e+00 -4.4140032390724294e+01 2.3421941942726932e+01
25 -3.4663429593560622e+01 3.0656489475121842e+00 -2.8305771699451558e+01
26 2.6127823323623851e+01 4.0822835743217404e+01 4.2748889953099694e+00
27 1.1011058517091254e+01 -4.6436458745736758e+01 1.8878846450788387e+01
28 -4.0634774705109990e+01 1.5071357074236101e+01 -2.6829755184229253e+01
29 3.0014317510846237e+01 3.1359613235965710e+01 7.9297758330981845e+00
...

View File

@ -469,6 +469,8 @@ TEST_F(FileOperationsTest, write_data)
TEST_FAILURE(".*ERROR: Cannot open file noexist.data: No such file or directory.*",
command("read_data noexist.data"););
TEST_FAILURE(".*ERROR: Unknown read_data keyword xxx.*",
command("read_data noexist.data xxx"););
BEGIN_HIDE_OUTPUT();
command("pair_style zero 1.0");
@ -501,6 +503,116 @@ TEST_F(FileOperationsTest, write_data)
delete_file("triclinic.data");
}
#define GETIDX(i) lmp->atom->map(i)
TEST_F(FileOperationsTest, read_data_fix)
{
ASSERT_EQ(lmp->restart_ver, -1);
BEGIN_HIDE_OUTPUT();
command("echo none");
command("atom_modify map array");
command("fix MoleculeIDs all property/atom mol");
command("region box block -2 2 -2 2 -2 2");
command("create_box 1 box");
command("create_atoms 1 single 1.0 0.0 0.0");
command("create_atoms 1 single 0.0 1.0 0.0");
command("create_atoms 1 single 1.0 0.0 1.0");
command("create_atoms 1 single 0.0 1.0 1.0");
command("mass 1 1.0");
command("set atom 1*2 mol 1");
command("set atom 3*4 mol 2");
command("write_data test_mol_id.data");
lmp->atom->molecule[0] = 5;
lmp->atom->molecule[1] = 6;
lmp->atom->molecule[2] = 5;
lmp->atom->molecule[3] = 6;
lmp->atom->tag[0] = 9;
lmp->atom->tag[1] = 6;
lmp->atom->tag[2] = 7;
lmp->atom->tag[3] = 8;
lmp->atom->map_init(1);
lmp->atom->map_set();
command("write_data test_mol_id_merge.data");
command("clear");
END_HIDE_OUTPUT();
TEST_FAILURE(".*ERROR: Cannot use read_data add before simulation box is defined.*",
command("read_data test_mol_id.data add append"););
BEGIN_HIDE_OUTPUT();
command("atom_modify map array");
command("fix MoleculeIDs all property/atom mol");
command("read_data test_mol_id.data fix MoleculeIDs NULL Molecules");
command("read_data test_mol_id_merge.data add merge fix MoleculeIDs NULL Molecules");
END_HIDE_OUTPUT();
EXPECT_EQ(lmp->atom->natoms, 8);
EXPECT_EQ(lmp->atom->molecule[GETIDX(1)], 1);
EXPECT_EQ(lmp->atom->molecule[GETIDX(2)], 1);
EXPECT_EQ(lmp->atom->molecule[GETIDX(3)], 2);
EXPECT_EQ(lmp->atom->molecule[GETIDX(4)], 2);
EXPECT_EQ(lmp->atom->molecule[GETIDX(6)], 6);
EXPECT_EQ(lmp->atom->molecule[GETIDX(7)], 5);
EXPECT_EQ(lmp->atom->molecule[GETIDX(8)], 6);
EXPECT_EQ(lmp->atom->molecule[GETIDX(9)], 5);
EXPECT_EQ(lmp->atom->tag[GETIDX(1)], 1);
EXPECT_EQ(lmp->atom->tag[GETIDX(2)], 2);
EXPECT_EQ(lmp->atom->tag[GETIDX(3)], 3);
EXPECT_EQ(lmp->atom->tag[GETIDX(4)], 4);
EXPECT_EQ(lmp->atom->tag[GETIDX(6)], 6);
EXPECT_EQ(lmp->atom->tag[GETIDX(7)], 7);
EXPECT_EQ(lmp->atom->tag[GETIDX(8)], 8);
EXPECT_EQ(lmp->atom->tag[GETIDX(9)], 9);
BEGIN_HIDE_OUTPUT();
command("clear");
command("atom_modify map array");
command("fix MoleculeIDs all property/atom mol");
command("read_data test_mol_id.data fix MoleculeIDs NULL Molecules");
command("read_data test_mol_id.data add append fix MoleculeIDs NULL Molecules");
END_HIDE_OUTPUT();
EXPECT_EQ(lmp->atom->natoms, 8);
EXPECT_EQ(lmp->atom->molecule[GETIDX(1)], 1);
EXPECT_EQ(lmp->atom->molecule[GETIDX(2)], 1);
EXPECT_EQ(lmp->atom->molecule[GETIDX(3)], 2);
EXPECT_EQ(lmp->atom->molecule[GETIDX(4)], 2);
EXPECT_EQ(lmp->atom->molecule[GETIDX(5)], 1);
EXPECT_EQ(lmp->atom->molecule[GETIDX(6)], 1);
EXPECT_EQ(lmp->atom->molecule[GETIDX(7)], 2);
EXPECT_EQ(lmp->atom->molecule[GETIDX(8)], 2);
EXPECT_EQ(lmp->atom->tag[GETIDX(1)], 1);
EXPECT_EQ(lmp->atom->tag[GETIDX(2)], 2);
EXPECT_EQ(lmp->atom->tag[GETIDX(3)], 3);
EXPECT_EQ(lmp->atom->tag[GETIDX(4)], 4);
EXPECT_EQ(lmp->atom->tag[GETIDX(5)], 5);
EXPECT_EQ(lmp->atom->tag[GETIDX(6)], 6);
EXPECT_EQ(lmp->atom->tag[GETIDX(7)], 7);
EXPECT_EQ(lmp->atom->tag[GETIDX(8)], 8);
BEGIN_HIDE_OUTPUT();
command("clear");
command("atom_modify map array");
command("fix MoleculeIDs all property/atom mol");
command("read_data test_mol_id.data fix MoleculeIDs NULL Molecules");
command("read_data test_mol_id.data add 6 4 fix MoleculeIDs NULL Molecules");
END_HIDE_OUTPUT();
EXPECT_EQ(lmp->atom->natoms, 8);
EXPECT_EQ(lmp->atom->molecule[GETIDX(1)], 1);
EXPECT_EQ(lmp->atom->molecule[GETIDX(2)], 1);
EXPECT_EQ(lmp->atom->molecule[GETIDX(3)], 2);
EXPECT_EQ(lmp->atom->molecule[GETIDX(4)], 2);
EXPECT_EQ(lmp->atom->molecule[GETIDX(7)], 1);
EXPECT_EQ(lmp->atom->molecule[GETIDX(8)], 1);
EXPECT_EQ(lmp->atom->molecule[GETIDX(9)], 2);
EXPECT_EQ(lmp->atom->molecule[GETIDX(10)], 2);
EXPECT_EQ(lmp->atom->tag[GETIDX(1)], 1);
EXPECT_EQ(lmp->atom->tag[GETIDX(2)], 2);
EXPECT_EQ(lmp->atom->tag[GETIDX(3)], 3);
EXPECT_EQ(lmp->atom->tag[GETIDX(4)], 4);
EXPECT_EQ(lmp->atom->tag[GETIDX(7)], 7);
EXPECT_EQ(lmp->atom->tag[GETIDX(8)], 8);
EXPECT_EQ(lmp->atom->tag[GETIDX(9)], 9);
EXPECT_EQ(lmp->atom->tag[GETIDX(10)], 10);
}
int main(int argc, char **argv)
{
MPI_Init(&argc, &argv);