may not use pair_style kim before box is defined

NOTE: this will not happen when the kim_init and kim_interactions commands are used.
This commit is contained in:
Axel Kohlmeyer
2020-07-11 18:07:25 -04:00
parent f969d9ab72
commit 83291fdd67

View File

@ -285,6 +285,13 @@ void PairKIM::allocate()
void PairKIM::settings(int narg, char **arg)
{
// some of the code below needs to know the number of atom types,
// but that is not set until the simulation box is created.
if (domain->box_exist == 0)
error->all(FLERR,"May not use 'pair_style kim' command before "
"simulation box is defined");
// This is called when "pair_style kim ..." is read from input
// may be called multiple times
++settings_call_count;