git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8391 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -71,7 +71,6 @@ void BondHarmonicShift::compute(int eflag, int vflag)
|
||||
delx = x[i1][0] - x[i2][0];
|
||||
dely = x[i1][1] - x[i2][1];
|
||||
delz = x[i1][2] - x[i2][2];
|
||||
domain->minimum_image(delx,dely,delz);
|
||||
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
r = sqrt(rsq);
|
||||
@ -84,7 +83,8 @@ void BondHarmonicShift::compute(int eflag, int vflag)
|
||||
if (r > 0.0) fbond = -2.0*rk/r;
|
||||
else fbond = 0.0;
|
||||
|
||||
if (eflag) ebond = k[type]*(dr*dr -(r0[type]-r1[type])*(r0[type]-r1[type]) );
|
||||
if (eflag)
|
||||
ebond = k[type]*(dr*dr -(r0[type]-r1[type])*(r0[type]-r1[type]) );
|
||||
|
||||
// apply force to each of 2 atoms
|
||||
|
||||
|
||||
Reference in New Issue
Block a user