From d16b9cc8b8ef7c45728002ab7c8fd80e6c5dcd99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Pulido?= Date: Tue, 12 Apr 2022 08:31:29 -0400 Subject: [PATCH] Number of equilibrium simulations and statistical inefficiency in real time output. (#572) --- openmmtools/multistate/multistatesampler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openmmtools/multistate/multistatesampler.py b/openmmtools/multistate/multistatesampler.py index b0895a11..0d115bd2 100644 --- a/openmmtools/multistate/multistatesampler.py +++ b/openmmtools/multistate/multistatesampler.py @@ -1527,6 +1527,8 @@ def _offline_analysis(self): try: # Trap errors for MBAR being under sampled and the W_nk matrix not being normalized correctly mbar = analysis.mbar free_energy, err_free_energy = analysis.get_free_energy() + n_equilibration_iterations = analysis.n_equilibration_iterations + statistical_inefficiency = analysis.statistical_inefficiency except ParameterError as e: # We don't update self._last_err_free_energy here since if it # wasn't below the target threshold before, it won't stop MultiStateSampler now. @@ -1570,7 +1572,9 @@ def _offline_analysis(self): "percent_complete": self._iteration*100/self.number_of_iterations, "mbar_analysis": {"free_energy_in_kT": float(free_energy), "standard_error_in_kT": float(self._last_err_free_energy), - "number_of_uncorrelated_samples": float(analysis._equilibration_data[-1]) + "number_of_uncorrelated_samples": float(analysis._equilibration_data[-1]), + "n_equilibrium_iterations": int(n_equilibration_iterations), + "statistical_inefficiency": float(statistical_inefficiency) }, "timing_data": self._timing_data }