From b5061b69bedd3a6687f40460f0d09089e7204648 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 7 Oct 2021 20:45:27 -0400 Subject: [PATCH] add warning to fix reaxff/species to explain the impact of large averaging --- doc/src/fix_reaxff_species.rst | 11 +++++++++++ src/REAXFF/fix_reaxff_species.cpp | 2 +- src/RIGID/fix_rigid_small.cpp | 3 +-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/src/fix_reaxff_species.rst b/doc/src/fix_reaxff_species.rst index 434e18d8a5..a652777ba7 100644 --- a/doc/src/fix_reaxff_species.rst +++ b/doc/src/fix_reaxff_species.rst @@ -56,6 +56,17 @@ number of molecules of each species. In this context, "species" means a unique molecule. The chemical formula of each species is given in the first line. +.. warning:: + + In order to compute averaged data, it is required that there are no + neighbor list rebuilds between the *Nfreq* steps. For that reason, fix + *reaxff/species* may change your neighbor list settings. There will + be a warning message showing the new settings. Having an *Nfreq* + setting that is larger than what is required for correct computation + of the ReaxFF force field interactions can thus lead to incorrect + results. For typical ReaxFF calculations a value of 100 is already + quite large. + If the filename ends with ".gz", the output file is written in gzipped format. A gzipped dump file will be about 3x smaller than the text version, but will also take longer to write. diff --git a/src/REAXFF/fix_reaxff_species.cpp b/src/REAXFF/fix_reaxff_species.cpp index d4da856b2a..c48fcd5704 100644 --- a/src/REAXFF/fix_reaxff_species.cpp +++ b/src/REAXFF/fix_reaxff_species.cpp @@ -115,7 +115,7 @@ FixReaxFFSpecies::FixReaxFFSpecies(LAMMPS *lmp, int narg, char **arg) : } else fp = fopen(arg[6],"w"); if (!fp) - error->one(FLERR,"Cannot open fix reaxff/species file {}: {}",arg[6],utils::getsyserror())); + error->one(FLERR,"Cannot open fix reaxff/species file {}: {}",arg[6],utils::getsyserror()); } x0 = nullptr; diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index 7216c56c83..3dbdb96568 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -2563,8 +2563,7 @@ void FixRigidSmall::write_restart_file(const char *file) auto outfile = std::string(file) + ".rigid"; fp = fopen(outfile.c_str(),"w"); if (fp == nullptr) - error->one(FLERR,"Cannot open fix rigid restart file {}: {}", - outfile,utils::getsyserror()); + error->one(FLERR,"Cannot open fix rigid restart file {}: {}",outfile,utils::getsyserror()); fmt::print(fp,"# fix rigid mass, COM, inertia tensor info for " "{} bodies on timestep {}\n\n",nbody,update->ntimestep);