#define NBK_FUNC_NAME(b,s,e) NBK_FUNC_NAME_C(b,s,tab_twin,e)
#endif
#endif
+#ifdef CALC_COUL_EWALD
+#ifndef VDW_CUTOFF_CHECK
+#define NBK_FUNC_NAME(b,s,e) NBK_FUNC_NAME_C(b,s,ewald,e)
+#else
+#define NBK_FUNC_NAME(b,s,e) NBK_FUNC_NAME_C(b,s,ewald_twin,e)
+#endif
+#endif
#ifdef GMX_MM128_HERE
#define NBK_FUNC_NAME_S128_OR_S256(b,e) NBK_FUNC_NAME(b,x86_simd128,e)
#ifdef CALC_ENERGIES
gmx_mm_pr hrc_3_SSE,moh_rc_SSE;
#endif
+
#ifdef CALC_COUL_TAB
/* Coulomb table variables */
gmx_mm_pr invtsp_SSE;
#endif
#ifdef CALC_ENERGIES
gmx_mm_pr mhalfsp_SSE;
- gmx_mm_pr sh_ewald_SSE;
#endif
#endif
+#ifdef CALC_COUL_EWALD
+ gmx_mm_pr beta2_SSE,beta_SSE;
+#endif
+
+#if defined CALC_ENERGIES && (defined CALC_COUL_EWALD || defined CALC_COUL_TAB)
+ gmx_mm_pr sh_ewald_SSE;
+#endif
+
#ifdef LJ_COMB_LB
const real *ljc;
invtsp_SSE = gmx_set1_pr(ic->tabq_scale);
#ifdef CALC_ENERGIES
mhalfsp_SSE = gmx_set1_pr(-0.5/ic->tabq_scale);
-
- sh_ewald_SSE = gmx_set1_pr(ic->sh_ewald);
#endif
#ifdef TAB_FDV0
tab_coul_F = ic->tabq_coul_F;
tab_coul_V = ic->tabq_coul_V;
#endif
+#endif /* CALC_COUL_TAB */
+
+#ifdef CALC_COUL_EWALD
+ beta2_SSE = gmx_set1_pr(ic->ewaldcoeff*ic->ewaldcoeff);
+ beta_SSE = gmx_set1_pr(ic->ewaldcoeff);
+#endif
+
+#if (defined CALC_COUL_TAB || defined CALC_COUL_EWALD) && defined CALC_ENERGIES
+ sh_ewald_SSE = gmx_set1_pr(ic->sh_ewald);
#endif
q = nbat->q;
#else
Vc_sub_self = 0.5*tab_coul_V[0];
#endif
+#endif
+#ifdef CALC_COUL_EWALD
+ /* beta/sqrt(pi) */
+ Vc_sub_self = 0.5*ic->ewaldcoeff*M_2_SQRTPI;
#endif
for(ia=0; ia<UNROLLI; ia++)