correct the inner loop range for resetting cutoffs when redefining a pair style

this was reported by frank uhlig on lammps-users for lj/cut, but it applies to many more pair styles
This commit is contained in:
Axel Kohlmeyer
2017-05-16 00:26:18 -04:00
parent 06c151421c
commit 51fc386e72
79 changed files with 268 additions and 287 deletions

View File

@ -281,7 +281,7 @@ void PairGayBerne::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -355,7 +355,7 @@ void PairLineLJ::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -253,7 +253,7 @@ void PairRESquared::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -426,7 +426,7 @@ void PairTriLJ::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -372,7 +372,7 @@ void PairBody::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -174,7 +174,7 @@ void PairLJClass2::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -202,7 +202,7 @@ void PairLJClass2CoulCut::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_lj[i][j] = cut_lj_global;
cut_coul[i][j] = cut_coul_global;

View File

@ -240,7 +240,7 @@ void PairLJClass2CoulLong::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -403,7 +403,7 @@ void PairBrownian::settings(int narg, char **arg)
if (allocated) {
for (int i = 1; i <= atom->ntypes; i++)
for (int j = i+1; j <= atom->ntypes; j++)
for (int j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_inner[i][j] = cut_inner_global;
cut[i][j] = cut_global;

View File

@ -256,7 +256,7 @@ void PairColloid::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -489,7 +489,7 @@ void PairLubricate::settings(int narg, char **arg)
if (allocated) {
for (int i = 1; i <= atom->ntypes; i++)
for (int j = i+1; j <= atom->ntypes; j++)
for (int j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_inner[i][j] = cut_inner_global;
cut[i][j] = cut_global;

View File

@ -1707,7 +1707,7 @@ void PairLubricateU::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_inner[i][j] = cut_inner_global;
cut[i][j] = cut_global;

View File

@ -1104,7 +1104,7 @@ void PairLubricateUPoly::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_inner[i][j] = cut_inner_global;
cut[i][j] = cut_global;

View File

@ -307,7 +307,7 @@ void PairLJCutDipoleCut::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_lj[i][j] = cut_lj_global;
cut_coul[i][j] = cut_coul_global;

View File

@ -360,7 +360,7 @@ void PairLJCutDipoleLong::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -102,7 +102,7 @@ void PairLJLongDipoleLong::settings(int narg, char **arg)
if (allocated) { // reset explicit cuts
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -241,7 +241,7 @@ void PairCoulDebyeKokkos<DeviceType>::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}

View File

@ -250,7 +250,7 @@ void PairBornCoulLong::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -240,7 +240,7 @@ void PairBuckCoulLong::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -104,7 +104,7 @@ void PairBuckLongCoulLong::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_buck[i][j] = cut_buck_global;
}
}

View File

@ -608,7 +608,7 @@ void PairLJCutCoulLong::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -450,7 +450,7 @@ void PairLJCutTIP4PLong::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -103,7 +103,7 @@ void PairLJLongCoulLong::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -1439,7 +1439,7 @@ void PairLJLongTIP4PLong::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -230,7 +230,7 @@ void PairDSMC::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -187,7 +187,7 @@ void PairNMCut::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -213,7 +213,7 @@ void PairNMCutCoulCut::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_lj[i][j] = cut_lj_global;
cut_coul[i][j] = cut_coul_global;

View File

@ -255,7 +255,7 @@ void PairNMCutCoulLong::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -441,7 +441,7 @@ void PairLJCutTIP4PCut::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}
@ -596,7 +596,7 @@ void PairLJCutTIP4PCut::write_restart(FILE *fp)
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]){
if (setflag[i][j]) {
fwrite(&epsilon[i][j],sizeof(double),1,fp);
fwrite(&sigma[i][j],sizeof(double),1,fp);
fwrite(&cut_lj[i][j],sizeof(double),1,fp);

View File

@ -454,16 +454,6 @@ void PairAWPMDCut::settings(int narg, char **arg){
else if(!strcmp(arg[i],"flex_press"))
flexible_pressure_flag = 1;
}
// reset cutoffs that have been explicitly set
/*
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}*/
}
/* ----------------------------------------------------------------------
@ -489,7 +479,7 @@ void PairAWPMDCut::coeff(int narg, char **arg)
else{
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}

View File

@ -248,7 +248,7 @@ void PairLJSDK::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -308,7 +308,7 @@ void PairLJSDKCoulLong::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -267,7 +267,7 @@ void PairDPDfdt::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -351,7 +351,7 @@ void PairDPDfdtEnergy::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -562,7 +562,7 @@ void PairExp6rx::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}

View File

@ -295,7 +295,7 @@ void PairLJCutTholeLong::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
thole[i][j] = thole_global;
cut_lj[i][j] = cut_lj_global;

View File

@ -199,7 +199,7 @@ void PairThole::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
thole[i][j] = thole_global;
cut[i][j] = cut_global;

View File

@ -846,7 +846,7 @@ void PairEffCut::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -168,7 +168,7 @@ void PairCoulCutSoft::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -211,7 +211,7 @@ void PairLJCutCoulCutSoft::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_lj[i][j] = cut_lj_global;
cut_coul[i][j] = cut_coul_global;

View File

@ -582,7 +582,7 @@ void PairLJCutCoulLongSoft::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -462,7 +462,7 @@ void PairLJCutSoft::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -436,7 +436,7 @@ void PairLJCutTIP4PLongSoft::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -222,7 +222,7 @@ void PairMorseSoft::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -197,7 +197,7 @@ void PairBuckMDF::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -168,7 +168,7 @@ void PairCoulDiel::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -175,7 +175,7 @@ void PairGaussCut::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -209,7 +209,7 @@ void PairKolmogorovCrespiZ::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -197,7 +197,7 @@ void PairLJ_AB_MDF::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_inner[i][j] = cut_inner_global;
cut[i][j] = cut_global;

View File

@ -197,7 +197,7 @@ void PairLJMDF::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_inner[i][j] = cut_inner_global;
cut[i][j] = cut_global;

View File

@ -181,7 +181,7 @@ void PairLJShiftedForce::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -342,7 +342,7 @@ void PairLJSFDipoleSF::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_lj[i][j] = cut_lj_global;
cut_coul[i][j] = cut_coul_global;

View File

@ -199,7 +199,7 @@ void PairMomb::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -171,7 +171,7 @@ void PairMorseSmoothLinear::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -408,7 +408,7 @@ void PairSRP::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= bptype; i++)
for (j = i+1; j <= bptype; j++)
for (j = i; j <= bptype; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -181,10 +181,8 @@ void PairBeck::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut[i][j] = cut_global;
}
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -185,7 +185,7 @@ void PairBorn::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -226,9 +226,8 @@ void PairBornCoulDSF::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
if (setflag[i][j])
cut_lj[i][j] = cut_lj_global;
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -229,7 +229,7 @@ void PairBornCoulWolf::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut_lj[i][j] = cut_lj_global;
}
}

View File

@ -176,7 +176,7 @@ void PairBuck::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -205,7 +205,7 @@ void PairBuckCoulCut::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_lj[i][j] = cut_lj_global;
cut_coul[i][j] = cut_coul_global;

View File

@ -155,7 +155,7 @@ void PairCoulCut::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -126,7 +126,7 @@ void PairCoulDebye::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -207,7 +207,7 @@ void PairDPD::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -159,7 +159,7 @@ void PairDPDTstat::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -173,7 +173,7 @@ void PairGauss::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -442,7 +442,7 @@ void PairLJ96Cut::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -179,14 +179,8 @@ void PairLJCubic::settings(int narg, char **arg)
{
if (narg != 0) error->all(FLERR,"Illegal pair_style command");
// reset cutoffs that have been explicitly set
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = 0.0;
}
// NOTE: lj/cubic has no global cutoff. instead the cutoff is
// inferred from the lj parameters. so we must not reset cutoffs here.
}
/* ----------------------------------------------------------------------

View File

@ -436,7 +436,7 @@ void PairLJCut::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -198,7 +198,7 @@ void PairLJCutCoulCut::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_lj[i][j] = cut_lj_global;
cut_coul[i][j] = cut_coul_global;

View File

@ -224,7 +224,7 @@ void PairLJCutCoulDSF::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j])
cut_lj[i][j] = cut_lj_global;
}

View File

@ -179,7 +179,7 @@ void PairLJExpand::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -204,7 +204,7 @@ void PairLJGromacs::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_inner[i][j] = cut_inner_global;
cut[i][j] = cut_global;

View File

@ -206,7 +206,7 @@ void PairLJSmooth::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) {
cut_inner[i][j] = cut_inner_global;
cut[i][j] = cut_global;

View File

@ -175,7 +175,7 @@ void PairLJSmoothLinear::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j])
cut[i][j] = cut_global;
}

View File

@ -447,7 +447,7 @@ void PairMIECut::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -165,7 +165,7 @@ void PairMorse::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -158,7 +158,7 @@ void PairSoft::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}

View File

@ -162,7 +162,7 @@ void PairYukawa::settings(int narg, char **arg)
if (allocated) {
int i,j;
for (i = 1; i <= atom->ntypes; i++)
for (j = i+1; j <= atom->ntypes; j++)
for (j = i; j <= atom->ntypes; j++)
if (setflag[i][j]) cut[i][j] = cut_global;
}
}