small behavior tweaks for inputs without labelmap, add warnings about type offsets

This commit is contained in:
Axel Kohlmeyer
2022-09-06 18:18:44 -04:00
parent 1a5a509c1d
commit 3b6a06fcf5
4 changed files with 30 additions and 6 deletions

View File

@ -337,8 +337,17 @@ void ReadData::command(int narg, char **arg)
error->all(FLERR, "Cannot use read_data without add keyword after simulation box is defined");
if (!domain->box_exist && addflag)
error->all(FLERR, "Cannot use read_data add before simulation box is defined");
if (offsetflag && addflag == NONE)
error->all(FLERR, "Cannot use read_data offset without add keyword");
if (offsetflag) {
if (addflag == NONE) {
error->all(FLERR, "Cannot use read_data offset without add keyword");
} else {
if (atom->labelmapflag) {
if (comm->me == 0)
error->warning(FLERR, "Using read_data offset with a labelmap. Offsets will be only "
"applied to numeric types and not to type labels");
}
}
}
if (shiftflag && addflag == NONE)
error->all(FLERR, "Cannot use read_data shift without add keyword");
if (addflag != NONE &&