pyemma.plots.plot_free_energy

pyemma.plots.plot_free_energy(xall, yall, weights=None, ax=None, nbins=100, ncountours=100, offset=-1, avoid_zero_count=True, minener_zero=True, kT=1.0, vmin=0.0, vmax=None, cmap='spectral', cbar=True, cbar_label='Free energy (kT)')

Free energy plot given 2D scattered data

Builds a 2D-histogram of the given data points and plots -log(p) where p is the probability computed from the histogram count.

Parameters:
  • xall (ndarray(T)) – sample x-coordinates
  • yall (ndarray(T)) – sample y-coordinates
  • weights (ndarray(T), default = None) – sample weights. By default all samples have the same weight
  • ax (matplotlib Axes object, default = None) – the axes to plot to. When set to None the default Axes object will be used.
  • nbins (int, default=100) – number of histogram bins used in each dimension
  • ncountours (int, default=100) – number of contours used
  • offset (float, default=0.1) – DEPRECATED and ineffective.
  • avoid_zero_count (bool, default=True) – avoid zero counts by lifting all histogram elements to the minimum value before computing the free energy. If False, zero histogram counts will yield NaNs in the free energy which and thus regions that are not plotted.
  • minener_zero (bool, default=True) – Shifts the energy minimum to zero. If false, will not shift at all.
  • kT (float, default=1.0) – The value of kT in the desired energy unit. By default, will compute energies in kT (setting 1.0). If you want to measure the energy in kJ/mol at 298 K, use kT=2.479 and change the cbar_label accordingly.
  • vmin (float or None, default=0.0) – Lowest energy that will be plotted
  • vmax (float or None, default=None) – Highest energy that will be plotted
  • cmap (matplotlib colormap, optional, default = None) – the color map to use. None will use pylab.cm.spectral.
  • cbar (boolean, default=True) – plot a color bar
  • cbar_label (str or None, default='Free energy (kT)') – colorbar label string. Use None to suppress it.
Returns:

  • fig (Figure object containing the plot)
  • ax (Axes object containing the plot)