schrodinger.application.desmond.fep_edge_report_maker module

exception schrodinger.application.desmond.fep_edge_report_maker.InconsistentDataException

Bases: Exception

__init__(*args, **kwargs)
args
with_traceback()

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

schrodinger.application.desmond.fep_edge_report_maker.create_sketcher()
schrodinger.application.desmond.fep_edge_report_maker.parse_res_tag(label)
schrodinger.application.desmond.fep_edge_report_maker.get_residue_label(rname, resid, cname)
schrodinger.application.desmond.fep_edge_report_maker.get_opacity(opacity_val)
class schrodinger.application.desmond.fep_edge_report_maker.FEPEdgeReportMakerBase(fep_edge_data, basename=None, perturbation_type=None)

Bases: object

Base class for all remport makers

VERBOSE = False
__init__(fep_edge_data, basename=None, perturbation_type=None)

This a base class for generating various types of reports.

Parameters
  • fep_edge_data (FEPEdgeData) – Object containing all the data for this report

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

  • perturbation_type (str) – FEP_TYPE value

get_2d_ligand_image(lig_st)
get_rest_density_img(rest_density_data, legend=True, size_ratio=1.0)
get_rest_density_plot(rest_density_data, legend=True, for_print=False)
property get_rest_density_text
get_torsions_plot(tors1, tors2, tors_from, tors_to, for_print=False)
get_structure_item(st, rect=None)

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

Parameters
  • st (structure.Structure) – Structure to draw in 2D

  • 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)

Returns structure scenes for two 2d ligands with annotations.

class schrodinger.application.desmond.fep_edge_report_maker.FEPEdgeReportMaker(fep_edge_data, basename=None, perturbation_type='small_molecule')

Bases: schrodinger.application.desmond.fep_edge_report_maker.FEPEdgeReportMakerBase

HELIX = 'helix'
STRAND = 'strand'
HELIX_COLOR = '#F06040'
STRAND_COLOR = '#40C0E0'
B_FACTOR = '#9400D3'
__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 FEP job it was

report()
property get_rest_density_text
remove_last_atom_highlight(lig_item)

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)

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)

The mpl_connect 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)

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]

gen_protein_rmsf_image(rmsf_l0, rmsf_l1, sse_l0, sse_l1, b_factor, contact_data, show_res_type=None)
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

Parameters
  • for_print (bool) – return an image for PDF if True otherwise return matplotlib object

  • 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

error(msg)
str(str_in)

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

VERBOSE = False
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_rest_density_img(rest_density_data, legend=True, size_ratio=1.0)
get_rest_density_plot(rest_density_data, legend=True, for_print=False)
get_structure_item(st, rect=None)

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

Parameters
  • st (structure.Structure) – Structure to draw in 2D

  • 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)
class schrodinger.application.desmond.fep_edge_report_maker.PRMEdgeReportMaker(fep_edge_data, basename=None, perturbation_type='small_molecule')

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')

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()
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

Parameters
  • for_print (bool) – return an image for PDF if True otherwise return matplotlib object

  • 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, size_ratio=1.0)
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.Structure) – Structure to draw in 2D

  • 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 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')

Bases: schrodinger.application.desmond.fep_edge_report_maker.FEPEdgeReportMaker

report()
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]

on_move(event)

The mpl_connect 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 FEP 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

Parameters
  • for_print (bool) – return an image for PDF if True otherwise return matplotlib object

  • 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, size_ratio=1.0)
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.Structure) – Structure to draw in 2D

  • 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

class schrodinger.application.desmond.fep_edge_report_maker.SolubilityReportMaker(fep_edge_data, basename=None, perturbation_type='solubility')

Bases: schrodinger.application.desmond.fep_edge_report_maker.FEPEdgeReportMakerBase

This class generates plots, images and PDF reports for Solubility FEP jobs.

VERBOSE = False
TORSIONS_PER_PAGE = 10
__init__(fep_edge_data, basename=None, perturbation_type='solubility')

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) – FEP Type

report()
get_torsions_plot(all_tors, tors_from, tors_to, for_print=False)
create_torsions_plot(fig, all_tors, tors_from, tors_to, 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.

  • tors (list[list[[fep_edge_data.FEPTorsions]]) – a List of List of torsions from each sublimation leg.

  • tors_from (int) – Starting torsion index.

  • tors_to (int) – Ending torsion index

  • 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]

create_mol_env_fig(fig, for_print=False)
get_mol_series_plot(data, ylabel, for_print=True)
Parameters
  • data (List(Tuple)`) – a list of tuples for scatter plot [(x-vals, y-vals, lables)…]

  • ylabel (str) – Label that goes on the y-axis

  • for_print (bool) – Bool if the figure will be used for print

create_mol_series_fig(data, fig, ylabel, for_print=False)
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_rest_density_img(rest_density_data, legend=True, size_ratio=1.0)
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.Structure) – Structure to draw in 2D

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

Returns

Structure item to be drawn in 2D.

Return type

structure2d.structure_item