Add gapsys softcore function.
[alexxy/gromacs.git] / src / gromacs / fileio / tpxio.cpp
index f5bf5874eb29a62c7f121bf2548d699f06a87399..33e63d4f11b5029b2fb7b6f4dc38fb448af4e6a9 100644 (file)
@@ -138,6 +138,7 @@ enum tpxv
     tpxv_MTS,                                     /**< Added multiple time stepping */
     tpxv_RemovedConstantAcceleration, /**< Removed support for constant acceleration NEMD. */
     tpxv_TransformationPullCoord,     /**< Support for transformation pull coordinates */
+    tpxv_SoftcoreGapsys,              /**< Added gapsys softcore function */
     tpxv_Count                        /**< the total number of tpxv versions */
 };
 
@@ -622,6 +623,14 @@ static void do_fepvals(gmx::ISerializer* serializer, t_lambda* fepvals, int file
     {
         fepvals->edHdLPrintEnergy = FreeEnergyPrintEnergy::No;
     }
+    if (file_version >= tpxv_SoftcoreGapsys)
+    {
+        serializer->doInt(reinterpret_cast<int*>(&fepvals->softcoreFunction));
+    }
+    else
+    {
+        fepvals->softcoreFunction = SoftcoreType::Beutler;
+    }
 
     /* handle lambda_neighbors */
     if ((file_version >= 83 && file_version < 90) || file_version >= 92)