Plot dF states from multiple estimators

The function plot_dF_state() allows the user to plot and compare the free energy difference between states (“dF”) from various kinds of estimators.

To compare the dF states of a single alchemical transformation among various estimators, the user can pass a list of estimators. (e.g. estimators = [TI, BAR, MBAR])

To compare the dF states of a multiple alchemical transformations, results from the same estimators can be concatenated into a list, which is then bundled to to another list of different estimators. (e.g. estimators = [(TI, TI), (BAR, BAR), (MBAR, MBAR)])

The figure could be plotted in portrait or landscape mode by setting the orientation. nb is used to control the number of dF states in one row. The user could pass a list of strings to labels to name the estimators or a list of strings to colors to color the estimators differently. The unit in the y axis could be labelled to other units by setting units, which by default is \(kT\).

Please check How to plot dF states for a complete example.

API Reference

alchemlyb.visualisation.plot_dF_state(estimators, labels=None, colors=None, units='kT', orientation='portrait', nb=10)

Plot the dhdl of TI.

Parameters
  • estimators (estimators or list) – One or more estimators, where the dhdl value will be taken from. For more than one estimators with more than one alchemical transformation, a list of list format is used.

  • labels (List) – list of labels for labelling different estimators.

  • colors (List) – list of colors for plotting different estimators.

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

  • orientation (string) – The orientation of the figure. Can be portrait or landscape

  • nb (int) – Maximum number of dF states in one row in the portrait mode

Returns

An Figure with the dF states drawn.

Return type

matplotlib.figure.Figure

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.