forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11055 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
1f844fd910
commit
8fb13f4671
|
@ -195,8 +195,10 @@ void BondHarmonicShift::read_restart(FILE *fp)
|
||||||
|
|
||||||
void BondHarmonicShift::write_data(FILE *fp)
|
void BondHarmonicShift::write_data(FILE *fp)
|
||||||
{
|
{
|
||||||
for (int i = 1; i <= atom->nbondtypes; i++)
|
for (int i = 1; i <= atom->nbondtypes; i++) {
|
||||||
fprintf(fp,"%d %g %g %g\n",i,k[i],r0[i],r1[i]);
|
double d2 = (r0[i]-r1[i])*(r0[i]-r1[i]);
|
||||||
|
fprintf(fp,"%d %g %g %g\n",i,k[i]*d2,r0[i],r1[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
|
@ -117,6 +117,7 @@ void BondHarmonicShiftCut::allocate()
|
||||||
memory->create(r0, n+1,"bond:r0");
|
memory->create(r0, n+1,"bond:r0");
|
||||||
memory->create(r1, n+1,"bond:r1");
|
memory->create(r1, n+1,"bond:r1");
|
||||||
memory->create(setflag,n+1,"bond:setflag");
|
memory->create(setflag,n+1,"bond:setflag");
|
||||||
|
|
||||||
for (int i = 1; i <= n; i++) setflag[i] = 0;
|
for (int i = 1; i <= n; i++) setflag[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,8 +197,10 @@ void BondHarmonicShiftCut::read_restart(FILE *fp)
|
||||||
|
|
||||||
void BondHarmonicShiftCut::write_data(FILE *fp)
|
void BondHarmonicShiftCut::write_data(FILE *fp)
|
||||||
{
|
{
|
||||||
for (int i = 1; i <= atom->nbondtypes; i++)
|
for (int i = 1; i <= atom->nbondtypes; i++) {
|
||||||
fprintf(fp,"%d %g %g %g\n",i,k[i],r0[i],r1[i]);
|
double d2 = (r0[i]-r1[i])*(r0[i]-r1[i]);
|
||||||
|
fprintf(fp,"%d %g %g %g\n",i,k[i]*d2,r0[i],r1[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
Loading…
Reference in New Issue