alchemlyb.visualisation.plot_block_average¶
- alchemlyb.visualisation.plot_block_average(dataframe, units=None, final_error=None, ax=None)¶
Plot the forward and backward convergence.
The input could be the result from
forward_backward_convergence()
orfwdrev_cumavg_Rc()
. The input should be apandas.DataFrame
which has column FE andpandas.DataFrame.attrs
should compile with A note on units. The errorbar will be plotted if column FE_Error and Backward_Error is present.FE: A column of free energy estimate from some X% block of the data, where optional FE_Error column is the corresponding error.
final_error is the error of the final value and is shown as the error band around the final value. It can be provided in case an estimate is available that is more appropriate than the default, which is the error of the last value in Backward.
- dataframeDataframe
Output Dataframe has column Forward, Backward or optionally Forward_Error, Backward_Error see plot_convergence.
- unitsstr
The unit of the estimate. The default is None, which is to use the unit in the input. Setting this will change the output unit.
- final_errorfloat
The error (standard deviation) of the final value in
units
. If not given, takes the overall error of the time blocks, unless these were not provided, it which case it equals 1 kT.- axmatplotlib.axes.Axes
Matplotlib axes object where the plot will be drawn on. If
ax=None
, a new axes will be generated.
- matplotlib.axes.Axes
An axes with the forward and backward convergence drawn.
The code is taken and modified from Alchemical Analysis.
Added in version 2.4.0.