also add error checks

This commit is contained in:
Jacob Gissinger
2020-09-23 10:28:48 -04:00
parent 88b8461e0f
commit e29f838121

View File

@ -634,6 +634,10 @@ void Molecule::read(int flag)
error->all(FLERR,"Molecule file has no Body Integers section");
if (bodyflag && ndbody && dbodyflag == 0)
error->all(FLERR,"Molecule file has no Body Doubles section");
if (nmolecules > 0 && !moleculeflag)
error->all(FLERR,"Molecule file has no Molecules section");
if (nfragments > 0 && !fragmentsflag)
error->all(FLERR,"Molecule file has no Fragments section");
}
// auto-generate special bonds if needed and not in file