Merge pull request #3829 from JohnLucas1/fixpair_bugfix

fix pair bugfix
This commit is contained in:
Axel Kohlmeyer
2023-06-19 15:13:39 -04:00
committed by GitHub
2 changed files with 5 additions and 2 deletions

View File

@ -85,7 +85,7 @@ columns 4-6 will store the "uinp" values.
.. code-block:: LAMMPS
pair_style amoeba
fix ex all pair amoeba 10 uind 0 uinp 0
fix ex all pair 10 amoeba uind 0 uinp 0
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

View File

@ -283,11 +283,14 @@ void FixPair::post_force(int /*vflag*/)
} else {
double **parray = (double **) pvoid;
for (int i = 0; i < nlocal; i++)
int icoltmp = icol;
for (int i = 0; i < nlocal; i++) {
icol = icoltmp;
for (int m = 0; m < columns; m++) {
array[i][icol] = parray[i][m];
icol++;
}
}
}
}