From efae876dfa91d314b965828e22a27471374f1cbb Mon Sep 17 00:00:00 2001 From: Aidan Thompson Date: Thu, 30 Jun 2022 11:27:56 -0600 Subject: [PATCH 01/11] Updated timestamp for local array --- src/ML-SNAP/compute_sna_grid_local.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ML-SNAP/compute_sna_grid_local.cpp b/src/ML-SNAP/compute_sna_grid_local.cpp index 80a1baddab..76fe03a03b 100644 --- a/src/ML-SNAP/compute_sna_grid_local.cpp +++ b/src/ML-SNAP/compute_sna_grid_local.cpp @@ -203,7 +203,7 @@ void ComputeSNAGridLocal::init() void ComputeSNAGridLocal::compute_local() { - invoked_array = update->ntimestep; + invoked_local = update->ntimestep; // compute sna for each gridpoint From 2479624a76f82cb4325e705a315d8a73f6f79ffb Mon Sep 17 00:00:00 2001 From: Aidan Thompson Date: Sat, 31 Dec 2022 16:47:13 -0700 Subject: [PATCH 02/11] Added psllod keyword to toggle between SLLOD and p-SLLOD --- doc/src/fix_nvt_sllod.rst | 37 +++++++++++++++++++++++++++---------- src/fix_nh.cpp | 5 +++++ src/fix_nvt_sllod.cpp | 15 ++++++++++++++- src/fix_nvt_sllod.h | 1 + 4 files changed, 47 insertions(+), 11 deletions(-) diff --git a/doc/src/fix_nvt_sllod.rst b/doc/src/fix_nvt_sllod.rst index 04e60057a1..46e77088a6 100644 --- a/doc/src/fix_nvt_sllod.rst +++ b/doc/src/fix_nvt_sllod.rst @@ -17,6 +17,14 @@ Syntax * ID, group-ID are documented in :doc:`fix ` command * nvt/sllod = style name of this fix command +* zero or more keyword/value pairs may be appended +* keyword = *psllod* + + .. parsed-literal:: + + keyword = *psllod* + *psllod* value = *no* or *yes* = use SLLOD or p-SLLOD variant, respectively + * additional thermostat related keyword/value pairs from the :doc:`fix nvt ` command can be appended Examples @@ -67,16 +75,20 @@ equivalent to Newton's equations of motion for shear flow by the desired velocity gradient and the correct production of work by stresses for all forms of homogeneous flow by :ref:`(Daivis and Todd) `. -The LAMMPS implementation corresponds to the p-SLLOD variant -of SLLOD. :ref:`(Edwards) `. -The equations of motion are coupled to a +For the default *psllod* = *no*, +the LAMMPS implementation adheres to the standard SLLOD equations +of motion, as defined by :ref:`(Evans and Morriss) `. +The option *psllod* = *yes* invokes the +slightly different SLLOD variant first introduced by :ref:`(Tuckerman et al.) ` as +g-SLLOD and later by :ref:`(Edwards) ` as p-SLLOD. +In all cases, the equations of motion are coupled to a Nose/Hoover chain thermostat in a velocity Verlet formulation, closely following the implementation used for the :doc:`fix nvt ` command. .. note:: - A recent (2017) book by :ref:`(Daivis and Todd) ` + A recent (2017) book by :ref:`(Todd and Daivis) ` discusses use of the SLLOD method and non-equilibrium MD (NEMD) thermostatting generally, for both simple and complex fluids, e.g. molecular systems. The latter can be tricky to do correctly. @@ -159,7 +171,7 @@ Restrictions """""""""""" This fix works best without Nose-Hoover chain thermostats, i.e. using -tchain = 1. Setting tchain to larger values can result in poor +*tchain* = 1. Setting *tchain* to larger values can result in poor equilibration. Related commands @@ -171,7 +183,7 @@ Related commands Default """"""" -Same as :doc:`fix nvt `, except tchain = 1. +Same as :doc:`fix nvt `, except *tchain* = 1, psllod = *no*. ---------- @@ -183,11 +195,16 @@ Same as :doc:`fix nvt `, except tchain = 1. **(Daivis and Todd)** Daivis and Todd, J Chem Phys, 124, 194103 (2006). +.. _Todd-sllod: + +**(Todd and Daivis)** Todd and Daivis, Nonequilibrium Molecular Dynamics (book), +Cambridge University Press, (2017) https://doi.org/10.1017/9781139017848. + +.. _Tuckerman: + +**(Tuckerman et al.)** Tuckerman, Mundy, Balasubramanian, and Klein, J Chem Phys 106, 5615 (1997). + .. _Edwards: **(Edwards)** Edwards, Baig, and Keffer, J Chem Phys 124, 194104 (2006). -.. _Daivis-sllod: - -**(Daivis and Todd)** Daivis and Todd, Nonequilibrium Molecular Dynamics (book), -Cambridge University Press, https://doi.org/10.1017/9781139017848, (2017). diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index d0356f10f3..ac582f8db5 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -359,6 +359,11 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : } else if (strcmp(arg[iarg],"ext") == 0) { iarg += 2; + // keyword psllod is parsed in fix/nvt/sllod + + } else if (strcmp(arg[iarg],"psllod") == 0) { + iarg += 2; + } else error->all(FLERR,"Unknown fix nvt/npt/nph keyword: {}", arg[iarg]); } diff --git a/src/fix_nvt_sllod.cpp b/src/fix_nvt_sllod.cpp index bb4b6c4273..6d0b74b859 100644 --- a/src/fix_nvt_sllod.cpp +++ b/src/fix_nvt_sllod.cpp @@ -44,8 +44,20 @@ FixNVTSllod::FixNVTSllod(LAMMPS *lmp, int narg, char **arg) : // default values + psllod_flag = 0; if (mtchain_default_flag) mtchain = 1; + // select SLLOD/p-SLLOD/g-SLLOD variant + + int iarg = 3; + + while (iarg < narg) { + if (strcmp(arg[iarg],"psllod") == 0) { + if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix nvt/sllod psllod", error); + psllod_flag = utils::logical(FLERR,arg[iarg+1],false,lmp); + iarg += 2; + } else iarg++; + } // create a new compute temp style // id = fix-ID + temp @@ -106,10 +118,11 @@ void FixNVTSllod::nh_v_temp() for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { + if (!psllod_flag) temperature->remove_bias(i,v[i]); vdelu[0] = h_two[0]*v[i][0] + h_two[5]*v[i][1] + h_two[4]*v[i][2]; vdelu[1] = h_two[1]*v[i][1] + h_two[3]*v[i][2]; vdelu[2] = h_two[2]*v[i][2]; - temperature->remove_bias(i,v[i]); + if (psllod_flag) temperature->remove_bias(i,v[i]); v[i][0] = v[i][0]*factor_eta - dthalf*vdelu[0]; v[i][1] = v[i][1]*factor_eta - dthalf*vdelu[1]; v[i][2] = v[i][2]*factor_eta - dthalf*vdelu[2]; diff --git a/src/fix_nvt_sllod.h b/src/fix_nvt_sllod.h index e13eb11311..081f6e657d 100644 --- a/src/fix_nvt_sllod.h +++ b/src/fix_nvt_sllod.h @@ -32,6 +32,7 @@ class FixNVTSllod : public FixNH { private: int nondeformbias; + int psllod_flag; // 0 for SLLOD, 1 for p-SLLOD void nh_v_temp() override; }; From 80163782411c9d0ce7bef1455f1b4f143495e6ce Mon Sep 17 00:00:00 2001 From: Aidan Thompson Date: Sat, 31 Dec 2022 19:49:25 -0700 Subject: [PATCH 03/11] Extended to packages --- src/EFF/fix_nvt_sllod_eff.cpp | 3 ++- src/INTEL/fix_nvt_sllod_intel.cpp | 3 ++- src/KOKKOS/fix_nvt_sllod_kokkos.cpp | 4 +++- src/OPENMP/fix_nvt_sllod_omp.cpp | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/EFF/fix_nvt_sllod_eff.cpp b/src/EFF/fix_nvt_sllod_eff.cpp index 15a679aa3b..034a240e66 100644 --- a/src/EFF/fix_nvt_sllod_eff.cpp +++ b/src/EFF/fix_nvt_sllod_eff.cpp @@ -108,10 +108,11 @@ void FixNVTSllodEff::nh_v_temp() for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { - temperature->remove_bias(i,v[i]); + if (!psllod_flag) temperature->remove_bias(i,v[i]); vdelu[0] = h_two[0]*v[i][0] + h_two[5]*v[i][1] + h_two[4]*v[i][2]; vdelu[1] = h_two[1]*v[i][1] + h_two[3]*v[i][2]; vdelu[2] = h_two[2]*v[i][2]; + if (psllod_flag) temperature->remove_bias(i,v[i]); v[i][0] = v[i][0]*factor_eta - dthalf*vdelu[0]; v[i][1] = v[i][1]*factor_eta - dthalf*vdelu[1]; v[i][2] = v[i][2]*factor_eta - dthalf*vdelu[2]; diff --git a/src/INTEL/fix_nvt_sllod_intel.cpp b/src/INTEL/fix_nvt_sllod_intel.cpp index b2036de8cb..cd2bb30338 100644 --- a/src/INTEL/fix_nvt_sllod_intel.cpp +++ b/src/INTEL/fix_nvt_sllod_intel.cpp @@ -105,10 +105,11 @@ void FixNVTSllodIntel::nh_v_temp() for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { + if (!psllod_flag) temperature->remove_bias(i,v[i]); vdelu[0] = h_two[0]*v[i][0] + h_two[5]*v[i][1] + h_two[4]*v[i][2]; vdelu[1] = h_two[1]*v[i][1] + h_two[3]*v[i][2]; vdelu[2] = h_two[2]*v[i][2]; - temperature->remove_bias(i,v[i]); + if (psllod_flag) temperature->remove_bias(i,v[i]); v[i][0] = v[i][0]*factor_eta - dthalf*vdelu[0]; v[i][1] = v[i][1]*factor_eta - dthalf*vdelu[1]; v[i][2] = v[i][2]*factor_eta - dthalf*vdelu[2]; diff --git a/src/KOKKOS/fix_nvt_sllod_kokkos.cpp b/src/KOKKOS/fix_nvt_sllod_kokkos.cpp index d9fca7e0e9..481f80c763 100644 --- a/src/KOKKOS/fix_nvt_sllod_kokkos.cpp +++ b/src/KOKKOS/fix_nvt_sllod_kokkos.cpp @@ -117,11 +117,13 @@ void FixNVTSllodKokkos::nh_v_temp() if (vdelu.extent(0) < atomKK->nmax) vdelu = typename AT::t_v_array(Kokkos::NoInit("nvt/sllod/kk:vdelu"), atomKK->nmax); + if (!this->psllod_flag) this->temperature->remove_bias_all(); + this->copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); this->copymode = 0; - this->temperature->remove_bias_all(); + if (this->psllod_flag) this->temperature->remove_bias_all(); this->copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); diff --git a/src/OPENMP/fix_nvt_sllod_omp.cpp b/src/OPENMP/fix_nvt_sllod_omp.cpp index b72748be70..5cd8c9fb16 100644 --- a/src/OPENMP/fix_nvt_sllod_omp.cpp +++ b/src/OPENMP/fix_nvt_sllod_omp.cpp @@ -114,10 +114,11 @@ void FixNVTSllodOMP::nh_v_temp() for (int i = 0; i < nlocal; i++) { double vdelu0,vdelu1,vdelu2,buf[3]; if (mask[i] & groupbit) { + if (!psllod_flag) temperature->remove_bias_thr(i,&v[i].x,buf); vdelu0 = h_two[0]*v[i].x + h_two[5]*v[i].y + h_two[4]*v[i].z; vdelu1 = h_two[1]*v[i].y + h_two[3]*v[i].z; vdelu2 = h_two[2]*v[i].z; - temperature->remove_bias_thr(i,&v[i].x,buf); + if (psllod_flag) temperature->remove_bias_thr(i,&v[i].x,buf); v[i].x = v[i].x*factor_eta - dthalf*vdelu0; v[i].y = v[i].y*factor_eta - dthalf*vdelu1; v[i].z = v[i].z*factor_eta - dthalf*vdelu2; From 3a55a374a9b279f0ebbc53f0fcb7998fee3d6e28 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 31 Dec 2022 22:10:32 -0500 Subject: [PATCH 04/11] address compilation failures --- src/EFF/fix_nh_eff.cpp | 2 +- src/EFF/fix_nvt_sllod_eff.cpp | 13 +++++++++++++ src/EFF/fix_nvt_sllod_eff.h | 1 + src/INTEL/fix_nvt_sllod_intel.cpp | 16 ++++++++++++++-- src/INTEL/fix_nvt_sllod_intel.h | 1 + src/KOKKOS/fix_nvt_sllod_kokkos.cpp | 17 +++++++++++++++-- src/KOKKOS/fix_nvt_sllod_kokkos.h | 1 + src/OPENMP/fix_nvt_sllod_omp.cpp | 16 ++++++++++++++-- src/OPENMP/fix_nvt_sllod_omp.h | 1 + src/fix_nh.cpp | 2 +- 10 files changed, 62 insertions(+), 8 deletions(-) diff --git a/src/EFF/fix_nh_eff.cpp b/src/EFF/fix_nh_eff.cpp index 15aaf5deb6..a569932000 100644 --- a/src/EFF/fix_nh_eff.cpp +++ b/src/EFF/fix_nh_eff.cpp @@ -33,7 +33,7 @@ enum{NOBIAS,BIAS}; FixNHEff::FixNHEff(LAMMPS *lmp, int narg, char **arg) : FixNH(lmp, narg, arg) { if (!atom->electron_flag) - error->all(FLERR,"Fix nvt/nph/npt/eff requires atom style electron"); + error->all(FLERR,"Fix {} requires atom style electron", style); } /* ---------------------------------------------------------------------- diff --git a/src/EFF/fix_nvt_sllod_eff.cpp b/src/EFF/fix_nvt_sllod_eff.cpp index 034a240e66..f67684b528 100644 --- a/src/EFF/fix_nvt_sllod_eff.cpp +++ b/src/EFF/fix_nvt_sllod_eff.cpp @@ -42,8 +42,21 @@ FixNVTSllodEff::FixNVTSllodEff(LAMMPS *lmp, int narg, char **arg) : // default values + psllod_flag = 0; if (mtchain_default_flag) mtchain = 1; + // select SLLOD/p-SLLOD/g-SLLOD variant + + int iarg = 3; + + while (iarg < narg) { + if (strcmp(arg[iarg],"psllod") == 0) { + if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix nvt/sllod/eff psllod", error); + psllod_flag = utils::logical(FLERR,arg[iarg+1],false,lmp); + iarg += 2; + } else iarg++; + } + // create a new compute temp style // id = fix-ID + temp diff --git a/src/EFF/fix_nvt_sllod_eff.h b/src/EFF/fix_nvt_sllod_eff.h index 3e56638726..7c82eb2ebd 100644 --- a/src/EFF/fix_nvt_sllod_eff.h +++ b/src/EFF/fix_nvt_sllod_eff.h @@ -31,6 +31,7 @@ class FixNVTSllodEff : public FixNHEff { private: int nondeformbias; + int psllod_flag; void nh_v_temp() override; }; diff --git a/src/INTEL/fix_nvt_sllod_intel.cpp b/src/INTEL/fix_nvt_sllod_intel.cpp index cd2bb30338..83cfdc1e88 100644 --- a/src/INTEL/fix_nvt_sllod_intel.cpp +++ b/src/INTEL/fix_nvt_sllod_intel.cpp @@ -35,14 +35,26 @@ FixNVTSllodIntel::FixNVTSllodIntel(LAMMPS *lmp, int narg, char **arg) : FixNHIntel(lmp, narg, arg) { if (!tstat_flag) - error->all(FLERR,"Temperature control must be used with fix nvt/sllod"); + error->all(FLERR,"Temperature control must be used with fix nvt/sllod/intel"); if (pstat_flag) - error->all(FLERR,"Pressure control can not be used with fix nvt/sllod"); + error->all(FLERR,"Pressure control can not be used with fix nvt/sllod/intel"); // default values + psllod_flag = 0; if (mtchain_default_flag) mtchain = 1; + // select SLLOD/p-SLLOD/g-SLLOD variant + + int iarg = 3; + + while (iarg < narg) { + if (strcmp(arg[iarg],"psllod") == 0) { + if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix nvt/sllod/intel psllod", error); + psllod_flag = utils::logical(FLERR,arg[iarg+1],false,lmp); + iarg += 2; + } else iarg++; + } // create a new compute temp style // id = fix-ID + temp diff --git a/src/INTEL/fix_nvt_sllod_intel.h b/src/INTEL/fix_nvt_sllod_intel.h index 7221a75fbc..e9332bec5b 100644 --- a/src/INTEL/fix_nvt_sllod_intel.h +++ b/src/INTEL/fix_nvt_sllod_intel.h @@ -36,6 +36,7 @@ class FixNVTSllodIntel : public FixNHIntel { private: int nondeformbias; + int psllod_flag; // 0 for SLLOD, 1 for p-SLLOD void nh_v_temp() override; }; diff --git a/src/KOKKOS/fix_nvt_sllod_kokkos.cpp b/src/KOKKOS/fix_nvt_sllod_kokkos.cpp index 481f80c763..2eab1ba35a 100644 --- a/src/KOKKOS/fix_nvt_sllod_kokkos.cpp +++ b/src/KOKKOS/fix_nvt_sllod_kokkos.cpp @@ -47,12 +47,25 @@ FixNVTSllodKokkos::FixNVTSllodKokkos(LAMMPS *lmp, int narg, char **a this->domainKK = (DomainKokkos *) this->domain; if (!this->tstat_flag) - this->error->all(FLERR,"Temperature control must be used with fix nvt/kk"); + this->error->all(FLERR,"Temperature control must be used with fix nvt/sllod/kk"); if (this->pstat_flag) - this->error->all(FLERR,"Pressure control can not be used with fix nvt/kk"); + this->error->all(FLERR,"Pressure control can not be used with fix nvt/sllod/kk"); + this->psllod_flag = 0; if (this->mtchain_default_flag) this->mtchain = 1; + // select SLLOD/p-SLLOD/g-SLLOD variant + + int iarg = 3; + + while (iarg < narg) { + if (strcmp(arg[iarg],"psllod") == 0) { + if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix nvt/sllod/kk psllod", this->error); + this->psllod_flag = utils::logical(FLERR,arg[iarg+1],false,this->lmp); + iarg += 2; + } else iarg++; + } + this->id_temp = utils::strdup(std::string(this->id)+"_temp"); this->modify->add_compute(fmt::format("{} all temp/deform/kk",this->id_temp)); this->tcomputeflag = 1; diff --git a/src/KOKKOS/fix_nvt_sllod_kokkos.h b/src/KOKKOS/fix_nvt_sllod_kokkos.h index 2fc0dd3afd..a4b39b881c 100644 --- a/src/KOKKOS/fix_nvt_sllod_kokkos.h +++ b/src/KOKKOS/fix_nvt_sllod_kokkos.h @@ -50,6 +50,7 @@ class FixNVTSllodKokkos : public FixNHKokkos { private: int nondeformbias; + int psllod_flag; void nh_v_temp() override; diff --git a/src/OPENMP/fix_nvt_sllod_omp.cpp b/src/OPENMP/fix_nvt_sllod_omp.cpp index 5cd8c9fb16..ec96736725 100644 --- a/src/OPENMP/fix_nvt_sllod_omp.cpp +++ b/src/OPENMP/fix_nvt_sllod_omp.cpp @@ -43,14 +43,26 @@ FixNVTSllodOMP::FixNVTSllodOMP(LAMMPS *lmp, int narg, char **arg) : FixNHOMP(lmp, narg, arg) { if (!tstat_flag) - error->all(FLERR,"Temperature control must be used with fix nvt/sllod"); + error->all(FLERR,"Temperature control must be used with fix nvt/sllod/omp"); if (pstat_flag) - error->all(FLERR,"Pressure control can not be used with fix nvt/sllod"); + error->all(FLERR,"Pressure control can not be used with fix nvt/sllod/omp"); // default values + psllod_flag = 0; if (mtchain_default_flag) mtchain = 1; + // select SLLOD/p-SLLOD/g-SLLOD variant + + int iarg = 3; + + while (iarg < narg) { + if (strcmp(arg[iarg],"psllod") == 0) { + if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix nvt/sllod/omp psllod", error); + psllod_flag = utils::logical(FLERR,arg[iarg+1],false,lmp); + iarg += 2; + } else iarg++; + } // create a new compute temp style // id = fix-ID + temp diff --git a/src/OPENMP/fix_nvt_sllod_omp.h b/src/OPENMP/fix_nvt_sllod_omp.h index fb5b57455f..261ac0f048 100644 --- a/src/OPENMP/fix_nvt_sllod_omp.h +++ b/src/OPENMP/fix_nvt_sllod_omp.h @@ -31,6 +31,7 @@ class FixNVTSllodOMP : public FixNHOMP { private: int nondeformbias; + int psllod_flag; // 0 for SLLOD, 1 for p-SLLOD void nh_v_temp() override; }; diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index ac582f8db5..c3cf524f8a 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -363,7 +363,7 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : } else if (strcmp(arg[iarg],"psllod") == 0) { iarg += 2; - + } else error->all(FLERR,"Unknown fix nvt/npt/nph keyword: {}", arg[iarg]); } From 7c66aeddf737370172fe6bd3316b1b22d7332229 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 31 Dec 2022 22:21:49 -0500 Subject: [PATCH 05/11] update and correct sllod thermostat docs --- doc/src/fix_nvt_sllod.rst | 31 +++++++++++---------- doc/src/fix_nvt_sllod_eff.rst | 24 +++++++++++----- doc/utils/sphinx-config/false_positives.txt | 1 + 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/doc/src/fix_nvt_sllod.rst b/doc/src/fix_nvt_sllod.rst index 46e77088a6..c9676e1c8b 100644 --- a/doc/src/fix_nvt_sllod.rst +++ b/doc/src/fix_nvt_sllod.rst @@ -18,14 +18,14 @@ Syntax * ID, group-ID are documented in :doc:`fix ` command * nvt/sllod = style name of this fix command * zero or more keyword/value pairs may be appended -* keyword = *psllod* .. parsed-literal:: keyword = *psllod* *psllod* value = *no* or *yes* = use SLLOD or p-SLLOD variant, respectively -* additional thermostat related keyword/value pairs from the :doc:`fix nvt ` command can be appended +* additional thermostat related keyword/value pairs from the :doc:`fix nvt ` + command can be appended Examples """""""" @@ -69,19 +69,20 @@ large x velocity. These velocities do not contribute to the thermal consistent. The SLLOD equations of motion, originally proposed by Hoover and Ladd -(see :ref:`(Evans and Morriss) `), were proven to be -equivalent to Newton's equations of motion for shear flow by -:ref:`(Evans and Morriss) `. They were later shown to generate -the desired velocity gradient and the correct production of work by -stresses for all forms of homogeneous flow by :ref:`(Daivis and Todd) -`. -For the default *psllod* = *no*, -the LAMMPS implementation adheres to the standard SLLOD equations -of motion, as defined by :ref:`(Evans and Morriss) `. -The option *psllod* = *yes* invokes the -slightly different SLLOD variant first introduced by :ref:`(Tuckerman et al.) ` as -g-SLLOD and later by :ref:`(Edwards) ` as p-SLLOD. -In all cases, the equations of motion are coupled to a +(see :ref:`(Evans and Morriss) `), were proven to be equivalent +to Newton's equations of motion for shear flow by :ref:`(Evans and +Morriss) `. They were later shown to generate the desired +velocity gradient and the correct production of work by stresses for all +forms of homogeneous flow by :ref:`(Daivis and Todd) `. + +.. versionchanged:: TBD + +For the default (*psllod* = *no*), the LAMMPS implementation adheres to +the standard SLLOD equations of motion, as defined by :ref:`(Evans and +Morriss) `. The option *psllod* = *yes* invokes the slightly +different SLLOD variant first introduced by :ref:`(Tuckerman et al.) +` as g-SLLOD and later by :ref:`(Edwards) ` as +p-SLLOD. In all cases, the equations of motion are coupled to a Nose/Hoover chain thermostat in a velocity Verlet formulation, closely following the implementation used for the :doc:`fix nvt ` command. diff --git a/doc/src/fix_nvt_sllod_eff.rst b/doc/src/fix_nvt_sllod_eff.rst index 7500735054..dd4dd469ef 100644 --- a/doc/src/fix_nvt_sllod_eff.rst +++ b/doc/src/fix_nvt_sllod_eff.rst @@ -12,7 +12,15 @@ Syntax * ID, group-ID are documented in :doc:`fix ` command * nvt/sllod/eff = style name of this fix command -* additional thermostat related keyword/value pairs from the :doc:`fix nvt/eff ` command can be appended +* zero or more keyword/value pairs may be appended + + .. parsed-literal:: + + keyword = *psllod* + *psllod* value = *no* or *yes* = use SLLOD or p-SLLOD variant, respectively + +* additional thermostat related keyword/value pairs from the :doc:`fix + nvt/eff ` command may be appended, too. Examples """""""" @@ -25,18 +33,20 @@ Examples Description """"""""""" -Perform constant NVT integration to update positions and velocities -each timestep for nuclei and electrons in the group for the :doc:`electron force field ` model, using a Nose/Hoover temperature +Perform constant NVT integration to update positions and velocities each +timestep for nuclei and electrons in the group for the :doc:`electron +force field ` model, using a Nose/Hoover temperature thermostat. V is volume; T is temperature. This creates a system trajectory consistent with the canonical ensemble. -The operation of this fix is exactly like that described by the :doc:`fix nvt/sllod ` command, except that the radius and +The operation of this fix is exactly like that described by the +:doc:`fix nvt/sllod ` command, except that the radius and radial velocity of electrons are also updated and thermostatted. Likewise the temperature calculated by the fix, using the compute it creates (as discussed in the :doc:`fix nvt, npt, and nph ` doc -page), is performed with a :doc:`compute temp/deform/eff ` command that includes -the eFF contribution to the temperature from the electron radial -velocity. +page), is performed with a :doc:`compute temp/deform/eff +` command that includes the eFF contribution to +the temperature from the electron radial velocity. Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 7cb409d040..52d43e98a9 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -2849,6 +2849,7 @@ pscrozi Pseudocode pseudodynamics pseudopotential +psllod pSp pSPICA Pstart From 8f541488fb48bcce00f6dc11cbb286c3a2137819 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 1 Jan 2023 12:54:57 -0500 Subject: [PATCH 06/11] modernize fix deform checks with fix nvt/sllod --- src/INTEL/fix_nvt_sllod_intel.cpp | 20 +++++++++----------- src/KOKKOS/fix_nvt_sllod_kokkos.cpp | 20 ++++++++++---------- src/OPENMP/fix_nvt_sllod_omp.cpp | 17 ++++++++--------- src/fix_nvt_sllod.cpp | 19 +++++++++---------- 4 files changed, 36 insertions(+), 40 deletions(-) diff --git a/src/INTEL/fix_nvt_sllod_intel.cpp b/src/INTEL/fix_nvt_sllod_intel.cpp index 83cfdc1e88..eb04d65a83 100644 --- a/src/INTEL/fix_nvt_sllod_intel.cpp +++ b/src/INTEL/fix_nvt_sllod_intel.cpp @@ -73,23 +73,21 @@ void FixNVTSllodIntel::init() FixNHIntel::init(); if (!temperature->tempbias) - error->all(FLERR,"Temperature for fix nvt/sllod does not have a bias"); + error->all(FLERR,"Temperature for fix nvt/sllod/intel does not have a bias"); nondeformbias = 0; if (strcmp(temperature->style,"temp/deform") != 0) nondeformbias = 1; // check fix deform remap settings - int i; - for (i = 0; i < modify->nfix; i++) - if (strncmp(modify->fix[i]->style,"deform",6) == 0) { - if ((dynamic_cast(modify->fix[i]))->remapflag != Domain::V_REMAP) - error->all(FLERR,"Using fix nvt/sllod with inconsistent fix deform " - "remap option"); - break; - } - if (i == modify->nfix) - error->all(FLERR,"Using fix nvt/sllod with no fix deform defined"); + auto deform = modify->get_fix_by_style("^deform"); + if (deform.size() < 1) error->all(FLERR,"Using fix nvt/sllod/intel with no fix deform defined"); + + for (auto ifix : deform) { + auto f = dynamic_cast(ifix); + if (f && (f->remapflag != Domain::V_REMAP)) + error->all(FLERR,"Using fix nvt/sllod/intel with inconsistent fix deform remap option"); + } } /* ---------------------------------------------------------------------- diff --git a/src/KOKKOS/fix_nvt_sllod_kokkos.cpp b/src/KOKKOS/fix_nvt_sllod_kokkos.cpp index 2eab1ba35a..ab799d9b6d 100644 --- a/src/KOKKOS/fix_nvt_sllod_kokkos.cpp +++ b/src/KOKKOS/fix_nvt_sllod_kokkos.cpp @@ -80,22 +80,22 @@ void FixNVTSllodKokkos::init() FixNHKokkos::init(); if (!this->temperature->tempbias) - this->error->all(FLERR,"Temperature for fix nvt/sllod does not have a bias"); + this->error->all(FLERR,"Temperature for fix nvt/sllod/kk does not have a bias"); nondeformbias = 0; if (utils::strmatch(this->temperature->style,"^temp/deform")) nondeformbias = 1; // check fix deform remap settings - int i; - for (i = 0; i < this->modify->nfix; i++) - if (utils::strmatch(this->modify->fix[i]->style,"^deform")) { - if (((FixDeform *) this->modify->fix[i])->remapflag != Domain::V_REMAP) - this->error->all(FLERR,"Using fix nvt/sllod with inconsistent fix deform remap option"); - break; - } - if (i == this->modify->nfix) - this->error->all(FLERR,"Using fix nvt/sllod with no fix deform defined"); + auto deform = this->modify->get_fix_by_style("^deform"); + if (deform.size() < 1) + this->error->all(FLERR,"Using fix nvt/sllod/kk with no fix deform defined"); + + for (auto ifix : deform) { + auto f = dynamic_cast(ifix); + if (f && (f->remapflag != Domain::V_REMAP)) + this->error->all(FLERR,"Using fix ntv/sllod/kk with inconsistent fix deform remap option"); + } } /* ---------------------------------------------------------------------- diff --git a/src/OPENMP/fix_nvt_sllod_omp.cpp b/src/OPENMP/fix_nvt_sllod_omp.cpp index ec96736725..5e880da7a3 100644 --- a/src/OPENMP/fix_nvt_sllod_omp.cpp +++ b/src/OPENMP/fix_nvt_sllod_omp.cpp @@ -87,15 +87,14 @@ void FixNVTSllodOMP::init() // check fix deform remap settings - int i; - for (i = 0; i < modify->nfix; i++) - if (utils::strmatch(modify->fix[i]->style,"^deform")) { - if ((dynamic_cast(modify->fix[i]))->remapflag != Domain::V_REMAP) - error->all(FLERR,"Using fix nvt/sllod/omp with inconsistent fix deform remap option"); - break; - } - if (i == modify->nfix) - error->all(FLERR,"Using fix nvt/sllod/omp with no fix deform defined"); + auto deform = modify->get_fix_by_style("^deform"); + if (deform.size() < 1) error->all(FLERR,"Using fix nvt/sllod/omp with no fix deform defined"); + + for (auto ifix : deform) { + auto f = dynamic_cast(ifix); + if (f && (f->remapflag != Domain::V_REMAP)) + error->all(FLERR,"Using fix nvt/sllod/omp with inconsistent fix deform remap option"); + } } /* ---------------------------------------------------------------------- diff --git a/src/fix_nvt_sllod.cpp b/src/fix_nvt_sllod.cpp index 6d0b74b859..7e3e8788fe 100644 --- a/src/fix_nvt_sllod.cpp +++ b/src/fix_nvt_sllod.cpp @@ -75,22 +75,21 @@ void FixNVTSllod::init() FixNH::init(); if (!temperature->tempbias) - error->all(FLERR,"Temperature for fix nvt/sllod does not have a bias"); + error->all(FLERR,"Temperature for fix {} does not have a bias", style); nondeformbias = 0; if (strcmp(temperature->style,"temp/deform") != 0) nondeformbias = 1; // check fix deform remap settings - int i; - for (i = 0; i < modify->nfix; i++) - if (strncmp(modify->fix[i]->style,"deform",6) == 0) { - if ((dynamic_cast(modify->fix[i]))->remapflag != Domain::V_REMAP) - error->all(FLERR,"Using fix nvt/sllod with inconsistent fix deform remap option"); - break; - } - if (i == modify->nfix) - error->all(FLERR,"Using fix nvt/sllod with no fix deform defined"); + auto deform = modify->get_fix_by_style("^deform"); + if (deform.size() < 1) error->all(FLERR,"Using fix {} with no fix deform defined", style); + + for (auto ifix : deform) { + auto f = dynamic_cast(ifix); + if (f && (f->remapflag != Domain::V_REMAP)) + error->all(FLERR,"Using fix {} with inconsistent fix deform remap option", style); + } } /* ---------------------------------------------------------------------- From b25eeb3b26478eb604b19424809015bfb65a5025 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 1 Jan 2023 12:56:44 -0500 Subject: [PATCH 07/11] add unit tests for fix nvt/sllod --- .../tests/fix-timestep-nvt-psllod.yaml | 80 +++++++++++++++++++ .../tests/fix-timestep-nvt-sllod.yaml | 80 +++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 unittest/force-styles/tests/fix-timestep-nvt-psllod.yaml create mode 100644 unittest/force-styles/tests/fix-timestep-nvt-sllod.yaml diff --git a/unittest/force-styles/tests/fix-timestep-nvt-psllod.yaml b/unittest/force-styles/tests/fix-timestep-nvt-psllod.yaml new file mode 100644 index 0000000000..acb7003210 --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-nvt-psllod.yaml @@ -0,0 +1,80 @@ +--- +lammps_version: 22 Dec 2022 +tags: generated +date_generated: Sun Jan 1 12:26:05 2023 +epsilon: 5e-12 +skip_tests: +prerequisites: ! | + atom full + fix nvt/sllod +pre_commands: ! "" +post_commands: ! | + change_box all triclinic + fix all all deform 2 xy final 2.0 remap v + fix test all nvt/sllod temp 50.0 ${t_target} 1.0 psllod yes +input_file: in.fourmol +natoms: 29 +global_scalar: 9642093.286379034 +global_vector: ! |- + 12 2146.9432527203057 1072.8299693560025 35837.928137134906 9606255.358241899 0 0 0 0 0 0 0 0 +run_pos: ! |2 + 1 1.0765144559203570e+00 2.4744162491392263e+00 -1.7157063892613067e-01 + 2 1.7211771647380463e+00 2.9512205871104609e+00 -8.5721661669391658e-01 + 3 4.9635322353716571e-01 1.2425767224774784e+00 -6.2267315907425935e-01 + 4 -3.5309081191258596e-01 1.4911153640404944e+00 -1.2483861334935469e+00 + 5 2.5418659599743254e-01 9.3443983463467895e-01 4.0187830807490954e-01 + 6 1.3428231839724720e+00 2.3638965139354529e-01 -1.2778300958522602e+00 + 7 1.3647196005872582e+00 -1.0911585164842919e-02 -2.4728766688900716e+00 + 8 2.1268117755808431e+00 -4.8377867790864659e-01 -6.6939236543020009e-01 + 9 2.3696312200329155e+00 -2.5289768678866409e-01 2.7013247890776881e-01 + 10 2.8594711747100225e+00 -1.4350123226792633e+00 -9.7021676464906470e-01 + 11 2.5532443289775513e+00 -1.9872576862068678e+00 -1.8838740384483179e+00 + 12 3.9635217379835330e+00 -4.8924435877499928e-01 -1.6189692541162026e+00 + 13 4.9503584367475773e+00 -9.0139457273166190e-01 -1.6384912586716176e+00 + 14 3.5750664206295815e+00 -4.0803872746537451e-01 -2.6554873703854831e+00 + 15 4.0764547813691872e+00 5.6299041872811451e-01 -1.2434242266893492e+00 + 16 3.3613995189842241e+00 -2.3982567471675971e+00 2.3802012952565121e-02 + 17 2.9739876898393165e+00 -2.1004578429850351e+00 1.1561816587173084e+00 + 18 3.5665473800789522e+00 3.0177625268818762e+00 -3.5163131713014888e+00 + 19 2.9120485833233820e+00 2.6319115053398416e+00 -4.2466694156937299e+00 + 20 4.2804503105300098e+00 3.6828814132072907e+00 -3.9377810021400279e+00 + 21 5.3888920221233585e+00 -4.0750865391373985e+00 -3.6215170568165540e+00 + 22 4.8333506573678831e+00 -4.2055700293482774e+00 -4.4654658049884466e+00 + 23 6.2864424919236557e+00 -3.5763279841349780e+00 -3.8818746298715849e+00 + 24 3.5145091113198577e+00 3.1518029861447197e+00 3.1555424212274090e+00 + 25 2.7617682952667861e+00 3.2756497029544160e+00 2.5088355640403304e+00 + 26 4.1413763810420781e+00 4.0119956062217081e+00 3.2133311389937411e+00 + 27 -1.5160452061269085e+00 -4.3557129017570517e+00 2.1103699506125828e+00 + 28 -2.2521843265946431e+00 -4.0201760860540947e+00 1.5820385102746144e+00 + 29 -7.6525386014363050e-01 -3.5995168361531089e+00 2.2679854316440551e+00 +run_vel: ! |2 + 1 6.7780931630407504e-01 6.5014303469176576e-62 6.8248273465839962e-63 + 2 7.0961151000396472e-01 -3.9264160905484076e-62 -1.1822046620093735e-63 + 3 5.9570049921486223e-01 -2.9547821449181187e-62 4.7336139070844118e-63 + 4 6.1226658504745368e-01 -7.9436583549996351e-63 1.4410357107361889e-62 + 5 5.7516310301482443e-01 -6.4195838274523408e-62 -2.5870790439431026e-62 + 6 5.2852563135340713e-01 6.2556855957046573e-61 1.9406620253090985e-61 + 7 5.1214387866981204e-01 -9.2963001662549590e-62 -4.9505570615509555e-61 + 8 4.8059946115942748e-01 4.3526111210351096e-62 5.4731027465273473e-61 + 9 4.9599145691904600e-01 4.4007304571905192e-62 7.5828208220301433e-62 + 10 4.1726913670314936e-01 -5.3988571518366033e-61 -2.3088121550215207e-61 + 11 3.8037432529277154e-01 -2.9953971665851277e-63 1.4994282420197788e-62 + 12 4.8024212599743815e-01 -4.6757407969738463e-63 6.9823676923893615e-64 + 13 4.5276885181007781e-01 -2.7989415871388086e-62 -5.8296402738379504e-63 + 14 4.8565524766559615e-01 -6.5808298145106860e-64 -3.4430191434892509e-63 + 15 5.5039341518680573e-01 -2.0443067669577923e-62 1.4759401718211623e-62 + 16 3.5299617864387461e-01 -1.5211800996620554e-61 -5.0083797768144064e-61 + 17 3.7281209442364754e-01 1.0344500008968637e-61 3.8850729210895994e-61 + 18 7.1404109263542004e-01 5.5373757406073187e-63 -1.7780031396136914e-62 + 19 6.8831433882844717e-01 2.8478960269455498e-62 4.4432964966778687e-62 + 20 7.5839055955724788e-01 -5.0632038212910455e-62 2.6587336729621113e-62 + 21 2.4118426656574823e-01 7.0543391911012521e-63 -1.4463866091130079e-63 + 22 2.3248715482605051e-01 -5.1789592750531480e-63 -1.1855891059473135e-62 + 23 2.7443922299869911e-01 -2.2961454500243890e-62 1.7648338570244129e-62 + 24 7.2297681031070593e-01 7.6789618396059498e-63 1.0811858579676688e-62 + 25 7.3123243903912272e-01 1.3284102145767121e-62 -3.5332907038037348e-62 + 26 7.8033052946927350e-01 -4.3950911264975373e-62 -7.8541300016784545e-63 + 27 2.2247678398062801e-01 6.1067388985733226e-64 2.0614925059594874e-62 + 28 2.4483896011121670e-01 4.8137451656680968e-62 -6.8535481327337382e-62 + 29 2.7289733366797747e-01 -5.0568632527079182e-62 -1.3762170551821397e-62 +... diff --git a/unittest/force-styles/tests/fix-timestep-nvt-sllod.yaml b/unittest/force-styles/tests/fix-timestep-nvt-sllod.yaml new file mode 100644 index 0000000000..0bf10d84f9 --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-nvt-sllod.yaml @@ -0,0 +1,80 @@ +--- +lammps_version: 22 Dec 2022 +tags: generated +date_generated: Sun Jan 1 12:26:00 2023 +epsilon: 5e-12 +skip_tests: +prerequisites: ! | + atom full + fix nvt/sllod +pre_commands: ! "" +post_commands: ! | + change_box all triclinic + fix all all deform 2 xy final 2.0 remap v + fix test all nvt/sllod temp 50.0 ${t_target} 1.0 +input_file: in.fourmol +natoms: 29 +global_scalar: 9642093.286379034 +global_vector: ! |- + 12 2146.9432527203057 1072.8299693560025 35837.928137134906 9606255.358241899 0 0 0 0 0 0 0 0 +run_pos: ! |2 + 1 1.0765144559203570e+00 2.4744162491392263e+00 -1.7157063892613067e-01 + 2 1.7211771647380463e+00 2.9512205871104609e+00 -8.5721661669391658e-01 + 3 4.9635322353716571e-01 1.2425767224774784e+00 -6.2267315907425935e-01 + 4 -3.5309081191258596e-01 1.4911153640404944e+00 -1.2483861334935469e+00 + 5 2.5418659599743254e-01 9.3443983463467895e-01 4.0187830807490954e-01 + 6 1.3428231839724720e+00 2.3638965139354529e-01 -1.2778300958522602e+00 + 7 1.3647196005872582e+00 -1.0911585164842919e-02 -2.4728766688900716e+00 + 8 2.1268117755808431e+00 -4.8377867790864659e-01 -6.6939236543020009e-01 + 9 2.3696312200329155e+00 -2.5289768678866409e-01 2.7013247890776881e-01 + 10 2.8594711747100225e+00 -1.4350123226792633e+00 -9.7021676464906470e-01 + 11 2.5532443289775513e+00 -1.9872576862068678e+00 -1.8838740384483179e+00 + 12 3.9635217379835330e+00 -4.8924435877499928e-01 -1.6189692541162026e+00 + 13 4.9503584367475773e+00 -9.0139457273166190e-01 -1.6384912586716176e+00 + 14 3.5750664206295815e+00 -4.0803872746537451e-01 -2.6554873703854831e+00 + 15 4.0764547813691872e+00 5.6299041872811451e-01 -1.2434242266893492e+00 + 16 3.3613995189842241e+00 -2.3982567471675971e+00 2.3802012952565121e-02 + 17 2.9739876898393165e+00 -2.1004578429850351e+00 1.1561816587173084e+00 + 18 3.5665473800789522e+00 3.0177625268818762e+00 -3.5163131713014888e+00 + 19 2.9120485833233820e+00 2.6319115053398416e+00 -4.2466694156937299e+00 + 20 4.2804503105300098e+00 3.6828814132072907e+00 -3.9377810021400279e+00 + 21 5.3888920221233585e+00 -4.0750865391373985e+00 -3.6215170568165540e+00 + 22 4.8333506573678831e+00 -4.2055700293482774e+00 -4.4654658049884466e+00 + 23 6.2864424919236557e+00 -3.5763279841349780e+00 -3.8818746298715849e+00 + 24 3.5145091113198577e+00 3.1518029861447197e+00 3.1555424212274090e+00 + 25 2.7617682952667861e+00 3.2756497029544160e+00 2.5088355640403304e+00 + 26 4.1413763810420781e+00 4.0119956062217081e+00 3.2133311389937411e+00 + 27 -1.5160452061269085e+00 -4.3557129017570517e+00 2.1103699506125828e+00 + 28 -2.2521843265946431e+00 -4.0201760860540947e+00 1.5820385102746144e+00 + 29 -7.6525386014363050e-01 -3.5995168361531089e+00 2.2679854316440551e+00 +run_vel: ! |2 + 1 6.7780931630407504e-01 6.5014303469176576e-62 6.8248273465839962e-63 + 2 7.0961151000396472e-01 -3.9264160905484076e-62 -1.1822046620093735e-63 + 3 5.9570049921486223e-01 -2.9547821449181187e-62 4.7336139070844118e-63 + 4 6.1226658504745368e-01 -7.9436583549996351e-63 1.4410357107361889e-62 + 5 5.7516310301482443e-01 -6.4195838274523408e-62 -2.5870790439431026e-62 + 6 5.2852563135340713e-01 6.2556855957046573e-61 1.9406620253090985e-61 + 7 5.1214387866981204e-01 -9.2963001662549590e-62 -4.9505570615509555e-61 + 8 4.8059946115942748e-01 4.3526111210351096e-62 5.4731027465273473e-61 + 9 4.9599145691904600e-01 4.4007304571905192e-62 7.5828208220301433e-62 + 10 4.1726913670314936e-01 -5.3988571518366033e-61 -2.3088121550215207e-61 + 11 3.8037432529277154e-01 -2.9953971665851277e-63 1.4994282420197788e-62 + 12 4.8024212599743815e-01 -4.6757407969738463e-63 6.9823676923893615e-64 + 13 4.5276885181007781e-01 -2.7989415871388086e-62 -5.8296402738379504e-63 + 14 4.8565524766559615e-01 -6.5808298145106860e-64 -3.4430191434892509e-63 + 15 5.5039341518680573e-01 -2.0443067669577923e-62 1.4759401718211623e-62 + 16 3.5299617864387461e-01 -1.5211800996620554e-61 -5.0083797768144064e-61 + 17 3.7281209442364754e-01 1.0344500008968637e-61 3.8850729210895994e-61 + 18 7.1404109263542004e-01 5.5373757406073187e-63 -1.7780031396136914e-62 + 19 6.8831433882844717e-01 2.8478960269455498e-62 4.4432964966778687e-62 + 20 7.5839055955724788e-01 -5.0632038212910455e-62 2.6587336729621113e-62 + 21 2.4118426656574823e-01 7.0543391911012521e-63 -1.4463866091130079e-63 + 22 2.3248715482605051e-01 -5.1789592750531480e-63 -1.1855891059473135e-62 + 23 2.7443922299869911e-01 -2.2961454500243890e-62 1.7648338570244129e-62 + 24 7.2297681031070593e-01 7.6789618396059498e-63 1.0811858579676688e-62 + 25 7.3123243903912272e-01 1.3284102145767121e-62 -3.5332907038037348e-62 + 26 7.8033052946927350e-01 -4.3950911264975373e-62 -7.8541300016784545e-63 + 27 2.2247678398062801e-01 6.1067388985733226e-64 2.0614925059594874e-62 + 28 2.4483896011121670e-01 4.8137451656680968e-62 -6.8535481327337382e-62 + 29 2.7289733366797747e-01 -5.0568632527079182e-62 -1.3762170551821397e-62 +... From 9de99751c7bab05b3a2be1de90f2e21070c2130f Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Tue, 3 Jan 2023 11:18:15 -0700 Subject: [PATCH 08/11] Add missing data movement --- src/KOKKOS/fix_nvt_sllod_kokkos.cpp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/KOKKOS/fix_nvt_sllod_kokkos.cpp b/src/KOKKOS/fix_nvt_sllod_kokkos.cpp index ab799d9b6d..9cc6408f8b 100644 --- a/src/KOKKOS/fix_nvt_sllod_kokkos.cpp +++ b/src/KOKKOS/fix_nvt_sllod_kokkos.cpp @@ -117,6 +117,7 @@ void FixNVTSllodKokkos::nh_v_temp() this->temperature->compute_scalar(); atomKK->modified(this->temperature->execution_space,this->temperature->datamask_modify); } + v = atomKK->k_v.view(); mask = atomKK->k_mask.view(); int nlocal = atomKK->nlocal; @@ -130,19 +131,36 @@ void FixNVTSllodKokkos::nh_v_temp() if (vdelu.extent(0) < atomKK->nmax) vdelu = typename AT::t_v_array(Kokkos::NoInit("nvt/sllod/kk:vdelu"), atomKK->nmax); - if (!this->psllod_flag) this->temperature->remove_bias_all(); + if (!this->psllod_flag) { + atomKK->sync(this->temperature->execution_space,this->temperature->datamask_read); + this->temperature->remove_bias_all(); + atomKK->modified(this->temperature->execution_space,this->temperature->datamask_modify); + atomKK->sync(this->execution_space,this->temperature->datamask_modify); + } + + atomKK->sync(execution_space,V_MASK | MASK_MASK); this->copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); this->copymode = 0; - if (this->psllod_flag) this->temperature->remove_bias_all(); + if (this->psllod_flag) { + atomKK->sync(this->temperature->execution_space,this->temperature->datamask_read); + this->temperature->remove_bias_all(); + atomKK->modified(this->temperature->execution_space,this->temperature->datamask_modify); + } + + atomKK->sync(execution_space,V_MASK | MASK_MASK); this->copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); this->copymode = 0; - this->temperature->restore_bias_all(); + atomKK->modified(execution_space,V_MASK); + + atomKK->sync(this->temperature->execution_space,this->temperature->datamask_read); + this->temperature->restore_bias_all(); + atomKK->modified(this->temperature->execution_space,this->temperature->datamask_modify); } template @@ -172,4 +190,3 @@ template class FixNVTSllodKokkos; #endif } - From 4a248798d513fd8af51a74af945344fe1a073415 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Tue, 3 Jan 2023 11:24:41 -0700 Subject: [PATCH 09/11] Fix compile error --- src/KOKKOS/fix_nvt_sllod_kokkos.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/KOKKOS/fix_nvt_sllod_kokkos.cpp b/src/KOKKOS/fix_nvt_sllod_kokkos.cpp index 9cc6408f8b..cd08958ad4 100644 --- a/src/KOKKOS/fix_nvt_sllod_kokkos.cpp +++ b/src/KOKKOS/fix_nvt_sllod_kokkos.cpp @@ -135,10 +135,9 @@ void FixNVTSllodKokkos::nh_v_temp() atomKK->sync(this->temperature->execution_space,this->temperature->datamask_read); this->temperature->remove_bias_all(); atomKK->modified(this->temperature->execution_space,this->temperature->datamask_modify); - atomKK->sync(this->execution_space,this->temperature->datamask_modify); } - atomKK->sync(execution_space,V_MASK | MASK_MASK); + atomKK->sync(this->execution_space,V_MASK | MASK_MASK); this->copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); @@ -150,13 +149,13 @@ void FixNVTSllodKokkos::nh_v_temp() atomKK->modified(this->temperature->execution_space,this->temperature->datamask_modify); } - atomKK->sync(execution_space,V_MASK | MASK_MASK); + atomKK->sync(this->execution_space,V_MASK | MASK_MASK); this->copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); this->copymode = 0; - atomKK->modified(execution_space,V_MASK); + atomKK->modified(this->execution_space,V_MASK); atomKK->sync(this->temperature->execution_space,this->temperature->datamask_read); this->temperature->restore_bias_all(); From 6a20e35edf1928dd319751c1beee909098846e4f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 3 Jan 2023 17:23:40 -0500 Subject: [PATCH 10/11] update unit test inputs --- .../tests/fix-timestep-nvt-psllod.yaml | 128 ++++++++--------- .../tests/fix-timestep-nvt-sllod.yaml | 130 +++++++++--------- 2 files changed, 131 insertions(+), 127 deletions(-) diff --git a/unittest/force-styles/tests/fix-timestep-nvt-psllod.yaml b/unittest/force-styles/tests/fix-timestep-nvt-psllod.yaml index acb7003210..19d87b696b 100644 --- a/unittest/force-styles/tests/fix-timestep-nvt-psllod.yaml +++ b/unittest/force-styles/tests/fix-timestep-nvt-psllod.yaml @@ -1,7 +1,6 @@ --- lammps_version: 22 Dec 2022 -tags: generated -date_generated: Sun Jan 1 12:26:05 2023 +date_generated: Tue Jan 3 17:19:09 2023 epsilon: 5e-12 skip_tests: prerequisites: ! | @@ -10,71 +9,74 @@ prerequisites: ! | pre_commands: ! "" post_commands: ! | change_box all triclinic - fix all all deform 2 xy final 2.0 remap v + variable gamma index 0.05 + variable vx atom y*${gamma} + if $(step)==0 then "velocity all set v_vx NULL NULL sum yes" + fix all all deform 2 xy erate ${gamma} remap v fix test all nvt/sllod temp 50.0 ${t_target} 1.0 psllod yes input_file: in.fourmol natoms: 29 -global_scalar: 9642093.286379034 +global_scalar: 2854867.1697558644 global_vector: ! |- - 12 2146.9432527203057 1072.8299693560025 35837.928137134906 9606255.358241899 0 0 0 0 0 0 0 0 + 12 1167.0668964303359 582.8541838571305 19481.306509850383 2835385.863246014 0 0 0 0 0 0 0 0 run_pos: ! |2 - 1 1.0765144559203570e+00 2.4744162491392263e+00 -1.7157063892613067e-01 - 2 1.7211771647380463e+00 2.9512205871104609e+00 -8.5721661669391658e-01 - 3 4.9635322353716571e-01 1.2425767224774784e+00 -6.2267315907425935e-01 - 4 -3.5309081191258596e-01 1.4911153640404944e+00 -1.2483861334935469e+00 - 5 2.5418659599743254e-01 9.3443983463467895e-01 4.0187830807490954e-01 - 6 1.3428231839724720e+00 2.3638965139354529e-01 -1.2778300958522602e+00 - 7 1.3647196005872582e+00 -1.0911585164842919e-02 -2.4728766688900716e+00 - 8 2.1268117755808431e+00 -4.8377867790864659e-01 -6.6939236543020009e-01 - 9 2.3696312200329155e+00 -2.5289768678866409e-01 2.7013247890776881e-01 - 10 2.8594711747100225e+00 -1.4350123226792633e+00 -9.7021676464906470e-01 - 11 2.5532443289775513e+00 -1.9872576862068678e+00 -1.8838740384483179e+00 - 12 3.9635217379835330e+00 -4.8924435877499928e-01 -1.6189692541162026e+00 - 13 4.9503584367475773e+00 -9.0139457273166190e-01 -1.6384912586716176e+00 - 14 3.5750664206295815e+00 -4.0803872746537451e-01 -2.6554873703854831e+00 - 15 4.0764547813691872e+00 5.6299041872811451e-01 -1.2434242266893492e+00 - 16 3.3613995189842241e+00 -2.3982567471675971e+00 2.3802012952565121e-02 - 17 2.9739876898393165e+00 -2.1004578429850351e+00 1.1561816587173084e+00 - 18 3.5665473800789522e+00 3.0177625268818762e+00 -3.5163131713014888e+00 - 19 2.9120485833233820e+00 2.6319115053398416e+00 -4.2466694156937299e+00 - 20 4.2804503105300098e+00 3.6828814132072907e+00 -3.9377810021400279e+00 - 21 5.3888920221233585e+00 -4.0750865391373985e+00 -3.6215170568165540e+00 - 22 4.8333506573678831e+00 -4.2055700293482774e+00 -4.4654658049884466e+00 - 23 6.2864424919236557e+00 -3.5763279841349780e+00 -3.8818746298715849e+00 - 24 3.5145091113198577e+00 3.1518029861447197e+00 3.1555424212274090e+00 - 25 2.7617682952667861e+00 3.2756497029544160e+00 2.5088355640403304e+00 - 26 4.1413763810420781e+00 4.0119956062217081e+00 3.2133311389937411e+00 - 27 -1.5160452061269085e+00 -4.3557129017570517e+00 2.1103699506125828e+00 - 28 -2.2521843265946431e+00 -4.0201760860540947e+00 1.5820385102746144e+00 - 29 -7.6525386014363050e-01 -3.5995168361531089e+00 2.2679854316440551e+00 + 1 7.3766923105571358e-01 2.4745425115631381e+00 -1.7150321559212145e-01 + 2 1.3664612528682669e+00 2.9513079914030929e+00 -8.5728427260886253e-01 + 3 1.9844034438342817e-01 1.2423847783028510e+00 -6.2275616693380798e-01 + 4 -6.5919858368017614e-01 1.4910537181348680e+00 -1.2483715460591922e+00 + 5 -3.3421547180145339e-02 9.3441475316631362e-01 4.0189034091250875e-01 + 6 1.0791403982726226e+00 2.3587900895167735e-01 -1.2773831741505397e+00 + 7 1.1086458909800943e+00 -1.0907385860336127e-02 -2.4728565776108500e+00 + 8 1.8864879896626023e+00 -4.8393570832815591e-01 -6.6998265853493333e-01 + 9 2.1216439487920260e+00 -2.5289625793938608e-01 2.7015879660912390e-01 + 10 2.6502404066034719e+00 -1.4343374038132586e+00 -9.6995371157599219e-01 + 11 2.3630358464762002e+00 -1.9872831599030887e+00 -1.8838953155606841e+00 + 12 3.7234311952442782e+00 -4.8922907163933527e-01 -1.6189953186835542e+00 + 13 4.7239138043397295e+00 -9.0130311982189415e-01 -1.6384795118705959e+00 + 14 3.3322391969848182e+00 -4.0806672377347741e-01 -2.6554845853739399e+00 + 15 3.8013299252875621e+00 5.6299116229155821e-01 -1.2434058969031581e+00 + 16 3.1848210365073433e+00 -2.3981796396728949e+00 2.3939136626907498e-02 + 17 2.7876270656144042e+00 -2.1004939222590853e+00 1.1560660679674388e+00 + 18 3.2095148146891033e+00 3.0177491615332581e+00 -3.5162947400390170e+00 + 19 2.5678305107909827e+00 2.6318700691921251e+00 -4.2467067539085264e+00 + 20 3.9013627348415882e+00 3.6829761983330425e+00 -3.9378172327571779e+00 + 21 5.2682659583371061e+00 -4.0751064692764150e+00 -3.6215029530747600e+00 + 22 4.7170760198580988e+00 -4.2055811767551088e+00 -4.4654878517895158e+00 + 23 6.1493858803934662e+00 -3.5762372876530470e+00 -3.8819088926442529e+00 + 24 3.1529793979324401e+00 3.1517692477958761e+00 3.1555262612569699e+00 + 25 2.3961773755311784e+00 3.2756195279484714e+00 2.5088714725751604e+00 + 26 3.7513477858704301e+00 4.0121604598214713e+00 3.2133597352292220e+00 + 27 -1.6273511722770202e+00 -4.3557333906459954e+00 2.1103388391541440e+00 + 28 -2.3744938524038011e+00 -4.0202427421428917e+00 1.5821223930194463e+00 + 29 -9.0154250196648267e-01 -3.5993683848967324e+00 2.2680257402204091e+00 run_vel: ! |2 - 1 6.7780931630407504e-01 6.5014303469176576e-62 6.8248273465839962e-63 - 2 7.0961151000396472e-01 -3.9264160905484076e-62 -1.1822046620093735e-63 - 3 5.9570049921486223e-01 -2.9547821449181187e-62 4.7336139070844118e-63 - 4 6.1226658504745368e-01 -7.9436583549996351e-63 1.4410357107361889e-62 - 5 5.7516310301482443e-01 -6.4195838274523408e-62 -2.5870790439431026e-62 - 6 5.2852563135340713e-01 6.2556855957046573e-61 1.9406620253090985e-61 - 7 5.1214387866981204e-01 -9.2963001662549590e-62 -4.9505570615509555e-61 - 8 4.8059946115942748e-01 4.3526111210351096e-62 5.4731027465273473e-61 - 9 4.9599145691904600e-01 4.4007304571905192e-62 7.5828208220301433e-62 - 10 4.1726913670314936e-01 -5.3988571518366033e-61 -2.3088121550215207e-61 - 11 3.8037432529277154e-01 -2.9953971665851277e-63 1.4994282420197788e-62 - 12 4.8024212599743815e-01 -4.6757407969738463e-63 6.9823676923893615e-64 - 13 4.5276885181007781e-01 -2.7989415871388086e-62 -5.8296402738379504e-63 - 14 4.8565524766559615e-01 -6.5808298145106860e-64 -3.4430191434892509e-63 - 15 5.5039341518680573e-01 -2.0443067669577923e-62 1.4759401718211623e-62 - 16 3.5299617864387461e-01 -1.5211800996620554e-61 -5.0083797768144064e-61 - 17 3.7281209442364754e-01 1.0344500008968637e-61 3.8850729210895994e-61 - 18 7.1404109263542004e-01 5.5373757406073187e-63 -1.7780031396136914e-62 - 19 6.8831433882844717e-01 2.8478960269455498e-62 4.4432964966778687e-62 - 20 7.5839055955724788e-01 -5.0632038212910455e-62 2.6587336729621113e-62 - 21 2.4118426656574823e-01 7.0543391911012521e-63 -1.4463866091130079e-63 - 22 2.3248715482605051e-01 -5.1789592750531480e-63 -1.1855891059473135e-62 - 23 2.7443922299869911e-01 -2.2961454500243890e-62 1.7648338570244129e-62 - 24 7.2297681031070593e-01 7.6789618396059498e-63 1.0811858579676688e-62 - 25 7.3123243903912272e-01 1.3284102145767121e-62 -3.5332907038037348e-62 - 26 7.8033052946927350e-01 -4.3950911264975373e-62 -7.8541300016784545e-63 - 27 2.2247678398062801e-01 6.1067388985733226e-64 2.0614925059594874e-62 - 28 2.4483896011121670e-01 4.8137451656680968e-62 -6.8535481327337382e-62 - 29 2.7289733366797747e-01 -5.0568632527079182e-62 -1.3762170551821397e-62 + 1 5.0836177409811223e-01 3.1370612048802763e-35 5.6842516004313395e-36 + 2 5.3221189005127478e-01 -1.1568811919842230e-35 -3.5425288652190980e-36 + 3 4.4676818218962833e-01 -2.0462738591065681e-35 -1.9816457116709468e-36 + 4 4.5919768180460213e-01 -6.1493933436381889e-36 6.5001492988802745e-36 + 5 4.3137141867770246e-01 -2.6763870980544101e-35 -9.6990952860385141e-36 + 6 3.9637638800124680e-01 2.2068966032648931e-34 1.0145991376231060e-34 + 7 3.8410804818903493e-01 -3.6686393855848731e-35 -1.9564741985042386e-34 + 8 3.6044445720876200e-01 7.4601232742643210e-36 1.8489721871948319e-34 + 9 3.7199364832455928e-01 1.7545603923683604e-35 3.1265484809293659e-35 + 10 3.1297495052774027e-01 -1.7593806209949413e-34 -7.7046944954625270e-35 + 11 2.8527982378990069e-01 -2.4721798297694001e-36 4.9188732460764729e-36 + 12 3.6018219953618469e-01 -1.2804205152436534e-36 -9.3769006282735508e-37 + 13 3.3957996710649124e-01 -6.6106246330704225e-36 -1.7427644528182118e-36 + 14 3.6424039896494054e-01 -1.5778843791068475e-36 -1.2101058571618634e-36 + 15 4.1279504160528241e-01 -7.9174244692607290e-36 6.7664714295642654e-36 + 16 2.6474997690126106e-01 -5.6779741842920302e-35 -1.9293097988877318e-34 + 17 2.7960772444465343e-01 3.9449292471834482e-35 1.4916612742698992e-34 + 18 5.3553032772200015e-01 1.5604831891093189e-36 -6.1723357450219555e-36 + 19 5.1623422200556024e-01 9.3604554340506648e-36 1.5850254034795202e-35 + 20 5.6879641471194298e-01 -1.5609359591659303e-35 8.8070498729597009e-36 + 21 1.8088744775485388e-01 1.9173821972353103e-36 6.7827061363565996e-38 + 22 1.7436495263537166e-01 -2.5798299640495988e-36 -5.7654851673571996e-36 + 23 2.0583283295383026e-01 -5.0667978738978151e-36 5.5016847005387114e-36 + 24 5.4223134481326019e-01 1.5141491823979144e-36 3.5248099786960212e-36 + 25 5.4842320602394556e-01 3.8812169659023934e-36 -1.2261583985187966e-35 + 26 5.8525406175525085e-01 -9.9308682506483793e-36 -1.8201170311975618e-36 + 27 1.6685679719496241e-01 -6.0455970911467563e-37 6.6604942772249726e-36 + 28 1.8362680298442527e-01 1.5809202035279489e-35 -2.2926494732590911e-35 + 29 2.0467857431672881e-01 -1.3393001700153206e-35 -3.6636010064204463e-36 ... diff --git a/unittest/force-styles/tests/fix-timestep-nvt-sllod.yaml b/unittest/force-styles/tests/fix-timestep-nvt-sllod.yaml index 0bf10d84f9..16199d6216 100644 --- a/unittest/force-styles/tests/fix-timestep-nvt-sllod.yaml +++ b/unittest/force-styles/tests/fix-timestep-nvt-sllod.yaml @@ -1,7 +1,6 @@ --- lammps_version: 22 Dec 2022 -tags: generated -date_generated: Sun Jan 1 12:26:00 2023 +date_generated: Tue Jan 3 17:19:09 2023 epsilon: 5e-12 skip_tests: prerequisites: ! | @@ -10,71 +9,74 @@ prerequisites: ! | pre_commands: ! "" post_commands: ! | change_box all triclinic - fix all all deform 2 xy final 2.0 remap v - fix test all nvt/sllod temp 50.0 ${t_target} 1.0 + variable gamma index 0.05 + variable vx atom y*${gamma} + if $(step)==0 then "velocity all set v_vx NULL NULL sum yes" + fix all all deform 2 xy erate ${gamma} remap v + fix test all nvt/sllod temp 50.0 ${t_target} 1.0 psllod no input_file: in.fourmol natoms: 29 -global_scalar: 9642093.286379034 +global_scalar: 2854867.1697558644 global_vector: ! |- - 12 2146.9432527203057 1072.8299693560025 35837.928137134906 9606255.358241899 0 0 0 0 0 0 0 0 + 12 1167.0668964303359 582.8541838571305 19481.306509850383 2835385.863246014 0 0 0 0 0 0 0 0 run_pos: ! |2 - 1 1.0765144559203570e+00 2.4744162491392263e+00 -1.7157063892613067e-01 - 2 1.7211771647380463e+00 2.9512205871104609e+00 -8.5721661669391658e-01 - 3 4.9635322353716571e-01 1.2425767224774784e+00 -6.2267315907425935e-01 - 4 -3.5309081191258596e-01 1.4911153640404944e+00 -1.2483861334935469e+00 - 5 2.5418659599743254e-01 9.3443983463467895e-01 4.0187830807490954e-01 - 6 1.3428231839724720e+00 2.3638965139354529e-01 -1.2778300958522602e+00 - 7 1.3647196005872582e+00 -1.0911585164842919e-02 -2.4728766688900716e+00 - 8 2.1268117755808431e+00 -4.8377867790864659e-01 -6.6939236543020009e-01 - 9 2.3696312200329155e+00 -2.5289768678866409e-01 2.7013247890776881e-01 - 10 2.8594711747100225e+00 -1.4350123226792633e+00 -9.7021676464906470e-01 - 11 2.5532443289775513e+00 -1.9872576862068678e+00 -1.8838740384483179e+00 - 12 3.9635217379835330e+00 -4.8924435877499928e-01 -1.6189692541162026e+00 - 13 4.9503584367475773e+00 -9.0139457273166190e-01 -1.6384912586716176e+00 - 14 3.5750664206295815e+00 -4.0803872746537451e-01 -2.6554873703854831e+00 - 15 4.0764547813691872e+00 5.6299041872811451e-01 -1.2434242266893492e+00 - 16 3.3613995189842241e+00 -2.3982567471675971e+00 2.3802012952565121e-02 - 17 2.9739876898393165e+00 -2.1004578429850351e+00 1.1561816587173084e+00 - 18 3.5665473800789522e+00 3.0177625268818762e+00 -3.5163131713014888e+00 - 19 2.9120485833233820e+00 2.6319115053398416e+00 -4.2466694156937299e+00 - 20 4.2804503105300098e+00 3.6828814132072907e+00 -3.9377810021400279e+00 - 21 5.3888920221233585e+00 -4.0750865391373985e+00 -3.6215170568165540e+00 - 22 4.8333506573678831e+00 -4.2055700293482774e+00 -4.4654658049884466e+00 - 23 6.2864424919236557e+00 -3.5763279841349780e+00 -3.8818746298715849e+00 - 24 3.5145091113198577e+00 3.1518029861447197e+00 3.1555424212274090e+00 - 25 2.7617682952667861e+00 3.2756497029544160e+00 2.5088355640403304e+00 - 26 4.1413763810420781e+00 4.0119956062217081e+00 3.2133311389937411e+00 - 27 -1.5160452061269085e+00 -4.3557129017570517e+00 2.1103699506125828e+00 - 28 -2.2521843265946431e+00 -4.0201760860540947e+00 1.5820385102746144e+00 - 29 -7.6525386014363050e-01 -3.5995168361531089e+00 2.2679854316440551e+00 + 1 7.3766923105571358e-01 2.4745425115631381e+00 -1.7150321559212145e-01 + 2 1.3664612528682669e+00 2.9513079914030929e+00 -8.5728427260886253e-01 + 3 1.9844034438342817e-01 1.2423847783028510e+00 -6.2275616693380798e-01 + 4 -6.5919858368017614e-01 1.4910537181348680e+00 -1.2483715460591922e+00 + 5 -3.3421547180145339e-02 9.3441475316631362e-01 4.0189034091250875e-01 + 6 1.0791403982726226e+00 2.3587900895167735e-01 -1.2773831741505397e+00 + 7 1.1086458909800943e+00 -1.0907385860336127e-02 -2.4728565776108500e+00 + 8 1.8864879896626023e+00 -4.8393570832815591e-01 -6.6998265853493333e-01 + 9 2.1216439487920260e+00 -2.5289625793938608e-01 2.7015879660912390e-01 + 10 2.6502404066034719e+00 -1.4343374038132586e+00 -9.6995371157599219e-01 + 11 2.3630358464762002e+00 -1.9872831599030887e+00 -1.8838953155606841e+00 + 12 3.7234311952442782e+00 -4.8922907163933527e-01 -1.6189953186835542e+00 + 13 4.7239138043397295e+00 -9.0130311982189415e-01 -1.6384795118705959e+00 + 14 3.3322391969848182e+00 -4.0806672377347741e-01 -2.6554845853739399e+00 + 15 3.8013299252875621e+00 5.6299116229155821e-01 -1.2434058969031581e+00 + 16 3.1848210365073433e+00 -2.3981796396728949e+00 2.3939136626907498e-02 + 17 2.7876270656144042e+00 -2.1004939222590853e+00 1.1560660679674388e+00 + 18 3.2095148146891033e+00 3.0177491615332581e+00 -3.5162947400390170e+00 + 19 2.5678305107909827e+00 2.6318700691921251e+00 -4.2467067539085264e+00 + 20 3.9013627348415882e+00 3.6829761983330425e+00 -3.9378172327571779e+00 + 21 5.2682659583371061e+00 -4.0751064692764150e+00 -3.6215029530747600e+00 + 22 4.7170760198580988e+00 -4.2055811767551088e+00 -4.4654878517895158e+00 + 23 6.1493858803934662e+00 -3.5762372876530470e+00 -3.8819088926442529e+00 + 24 3.1529793979324401e+00 3.1517692477958761e+00 3.1555262612569699e+00 + 25 2.3961773755311784e+00 3.2756195279484714e+00 2.5088714725751604e+00 + 26 3.7513477858704301e+00 4.0121604598214713e+00 3.2133597352292220e+00 + 27 -1.6273511722770202e+00 -4.3557333906459954e+00 2.1103388391541440e+00 + 28 -2.3744938524038011e+00 -4.0202427421428917e+00 1.5821223930194463e+00 + 29 -9.0154250196648267e-01 -3.5993683848967324e+00 2.2680257402204091e+00 run_vel: ! |2 - 1 6.7780931630407504e-01 6.5014303469176576e-62 6.8248273465839962e-63 - 2 7.0961151000396472e-01 -3.9264160905484076e-62 -1.1822046620093735e-63 - 3 5.9570049921486223e-01 -2.9547821449181187e-62 4.7336139070844118e-63 - 4 6.1226658504745368e-01 -7.9436583549996351e-63 1.4410357107361889e-62 - 5 5.7516310301482443e-01 -6.4195838274523408e-62 -2.5870790439431026e-62 - 6 5.2852563135340713e-01 6.2556855957046573e-61 1.9406620253090985e-61 - 7 5.1214387866981204e-01 -9.2963001662549590e-62 -4.9505570615509555e-61 - 8 4.8059946115942748e-01 4.3526111210351096e-62 5.4731027465273473e-61 - 9 4.9599145691904600e-01 4.4007304571905192e-62 7.5828208220301433e-62 - 10 4.1726913670314936e-01 -5.3988571518366033e-61 -2.3088121550215207e-61 - 11 3.8037432529277154e-01 -2.9953971665851277e-63 1.4994282420197788e-62 - 12 4.8024212599743815e-01 -4.6757407969738463e-63 6.9823676923893615e-64 - 13 4.5276885181007781e-01 -2.7989415871388086e-62 -5.8296402738379504e-63 - 14 4.8565524766559615e-01 -6.5808298145106860e-64 -3.4430191434892509e-63 - 15 5.5039341518680573e-01 -2.0443067669577923e-62 1.4759401718211623e-62 - 16 3.5299617864387461e-01 -1.5211800996620554e-61 -5.0083797768144064e-61 - 17 3.7281209442364754e-01 1.0344500008968637e-61 3.8850729210895994e-61 - 18 7.1404109263542004e-01 5.5373757406073187e-63 -1.7780031396136914e-62 - 19 6.8831433882844717e-01 2.8478960269455498e-62 4.4432964966778687e-62 - 20 7.5839055955724788e-01 -5.0632038212910455e-62 2.6587336729621113e-62 - 21 2.4118426656574823e-01 7.0543391911012521e-63 -1.4463866091130079e-63 - 22 2.3248715482605051e-01 -5.1789592750531480e-63 -1.1855891059473135e-62 - 23 2.7443922299869911e-01 -2.2961454500243890e-62 1.7648338570244129e-62 - 24 7.2297681031070593e-01 7.6789618396059498e-63 1.0811858579676688e-62 - 25 7.3123243903912272e-01 1.3284102145767121e-62 -3.5332907038037348e-62 - 26 7.8033052946927350e-01 -4.3950911264975373e-62 -7.8541300016784545e-63 - 27 2.2247678398062801e-01 6.1067388985733226e-64 2.0614925059594874e-62 - 28 2.4483896011121670e-01 4.8137451656680968e-62 -6.8535481327337382e-62 - 29 2.7289733366797747e-01 -5.0568632527079182e-62 -1.3762170551821397e-62 + 1 5.0836177409811223e-01 3.1370612048802763e-35 5.6842516004313395e-36 + 2 5.3221189005127478e-01 -1.1568811919842230e-35 -3.5425288652190980e-36 + 3 4.4676818218962833e-01 -2.0462738591065681e-35 -1.9816457116709468e-36 + 4 4.5919768180460213e-01 -6.1493933436381889e-36 6.5001492988802745e-36 + 5 4.3137141867770246e-01 -2.6763870980544101e-35 -9.6990952860385141e-36 + 6 3.9637638800124680e-01 2.2068966032648931e-34 1.0145991376231060e-34 + 7 3.8410804818903493e-01 -3.6686393855848731e-35 -1.9564741985042386e-34 + 8 3.6044445720876200e-01 7.4601232742643210e-36 1.8489721871948319e-34 + 9 3.7199364832455928e-01 1.7545603923683604e-35 3.1265484809293659e-35 + 10 3.1297495052774027e-01 -1.7593806209949413e-34 -7.7046944954625270e-35 + 11 2.8527982378990069e-01 -2.4721798297694001e-36 4.9188732460764729e-36 + 12 3.6018219953618469e-01 -1.2804205152436534e-36 -9.3769006282735508e-37 + 13 3.3957996710649124e-01 -6.6106246330704225e-36 -1.7427644528182118e-36 + 14 3.6424039896494054e-01 -1.5778843791068475e-36 -1.2101058571618634e-36 + 15 4.1279504160528241e-01 -7.9174244692607290e-36 6.7664714295642654e-36 + 16 2.6474997690126106e-01 -5.6779741842920302e-35 -1.9293097988877318e-34 + 17 2.7960772444465343e-01 3.9449292471834482e-35 1.4916612742698992e-34 + 18 5.3553032772200015e-01 1.5604831891093189e-36 -6.1723357450219555e-36 + 19 5.1623422200556024e-01 9.3604554340506648e-36 1.5850254034795202e-35 + 20 5.6879641471194298e-01 -1.5609359591659303e-35 8.8070498729597009e-36 + 21 1.8088744775485388e-01 1.9173821972353103e-36 6.7827061363565996e-38 + 22 1.7436495263537166e-01 -2.5798299640495988e-36 -5.7654851673571996e-36 + 23 2.0583283295383026e-01 -5.0667978738978151e-36 5.5016847005387114e-36 + 24 5.4223134481326019e-01 1.5141491823979144e-36 3.5248099786960212e-36 + 25 5.4842320602394556e-01 3.8812169659023934e-36 -1.2261583985187966e-35 + 26 5.8525406175525085e-01 -9.9308682506483793e-36 -1.8201170311975618e-36 + 27 1.6685679719496241e-01 -6.0455970911467563e-37 6.6604942772249726e-36 + 28 1.8362680298442527e-01 1.5809202035279489e-35 -2.2926494732590911e-35 + 29 2.0467857431672881e-01 -1.3393001700153206e-35 -3.6636010064204463e-36 ... From 17e949df55d0c7fd5aa400a5d7671c9cc5189bbb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 4 Jan 2023 06:12:26 -0500 Subject: [PATCH 11/11] whitespace --- src/KOKKOS/fix_nvt_sllod_kokkos.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/KOKKOS/fix_nvt_sllod_kokkos.cpp b/src/KOKKOS/fix_nvt_sllod_kokkos.cpp index cd08958ad4..12b1e8f322 100644 --- a/src/KOKKOS/fix_nvt_sllod_kokkos.cpp +++ b/src/KOKKOS/fix_nvt_sllod_kokkos.cpp @@ -145,7 +145,7 @@ void FixNVTSllodKokkos::nh_v_temp() if (this->psllod_flag) { atomKK->sync(this->temperature->execution_space,this->temperature->datamask_read); - this->temperature->remove_bias_all(); + this->temperature->remove_bias_all(); atomKK->modified(this->temperature->execution_space,this->temperature->datamask_modify); } @@ -158,7 +158,7 @@ void FixNVTSllodKokkos::nh_v_temp() atomKK->modified(this->execution_space,V_MASK); atomKK->sync(this->temperature->execution_space,this->temperature->datamask_read); - this->temperature->restore_bias_all(); + this->temperature->restore_bias_all(); atomKK->modified(this->temperature->execution_space,this->temperature->datamask_modify); }