Merge pull request from stanmoore1/kk_dihedral_charmm

Fix issues in dihedral_charmm_kokkos
This commit is contained in:
Axel Kohlmeyer 2020-04-29 10:24:32 -04:00 committed by GitHub
commit 7508660d8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -28,6 +28,7 @@
#include "memory_kokkos.h"
#include "error.h"
#include "atom_masks.h"
#include "kokkos.h"
using namespace LAMMPS_NS;
using namespace MathConst;
@ -69,6 +70,9 @@ void DihedralCharmmKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
eflag = eflag_in;
vflag = vflag_in;
if (lmp->kokkos->neighflag == FULL)
error->all(FLERR,"Dihedral_style charmm/kk requires half neighbor list");
ev_init(eflag,vflag,0);
// insure pair->ev_tally() will use 1-4 virial contribution
@ -84,7 +88,7 @@ void DihedralCharmmKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
memoryKK->create_kokkos(k_eatom,eatom,maxeatom,"dihedral:eatom");
d_eatom = k_eatom.template view<KKDeviceType>();
k_eatom_pair = Kokkos::DualView<E_FLOAT*,Kokkos::LayoutRight,KKDeviceType>("dihedral:eatom_pair",maxeatom);
d_eatom_pair = k_eatom.template view<KKDeviceType>();
d_eatom_pair = k_eatom_pair.template view<KKDeviceType>();
//}
}
if (vflag_atom) {
@ -93,7 +97,7 @@ void DihedralCharmmKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
memoryKK->create_kokkos(k_vatom,vatom,maxvatom,"dihedral:vatom");
d_vatom = k_vatom.template view<KKDeviceType>();
k_vatom_pair = Kokkos::DualView<F_FLOAT*[6],Kokkos::LayoutRight,KKDeviceType>("dihedral:vatom_pair",maxvatom);
d_vatom_pair = k_vatom.template view<KKDeviceType>();
d_vatom_pair = k_vatom_pair.template view<KKDeviceType>();
//}
}