Make use of ENERGY_ and VIRIAL_ constants

This commit is contained in:
Richard Berger
2020-11-16 15:33:15 -05:00
parent 746655ed2e
commit 251dcdf8a2
21 changed files with 108 additions and 106 deletions

View File

@ -91,12 +91,12 @@ void Improper::ev_setup(int eflag, int vflag, int alloc)
evflag = 1;
eflag_either = eflag;
eflag_global = eflag % 2;
eflag_atom = eflag / 2;
eflag_global = eflag & ENERGY_GLOBAL;
eflag_atom = eflag & ENERGY_ATOM;
vflag_global = vflag % 4;
vflag_atom = vflag & 4;
cvflag_atom = vflag & 8;
vflag_global = vflag & (VIRIAL_PAIR | VIRIAL_FDOTR);
vflag_atom = vflag & VIRIAL_ATOM;
cvflag_atom = vflag & VIRIAL_CENTROID;
vflag_either = vflag_global || vflag_atom;
// reallocate per-atom arrays if necessary