Unverified Commit 7508660d authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #2036 from stanmoore1/kk_dihedral_charmm

Fix issues in dihedral_charmm_kokkos
parents 910d00f5 fe9e6736
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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>();
    //}
  }