Make PBC type enumeration into PbcType enum class
[alexxy/gromacs.git] / src / gromacs / swap / swapcoords.cpp
index f28a9734b8f8c9468c9526a1099c7f6eded0d7bf..a9290efe6504f9eff0a331f35fb9a0ecac49b1ed 100644 (file)
@@ -1209,7 +1209,7 @@ static void detect_flux_per_channel_init(t_swap* s, swaphistory_t* swapstate, co
  * If this is not correct, the ion counts per channel will be very likely
  * wrong.
  */
-static void outputStartStructureIfWanted(gmx_mtop_t* mtop, rvec* x, int ePBC, const matrix box)
+static void outputStartStructureIfWanted(gmx_mtop_t* mtop, rvec* x, PbcType pbcType, const matrix box)
 {
     char* env = getenv("GMX_COMPELDUMP");
 
@@ -1223,7 +1223,7 @@ static void outputStartStructureIfWanted(gmx_mtop_t* mtop, rvec* x, int ePBC, co
                 SwS, SwSEmpty);
 
         write_sto_conf_mtop("CompELAssumedWholeConfiguration.pdb", *mtop->name, mtop, x, nullptr,
-                            ePBC, box);
+                            pbcType, box);
     }
 }
 
@@ -1289,10 +1289,10 @@ static void init_swapstate(swaphistory_t*    swapstate,
         copy_rvecn(x, x_pbc, 0, mtop->natoms);
 
         /* This can only make individual molecules whole, not multimers */
-        do_pbc_mtop(ir->ePBC, box, mtop, x_pbc);
+        do_pbc_mtop(ir->pbcType, box, mtop, x_pbc);
 
         /* Output the starting structure? */
-        outputStartStructureIfWanted(mtop, x_pbc, ir->ePBC, box);
+        outputStartStructureIfWanted(mtop, x_pbc, ir->pbcType, box);
 
         /* If this is the first run (i.e. no checkpoint present) we assume
          * that the starting positions give us the correct PBC representation */
@@ -1944,7 +1944,7 @@ gmx_bool do_swapcoords(t_commrec*     cr,
 
     sc = ir->swap;
 
-    set_pbc(s->pbc, ir->ePBC, box);
+    set_pbc(s->pbc, ir->pbcType, box);
 
     /* Assemble the positions of the split groups, i.e. the channels.
      * Here we also pass a shifts array to communicate_group_positions(), so that it can make