detect and refuse to run pair style srp together with fix rigid

This commit is contained in:
Axel Kohlmeyer 2017-04-25 13:27:20 -04:00
parent 0ac22e034c
commit ddc1e4e86e
2 changed files with 9 additions and 0 deletions

View File

@ -150,6 +150,8 @@ hybrid"_pair_hybrid.html.
This pair style requires the "newton"_newton.html command to be {on}
for non-bonded interactions.
This pair style is not compatible with "rigid body integrators"_fix_rigid.html
[Related commands:]
"pair_style hybrid"_pair_hybrid.html, "pair_coeff"_pair_coeff.html,

View File

@ -101,6 +101,13 @@ void FixSRP::init()
if (force->pair_match("hybrid",1) == NULL)
error->all(FLERR,"Cannot use pair srp without pair_style hybrid");
int has_rigid = 0;
for (int i = 0; i < modify->nfix; i++)
if (strncmp(modify->fix[i]->style,"rigid",5) == 0) ++has_rigid;
if (has_rigid > 0)
error->all(FLERR,"Pair srp is not compatible with rigid fixes.");
if ((bptype < 1) || (bptype > atom->ntypes))
error->all(FLERR,"Illegal bond particle type");