last minute fix for https://matsci.org/t/errors-encountered-in-the-pyrolysis-of-organic-polymers-under-reaxff-force-field/54818
This commit is contained in:
@ -39,6 +39,7 @@
|
||||
|
||||
using LAMMPS_NS::utils::open_potential;
|
||||
using LAMMPS_NS::utils::getsyserror;
|
||||
using LAMMPS_NS::utils::strmatch;
|
||||
using LAMMPS_NS::utils::uppercase;
|
||||
using LAMMPS_NS::EOFException;
|
||||
using LAMMPS_NS::ValueTokenizer;
|
||||
@ -71,7 +72,7 @@ namespace ReaxFF {
|
||||
filename, lineno, want, values.count()))
|
||||
|
||||
if (control->me == 0) {
|
||||
FILE *fp = LAMMPS_NS::utils::open_potential(filename, lmp, nullptr);
|
||||
FILE *fp = open_potential(filename, lmp, nullptr);
|
||||
if (!fp)
|
||||
error->one(FLERR,"The ReaxFF parameter file {} cannot be opened: {}",
|
||||
filename, getsyserror());
|
||||
@ -81,9 +82,11 @@ namespace ReaxFF {
|
||||
try {
|
||||
int i,j,k,l,m,n,lineno = 0;
|
||||
|
||||
// skip header comment line
|
||||
// check if header comment line is present
|
||||
|
||||
reader.skip_line();
|
||||
auto line = reader.next_line();
|
||||
if (strmatch(line, "^\\s*[0-9]+\\s+!.*general parameters.*"))
|
||||
THROW_ERROR("First line of ReaxFF potential file must be a comment or empty");
|
||||
++lineno;
|
||||
|
||||
// set some defaults
|
||||
|
||||
Reference in New Issue
Block a user