Refactor virtual site interface
[alexxy/gromacs.git] / src / gromacs / mdrun / shellfc.cpp
index 4eeae2fe782d5183efa0e12cabbabd97fba3af6c..1e17a1551ac9e88b99dc27c9f685af3f3943142a 100644 (file)
@@ -922,7 +922,7 @@ void relax_shell_flexcon(FILE*                         fplog,
                          gmx::MdrunScheduleWorkload*   runScheduleWork,
                          double                        t,
                          rvec                          mu_tot,
-                         const gmx_vsite_t*            vsite,
+                         gmx::VirtualSitesHandler*     vsite,
                          const DDBalanceRegionHandler& ddBalanceRegionHandler)
 {
     real Epot[2], df[2];
@@ -941,8 +941,6 @@ void relax_shell_flexcon(FILE*                         fplog,
     ArrayRef<t_shell> shells       = shfc->shells;
     const int         nflexcon     = shfc->nflexcon;
 
-    const InteractionDefinitions& idef = top->idef;
-
     if (DOMAINDECOMP(cr))
     {
         nat = dd_natoms_vsite(cr->dd);
@@ -1082,9 +1080,7 @@ void relax_shell_flexcon(FILE*                         fplog,
     {
         if (vsite)
         {
-            construct_vsites(vsite, as_rvec_array(pos[Min].data()), inputrec->delta_t,
-                             as_rvec_array(v.data()), idef.iparams, idef.il, fr->pbcType,
-                             fr->bMolPBC, cr, box);
+            vsite->construct(pos[Min], inputrec->delta_t, v, box);
         }
 
         if (nflexcon)