diff --git a/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp b/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp index a2b00b480f..e15600fd81 100644 --- a/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp +++ b/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp @@ -133,6 +133,15 @@ void PairLJCharmmCoulCharmmGPU::init_style() error->all(FLERR, "Cannot use newton pair with lj/charmm/coul/long/gpu pair style"); + // Repeated cutsq calculation in init_one() is required for GPU package + + for (int i = 1; i <= atom->ntypes; i++) { + for (int j = i; j <= atom->ntypes; j++) { + if (setflag[i][j] != 0 || (setflag[i][i] != 0 && setflag[j][j] != 0)) + init_one(i,j); + } + } + cut_lj_innersq = cut_lj_inner * cut_lj_inner; cut_coul_innersq = cut_coul_inner * cut_coul_inner; cut_ljsq = cut_lj * cut_lj;