Commit ddc1e4e8 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

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

parent 0ac22e03
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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,
+7 −0
Original line number Diff line number Diff line
@@ -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");