msmexplorer.plot_free_energy

msmexplorer.plot_free_energy(data, ax=None, obs=0, temperature=300.0, n_samples=None, pi=None, bw='scott', gridsize=30, cut=3, clip=None, color='beryl', shade=True, alpha=0.5, cmap='bone', vmin=None, vmax=None, n_levels=10, clabel=False, clabel_kwargs=None, cbar=False, cbar_kwargs=None, xlabel=None, ylabel=None, labelsize=14, random_state=None, return_data=False)

Plot free energy of observable(s) in kilocalories per mole.

Parameters:
data : ndarray (nsamples, ndim)

The samples. This should be a 1- or 2-dimensional array. For a 1-D array this results in 1-D kernel density plot. For a 2-D array, this generates a 2-D contour plot.

ax : matplotlib axis, optional

matplotlib figure axis

obs : int or tuple, optional (default: 0)

Observables to plot.

temperature : float, optional (default: 300.0)

Simulation temperature in degrees Kelvin.

n_samples : int, optional

Number of points to subsample from original data.

pi : array-like, optional

Equilibrium ensemble weights for each observation.

bw : {‘scott’ | ‘silverman’ | scalar | pair of scalars }, optional

Name of reference method to determine kernel size, scalar factor, or scalar for each dimension of the bivariate plot.

gridsize : int, optional

Number of discrete points in the evaluation grid per dimensional.

cut : scalar, optional (default: 3)

Draw the estimate to cut * bw from the extreme data points.

clip : pair of scalars, or pair of pair of scalars, optional

Lower and upper bounds for datapoints used to fit KDE. Can provide a pair of (low, high) bounds for bivariate plots.

color : str, optional (default: ‘beryl’)

Color of the univariate KDE curve.

shade : bool, optional

If True, shade in the area over the KDE curve (or draw with filled contours when data is bivariate).

alpha : float, optional (default: 0.5)

Opacity of shaded area.

cmap : str or matplotlib colormap, optional (default: ‘bone’)

Colormap to use in the filled contour plot.

vmin : float, optional

The minimum value used in contour plot. If None the minimum value of the KDE is used.

vmax : float, optional

The maximum value used in contour plot. If None the median value of the KDE is used.

n_levels : int, optional (default: 10)

Number of contour levels to include.

clabel : bool, optional (default: False)

Adds labels to contours in counter plot.

clabel_kwargs : dict, optional

Arguments to pass to matplotlib clabel.

cbar: bool, optional (default: False)

Adds a colorbar that maps the free energy colors

cbar_kwargs: dict, optional

Arguments to pass to matplotlib cbar

xlabel : str, optional

x-axis label

ylabel : str, optional

y-axis label

labelsize : int, optional (default: 14)

x- and y-label font size

random_state : integer or numpy.RandomState, optional

The generator used to initialize the centers. If an integer is given, it fixes the seed. Defaults to the global numpy random number generator

return_data : Boolean,optional

Whether or not to return the plotting data

Returns:
ax : matplotlib axis

matplotlib figure axis

return_data : list of lists, optional

data that can be used to remake the figures. The last list is always the free energy. To remake 1 dim plot:plot(return_data[0],return_data[1]). To remake 2 dim plots: contour(return_data[0],return_data[1],return_data[2])