diff --git a/src/CLASS2/pair_lj_class2.cpp b/src/CLASS2/pair_lj_class2.cpp index 79e0c02fd7..3727b17493 100644 --- a/src/CLASS2/pair_lj_class2.cpp +++ b/src/CLASS2/pair_lj_class2.cpp @@ -35,7 +35,7 @@ PairLJClass2::PairLJClass2(LAMMPS *lmp) : Pair(lmp) { respa_enable = 1; writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/CLASS2/pair_lj_class2_coul_cut.cpp b/src/CLASS2/pair_lj_class2_coul_cut.cpp index c27dd0aee3..a767b70e82 100644 --- a/src/CLASS2/pair_lj_class2_coul_cut.cpp +++ b/src/CLASS2/pair_lj_class2_coul_cut.cpp @@ -33,7 +33,7 @@ using namespace MathConst; PairLJClass2CoulCut::PairLJClass2CoulCut(LAMMPS *lmp) : Pair(lmp) { writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index ab726c8a28..eb54d1d4e5 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -41,7 +41,7 @@ PairPython::PairPython(LAMMPS *lmp) : Pair(lmp) { one_coeff = 1; reinitflag = 0; cut_global = 0.0; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; py_potential = nullptr; skip_types = nullptr; diff --git a/src/USER-FEP/pair_coul_cut_soft.cpp b/src/USER-FEP/pair_coul_cut_soft.cpp index 3540fb0504..0928e18d6a 100644 --- a/src/USER-FEP/pair_coul_cut_soft.cpp +++ b/src/USER-FEP/pair_coul_cut_soft.cpp @@ -33,7 +33,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ PairCoulCutSoft::PairCoulCutSoft(LAMMPS *lmp) : Pair(lmp) { - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/USER-FEP/pair_lj_class2_coul_cut_soft.cpp b/src/USER-FEP/pair_lj_class2_coul_cut_soft.cpp index 7e9f210905..8b462b0ac7 100644 --- a/src/USER-FEP/pair_lj_class2_coul_cut_soft.cpp +++ b/src/USER-FEP/pair_lj_class2_coul_cut_soft.cpp @@ -33,7 +33,7 @@ using namespace MathConst; PairLJClass2CoulCutSoft::PairLJClass2CoulCutSoft(LAMMPS *lmp) : Pair(lmp) { writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/USER-FEP/pair_lj_class2_soft.cpp b/src/USER-FEP/pair_lj_class2_soft.cpp index 716bf890cf..df8d1aaab6 100644 --- a/src/USER-FEP/pair_lj_class2_soft.cpp +++ b/src/USER-FEP/pair_lj_class2_soft.cpp @@ -32,7 +32,7 @@ using namespace MathConst; PairLJClass2Soft::PairLJClass2Soft(LAMMPS *lmp) : Pair(lmp) { writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp b/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp index f776944ee3..f69ea9a5d9 100644 --- a/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp @@ -37,7 +37,7 @@ using namespace MathConst; PairLJCutCoulCutSoft::PairLJCutCoulCutSoft(LAMMPS *lmp) : Pair(lmp) { writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/USER-FEP/pair_lj_cut_soft.cpp b/src/USER-FEP/pair_lj_cut_soft.cpp index 6d292acbb3..c3574746e2 100644 --- a/src/USER-FEP/pair_lj_cut_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_soft.cpp @@ -43,7 +43,7 @@ PairLJCutSoft::PairLJCutSoft(LAMMPS *lmp) : Pair(lmp) respa_enable = 1; writedata = 1; allocated = 0; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair.cpp b/src/pair.cpp index ca738c46e7..0627939eff 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -812,13 +812,13 @@ void Pair::ev_setup(int eflag, int vflag, int alloc) cvflag_atom = 0; if (vflag & VIRIAL_CENTROID) { - if (centroidstressflag & 2) { + if (centroidstressflag & CENTROID_AVAIL) { cvflag_atom = 1; } else { vflag_atom = 1; } // extra check, because both bits might be set - if (centroidstressflag & 1) vflag_atom = 1; + if (centroidstressflag & CENTROID_SAME) vflag_atom = 1; } vflag_either = vflag_global || vflag_atom; diff --git a/src/pair_beck.cpp b/src/pair_beck.cpp index bfd39a56e5..6a5875e59b 100644 --- a/src/pair_beck.cpp +++ b/src/pair_beck.cpp @@ -33,7 +33,7 @@ using namespace MathSpecial; /* ---------------------------------------------------------------------- */ PairBeck::PairBeck(LAMMPS *lmp) : Pair(lmp) { - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_buck.cpp b/src/pair_buck.cpp index 1954ae2891..d829495495 100644 --- a/src/pair_buck.cpp +++ b/src/pair_buck.cpp @@ -32,7 +32,7 @@ using namespace MathConst; PairBuck::PairBuck(LAMMPS *lmp) : Pair(lmp) { writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_buck_coul_cut.cpp b/src/pair_buck_coul_cut.cpp index 0940a3232a..65925f0b33 100644 --- a/src/pair_buck_coul_cut.cpp +++ b/src/pair_buck_coul_cut.cpp @@ -36,7 +36,7 @@ using namespace MathConst; PairBuckCoulCut::PairBuckCoulCut(LAMMPS *lmp) : Pair(lmp) { writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_coul_cut.cpp b/src/pair_coul_cut.cpp index c50cc75c0c..a3653920be 100644 --- a/src/pair_coul_cut.cpp +++ b/src/pair_coul_cut.cpp @@ -29,7 +29,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ PairCoulCut::PairCoulCut(LAMMPS *lmp) : Pair(lmp) { - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_coul_dsf.cpp b/src/pair_coul_dsf.cpp index 889f2757aa..f9be4eac96 100644 --- a/src/pair_coul_dsf.cpp +++ b/src/pair_coul_dsf.cpp @@ -44,7 +44,7 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ PairCoulDSF::PairCoulDSF(LAMMPS *lmp) : Pair(lmp) { - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_coul_wolf.cpp b/src/pair_coul_wolf.cpp index df22b5a67d..57acf90153 100644 --- a/src/pair_coul_wolf.cpp +++ b/src/pair_coul_wolf.cpp @@ -36,7 +36,7 @@ using namespace MathConst; PairCoulWolf::PairCoulWolf(LAMMPS *lmp) : Pair(lmp) { single_enable = 0; // NOTE: single() method below is not yet correct - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index 8e69deb21a..1c3ef45307 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -45,7 +45,7 @@ PairHybrid::PairHybrid(LAMMPS *lmp) : Pair(lmp), // assume pair hybrid always supports centroid atomic stress, // so that cflag_atom gets set when needed - centroidstressflag = 2; + centroidstressflag = CENTROID_AVAIL; } /* ---------------------------------------------------------------------- */ @@ -168,7 +168,7 @@ void PairHybrid::compute(int eflag, int vflag) if (cvflag_atom) { n = atom->nlocal; if (force->newton_pair) n += atom->nghost; - if (styles[m]->centroidstressflag & 2) { + if (styles[m]->centroidstressflag & CENTROID_AVAIL) { double **cvatom_substyle = styles[m]->cvatom; for (i = 0; i < n; i++) for (j = 0; j < 9; j++) @@ -401,7 +401,7 @@ void PairHybrid::flags() if (styles[m]->dispersionflag) dispersionflag = 1; if (styles[m]->tip4pflag) tip4pflag = 1; if (styles[m]->compute_flag) compute_flag = 1; - if (styles[m]->centroidstressflag & 4) centroidstressflag |= 4; + if (styles[m]->centroidstressflag & CENTROID_NOTAVAIL) centroidstressflag |= CENTROID_NOTAVAIL; } single_enable = (single_enable == nstyles) ? 1 : 0; respa_enable = (respa_enable == nstyles) ? 1 : 0; diff --git a/src/pair_lj_cubic.cpp b/src/pair_lj_cubic.cpp index 73e99d5ff8..5dd64ff6ae 100644 --- a/src/pair_lj_cubic.cpp +++ b/src/pair_lj_cubic.cpp @@ -33,7 +33,7 @@ using namespace PairLJCubicConstants; /* ---------------------------------------------------------------------- */ PairLJCubic::PairLJCubic(LAMMPS *lmp) : Pair(lmp) { - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_lj_cut.cpp b/src/pair_lj_cut.cpp index cdd9167b65..c68c106156 100644 --- a/src/pair_lj_cut.cpp +++ b/src/pair_lj_cut.cpp @@ -41,7 +41,7 @@ PairLJCut::PairLJCut(LAMMPS *lmp) : Pair(lmp) { respa_enable = 1; writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_lj_cut_coul_cut.cpp b/src/pair_lj_cut_coul_cut.cpp index 2b164ede1d..97e26e78b8 100644 --- a/src/pair_lj_cut_coul_cut.cpp +++ b/src/pair_lj_cut_coul_cut.cpp @@ -33,7 +33,7 @@ using namespace MathConst; PairLJCutCoulCut::PairLJCutCoulCut(LAMMPS *lmp) : Pair(lmp) { writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_lj_cut_coul_dsf.cpp b/src/pair_lj_cut_coul_dsf.cpp index d1989ba020..7d238aa720 100644 --- a/src/pair_lj_cut_coul_dsf.cpp +++ b/src/pair_lj_cut_coul_dsf.cpp @@ -46,7 +46,7 @@ using namespace MathConst; PairLJCutCoulDSF::PairLJCutCoulDSF(LAMMPS *lmp) : Pair(lmp) { single_enable = 0; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_lj_cut_coul_wolf.cpp b/src/pair_lj_cut_coul_wolf.cpp index 540cb5c959..0b9a3abce1 100644 --- a/src/pair_lj_cut_coul_wolf.cpp +++ b/src/pair_lj_cut_coul_wolf.cpp @@ -37,7 +37,7 @@ PairLJCutCoulWolf::PairLJCutCoulWolf(LAMMPS *lmp) : Pair(lmp) { single_enable = 0; writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_lj_expand.cpp b/src/pair_lj_expand.cpp index 6cb13f7390..d22d7335db 100644 --- a/src/pair_lj_expand.cpp +++ b/src/pair_lj_expand.cpp @@ -32,7 +32,7 @@ using namespace MathConst; PairLJExpand::PairLJExpand(LAMMPS *lmp) : Pair(lmp) { writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_lj_gromacs_coul_gromacs.cpp b/src/pair_lj_gromacs_coul_gromacs.cpp index 30dc5b67fd..f9726dc3d3 100644 --- a/src/pair_lj_gromacs_coul_gromacs.cpp +++ b/src/pair_lj_gromacs_coul_gromacs.cpp @@ -34,7 +34,7 @@ using namespace LAMMPS_NS; PairLJGromacsCoulGromacs::PairLJGromacsCoulGromacs(LAMMPS *lmp) : Pair(lmp) { writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_lj_smooth.cpp b/src/pair_lj_smooth.cpp index b6d4526f77..9f51627a19 100644 --- a/src/pair_lj_smooth.cpp +++ b/src/pair_lj_smooth.cpp @@ -33,7 +33,7 @@ using namespace LAMMPS_NS; PairLJSmooth::PairLJSmooth(LAMMPS *lmp) : Pair(lmp) { writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_lj_smooth_linear.cpp b/src/pair_lj_smooth_linear.cpp index 2b494b14e7..6c7d678842 100644 --- a/src/pair_lj_smooth_linear.cpp +++ b/src/pair_lj_smooth_linear.cpp @@ -32,7 +32,7 @@ using namespace LAMMPS_NS; PairLJSmoothLinear::PairLJSmoothLinear(LAMMPS *lmp) : Pair(lmp) { single_hessian_enable = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_morse.cpp b/src/pair_morse.cpp index 3ec3db1e2b..08247c51d4 100644 --- a/src/pair_morse.cpp +++ b/src/pair_morse.cpp @@ -30,7 +30,7 @@ using namespace LAMMPS_NS; PairMorse::PairMorse(LAMMPS *lmp) : Pair(lmp) { writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_ufm.cpp b/src/pair_ufm.cpp index 45dcf3fbe2..ec570c0119 100644 --- a/src/pair_ufm.cpp +++ b/src/pair_ufm.cpp @@ -36,7 +36,7 @@ using namespace LAMMPS_NS; PairUFM::PairUFM(LAMMPS *lmp) : Pair(lmp) { writedata = 1; - centroidstressflag = 1; + centroidstressflag = CENTROID_SAME; } /* ---------------------------------------------------------------------- */