drugforge.alchemy.predict

Functions

add_absolute_expt(dataframe, experimental_data)

Edit the dataframe inplace by adding experimental data provided to it.

add_identifiers_to_df(dataframe, ligands)

Given a wrangled DF containing either label (absolute) or labelA and labelB (relative), add molecule identifiers for each row.

add_pic50_columns(dataframe)

Adds pIC50 columns for all DG columns.

add_relative_expt(dataframe, experimental_data)

Edit the relative dataframe in place by adding experimental data provided to it.

clean_result_network(network[, console, ...])

Cleans an incoming result network JSON file from some issues that might occur.

create_absolute_report(dataframe)

Create a cinnabar style interactive report for the dataframe of absolute free energy predictions, this dataframe should include experimental data already.

create_relative_report(dataframe)

Create a cinnabar style interactive report for the dataframe of relative free energy predictions, this dataframe should include experimental data already.

dG_to_pIC50(dG)

Converts a DG kcal/mol unit to a pIC50 value.

dg_to_postera_dataframe(absolute_predictions)

Given a wrangled FEMap dataframe of absolute predicted DG values (kcal/mol), replace 'kcal/mol' columns with pIC50 values and rename the columns to match what's expected by manifold.

download_cdd_data(protocol_name)

A wrapper method to download CDD protocol data, mainly used to tuck imports.

draw_mol(smiles)

Create SVG text of a 2D depiction of a molecule which can be embed in an html report.

extract_experimental_data(reference_csv, ...)

Extract the experimental data from the given csv file, this assumes the csv has been downloaded from cdd.

get_data_from_femap(fe_map, ligands[, ...])

Given a cinnabar FEMap add the experimental reference data and generate and return: 1.

get_magnitude(quantity)

Convenience method to return the magnitude of an OpenFF unit quantity.

get_top_n_poses(absolute_df, ligands, top_n)

Takes the top_n number of ligands from the FE predictions and creates a list of Ligand objects.

ki_to_dg(ki, uncertainty[, temperature])

Convenience method to convert a Ki w/ a given uncertainty to an experimental estimate of the binding free energy.

negative_log(value[, inverse])

Convenience method to take the negative log of value, or to invert it.

pic50_to_dg(pic50, uncertainty[, temperature])

Convert the PIC50 value and its uncertainty to dg.

plotmol_absolute(calculated, experimental, ...)

Create an interactive plot using Plotmol for the absolute predictions of the free energies.

plotmol_relative(calculated, experimental, ...)

Create an interactive plot using Plotmol for the relative predictions of the free energies.

shift_and_add_prediction_error(df, point_type)

Wrangles a cinnabar FEMap DataFrame and returns a DF ready for plotting. In case of absolute (`point_type`=='DG'), shifts the prediction values to the mean experimental value.