Make PBC type enumeration into PbcType enum class
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_sans.cpp
index c9edbbc6e7496c64520ece8f608ad680acf2cfe6..ab77d08a1cf938135939bbaa950ae93a6eb278b0 100644 (file)
@@ -48,6 +48,7 @@
 #include "gromacs/gmxana/gstat.h"
 #include "gromacs/gmxana/nsfactor.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pbcutil/rmpbc.h"
 #include "gromacs/topology/index.h"
 #include "gromacs/topology/topology.h"
@@ -126,8 +127,8 @@ int gmx_sans(int argc, char* argv[])
     t_topology*                          top  = nullptr;
     gmx_rmpbc_t                          gpbc = nullptr;
     gmx_bool                             bFFT = FALSE, bDEBYE = FALSE;
-    gmx_bool                             bMC  = FALSE;
-    int                                  ePBC = -1;
+    gmx_bool                             bMC     = FALSE;
+    PbcType                              pbcType = PbcType::Unset;
     matrix                               box;
     rvec*                                x;
     int                                  natoms;
@@ -219,7 +220,7 @@ int gmx_sans(int argc, char* argv[])
     snew(grpname, 1);
     snew(index, 1);
 
-    read_tps_conf(fnTPX, top, &ePBC, &x, nullptr, box, TRUE);
+    read_tps_conf(fnTPX, top, &pbcType, &x, nullptr, box, TRUE);
 
     printf("\nPlease select group for SANS spectra calculation:\n");
     get_index(&(top->atoms), ftp2fn_null(efNDX, NFILE, fnm), 1, &isize, &index, grpname);
@@ -229,7 +230,7 @@ int gmx_sans(int argc, char* argv[])
     /* Prepare reference frame */
     if (bPBC)
     {
-        gpbc = gmx_rmpbc_init(&top->idef, ePBC, top->atoms.nr);
+        gpbc = gmx_rmpbc_init(&top->idef, pbcType, top->atoms.nr);
         gmx_rmpbc(gpbc, top->atoms.nr, box, x);
     }