forked from lijiext/lammps
detect and refuse to run pair style srp together with fix rigid
This commit is contained in:
parent
0ac22e034c
commit
ddc1e4e86e
|
@ -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,
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue