Commit 1b56b5c0 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@500 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 097c570b
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -308,7 +308,6 @@ void DihedralCharmm::compute(int eflag, int vflag)
	virial[5] += rfactor * dely*delz*fforce;
      }
    }

  }
}

@@ -384,15 +383,21 @@ void DihedralCharmm::coeff(int which, int narg, char **arg)

void DihedralCharmm::init_style()
{
  // insure use of Charmm pair_style
  // insure use of CHARMM pair_style if any weight factors are non-zero
  // set local ptrs to LJ 14 arrays setup by Pair

  int weightflag = 0;
  for (int i = 1; i < atom->ndihedraltypes; i++)
    if (weight[i] > 0.0) weightflag = 1;

  if (weightflag) {
    Pair *pair = force->pair_match("charmm");
    if (pair == NULL)
      error->all("Dihedral charmm is incompatible with Pair style");
    double cutoff;
    pair->extract_charmm(&lj14_1,&lj14_2,&lj14_3,&lj14_4,&implicit_flag);
  }
}

/* ----------------------------------------------------------------------
   proc 0 writes out coeffs to restart file