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

This commit is contained in:
sjplimp 2013-05-08 15:31:10 +00:00
parent 0ca04bc6b3
commit 7e5fec4f3d
4 changed files with 50 additions and 0 deletions

View File

@ -45,6 +45,7 @@ PairLJSDK::PairLJSDK(LAMMPS *lmp) : Pair(lmp)
{
respa_enable = 0;
single_enable = 1;
writedata = 1;
}
/* ---------------------------------------------------------------------- */
@ -428,6 +429,28 @@ void PairLJSDK::read_restart_settings(FILE *fp)
MPI_Bcast(&tail_flag,1,MPI_INT,0,world);
}
/* ----------------------------------------------------------------------
lj/sdk does not support per atom type output with mixing
------------------------------------------------------------------------- */
void PairLJSDK::write_data(FILE *)
{
error->one(FLERR, "Pair style lj/sdk requires using "
"write_data with the 'pair ij' option");
}
/* ----------------------------------------------------------------------
proc 0 writes all pairs to data file
------------------------------------------------------------------------- */
void PairLJSDK::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 %s %g %g %g\n",i,j,lj_type_list[lj_type[i][j]],
epsilon[i][j],sigma[i][j],cut[i][j]);
}
/* ---------------------------------------------------------------------- */
double PairLJSDK::single(int, int, int itype, int jtype, double rsq,

View File

@ -42,6 +42,8 @@ class PairLJSDK : public Pair {
void read_restart(FILE *);
void write_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 &);
void *extract(const char *, int &);
virtual double memory_usage();

View File

@ -54,6 +54,7 @@ PairLJSDKCoulLong::PairLJSDKCoulLong(LAMMPS *lmp) : Pair(lmp)
{
ewaldflag = pppmflag = 1;
respa_enable = 0;
writedata = 1;
ftable = NULL;
}
@ -636,6 +637,28 @@ void PairLJSDKCoulLong::read_restart_settings(FILE *fp)
MPI_Bcast(&tabinner,1,MPI_DOUBLE,0,world);
}
/* ----------------------------------------------------------------------
lj/sdk does not support per atom type output with mixing
------------------------------------------------------------------------- */
void PairLJSDKCoulLong::write_data(FILE *)
{
error->one(FLERR, "Pair style lj/sdk/coul/* requires using "
"write_data with the 'pair ij' option");
}
/* ----------------------------------------------------------------------
proc 0 writes all pairs to data file
------------------------------------------------------------------------- */
void PairLJSDKCoulLong::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 %s %g %g %g\n",i,j,lj_type_list[lj_type[i][j]],
epsilon[i][j],sigma[i][j],cut_lj[i][j]);
}
/* ----------------------------------------------------------------------
free memory for tables used in pair computations
------------------------------------------------------------------------- */

View File

@ -40,6 +40,8 @@ class PairLJSDKCoulLong : public Pair {
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
virtual void write_restart_settings(FILE *);
virtual void read_restart_settings(FILE *);
virtual double single(int, int, int, int, double, double, double, double &);