schrodinger.application.desmond.fep_edge_report_maker module

exception schrodinger.application.desmond.fep_edge_report_maker.InconsistentDataException[source]

Bases: Exception

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

schrodinger.application.desmond.fep_edge_report_maker.create_sketcher()[source]
schrodinger.application.desmond.fep_edge_report_maker.parse_res_tag(label)[source]
schrodinger.application.desmond.fep_edge_report_maker.get_residue_label(rname, resid, cname)[source]
schrodinger.application.desmond.fep_edge_report_maker.get_opacity(opacity_val)[source]
class schrodinger.application.desmond.fep_edge_report_maker.FEPEdgeReportMaker(fep_edge_data, basename=None, perturbation_type='small_molecule')[source]

Bases: object

HELIX = 'helix'
STRAND = 'strand'
HELIX_COLOR = '#F06040'
STRAND_COLOR = '#40C0E0'
B_FACTOR = '#9400D3'
VERBOSE = False
__init__(fep_edge_data, basename=None, perturbation_type='small_molecule')[source]

This class generates a PDF report for an FEP/REST (+) type of job. Both Legs of the simulations are processed in the FEPEdgeData and is used by this class to compile a result. :type fep_edge_data: FEPEdgeData :param fep_edge_data: Object containing all the data for this report

Parameters
  • basename (string) – the basename of the file of the PDF report

  • perturbation_type (str) – Type of PRM job it was

report()[source]
property get_rest_density_text
get_rest_density_plot(rest_density_data, legend=True, for_print=False)[source]
get_rest_density_img(rest_density_data, legend=True)[source]
get_structure_item(st, rect=None)[source]

Returns structure as a graphic item to draw and to annotate.

Parameters

st – Structure to draw in 2D

@typr st: structure.Structure

Parameters

rect (QtCore.QRectF) – Rectangle (bounding box) for the structure

Returns

Structure item to be drawn in 2D.

Return type

structure2d.structure_item

get_2d_tors_annotated_lig_pair(tors1, tors2, tors_from, tors_to, rect=None)[source]

Returns structure scenes for two 2d ligands with annotations.

remove_last_atom_highlight(lig_item)[source]

Removes previously highlighted atoms, if any, in a torsion.

Parameters

lig_item (structure2d.structure_item) – Ligand structure item.

add_atom_highlight(lig_item, torsion, color)[source]

Add new highlight for atoms in the given torsion.

Parameters
  • lig_item (structure2d.structure_item) – Ligand structure item.

  • torsion (fep_edge_data.FEPTorsions) – Ligand torsion to highlight

  • color (QtGui.QColor) – Highlight color

on_move(event)[source]

The `mpl_connect`s motion_notify_event slot for the torsion plot figure canvas.

If the mouse is inside a torsion plot, highlight the 1st and 4th atoms in that torsion in the structure.

Because torsions can spread to multiple tabs (or pages), need to access figure and structure items for each tab.

Parameters

event (matplotlib.backend_bases.MouseEvent) – The mouse event that triggered this callback

create_torsions_plot(fig, tors1, tors2, tors_from, tors_to, ipage=None, structure1_item=None, structure2_item=None, for_print=False)[source]

Creates a plot for torsions using the given matplot figure.

Parameters
  • fig (matplotlib.figure.Figure) – Figure to draw the torsion subplots in.

  • tors1 (list[fep_edge_data.FEPTorsions]) – List of torsions from ligand 1.

  • tors2 (list[fep_edge_data.FEPTorsions]) – List of torsions from ligand 2.

  • tors_from (int) – Starting torsion index.

  • tors_to (int) – Ending torsion index

  • ipage (int or None) – Page index of the torsions, only needed for interactively highlighting torsion atoms.

  • structure1_item (structure2d.structure_item or None) – Structure item 1, only needed for interactively highlighting torsion atoms.

  • structure2_item (structure2d.structure_item or None) – Structure item 2, only needed for interactively highlighting torsion atoms.

  • for_print (bool) – Whether the figure is used for print.

Returns

A list of the energy line plot axes

Return type

list[matplotlib.axes.Axes]

get_torsions_plot(tors1, tors2, tors_from, tors_to, for_print=False)[source]
gen_protein_rmsf_image(rmsf_l0, rmsf_l1, sse_l0, sse_l1, b_factor, contact_data, show_res_type=None)[source]
get_protein_rmsf(for_print=True, fig=None, show_sse=False, show_b_factor=False, show_interacting_residues=(False, False, False))[source]

This function returns either an img or a matplotlib object of protein RMSF plot :param for_print: return an image for PDF if True otherwise return

matplotlib object

Parameters
  • fig (matplotlib.figure.Figure) – matplotlib Figure object

  • show_sse (bool) – overlay secondary structure information on RMSF plot

  • show_b_factor (bool) – overlay b factor on the y2 axis

  • show_interacting_residues ((common, uniq_lig1, uniq_lig2)) – a tuple with residue indices that correspond to different contacts for ligand1, ligand2, and common

Returns

returns either an image or an matplotlib object, depends on the for_print variable

Return type

image | matplotlib ax obj

get_2d_ligand_image(lig_st)[source]
error(msg)[source]
str(str_in)[source]

This is to remove the “‘s in ARK returned strings enclosed in double quotes

class schrodinger.application.desmond.fep_edge_report_maker.PRMEdgeReportMaker(fep_edge_data, basename=None, perturbation_type='small_molecule')[source]

Bases: schrodinger.application.desmond.fep_edge_report_maker.FEPEdgeReportMaker

This class generates a PDF report for FEP+ for protein residue mutation.

__init__(fep_edge_data, basename=None, perturbation_type='small_molecule')[source]

This class generates a PDF report for an FEP/REST (+) type of job. Both Legs of the simulations are processed in the FEPEdgeData and is used by this class to compile a result. :type fep_edge_data: FEPEdgeData :param fep_edge_data: Object containing all the data for this report

Parameters
  • basename (string) – the basename of the file of the PDF report

  • perturbation_type (str) – Type of PRM job it was

report()[source]
B_FACTOR = '#9400D3'
HELIX = 'helix'
HELIX_COLOR = '#F06040'
STRAND = 'strand'
STRAND_COLOR = '#40C0E0'
VERBOSE = False
add_atom_highlight(lig_item, torsion, color)

Add new highlight for atoms in the given torsion.

Parameters
  • lig_item (structure2d.structure_item) – Ligand structure item.

  • torsion (fep_edge_data.FEPTorsions) – Ligand torsion to highlight

  • color (QtGui.QColor) – Highlight color

create_torsions_plot(fig, tors1, tors2, tors_from, tors_to, ipage=None, structure1_item=None, structure2_item=None, for_print=False)

Creates a plot for torsions using the given matplot figure.

Parameters
  • fig (matplotlib.figure.Figure) – Figure to draw the torsion subplots in.

  • tors1 (list[fep_edge_data.FEPTorsions]) – List of torsions from ligand 1.

  • tors2 (list[fep_edge_data.FEPTorsions]) – List of torsions from ligand 2.

  • tors_from (int) – Starting torsion index.

  • tors_to (int) – Ending torsion index

  • ipage (int or None) – Page index of the torsions, only needed for interactively highlighting torsion atoms.

  • structure1_item (structure2d.structure_item or None) – Structure item 1, only needed for interactively highlighting torsion atoms.

  • structure2_item (structure2d.structure_item or None) – Structure item 2, only needed for interactively highlighting torsion atoms.

  • for_print (bool) – Whether the figure is used for print.

Returns

A list of the energy line plot axes

Return type

list[matplotlib.axes.Axes]

error(msg)
gen_protein_rmsf_image(rmsf_l0, rmsf_l1, sse_l0, sse_l1, b_factor, contact_data, show_res_type=None)
get_2d_ligand_image(lig_st)
get_2d_tors_annotated_lig_pair(tors1, tors2, tors_from, tors_to, rect=None)

Returns structure scenes for two 2d ligands with annotations.

get_protein_rmsf(for_print=True, fig=None, show_sse=False, show_b_factor=False, show_interacting_residues=(False, False, False))

This function returns either an img or a matplotlib object of protein RMSF plot :param for_print: return an image for PDF if True otherwise return

matplotlib object

Parameters
  • fig (matplotlib.figure.Figure) – matplotlib Figure object

  • show_sse (bool) – overlay secondary structure information on RMSF plot

  • show_b_factor (bool) – overlay b factor on the y2 axis

  • show_interacting_residues ((common, uniq_lig1, uniq_lig2)) – a tuple with residue indices that correspond to different contacts for ligand1, ligand2, and common

Returns

returns either an image or an matplotlib object, depends on the for_print variable

Return type

image | matplotlib ax obj

get_rest_density_img(rest_density_data, legend=True)
get_rest_density_plot(rest_density_data, legend=True, for_print=False)
property get_rest_density_text
get_structure_item(st, rect=None)

Returns structure as a graphic item to draw and to annotate.

Parameters

st – Structure to draw in 2D

@typr st: structure.Structure

Parameters

rect (QtCore.QRectF) – Rectangle (bounding box) for the structure

Returns

Structure item to be drawn in 2D.

Return type

structure2d.structure_item

get_torsions_plot(tors1, tors2, tors_from, tors_to, for_print=False)
on_move(event)

The `mpl_connect`s motion_notify_event slot for the torsion plot figure canvas.

If the mouse is inside a torsion plot, highlight the 1st and 4th atoms in that torsion in the structure.

Because torsions can spread to multiple tabs (or pages), need to access figure and structure items for each tab.

Parameters

event (matplotlib.backend_bases.MouseEvent) – The mouse event that triggered this callback

remove_last_atom_highlight(lig_item)

Removes previously highlighted atoms, if any, in a torsion.

Parameters

lig_item (structure2d.structure_item) – Ligand structure item.

str(str_in)

This is to remove the “‘s in ARK returned strings enclosed in double quotes

class schrodinger.application.desmond.fep_edge_report_maker.ABFEPReportMaker(fep_edge_data, basename=None, perturbation_type='small_molecule')[source]

Bases: schrodinger.application.desmond.fep_edge_report_maker.FEPEdgeReportMaker

report()[source]
create_torsions_plot(fig, tors1, tors2, tors_from, tors_to, ipage=None, structure1_item=None, structure2_item=None, for_print=False)[source]

Creates a plot for torsions using the given matplot figure.

Parameters
  • fig (matplotlib.figure.Figure) – Figure to draw the torsion subplots in.

  • tors1 (list[fep_edge_data.FEPTorsions]) – List of torsions from ligand 1.

  • tors2 (list[fep_edge_data.FEPTorsions]) – List of torsions from ligand 2.

  • tors_from (int) – Starting torsion index.

  • tors_to (int) – Ending torsion index

  • ipage (int or None) – Page index of the torsions, only needed for interactively highlighting torsion atoms.

  • structure1_item (structure2d.structure_item or None) – Structure item 1, only needed for interactively highlighting torsion atoms.

  • structure2_item (structure2d.structure_item or None) – Structure item 2, only needed for interactively highlighting torsion atoms.

  • for_print (bool) – Whether the figure is used for print.

Returns

A list of the energy line plot axes

Return type

list[matplotlib.axes.Axes]

on_move(event)[source]

The `mpl_connect`s motion_notify_event slot for the torsion plot figure canvas.

If the mouse is inside a torsion plot, highlight the 1st and 4th atoms in that torsion in the structure.

Because torsions can spread to multiple tabs (or pages), need to access figure and structure items for each tab.

Parameters

event (matplotlib.backend_bases.MouseEvent) – The mouse event that triggered this callback

B_FACTOR = '#9400D3'
HELIX = 'helix'
HELIX_COLOR = '#F06040'
STRAND = 'strand'
STRAND_COLOR = '#40C0E0'
VERBOSE = False
__init__(fep_edge_data, basename=None, perturbation_type='small_molecule')

This class generates a PDF report for an FEP/REST (+) type of job. Both Legs of the simulations are processed in the FEPEdgeData and is used by this class to compile a result. :type fep_edge_data: FEPEdgeData :param fep_edge_data: Object containing all the data for this report

Parameters
  • basename (string) – the basename of the file of the PDF report

  • perturbation_type (str) – Type of PRM job it was

add_atom_highlight(lig_item, torsion, color)

Add new highlight for atoms in the given torsion.

Parameters
  • lig_item (structure2d.structure_item) – Ligand structure item.

  • torsion (fep_edge_data.FEPTorsions) – Ligand torsion to highlight

  • color (QtGui.QColor) – Highlight color

error(msg)
gen_protein_rmsf_image(rmsf_l0, rmsf_l1, sse_l0, sse_l1, b_factor, contact_data, show_res_type=None)
get_2d_ligand_image(lig_st)
get_2d_tors_annotated_lig_pair(tors1, tors2, tors_from, tors_to, rect=None)

Returns structure scenes for two 2d ligands with annotations.

get_protein_rmsf(for_print=True, fig=None, show_sse=False, show_b_factor=False, show_interacting_residues=(False, False, False))

This function returns either an img or a matplotlib object of protein RMSF plot :param for_print: return an image for PDF if True otherwise return

matplotlib object

Parameters
  • fig (matplotlib.figure.Figure) – matplotlib Figure object

  • show_sse (bool) – overlay secondary structure information on RMSF plot

  • show_b_factor (bool) – overlay b factor on the y2 axis

  • show_interacting_residues ((common, uniq_lig1, uniq_lig2)) – a tuple with residue indices that correspond to different contacts for ligand1, ligand2, and common

Returns

returns either an image or an matplotlib object, depends on the for_print variable

Return type

image | matplotlib ax obj

get_rest_density_img(rest_density_data, legend=True)
get_rest_density_plot(rest_density_data, legend=True, for_print=False)
property get_rest_density_text
get_structure_item(st, rect=None)

Returns structure as a graphic item to draw and to annotate.

Parameters

st – Structure to draw in 2D

@typr st: structure.Structure

Parameters

rect (QtCore.QRectF) – Rectangle (bounding box) for the structure

Returns

Structure item to be drawn in 2D.

Return type

structure2d.structure_item

get_torsions_plot(tors1, tors2, tors_from, tors_to, for_print=False)
remove_last_atom_highlight(lig_item)

Removes previously highlighted atoms, if any, in a torsion.

Parameters

lig_item (structure2d.structure_item) – Ligand structure item.

str(str_in)

This is to remove the “‘s in ARK returned strings enclosed in double quotes