update output of read_restart to make read_data and signify if atom style template is used

This commit is contained in:
Axel Kohlmeyer
2020-10-24 01:05:11 -04:00
parent 186359caa9
commit 9c129d3a34

View File

@ -472,19 +472,33 @@ void ReadRestart::command(int narg, char **arg)
if (natoms != atom->natoms)
error->all(FLERR,"Did not assign all restart atoms correctly");
if (me == 0) {
if (atom->nbonds) {
utils::logmesg(lmp,fmt::format(" {} bonds\n",atom->nbonds));
}
if (atom->nangles) {
utils::logmesg(lmp,fmt::format(" {} angles\n",atom->nangles));
}
if (atom->ndihedrals) {
utils::logmesg(lmp,fmt::format(" {} dihedrals\n",atom->ndihedrals));
}
if (atom->nimpropers) {
utils::logmesg(lmp,fmt::format(" {} impropers\n",atom->nimpropers));
}
if ((atom->molecular == Atom::TEMPLATE) && (me == 0)) {
std::string mesg;
if (atom->nbonds)
mesg += fmt::format(" {} template bonds\n",atom->nbonds);
if (atom->nangles)
mesg += fmt::format(" {} template angles\n",atom->nangles);
if (atom->ndihedrals)
mesg += fmt::format(" {} template dihedrals\n",atom->ndihedrals);
if (atom->nimpropers)
mesg += fmt::format(" {} template impropers\n",atom->nimpropers);
utils::logmesg(lmp,mesg);
}
if ((atom->molecular == Atom::MOLECULAR) && (me == 0)) {
std::string mesg;
if (atom->nbonds)
mesg += fmt::format(" {} bonds\n",atom->nbonds);
if (atom->nangles)
mesg += fmt::format(" {} angles\n",atom->nangles);
if (atom->ndihedrals)
mesg += fmt::format(" {} dihedrals\n",atom->ndihedrals);
if (atom->nimpropers)
mesg += fmt::format(" {} impropers\n",atom->nimpropers);
utils::logmesg(lmp,mesg);
}
// check that atom IDs are valid