error out when a bond/angle/dihedral/improper substyle is not used
this implements the same behavior as for pair style hybrid
This commit is contained in:
@ -305,6 +305,16 @@ void ImproperHybrid::coeff(int narg, char **arg)
|
||||
|
||||
void ImproperHybrid::init_style()
|
||||
{
|
||||
// error if sub-style is not used
|
||||
|
||||
int used;
|
||||
for (int istyle = 0; istyle < nstyles; ++istyle) {
|
||||
used = 0;
|
||||
for (int itype = 1; itype <= atom->nimpropertypes; ++itype)
|
||||
if (map[itype] == istyle) used = 1;
|
||||
if (used == 0) error->all(FLERR, "Improper hybrid sub-style {} is not used", keywords[istyle]);
|
||||
}
|
||||
|
||||
for (int m = 0; m < nstyles; m++)
|
||||
if (styles[m]) styles[m]->init_style();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user