From 17f39d9d2cf8e5d85ba3a9e3fe9901d0b1bae501 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 13 Mar 2023 22:28:32 -0400 Subject: [PATCH] rename fix STORE/PERATOM to STORE/ATOM --- doc/src/Developer_notes.rst | 25 ++++++++++++ doc/src/Developer_updating.rst | 29 ++++++++++++++ src/AMOEBA/amoeba_induce.cpp | 2 +- src/AMOEBA/amoeba_utils.cpp | 2 +- src/AMOEBA/pair_amoeba.cpp | 26 ++++++------- src/AMOEBA/pair_amoeba.h | 6 +-- src/CORESHELL/compute_temp_cs.cpp | 6 +-- src/CORESHELL/compute_temp_cs.h | 2 +- src/EXTRA-COMPUTE/compute_hma.cpp | 8 ++-- src/EXTRA-COMPUTE/compute_hma.h | 2 +- src/EXTRA-COMPUTE/compute_msd_nongauss.cpp | 2 +- src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp | 10 ++--- src/EXTRA-MOLECULE/bond_harmonic_restrain.h | 2 +- src/FEP/fix_adapt_fep.cpp | 14 +++---- src/FEP/fix_adapt_fep.h | 2 +- src/GPU/pair_amoeba_gpu.cpp | 2 +- src/GPU/pair_hippo_gpu.cpp | 2 +- src/REPLICA/tad.cpp | 6 +-- src/REPLICA/tad.h | 18 ++++----- src/VTK/dump_vtk.cpp | 10 ++--- src/balance.cpp | 6 +-- src/balance.h | 10 ++--- src/compute_chunk_atom.cpp | 6 +-- src/compute_chunk_atom.h | 2 +- src/compute_displace_atom.cpp | 8 ++-- src/compute_displace_atom.h | 2 +- src/compute_msd.cpp | 8 ++-- src/compute_msd.h | 2 +- src/compute_vacf.cpp | 8 ++-- src/compute_vacf.h | 2 +- src/dump_custom.cpp | 10 ++--- src/dump_custom.h | 26 ++++++------- src/fix_adapt.cpp | 14 +++---- src/fix_adapt.h | 2 +- src/fix_balance.cpp | 2 +- ...x_store_peratom.cpp => fix_store_atom.cpp} | 38 +++++++++---------- src/{fix_store_peratom.h => fix_store_atom.h} | 12 +++--- src/fix_store_global.cpp | 2 +- src/variable.cpp | 6 +-- src/variable.h | 2 +- 40 files changed, 199 insertions(+), 145 deletions(-) rename src/{fix_store_peratom.cpp => fix_store_atom.cpp} (88%) rename src/{fix_store_peratom.h => fix_store_atom.h} (89%) diff --git a/doc/src/Developer_notes.rst b/doc/src/Developer_notes.rst index 92121cca15..07b289b583 100644 --- a/doc/src/Developer_notes.rst +++ b/doc/src/Developer_notes.rst @@ -11,6 +11,7 @@ Available topics are: - `Reading and parsing of text and text files`_ - `Requesting and accessing neighbor lists`_ +- `Choosing between a custom atom style, fix property/atom, and fix STORE/ATOM`_ - `Fix contributions to instantaneous energy, virial, and cumulative energy`_ - `KSpace PPPM FFT grids`_ @@ -216,6 +217,30 @@ command: neighbor->add_request(this, "delete_atoms", NeighConst::REQ_FULL); +Choosing between a custom atom style, fix property/atom, and fix STORE/ATOM +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +There are multiple ways to manage per-atom data within LAMMPS. Often +the per-atom storage is only used locally and managed by the class that +uses it. If the data has to persist between multiple time steps and +migrate with atoms when they move from sub-domain to sub-domain or +across periodic boundaries, then using a custom atom style, or :doc:`fix +property/atom `, or the internal fix STORE/ATOM are +possible options. + +- Using the atom style is usually the most programming effort and mostly + needed when the per-atom data is an integral part of the model like a + per-atom charge or diameter and thus should be part of the Atoms + section of a :doc:`data file `. + +- Fix property/atom is useful if the data is optional or should be + entered by the user, or accessed as a (named) custom property. In this + case the fix should be entered as part of the input (and not + internally) which allows to enter and store its content with data files. + +- Fix STORE/ATOM should be used when the data should be accessed internally + only and thus the fix can be created internally. + Fix contributions to instantaneous energy, virial, and cumulative energy ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/src/Developer_updating.rst b/doc/src/Developer_updating.rst index 6089969c38..28b3712ae0 100644 --- a/doc/src/Developer_updating.rst +++ b/doc/src/Developer_updating.rst @@ -24,6 +24,7 @@ Available topics in mostly chronological order are: - `Use of "override" instead of "virtual"`_ - `Simplified and more compact neighbor list requests`_ - `Split of fix STORE into fix STORE/GLOBAL and fix STORE/PERATOM`_ +- `Rename of fix STORE/PERATOM to fix STORE/ATOM and change of arguments`_ - `Use Output::get_dump_by_id() instead of Output::find_dump()`_ - `Refactored grid communication using Grid3d/Grid2d classes instead of GridComm`_ @@ -385,6 +386,34 @@ New: This change is **required** or else the code will not compile. +Rename of fix STORE/PERATOM to fix STORE/ATOM and change of arguments +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. versionchanged:: TBD + +The available functionality of the internal fix to store per-atom +properties was expanded to enable storing data with ghost atoms and to +support binary restart files. With those changes, the fix was renamed +to fix STORE/ATOM and the number and order of (required) arguments has +changed. + +Old syntax: ``ID group-ID STORE/PERATOM rflag n1 n2 [n3]`` + +- *rflag* = 0/1, *no*/*yes* store per-atom values in restart file +- :math:`n1 = 1, n2 = 1, \mathrm{no}\;n3 \to` per-atom vector, single value per atom +- :math:`n1 = 1, n2 > 1, \mathrm{no}\;n3 \to` per-atom array, *n2* values per atom +- :math:`n1 = 1, n2 > 0, n3 > 0 \to` per-atom tensor, *n2* x *n3* values per atom + +New syntax: ``ID group-ID STORE/ATOM n1 n2 gflag rflag`` + +- :math:`n1 = 1, n2 = 0 \to` per-atom vector, single value per atom +- :math:`n1 > 1, n2 = 0 \to` per-atom array, *n1* values per atom +- :math:`n1 > 0, n2 > 0 \to` per-atom tensor, *n1* x *n2* values per atom +- *gflag* = 0/1, *no*/*yes* communicate per-atom values with ghost atoms +- *rflag* = 0/1, *no*/*yes* store per-atom values in restart file + +Since this is an internal fix, there is no user visible change. + Use Output::get_dump_by_id() instead of Output::find_dump() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/AMOEBA/amoeba_induce.cpp b/src/AMOEBA/amoeba_induce.cpp index ecc20a198c..6017b775ca 100644 --- a/src/AMOEBA/amoeba_induce.cpp +++ b/src/AMOEBA/amoeba_induce.cpp @@ -19,7 +19,7 @@ #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "math_const.h" #include "math_special.h" #include "my_page.h" diff --git a/src/AMOEBA/amoeba_utils.cpp b/src/AMOEBA/amoeba_utils.cpp index 5a4057930c..8fb839b693 100644 --- a/src/AMOEBA/amoeba_utils.cpp +++ b/src/AMOEBA/amoeba_utils.cpp @@ -17,7 +17,7 @@ #include "atom.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "neigh_list.h" #include diff --git a/src/AMOEBA/pair_amoeba.cpp b/src/AMOEBA/pair_amoeba.cpp index 319bbd8925..72efa76523 100644 --- a/src/AMOEBA/pair_amoeba.cpp +++ b/src/AMOEBA/pair_amoeba.cpp @@ -20,7 +20,7 @@ #include "domain.h" #include "error.h" #include "fix.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "group.h" #include "math_special.h" @@ -861,8 +861,8 @@ void PairAmoeba::init_style() Fix *myfix; if (first_flag) { id_pole = utils::strdup("AMOEBA_pole"); - myfix = modify->add_fix(fmt::format("{} {} STORE/PERATOM 13 0 0 1",id_pole,group->names[0])); - fixpole = dynamic_cast(myfix); + myfix = modify->add_fix(fmt::format("{} {} STORE/ATOM 13 0 0 1",id_pole,group->names[0])); + fixpole = dynamic_cast(myfix); } // creation of per-atom storage @@ -873,14 +873,14 @@ void PairAmoeba::init_style() if (first_flag && use_pred) { id_udalt = utils::strdup("AMOEBA_udalt"); - myfix = modify->add_fix(fmt::format("{} {} STORE/PERATOM {} 3 0 1", + myfix = modify->add_fix(fmt::format("{} {} STORE/ATOM {} 3 0 1", id_udalt, group->names[0], maxualt)); - fixudalt = dynamic_cast(myfix); + fixudalt = dynamic_cast(myfix); id_upalt = utils::strdup("AMOEBA_upalt"); - myfix = modify->add_fix(fmt::format("{} {} STORE/PERATOM {} 3 0 1", + myfix = modify->add_fix(fmt::format("{} {} STORE/ATOM {} 3 0 1", id_upalt, group->names[0], maxualt)); - fixupalt = dynamic_cast(myfix); + fixupalt = dynamic_cast(myfix); } // create pages for storing pairwise data: @@ -995,21 +995,21 @@ void PairAmoeba::init_style() if (id_pole) { myfix = modify->get_fix_by_id(id_pole); if (!myfix) - error->all(FLERR,"Could not find internal pair amoeba fix STORE/PERATOM id {}", id_pole); - fixpole = dynamic_cast(myfix); + error->all(FLERR,"Could not find internal pair amoeba fix STORE/ATOM id {}", id_pole); + fixpole = dynamic_cast(myfix); } if (id_udalt) { myfix = modify->get_fix_by_id(id_udalt); if (!myfix) - error->all(FLERR,"Could not find internal pair amoeba fix STORE/PERATOM id {}", id_udalt); - fixudalt = dynamic_cast(myfix); + error->all(FLERR,"Could not find internal pair amoeba fix STORE/ATOM id {}", id_udalt); + fixudalt = dynamic_cast(myfix); myfix = modify->get_fix_by_id(id_upalt); if (!myfix) - error->all(FLERR,"Could not find internal pair amoeba fix STORE/PERATOM id {}", id_upalt); - fixupalt = dynamic_cast(myfix); + error->all(FLERR,"Could not find internal pair amoeba fix STORE/ATOM id {}", id_upalt); + fixupalt = dynamic_cast(myfix); } // assign hydrogen neighbors (redID) to each owned atom diff --git a/src/AMOEBA/pair_amoeba.h b/src/AMOEBA/pair_amoeba.h index cdeee6c95f..1f3a4b799a 100644 --- a/src/AMOEBA/pair_amoeba.h +++ b/src/AMOEBA/pair_amoeba.h @@ -166,9 +166,9 @@ class PairAmoeba : public Pair { int *amgroup; // AMOEBA polarization group, 1 to Ngroup char *id_pole, *id_udalt, *id_upalt; - class FixStorePeratom *fixpole; // stores pole = multipole components - class FixStorePeratom *fixudalt; // stores udalt = induced dipole history - class FixStorePeratom *fixupalt; // stores upalt = induced dipole history + class FixStoreAtom *fixpole; // stores pole = multipole components + class FixStoreAtom *fixudalt; // stores udalt = induced dipole history + class FixStoreAtom *fixupalt; // stores upalt = induced dipole history // static per-type properties defined in force-field file diff --git a/src/CORESHELL/compute_temp_cs.cpp b/src/CORESHELL/compute_temp_cs.cpp index b0ec39e542..b66db30bc5 100644 --- a/src/CORESHELL/compute_temp_cs.cpp +++ b/src/CORESHELL/compute_temp_cs.cpp @@ -24,7 +24,7 @@ #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "group.h" #include "memory.h" @@ -67,8 +67,8 @@ ComputeTempCS::ComputeTempCS(LAMMPS *lmp, int narg, char **arg) : // id = compute-ID + COMPUTE_STORE, fix group = compute group id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); - fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 0", id_fix, group->names[igroup]))); + fix = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 0", id_fix, group->names[igroup]))); // set fix store values = 0 for now // fill them in via setup() once Comm::borders() has been called diff --git a/src/CORESHELL/compute_temp_cs.h b/src/CORESHELL/compute_temp_cs.h index 3fdf0f3711..1e7c537a83 100644 --- a/src/CORESHELL/compute_temp_cs.h +++ b/src/CORESHELL/compute_temp_cs.h @@ -54,7 +54,7 @@ class ComputeTempCS : public Compute { double **vint; char *id_fix; - class FixStorePeratom *fix; + class FixStoreAtom *fix; void dof_compute(); void vcm_pairs(); diff --git a/src/EXTRA-COMPUTE/compute_hma.cpp b/src/EXTRA-COMPUTE/compute_hma.cpp index 806228faef..4b949f6592 100644 --- a/src/EXTRA-COMPUTE/compute_hma.cpp +++ b/src/EXTRA-COMPUTE/compute_hma.cpp @@ -54,7 +54,7 @@ https://doi.org/10.1103/PhysRevE.92.043303 #include "domain.h" #include "error.h" #include "fix.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "group.h" #include "improper.h" @@ -90,8 +90,8 @@ ComputeHMA::ComputeHMA(LAMMPS *lmp, int narg, char **arg) : // our new fix's group = same as compute group id_fix = utils::strdup(std::string(id)+"_COMPUTE_STORE"); - fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 3 0 0 1", id_fix, group->names[igroup]))); + fix = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 3 0 0 1", id_fix, group->names[igroup]))); // calculate xu,yu,zu for fix store array // skip if reset from restart file @@ -196,7 +196,7 @@ void ComputeHMA::setup() // set fix which stores original atom coords - fix = dynamic_cast(modify->get_fix_by_id(id_fix)); + fix = dynamic_cast(modify->get_fix_by_id(id_fix)); if (!fix) error->all(FLERR,"Could not find hma per-atom store fix ID {}", id_fix); } diff --git a/src/EXTRA-COMPUTE/compute_hma.h b/src/EXTRA-COMPUTE/compute_hma.h index d8b8e55b96..8b5ea1a8dc 100644 --- a/src/EXTRA-COMPUTE/compute_hma.h +++ b/src/EXTRA-COMPUTE/compute_hma.h @@ -43,7 +43,7 @@ class ComputeHMA : public Compute { char *id_fix; char *id_temp; double finaltemp; - class FixStorePeratom *fix; + class FixStoreAtom *fix; double boltz, nktv2p, inv_volume; double deltaPcap; double virial_compute(int); diff --git a/src/EXTRA-COMPUTE/compute_msd_nongauss.cpp b/src/EXTRA-COMPUTE/compute_msd_nongauss.cpp index f75ab69a01..42af0f0b6e 100644 --- a/src/EXTRA-COMPUTE/compute_msd_nongauss.cpp +++ b/src/EXTRA-COMPUTE/compute_msd_nongauss.cpp @@ -19,7 +19,7 @@ #include "atom.h" #include "domain.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "group.h" #include "update.h" diff --git a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp index 7f3a7519b6..87b6e5a80e 100644 --- a/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp +++ b/src/EXTRA-MOLECULE/bond_harmonic_restrain.cpp @@ -17,7 +17,7 @@ #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "memory.h" #include "modify.h" @@ -162,8 +162,8 @@ void BondHarmonicRestrain::init_style() if (natoms < 0) { // create internal fix to store initial positions - initial = dynamic_cast( - modify->add_fix("BOND_RESTRAIN_X0 all STORE/PERATOM 3 0 1 1")); + initial = dynamic_cast( + modify->add_fix("BOND_RESTRAIN_X0 all STORE/ATOM 3 0 1 1")); if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); natoms = atom->natoms; @@ -178,8 +178,8 @@ void BondHarmonicRestrain::init_style() // we add the fix, but do not initialize it. It will pull the data from the restart. if (!initial) { - initial = dynamic_cast( - modify->add_fix("BOND_RESTRAIN_X0 all STORE/PERATOM 3 0 1 1")); + initial = dynamic_cast( + modify->add_fix("BOND_RESTRAIN_X0 all STORE/ATOM 3 0 1 1")); if (!initial) error->all(FLERR, "Failure to create internal per-atom storage"); } } diff --git a/src/EXTRA-MOLECULE/bond_harmonic_restrain.h b/src/EXTRA-MOLECULE/bond_harmonic_restrain.h index 61d01ab9b2..66ee1300c1 100644 --- a/src/EXTRA-MOLECULE/bond_harmonic_restrain.h +++ b/src/EXTRA-MOLECULE/bond_harmonic_restrain.h @@ -41,7 +41,7 @@ class BondHarmonicRestrain : public Bond { protected: double *k; bigint natoms; - class FixStorePeratom *initial; + class FixStoreAtom *initial; virtual void allocate(); }; diff --git a/src/FEP/fix_adapt_fep.cpp b/src/FEP/fix_adapt_fep.cpp index 3f3d26c4d9..6e38c90ef2 100644 --- a/src/FEP/fix_adapt_fep.cpp +++ b/src/FEP/fix_adapt_fep.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "group.h" #include "input.h" @@ -211,8 +211,8 @@ void FixAdaptFEP::post_constructor() if (diamflag) { id_fix_diam = utils::strdup(id + std::string("_FIX_STORE_DIAM")); - fix_diam = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1", id_fix_diam,group->names[igroup]))); + fix_diam = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 1", id_fix_diam,group->names[igroup]))); if (fix_diam->restart_reset) fix_diam->restart_reset = 0; else { double *vec = fix_diam->vstore; @@ -229,8 +229,8 @@ void FixAdaptFEP::post_constructor() if (chgflag) { id_fix_chg = utils::strdup(id + std::string("_FIX_STORE_CHG")); - fix_chg = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1",id_fix_chg,group->names[igroup]))); + fix_chg = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 1",id_fix_chg,group->names[igroup]))); if (fix_chg->restart_reset) fix_chg->restart_reset = 0; else { double *vec = fix_chg->vstore; @@ -333,11 +333,11 @@ void FixAdaptFEP::init() // fixes that store initial per-atom values if (id_fix_diam) { - fix_diam = dynamic_cast(modify->get_fix_by_id(id_fix_diam)); + fix_diam = dynamic_cast(modify->get_fix_by_id(id_fix_diam)); if (!fix_diam) error->all(FLERR,"Could not find fix adapt/fep storage fix ID {}", id_fix_diam); } if (id_fix_chg) { - fix_chg = dynamic_cast(modify->get_fix_by_id(id_fix_chg)); + fix_chg = dynamic_cast(modify->get_fix_by_id(id_fix_chg)); if (!fix_chg) error->all(FLERR,"Could not find fix adapt/fep storage fix ID {}", id_fix_chg); } diff --git a/src/FEP/fix_adapt_fep.h b/src/FEP/fix_adapt_fep.h index a93349a780..370a34a0f3 100644 --- a/src/FEP/fix_adapt_fep.h +++ b/src/FEP/fix_adapt_fep.h @@ -46,7 +46,7 @@ class FixAdaptFEP : public Fix { int anypair; int nlevels_respa; char *id_fix_diam, *id_fix_chg; - class FixStorePeratom *fix_diam, *fix_chg; + class FixStoreAtom *fix_diam, *fix_chg; struct Adapt { int which, ivar; diff --git a/src/GPU/pair_amoeba_gpu.cpp b/src/GPU/pair_amoeba_gpu.cpp index fd423486fd..c513d32081 100644 --- a/src/GPU/pair_amoeba_gpu.cpp +++ b/src/GPU/pair_amoeba_gpu.cpp @@ -23,7 +23,7 @@ #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "gpu_extra.h" #include "info.h" diff --git a/src/GPU/pair_hippo_gpu.cpp b/src/GPU/pair_hippo_gpu.cpp index 9d286d5db7..aa10ad6c5f 100644 --- a/src/GPU/pair_hippo_gpu.cpp +++ b/src/GPU/pair_hippo_gpu.cpp @@ -23,7 +23,7 @@ #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "gpu_extra.h" #include "info.h" diff --git a/src/REPLICA/tad.cpp b/src/REPLICA/tad.cpp index e98cd39233..b9b04a63d5 100644 --- a/src/REPLICA/tad.cpp +++ b/src/REPLICA/tad.cpp @@ -24,7 +24,7 @@ #include "error.h" #include "finish.h" #include "fix_event_tad.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "integrate.h" #include "memory.h" @@ -133,9 +133,9 @@ void TAD::command(int narg, char **arg) fix_event = dynamic_cast(modify->add_fix("tad_event all EVENT/TAD")); - // create FixStorePeratom object to store revert state + // create FixStoreAtom object to store revert state - fix_revert = dynamic_cast(modify->add_fix("tad_revert all STORE/PERATOM 7 0 0 0")); + fix_revert = dynamic_cast(modify->add_fix("tad_revert all STORE/ATOM 7 0 0 0")); // create Finish for timing output diff --git a/src/REPLICA/tad.h b/src/REPLICA/tad.h index 8f51ca8c91..88379794cc 100644 --- a/src/REPLICA/tad.h +++ b/src/REPLICA/tad.h @@ -48,15 +48,15 @@ class TAD : public Command { double time_dynamics, time_quench, time_neb, time_comm, time_output; double time_start; - class NEB *neb; // NEB object - class Fix *fix_neb; // FixNEB object - class Compute *compute_event; // compute to detect event - class FixEventTAD *fix_event; // current event/state - class FixStorePeratom *fix_revert; // revert state - FixEventTAD **fix_event_list; // list of possible events - int n_event_list; // number of events - int nmax_event_list; // allocated events - int nmin_event_list; // minimum allocation + class NEB *neb; // NEB object + class Fix *fix_neb; // FixNEB object + class Compute *compute_event; // compute to detect event + class FixEventTAD *fix_event; // current event/state + class FixStoreAtom *fix_revert; // revert state + FixEventTAD **fix_event_list; // list of possible events + int n_event_list; // number of events + int nmax_event_list; // allocated events + int nmin_event_list; // minimum allocation char *neb_logfilename; // filename for ulogfile_neb FILE *uscreen_neb; // neb universe screen output diff --git a/src/VTK/dump_vtk.cpp b/src/VTK/dump_vtk.cpp index c4dd68bf3c..75033684ae 100644 --- a/src/VTK/dump_vtk.cpp +++ b/src/VTK/dump_vtk.cpp @@ -31,7 +31,7 @@ #include "domain.h" #include "error.h" #include "fix.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "group.h" #include "input.h" @@ -2357,16 +2357,16 @@ int DumpVTK::modify_param(int narg, char **arg) thresh_value[nthresh] = utils::numeric(FLERR,arg[3],false,lmp); thresh_last[nthresh] = -1; } else { - thresh_fix = (FixStorePeratom **) - memory->srealloc(thresh_fix,(nthreshlast+1)*sizeof(FixStorePeratom *),"dump:thresh_fix"); + thresh_fix = (FixStoreAtom **) + memory->srealloc(thresh_fix,(nthreshlast+1)*sizeof(FixStoreAtom *),"dump:thresh_fix"); thresh_fixID = (char **) memory->srealloc(thresh_fixID,(nthreshlast+1)*sizeof(char *),"dump:thresh_fixID"); memory->grow(thresh_first,(nthreshlast+1),"dump:thresh_first"); std::string threshid = fmt::format("{}{}_DUMP_STORE",id,nthreshlast); thresh_fixID[nthreshlast] = utils::strdup(threshid); - threshid += fmt::format(" {} STORE/PERATOM 1 0 0 1", group->names[igroup]); - thresh_fix[nthreshlast] = dynamic_cast(modify->add_fix(threshid)); + threshid += fmt::format(" {} STORE/ATOM 1 0 0 1", group->names[igroup]); + thresh_fix[nthreshlast] = dynamic_cast(modify->add_fix(threshid)); thresh_last[nthreshlast] = nthreshlast; thresh_first[nthreshlast] = 1; diff --git a/src/balance.cpp b/src/balance.cpp index 8d1ba460db..3bd083e2b9 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -26,7 +26,7 @@ #include "neighbor.h" #include "comm.h" #include "domain.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "imbalance.h" #include "imbalance_group.h" @@ -513,9 +513,9 @@ void Balance::weight_storage(char *prefix) if (prefix) cmd = prefix; cmd += "IMBALANCE_WEIGHTS"; - fixstore = dynamic_cast(modify->get_fix_by_id(cmd)); + fixstore = dynamic_cast(modify->get_fix_by_id(cmd)); if (!fixstore) - fixstore = dynamic_cast(modify->add_fix(cmd + " all STORE/PERATOM 1 0 0 0")); + fixstore = dynamic_cast(modify->add_fix(cmd + " all STORE/ATOM 1 0 0 0")); // do not carry weights with atoms during normal atom migration diff --git a/src/balance.h b/src/balance.h index 3a6e8bf457..669d21e2b5 100644 --- a/src/balance.h +++ b/src/balance.h @@ -27,11 +27,11 @@ namespace LAMMPS_NS { class Balance : public Command { public: class RCB *rcb; - class FixStorePeratom *fixstore; // per-atom weights stored in FixStorePeratom - int wtflag; // 1 if particle weighting is used - int varflag; // 1 if weight style var(iable) is used - int sortflag; // 1 if sorting of comm messages is done - int outflag; // 1 for output of balance results to file + class FixStoreAtom *fixstore; // per-atom weights stored in FixStorePeratom + int wtflag; // 1 if particle weighting is used + int varflag; // 1 if weight style var(iable) is used + int sortflag; // 1 if sorting of comm messages is done + int outflag; // 1 for output of balance results to file Balance(class LAMMPS *); ~Balance() override; diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp index b59449989b..f5c68c8f25 100644 --- a/src/compute_chunk_atom.cpp +++ b/src/compute_chunk_atom.cpp @@ -21,7 +21,7 @@ #include "domain.h" #include "error.h" #include "fix.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "group.h" #include "input.h" #include "lattice.h" @@ -571,8 +571,8 @@ void ComputeChunkAtom::init() if ((idsflag == ONCE || lockcount) && !fixstore) { id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); - fixstore = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1", id_fix, group->names[igroup]))); + fixstore = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 1", id_fix, group->names[igroup]))); } if ((idsflag != ONCE && !lockcount) && fixstore) { diff --git a/src/compute_chunk_atom.h b/src/compute_chunk_atom.h index 6850003b3e..943e36c985 100644 --- a/src/compute_chunk_atom.h +++ b/src/compute_chunk_atom.h @@ -93,7 +93,7 @@ class ComputeChunkAtom : public Compute { double *varatom; char *id_fix; - class FixStorePeratom *fixstore; + class FixStoreAtom *fixstore; class Fix *lockfix; // ptr to FixAveChunk that is locking out setups // null pointer if no lock currently in place diff --git a/src/compute_displace_atom.cpp b/src/compute_displace_atom.cpp index 6f352fa111..9f37ff2a78 100644 --- a/src/compute_displace_atom.cpp +++ b/src/compute_displace_atom.cpp @@ -17,7 +17,7 @@ #include "atom.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "group.h" #include "input.h" #include "memory.h" @@ -74,8 +74,8 @@ ComputeDisplaceAtom::ComputeDisplaceAtom(LAMMPS *lmp, int narg, char **arg) : // id = compute-ID + COMPUTE_STORE, fix group = compute group id_fix = utils::strdup(std::string(id) + "_COMPUTE_STORE"); - fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 3 0 0 1", id_fix, group->names[igroup]))); + fix = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 3 0 0 1", id_fix, group->names[igroup]))); // calculate xu,yu,zu for fix store array // skip if reset from restart file @@ -120,7 +120,7 @@ void ComputeDisplaceAtom::init() { // set fix which stores original atom coords - fix = dynamic_cast(modify->get_fix_by_id(id_fix)); + fix = dynamic_cast(modify->get_fix_by_id(id_fix)); if (!fix) error->all(FLERR,"Could not find compute displace/atom fix with ID {}", id_fix); if (refreshflag) { diff --git a/src/compute_displace_atom.h b/src/compute_displace_atom.h index dc1be7434f..006928bd42 100644 --- a/src/compute_displace_atom.h +++ b/src/compute_displace_atom.h @@ -38,7 +38,7 @@ class ComputeDisplaceAtom : public Compute { int nmax; double **displace; char *id_fix; - class FixStorePeratom *fix; + class FixStoreAtom *fix; int refreshflag, ivar, nvmax; // refresh option is enabled char *rvar; // for incremental dumps diff --git a/src/compute_msd.cpp b/src/compute_msd.cpp index ecbb540a48..e73dbd3d53 100644 --- a/src/compute_msd.cpp +++ b/src/compute_msd.cpp @@ -16,7 +16,7 @@ #include "atom.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "group.h" #include "modify.h" #include "update.h" @@ -63,8 +63,8 @@ ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, a // id = compute-ID + COMPUTE_STORE, fix group = compute group id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); - fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 3 0 0 1", id_fix, group->names[igroup]))); + fix = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 3 0 0 1", id_fix, group->names[igroup]))); // calculate xu,yu,zu for fix store array // skip if reset from restart file @@ -127,7 +127,7 @@ void ComputeMSD::init() { // set fix which stores reference atom coords - fix = dynamic_cast(modify->get_fix_by_id(id_fix)); + fix = dynamic_cast(modify->get_fix_by_id(id_fix)); if (!fix) error->all(FLERR, "Could not find compute msd fix with ID {}", id_fix); // nmsd = # of atoms in group diff --git a/src/compute_msd.h b/src/compute_msd.h index a273e9cf58..ffb0c18c8c 100644 --- a/src/compute_msd.h +++ b/src/compute_msd.h @@ -39,7 +39,7 @@ class ComputeMSD : public Compute { bigint nmsd; double masstotal; char *id_fix; - class FixStorePeratom *fix; + class FixStoreAtom *fix; }; } // namespace LAMMPS_NS diff --git a/src/compute_vacf.cpp b/src/compute_vacf.cpp index 9d6018d05b..acf1405092 100644 --- a/src/compute_vacf.cpp +++ b/src/compute_vacf.cpp @@ -18,7 +18,7 @@ #include "update.h" #include "group.h" #include "modify.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "error.h" using namespace LAMMPS_NS; @@ -39,8 +39,8 @@ ComputeVACF::ComputeVACF(LAMMPS *lmp, int narg, char **arg) : // id = compute-ID + COMPUTE_STORE, fix group = compute group id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); - fix = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 3 0 0 1", id_fix, group->names[igroup]))); + fix = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 3 0 0 1", id_fix, group->names[igroup]))); // store current velocities in fix store array // skip if reset from restart file @@ -84,7 +84,7 @@ void ComputeVACF::init() { // set fix which stores original atom velocities - fix = dynamic_cast(modify->get_fix_by_id(id_fix)); + fix = dynamic_cast(modify->get_fix_by_id(id_fix)); if (!fix) error->all(FLERR,"Could not find compute vacf fix ID {}", id_fix); // nvacf = # of atoms in group diff --git a/src/compute_vacf.h b/src/compute_vacf.h index 42b3ed4adc..8e5e57ab65 100644 --- a/src/compute_vacf.h +++ b/src/compute_vacf.h @@ -35,7 +35,7 @@ class ComputeVACF : public Compute { protected: bigint nvacf; char *id_fix; - class FixStorePeratom *fix; + class FixStoreAtom *fix; }; } // namespace LAMMPS_NS diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 922fd4f6fc..8667c6af12 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -20,7 +20,7 @@ #include "domain.h" #include "error.h" #include "fix.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "group.h" #include "input.h" #include "memory.h" @@ -2005,16 +2005,16 @@ int DumpCustom::modify_param(int narg, char **arg) thresh_value[nthresh] = utils::numeric(FLERR,arg[3],false,lmp); thresh_last[nthresh] = -1; } else { - thresh_fix = (FixStorePeratom **) - memory->srealloc(thresh_fix,(nthreshlast+1)*sizeof(FixStorePeratom *),"dump:thresh_fix"); + thresh_fix = (FixStoreAtom **) + memory->srealloc(thresh_fix,(nthreshlast+1)*sizeof(FixStoreAtom *),"dump:thresh_fix"); thresh_fixID = (char **) memory->srealloc(thresh_fixID,(nthreshlast+1)*sizeof(char *),"dump:thresh_fixID"); memory->grow(thresh_first,(nthreshlast+1),"dump:thresh_first"); std::string threshid = fmt::format("{}{}_DUMP_STORE",id,nthreshlast); thresh_fixID[nthreshlast] = utils::strdup(threshid); - threshid += fmt::format(" {} STORE/PERATOM 1 0 0 1", group->names[igroup]); - thresh_fix[nthreshlast] = dynamic_cast(modify->add_fix(threshid)); + threshid += fmt::format(" {} STORE/ATOM 1 0 0 1", group->names[igroup]); + thresh_fix[nthreshlast] = dynamic_cast(modify->add_fix(threshid)); thresh_last[nthreshlast] = nthreshlast; thresh_first[nthreshlast] = 1; diff --git a/src/dump_custom.h b/src/dump_custom.h index da49ffdc22..b600bd60b8 100644 --- a/src/dump_custom.h +++ b/src/dump_custom.h @@ -37,19 +37,19 @@ class DumpCustom : public Dump { int nevery; // dump frequency for output char *idregion; // region ID, nullptr if no region - int nthresh; // # of defined thresholds - int nthreshlast; // # of defined thresholds with value = LAST - // - int *thresh_array; // array to threshold on for each nthresh - int *thresh_op; // threshold operation for each nthresh - double *thresh_value; // threshold value for each nthresh - int *thresh_last; // for threshold value = LAST, - // index into thresh_fix - // -1 if not LAST, value is numeric - // - class FixStorePeratom **thresh_fix; // stores values for each threshold LAST - char **thresh_fixID; // IDs of thresh_fixes - int *thresh_first; // 1 the first time a FixStore values accessed + int nthresh; // # of defined thresholds + int nthreshlast; // # of defined thresholds with value = LAST + // + int *thresh_array; // array to threshold on for each nthresh + int *thresh_op; // threshold operation for each nthresh + double *thresh_value; // threshold value for each nthresh + int *thresh_last; // for threshold value = LAST, + // index into thresh_fix + // -1 if not LAST, value is numeric + // + class FixStoreAtom **thresh_fix; // stores values for each threshold LAST + char **thresh_fixID; // IDs of thresh_fixes + int *thresh_first; // 1 the first time a FixStore values accessed int expand; // flag for whether field args were expanded char **earg; // field names with wildcard expansion diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 98cf955485..8dd97250a3 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -19,7 +19,7 @@ #include "bond.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "group.h" #include "input.h" @@ -278,8 +278,8 @@ void FixAdapt::post_constructor() if (diamflag && atom->radius_flag) { id_fix_diam = utils::strdup(id + std::string("_FIX_STORE_DIAM")); - fix_diam = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1", id_fix_diam,group->names[igroup]))); + fix_diam = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 1", id_fix_diam,group->names[igroup]))); if (fix_diam->restart_reset) fix_diam->restart_reset = 0; else { double *vec = fix_diam->vstore; @@ -296,8 +296,8 @@ void FixAdapt::post_constructor() if (chgflag && atom->q_flag) { id_fix_chg = utils::strdup(id + std::string("_FIX_STORE_CHG")); - fix_chg = dynamic_cast( - modify->add_fix(fmt::format("{} {} STORE/PERATOM 1 0 0 1",id_fix_chg,group->names[igroup]))); + fix_chg = dynamic_cast( + modify->add_fix(fmt::format("{} {} STORE/ATOM 1 0 0 1",id_fix_chg,group->names[igroup]))); if (fix_chg->restart_reset) fix_chg->restart_reset = 0; else { double *vec = fix_chg->vstore; @@ -494,11 +494,11 @@ void FixAdapt::init() // fixes that store initial per-atom values if (id_fix_diam) { - fix_diam = dynamic_cast(modify->get_fix_by_id(id_fix_diam)); + fix_diam = dynamic_cast(modify->get_fix_by_id(id_fix_diam)); if (!fix_diam) error->all(FLERR,"Could not find fix adapt storage fix ID {}", id_fix_diam); } if (id_fix_chg) { - fix_chg = dynamic_cast(modify->get_fix_by_id(id_fix_chg)); + fix_chg = dynamic_cast(modify->get_fix_by_id(id_fix_chg)); if (!fix_chg) error->all(FLERR,"Could not find fix adapt storage fix ID {}", id_fix_chg); } diff --git a/src/fix_adapt.h b/src/fix_adapt.h index 82dc739c67..f8477f7259 100644 --- a/src/fix_adapt.h +++ b/src/fix_adapt.h @@ -48,7 +48,7 @@ class FixAdapt : public Fix { int anypair, anybond, anyangle; int nlevels_respa; char *id_fix_diam, *id_fix_chg; - class FixStorePeratom *fix_diam, *fix_chg; + class FixStoreAtom *fix_diam, *fix_chg; double previous_diam_scale, previous_chg_scale; int discflag; diff --git a/src/fix_balance.cpp b/src/fix_balance.cpp index 06274eea03..844ffe474e 100644 --- a/src/fix_balance.cpp +++ b/src/fix_balance.cpp @@ -19,7 +19,7 @@ #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "force.h" #include "irregular.h" #include "kspace.h" diff --git a/src/fix_store_peratom.cpp b/src/fix_store_atom.cpp similarity index 88% rename from src/fix_store_peratom.cpp rename to src/fix_store_atom.cpp index 2a8429e42f..461959d264 100644 --- a/src/fix_store_peratom.cpp +++ b/src/fix_store_atom.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "atom.h" #include "error.h" @@ -32,10 +32,10 @@ using namespace FixConst; /* ---------------------------------------------------------------------- */ -FixStorePeratom::FixStorePeratom(LAMMPS *lmp, int narg, char **arg) : +FixStoreAtom::FixStoreAtom(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), vstore(nullptr), astore(nullptr) { - if (narg != 7) error->all(FLERR, "Illegal fix STORE/PERATOM command: number of args"); + if (narg != 7) error->all(FLERR, "Illegal fix STORE/ATOM command: number of args"); disable = 0; @@ -52,7 +52,7 @@ FixStorePeratom::FixStorePeratom(LAMMPS *lmp, int narg, char **arg) : else if (n1 > 0 && n2 > 0) tensorflag = 1; else - error->all(FLERR, "Illegal fix STORE/PERATOM dimension args: {} {}", n1, n2); + error->all(FLERR, "Illegal fix STORE/ATOM dimension args: {} {}", n1, n2); if (vecflag || arrayflag) nvalues = n1; @@ -71,7 +71,7 @@ FixStorePeratom::FixStorePeratom(LAMMPS *lmp, int narg, char **arg) : astore = nullptr; tstore = nullptr; - FixStorePeratom::grow_arrays(atom->nmax); + FixStoreAtom::grow_arrays(atom->nmax); atom->add_callback(Atom::GROW); if (restartflag) atom->add_callback(Atom::RESTART); if (ghostflag) atom->add_callback(Atom::BORDER); @@ -93,7 +93,7 @@ FixStorePeratom::FixStorePeratom(LAMMPS *lmp, int narg, char **arg) : /* ---------------------------------------------------------------------- */ -FixStorePeratom::~FixStorePeratom() +FixStoreAtom::~FixStoreAtom() { // unregister callbacks to this fix from Atom class @@ -108,7 +108,7 @@ FixStorePeratom::~FixStorePeratom() /* ---------------------------------------------------------------------- */ -int FixStorePeratom::setmask() +int FixStoreAtom::setmask() { int mask = 0; return mask; @@ -118,7 +118,7 @@ int FixStorePeratom::setmask() allocate atom-based array ------------------------------------------------------------------------- */ -void FixStorePeratom::grow_arrays(int nmax) +void FixStoreAtom::grow_arrays(int nmax) { if (vecflag) memory->grow(vstore, nmax, "store:vstore"); @@ -132,7 +132,7 @@ void FixStorePeratom::grow_arrays(int nmax) copy values within local atom-based array ------------------------------------------------------------------------- */ -void FixStorePeratom::copy_arrays(int i, int j, int /*delflag*/) +void FixStoreAtom::copy_arrays(int i, int j, int /*delflag*/) { if (disable) return; @@ -149,7 +149,7 @@ void FixStorePeratom::copy_arrays(int i, int j, int /*delflag*/) pack values for border communication at re-neighboring ------------------------------------------------------------------------- */ -int FixStorePeratom::pack_border(int n, int *list, double *buf) +int FixStoreAtom::pack_border(int n, int *list, double *buf) { int i, j, k; @@ -179,7 +179,7 @@ int FixStorePeratom::pack_border(int n, int *list, double *buf) unpack values for border communication at re-neighboring ------------------------------------------------------------------------- */ -int FixStorePeratom::unpack_border(int n, int first, double *buf) +int FixStoreAtom::unpack_border(int n, int first, double *buf) { int i, k, last; @@ -203,7 +203,7 @@ int FixStorePeratom::unpack_border(int n, int first, double *buf) pack values in local atom-based array for exchange with another proc ------------------------------------------------------------------------- */ -int FixStorePeratom::pack_exchange(int i, double *buf) +int FixStoreAtom::pack_exchange(int i, double *buf) { if (disable) return 0; @@ -222,7 +222,7 @@ int FixStorePeratom::pack_exchange(int i, double *buf) unpack values in local atom-based array from exchange with another proc ------------------------------------------------------------------------- */ -int FixStorePeratom::unpack_exchange(int nlocal, double *buf) +int FixStoreAtom::unpack_exchange(int nlocal, double *buf) { if (disable) return 0; @@ -241,7 +241,7 @@ int FixStorePeratom::unpack_exchange(int nlocal, double *buf) pack values in local atom-based arrays for restart file ------------------------------------------------------------------------- */ -int FixStorePeratom::pack_restart(int i, double *buf) +int FixStoreAtom::pack_restart(int i, double *buf) { if (disable) { buf[0] = 0; @@ -266,7 +266,7 @@ int FixStorePeratom::pack_restart(int i, double *buf) unpack values from atom->extra array to restart the fix ------------------------------------------------------------------------- */ -void FixStorePeratom::unpack_restart(int nlocal, int nth) +void FixStoreAtom::unpack_restart(int nlocal, int nth) { if (disable) return; @@ -292,7 +292,7 @@ void FixStorePeratom::unpack_restart(int nlocal, int nth) maxsize of any atom's restart data ------------------------------------------------------------------------- */ -int FixStorePeratom::maxsize_restart() +int FixStoreAtom::maxsize_restart() { if (disable) return 1; return nvalues + 1; @@ -302,17 +302,17 @@ int FixStorePeratom::maxsize_restart() size of atom nlocal's restart data ------------------------------------------------------------------------- */ -int FixStorePeratom::size_restart(int /*nlocal*/) +int FixStoreAtom::size_restart(int /*nlocal*/) { if (disable) return 1; return nvalues + 1; } /* ---------------------------------------------------------------------- - memory usage of global or peratom atom-based array + memory usage of per-atom atom-based array ------------------------------------------------------------------------- */ -double FixStorePeratom::memory_usage() +double FixStoreAtom::memory_usage() { return (double) atom->nmax * nvalues * sizeof(double); } diff --git a/src/fix_store_peratom.h b/src/fix_store_atom.h similarity index 89% rename from src/fix_store_peratom.h rename to src/fix_store_atom.h index 9434ffe799..e13b8aa37d 100644 --- a/src/fix_store_peratom.h +++ b/src/fix_store_atom.h @@ -13,26 +13,26 @@ #ifdef FIX_CLASS // clang-format off -FixStyle(STORE/PERATOM,FixStorePeratom); +FixStyle(STORE/ATOM,FixStoreAtom); // clang-format on #else -#ifndef LMP_FIX_STORE_PERATOM_H -#define LMP_FIX_STORE_PERATOM_H +#ifndef LMP_FIX_STORE_ATOM_H +#define LMP_FIX_STORE_ATOM_H #include "fix.h" namespace LAMMPS_NS { -class FixStorePeratom : public Fix { +class FixStoreAtom : public Fix { public: double *vstore; // vector storage double **astore; // array storage double ***tstore; // tensor (3d array) storage int disable; // 1 if operations (except grow) are currently disabled - FixStorePeratom(class LAMMPS *, int, char **); - ~FixStorePeratom() override; + FixStoreAtom(class LAMMPS *, int, char **); + ~FixStoreAtom() override; int setmask() override; void grow_arrays(int) override; diff --git a/src/fix_store_global.cpp b/src/fix_store_global.cpp index cebf4f7690..028d35810e 100644 --- a/src/fix_store_global.cpp +++ b/src/fix_store_global.cpp @@ -182,7 +182,7 @@ void FixStoreGlobal::restart(char *buf) } /* ---------------------------------------------------------------------- - memory usage of global or peratom atom-based array + memory usage of global data ------------------------------------------------------------------------- */ double FixStoreGlobal::memory_usage() diff --git a/src/variable.cpp b/src/variable.cpp index 56a0604a7e..19aed73734 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -20,7 +20,7 @@ #include "domain.h" #include "error.h" #include "fix.h" -#include "fix_store_peratom.h" +#include "fix_store_atom.h" #include "group.h" #include "info.h" #include "input.h" @@ -5027,8 +5027,8 @@ VarReader::VarReader(LAMMPS *lmp, char *name, char *file, int flag) : error->all(FLERR,"Cannot use atomfile-style variable unless an atom map exists"); id_fix = utils::strdup(std::string(name) + "_VARIABLE_STORE"); - fixstore = dynamic_cast( - modify->add_fix(std::string(id_fix) + " all STORE/PERATOM 1 0 0 0")); + fixstore = dynamic_cast( + modify->add_fix(std::string(id_fix) + " all STORE/ATOM 1 0 0 0")); buffer = new char[CHUNK*MAXLINE]; } } diff --git a/src/variable.h b/src/variable.h index 6326c5cc78..825a207d78 100644 --- a/src/variable.h +++ b/src/variable.h @@ -152,7 +152,7 @@ class Variable : protected Pointers { class VarReader : protected Pointers { public: - class FixStorePeratom *fixstore; + class FixStoreAtom *fixstore; char *id_fix; VarReader(class LAMMPS *, char *, char *, int);