Merge pull request #4383 from akohlmey/collected-small-changes
Collected small changes and fixes
This commit is contained in:
3
.github/CODEOWNERS
vendored
3
.github/CODEOWNERS
vendored
@ -101,7 +101,8 @@ src/group.* @sjplimp
|
||||
src/improper.* @sjplimp
|
||||
src/info.* @akohlmey
|
||||
src/kspace.* @sjplimp
|
||||
src/lmptyp.h @sjplimp
|
||||
src/lmptype.h @sjplimp
|
||||
src/label_map.* @jrgissing @akohlmey
|
||||
src/library.* @sjplimp @akohlmey
|
||||
src/main.cpp @sjplimp
|
||||
src/min_*.* @sjplimp
|
||||
|
||||
@ -10,7 +10,7 @@ Last change: 2022-12-30
|
||||
|
||||
In fall 2019, the LAMMPS documentation file format has changed from a
|
||||
home grown markup designed to generate HTML format files only, to
|
||||
[reStructuredText](https://docutils.sourceforge.io/rst.html>. For a
|
||||
[reStructuredText](https://docutils.sourceforge.io/rst.html>). For a
|
||||
transition period all files in the old .txt format were transparently
|
||||
converted to .rst and then processed. The `txt2rst tool` is still
|
||||
included in the distribution to obtain an initial .rst file for legacy
|
||||
@ -45,8 +45,7 @@ what kind of information and sections are needed.
|
||||
|
||||
## Formatting conventions
|
||||
|
||||
For headlines we try to follow the conventions posted here:
|
||||
https://documentation-style-guide-sphinx.readthedocs.io/en/latest/style-guide.html#headings
|
||||
For headlines we try to follow the conventions posted [here](https://documentation-style-guide-sphinx.readthedocs.io/en/latest/style-guide.html#headings).
|
||||
It seems to be sufficient to have this consistent only within
|
||||
any single file and it is not (yet) enforced strictly, but making
|
||||
this globally consistent makes it easier to move sections around.
|
||||
@ -64,7 +63,7 @@ Groups of shell commands or LAMMPS input script or C/C++/Python source
|
||||
code should be typeset into a `.. code-block::` section. A syntax
|
||||
highlighting extension for LAMMPS input scripts is provided, so `LAMMPS`
|
||||
can be used to indicate the language in the code block in addition to
|
||||
`bash`, `c`, `c++`, `console`, `csh`, `diff', `fortran`, `json`, `make`,
|
||||
`bash`, `c`, `c++`, `console`, `csh`, `diff`, `fortran`, `json`, `make`,
|
||||
`perl`, `powershell`, `python`, `sh`, or `tcl`, `text`, or `yaml`. When
|
||||
no syntax style is indicated, no syntax highlighting is performed. When
|
||||
typesetting commands executed on the shell, please do not prefix
|
||||
@ -84,7 +83,7 @@ block can be used, followed by multiple `.. tab::` blocks, one
|
||||
for each alternative. This is only used for HTML output. For other
|
||||
outputs, the `.. tabs::` directive is transparently removed and
|
||||
the individual `.. tab::` blocks will be replaced with an
|
||||
`.. admonition::`` block. Thus in PDF and ePUB output those will
|
||||
`.. admonition::` block. Thus in PDF and ePUB output those will
|
||||
be realized as sequential and plain notes.
|
||||
|
||||
Special remarks can be highlighted with a `.. note::` block and
|
||||
|
||||
@ -6,7 +6,9 @@ choices the LAMMPS developers have agreed on. Git and GitHub provide the
|
||||
tools, but do not set policies, so it is up to the developers to come to
|
||||
an agreement as to how to define and interpret policies. This document
|
||||
is likely to change as our experiences and needs change, and we try to
|
||||
adapt it accordingly. Last change 2023-02-10.
|
||||
adapt it accordingly.
|
||||
|
||||
Last change: 2023-02-10
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@ -72,7 +74,7 @@ be assigned to signal urgency to merge this pull request quickly.
|
||||
People can be assigned to review a pull request in two ways:
|
||||
|
||||
* They can be assigned manually to review a pull request
|
||||
by the submitter or a LAMMPS developer
|
||||
by the submitter or a LAMMPS developer.
|
||||
* They can be automatically assigned, because a developer's GitHub
|
||||
handle matches a file pattern in the `.github/CODEOWNERS` file,
|
||||
which associates developers with the code they contributed and
|
||||
@ -86,9 +88,9 @@ required before merging, in addition to passing all automated
|
||||
compilation and unit tests. Merging counts as implicit approval, so
|
||||
does submission of a pull request (by a LAMMPS developer). So the person
|
||||
doing the merge may not also submit an approving review. The GitHub
|
||||
feature, that reviews from code owners are "hard" reviews (i.e. they
|
||||
must all approve before merging is allowed), is currently disabled.
|
||||
It is in the discretion of the merge maintainer to assess when a
|
||||
feature that reviews from code owners are "hard" reviews (i.e. they
|
||||
must all approve before merging is allowed) is currently disabled.
|
||||
It is at the discretion of the merge maintainer to assess when a
|
||||
sufficient degree of approval has been reached, especially from external
|
||||
collaborators. Reviews may be (automatically) dismissed, when the
|
||||
reviewed code has been changed. Review may be requested a second time.
|
||||
@ -147,7 +149,8 @@ only contain bug fixes, feature additions to peripheral functionality,
|
||||
and documentation updates. In between stable releases, bug fixes and
|
||||
infrastructure updates are back-ported from the "develop" branch to the
|
||||
"maintenance" branch and occasionally merged into "stable" and published
|
||||
as update releases.
|
||||
as update releases. Further explanation of LAMMPS versions can be found
|
||||
[in the documentation](https://docs.lammps.org/Manual_version.html).
|
||||
|
||||
## Project Management
|
||||
|
||||
|
||||
@ -119,6 +119,14 @@ style supports it. Note that the :doc:`pair_style <pair_style>` and
|
||||
to specify these parameters initially; the fix adapt command simply
|
||||
overrides the parameters.
|
||||
|
||||
.. note::
|
||||
|
||||
Pair_coeff settings must be made **explicitly** in order for fix
|
||||
adapt to be able to change them. Settings inferred from mixing
|
||||
are not suitable. If necessary all mixed settings can be output
|
||||
to a file using the :doc:`write_coeff command <write_coeff>` and
|
||||
then the desired mixed pair_coeff settings copied from that file.
|
||||
|
||||
The *pstyle* argument is the name of the pair style. If
|
||||
:doc:`pair_style hybrid or hybrid/overlay <pair_hybrid>` is used,
|
||||
*pstyle* should be a sub-style name. If there are multiple
|
||||
|
||||
@ -116,12 +116,22 @@ style supports it. Note that the :doc:`pair_style <pair_style>` and
|
||||
to specify these parameters initially; the fix adapt command simply
|
||||
overrides the parameters.
|
||||
|
||||
The *pstyle* argument is the name of the pair style. If :doc:`pair_style hybrid or hybrid/overlay <pair_hybrid>` is used, *pstyle* should be
|
||||
a sub-style name. For example, *pstyle* could be specified as "soft"
|
||||
or "lubricate". The *pparam* argument is the name of the parameter to
|
||||
change. This is the current list of pair styles and parameters that
|
||||
can be varied by this fix. See the doc pages for individual pair
|
||||
styles and their energy formulas for the meaning of these parameters:
|
||||
.. note::
|
||||
|
||||
Pair_coeff settings must be made **explicitly** in order for fix
|
||||
adapt/fep to be able to change them. Settings inferred from mixing
|
||||
are not suitable. If necessary all mixed settings can be output
|
||||
to a file using the :doc:`write_coeff command <write_coeff>` and
|
||||
then the desired mixed pair_coeff settings copied from that file.
|
||||
|
||||
The *pstyle* argument is the name of the pair style. If
|
||||
:doc:`pair_style hybrid or hybrid/overlay <pair_hybrid>` is used,
|
||||
*pstyle* should be a sub-style name. For example, *pstyle* could be
|
||||
specified as "soft" or "lubricate". The *pparam* argument is the name
|
||||
of the parameter to change. This is the current list of pair styles and
|
||||
parameters that can be varied by this fix. See the doc pages for
|
||||
individual pair styles and their energy formulas for the meaning of
|
||||
these parameters:
|
||||
|
||||
+------------------------------------------------------------------------------+-------------------------+------------+
|
||||
| :doc:`born <pair_born>` | a,b,c | type pairs |
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
.. index:: fix colvars
|
||||
.. index:: fix colvars/kk
|
||||
|
||||
fix colvars command
|
||||
===================
|
||||
|
||||
Accelerator Variants: *colvars/kk*
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
@ -118,6 +121,16 @@ thermostat target temperature.
|
||||
The *seed* keyword contains the seed for the random number generator
|
||||
that will be used in the colvars module.
|
||||
|
||||
----------
|
||||
|
||||
.. note::
|
||||
|
||||
Fix colvars/kk is not really ported to KOKKOS, since the colvars
|
||||
library has not been ported to KOKKOS. It merely has some
|
||||
optimizations to reduce the data transfers between host and device
|
||||
for KOKKOS with GPUs.
|
||||
|
||||
----------
|
||||
|
||||
Restarting
|
||||
""""""""""
|
||||
|
||||
@ -13,7 +13,7 @@ Syntax
|
||||
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* spring/self = style name of this fix command
|
||||
* K = spring constant (force/distance units)
|
||||
* K = spring constant (force/distance units), can be a variable (see below)
|
||||
* dir = xyz, xy, xz, yz, x, y, or z (optional, default: xyz)
|
||||
|
||||
Examples
|
||||
@ -22,6 +22,7 @@ Examples
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix tether boundary-atoms spring/self 10.0
|
||||
fix var all spring/self v_kvar
|
||||
fix zrest move spring/self 10.0 z
|
||||
|
||||
Description
|
||||
@ -42,6 +43,22 @@ directions, but it can be limited to the xy-, xz-, yz-plane and the
|
||||
x-, y-, or z-direction, thus restraining the atoms to a line or a
|
||||
plane, respectively.
|
||||
|
||||
The force constant *k* can be specified as an equal-style or atom-style
|
||||
:doc:`variable <variable>`. If the value is a variable, it should be specified
|
||||
as v_name, where name is the variable name. In this case, the variable
|
||||
will be evaluated each time step, and its value(s) will be used as
|
||||
force constant for the spring force.
|
||||
|
||||
Equal-style variables can specify formulas with various mathematical
|
||||
functions and include :doc:`thermo_style <thermo_style>` command
|
||||
keywords for the simulation box parameters, time step, and elapsed time.
|
||||
Thus, it is easy to specify a time-dependent force field.
|
||||
|
||||
Atom-style variables can specify the same formulas as equal-style
|
||||
variables but can also include per-atom values, such as atom
|
||||
coordinates. Thus, it is easy to specify a spatially-dependent force
|
||||
field with optional time-dependence as well.
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
@ -89,7 +106,9 @@ invoked by the :doc:`minimize <minimize>` command.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
none
|
||||
|
||||
The KOKKOS version, *fix spring/self/kk* may only be used with a constant
|
||||
value of K, not a variable.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
@ -73,8 +73,6 @@ omp = re.compile("(.+)/omp\\s*$")
|
||||
opt = re.compile("(.+)/opt\\s*$")
|
||||
removed = re.compile("(.*)Deprecated$")
|
||||
|
||||
accel_pattern = re.compile(r"^.. include::\s+accel_styles.rst$")
|
||||
|
||||
def require_accel_include(path):
|
||||
found = False
|
||||
needs = False
|
||||
@ -94,6 +92,7 @@ def require_accel_include(path):
|
||||
if kokkos.match(line): needs = True
|
||||
if intel.match(line): needs = True
|
||||
if opt.match(line): needs = True
|
||||
if path == "src/fix_colvars.rst": needs = False
|
||||
m = cmd_pattern.match(line)
|
||||
if m:
|
||||
if gpu.match(line): needs = True
|
||||
@ -167,7 +166,9 @@ def check_style(filename, dirname, pattern, styles, name, suffix=False, skip=set
|
||||
# known undocumented aliases we need to skip
|
||||
if c in skip: continue
|
||||
s = c
|
||||
if suffix: s = add_suffix(styles, c)
|
||||
if suffix:
|
||||
s = add_suffix(styles, c)
|
||||
if s == 'colvars (k)' : continue
|
||||
if not s in matches:
|
||||
if not styles[c]['removed']:
|
||||
print(f"{name} style entry {s} is missing or incomplete in {filename}")
|
||||
@ -300,7 +301,7 @@ for command_type, entries in index.items():
|
||||
print("Total number of style index entries:", total_index)
|
||||
|
||||
skip_angle = ('sdk')
|
||||
skip_fix = ('python', 'NEIGH_HISTORY/omp','acks2/reax','qeq/reax','reax/c/bonds','reax/c/species', 'pimd')
|
||||
skip_fix = ('python', 'NEIGH_HISTORY/omp','acks2/reax','qeq/reax','reax/c/bonds','reax/c/species', 'pimd', 'colvars/kk')
|
||||
skip_pair = ('meam/c','lj/sf','reax/c','lj/sdk','lj/sdk/coul/long','lj/sdk/coul/msm')
|
||||
skip_compute = ('pressure/cylinder')
|
||||
|
||||
|
||||
@ -79,6 +79,9 @@ void FixSpringSelfKokkos<DeviceType>::init()
|
||||
{
|
||||
FixSpringSelf::init();
|
||||
|
||||
if (kstyle != CONSTANT)
|
||||
error->all(FLERR, "Fix spring/self/kk does not support variable spring constants (yet)");
|
||||
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
error->all(FLERR,"Cannot (yet) use respa with Kokkos");
|
||||
}
|
||||
|
||||
@ -402,14 +402,18 @@ void PairSWAngleTable::threebody_table(Param *paramij, Param *paramik, ParamTabl
|
||||
|
||||
rinv12 = 1.0/(r1*r2);
|
||||
cs = (delr1[0]*delr2[0] + delr1[1]*delr2[1] + delr1[2]*delr2[2]) * rinv12;
|
||||
|
||||
var = acos(cs);
|
||||
cs = MAX(-1.0,MIN(cs,1.0));
|
||||
|
||||
// look up energy (f(theta), ftheta) and force (df(theta)/dtheta, fprimetheta) at
|
||||
// angle theta (var) in angle table belonging to parameter set paramijk
|
||||
|
||||
var = acos(cs);
|
||||
uf_lookup(table_paramijk, var, ftheta, fprimetheta);
|
||||
|
||||
acosprime = 1.0 / (sqrt(1 - cs*cs ) );
|
||||
if ((cs*cs - 1.0) != 0.0)
|
||||
acosprime = 1.0 / (sqrt(1 - cs*cs ) );
|
||||
else
|
||||
acosprime = 0.0;
|
||||
|
||||
facradtable = facexp*ftheta;
|
||||
frad1table = facradtable*gsrainvsq1;
|
||||
|
||||
@ -106,7 +106,9 @@ void PairReaxFFOMP::init_style()
|
||||
|
||||
auto acks2_fixes = modify->get_fix_by_style("^acks2/reax");
|
||||
int have_qeq = modify->get_fix_by_style("^qeq/reax").size()
|
||||
+ modify->get_fix_by_style("^qeq/shielded").size() + acks2_fixes.size();
|
||||
+ modify->get_fix_by_style("^qeq/shielded").size() + acks2_fixes.size()
|
||||
+ modify->get_fix_by_style("^qtpie/reax").size();
|
||||
|
||||
|
||||
if (qeqflag && (have_qeq != 1))
|
||||
error->all(FLERR,"Pair style reaxff/omp requires use of exactly one of the "
|
||||
|
||||
@ -344,7 +344,7 @@ void FixQEqReaxFF::allocate_matrix()
|
||||
int mincap;
|
||||
double safezone;
|
||||
|
||||
if (reaxflag) {
|
||||
if (reaxflag && reaxff) {
|
||||
mincap = reaxff->api->system->mincap;
|
||||
safezone = reaxff->api->system->safezone;
|
||||
} else {
|
||||
|
||||
@ -199,7 +199,9 @@ void FixQtpieReaxFF::pertype_parameters(char *arg)
|
||||
if (comm->me == 0) {
|
||||
gauss_exp[0] = 0.0;
|
||||
try {
|
||||
TextFileReader reader(gauss_file,"qtpie/reaxff gaussian exponents");
|
||||
FILE *fp = utils::open_potential(gauss_file, lmp, nullptr);
|
||||
if (!fp) throw TokenizerException("Fix qtpie/reaxff: could not open gauss file", gauss_file);
|
||||
TextFileReader reader(fp,"qtpie/reaxff gaussian exponents");
|
||||
reader.ignore_comments = true;
|
||||
for (int i = 1; i <= ntypes; i++) {
|
||||
const char *line = reader.next_line();
|
||||
@ -370,7 +372,7 @@ void FixQtpieReaxFF::allocate_matrix()
|
||||
int mincap;
|
||||
double safezone;
|
||||
|
||||
if (reaxflag) {
|
||||
if (reaxflag && reaxff) {
|
||||
mincap = reaxff->api->system->mincap;
|
||||
safezone = reaxff->api->system->safezone;
|
||||
} else {
|
||||
|
||||
@ -81,16 +81,16 @@ class FixQtpieReaxFF : public Fix {
|
||||
double *Hdia_inv;
|
||||
double *b_s, *b_t;
|
||||
double *b_prc, *b_prm;
|
||||
double *chi_eff; // array of effective electronegativities
|
||||
double *chi_eff; // array of effective electronegativities
|
||||
|
||||
//CG storage
|
||||
double *p, *q, *r, *d;
|
||||
int imax, maxwarn;
|
||||
|
||||
char *pertype_option; // argument to determine how per-type info is obtained
|
||||
char *gauss_file; // input file for gaussian orbital exponents
|
||||
double *gauss_exp; // array of gaussian orbital exponents for each atom type
|
||||
double dist_cutoff; // separation distance beyond which to neglect overlap integrals
|
||||
char *gauss_file; // input file for gaussian orbital exponents
|
||||
double *gauss_exp; // array of gaussian orbital exponents for each atom type
|
||||
double dist_cutoff; // separation distance beyond which to neglect overlap integrals
|
||||
|
||||
void pertype_parameters(char *);
|
||||
void init_shielding();
|
||||
|
||||
@ -143,9 +143,10 @@ FixReaxFFSpecies::FixReaxFFSpecies(LAMMPS *lmp, int narg, char **arg) :
|
||||
x0 = nullptr;
|
||||
clusterID = nullptr;
|
||||
|
||||
int ntmp = 1;
|
||||
int ntmp = atom->nmax;
|
||||
memory->create(x0, ntmp, "reaxff/species:x0");
|
||||
memory->create(clusterID, ntmp, "reaxff/species:clusterID");
|
||||
memset(clusterID, 0, sizeof(double) * ntmp);
|
||||
vector_atom = clusterID;
|
||||
|
||||
nmax = 0;
|
||||
@ -193,8 +194,7 @@ FixReaxFFSpecies::FixReaxFFSpecies(LAMMPS *lmp, int narg, char **arg) :
|
||||
if (iarg + ntypes + 1 > narg)
|
||||
utils::missing_cmd_args(FLERR, "fix reaxff/species element", error);
|
||||
|
||||
for (int i = 0; i < ntypes; i++)
|
||||
eletype[i] = arg[iarg + 1 + i];
|
||||
for (int i = 0; i < ntypes; i++) eletype[i] = arg[iarg + 1 + i];
|
||||
GetUniqueElements();
|
||||
iarg += ntypes + 1;
|
||||
|
||||
@ -348,8 +348,7 @@ void FixReaxFFSpecies::setup(int /*vflag*/)
|
||||
ntotal = static_cast<int>(atom->natoms);
|
||||
|
||||
if (!eleflag) {
|
||||
for (int i = 0; i < ntypes; i++)
|
||||
eletype[i] = reaxff->eletype[i+1];
|
||||
for (int i = 0; i < ntypes; i++) eletype[i] = reaxff->eletype[i + 1];
|
||||
GetUniqueElements();
|
||||
}
|
||||
memory->destroy(Name);
|
||||
@ -441,6 +440,7 @@ void FixReaxFFSpecies::Output_ReaxFF_Bonds(bigint ntimestep, FILE * /*fp*/)
|
||||
memory->destroy(clusterID);
|
||||
memory->create(x0, nmax, "reaxff/species:x0");
|
||||
memory->create(clusterID, nmax, "reaxff/species:clusterID");
|
||||
memset(clusterID, 0, sizeof(double) * nmax);
|
||||
vector_atom = clusterID;
|
||||
}
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ namespace LAMMPS_NS {
|
||||
|
||||
class Command : protected Pointers {
|
||||
public:
|
||||
Command(class LAMMPS *lmp) : Pointers(lmp) {};
|
||||
Command(class LAMMPS *lmp) : Pointers(lmp), copymode(0) {};
|
||||
virtual void command(int, char **) = 0;
|
||||
|
||||
protected:
|
||||
|
||||
@ -21,9 +21,11 @@
|
||||
#include "atom.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "input.h"
|
||||
#include "memory.h"
|
||||
#include "respa.h"
|
||||
#include "update.h"
|
||||
#include "variable.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@ -33,8 +35,7 @@ using namespace FixConst;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixSpringSelf::FixSpringSelf(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg),
|
||||
xoriginal(nullptr)
|
||||
Fix(lmp, narg, arg), xoriginal(nullptr), kstr(nullptr), kval(nullptr)
|
||||
{
|
||||
if ((narg < 4) || (narg > 5))
|
||||
error->all(FLERR,"Illegal fix spring/self command");
|
||||
@ -45,9 +46,17 @@ FixSpringSelf::FixSpringSelf(LAMMPS *lmp, int narg, char **arg) :
|
||||
extscalar = 1;
|
||||
energy_global_flag = 1;
|
||||
respa_level_support = 1;
|
||||
maxatom = 0;
|
||||
kvar = -1;
|
||||
|
||||
k = utils::numeric(FLERR,arg[3],false,lmp);
|
||||
if (k <= 0.0) error->all(FLERR,"Illegal fix spring/self command");
|
||||
if (utils::strmatch(arg[3], "^v_")) {
|
||||
kstr = utils::strdup(arg[3] + 2);
|
||||
kstyle = NONE;
|
||||
} else {
|
||||
k = utils::numeric(FLERR,arg[3],false,lmp);
|
||||
kstyle = CONSTANT;
|
||||
if (k <= 0.0) error->all(FLERR,"Illegal force constant for fix spring/self command");
|
||||
}
|
||||
|
||||
xflag = yflag = zflag = 1;
|
||||
|
||||
@ -103,8 +112,10 @@ FixSpringSelf::~FixSpringSelf()
|
||||
atom->delete_callback(id,Atom::GROW);
|
||||
atom->delete_callback(id,Atom::RESTART);
|
||||
|
||||
// delete locally stored array
|
||||
// delete locally stored arrays
|
||||
|
||||
delete[] kstr;
|
||||
memory->destroy(kval);
|
||||
memory->destroy(xoriginal);
|
||||
}
|
||||
|
||||
@ -123,6 +134,25 @@ int FixSpringSelf::setmask()
|
||||
|
||||
void FixSpringSelf::init()
|
||||
{
|
||||
// check variable
|
||||
|
||||
if (kstr) {
|
||||
kvar = input->variable->find(kstr);
|
||||
if (kvar < 0) error->all(FLERR, "Variable {} for fix spring/self does not exist", kstr);
|
||||
if (input->variable->equalstyle(kvar))
|
||||
kstyle = EQUAL;
|
||||
else if (input->variable->atomstyle(kvar))
|
||||
kstyle = ATOM;
|
||||
else
|
||||
error->all(FLERR, "Variable {} for fix spring/self is invalid style", kstr);
|
||||
}
|
||||
|
||||
|
||||
if ((kstyle == ATOM) && (atom->nmax > maxatom)) {
|
||||
maxatom = atom->nmax;
|
||||
memory->destroy(kval);
|
||||
memory->create(kval, maxatom, "sprint/self:kval");
|
||||
}
|
||||
if (utils::strmatch(update->integrate_style,"^respa")) {
|
||||
ilevel_respa = (dynamic_cast<Respa *>(update->integrate))->nlevels-1;
|
||||
if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa);
|
||||
@ -162,24 +192,58 @@ void FixSpringSelf::post_force(int /*vflag*/)
|
||||
double dx,dy,dz;
|
||||
double unwrap[3];
|
||||
|
||||
// reallocate kval array if necessary
|
||||
|
||||
if ((kstyle == ATOM) && (atom->nmax > maxatom)) {
|
||||
maxatom = atom->nmax;
|
||||
memory->destroy(kval);
|
||||
memory->create(kval, maxatom, "sprint/self:kval");
|
||||
}
|
||||
|
||||
espring = 0.0;
|
||||
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
domain->unmap(x[i],image[i],unwrap);
|
||||
dx = unwrap[0] - xoriginal[i][0];
|
||||
dy = unwrap[1] - xoriginal[i][1];
|
||||
dz = unwrap[2] - xoriginal[i][2];
|
||||
if (!xflag) dx = 0.0;
|
||||
if (!yflag) dy = 0.0;
|
||||
if (!zflag) dz = 0.0;
|
||||
f[i][0] -= k*dx;
|
||||
f[i][1] -= k*dy;
|
||||
f[i][2] -= k*dz;
|
||||
espring += k * (dx*dx + dy*dy + dz*dz);
|
||||
if ((kstyle == CONSTANT) || (kstyle == EQUAL)) {
|
||||
// update k if equal style variable
|
||||
if (kstyle == EQUAL) {
|
||||
k = input->variable->compute_equal(kvar);
|
||||
if (k < 0.0)
|
||||
error->all(FLERR,"Evaluation of {} gave bad value {} for fix spring/self", kstr, k);
|
||||
}
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
domain->unmap(x[i],image[i],unwrap);
|
||||
dx = unwrap[0] - xoriginal[i][0];
|
||||
dy = unwrap[1] - xoriginal[i][1];
|
||||
dz = unwrap[2] - xoriginal[i][2];
|
||||
if (!xflag) dx = 0.0;
|
||||
if (!yflag) dy = 0.0;
|
||||
if (!zflag) dz = 0.0;
|
||||
f[i][0] -= k*dx;
|
||||
f[i][1] -= k*dy;
|
||||
f[i][2] -= k*dz;
|
||||
espring += k * (dx*dx + dy*dy + dz*dz);
|
||||
}
|
||||
espring *= 0.5;
|
||||
} else {
|
||||
// update kval for kstyle == ATOM
|
||||
input->variable->compute_atom(kvar, igroup, kval, 1, 0);
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
domain->unmap(x[i],image[i],unwrap);
|
||||
dx = unwrap[0] - xoriginal[i][0];
|
||||
dy = unwrap[1] - xoriginal[i][1];
|
||||
dz = unwrap[2] - xoriginal[i][2];
|
||||
if (!xflag) dx = 0.0;
|
||||
if (!yflag) dy = 0.0;
|
||||
if (!zflag) dz = 0.0;
|
||||
f[i][0] -= kval[i]*dx;
|
||||
f[i][1] -= kval[i]*dy;
|
||||
f[i][2] -= kval[i]*dz;
|
||||
espring += kval[i] * (dx*dx + dy*dy + dz*dz);
|
||||
}
|
||||
|
||||
espring *= 0.5;
|
||||
espring *= 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -213,7 +277,8 @@ double FixSpringSelf::compute_scalar()
|
||||
|
||||
double FixSpringSelf::memory_usage()
|
||||
{
|
||||
double bytes = (double)atom->nmax*3 * sizeof(double);
|
||||
double bytes = (double)atom->nmax*4 * sizeof(double);
|
||||
if (kstyle == ATOM) bytes += (double)atom->nmax * sizeof(double);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@ namespace LAMMPS_NS {
|
||||
|
||||
class FixSpringSelf : public Fix {
|
||||
public:
|
||||
enum { NONE, CONSTANT, EQUAL, ATOM };
|
||||
FixSpringSelf(class LAMMPS *, int, char **);
|
||||
~FixSpringSelf() override;
|
||||
int setmask() override;
|
||||
@ -50,8 +51,11 @@ class FixSpringSelf : public Fix {
|
||||
protected:
|
||||
double k, espring;
|
||||
double **xoriginal; // original coords of atoms
|
||||
char *kstr; // name of variable for K
|
||||
double *kval; // per-atom variable values for K
|
||||
int kvar, kstyle;
|
||||
int xflag, yflag, zflag;
|
||||
int ilevel_respa;
|
||||
int ilevel_respa, maxatom;
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -43,8 +43,6 @@ LabelMap::LabelMap(LAMMPS *_lmp, int _natomtypes, int _nbondtypes, int _nanglety
|
||||
Pointers(_lmp), natomtypes(_natomtypes), nbondtypes(_nbondtypes), nangletypes(_nangletypes),
|
||||
ndihedraltypes(_ndihedraltypes), nimpropertypes(_nimpropertypes)
|
||||
{
|
||||
if (lmp->citeme) lmp->citeme->add(cite_type_label_framework);
|
||||
|
||||
lmap2lmap.atom = lmap2lmap.bond = lmap2lmap.angle = lmap2lmap.dihedral = lmap2lmap.improper =
|
||||
nullptr;
|
||||
reset_type_labels();
|
||||
@ -112,6 +110,8 @@ void LabelMap::modify_lmap(int narg, char **arg)
|
||||
if ((narg < 1) || ((narg > 2) && ((narg % 2) == 0)))
|
||||
error->all(FLERR, "Incorrect number of arguments for labelmap command");
|
||||
|
||||
if (lmp->citeme) lmp->citeme->add(cite_type_label_framework);
|
||||
|
||||
int ntypes;
|
||||
std::vector<std::string> *labels;
|
||||
std::unordered_map<std::string, int> *labels_map;
|
||||
@ -238,6 +238,8 @@ int LabelMap::find_or_create(const std::string &mylabel, std::vector<std::string
|
||||
auto search = labels_map.find(mylabel);
|
||||
if (search != labels_map.end()) return search->second;
|
||||
|
||||
if (lmp->citeme) lmp->citeme->add(cite_type_label_framework);
|
||||
|
||||
// if no match found, create new label at next available index
|
||||
// label map assumed to be intialized with numeric index
|
||||
// user labels are assumed to be alphanumeric (not a number)
|
||||
|
||||
177
unittest/force-styles/tests/atomic-pair-reaxff-qtpie.yaml
Normal file
177
unittest/force-styles/tests/atomic-pair-reaxff-qtpie.yaml
Normal file
@ -0,0 +1,177 @@
|
||||
---
|
||||
lammps_version: 29 Aug 2024
|
||||
tags: slow, unstable
|
||||
date_generated: Fri Nov 15 13:22:57 2024
|
||||
epsilon: 2e-10
|
||||
skip_tests: kokkos_omp
|
||||
prerequisites: ! |
|
||||
pair reaxff
|
||||
fix qtpie/reaxff
|
||||
pre_commands: ! |
|
||||
echo screen
|
||||
variable newton_pair delete
|
||||
variable newton_pair index on
|
||||
atom_modify map array
|
||||
units real
|
||||
atom_style charge
|
||||
lattice diamond 3.77
|
||||
region box block 0 2 0 2 0 2
|
||||
create_box 3 box
|
||||
create_atoms 1 box
|
||||
displace_atoms all random 0.1 0.1 0.1 623426
|
||||
mass 1 1.0
|
||||
mass 2 12.0
|
||||
mass 3 16.0
|
||||
set type 1 type/fraction 2 0.5 998877
|
||||
set type 2 type/fraction 3 0.5 887766
|
||||
set type 1 charge 0.00
|
||||
set type 2 charge 0.01
|
||||
set type 3 charge -0.01
|
||||
velocity all create 100 4534624 loop geom
|
||||
post_commands: ! |
|
||||
fix qeq all qtpie/reaxff 1 0.0 8.0 1.0e-20 reaxff ${input_dir}/gauss_exp.txt
|
||||
input_file: in.empty
|
||||
pair_style: reaxff NULL checkqeq yes
|
||||
pair_coeff: ! |
|
||||
* * ffield.reax.mattsson H C O
|
||||
extract: ! ""
|
||||
natoms: 64
|
||||
init_vdwl: -3296.3503506624793
|
||||
init_coul: -268.63677950571287
|
||||
init_stress: ! |-
|
||||
-1.0115766891336298e+03 -1.2088131753999489e+03 -8.2791874767348656e+02 -2.3899453277851464e+02 1.9901049958702231e+02 -6.5090424115686358e+02
|
||||
init_forces: ! |2
|
||||
1 -8.6436073169042203e+01 -2.4400814471028966e+01 1.0905778351740135e+02
|
||||
2 -1.0912360851161381e+02 -1.7785390915789219e+02 -2.2174396944101937e+02
|
||||
3 -1.7205686042941795e+02 1.8323463801374010e+02 1.3330073949860362e+01
|
||||
4 3.5074883698050790e+01 -5.4658573523678996e+01 8.8946983653047340e+01
|
||||
5 1.8037666038924445e+02 1.5258130212658664e+01 -8.1473951707266664e+01
|
||||
6 1.3687016587487102e+02 -2.9993359047535205e+02 3.1610843762057812e+01
|
||||
7 -5.3040478511967407e+01 -1.2906564054460426e+02 -1.6364626011721845e+02
|
||||
8 -1.5098093043741406e+02 4.1651970160590970e+01 1.5340103366817354e+02
|
||||
9 1.7340129928959293e+01 8.8054766076132950e+01 2.4310262794648661e+01
|
||||
10 8.3732473664111822e+01 1.4163802420547773e+02 1.2086953212785974e+02
|
||||
11 -4.2433035390388874e+01 6.5812517236648006e+01 1.3461956725415703e+02
|
||||
12 -9.6266601388748128e+01 -2.5379001755851835e+01 7.7659919394842500e+00
|
||||
13 -6.5393078499150931e+01 -4.9454699468880946e+01 -3.8254305288102898e+01
|
||||
14 8.2607951316806449e+01 -6.8984439086417567e+01 -9.2468559306204710e+01
|
||||
15 -6.6187434150450684e+01 2.1289685674401704e+02 7.8580288164394176e+01
|
||||
16 1.8897543273751987e+02 5.3397684583320228e+01 6.3460608305143431e+01
|
||||
17 1.4554759813765031e+02 -3.9370375612854211e+01 -9.7056561289015221e+01
|
||||
18 -4.5104710861585204e+01 -1.8896520586433442e+02 1.1164278206176432e+02
|
||||
19 2.6896526778434691e+02 3.6948523216182610e+02 -3.3986956263391414e+02
|
||||
20 -7.5462858727084978e+01 -8.6024949892680127e+01 -4.6529428267542672e-01
|
||||
21 -7.3095936427312608e+01 -5.7463824581552551e+01 -1.1787940398446622e+02
|
||||
22 1.5517223233172072e+02 -1.2975611741340879e+02 8.0541352960578152e+01
|
||||
23 7.9113780255105098e+01 -1.3159747874504722e+01 -2.5876270623789040e+01
|
||||
24 -2.0721357932150298e+02 2.1426998940883044e+02 -1.2404916276617425e+02
|
||||
25 -1.1375172605965993e+02 1.9145650691697844e+02 -8.3221527665980318e+01
|
||||
26 2.8613004810395404e+02 -2.1814761019305757e+02 2.3221022419460809e+02
|
||||
27 -6.4957092731555079e+01 6.8730894090822545e+01 1.7879679090575814e+02
|
||||
28 -3.5591147454501368e+00 3.8919120211497962e+01 3.2899891202019738e+01
|
||||
29 -7.1006654872719238e+01 3.4395396834237154e+01 2.5490290273424105e+01
|
||||
30 -1.7028325267142560e+02 -1.9865767607180553e+02 -1.1525322636144483e+02
|
||||
31 -1.4030343203666592e+02 1.6505252880438636e+02 -1.2536824728321348e+02
|
||||
32 2.8083940532792852e+01 -5.9613080258602423e+01 -1.7589243121123940e+02
|
||||
33 -6.0786787938223988e+01 -6.2914083425882403e+01 6.1724187337270543e+01
|
||||
34 -2.2381506031982109e+01 1.0258481649700494e+02 -7.2581426601092289e+01
|
||||
35 2.6826897000164860e+02 -2.1830766483611634e+02 1.2929910897210587e+02
|
||||
36 1.0617788606545010e+02 1.8844480945948908e+02 -1.9952637621677195e+02
|
||||
37 -1.8500771626166176e+02 1.2691494490100189e+02 -6.1799194093629900e+01
|
||||
38 -2.9568079732966703e+02 1.0466330586524869e+02 1.5539102098367138e+02
|
||||
39 9.0313772894092821e+01 -5.7763893527493209e+01 2.4405485803219346e+01
|
||||
40 2.0368385039374967e+01 -1.0212243725288241e+02 5.8977256992383225e+01
|
||||
41 -5.4472403223120203e+01 1.3664060494004097e+01 -7.0498722233072925e+01
|
||||
42 -1.0110613172512772e+02 3.7733470557342038e+01 -7.1384152705391784e+01
|
||||
43 2.2496360806160274e+02 9.5374846176895645e+01 1.2314600313131321e+02
|
||||
44 8.9930414141415653e+01 -9.8548000406723986e+01 -8.6016793720029909e+01
|
||||
45 1.8042451487789609e+01 1.2291681595021672e+02 4.8750513798444771e+01
|
||||
46 1.4360528923605511e+01 -2.8393705665522205e+01 2.5000665776800748e+01
|
||||
47 3.3430180733495789e+01 -1.9134003719608592e+02 -6.9378872162649785e+01
|
||||
48 6.5977481507414737e+01 -2.0569144157798024e+02 -2.3305633430859448e+01
|
||||
49 -3.6805309882726834e+02 -2.5080697208449138e+01 1.0725330582435194e+02
|
||||
50 3.3568380074196661e+01 -7.2887959381521910e+01 8.4247363622347109e+01
|
||||
51 1.3937571489940009e+02 -1.0241922204671263e+02 1.5837793886668237e+02
|
||||
52 -1.1015736921987484e+02 1.2143381508599626e+02 -1.3301954780997897e+02
|
||||
53 -5.5053511032747757e+01 3.3318719859853354e+02 -5.4695756604566270e-02
|
||||
54 -9.3809048702850468e+00 6.3003589530582012e+01 1.8485428176102951e+02
|
||||
55 1.1268442794862931e+02 -1.7912573126673601e+02 7.6216834182693233e+01
|
||||
56 -4.5797371929680743e+01 -1.3685285921363297e+02 4.1670118112644616e+01
|
||||
57 9.5486141883804535e+01 7.3675172824019725e+01 -6.4017779318177091e+01
|
||||
58 -2.6940387352055815e+01 -9.1882719416077734e+00 -1.6496876672222488e+01
|
||||
59 -6.1110604213739784e+01 1.0339564891274583e+02 8.0387279300896552e+01
|
||||
60 -1.3438307290047304e+01 6.2821560489016619e+01 -1.4960910695536089e+02
|
||||
61 -3.7436807177941901e+01 -1.0060440409572418e+02 -7.2129567761936670e+01
|
||||
62 1.5913069360497735e+01 -7.4587444709681003e+00 2.7411930168532034e+01
|
||||
63 1.3132402121938716e+02 -1.2633666867998599e+02 -5.9237822651056007e+01
|
||||
64 1.0528416436964088e+02 1.1185676743727093e+02 7.6927706681792429e+01
|
||||
run_vdwl: -3296.3468820327244
|
||||
run_coul: -268.63661874354375
|
||||
run_stress: ! |-
|
||||
-1.0114879837664473e+03 -1.2087430287015966e+03 -8.2783958944769802e+02 -2.3908224870200783e+02 1.9895929948999779e+02 -6.5093393277361292e+02
|
||||
run_forces: ! |2
|
||||
1 -8.6437645087040067e+01 -2.4400562180957351e+01 1.0906066254553539e+02
|
||||
2 -1.0912275665241053e+02 -1.7786252590616218e+02 -2.2173930761917526e+02
|
||||
3 -1.7205763157578019e+02 1.8323288100722453e+02 1.3329429976402201e+01
|
||||
4 3.5076762638460409e+01 -5.4659870228622246e+01 8.8949923949362500e+01
|
||||
5 1.8037851727311079e+02 1.5258819157296621e+01 -8.1471824505046186e+01
|
||||
6 1.3693758232722558e+02 -2.9996076554788232e+02 3.1544103577304767e+01
|
||||
7 -5.3040940882157734e+01 -1.2906590024224255e+02 -1.6365072194268137e+02
|
||||
8 -1.5098199162393547e+02 4.1652246872814757e+01 1.5340185354669362e+02
|
||||
9 1.7338937131206805e+01 8.8052623671376480e+01 2.4311464733168261e+01
|
||||
10 8.3731216255426517e+01 1.4163544349001512e+02 1.2086773194932107e+02
|
||||
11 -4.2431645167783358e+01 6.5809284879610303e+01 1.3461058585127651e+02
|
||||
12 -9.6268502974108401e+01 -2.5380508031933715e+01 7.7613919613213387e+00
|
||||
13 -6.5394480799184038e+01 -4.9454690134569510e+01 -3.8251921533789378e+01
|
||||
14 8.2607648143581144e+01 -6.8981518310093449e+01 -9.2465919648906919e+01
|
||||
15 -6.6184911564685194e+01 2.1289827790699042e+02 7.8579764996083128e+01
|
||||
16 1.8897212100631526e+02 5.3401557991805042e+01 6.3454265397142500e+01
|
||||
17 1.4554879673647156e+02 -3.9369818695332363e+01 -9.7059433050641857e+01
|
||||
18 -4.5104364652465691e+01 -1.8896630466961875e+02 1.1164283921546559e+02
|
||||
19 2.6896544439509694e+02 3.6948380976016932e+02 -3.3986849873937234e+02
|
||||
20 -7.5474652635907873e+01 -8.6015213272245504e+01 -4.8259676480768809e-01
|
||||
21 -7.3095940937548960e+01 -5.7464788467137694e+01 -1.1787855066724634e+02
|
||||
22 1.5517351794732136e+02 -1.2975689546114967e+02 8.0540859481818742e+01
|
||||
23 7.9115865455975012e+01 -1.3150472802357561e+01 -2.5876503956346053e+01
|
||||
24 -2.0722276003223385e+02 2.1428270990874043e+02 -1.2405357611708547e+02
|
||||
25 -1.1375429959489580e+02 1.9146061264686494e+02 -8.3222256641294663e+01
|
||||
26 2.8613970510624404e+02 -2.1815485596507278e+02 2.3221441960858138e+02
|
||||
27 -6.4953545994003377e+01 6.8732504333245046e+01 1.7879777515705371e+02
|
||||
28 -3.5609706858523174e+00 3.8914845051174211e+01 3.2895014258375397e+01
|
||||
29 -7.1006962970615220e+01 3.4395946962585107e+01 2.5490302918559674e+01
|
||||
30 -1.7028397298399719e+02 -1.9865780309887722e+02 -1.1525330878428163e+02
|
||||
31 -1.4030595583104076e+02 1.6505149109610096e+02 -1.2536961295119134e+02
|
||||
32 2.8084746879715730e+01 -5.9606705649399501e+01 -1.7588207877218977e+02
|
||||
33 -6.0786242960574022e+01 -6.2913885176828828e+01 6.1724433850103161e+01
|
||||
34 -2.2381168039316268e+01 1.0258398798459802e+02 -7.2580420302975753e+01
|
||||
35 2.6830990081622787e+02 -2.1835204404249015e+02 1.2931018843147504e+02
|
||||
36 1.0617963217845744e+02 1.8843796909876622e+02 -1.9952176446060335e+02
|
||||
37 -1.8503402227685811e+02 1.2695504061699209e+02 -6.1823411355500355e+01
|
||||
38 -2.9568399770704622e+02 1.0466662636959578e+02 1.5539009610875451e+02
|
||||
39 9.0314570392701199e+01 -5.7764115394488343e+01 2.4405095735494033e+01
|
||||
40 2.0369156227530599e+01 -1.0212187254286960e+02 5.8977622919450276e+01
|
||||
41 -5.4470510869266015e+01 1.3662227244573693e+01 -7.0490380604491506e+01
|
||||
42 -1.0110530047858049e+02 3.7731202989968210e+01 -7.1386374496910719e+01
|
||||
43 2.2495960799582232e+02 9.5372714343303912e+01 1.2314241456430595e+02
|
||||
44 8.9934882887196963e+01 -9.8543527246862695e+01 -8.6022172212180365e+01
|
||||
45 1.8033520031139599e+01 1.2290938260195539e+02 4.8756688104804162e+01
|
||||
46 1.4361839506594013e+01 -2.8393917262125949e+01 2.5000422631182474e+01
|
||||
47 3.3429877782459641e+01 -1.9133540583883391e+02 -6.9377262749149708e+01
|
||||
48 6.5990004078562464e+01 -2.0569338794984392e+02 -2.3314637198125183e+01
|
||||
49 -3.6809322631363733e+02 -2.5025981981696823e+01 1.0734144239898833e+02
|
||||
50 3.3569219922950602e+01 -7.2886698417202680e+01 8.4245785013977056e+01
|
||||
51 1.3937840161131851e+02 -1.0242257034381630e+02 1.5838167570232804e+02
|
||||
52 -1.1015632519571759e+02 1.2143397586854937e+02 -1.3302347496060023e+02
|
||||
53 -5.5089426238213143e+01 3.3316281975316286e+02 -7.4271240172002706e-02
|
||||
54 -9.3687742955109137e+00 6.2990741970756417e+01 1.8487238090605700e+02
|
||||
55 1.1268678311310606e+02 -1.7912913164827566e+02 7.6217416717889748e+01
|
||||
56 -4.5806154616486943e+01 -1.3684453580988600e+02 4.1676759373489766e+01
|
||||
57 9.5485704227965911e+01 7.3672454441368231e+01 -6.4019152364471736e+01
|
||||
58 -2.6940596532815384e+01 -9.1863734979434319e+00 -1.6497051289566816e+01
|
||||
59 -6.1118963218972965e+01 1.0340128135495597e+02 8.0392569432165885e+01
|
||||
60 -1.3439582130914836e+01 6.2820376074347955e+01 -1.4960914576393716e+02
|
||||
61 -3.7435810911347573e+01 -1.0060262070691427e+02 -7.2129466739698870e+01
|
||||
62 1.5913491338811767e+01 -7.4593609075659995e+00 2.7412825126279046e+01
|
||||
63 1.3132146995609114e+02 -1.2633718643910591e+02 -5.9233334916534574e+01
|
||||
64 1.0528511106781713e+02 1.1185795842149707e+02 7.6928226208764087e+01
|
||||
...
|
||||
@ -0,0 +1,77 @@
|
||||
---
|
||||
lammps_version: 17 Feb 2022
|
||||
date_generated: Fri Mar 18 22:18:01 2022
|
||||
epsilon: 5e-14
|
||||
skip_tests: kokkos_omp
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
fix spring/self
|
||||
pre_commands: ! |
|
||||
variable kvar atom 10.0
|
||||
post_commands: ! |
|
||||
fix move all nve
|
||||
fix test solute spring/self v_kvar xyz
|
||||
input_file: in.fourmol
|
||||
natoms: 29
|
||||
global_scalar: 0.12623705370750438
|
||||
run_pos: ! |2
|
||||
1 -2.7045669792379945e-01 2.4912140072031601e+00 -1.6695897908630153e-01
|
||||
2 3.1003572362014503e-01 2.9612290242130319e+00 -8.5466689099875615e-01
|
||||
3 -7.0398410505917419e-01 1.2305522448803927e+00 -6.2777452858703953e-01
|
||||
4 -1.5818137373512378e+00 1.4837442978868092e+00 -1.2538665277734968e+00
|
||||
5 -9.0719266809604937e-01 9.2652365891304722e-01 3.9954299416556610e-01
|
||||
6 2.4832271436421161e-01 2.8312320769893828e-01 -1.2314303818391423e+00
|
||||
7 3.4143518373063453e-01 -2.2645187306940717e-02 -2.5292229406165907e+00
|
||||
8 1.1743540824610306e+00 -4.8863162985819381e-01 -6.3783828665914544e-01
|
||||
9 1.3800508883119953e+00 -2.5274565574966718e-01 2.8353436538531862e-01
|
||||
10 2.0510726036138696e+00 -1.4604027090169940e+00 -9.8323554549077119e-01
|
||||
11 1.7878052123899795e+00 -1.9921835931655048e+00 -1.8890566136917575e+00
|
||||
12 3.0063000763288268e+00 -4.9013323763786637e-01 -1.6231890083142151e+00
|
||||
13 4.0515352007695906e+00 -8.9202569828585798e-01 -1.6399995011867139e+00
|
||||
14 2.6066952690925067e+00 -4.1788633645045253e-01 -2.6633949696742012e+00
|
||||
15 2.9695337662435719e+00 5.5423141568538492e-01 -1.2342076641871542e+00
|
||||
16 2.6747001492056977e+00 -2.4124097322472577e+00 -2.3429048072365732e-02
|
||||
17 2.2153591049025310e+00 -2.0897997214660862e+00 1.1963106355359285e+00
|
||||
18 2.1369701704115056e+00 3.0158507413628213e+00 -3.5179348337213843e+00
|
||||
19 1.5355837136087338e+00 2.6255292355375399e+00 -4.2353987779878857e+00
|
||||
20 2.7727573005678758e+00 3.6923910449610102e+00 -3.9330842459133470e+00
|
||||
21 4.9040128073205524e+00 -4.0752348172959030e+00 -3.6210314709893159e+00
|
||||
22 4.3582355554440877e+00 -4.2126119427287101e+00 -4.4612844196314150e+00
|
||||
23 5.7439382849307670e+00 -3.5821957939275060e+00 -3.8766361295935892e+00
|
||||
24 2.0689243582422914e+00 3.1513346907271247e+00 3.1550389754829422e+00
|
||||
25 1.3045351331492516e+00 3.2665125705842941e+00 2.5111855257434352e+00
|
||||
26 2.5809237402711318e+00 4.0117602605482858e+00 3.2212060529089945e+00
|
||||
27 -1.9611343130357277e+00 -4.3563411931359841e+00 2.1098293115523528e+00
|
||||
28 -2.7473562684513411e+00 -4.0200819932379330e+00 1.5830052163433952e+00
|
||||
29 -1.3126000191359812e+00 -3.5962518039482934e+00 2.2746342468737817e+00
|
||||
run_vel: ! |2
|
||||
1 8.1685220941861477e-03 1.6512578512542727e-02 4.7892799147935001e-03
|
||||
2 5.4427456394786321e-03 5.1693257879352533e-03 -1.4414043022813649e-03
|
||||
3 -8.2272458036248362e-03 -1.2923813188884230e-02 -4.0970749471144546e-03
|
||||
4 -3.7660861920462349e-03 -6.5659911420830365e-03 -1.1120922532834726e-03
|
||||
5 -1.1012635909013241e-02 -9.8847866026321157e-03 -2.8391869073674538e-03
|
||||
6 -3.9665990411620729e-02 4.6803722380071487e-02 3.7135522426802389e-02
|
||||
7 9.1016763589152859e-04 -1.0126055720737583e-02 -5.1556610019025714e-02
|
||||
8 7.9043585267658430e-03 -3.3496064544244345e-03 3.4549326598010660e-02
|
||||
9 1.5620907286754389e-03 3.7378245105921431e-03 1.5036774253075934e-02
|
||||
10 2.9193799040059056e-02 -2.9242248165535563e-02 -1.5014281912567770e-02
|
||||
11 -4.7797459644718264e-03 -3.7436196398511232e-03 -2.3410499103477603e-03
|
||||
12 2.2686069875175316e-03 -3.4732729502899497e-04 -3.0627334265471650e-03
|
||||
13 2.7456854188010020e-03 5.8081889921879817e-03 -7.9308949311655092e-04
|
||||
14 3.5223319737918667e-03 -5.7842699330258648e-03 -3.9396805101296825e-03
|
||||
15 -1.8475459117759364e-03 -5.8469790281561471e-03 6.2849983323582511e-03
|
||||
16 1.8676069228413028e-02 -1.3258381729410438e-02 -4.5625616778429308e-02
|
||||
17 -1.2893668780819389e-02 9.7505325833410258e-03 3.7288200735675299e-02
|
||||
18 -8.0065794869105819e-04 -8.6270473288011819e-04 -1.4483040693746142e-03
|
||||
19 1.2452390836051499e-03 -2.5061097119616180e-03 7.2998631010316650e-03
|
||||
20 3.5930060229538143e-03 3.6938860309035470e-03 3.2322732687958995e-03
|
||||
21 -1.4689220366910704e-03 -2.7352129796142532e-04 7.0581624168175334e-04
|
||||
22 -7.0694199254520765e-03 -4.2577148925037030e-03 2.8079117611209205e-04
|
||||
23 6.0446963117617505e-03 -1.4000131614895336e-03 2.5819754846773601e-03
|
||||
24 3.1926367911308686e-04 -9.9445664741642462e-04 1.4999996978363057e-04
|
||||
25 1.3789754526895179e-04 -4.4335894884219599e-03 -8.1808136698604454e-04
|
||||
26 2.0485904035342870e-03 2.7813358633902757e-03 4.3245727149365584e-03
|
||||
27 4.5604120291626942e-04 -1.0305523027244966e-03 2.1188058375789067e-04
|
||||
28 -6.2544520861839200e-03 1.4127711176141612e-03 -1.8429821884806304e-03
|
||||
29 6.4110631535703737e-04 3.1273432719578029e-03 3.7253671105604122e-03
|
||||
...
|
||||
@ -0,0 +1,77 @@
|
||||
---
|
||||
lammps_version: 17 Feb 2022
|
||||
date_generated: Fri Mar 18 22:18:01 2022
|
||||
epsilon: 5e-14
|
||||
skip_tests: kokkos_omp
|
||||
prerequisites: ! |
|
||||
atom full
|
||||
fix spring/self
|
||||
pre_commands: ! |
|
||||
variable kvar equal 10.0
|
||||
post_commands: ! |
|
||||
fix move all nve
|
||||
fix test solute spring/self v_kvar xyz
|
||||
input_file: in.fourmol
|
||||
natoms: 29
|
||||
global_scalar: 0.12623705370750438
|
||||
run_pos: ! |2
|
||||
1 -2.7045669792379945e-01 2.4912140072031601e+00 -1.6695897908630153e-01
|
||||
2 3.1003572362014503e-01 2.9612290242130319e+00 -8.5466689099875615e-01
|
||||
3 -7.0398410505917419e-01 1.2305522448803927e+00 -6.2777452858703953e-01
|
||||
4 -1.5818137373512378e+00 1.4837442978868092e+00 -1.2538665277734968e+00
|
||||
5 -9.0719266809604937e-01 9.2652365891304722e-01 3.9954299416556610e-01
|
||||
6 2.4832271436421161e-01 2.8312320769893828e-01 -1.2314303818391423e+00
|
||||
7 3.4143518373063453e-01 -2.2645187306940717e-02 -2.5292229406165907e+00
|
||||
8 1.1743540824610306e+00 -4.8863162985819381e-01 -6.3783828665914544e-01
|
||||
9 1.3800508883119953e+00 -2.5274565574966718e-01 2.8353436538531862e-01
|
||||
10 2.0510726036138696e+00 -1.4604027090169940e+00 -9.8323554549077119e-01
|
||||
11 1.7878052123899795e+00 -1.9921835931655048e+00 -1.8890566136917575e+00
|
||||
12 3.0063000763288268e+00 -4.9013323763786637e-01 -1.6231890083142151e+00
|
||||
13 4.0515352007695906e+00 -8.9202569828585798e-01 -1.6399995011867139e+00
|
||||
14 2.6066952690925067e+00 -4.1788633645045253e-01 -2.6633949696742012e+00
|
||||
15 2.9695337662435719e+00 5.5423141568538492e-01 -1.2342076641871542e+00
|
||||
16 2.6747001492056977e+00 -2.4124097322472577e+00 -2.3429048072365732e-02
|
||||
17 2.2153591049025310e+00 -2.0897997214660862e+00 1.1963106355359285e+00
|
||||
18 2.1369701704115056e+00 3.0158507413628213e+00 -3.5179348337213843e+00
|
||||
19 1.5355837136087338e+00 2.6255292355375399e+00 -4.2353987779878857e+00
|
||||
20 2.7727573005678758e+00 3.6923910449610102e+00 -3.9330842459133470e+00
|
||||
21 4.9040128073205524e+00 -4.0752348172959030e+00 -3.6210314709893159e+00
|
||||
22 4.3582355554440877e+00 -4.2126119427287101e+00 -4.4612844196314150e+00
|
||||
23 5.7439382849307670e+00 -3.5821957939275060e+00 -3.8766361295935892e+00
|
||||
24 2.0689243582422914e+00 3.1513346907271247e+00 3.1550389754829422e+00
|
||||
25 1.3045351331492516e+00 3.2665125705842941e+00 2.5111855257434352e+00
|
||||
26 2.5809237402711318e+00 4.0117602605482858e+00 3.2212060529089945e+00
|
||||
27 -1.9611343130357277e+00 -4.3563411931359841e+00 2.1098293115523528e+00
|
||||
28 -2.7473562684513411e+00 -4.0200819932379330e+00 1.5830052163433952e+00
|
||||
29 -1.3126000191359812e+00 -3.5962518039482934e+00 2.2746342468737817e+00
|
||||
run_vel: ! |2
|
||||
1 8.1685220941861477e-03 1.6512578512542727e-02 4.7892799147935001e-03
|
||||
2 5.4427456394786321e-03 5.1693257879352533e-03 -1.4414043022813649e-03
|
||||
3 -8.2272458036248362e-03 -1.2923813188884230e-02 -4.0970749471144546e-03
|
||||
4 -3.7660861920462349e-03 -6.5659911420830365e-03 -1.1120922532834726e-03
|
||||
5 -1.1012635909013241e-02 -9.8847866026321157e-03 -2.8391869073674538e-03
|
||||
6 -3.9665990411620729e-02 4.6803722380071487e-02 3.7135522426802389e-02
|
||||
7 9.1016763589152859e-04 -1.0126055720737583e-02 -5.1556610019025714e-02
|
||||
8 7.9043585267658430e-03 -3.3496064544244345e-03 3.4549326598010660e-02
|
||||
9 1.5620907286754389e-03 3.7378245105921431e-03 1.5036774253075934e-02
|
||||
10 2.9193799040059056e-02 -2.9242248165535563e-02 -1.5014281912567770e-02
|
||||
11 -4.7797459644718264e-03 -3.7436196398511232e-03 -2.3410499103477603e-03
|
||||
12 2.2686069875175316e-03 -3.4732729502899497e-04 -3.0627334265471650e-03
|
||||
13 2.7456854188010020e-03 5.8081889921879817e-03 -7.9308949311655092e-04
|
||||
14 3.5223319737918667e-03 -5.7842699330258648e-03 -3.9396805101296825e-03
|
||||
15 -1.8475459117759364e-03 -5.8469790281561471e-03 6.2849983323582511e-03
|
||||
16 1.8676069228413028e-02 -1.3258381729410438e-02 -4.5625616778429308e-02
|
||||
17 -1.2893668780819389e-02 9.7505325833410258e-03 3.7288200735675299e-02
|
||||
18 -8.0065794869105819e-04 -8.6270473288011819e-04 -1.4483040693746142e-03
|
||||
19 1.2452390836051499e-03 -2.5061097119616180e-03 7.2998631010316650e-03
|
||||
20 3.5930060229538143e-03 3.6938860309035470e-03 3.2322732687958995e-03
|
||||
21 -1.4689220366910704e-03 -2.7352129796142532e-04 7.0581624168175334e-04
|
||||
22 -7.0694199254520765e-03 -4.2577148925037030e-03 2.8079117611209205e-04
|
||||
23 6.0446963117617505e-03 -1.4000131614895336e-03 2.5819754846773601e-03
|
||||
24 3.1926367911308686e-04 -9.9445664741642462e-04 1.4999996978363057e-04
|
||||
25 1.3789754526895179e-04 -4.4335894884219599e-03 -8.1808136698604454e-04
|
||||
26 2.0485904035342870e-03 2.7813358633902757e-03 4.3245727149365584e-03
|
||||
27 4.5604120291626942e-04 -1.0305523027244966e-03 2.1188058375789067e-04
|
||||
28 -6.2544520861839200e-03 1.4127711176141612e-03 -1.8429821884806304e-03
|
||||
29 6.4110631535703737e-04 3.1273432719578029e-03 3.7253671105604122e-03
|
||||
...
|
||||
6
unittest/force-styles/tests/gauss_exp.txt
Normal file
6
unittest/force-styles/tests/gauss_exp.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Gaussian orbital exponents (required for fix qtpie/reaxff) taken from Table 2.2
|
||||
# of Chen, J. (2009). Theory and applications of fluctuating-charge models.
|
||||
# The units of the exponents are 1 / (Bohr radius)^2 .
|
||||
1 0.5434 # H
|
||||
2 0.2069 # C
|
||||
3 0.2240 # O
|
||||
Reference in New Issue
Block a user