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

@ -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;
}
}