alchemlyb.visualisation.plot_convergence

alchemlyb.visualisation.plot_convergence(forward, forward_error, backward, backward_error, units='kT', ax=None)

Plot the forward and backward convergence.

Parameters
  • forward (List) – A list of free energy estimate from the first X% of data.

  • forward_error (List) – A list of error from the first X% of data.

  • backward (List) – A list of free energy estimate from the last X% of data.

  • backward_error (List) – A list of error from the last X% of data.

  • units (str) – The label for the unit of the estimate. Default: “kT”

  • ax (matplotlib.axes.Axes) – Matplotlib axes object where the plot will be drawn on. If ax=None, a new axes will be generated.

Returns

An axes with the forward and backward convergence drawn.

Return type

matplotlib.axes.Axes

Note

The code is taken and modified from Alchemical Analysis.

The units variable is for labelling only. Changing it doesn’t change the unit of the underlying variable, which is in the unit of \(kT\).

New in version 0.4.0.