Unverified Commit c8635996 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

error out when offset flag is unset via "pair_modify shift no"

parent 238382e0
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -801,9 +801,10 @@ void PairILPGrapheneHBN::coeff(int narg, char **arg)
    error->all(FLERR,"Incorrect args for pair coefficients");
  if (!allocated) allocate();

  int ilo,ihi,jlo,jhi;
  force->bounds(FLERR,arg[0],atom->ntypes,ilo,ihi);
  force->bounds(FLERR,arg[1],atom->ntypes,jlo,jhi);
  // insure I,J args are * *

  if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0)
    error->all(FLERR,"Incorrect args for pair coefficients");

  // read args that map atom types to elements in potential file
  // map[i] = which element the Ith atom type is, -1 if NULL
+2 −0
Original line number Diff line number Diff line
@@ -871,6 +871,8 @@ void PairKolmogorovCrespiFull::coeff(int narg, char **arg)
double PairKolmogorovCrespiFull::init_one(int i, int j)
{
  if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set");
  if (!offset_flag)
    error->all(FLERR,"Must use 'pair_modify shift yes' with this pair style");

  if (offset_flag && (cut[i][j] > 0.0)) {
    int iparam_ij = elem2param[map[i]][map[j]];
+2 −0
Original line number Diff line number Diff line
@@ -292,6 +292,8 @@ void PairKolmogorovCrespiZ::coeff(int narg, char **arg)
double PairKolmogorovCrespiZ::init_one(int i, int j)
{
  if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set");
  if (!offset_flag)
    error->all(FLERR,"Must use 'pair_modify shift yes' with this pair style");

  if (offset_flag && (cut[i][j] > 0.0)) {
    int iparam_ij = elem2param[map[i]][map[j]];