schrodinger.application.glide.visualization module

APIs for visualizing Glide properties, outputs and intermediates.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.glide.visualization.HistogramComponent(component: list[float], component_name: str, bins: list[int] | int = None, range: tuple[int, int] = None)

Bases: object

Holds component and options for a histogram. A component is data from a named source, for example: conformer energy, pose rmsd, refined pose emodel etc.

The component name becomes the title for the histogram.

component: list[float]
component_name: str
bins: list[int] | int = None
range: tuple[int, int] = None
__init__(component: list[float], component_name: str, bins: list[int] | int = None, range: tuple[int, int] = None) None
schrodinger.application.glide.visualization.highlight_rotatable_bonds(ligand: Ligand)
Highlights the rotatable bonds in a ligand.
  • PERIPHERAL bonds are colored green

  • CORE bonds are colored red

Parameters:

ligand – The input ligand to dock

Return type:

str

Returns:

2D drawing of the ligand with rotatable bonds coloured and atoms numbered as a string.

schrodinger.application.glide.visualization.plot_rotatable_bond_torsion_potentials(template: ConformerTemplate, y_limit: tuple[int, int] = None)

Plot the rotatable bond torison potentials of a single template as an array of plots of energy in kcal/mol vs degrees of rotation.

Parameters:
  • template – A conformer template

  • y_limit – y-axis limits

Return type:

matplotlib.figure.Figure

Returns:

Matplotlib figure plot

schrodinger.application.glide.visualization.two_component_histograms(histogram_component_1: HistogramComponent, histogram_component_2: HistogramComponent, fig_size: list = None)

Plot two different histograms side by side.

Parameters:
  • histogram_component_1 – A component with data to display. Example: RMSD, energy, emodel, gscore

  • histogram_component_2 – A component with data to display. Example: RMSD, energy, emodel, gscore

  • fig_size – The size of the figure.

Return type:

matplotlib.figure.Figure

Returns:

Matplotlib figure plot

schrodinger.application.glide.visualization.calculate_sts_rmsds(ref_st, sts)

Calculate the RMSDs for all heavy atoms between the sts and the ref_st.

Parameters:
  • ref_st (schrodinger.Structure) – The reference structure

  • sts (List[schrodinger.Structure]) – The list of structures to evaluate

Return type:

List[float]

Returns:

The list of rmsds

schrodinger.application.glide.visualization.plot_histogram(data: list[float], name: str, bins: list[int] | int = None, range: tuple[int, int] = None)

Plot the data in a histogram with the options passed in. Example: Conformer RMSD

Parameters:
  • data – Data to plot

  • name – title of the plot

  • bins – matplotlib bin option

Params range:

matplotlib x range

Return type:

matplotlib.figure.Figure

Returns:

Matplotlib figure plot

schrodinger.application.glide.visualization.joint_scatter_plot(component_1: HistogramComponent, component_2: HistogramComponent, x_limit: tuple[int, int], y_limit: tuple[int, int], bins: list[int] | int, fixed_locator: list[int])

Create a joint scatter plot with 2 components.

Parameters:
  • histogram_component_1 – A component with data to display. Example: RMSD, energy, emodel, gscore

  • histogram_component_2 – A component with data to display. Example: RMSD, energy, emodel, gscore

  • x_limit – x-axis limits

  • y_limit – y-axis limits

  • bins – histogram bins

  • fixed_locator – units to place the tick marks on the axis

Return type:

seaborn.JointGrid

Returns:

Seaborn joint figure plot

schrodinger.application.glide.visualization.get_property_dataframe(sts, properties_to_columns={'r_i_glide_emodel': 'Emodel', 'r_i_glide_energy': 'Energy', 'r_i_glide_gscore': 'GlideScore'})

Extract sts properties as a dataframe.

Parameters:
  • sts (List[schrodinger.Structure]) – The list of structures

  • properties_to_columns – Dictionary mapping structure properties to the column in the pandas dataframe. Default is a set of properties present in final poses.

Return type:

pd.DataFrame

Returns:

A dataframe of properties

schrodinger.application.glide.visualization.generate_lid_as_html(lig_st, recep_st, width=450, height=450)

Generate a Ligand interaction diagram and return it as an HTML <img/> object.

Parameters:
  • lig_st (schrodinger.Structure) – Ligand structure

  • recep_st (schrodinger.Structure) – Receptor structure

  • width (int) – Width of the interaction diagram

  • height (int) – Height of the interaction diagram

Return type:

str

Returns:

stringified HTML with the encoded image.