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=None, orientation='portrait', nb=10)¶
Plot the dhdl of TI.
- Parameters:
estimators (
estimators
or list) – One or moreestimators
, 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. The default is None, which is to use the unit in the input. Setting this will change the output unit.
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.
Changed in version 1.0.0: If no units is given, the units in the input will be used.
Changed in version 0.5.0: The units will be used to change the underlying data instead of only changing the figure legend.
Added in version 0.4.0.