diff --git a/doc/src/Errors_warnings.txt b/doc/src/Errors_warnings.txt index 079688c639..47dd597af8 100644 --- a/doc/src/Errors_warnings.txt +++ b/doc/src/Errors_warnings.txt @@ -178,12 +178,6 @@ When using fixes like box/relax, the potential energy used by the minimizer is augmented by an additional energy provided by the fix. Thus the printed converged energy may be different from the total potential energy. :dd -{Energy tally does not account for 'zero yes'} :dt - -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. :dd - {Estimated error in splitting of dispersion coeffs is %g} :dt Error is greater than 0.0001 percent. :dd diff --git a/doc/src/fix_langevin.txt b/doc/src/fix_langevin.txt index 85c97a3436..861eed4a6f 100644 --- a/doc/src/fix_langevin.txt +++ b/doc/src/fix_langevin.txt @@ -217,10 +217,6 @@ 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. -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 diff --git a/src/fix_langevin.cpp b/src/fix_langevin.cpp index d829982274..36ea47daf6 100644 --- a/src/fix_langevin.cpp +++ b/src/fix_langevin.cpp @@ -177,8 +177,6 @@ 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'"); } /* ---------------------------------------------------------------------- */ @@ -605,6 +603,11 @@ void FixLangevin::post_force_untemplated f[i][0] -= fsumall[0]; f[i][1] -= fsumall[1]; f[i][2] -= fsumall[2]; + if (Tp_TALLY) { + flangevin[i][0] -= fsumall[0]; + flangevin[i][1] -= fsumall[1]; + flangevin[i][2] -= fsumall[2]; + } } } } diff --git a/src/fix_langevin.h b/src/fix_langevin.h index 2883ac9ea2..024e7a9539 100644 --- a/src/fix_langevin.h +++ b/src/fix_langevin.h @@ -104,12 +104,6 @@ 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.