git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7133 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2011-10-20 00:11:49 +00:00
parent 55b951bed0
commit f90ce18f3d
83 changed files with 293 additions and 271 deletions

View File

@ -21,17 +21,16 @@
#include "force.h"
#include "update.h"
#include "neigh_list.h"
#include "math_const.h"
#include "memory.h"
#include "error.h"
using namespace LAMMPS_NS;
using namespace MathConst;
/* ---------------------------------------------------------------------- */
PairSoft::PairSoft(LAMMPS *lmp) : Pair(lmp)
{
PI = 4.0*atan(1.0);
}
PairSoft::PairSoft(LAMMPS *lmp) : Pair(lmp) {}
/* ---------------------------------------------------------------------- */
@ -95,9 +94,9 @@ void PairSoft::compute(int eflag, int vflag)
if (rsq < cutsq[itype][jtype]) {
r = sqrt(rsq);
arg = PI*r/cut[itype][jtype];
arg = MY_PI*r/cut[itype][jtype];
if (r > 0.0) fpair = factor_lj * prefactor[itype][jtype] *
sin(arg) * PI/cut[itype][jtype]/r;
sin(arg) * MY_PI/cut[itype][jtype]/r;
else fpair = 0.0;
f[i][0] += delx*fpair;
@ -290,9 +289,9 @@ double PairSoft::single(int i, int j, int itype, int jtype, double rsq,
double r,arg,philj;
r = sqrt(rsq);
arg = PI*r/cut[itype][jtype];
arg = MY_PI*r/cut[itype][jtype];
fforce = factor_lj * prefactor[itype][jtype] *
sin(arg) * PI/cut[itype][jtype]/r;
sin(arg) * MY_PI/cut[itype][jtype]/r;
philj = prefactor[itype][jtype] * (1.0+cos(arg));
return factor_lj*philj;