Make PBC type enumeration into PbcType enum class
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / x2top.cpp
index 960e6252c2d185da1e91dfe97fa0978c036a9858..4aff04ce7c84dda1a5540dfe8031eafb0b7e0473 100644 (file)
@@ -110,7 +110,7 @@ static void mk_bonds(int                 nnm,
     std::array<real, MAXFORCEPARAM> forceParam = { 0.0 };
     if (bPBC)
     {
-        set_pbc(&pbc, -1, box);
+        set_pbc(&pbc, PbcType::Unset, box);
     }
     for (i = 0; (i < atoms->nr); i++)
     {
@@ -264,7 +264,7 @@ static void calc_angles_dihs(InteractionsOfType* ang, InteractionsOfType* dih, c
 
     if (bPBC)
     {
-        set_pbc(&pbc, epbcXYZ, box);
+        set_pbc(&pbc, PbcType::Xyz, box);
     }
     for (auto& angle : ang->interactionTypes)
     {
@@ -399,7 +399,7 @@ int gmx_x2top(int argc, char* argv[])
     int                                   bts[] = { 1, 1, 1, 2 };
     matrix                                box;    /* box length matrix */
     int                                   natoms; /* number of atoms in one molecule  */
-    int                                   epbc;
+    PbcType                               pbcType;
     bool                                  bRTP, bTOP, bOPLS;
     t_symtab                              symtab;
     real                                  qtot, mtot;
@@ -491,7 +491,7 @@ int gmx_x2top(int argc, char* argv[])
     /* Read coordinates */
     t_topology* top;
     snew(top, 1);
-    read_tps_conf(opt2fn("-f", NFILE, fnm), top, &epbc, &x, nullptr, box, FALSE);
+    read_tps_conf(opt2fn("-f", NFILE, fnm), top, &pbcType, &x, nullptr, box, FALSE);
     t_atoms* atoms = &top->atoms;
     natoms         = atoms->nr;
     if (atoms->pdbinfo == nullptr)