diff --git a/doc/src/Errors_details.rst b/doc/src/Errors_details.rst index 9af9b984fb..a5b0d1b100 100644 --- a/doc/src/Errors_details.rst +++ b/doc/src/Errors_details.rst @@ -458,7 +458,20 @@ with the relevant person or people who can update the executable. .. _err011: -.. currently unused +Energy or stress was not tallied by pair style +---------------------------------------------- + +This warning will be printed by computes from the :ref:`TALLY package +`. Those use a callback mechanism that will only work for +regular pair-wise additive pair styles like :doc:`Lennard-Jones +`, :doc:`Morse `, :doc:`Born-Meyer-Huggins +`, and similar. Making these computes work for many-body +potentials will require to implement similar callbacks suitable for such +potentials, which has not been done (and may be difficult to do in a +generic fashion). Whether this warning indicates that contributions to +the computed properties are missing depends on the groups used. At any +rate, careful testing of the results is advised when this warning +appears. .. _err0012: diff --git a/src/TALLY/compute_force_tally.cpp b/src/TALLY/compute_force_tally.cpp index 6b09cac785..5dd3d1958d 100644 --- a/src/TALLY/compute_force_tally.cpp +++ b/src/TALLY/compute_force_tally.cpp @@ -182,7 +182,7 @@ double ComputeForceTally::compute_scalar() error->all(FLERR, Error::NOLASTLINE, "Stress was not tallied on needed timestep{}", utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Stress was not tallied by pair style"); + error->warning(FLERR, "Stress was not tallied by pair style" + utils::errorurl(11)); // sum accumulated forces across procs @@ -201,7 +201,7 @@ void ComputeForceTally::compute_peratom() error->all(FLERR, Error::NOLASTLINE, "Stress was not tallied on needed timestep{}", utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Stress was not tallied by pair style"); + error->warning(FLERR, "Stress was not tallied by pair style" + utils::errorurl(11)); // collect contributions from ghost atoms diff --git a/src/TALLY/compute_heat_flux_tally.cpp b/src/TALLY/compute_heat_flux_tally.cpp index 65b66db7d0..5c53328b32 100644 --- a/src/TALLY/compute_heat_flux_tally.cpp +++ b/src/TALLY/compute_heat_flux_tally.cpp @@ -69,7 +69,8 @@ ComputeHeatFluxTally::~ComputeHeatFluxTally() void ComputeHeatFluxTally::init() { if (force->pair == nullptr) - error->all(FLERR, "Trying to use compute heat/flux/tally without pair style"); + error->all(FLERR, Error::NOLASTLINE, + "Trying to use compute heat/flux/tally without pair style"); else force->pair->add_tally_callback(this); @@ -205,10 +206,11 @@ void ComputeHeatFluxTally::compute_vector() { invoked_vector = update->ntimestep; if ((did_setup != invoked_vector) || (update->eflag_global != invoked_vector)) - error->all(FLERR, Error::NOLASTLINE, "Stress was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Stress was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Stress was not tallied by pair style"); + error->warning(FLERR, "Stress was not tallied by pair style" + utils::errorurl(11)); // collect contributions from ghost atoms diff --git a/src/TALLY/compute_heat_flux_virial_tally.cpp b/src/TALLY/compute_heat_flux_virial_tally.cpp index a87732c15e..20b287dde4 100644 --- a/src/TALLY/compute_heat_flux_virial_tally.cpp +++ b/src/TALLY/compute_heat_flux_virial_tally.cpp @@ -191,10 +191,11 @@ double ComputeHeatFluxVirialTally::compute_scalar() invoked_scalar = update->ntimestep; if ((did_setup != invoked_scalar) || (update->eflag_global != invoked_scalar)) - error->all(FLERR, Error::NOLASTLINE, "Stress was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Stress was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Stress was not tallied by pair style"); + error->warning(FLERR, "Stress was not tallied by pair style" + utils::errorurl(11)); // sum heat flux across procs double hflux = 0.0; @@ -213,10 +214,11 @@ void ComputeHeatFluxVirialTally::compute_peratom() { invoked_peratom = update->ntimestep; if ((did_setup != invoked_peratom) || (update->eflag_global != invoked_peratom)) - error->all(FLERR, Error::NOLASTLINE, "Stress was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Stress was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Stress was not tallied by pair style"); + error->warning(FLERR, "Stress was not tallied by pair style" + utils::errorurl(11)); // collect contributions from ghost atoms diff --git a/src/TALLY/compute_pe_mol_tally.cpp b/src/TALLY/compute_pe_mol_tally.cpp index e5ddb57568..1aecc1165f 100644 --- a/src/TALLY/compute_pe_mol_tally.cpp +++ b/src/TALLY/compute_pe_mol_tally.cpp @@ -126,10 +126,11 @@ void ComputePEMolTally::compute_vector() { invoked_vector = update->ntimestep; if ((did_setup != invoked_vector) || (update->eflag_global != invoked_vector)) - error->all(FLERR, Error::NOLASTLINE, "Energy was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Energy was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Energy was not tallied by pair style"); + error->warning(FLERR, "Energy was not tallied by pair style" + utils::errorurl(11)); // sum accumulated energies across procs diff --git a/src/TALLY/compute_pe_tally.cpp b/src/TALLY/compute_pe_tally.cpp index d77cfe2646..6fde2126f7 100644 --- a/src/TALLY/compute_pe_tally.cpp +++ b/src/TALLY/compute_pe_tally.cpp @@ -167,10 +167,11 @@ double ComputePETally::compute_scalar() { invoked_scalar = update->ntimestep; if ((did_setup != invoked_scalar) || (update->eflag_global != invoked_scalar)) - error->all(FLERR, Error::NOLASTLINE, "Energy was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Energy was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Energy was not tallied by pair style"); + error->warning(FLERR, "Energy was not tallied by pair style" + utils::errorurl(11)); // sum accumulated energies across procs @@ -186,10 +187,11 @@ void ComputePETally::compute_peratom() { invoked_peratom = update->ntimestep; if ((did_setup != invoked_peratom) || (update->eflag_global != invoked_peratom)) - error->all(FLERR, Error::NOLASTLINE, "Energy was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Energy was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Energy was not tallied by pair style"); + error->warning(FLERR, "Energy was not tallied by pair style" + utils::errorurl(11)); // collect contributions from ghost atoms diff --git a/src/TALLY/compute_stress_tally.cpp b/src/TALLY/compute_stress_tally.cpp index c16e046dcf..3f264a92ce 100644 --- a/src/TALLY/compute_stress_tally.cpp +++ b/src/TALLY/compute_stress_tally.cpp @@ -202,10 +202,11 @@ double ComputeStressTally::compute_scalar() { invoked_scalar = update->ntimestep; if ((did_setup != invoked_scalar) || (update->eflag_global != invoked_scalar)) - error->all(FLERR, Error::NOLASTLINE, "Stress was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Stress was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Stress was not tallied by pair style"); + error->warning(FLERR, "Stress was not tallied by pair style" + utils::errorurl(11)); // sum accumulated forces across procs @@ -225,10 +226,11 @@ void ComputeStressTally::compute_peratom() { invoked_peratom = update->ntimestep; if ((did_setup != invoked_peratom) || (update->eflag_global != invoked_peratom)) - error->all(FLERR, Error::NOLASTLINE, "Stress was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Stress was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Stress was not tallied by pair style"); + error->warning(FLERR, "Stress was not tallied by pair style" + utils::errorurl(11)); // collect contributions from ghost atoms