Merge pull request #3684 from jrgissing/encode_improper_symmetries
Encode improper symmetries
This commit is contained in:
@ -36,6 +36,10 @@ using namespace MathConst;
|
||||
ImproperAmoeba::ImproperAmoeba(LAMMPS *lmp) : Improper(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
|
||||
// the second atom in the quadruplet is the atom of symmetry
|
||||
|
||||
symmatoms[1] = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -39,6 +39,10 @@ using namespace MathConst;
|
||||
ImproperClass2::ImproperClass2(LAMMPS *lmp) : Improper(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
|
||||
// the second atom in the quadruplet is the atom of symmetry
|
||||
|
||||
symmatoms[1] = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -37,7 +37,12 @@ using namespace MathConst;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ImproperCossq::ImproperCossq(LAMMPS *lmp) : Improper(lmp) {}
|
||||
ImproperCossq::ImproperCossq(LAMMPS *lmp) : Improper(lmp)
|
||||
{
|
||||
// the first atom in the quadruplet is the atom of symmetry
|
||||
|
||||
symmatoms[0] = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -35,7 +35,12 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ImproperDistance::ImproperDistance(LAMMPS *lmp) : Improper(lmp) {}
|
||||
ImproperDistance::ImproperDistance(LAMMPS *lmp) : Improper(lmp)
|
||||
{
|
||||
// the first atom in the quadruplet is the atom of symmetry
|
||||
|
||||
symmatoms[0] = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -35,7 +35,13 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ImproperFourier::ImproperFourier(LAMMPS *lmp) : Improper(lmp) {}
|
||||
ImproperFourier::ImproperFourier(LAMMPS *lmp) : Improper(lmp)
|
||||
{
|
||||
// the first and fourth atoms in the quadruplet are the atoms of symmetry
|
||||
|
||||
symmatoms[0] = 1;
|
||||
symmatoms[3] = 2;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -59,7 +59,12 @@ using namespace MathSpecial;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ImproperRing::ImproperRing(LAMMPS *lmp) : Improper(lmp) {}
|
||||
ImproperRing::ImproperRing(LAMMPS *lmp) : Improper(lmp)
|
||||
{
|
||||
// the second atom in the quadruplet is the atom of symmetry
|
||||
|
||||
symmatoms[1] = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -43,6 +43,10 @@ using namespace MathConst;
|
||||
ImproperInversionHarmonic::ImproperInversionHarmonic(LAMMPS *lmp) : Improper(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
|
||||
// the first atom in the quadruplet is the atom of symmetry
|
||||
|
||||
symmatoms[0] = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -32,6 +32,10 @@ static constexpr double SMALL = 0.001;
|
||||
ImproperCvff::ImproperCvff(LAMMPS *_lmp) : Improper(_lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
|
||||
// the first atom in the quadruplet is the atom of symmetry
|
||||
|
||||
symmatoms[0] = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -35,6 +35,10 @@ static constexpr double SMALL = 0.001;
|
||||
ImproperHarmonic::ImproperHarmonic(LAMMPS *_lmp) : Improper(_lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
|
||||
// the first atom in the quadruplet is the atom of symmetry
|
||||
|
||||
symmatoms[0] = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -39,6 +39,11 @@ static constexpr double SMALL = 0.001;
|
||||
ImproperUmbrella::ImproperUmbrella(LAMMPS *_lmp) : Improper(_lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
|
||||
// the first and fourth atoms in the quadruplet are the atoms of symmetry
|
||||
|
||||
symmatoms[0] = 1;
|
||||
symmatoms[3] = 2;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -36,7 +36,12 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ImproperDistHarm::ImproperDistHarm(LAMMPS *lmp) : Improper(lmp) {}
|
||||
ImproperDistHarm::ImproperDistHarm(LAMMPS *lmp) : Improper(lmp)
|
||||
{
|
||||
// the fourth atom in the quadruplet is the atom of symmetry
|
||||
|
||||
symmatoms[3] = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -36,7 +36,12 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ImproperSQDistHarm::ImproperSQDistHarm(LAMMPS *lmp) : Improper(lmp) {}
|
||||
ImproperSQDistHarm::ImproperSQDistHarm(LAMMPS *lmp) : Improper(lmp)
|
||||
{
|
||||
// the fourth atom in the quadruplet is the atom of symmetry
|
||||
|
||||
symmatoms[3] = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ Improper::Improper(LAMMPS *_lmp) : Pointers(_lmp)
|
||||
{
|
||||
energy = 0.0;
|
||||
writedata = 0;
|
||||
for (int i = 0; i < 4; i++) symmatoms[i] = 0;
|
||||
|
||||
allocated = 0;
|
||||
suffix_flag = Suffix::NONE;
|
||||
|
||||
@ -36,6 +36,11 @@ class Improper : protected Pointers {
|
||||
// CENTROID_SAME = same as two-body stress
|
||||
// CENTROID_AVAIL = different and implemented
|
||||
// CENTROID_NOTAVAIL = different, not yet implemented
|
||||
|
||||
int symmatoms[4]; // symmetry atom(s) of improper style
|
||||
// value of 0: interchangable atoms
|
||||
// value of 1: central atom
|
||||
// values >1: additional atoms of symmetry
|
||||
|
||||
// KOKKOS host/device flag and data masks
|
||||
|
||||
|
||||
Reference in New Issue
Block a user