diff --git a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp index 1f733ab3d7..3966b38043 100644 --- a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp @@ -259,7 +259,7 @@ KOKKOS_INLINE_FUNCTION F_FLOAT PairBuckCoulLongKokkos:: compute_ecoul(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const F_FLOAT& factor_coul, const F_FLOAT& qtmp) const { - if(Specialisation::DoTable) { + if(Specialisation::DoTable && rsq > tabinnersq) { union_int_float_t rsq_lookup; rsq_lookup.f = rsq; const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits; diff --git a/src/KOKKOS/pair_coul_long_kokkos.cpp b/src/KOKKOS/pair_coul_long_kokkos.cpp index 50cddc2c16..7d92b634d5 100644 --- a/src/KOKKOS/pair_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_coul_long_kokkos.cpp @@ -213,7 +213,7 @@ KOKKOS_INLINE_FUNCTION F_FLOAT PairCoulLongKokkos:: compute_ecoul(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const F_FLOAT& factor_coul, const F_FLOAT& qtmp) const { - if(Specialisation::DoTable) { + if(Specialisation::DoTable && rsq > tabinnersq) { union_int_float_t rsq_lookup; rsq_lookup.f = rsq; const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits; diff --git a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp index 26119671fd..9dcc7ad565 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp @@ -277,7 +277,7 @@ KOKKOS_INLINE_FUNCTION F_FLOAT PairLJCharmmCoulLongKokkos:: compute_ecoul(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const F_FLOAT& factor_coul, const F_FLOAT& qtmp) const { - if(Specialisation::DoTable) { + if(Specialisation::DoTable && rsq > tabinnersq) { union_int_float_t rsq_lookup; rsq_lookup.f = rsq; const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits; diff --git a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp index 6bfba03b1b..3e530afa3f 100644 --- a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp @@ -249,7 +249,7 @@ KOKKOS_INLINE_FUNCTION F_FLOAT PairLJClass2CoulLongKokkos:: compute_ecoul(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const F_FLOAT& factor_coul, const F_FLOAT& qtmp) const { - if(Specialisation::DoTable) { + if(Specialisation::DoTable && rsq > tabinnersq) { union_int_float_t rsq_lookup; rsq_lookup.f = rsq; const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits; diff --git a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp index 29e25305e6..590c890676 100644 --- a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp @@ -240,7 +240,7 @@ KOKKOS_INLINE_FUNCTION F_FLOAT PairLJCutCoulLongKokkos:: compute_ecoul(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const F_FLOAT& factor_coul, const F_FLOAT& qtmp) const { - if(Specialisation::DoTable) { + if(Specialisation::DoTable && rsq > tabinnersq) { union_int_float_t rsq_lookup; rsq_lookup.f = rsq; const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;