Clean up DD reverse topology options
[alexxy/gromacs.git] / src / gromacs / domdec / domdec.cpp
index 0a055d6a5494e658faf0289528b0714c0b219df0..2077798da78a7a7e9b6a1843cc1dd8a876d92f2c 100644 (file)
@@ -2140,8 +2140,11 @@ static DDSystemInfo getSystemInfo(const gmx::MDLogger&           mdlog,
 
             if (ddRole == DDRole::Master)
             {
-                dd_bonded_cg_distance(
-                        mdlog, &mtop, &ir, xGlobal, box, options.checkBondedInteractions, &r_2b, &r_mb);
+                const DDBondedChecking ddBondedChecking = options.checkBondedInteractions
+                                                                  ? DDBondedChecking::All
+                                                                  : DDBondedChecking::ExcludeZeroLimit;
+
+                dd_bonded_cg_distance(mdlog, &mtop, &ir, xGlobal, box, ddBondedChecking, &r_2b, &r_mb);
             }
             gmx_bcast(sizeof(r_2b), &r_2b, communicator);
             gmx_bcast(sizeof(r_mb), &r_mb, communicator);
@@ -2500,10 +2503,10 @@ void dd_init_bondeds(FILE*                           fplog,
                      const gmx_mtop_t&               mtop,
                      const gmx::VirtualSitesHandler* vsite,
                      const t_inputrec*               ir,
-                     gmx_bool                        bBCheck,
+                     const DDBondedChecking          ddBondedChecking,
                      gmx::ArrayRef<cginfo_mb_t>      cginfo_mb)
 {
-    dd_make_reverse_top(fplog, dd, &mtop, vsite, ir, bBCheck);
+    dd_make_reverse_top(fplog, dd, &mtop, vsite, ir, ddBondedChecking);
 
     gmx_domdec_comm_t* comm = dd->comm;