git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11044 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -52,6 +52,7 @@ PairGayBerne::PairGayBerne(LAMMPS *lmp) : Pair(lmp)
|
|||||||
if (lmp->citeme) lmp->citeme->add(cite_pair_gayberne);
|
if (lmp->citeme) lmp->citeme->add(cite_pair_gayberne);
|
||||||
|
|
||||||
single_enable = 0;
|
single_enable = 0;
|
||||||
|
writedata = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
@ -522,6 +523,27 @@ void PairGayBerne::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairGayBerne::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g\n",i,epsilon[i][i],sigma[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairGayBerne::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g\n",i,j,epsilon[i][j],sigma[i][j],cut[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
compute analytic energy, force (fforce), and torque (ttor & rtor)
|
compute analytic energy, force (fforce), and torque (ttor & rtor)
|
||||||
based on rotation matrices a and precomputed matrices b and g
|
based on rotation matrices a and precomputed matrices b and g
|
||||||
|
|||||||
@ -37,6 +37,8 @@ class PairGayBerne : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum{SPHERE_SPHERE,SPHERE_ELLIPSE,ELLIPSE_SPHERE,ELLIPSE_ELLIPSE};
|
enum{SPHERE_SPHERE,SPHERE_ELLIPSE,ELLIPSE_SPHERE,ELLIPSE_ELLIPSE};
|
||||||
|
|||||||
@ -34,7 +34,10 @@ using namespace MathSpecial;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
PairColloid::PairColloid(LAMMPS *lmp) : Pair(lmp) {}
|
PairColloid::PairColloid(LAMMPS *lmp) : Pair(lmp)
|
||||||
|
{
|
||||||
|
writedata = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -442,6 +445,28 @@ void PairColloid::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairColloid::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g %g %g\n",i,a12[i][i],sigma[i][i],d1[i][i],d2[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairColloid::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %g %g %g %g %g\n",i,
|
||||||
|
a12[i][j],sigma[i][j],d1[i][j],d2[i][j],cut[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairColloid::single(int i, int j, int itype, int jtype, double rsq,
|
double PairColloid::single(int i, int j, int itype, int jtype, double rsq,
|
||||||
|
|||||||
@ -36,6 +36,8 @@ class PairColloid : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
double single(int, int, int, int, double, double, double, double &);
|
double single(int, int, int, int, double, double, double, double &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -31,7 +31,10 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
PairYukawaColloid::PairYukawaColloid(LAMMPS *lmp) : PairYukawa(lmp) {}
|
PairYukawaColloid::PairYukawaColloid(LAMMPS *lmp) : PairYukawa(lmp)
|
||||||
|
{
|
||||||
|
writedata = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|||||||
@ -47,6 +47,7 @@ PairBornCoulLong::PairBornCoulLong(LAMMPS *lmp) : Pair(lmp)
|
|||||||
{
|
{
|
||||||
ewaldflag = pppmflag = 1;
|
ewaldflag = pppmflag = 1;
|
||||||
ftable = NULL;
|
ftable = NULL;
|
||||||
|
writedata = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -483,6 +484,29 @@ void PairBornCoulLong::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&tabinner,1,MPI_DOUBLE,0,world);
|
MPI_Bcast(&tabinner,1,MPI_DOUBLE,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairBornCoulLong::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g %g %g %g\n",i,
|
||||||
|
a[i][i],rho[i][i],sigma[i][i],c[i][i],d[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairBornCoulLong::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g %g %g %g\n",i,j,
|
||||||
|
a[i][j],rho[i][j],sigma[i][j],c[i][j],d[i][j],cut_lj[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairBornCoulLong::single(int i, int j, int itype, int jtype,
|
double PairBornCoulLong::single(int i, int j, int itype, int jtype,
|
||||||
|
|||||||
@ -37,6 +37,8 @@ class PairBornCoulLong : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
virtual double single(int, int, int, int, double, double, double, double &);
|
virtual double single(int, int, int, int, double, double, double, double &);
|
||||||
virtual void *extract(const char *, int &);
|
virtual void *extract(const char *, int &);
|
||||||
|
|
||||||
|
|||||||
@ -42,6 +42,7 @@ using namespace MathConst;
|
|||||||
PairBuckCoulLong::PairBuckCoulLong(LAMMPS *lmp) : Pair(lmp)
|
PairBuckCoulLong::PairBuckCoulLong(LAMMPS *lmp) : Pair(lmp)
|
||||||
{
|
{
|
||||||
ewaldflag = pppmflag = 1;
|
ewaldflag = pppmflag = 1;
|
||||||
|
writedata = 1;
|
||||||
ftable = NULL;
|
ftable = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -454,6 +455,28 @@ void PairBuckCoulLong::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&tabinner,1,MPI_DOUBLE,0,world);
|
MPI_Bcast(&tabinner,1,MPI_DOUBLE,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairBuckCoulLong::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g %g\n",i,a[i][i],rho[i][i],c[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairBuckCoulLong::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g %g\n",i,j,
|
||||||
|
a[i][j],rho[i][j],c[i][j],cut_lj[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairBuckCoulLong::single(int i, int j, int itype, int jtype,
|
double PairBuckCoulLong::single(int i, int j, int itype, int jtype,
|
||||||
|
|||||||
@ -37,6 +37,8 @@ class PairBuckCoulLong : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
virtual double single(int, int, int, int, double, double, double, double &);
|
virtual double single(int, int, int, int, double, double, double, double &);
|
||||||
virtual void *extract(const char *, int &);
|
virtual void *extract(const char *, int &);
|
||||||
|
|
||||||
|
|||||||
@ -50,6 +50,7 @@ PairBuckLongCoulLong::PairBuckLongCoulLong(LAMMPS *lmp) : Pair(lmp)
|
|||||||
{
|
{
|
||||||
dispersionflag = ewaldflag = pppmflag = 1;
|
dispersionflag = ewaldflag = pppmflag = 1;
|
||||||
respa_enable = 1;
|
respa_enable = 1;
|
||||||
|
writedata = 1;
|
||||||
ftable = NULL;
|
ftable = NULL;
|
||||||
fdisptable = NULL;
|
fdisptable = NULL;
|
||||||
}
|
}
|
||||||
@ -89,11 +90,13 @@ void PairBuckLongCoulLong::settings(int narg, char **arg)
|
|||||||
error->warning(FLERR,"Geometric mixing assumed for 1/r^6 coefficients");
|
error->warning(FLERR,"Geometric mixing assumed for 1/r^6 coefficients");
|
||||||
if (!comm->me && ewald_order == ((1<<1) | (1<<6)))
|
if (!comm->me && ewald_order == ((1<<1) | (1<<6)))
|
||||||
error->warning(FLERR,"Using largest cutoff for buck/long/coul/long");
|
error->warning(FLERR,"Using largest cutoff for buck/long/coul/long");
|
||||||
if (!*(++arg)) error->all(FLERR,"Cutoffs missing in pair_style buck/long/coul/long");
|
if (!*(++arg))
|
||||||
|
error->all(FLERR,"Cutoffs missing in pair_style buck/long/coul/long");
|
||||||
if (ewald_off & (1<<6))
|
if (ewald_off & (1<<6))
|
||||||
error->all(FLERR,"LJ6 off not supported in pair_style buck/long/coul/long");
|
error->all(FLERR,"LJ6 off not supported in pair_style buck/long/coul/long");
|
||||||
if (!((ewald_order^ewald_off) & (1<<1)))
|
if (!((ewald_order^ewald_off) & (1<<1)))
|
||||||
error->all(FLERR,"Coulomb cut not supported in pair_style buck/long/coul/coul");
|
error->all(FLERR,
|
||||||
|
"Coulomb cut not supported in pair_style buck/long/coul/coul");
|
||||||
cut_buck_global = force->numeric(FLERR,*(arg++));
|
cut_buck_global = force->numeric(FLERR,*(arg++));
|
||||||
if (narg == 4 && ((ewald_order & 0x42) == 0x42))
|
if (narg == 4 && ((ewald_order & 0x42) == 0x42))
|
||||||
error->all(FLERR,"Only one cutoff allowed when requesting all long");
|
error->all(FLERR,"Only one cutoff allowed when requesting all long");
|
||||||
@ -437,6 +440,29 @@ void PairBuckLongCoulLong::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&ewald_order,1,MPI_INT,0,world);
|
MPI_Bcast(&ewald_order,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairBuckLongCoulLong::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g %g\n",i,
|
||||||
|
buck_a_read[i][i],buck_rho_read[i][i],buck_c_read[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairBuckLongCoulLong::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g\n",i,j,
|
||||||
|
buck_a_read[i][j],buck_rho_read[i][j],buck_c_read[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
compute pair interactions
|
compute pair interactions
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -39,9 +39,10 @@ class PairBuckLongCoulLong : public Pair {
|
|||||||
double init_one(int, int);
|
double init_one(int, int);
|
||||||
void write_restart(FILE *);
|
void write_restart(FILE *);
|
||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
|
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
double single(int, int, int, int, double, double, double, double &);
|
double single(int, int, int, int, double, double, double, double &);
|
||||||
void *extract(const char *, int &);
|
void *extract(const char *, int &);
|
||||||
|
|
||||||
|
|||||||
@ -54,6 +54,7 @@ PairLJCutTIP4PLong::PairLJCutTIP4PLong(LAMMPS *lmp) :
|
|||||||
tip4pflag = 1;
|
tip4pflag = 1;
|
||||||
single_enable = 0;
|
single_enable = 0;
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
|
writedata = 1;
|
||||||
|
|
||||||
nmax = 0;
|
nmax = 0;
|
||||||
hneigh = NULL;
|
hneigh = NULL;
|
||||||
|
|||||||
@ -52,6 +52,7 @@ PairLJLongCoulLong::PairLJLongCoulLong(LAMMPS *lmp) : Pair(lmp)
|
|||||||
{
|
{
|
||||||
dispersionflag = ewaldflag = pppmflag = 1;
|
dispersionflag = ewaldflag = pppmflag = 1;
|
||||||
respa_enable = 1;
|
respa_enable = 1;
|
||||||
|
writedata = 1;
|
||||||
ftable = NULL;
|
ftable = NULL;
|
||||||
fdisptable = NULL;
|
fdisptable = NULL;
|
||||||
qdist = 0.0;
|
qdist = 0.0;
|
||||||
@ -444,6 +445,28 @@ void PairLJLongCoulLong::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&ewald_order,1,MPI_INT,0,world);
|
MPI_Bcast(&ewald_order,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairLJLongCoulLong::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g\n",i,epsilon_read[i][i],sigma_read[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairLJLongCoulLong::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g\n",i,j,
|
||||||
|
epsilon_read[i][j],sigma_read[i][j],cut_lj_read[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
compute pair interactions
|
compute pair interactions
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -38,9 +38,10 @@ class PairLJLongCoulLong : public Pair {
|
|||||||
double init_one(int, int);
|
double init_one(int, int);
|
||||||
void write_restart(FILE *);
|
void write_restart(FILE *);
|
||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
|
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
double single(int, int, int, int, double, double, double, double &);
|
double single(int, int, int, int, double, double, double, double &);
|
||||||
void *extract(const char *, int &);
|
void *extract(const char *, int &);
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,7 @@ using namespace MathConst;
|
|||||||
PairLJCutTIP4PCut::PairLJCutTIP4PCut(LAMMPS *lmp) : Pair(lmp)
|
PairLJCutTIP4PCut::PairLJCutTIP4PCut(LAMMPS *lmp) : Pair(lmp)
|
||||||
{
|
{
|
||||||
single_enable = 0;
|
single_enable = 0;
|
||||||
|
writedata = 1;
|
||||||
|
|
||||||
nmax = 0;
|
nmax = 0;
|
||||||
hneigh = NULL;
|
hneigh = NULL;
|
||||||
@ -676,6 +677,27 @@ void PairLJCutTIP4PCut::read_restart_settings(FILE *fp)
|
|||||||
cut_coulsqplus = (cut_coul + 2.0*qdist) * (cut_coul + 2.0*qdist);
|
cut_coulsqplus = (cut_coul + 2.0*qdist) * (cut_coul + 2.0*qdist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairLJCutTIP4PCut::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g\n",i,epsilon[i][i],sigma[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairLJCutTIP4PCut::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g\n",i,j,epsilon[i][j],sigma[i][j],cut_lj[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
compute position xM of fictitious charge site for O atom and 2 H atoms
|
compute position xM of fictitious charge site for O atom and 2 H atoms
|
||||||
return it as xM
|
return it as xM
|
||||||
|
|||||||
@ -37,6 +37,8 @@ class PairLJCutTIP4PCut : public Pair {
|
|||||||
virtual void read_restart_settings(FILE *);
|
virtual void read_restart_settings(FILE *);
|
||||||
void write_restart(FILE *);
|
void write_restart(FILE *);
|
||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
double memory_usage();
|
double memory_usage();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -75,11 +75,14 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator)
|
|||||||
int partscreenflag = 0;
|
int partscreenflag = 0;
|
||||||
int partlogflag = 0;
|
int partlogflag = 0;
|
||||||
int cudaflag = -1;
|
int cudaflag = -1;
|
||||||
|
int restartflag = 0;
|
||||||
int citeflag = 1;
|
int citeflag = 1;
|
||||||
int helpflag = 0;
|
int helpflag = 0;
|
||||||
|
|
||||||
suffix = NULL;
|
suffix = NULL;
|
||||||
suffix_enable = 0;
|
suffix_enable = 0;
|
||||||
|
char *rfile = NULL;
|
||||||
|
char *dfile = NULL;
|
||||||
|
|
||||||
int iarg = 1;
|
int iarg = 1;
|
||||||
while (iarg < narg) {
|
while (iarg < narg) {
|
||||||
@ -153,13 +156,21 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator)
|
|||||||
suffix_enable = 1;
|
suffix_enable = 1;
|
||||||
iarg += 2;
|
iarg += 2;
|
||||||
} else if (strcmp(arg[iarg],"-reorder") == 0 ||
|
} else if (strcmp(arg[iarg],"-reorder") == 0 ||
|
||||||
strcmp(arg[iarg],"-r") == 0) {
|
strcmp(arg[iarg],"-ro") == 0) {
|
||||||
if (iarg+3 > narg)
|
if (iarg+3 > narg)
|
||||||
error->universe_all(FLERR,"Invalid command-line argument");
|
error->universe_all(FLERR,"Invalid command-line argument");
|
||||||
if (universe->existflag)
|
if (universe->existflag)
|
||||||
error->universe_all(FLERR,"Cannot use -reorder after -partition");
|
error->universe_all(FLERR,"Cannot use -reorder after -partition");
|
||||||
universe->reorder(arg[iarg+1],arg[iarg+2]);
|
universe->reorder(arg[iarg+1],arg[iarg+2]);
|
||||||
iarg += 3;
|
iarg += 3;
|
||||||
|
} else if (strcmp(arg[iarg],"-restart") == 0 ||
|
||||||
|
strcmp(arg[iarg],"-r") == 0) {
|
||||||
|
if (iarg+3 > narg)
|
||||||
|
error->universe_all(FLERR,"Invalid command-line argument");
|
||||||
|
restartflag = 1;
|
||||||
|
rfile = arg[iarg+1];
|
||||||
|
dfile = arg[iarg+2];
|
||||||
|
iarg += 3;
|
||||||
} else if (strcmp(arg[iarg],"-nocite") == 0 ||
|
} else if (strcmp(arg[iarg],"-nocite") == 0 ||
|
||||||
strcmp(arg[iarg],"-nc") == 0) {
|
strcmp(arg[iarg],"-nc") == 0) {
|
||||||
citeflag = 0;
|
citeflag = 0;
|
||||||
@ -423,6 +434,17 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator)
|
|||||||
if (universe->me == 0 && screen) help();
|
if (universe->me == 0 && screen) help();
|
||||||
error->done();
|
error->done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if restartflag set, process 2 command and quit
|
||||||
|
|
||||||
|
if (restartflag) {
|
||||||
|
char cmd[128];
|
||||||
|
sprintf(cmd,"read_restart %s\n",rfile);
|
||||||
|
input->one(cmd);
|
||||||
|
sprintf(cmd,"write_data %s\n",dfile);
|
||||||
|
input->one(cmd);
|
||||||
|
error->done();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|||||||
@ -33,7 +33,10 @@ using namespace MathConst;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
PairBorn::PairBorn(LAMMPS *lmp) : Pair(lmp) {}
|
PairBorn::PairBorn(LAMMPS *lmp) : Pair(lmp)
|
||||||
|
{
|
||||||
|
writedata = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -379,6 +382,29 @@ void PairBorn::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&tail_flag,1,MPI_INT,0,world);
|
MPI_Bcast(&tail_flag,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairBorn::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g %g %g %g\n",i,
|
||||||
|
a[i][i],rho[i][i],sigma[i][i],c[i][i],d[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairBorn::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g %g %g %g\n",i,j,
|
||||||
|
a[i][j],rho[i][j],sigma[i][j],c[i][j],d[i][j],cut[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairBorn::single(int i, int j, int itype, int jtype,
|
double PairBorn::single(int i, int j, int itype, int jtype,
|
||||||
|
|||||||
@ -37,6 +37,8 @@ class PairBorn : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
double single(int, int, int, int, double, double, double, double &);
|
double single(int, int, int, int, double, double, double, double &);
|
||||||
void *extract(const char *, int &);
|
void *extract(const char *, int &);
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,10 @@ using namespace MathConst;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
PairBornCoulWolf::PairBornCoulWolf(LAMMPS *lmp) : Pair(lmp) {}
|
PairBornCoulWolf::PairBornCoulWolf(LAMMPS *lmp) : Pair(lmp)
|
||||||
|
{
|
||||||
|
writedata = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -413,6 +416,29 @@ void PairBornCoulWolf::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairBornCoulWolf::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g %g %g %g\n",i,
|
||||||
|
a[i][i],rho[i][i],sigma[i][i],c[i][i],d[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairBornCoulWolf::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g %g %g %g\n",i,j,
|
||||||
|
a[i][j],rho[i][j],sigma[i][j],c[i][j],d[i][j],cut_lj[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
only the pair part is calculated here
|
only the pair part is calculated here
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -37,6 +37,8 @@ class PairBornCoulWolf : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
double single(int, int, int, int, double, double, double, double &);
|
double single(int, int, int, int, double, double, double, double &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -29,7 +29,10 @@ using namespace MathConst;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
PairBuck::PairBuck(LAMMPS *lmp) : Pair(lmp) {}
|
PairBuck::PairBuck(LAMMPS *lmp) : Pair(lmp)
|
||||||
|
{
|
||||||
|
writedata = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -350,6 +353,28 @@ void PairBuck::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&tail_flag,1,MPI_INT,0,world);
|
MPI_Bcast(&tail_flag,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairBuck::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g %g\n",i,a[i][i],rho[i][i],c[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairBuck::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g %g\n",i,j,
|
||||||
|
a[i][j],rho[i][j],c[i][j],cut[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairBuck::single(int i, int j, int itype, int jtype,
|
double PairBuck::single(int i, int j, int itype, int jtype,
|
||||||
|
|||||||
@ -36,6 +36,8 @@ class PairBuck : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
double single(int, int, int, int, double, double, double, double &);
|
double single(int, int, int, int, double, double, double, double &);
|
||||||
void *extract(const char *, int &);
|
void *extract(const char *, int &);
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,10 @@ using namespace MathConst;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
PairBuckCoulCut::PairBuckCoulCut(LAMMPS *lmp) : Pair(lmp) {}
|
PairBuckCoulCut::PairBuckCoulCut(LAMMPS *lmp) : Pair(lmp)
|
||||||
|
{
|
||||||
|
writedata = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -216,7 +219,8 @@ void PairBuckCoulCut::settings(int narg, char **arg)
|
|||||||
|
|
||||||
void PairBuckCoulCut::coeff(int narg, char **arg)
|
void PairBuckCoulCut::coeff(int narg, char **arg)
|
||||||
{
|
{
|
||||||
if (narg < 5 || narg > 7) error->all(FLERR,"Incorrect args for pair coefficients");
|
if (narg < 5 || narg > 7)
|
||||||
|
error->all(FLERR,"Incorrect args for pair coefficients");
|
||||||
if (!allocated) allocate();
|
if (!allocated) allocate();
|
||||||
|
|
||||||
int ilo,ihi,jlo,jhi;
|
int ilo,ihi,jlo,jhi;
|
||||||
@ -411,6 +415,28 @@ void PairBuckCoulCut::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&tail_flag,1,MPI_INT,0,world);
|
MPI_Bcast(&tail_flag,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairBuckCoulCut::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g %g\n",i,a[i][i],rho[i][i],c[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairBuckCoulCut::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g %g %g\n",i,j,
|
||||||
|
a[i][j],rho[i][j],c[i][j],cut_lj[i][j],cut_coul[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairBuckCoulCut::single(int i, int j, int itype, int jtype,
|
double PairBuckCoulCut::single(int i, int j, int itype, int jtype,
|
||||||
|
|||||||
@ -37,6 +37,8 @@ class PairBuckCoulCut : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
virtual void write_restart_settings(FILE *);
|
virtual void write_restart_settings(FILE *);
|
||||||
virtual void read_restart_settings(FILE *);
|
virtual void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
virtual double single(int, int, int, int, double, double, double, double &);
|
virtual double single(int, int, int, int, double, double, double, double &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -34,10 +34,7 @@ using namespace MathConst;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
PairCoulWolf::PairCoulWolf(LAMMPS *lmp) : Pair(lmp)
|
PairCoulWolf::PairCoulWolf(LAMMPS *lmp) : Pair(lmp) {}
|
||||||
{
|
|
||||||
writedata = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,7 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
PairDPD::PairDPD(LAMMPS *lmp) : Pair(lmp)
|
PairDPD::PairDPD(LAMMPS *lmp) : Pair(lmp)
|
||||||
{
|
{
|
||||||
|
writedata = 1;
|
||||||
random = NULL;
|
random = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -361,6 +362,27 @@ void PairDPD::read_restart_settings(FILE *fp)
|
|||||||
random = new RanMars(lmp,seed + comm->me);
|
random = new RanMars(lmp,seed + comm->me);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairDPD::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g\n",i,a0[i][i],gamma[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairDPD::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g\n",i,j,a0[i][j],gamma[i][j],cut[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairDPD::single(int i, int j, int itype, int jtype, double rsq,
|
double PairDPD::single(int i, int j, int itype, int jtype, double rsq,
|
||||||
|
|||||||
@ -33,10 +33,12 @@ class PairDPD : public Pair {
|
|||||||
virtual void coeff(int, char **);
|
virtual void coeff(int, char **);
|
||||||
void init_style();
|
void init_style();
|
||||||
double init_one(int, int);
|
double init_one(int, int);
|
||||||
void write_restart(FILE *);
|
virtual void write_restart(FILE *);
|
||||||
void read_restart(FILE *);
|
virtual void read_restart(FILE *);
|
||||||
virtual void write_restart_settings(FILE *);
|
virtual void write_restart_settings(FILE *);
|
||||||
virtual void read_restart_settings(FILE *);
|
virtual void read_restart_settings(FILE *);
|
||||||
|
virtual void write_data(FILE *);
|
||||||
|
virtual void write_data_all(FILE *);
|
||||||
double single(int, int, int, int, double, double, double, double &);
|
double single(int, int, int, int, double, double, double, double &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -30,6 +30,7 @@ using namespace LAMMPS_NS;
|
|||||||
PairDPDTstat::PairDPDTstat(LAMMPS *lmp) : PairDPD(lmp)
|
PairDPDTstat::PairDPDTstat(LAMMPS *lmp) : PairDPD(lmp)
|
||||||
{
|
{
|
||||||
single_enable = 0;
|
single_enable = 0;
|
||||||
|
writedata = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -201,6 +202,52 @@ void PairDPDTstat::coeff(int narg, char **arg)
|
|||||||
proc 0 writes to restart file
|
proc 0 writes to restart file
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairDPDTstat::write_restart(FILE *fp)
|
||||||
|
{
|
||||||
|
write_restart_settings(fp);
|
||||||
|
|
||||||
|
int i,j;
|
||||||
|
for (i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (j = i; j <= atom->ntypes; j++) {
|
||||||
|
fwrite(&setflag[i][j],sizeof(int),1,fp);
|
||||||
|
if (setflag[i][j]) {
|
||||||
|
fwrite(&gamma[i][j],sizeof(double),1,fp);
|
||||||
|
fwrite(&cut[i][j],sizeof(double),1,fp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 reads from restart file, bcasts
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairDPDTstat::read_restart(FILE *fp)
|
||||||
|
{
|
||||||
|
read_restart_settings(fp);
|
||||||
|
|
||||||
|
allocate();
|
||||||
|
|
||||||
|
int i,j;
|
||||||
|
int me = comm->me;
|
||||||
|
for (i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (j = i; j <= atom->ntypes; j++) {
|
||||||
|
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp);
|
||||||
|
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
|
||||||
|
if (setflag[i][j]) {
|
||||||
|
if (me == 0) {
|
||||||
|
fread(&gamma[i][j],sizeof(double),1,fp);
|
||||||
|
fread(&cut[i][j],sizeof(double),1,fp);
|
||||||
|
}
|
||||||
|
MPI_Bcast(&gamma[i][j],1,MPI_DOUBLE,0,world);
|
||||||
|
MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to restart file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void PairDPDTstat::write_restart_settings(FILE *fp)
|
void PairDPDTstat::write_restart_settings(FILE *fp)
|
||||||
{
|
{
|
||||||
fwrite(&t_start,sizeof(double),1,fp);
|
fwrite(&t_start,sizeof(double),1,fp);
|
||||||
@ -237,3 +284,24 @@ void PairDPDTstat::read_restart_settings(FILE *fp)
|
|||||||
if (random) delete random;
|
if (random) delete random;
|
||||||
random = new RanMars(lmp,seed + comm->me);
|
random = new RanMars(lmp,seed + comm->me);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairDPDTstat::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g\n",i,gamma[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairDPDTstat::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g\n",i,j,gamma[i][j],cut[i][j]);
|
||||||
|
}
|
||||||
|
|||||||
@ -31,8 +31,12 @@ class PairDPDTstat : public PairDPD {
|
|||||||
void compute(int, int);
|
void compute(int, int);
|
||||||
void settings(int, char **);
|
void settings(int, char **);
|
||||||
void coeff(int, char **);
|
void coeff(int, char **);
|
||||||
|
void write_restart(FILE *);
|
||||||
|
void read_restart(FILE *);
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double t_start,t_stop;
|
double t_start,t_stop;
|
||||||
|
|||||||
@ -41,6 +41,7 @@ using namespace MathConst;
|
|||||||
PairLJ96Cut::PairLJ96Cut(LAMMPS *lmp) : Pair(lmp)
|
PairLJ96Cut::PairLJ96Cut(LAMMPS *lmp) : Pair(lmp)
|
||||||
{
|
{
|
||||||
respa_enable = 1;
|
respa_enable = 1;
|
||||||
|
writedata = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -685,6 +686,27 @@ void PairLJ96Cut::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&tail_flag,1,MPI_INT,0,world);
|
MPI_Bcast(&tail_flag,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairLJ96Cut::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g\n",i,epsilon[i][i],sigma[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairLJ96Cut::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g\n",i,j,epsilon[i][j],sigma[i][j],cut[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairLJ96Cut::single(int i, int j, int itype, int jtype, double rsq,
|
double PairLJ96Cut::single(int i, int j, int itype, int jtype, double rsq,
|
||||||
|
|||||||
@ -39,6 +39,8 @@ class PairLJ96Cut : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
double single(int, int, int, int, double, double, double, double &);
|
double single(int, int, int, int, double, double, double, double &);
|
||||||
|
|
||||||
void compute_inner();
|
void compute_inner();
|
||||||
|
|||||||
@ -32,7 +32,10 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
PairLJGromacs::PairLJGromacs(LAMMPS *lmp) : Pair(lmp) {}
|
PairLJGromacs::PairLJGromacs(LAMMPS *lmp) : Pair(lmp)
|
||||||
|
{
|
||||||
|
writedata = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -385,6 +388,28 @@ void PairLJGromacs::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairLJGromacs::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g\n",i,epsilon[i][i],sigma[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairLJGromacs::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g %g\n",i,j,
|
||||||
|
epsilon[i][j],sigma[i][j],cut_inner[i][j],cut[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairLJGromacs::single(int i, int j, int itype, int jtype,
|
double PairLJGromacs::single(int i, int j, int itype, int jtype,
|
||||||
|
|||||||
@ -36,6 +36,8 @@ class PairLJGromacs : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
virtual void write_restart_settings(FILE *);
|
virtual void write_restart_settings(FILE *);
|
||||||
virtual void read_restart_settings(FILE *);
|
virtual void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
virtual double single(int, int, int, int, double, double, double, double &);
|
virtual double single(int, int, int, int, double, double, double, double &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -32,7 +32,10 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
PairLJGromacsCoulGromacs::PairLJGromacsCoulGromacs(LAMMPS *lmp) : Pair(lmp) {}
|
PairLJGromacsCoulGromacs::PairLJGromacsCoulGromacs(LAMMPS *lmp) : Pair(lmp)
|
||||||
|
{
|
||||||
|
writedata = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -268,7 +271,8 @@ void PairLJGromacsCoulGromacs::coeff(int narg, char **arg)
|
|||||||
void PairLJGromacsCoulGromacs::init_style()
|
void PairLJGromacsCoulGromacs::init_style()
|
||||||
{
|
{
|
||||||
if (!atom->q_flag)
|
if (!atom->q_flag)
|
||||||
error->all(FLERR,"Pair style lj/gromacs/coul/gromacs requires atom attribute q");
|
error->all(FLERR,
|
||||||
|
"Pair style lj/gromacs/coul/gromacs requires atom attribute q");
|
||||||
|
|
||||||
neighbor->request(this);
|
neighbor->request(this);
|
||||||
|
|
||||||
@ -423,6 +427,27 @@ void PairLJGromacsCoulGromacs::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairLJGromacsCoulGromacs::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g\n",i,epsilon[i][i],sigma[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairLJGromacsCoulGromacs::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g\n",i,j,epsilon[i][j],sigma[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairLJGromacsCoulGromacs::single(int i, int j, int itype, int jtype,
|
double PairLJGromacsCoulGromacs::single(int i, int j, int itype, int jtype,
|
||||||
|
|||||||
@ -37,6 +37,8 @@ class PairLJGromacsCoulGromacs : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
virtual void write_restart_settings(FILE *);
|
virtual void write_restart_settings(FILE *);
|
||||||
virtual void read_restart_settings(FILE *);
|
virtual void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
virtual double single(int, int, int, int, double, double, double, double &);
|
virtual double single(int, int, int, int, double, double, double, double &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -30,7 +30,10 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
PairLJSmooth::PairLJSmooth(LAMMPS *lmp) : Pair(lmp) {}
|
PairLJSmooth::PairLJSmooth(LAMMPS *lmp) : Pair(lmp)
|
||||||
|
{
|
||||||
|
writedata = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -398,6 +401,28 @@ void PairLJSmooth::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairLJSmooth::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g\n",i,epsilon[i][i],sigma[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairLJSmooth::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g %g\n",i,j,
|
||||||
|
epsilon[i][j],sigma[i][j],cut_inner[i][j],cut[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairLJSmooth::single(int i, int j, int itype, int jtype, double rsq,
|
double PairLJSmooth::single(int i, int j, int itype, int jtype, double rsq,
|
||||||
|
|||||||
@ -36,6 +36,8 @@ class PairLJSmooth : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
double single(int, int, int, int, double, double, double, double &);
|
double single(int, int, int, int, double, double, double, double &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -26,7 +26,10 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
PairMorse::PairMorse(LAMMPS *lmp) : Pair(lmp) {}
|
PairMorse::PairMorse(LAMMPS *lmp) : Pair(lmp)
|
||||||
|
{
|
||||||
|
writedata = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -305,6 +308,28 @@ void PairMorse::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairMorse::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g %g %g\n",i,d0[i][i],alpha[i][i],r0[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairMorse::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g %g %g\n",
|
||||||
|
i,j,d0[i][j],alpha[i][j],r0[i][j],cut[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairMorse::single(int i, int j, int itype, int jtype, double rsq,
|
double PairMorse::single(int i, int j, int itype, int jtype, double rsq,
|
||||||
|
|||||||
@ -37,6 +37,8 @@ class PairMorse : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
double single(int, int, int, int, double, double, double, double &);
|
double single(int, int, int, int, double, double, double, double &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -30,7 +30,10 @@ using namespace MathConst;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
PairSoft::PairSoft(LAMMPS *lmp) : Pair(lmp) {}
|
PairSoft::PairSoft(LAMMPS *lmp) : Pair(lmp)
|
||||||
|
{
|
||||||
|
writedata = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -281,6 +284,27 @@ void PairSoft::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairSoft::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g\n",i,prefactor[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairSoft::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g\n",i,j,prefactor[i][j],cut[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairSoft::single(int i, int j, int itype, int jtype, double rsq,
|
double PairSoft::single(int i, int j, int itype, int jtype, double rsq,
|
||||||
|
|||||||
@ -39,6 +39,8 @@ class PairSoft : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
double single(int, int, int, int, double, double, double, double &);
|
double single(int, int, int, int, double, double, double, double &);
|
||||||
void *extract(const char *, int &);
|
void *extract(const char *, int &);
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,10 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
PairYukawa::PairYukawa(LAMMPS *lmp) : Pair(lmp) {}
|
PairYukawa::PairYukawa(LAMMPS *lmp) : Pair(lmp)
|
||||||
|
{
|
||||||
|
writedata = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -294,6 +297,27 @@ void PairYukawa::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairYukawa::write_data(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
fprintf(fp,"%d %g\n",i,a[i][i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
proc 0 writes all pairs to data file
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void PairYukawa::write_data_all(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 1; i <= atom->ntypes; i++)
|
||||||
|
for (int j = i; j <= atom->ntypes; j++)
|
||||||
|
fprintf(fp,"%d %d %g %g\n",i,j,a[i][j],cut[i][j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairYukawa::single(int i, int j, int itype, int jtype, double rsq,
|
double PairYukawa::single(int i, int j, int itype, int jtype, double rsq,
|
||||||
|
|||||||
@ -36,6 +36,8 @@ class PairYukawa : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
|
void write_data(FILE *);
|
||||||
|
void write_data_all(FILE *);
|
||||||
virtual double single(int, int, int, int, double, double, double, double &);
|
virtual double single(int, int, int, int, double, double, double, double &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
Reference in New Issue
Block a user