document and print warning when energy is tallied with momentum removal

This commit is contained in:
Axel Kohlmeyer
2015-03-25 11:22:30 -04:00
parent 0db603e008
commit 5ccfa295cf
3 changed files with 12 additions and 0 deletions

View File

@ -217,6 +217,10 @@ the particles. As described below, this energy can then be printed
out or added to the potential energy of the system to monitor energy
conservation.
IMPORTANT NOTE: this accumulated energy does NOT include kinetic
energy removed by the {zero} flag. LAMMPS will print a warning when
both options are active.
The keyword {zero} can be used to eliminate drift due to the
thermostat. Because the random forces on different atoms are
independent, they do not sum exactly to zero. As a result, this fix

View File

@ -174,6 +174,8 @@ FixLangevin::FixLangevin(LAMMPS *lmp, int narg, char **arg) :
}
}
if (tallyflag && zeroflag && comm->me == 0)
error->warning(FLERR,"Energy tally does not account for 'zero yes'");
}
/* ---------------------------------------------------------------------- */

View File

@ -103,6 +103,12 @@ E: Fix langevin period must be > 0.0
The time window for temperature relaxation must be > 0
W: Energy tally does not account for 'zero yes'
The energy removed by using the 'zero yes' flag is not accounted
for in the energy tally and thus energy conservation cannot be
monitored in this case.
E: Fix langevin omega requires atom style sphere
Self-explanatory.