Merge pull request #4446 from jtclemm/small-patches
Miscellaneous small patches
This commit is contained in:
@ -203,6 +203,7 @@ processed in the expected order before types are removed from dynamic
|
||||
dispatch.
|
||||
|
||||
.. admonition:: Important Notes
|
||||
:class: note
|
||||
|
||||
In order to be able to detect incompatibilities at compile time and
|
||||
to avoid unexpected behavior, it is crucial that all member functions
|
||||
|
||||
@ -956,6 +956,7 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
||||
:f:func:`extract_atom` between runs.
|
||||
|
||||
.. admonition:: Array index order
|
||||
:class: tip
|
||||
|
||||
Two-dimensional arrays returned from :f:func:`extract_atom` will be
|
||||
**transposed** from equivalent arrays in C, and they will be indexed
|
||||
@ -1068,6 +1069,7 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
||||
you based on data from the :cpp:class:`Compute` class.
|
||||
|
||||
.. admonition:: Array index order
|
||||
:class: tip
|
||||
|
||||
Two-dimensional arrays returned from :f:func:`extract_compute` will be
|
||||
**transposed** from equivalent arrays in C, and they will be indexed
|
||||
@ -1326,6 +1328,7 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
||||
:rtype data: polymorphic
|
||||
|
||||
.. admonition:: Array index order
|
||||
:class: tip
|
||||
|
||||
Two-dimensional global, per-atom, or local array data from
|
||||
:f:func:`extract_fix` will be **transposed** from equivalent arrays in
|
||||
|
||||
@ -10,20 +10,21 @@ and/or pressure (P) is specified by the user, and the thermostat or
|
||||
barostat attempts to equilibrate the system to the requested T and/or
|
||||
P.
|
||||
|
||||
Barostatting in LAMMPS is performed by :doc:`fixes <fix>`. Two
|
||||
Barostatting in LAMMPS is performed by :doc:`fixes <fix>`. Three
|
||||
barostatting methods are currently available: Nose-Hoover (npt and
|
||||
nph) and Berendsen:
|
||||
nph), Berendsen, and various linear controllers in deform/pressure:
|
||||
|
||||
* :doc:`fix npt <fix_nh>`
|
||||
* :doc:`fix npt/sphere <fix_npt_sphere>`
|
||||
* :doc:`fix npt/asphere <fix_npt_asphere>`
|
||||
* :doc:`fix nph <fix_nh>`
|
||||
* :doc:`fix press/berendsen <fix_press_berendsen>`
|
||||
* :doc:`fix deform/pressure <fix_deform_pressure>`
|
||||
|
||||
The :doc:`fix npt <fix_nh>` commands include a Nose-Hoover thermostat
|
||||
and barostat. :doc:`Fix nph <fix_nh>` is just a Nose/Hoover barostat;
|
||||
it does no thermostatting. Both :doc:`fix nph <fix_nh>` and :doc:`fix press/berendsen <fix_press_berendsen>` can be used in conjunction
|
||||
with any of the thermostatting fixes.
|
||||
it does no thermostatting. The fixes :doc:`nph <fix_nh>`, :doc:`press/berendsen <fix_press_berendsen>`, and :doc:`deform/pressure <fix_deform_pressure>`
|
||||
can be used in conjunction with any of the thermostatting fixes.
|
||||
|
||||
As with the :doc:`thermostats <Howto_thermostat>`, :doc:`fix npt <fix_nh>`
|
||||
and :doc:`fix nph <fix_nh>` only use translational motion of the
|
||||
@ -44,9 +45,9 @@ a temperature or pressure compute to a barostatting fix.
|
||||
.. note::
|
||||
|
||||
As with the thermostats, the Nose/Hoover methods (:doc:`fix npt <fix_nh>` and :doc:`fix nph <fix_nh>`) perform time integration.
|
||||
:doc:`Fix press/berendsen <fix_press_berendsen>` does NOT, so it should
|
||||
be used with one of the constant NVE fixes or with one of the NVT
|
||||
fixes.
|
||||
:doc:`Fix press/berendsen <fix_press_berendsen>` and :doc:`fix deform/pressure <fix_deform_pressure>`
|
||||
do NOT, so they should be used with one of the constant NVE fixes or with
|
||||
one of the NVT fixes.
|
||||
|
||||
Thermodynamic output, which can be setup via the
|
||||
:doc:`thermo_style <thermo_style>` command, often includes pressure
|
||||
|
||||
@ -52,6 +52,7 @@ your machine and "release" is one of the 3 branches listed above.
|
||||
between them at any time using "git checkout <branch name>".)
|
||||
|
||||
.. admonition:: Saving time and disk space when using ``git clone``
|
||||
:class: note
|
||||
|
||||
The complete git history of the LAMMPS project is quite large because
|
||||
it contains the entire commit history of the project since fall 2006,
|
||||
|
||||
@ -145,6 +145,7 @@ per line.
|
||||
The detail of *nn* module implementation can be found at :ref:`(Yanxon) <Yanxon2020>`.
|
||||
|
||||
.. admonition:: Notes on mliappy models
|
||||
:class: note
|
||||
|
||||
When the *model* keyword is *mliappy*, if the filename ends in '.pt',
|
||||
or '.pth', it will be loaded using pytorch; otherwise, it will be
|
||||
|
||||
@ -158,11 +158,36 @@ drops to zero.
|
||||
Optional keywords *safezone*, *mincap*, and *minhbonds* are used
|
||||
for allocating reaxff arrays. Increasing these values can avoid memory
|
||||
problems, such as segmentation faults and bondchk failed errors, that
|
||||
could occur under certain conditions. These keywords are not used by
|
||||
could occur under certain conditions. These keywords are **not** used by
|
||||
the Kokkos version, which instead uses a more robust memory allocation
|
||||
scheme that checks if the sizes of the arrays have been exceeded and
|
||||
automatically allocates more memory.
|
||||
|
||||
.. admonition:: Memory management problems with ReaxFF
|
||||
:class: tip
|
||||
|
||||
The LAMMPS implementation of ReaxFF is adapted from a standalone MD
|
||||
program written in C called `PuReMD
|
||||
<https://github.com/msu-sparta/PuReMD>`_. It inherits from this code
|
||||
a heuristic memory management that is different from what the rest of
|
||||
LAMMPS uses. It assumes that a system is dense and already well
|
||||
equilibrated, so that there are no large changes in how many and what
|
||||
types of neighbors atoms have. However, not all systems are like
|
||||
that, and thus there can be errors or segmentation faults if the
|
||||
system changes too much. If you run into problems, here are three
|
||||
options to avoid them:
|
||||
|
||||
- Use the KOKKOS version of ReaxFF (KOKKOS is not only for GPUs,
|
||||
but can also be compiled for serial or OpenMP execution) which
|
||||
uses a different memory management approach.
|
||||
- Break down a run command during which memory related errors happen
|
||||
into multiple smaller segments so that the memory management
|
||||
heuristics are re-initialized for each segment before they become
|
||||
invalid.
|
||||
- Increase the values for *safezone*, *mincap*, and *minhbonds* as
|
||||
needed. This can lead to significant increase of memory consumption
|
||||
through.
|
||||
|
||||
The keyword *tabulate* controls the size of interpolation table for
|
||||
Lennard-Jones and Coulomb interactions. Tabulation may also be set in the
|
||||
control file (see below). If tabulation is set in both the input script and the
|
||||
|
||||
@ -32,7 +32,7 @@ fix 1 all nvt temp 0.7 0.7 0.2
|
||||
#dump_modify 3 pad 3
|
||||
|
||||
fix 2 all recenter NULL NULL 15 units lattice
|
||||
compute p1 all stress/cartesian z 0.5
|
||||
compute p1 all stress/cartesian z 0.5 NULL 0
|
||||
fix 3 all ave/time 100 1 100 c_p1[*] file flat.out mode vector
|
||||
|
||||
thermo 50
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Big colloid particles and small LJ particles
|
||||
# Binary granular system
|
||||
|
||||
units lj
|
||||
atom_style sphere
|
||||
|
||||
@ -68,7 +68,8 @@ FixElectronStoppingFit::FixElectronStoppingFit(LAMMPS *lmp, int narg, char **arg
|
||||
error->all(FLERR,"Incorrect number of fix electron/stopping/fit arguments");
|
||||
}
|
||||
|
||||
scalar_flag = 1;
|
||||
scalar_flag = 1; // intensive total energy loss since start of run
|
||||
extscalar = 0;
|
||||
global_freq = 1;
|
||||
|
||||
energy_coh_in = new double[atom->ntypes+1];
|
||||
|
||||
@ -397,10 +397,11 @@ void PairSRP::coeff(int narg, char **arg)
|
||||
error->all(FLERR,"PairSRP: Incorrect args for pair coeff");
|
||||
if (!allocated) allocate();
|
||||
|
||||
if (btype_str.size() > 0)
|
||||
if (btype_str.size() > 0) {
|
||||
btype = utils::expand_type_int(FLERR, btype_str, Atom::BOND, lmp);
|
||||
if ((btype > atom->nbondtypes) || (btype <= 0))
|
||||
error->all(FLERR,"Invalid bond type {} for pair style srp", btype);
|
||||
}
|
||||
|
||||
if (bptype_str.size() > 0)
|
||||
bptype = utils::expand_type_int(FLERR, bptype_str, Atom::ATOM, lmp);
|
||||
|
||||
@ -273,11 +273,13 @@ double FixRHEOPressure::calc_rho(double p, int i)
|
||||
error->one(FLERR,
|
||||
"Rho calculation from pressure not yet supported for cubic pressure equation");
|
||||
} else if (pressure_style[type] == TAITWATER) {
|
||||
rho = pow(7.0 * p + csq[type] * rho0[type], SEVENTH);
|
||||
double tmp = 7.0 * p + csq[type] * rho0[type];
|
||||
rho = pow(MAX(0.0, tmp), SEVENTH);
|
||||
rho *= pow(rho0[type], 6.0 * SEVENTH);
|
||||
rho *= pow(csq[type], -SEVENTH);
|
||||
} else if (pressure_style[type] == TAITGENERAL) {
|
||||
rho = pow(tpower[type] * p + csq[type] * rho0[type], 1.0 / tpower[type]);
|
||||
double tmp = tpower[type] * p + csq[type] * rho0[type];
|
||||
rho = pow(MAX(0.0, tmp), 1.0 / tpower[type]);
|
||||
rho *= pow(rho0[type], 1.0 - 1.0 / tpower[type]);
|
||||
rho *= pow(csq[type], -1.0 / tpower[type]);
|
||||
} else if (pressure_style[type] == IDEAL) {
|
||||
|
||||
Reference in New Issue
Block a user