forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9752 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
c87f384140
commit
0be82bdfa0
|
@ -195,6 +195,16 @@ void BondClass2::read_restart(FILE *fp)
|
|||
for (int i = 1; i <= atom->nbondtypes; i++) setflag[i] = 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void BondClass2::write_data(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->nbondtypes; i++)
|
||||
fprintf(fp,"%d %g %g %g %g\n",i,r0[i],k2[i],k3[i],k4[i]);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double BondClass2::single(int type, double rsq, int i, int j, double &fforce)
|
||||
|
|
|
@ -34,6 +34,7 @@ class BondClass2 : public Bond {
|
|||
double equilibrium_distance(int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -29,7 +29,6 @@ using namespace LAMMPS_NS;
|
|||
|
||||
BondFENE::BondFENE(LAMMPS *lmp) : Bond(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
TWO_1_3 = pow(2.0,(1.0/3.0));
|
||||
}
|
||||
|
||||
|
|
|
@ -240,6 +240,16 @@ void BondFENEExpand::read_restart(FILE *fp)
|
|||
for (int i = 1; i <= atom->nbondtypes; i++) setflag[i] = 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void BondFENEExpand::write_data(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->nbondtypes; i++)
|
||||
fprintf(fp,"%d %g %g %g %g %g\n",i,k[i],r0[i],epsilon[i],sigma[i],shift[i]);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double BondFENEExpand::single(int type, double rsq, int i, int j,
|
||||
|
|
|
@ -35,6 +35,7 @@ class BondFENEExpand : public Bond {
|
|||
double equilibrium_distance(int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -174,6 +174,16 @@ void BondHarmonic::read_restart(FILE *fp)
|
|||
for (int i = 1; i <= atom->nbondtypes; i++) setflag[i] = 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void BondHarmonic::write_data(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->nbondtypes; i++)
|
||||
fprintf(fp,"%d %g %g\n",i,k[i],r0[i]);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double BondHarmonic::single(int type, double rsq, int i, int j,
|
||||
|
|
|
@ -34,6 +34,7 @@ class BondHarmonic : public Bond {
|
|||
double equilibrium_distance(int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -184,6 +184,16 @@ void BondMorse::read_restart(FILE *fp)
|
|||
for (int i = 1; i <= atom->nbondtypes; i++) setflag[i] = 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void BondMorse::write_data(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->nbondtypes; i++)
|
||||
fprintf(fp,"%d %g %g %g\n",i,d0[i],alpha[i],r0[i]);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double BondMorse::single(int type, double rsq, int i, int j,
|
||||
|
|
|
@ -34,6 +34,7 @@ class BondMorse : public Bond {
|
|||
double equilibrium_distance(int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -179,6 +179,16 @@ void BondNonlinear::read_restart(FILE *fp)
|
|||
for (int i = 1; i <= atom->nbondtypes; i++) setflag[i] = 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void BondNonlinear::write_data(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->nbondtypes; i++)
|
||||
fprintf(fp,"%d %g %g %g\n",i,epsilon[i],r0[i],lamda[i]);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double BondNonlinear::single(int type, double rsq, int i, int j,
|
||||
|
|
|
@ -34,6 +34,7 @@ class BondNonlinear : public Bond {
|
|||
double equilibrium_distance(int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -293,6 +293,15 @@ void BondQuartic::read_restart(FILE *fp)
|
|||
for (int i = 1; i <= atom->nbondtypes; i++) setflag[i] = 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void BondQuartic::write_data(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->nbondtypes; i++)
|
||||
fprintf(fp,"%d %g %g %g %g %g\n",i,k[i],b1[i],b2[i],rc[i],u0[i]);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ class BondQuartic : public Bond {
|
|||
double equilibrium_distance(int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -37,6 +37,7 @@ enum{LINEAR,SPLINE};
|
|||
|
||||
BondTable::BondTable(LAMMPS *lmp) : Bond(lmp)
|
||||
{
|
||||
writedata = 0;
|
||||
ntables = 0;
|
||||
tables = NULL;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ using namespace LAMMPS_NS;
|
|||
Bond::Bond(LAMMPS *lmp) : Pointers(lmp)
|
||||
{
|
||||
energy = 0.0;
|
||||
writedata = 0;
|
||||
writedata = 1;
|
||||
|
||||
allocated = 0;
|
||||
suffix_flag = Suffix::NONE;
|
||||
|
|
|
@ -31,6 +31,7 @@ using namespace LAMMPS_NS;
|
|||
|
||||
BondHybrid::BondHybrid(LAMMPS *lmp) : Bond(lmp)
|
||||
{
|
||||
writedata = 0;
|
||||
nstyles = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue