Commit 032801c1 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1636 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 3a5058da
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -242,14 +242,11 @@ void PairCoulLong::init_style()

  // set & error check interior rRESPA cutoffs

  if (strcmp(update->integrate_style,"respa") == 0) {
    if (((Respa *) update->integrate)->level_inner >= 0) {
  if (strcmp(update->integrate_style,"respa") == 0 &&
      ((Respa *) update->integrate)->level_inner >= 0) {
    cut_respa = ((Respa *) update->integrate)->cutoff;
      for (i = 1; i <= atom->ntypes; i++)
	for (j = i; j <= atom->ntypes; j++)
    if (cut_coul < cut_respa[3])
      error->all("Pair cutoff < Respa interior cutoff");
    }
  } else cut_respa = NULL;

  // insure use of KSpace long-range solver, set g_ewald
+7 −9
Original line number Diff line number Diff line
@@ -776,15 +776,13 @@ void PairLJCharmmCoulLong::init_style()

  // set & error check interior rRESPA cutoffs

  cut_respa = NULL;
  if (strcmp(update->integrate_style,"respa") == 0) {
    if (((Respa *) update->integrate)->level_inner >= 0) {
  if (strcmp(update->integrate_style,"respa") == 0 &&
      ((Respa *) update->integrate)->level_inner >= 0) {
    cut_respa = ((Respa *) update->integrate)->cutoff;
    if (MIN(cut_lj,cut_coul) < cut_respa[3])
      error->all("Pair cutoff < Respa interior cutoff");
    if (cut_lj_inner < cut_respa[1])
      error->all("Pair inner cutoff < Respa interior cutoff");
    }
  } else cut_respa = NULL;

  // insure use of KSpace long-range solver, set g_ewald
+11 −11
Original line number Diff line number Diff line
@@ -709,17 +709,12 @@ void PairLJCutCoulLong::init_style()

  cut_coulsq = cut_coul * cut_coul;

  // set & error check interior rRESPA cutoffs
  // set rRESPA cutoffs

  if (strcmp(update->integrate_style,"respa") == 0) {
    if (((Respa *) update->integrate)->level_inner >= 0) {
  if (strcmp(update->integrate_style,"respa") == 0 &&
      ((Respa *) update->integrate)->level_inner >= 0)
    cut_respa = ((Respa *) update->integrate)->cutoff;
      for (i = 1; i <= atom->ntypes; i++)
	for (j = i; j <= atom->ntypes; j++)
	  if (MIN(cut_lj[i][j],cut_coul) < cut_respa[3])
	    error->all("Pair cutoff < Respa interior cutoff");
    }
  } else cut_respa = NULL;
  else cut_respa = NULL;

  // insure use of KSpace long-range solver, set g_ewald

@@ -778,6 +773,11 @@ double PairLJCutCoulLong::init_one(int i, int j)
  lj4[j][i] = lj4[i][j];
  offset[j][i] = offset[i][j];

  // check interior rRESPA cutoff

  if (cut_respa && MIN(cut_lj[i][j],cut_coul) < cut_respa[3])
    error->all("Pair cutoff < Respa interior cutoff");

  // compute I,J contribution to long-range tail correction
  // count total # of atoms of type I and J via Allreduce

+19 −10
Original line number Diff line number Diff line
@@ -68,17 +68,26 @@ void PairCGCMMCoulCut::init_style()

  PairCMMCommon::init_style();

  // set & error check interior rRESPA cutoffs
  if (strcmp(update->integrate_style,"respa") == 0) {
    if (((Respa *) update->integrate)->level_inner >= 0) {
  // set rRESPA cutoffs

  if (strcmp(update->integrate_style,"respa") == 0 &&
      ((Respa *) update->integrate)->level_inner >= 0)
    cut_respa = ((Respa *) update->integrate)->cutoff;
      for (int i = 1; i <= atom->ntypes; i++)
        for (int j = i; j <= atom->ntypes; j++)
          if (MIN(cut_lj[i][j],cut_coul[i][j]) < cut_respa[3])
            error->all("Pair cutoff < Respa interior cutoff");
  else cut_respa = NULL;
}
  } else cut_respa = NULL;

/* ---------------------------------------------------------------------- */

double PairCGCMMCoulCut::init_one(int i, int j)
{
  double mycut = PairCMMCommon::init_one(i,j);

  // check interior rRESPA cutoff

  if (cut_respa && MIN(cut_lj[i][j],cut_coul[i][j]) < cut_respa[3])
    error->all("Pair cutoff < Respa interior cutoff");

  return mycut;
}

/* ---------------------------------------------------------------------- */
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ namespace LAMMPS_NS {
    void compute_outer(int, int);

    void init_style();
    double init_one(int, int);

    void write_restart(FILE *);
    void read_restart(FILE *);
Loading