Make PBC type enumeration into PbcType enum class
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_covar.cpp
index 9fa548e9bde4f929f8448b364c80c9488ebc2ccb..5fa50372bf70a467c0642d32076df33cc5b1f655 100644 (file)
@@ -114,7 +114,7 @@ int gmx_covar(int argc, char* argv[])
     FILE*             out = nullptr; /* initialization makes all compilers happy */
     t_trxstatus*      status;
     t_topology        top;
-    int               ePBC;
+    PbcType           pbcType;
     t_atoms*          atoms;
     rvec *            x, *xread, *xref, *xav, *xproj;
     matrix            box, zerobox;
@@ -165,7 +165,7 @@ int gmx_covar(int argc, char* argv[])
     xpmfile    = opt2fn_null("-xpm", NFILE, fnm);
     xpmafile   = opt2fn_null("-xpma", NFILE, fnm);
 
-    read_tps_conf(fitfile, &top, &ePBC, &xref, nullptr, box, TRUE);
+    read_tps_conf(fitfile, &top, &pbcType, &xref, nullptr, box, TRUE);
     atoms = &top.atoms;
 
     if (bFit)
@@ -239,7 +239,7 @@ int gmx_covar(int argc, char* argv[])
     /* Prepare reference frame */
     if (bPBC)
     {
-        gpbc = gmx_rmpbc_init(&top.idef, ePBC, atoms->nr);
+        gpbc = gmx_rmpbc_init(&top.idef, pbcType, atoms->nr);
         gmx_rmpbc(gpbc, atoms->nr, box, xref);
     }
     if (bFit)
@@ -294,7 +294,7 @@ int gmx_covar(int argc, char* argv[])
         }
     }
     write_sto_conf_indexed(opt2fn("-av", NFILE, fnm), "Average structure", atoms, xread, nullptr,
-                           epbcNONE, zerobox, natoms, index);
+                           PbcType::No, zerobox, natoms, index);
     sfree(xread);
 
     fprintf(stderr, "Constructing covariance matrix (%dx%d) ...\n", static_cast<int>(ndim),