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

This commit is contained in:
sjplimp
2008-03-19 15:20:06 +00:00
parent 3a5058da48
commit 032801c1d9
11 changed files with 96 additions and 89 deletions

View File

@ -242,14 +242,11 @@ void PairCoulLong::init_style()
// set & error check interior rRESPA cutoffs
if (strcmp(update->integrate_style,"respa") == 0) {
if (((Respa *) update->integrate)->level_inner >= 0) {
cut_respa = ((Respa *) update->integrate)->cutoff;
for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++)
if (cut_coul < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
}
if (strcmp(update->integrate_style,"respa") == 0 &&
((Respa *) update->integrate)->level_inner >= 0) {
cut_respa = ((Respa *) update->integrate)->cutoff;
if (cut_coul < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
} else cut_respa = NULL;
// insure use of KSpace long-range solver, set g_ewald

View File

@ -776,15 +776,13 @@ void PairLJCharmmCoulLong::init_style()
// set & error check interior rRESPA cutoffs
cut_respa = NULL;
if (strcmp(update->integrate_style,"respa") == 0) {
if (((Respa *) update->integrate)->level_inner >= 0) {
cut_respa = ((Respa *) update->integrate)->cutoff;
if (MIN(cut_lj,cut_coul) < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
if (cut_lj_inner < cut_respa[1])
error->all("Pair inner cutoff < Respa interior cutoff");
}
if (strcmp(update->integrate_style,"respa") == 0 &&
((Respa *) update->integrate)->level_inner >= 0) {
cut_respa = ((Respa *) update->integrate)->cutoff;
if (MIN(cut_lj,cut_coul) < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
if (cut_lj_inner < cut_respa[1])
error->all("Pair inner cutoff < Respa interior cutoff");
} else cut_respa = NULL;
// insure use of KSpace long-range solver, set g_ewald

View File

@ -709,17 +709,12 @@ void PairLJCutCoulLong::init_style()
cut_coulsq = cut_coul * cut_coul;
// set & error check interior rRESPA cutoffs
// set rRESPA cutoffs
if (strcmp(update->integrate_style,"respa") == 0) {
if (((Respa *) update->integrate)->level_inner >= 0) {
cut_respa = ((Respa *) update->integrate)->cutoff;
for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++)
if (MIN(cut_lj[i][j],cut_coul) < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
}
} else cut_respa = NULL;
if (strcmp(update->integrate_style,"respa") == 0 &&
((Respa *) update->integrate)->level_inner >= 0)
cut_respa = ((Respa *) update->integrate)->cutoff;
else cut_respa = NULL;
// insure use of KSpace long-range solver, set g_ewald
@ -778,6 +773,11 @@ double PairLJCutCoulLong::init_one(int i, int j)
lj4[j][i] = lj4[i][j];
offset[j][i] = offset[i][j];
// check interior rRESPA cutoff
if (cut_respa && MIN(cut_lj[i][j],cut_coul) < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
// compute I,J contribution to long-range tail correction
// count total # of atoms of type I and J via Allreduce

View File

@ -68,17 +68,26 @@ void PairCGCMMCoulCut::init_style()
PairCMMCommon::init_style();
// set & error check interior rRESPA cutoffs
if (strcmp(update->integrate_style,"respa") == 0) {
if (((Respa *) update->integrate)->level_inner >= 0) {
cut_respa = ((Respa *) update->integrate)->cutoff;
for (int i = 1; i <= atom->ntypes; i++)
for (int j = i; j <= atom->ntypes; j++)
if (MIN(cut_lj[i][j],cut_coul[i][j]) < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
}
} else cut_respa = NULL;
// set rRESPA cutoffs
if (strcmp(update->integrate_style,"respa") == 0 &&
((Respa *) update->integrate)->level_inner >= 0)
cut_respa = ((Respa *) update->integrate)->cutoff;
else cut_respa = NULL;
}
/* ---------------------------------------------------------------------- */
double PairCGCMMCoulCut::init_one(int i, int j)
{
double mycut = PairCMMCommon::init_one(i,j);
// check interior rRESPA cutoff
if (cut_respa && MIN(cut_lj[i][j],cut_coul[i][j]) < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
return mycut;
}
/* ---------------------------------------------------------------------- */

View File

@ -26,6 +26,7 @@ namespace LAMMPS_NS {
void compute_outer(int, int);
void init_style();
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);

View File

@ -83,8 +83,6 @@ void PairCGCMMCoulLong::free_tables()
memory->sfree(dptable);
}
/* ---------------------------------------------------------------------- */
void PairCGCMMCoulLong::init_style()
@ -93,17 +91,13 @@ void PairCGCMMCoulLong::init_style()
error->all("Pair style cg/cut/coul/long requires atom attribute q");
PairCMMCommon::init_style();
// set & error check interior rRESPA cutoffs
if (strcmp(update->integrate_style,"respa") == 0) {
if (((Respa *) update->integrate)->level_inner >= 0) {
cut_respa = ((Respa *) update->integrate)->cutoff;
for (int i = 1; i <= atom->ntypes; i++)
for (int j = i; j <= atom->ntypes; j++)
if (MIN(cut_lj[i][j],cut_coul_global) < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
}
} else cut_respa = NULL;
// set rRESPA cutoffs
if (strcmp(update->integrate_style,"respa") == 0 &&
((Respa *) update->integrate)->level_inner >= 0)
cut_respa = ((Respa *) update->integrate)->cutoff;
else cut_respa = NULL;
// ensure use of KSpace long-range solver, set g_ewald
@ -118,6 +112,20 @@ void PairCGCMMCoulLong::init_style()
/* ---------------------------------------------------------------------- */
double PairCGCMMCoulLong::init_one(int i, int j)
{
double mycut = PairCMMCommon::init_one(i,j);
// check interior rRESPA cutoff
if (cut_respa && MIN(cut_lj[i][j],cut_coul_global) < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
return mycut;
}
/* ---------------------------------------------------------------------- */
void PairCGCMMCoulLong::init_tables()
{
int masklo,maskhi;

View File

@ -26,6 +26,7 @@ namespace LAMMPS_NS {
void compute_outer(int, int);
void init_style();
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);

View File

@ -281,15 +281,6 @@ double PairCMMCommon::init_one(int i, int j)
cut_coul[j][i]=cut_coul[i][j];
cut_coulsq[j][i]=cut_coulsq[i][j];
}
// set & error check interior rRESPA cutoff
if (strcmp(update->integrate_style,"respa") == 0) {
if (((Respa *) update->integrate)->level_inner >= 0) {
cut_respa = ((Respa *) update->integrate)->cutoff;
if (cut[i][j] < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
}
} else cut_respa = NULL;
// compute I,J contribution to long-range tail correction
// count total # of atoms of type I and J via Allreduce

View File

@ -270,17 +270,12 @@ void PairBuckCoul::init_style()
cut_coulsq = cut_coul * cut_coul;
// set & error check interior rRESPA cutoffs
// set rRESPA cutoffs
if (strcmp(update->integrate_style,"respa") == 0) {
if (((Respa *) update->integrate)->level_inner >= 0) {
cut_respa = ((Respa *) update->integrate)->cutoff;
for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++)
if (MIN(cut_buck[i][j],cut_coul) < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
}
} else cut_respa = NULL;
if (strcmp(update->integrate_style,"respa") == 0 &&
((Respa *) update->integrate)->level_inner >= 0)
cut_respa = ((Respa *) update->integrate)->cutoff;
else cut_respa = NULL;
// ensure use of KSpace long-range solver, set g_ewald
@ -326,13 +321,18 @@ double PairBuckCoul::init_one(int i, int j)
buck_c[i][j] = buck_c_read[i][j];
buck_rho[i][j] = buck_rho_read[i][j];
double cut = MAX(cut_buck[i][j], cut_coul);
double cut = MAX(cut_buck[i][j],cut_coul);
cutsq[i][j] = cut*cut;
cut_bucksq[i][j] = cut_buck[i][j] * cut_buck[i][j];
buck1[i][j] = buck_a[i][j]/buck_rho[i][j];
buck2[i][j] = 6.0*buck_c[i][j];
rhoinv[i][j] = 1.0/buck_rho[i][j];
// check interior rRESPA cutoff
if (cut_respa && MIN(cut_buck[i][j],cut_coul) < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
if (offset_flag) {
double rexp = exp(-cut_buck[i][j]/buck_rho[i][j]);

View File

@ -266,17 +266,12 @@ void PairLJCoul::init_style()
cut_coulsq = cut_coul * cut_coul;
// set & error check interior rRESPA cutoffs
// set rRESPA cutoffs
if (strcmp(update->integrate_style,"respa") == 0) {
if (((Respa *) update->integrate)->level_inner >= 0) {
cut_respa = ((Respa *) update->integrate)->cutoff;
for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++)
if (MIN(cut_lj[i][j],cut_coul) < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
}
} else cut_respa = NULL;
if (strcmp(update->integrate_style,"respa") == 0 &&
((Respa *) update->integrate)->level_inner >= 0)
cut_respa = ((Respa *) update->integrate)->cutoff;
else cut_respa = NULL;
// ensure use of KSpace long-range solver, set g_ewald
@ -341,7 +336,12 @@ double PairLJCoul::init_one(int i, int j)
lj2[i][j] = 24.0 * epsilon[i][j] * pow(sigma[i][j],6.0);
lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0);
lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0);
// check interior rRESPA cutoff
if (cut_respa && MIN(cut_lj[i][j],cut_coul) < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
if (offset_flag) {
double ratio = sigma[i][j] / cut_lj[i][j];
offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0));

View File

@ -535,6 +535,13 @@ void PairLJCut::init_style()
}
} else irequest = neighbor->request(this);
// set rRESPA cutoffs
if (strcmp(update->integrate_style,"respa") == 0 &&
((Respa *) update->integrate)->level_inner >= 0)
cut_respa = ((Respa *) update->integrate)->cutoff;
else cut_respa = NULL;
}
/* ----------------------------------------------------------------------
@ -579,15 +586,10 @@ double PairLJCut::init_one(int i, int j)
lj4[j][i] = lj4[i][j];
offset[j][i] = offset[i][j];
// set & error check interior rRESPA cutoff
// check interior rRESPA cutoff
if (strcmp(update->integrate_style,"respa") == 0) {
if (((Respa *) update->integrate)->level_inner >= 0) {
cut_respa = ((Respa *) update->integrate)->cutoff;
if (cut[i][j] < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
}
} else cut_respa = NULL;
if (cut_respa && cut[i][j] < cut_respa[3])
error->all("Pair cutoff < Respa interior cutoff");
// compute I,J contribution to long-range tail correction
// count total # of atoms of type I and J via Allreduce