Refactor gmx_group_t to SimulationAtomGroups
[alexxy/gromacs.git] / src / gromacs / mdlib / mdoutf.cpp
index 93967223fae2d9557b411723811669af0ce9958d..bdce179ba9a64b283f7f1a6f4bbcf9c15f75525c 100644 (file)
 #include "gromacs/utility/smalloc.h"
 
 struct gmx_mdoutf {
-    t_fileio               *fp_trn;
-    t_fileio               *fp_xtc;
-    gmx_tng_trajectory_t    tng;
-    gmx_tng_trajectory_t    tng_low_prec;
-    int                     x_compression_precision; /* only used by XTC output */
-    ener_file_t             fp_ene;
-    const char             *fn_cpt;
-    gmx_bool                bKeepAndNumCPT;
-    int                     eIntegrator;
-    gmx_bool                bExpanded;
-    int                     elamstats;
-    int                     simulation_part;
-    FILE                   *fp_dhdl;
-    int                     natoms_global;
-    int                     natoms_x_compressed;
-    gmx_groups_t           *groups; /* for compressed position writing */
-    gmx_wallcycle_t         wcycle;
-    rvec                   *f_global;
-    gmx::IMDOutputProvider *outputProvider;
+    t_fileio                      *fp_trn;
+    t_fileio                      *fp_xtc;
+    gmx_tng_trajectory_t           tng;
+    gmx_tng_trajectory_t           tng_low_prec;
+    int                            x_compression_precision; /* only used by XTC output */
+    ener_file_t                    fp_ene;
+    const char                    *fn_cpt;
+    gmx_bool                       bKeepAndNumCPT;
+    int                            eIntegrator;
+    gmx_bool                       bExpanded;
+    int                            elamstats;
+    int                            simulation_part;
+    FILE                          *fp_dhdl;
+    int                            natoms_global;
+    int                            natoms_x_compressed;
+    SimulationGroups              *groups; /* for compressed position writing */
+    gmx_wallcycle_t                wcycle;
+    rvec                          *f_global;
+    gmx::IMDOutputProvider        *outputProvider;
 };
 
 
@@ -209,7 +209,7 @@ gmx_mdoutf_t init_mdoutf(FILE *fplog, int nfile, const t_filenm fnm[],
         of->natoms_x_compressed = 0;
         for (i = 0; (i < top_global->natoms); i++)
         {
-            if (getGroupType(*of->groups, egcCompressedX, i) == 0)
+            if (getGroupType(*of->groups, SimulationAtomGroupType::CompressedPositionOutput, i) == 0)
             {
                 of->natoms_x_compressed++;
             }
@@ -361,7 +361,7 @@ void mdoutf_write_to_trajectory_files(FILE *fplog, const t_commrec *cr,
                 auto x = makeArrayRef(state_global->x);
                 for (i = 0, j = 0; (i < of->natoms_global); i++)
                 {
-                    if (getGroupType(*of->groups, egcCompressedX, i) == 0)
+                    if (getGroupType(*of->groups, SimulationAtomGroupType::CompressedPositionOutput, i) == 0)
                     {
                         copy_rvec(x[i], xxtc[j++]);
                     }