Merge pull request #3803 from rohskopf/sna-kk-switchflag
Fix Kokkos SNAP cutoff factor with `switchflag = 0`
This commit is contained in:
@ -2298,7 +2298,7 @@ void SNAKokkos<DeviceType, real_type, vector_length>::compute_s_dsfac(const real
|
||||
constexpr real_type zero = static_cast<real_type>(0.0);
|
||||
constexpr real_type onehalf = static_cast<real_type>(0.5);
|
||||
|
||||
if (switch_flag == 0) { sfac_outer = zero; dsfac_outer = zero; }
|
||||
if (switch_flag == 0) { sfac_outer = one; dsfac_outer = zero; }
|
||||
else if (switch_flag == 1) {
|
||||
if (r <= rmin0) { sfac_outer = one; dsfac_outer = zero; }
|
||||
else if (r > rcut) { sfac = zero; dsfac = zero; return; }
|
||||
|
||||
Reference in New Issue
Block a user