* the RB potential instead of a harmonic potential.
* This function can replace rbdihs() when no energy and virial are needed.
*/
-static void
+void
rbdihs_noener_simd(int nbonds,
const t_iatom forceatoms[], const t_iparams forceparams[],
const rvec x[], rvec f[],
const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd,
int gmx_unused *global_atom_index);
+/* As rbdihs(), when not needing energy or shift force, using SIMD to calculate many dihedrals at once. */
+void
+ rbdihs_noener_simd(int nbonds,
+ const t_iatom forceatoms[], const t_iparams forceparams[],
+ const rvec x[], rvec f[],
+ const struct t_pbc *pbc,
+ const struct t_graph gmx_unused *g,
+ real gmx_unused lambda,
+ const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd,
+ int gmx_unused *global_atom_index);
+
#endif
//! \endcond
global_atom_index);
v = 0;
}
+#ifdef GMX_SIMD_HAVE_REAL
+ else if (ftype == F_RBDIHS &&
+ !bCalcEnerVir && fr->efep == efepNO)
+ {
+ /* No energies, shift forces, dvdl */
+ rbdihs_noener_simd(nbn, idef->il[ftype].iatoms+nb0,
+ idef->iparams,
+ (const rvec*)x, f,
+ pbc, g, lambda[efptFTYPE], md, fcd,
+ global_atom_index);
+ v = 0;
+ }
+#endif
else
{
v = interaction_function[ftype].ifunc(nbn, iatoms+nb0,