for atom style template only write out the number of types

This commit is contained in:
Axel Kohlmeyer
2020-10-23 21:51:55 -04:00
parent 00e4e23456
commit 4a6517fd51

View File

@ -233,7 +233,7 @@ void WriteData::header()
fmt::print(fp,"{} atoms\n{} atom types\n",atom->natoms,atom->ntypes);
// do not write molecular topology info for atom_style template
// only write out number of types for atom style template
if (atom->molecular == Atom::MOLECULAR) {
if (atom->nbonds || atom->nbondtypes)
@ -250,6 +250,13 @@ void WriteData::header()
nimpropers,atom->nimpropertypes);
}
if (atom->molecular == Atom::TEMPLATE) {
if (atom->nbondtypes) fmt::print(fp,"{} bond types\n",atom->nbondtypes);
if (atom->nangletypes) fmt::print(fp,"{} angle types\n",atom->nangletypes);
if (atom->ndihedraltypes) fmt::print(fp,"{} dihedral types\n",atom->ndihedraltypes);
if (atom->nimpropertypes) fmt::print(fp,"{} improper types\n",atom->nimpropertypes);
}
// bonus info
if (atom->ellipsoid_flag) fmt::print(fp,"{} ellipsoids\n",atom->nellipsoids);