Commit 968de854 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

apply test for overlap with rigid bodies to set and velocity command

parent 95d6f05a
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -585,6 +585,28 @@ void Set::set(int keyword)
    }
  }

  // check if properties of atoms in rigid bodies are updated
  // that are cached as per-body data.
  switch (keyword) {
  case X:
  case Y:
  case Z:
  case MOLECULE:
  case MASS:
  case ANGMOM:
  case SHAPE:
  case DIAMETER:
  case DENSITY:
  case QUAT:
  case IMAGE:
    if (modify->check_rigid_list_overlap(select))
      error->warning(FLERR,"Changing a property of atoms in rigid bodies "
                     "that has no effect unless rigid bodies are rebuild");
    break;
  default: // assume no conflict for all other properties
    break;
  }

  // loop over selected atoms

  AtomVecEllipsoid *avec_ellipsoid =
+6 −0
Original line number Diff line number Diff line
@@ -68,6 +68,12 @@ void Velocity::command(int narg, char **arg)
  if (igroup == -1) error->all(FLERR,"Could not find velocity group ID");
  groupbit = group->bitmask[igroup];

  // check if velocities of atoms in rigid bodies are updated

  if (modify->check_rigid_group_overlap(groupbit))
    error->warning(FLERR,"Changing velocities of atoms in rigid bodies. "
                     "This has no effect unless rigid bodies are rebuild");

  // identify style

  if (strcmp(arg[1],"create") == 0) style = CREATE;