Skip to content

Commit

Permalink
Ensure convergence data saved by sub-simulation runners as well as Ca…
Browse files Browse the repository at this point in the history
…lculation
  • Loading branch information
fjclark committed Nov 27, 2023
1 parent 952ccdf commit 4336377
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions EnsEquil/run/leg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,10 @@ def analyse_convergence(
self._logger.info(f"Overall free energy changes: {dg_overall} kcal mol-1")
self._logger.info(f"Fractions of (equilibrated) simulation time: {fracts}")

# Save the convergence information as an attribute
self._delta_g_convergence = dg_overall
self._delta_g_convergence_fracts = fracts

# Plot the overall convergence and the squared SEM of the free energy change
for plot in [_plot_convergence, _plot_sq_sem_convergence]:
plot(
Expand Down
4 changes: 4 additions & 0 deletions EnsEquil/run/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,10 @@ def analyse_convergence(
self._logger.info(f"Overall free energy changes: {dg_overall} kcal mol-1")
self._logger.info(f"Fractions of (equilibrated) simulation time: {fracts}")

# Save the convergence information as an attribute
self._delta_g_convergence = dg_overall
self._delta_g_convergence_fracts = fracts

# Plot the overall convergence and the squared SEM of the free energy change
for plot in [_plot_convergence, _plot_sq_sem_convergence]:
plot(
Expand Down

0 comments on commit 4336377

Please sign in to comment.