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

more consistency changes for interlayer potentials

parent 8eeb92b8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -46,6 +46,8 @@ using namespace LAMMPS_NS;

PairKolmogorovCrespiFull::PairKolmogorovCrespiFull(LAMMPS *lmp) : Pair(lmp)
{
  restartinfo = 0;

  // initialize element to parameter maps
  nelements = 0;
  elements = NULL;
+9 −5
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ using namespace LAMMPS_NS;
PairLebedevaZ::PairLebedevaZ(LAMMPS *lmp) : Pair(lmp)
{
  single_enable = 0;
  restartinfo = 0;

  // initialize element to parameter maps
  nelements = 0;
@@ -254,19 +255,20 @@ void PairLebedevaZ::coeff(int narg, char **arg)
    }
  }


  read_file(arg[2]);

  double cut_one = cut_global;
  // set setflag only for i,j pairs where both are mapped to elements

  int count = 0;
  for (int i = ilo; i <= ihi; i++) {
    for (int j = MAX(jlo,i); j <= jhi; j++) {
      cut[i][j] = cut_one;
      if ((map[i] >= 0) && (map[j] >= 0)) {
        cut[i][j] = cut_global;
        setflag[i][j] = 1;
        count++;
      }
    }
  }

  if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients");
}
@@ -279,6 +281,8 @@ void PairLebedevaZ::coeff(int narg, char **arg)
double PairLebedevaZ::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]];