plot_DDGs#
- cinnabar.plotting.plot_DDGs(femap: FEMap, source: str, method_name: str = '', target_name: str = '', title: str = '', map_positive: bool = False, filename: str | None = None, symmetrise: bool = False, plotly: bool = False, data_label_type: Literal['small-molecule', 'protein-mutation'] | None=None, bootstrap_x_uncertainty: bool = False, bootstrap_y_uncertainty: bool = False, statistic_type: Literal['mle', 'mean']='mle', observable_type: Literal['ddg', 'dpic50']='ddg', temperature: Quantity = <Quantity(298.15, 'kelvin')>, **kwargs)[source]#
Function to plot relative free energies
- Parameters:
femap (FEMap) – FEMap object with relative and absolute free energy edges
source (str) – The source label of the computational relative free energies to plot against experiment. This must match the
sourcefield used when the calculations were added to theFEMap. For data loaded viaFEMap.from_csv(or added without an explicit source), passsource="".method_name (string, default “”) – Name of method associated with results, e.g. “openfe” by default an empty string.
target_name (string, default “”) – Name of system for results, e.g. “Thrombin”.
title (string, default “”) – Title for the plot.
map_positive (bool, default False) – Whether to map all DDGs to the positive x values. This is an aesthetic choice
filename (str | None, default None) – Filename for plot, if None the plot will be displayed.
symmetrise (bool, default False) – Whether to plot each datapoint twice, both positive and negative values.
plotly (bool, default False) – Whether to use plotly to generate the plot.
data_label_type ({“small-molecule”, “protein-mutation”} | None, default None) – Type of data label to add to each edge
if
Nonedata labels will not be addedif
'small-molecule'edge labels will bef"{node_A_name}→{node_B_name}".if
'protein-mutation'edge labels will given as single letter amino acid codes separated by the mutated residue index (eg."Y29A")If both node names start with
"-", the negative sign will be factored out (eg."-(Y29A)"or"-(benzene→toluene)").currently unsupported for plotly-generated plots
bootstrap_x_uncertainty (bool, default False) – Whether to account for uncertainty in x when bootstrapping.
bootstrap_y_uncertainty (bool, default False) – Whether to account for uncertainty in y when bootstrapping.
statistic_type ({“mle”, “mean”}, default “mle”) – The type of statistic to use, either “mle” (i.e. sample statistic) or “mean” (i.e. bootstrapped mean statistic).
observable_type ({“ddg”, “dpic50”}, default “ddg”) – The observable type to plot values in. Defaults to
ddg(kcal/mol). Usedpic50to plot DpIC50 values.temperature (Quantity, default 298.15 * unit.kelvin) – Temperature used for the unit conversion, only used if observable_type is
"dpic50".
- Return type:
Nothing