insure cvflag is zero, other tweaks

This commit is contained in:
Steve Plimpton
2020-11-18 15:05:11 -07:00
parent c62c907281
commit 5691ec3dfd
12 changed files with 26 additions and 19 deletions

View File

@ -74,7 +74,7 @@ void Improper::init()
/* ----------------------------------------------------------------------
setup for energy, virial computation
see integrate::ev_set() for bitwise settings of eflag/vflag
set the following flags, values are otherwise 0:
set the following flags, values are otherwise set to 0:
evflag != 0 if any bits of eflag or vflag are set
eflag_global != 0 if ENERGY_GLOBAL bit of eflag set
eflag_atom != 0 if ENERGY_ATOM bit of eflag set
@ -102,6 +102,7 @@ void Improper::ev_setup(int eflag, int vflag, int alloc)
vflag_atom = vflag & VIRIAL_ATOM;
if (vflag & VIRIAL_CENTROID && centroidstressflag != CENTROID_AVAIL)
vflag_atom = 1;
cvflag_atom = 0;
if (vflag & VIRIAL_CENTROID && centroidstressflag == CENTROID_AVAIL)
cvflag_atom = 1;
vflag_either = vflag_global || vflag_atom || cvflag_atom;