diff --git a/src/molecule.cpp b/src/molecule.cpp index 090ce9e77f..c9155adc7e 100644 --- a/src/molecule.cpp +++ b/src/molecule.cpp @@ -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