Merge pull request #2741 from stanmoore1/kk_mycutneighsq

Add missing code in Kokkos neighborlist to use custom cutoff
This commit is contained in:
Axel Kohlmeyer 2021-04-28 19:21:07 -04:00 committed by GitHub
commit 00578e1b26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -55,6 +55,19 @@ void NPairKokkos<DeviceType,HALF_NEIGH,GHOST,TRI,SIZE>::copy_neighbor_info()
newton_pair = force->newton_pair;
k_cutneighsq = neighborKK->k_cutneighsq;
// overwrite per-type Neighbor cutoffs with custom value set by requestor
// only works for style = BIN (checked by Neighbor class)
if (cutoff_custom > 0.0) {
int n = atom->ntypes;
auto k_mycutneighsq = DAT::tdual_xfloat_2d("neigh:cutneighsq,",n+1,n+1);
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++)
k_mycutneighsq.h_view(i,j) = cutoff_custom * cutoff_custom;
k_cutneighsq = k_mycutneighsq;
}
k_cutneighsq.modify<LMPHostType>();
// exclusion info