ecdf_plot_DDGs#

cinnabar.plotting.ecdf_plot_DDGs(femap: FEMap, sources: list[str] | None = None, labels: list[str] | None = None, title: str | None = 'ECDF of Edgewise Absolute Errors', filename: str | None = None, observable_type: Literal['ddg', 'dpic50']='ddg', temperature: Quantity = <Quantity(298.15, 'kelvin')>, **kwargs) Figure[source]#

Plot ECDF of absolute errors for edgewise relative free energies from multiple sources within a single FEMap.

Each computational source in the FEMap (i.e. each distinct source tag on the relative calculations) is plotted as a separate ECDF curve.

Parameters:
  • femap (FEMap) – A single FEMap containing one or more computational sources together with experimental absolute measurements.

  • sources (list[str] | None, default None) – Computational source names to include in the plot. If None, all computational sources are used.

  • labels (list[str] | None, default None) – Display labels for the legend, one per source. If None, the source names are used directly, this should be used with sources to ensure the correct label is applied to the corresponding source.

  • title (str | None, default “ECDF of Edgewise Absolute Errors”) – Title for the plot. If None, no title is set.

  • filename (str | None, default None) – If provided, the plot will be saved to this filename.

  • observable_type ({“ddg”, “dpic50”}, default “ddg”) – The observable type to plot values in. Defaults to ddg (kcal/mol). Use dpic50 to report DpIC50 values.

  • temperature (Quantity, default 298.15 * unit.kelvin) – Temperature used for the unit conversion, only used if observable_type is "dpic50".

  • **kwargs – Additional keyword arguments to pass to ecdf_plot.

Returns:

The matplotlib Figure object containing the ECDF plot which can be edited further.

Return type:

plt.Figure

Notes

If any edges are missing an experimental value, they will be skipped in the absolute error calculation.

Raises:

ValueError – If any edges are missing a calculated DDG value, if the number of sources and labels do not match or if no computational results are in the graph.