print error message when a pair style was not re-specified after reading a restart

This commit is contained in:
Axel Kohlmeyer 2018-03-19 18:05:47 -04:00
parent 16054cc327
commit 28a922b18b
1 changed files with 10 additions and 0 deletions

View File

@ -178,6 +178,16 @@ void Force::init()
{
qqrd2e = qqr2e/dielectric;
// check if pair style must be specified after restart
if (pair_restart) {
if (!pair) {
char msg[128];
sprintf(msg,"Must re-specify non-restarted pair style (%s) "
"after read_restart", pair_restart);
error->all(FLERR,msg);
}
}
if (kspace) kspace->init(); // kspace must come before pair
if (pair) pair->init(); // so g_ewald is defined
if (bond) bond->init();