Enable output of average pull force and positions.
[alexxy/gromacs.git] / src / gromacs / fileio / tpxio.cpp
index 5e40fe03a9becf5d2b45e5746534bfa655706a62..8ce2b60ec27b767ed385e3a0d028c8438c781177 100644 (file)
@@ -122,6 +122,7 @@ enum tpxv {
     tpxv_RemoveImplicitSolvation,                            /**< removed support for implicit solvation */
     tpxv_PullPrevStepCOMAsReference,                         /**< Enabled using the COM of the pull group of the last frame as reference for PBC */
     tpxv_MimicQMMM,                                          /**< Inroduced support for MiMiC QM/MM interface */
+    tpxv_PullAverage,                                        /**< Added possibility to output average pull force and position */
     tpxv_Count                                               /**< the total number of tpxv versions */
 };
 
@@ -799,6 +800,17 @@ static void do_pull(t_fileio *fio, pull_params_t *pull, gmx_bool bRead,
                           bRead, file_version, ePullOld, eGeomOld, dimOld);
         }
     }
+    if (file_version >= tpxv_PullAverage)
+    {
+        gmx_bool v;
+
+        v                  = pull->bXOutAverage;
+        gmx_fio_do_gmx_bool(fio, v);
+        pull->bXOutAverage = v;
+        v                  = pull->bFOutAverage;
+        gmx_fio_do_gmx_bool(fio, v);
+        pull->bFOutAverage = v;
+    }
 }