*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team.
+ * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
namespace gmx
{
struct AwhHistory;
-}
+enum class CheckpointDataOperation;
+template<CheckpointDataOperation operation>
+class CheckpointData;
+} // namespace gmx
//! Convenience alias for until all is moved in the gmx namespace
template<class T>
* before we enter the MD loop should compute these quantities
* fresh, or not. */
bool hasReadEkinState;
+
+ /*!
+ * \brief Allows to read and write checkpoint within modular simulator
+ * \tparam operation Whether we're reading or writing
+ * \param checkpointData The CheckpointData object
+ */
+ template<gmx::CheckpointDataOperation operation>
+ void doCheckpoint(gmx::CheckpointData<operation> checkpointData);
};
/*! \brief Free-energy sampling history struct
}
};
-/*! \brief Fills fep_state, lambda, and lam0 if needed
+/*! \brief Prints the current lambda state to the log file.
*
- * If FEP or simulated tempering is in use:
+ * \param[in] fplog The log file. If fplog == nullptr there will be no output.
+ * \param[in] lambda The array of lambda values.
+ * \param[in] isInitialOutput Whether this output is the initial lambda state or not.
+ */
+void printLambdaStateToLog(FILE* fplog, gmx::ArrayRef<real> lambda, bool isInitialOutput);
+
+
+/*! \brief Fills fep_state and lambda if needed
*
- * fills non-null lam0 with the initial lambda values, and
- * on master rank fills fep_state and lambda.
+ * If FEP or simulated tempering is in use, fills fep_state
+ * and lambda on master rank.
*
* Reports the initial lambda state to the log file. */
-void initialize_lambdas(FILE* fplog,
- const t_inputrec& ir,
- bool isMaster,
- int* fep_state,
- gmx::ArrayRef<real> lambda,
- double* lam0);
+void initialize_lambdas(FILE* fplog, const t_inputrec& ir, bool isMaster, int* fep_state, gmx::ArrayRef<real> lambda);
#endif