schrodinger.application.desmond.fep_edge_report_maker module

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.FEPEdgeReportMaker(fep_edge_data, basename=None, perturbation_type='small_molecule')

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

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()
get_rest_density_text
get_rest_density_plot(rest_density_data, legend=True)
get_rest_density_img(rest_density_data, legend=True)
get_structure_item(st)

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

Parameters:st – Structure to draw in 2D

@typr st: structure.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)

Returns structure scenes for two 2d ligands with annotations.

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)

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 of torsions from ligand 1.
  • tors2 (list) – 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.
Type:

list

get_torsions_plot(tors1, tors2, tors_from, tors_to, for_print=False)
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 :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)
error(msg)
str(str_in)

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

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.desmond.fep_edge_report_maker', 'HELIX': 'helix', 'STRAND': 'strand', 'HELIX_COLOR': '#F06040', 'STRAND_COLOR': '#40C0E0', 'B_FACTOR': '#9400D3', 'VERBOSE': False, '__init__': <function FEPEdgeReportMaker.__init__>, '_load_modules': <function FEPEdgeReportMaker._load_modules>, 'report': <function FEPEdgeReportMaker.report>, '_cleanup_temp_files': <function FEPEdgeReportMaker._cleanup_temp_files>, '_init_report': <function FEPEdgeReportMaker._init_report>, '_replica_exchange_density': <function FEPEdgeReportMaker._replica_exchange_density>, 'get_rest_density_text': <property object>, 'get_rest_density_plot': <function FEPEdgeReportMaker.get_rest_density_plot>, 'get_rest_density_img': <function FEPEdgeReportMaker.get_rest_density_img>, '_protein_ligand_report': <function FEPEdgeReportMaker._protein_ligand_report>, '_get_lid_img': <function FEPEdgeReportMaker._get_lid_img>, '_st_to_chmmol': <staticmethod object>, '_align_chmmol': <function FEPEdgeReportMaker._align_chmmol>, '_get_aligned_chmmol': <function FEPEdgeReportMaker._get_aligned_chmmol>, '_get_lid': <function FEPEdgeReportMaker._get_lid>, '_lid_add_lig_water_exposed': <staticmethod object>, '_lid_add_water_br': <staticmethod object>, '_lid_add_hydrophobic': <staticmethod object>, '_lid_add_picat': <staticmethod object>, '_lid_add_pipi': <staticmethod object>, '_lid_add_prot_metal': <staticmethod object>, '_lid_add_lig_metal': <staticmethod object>, '_lid_add_intramolecular_hb': <staticmethod object>, '_lid_add_ionic': <staticmethod object>, '_lid_add_hbonds': <staticmethod object>, '_get_pl_text': <function FEPEdgeReportMaker._get_pl_text>, '_get_plot_pl_bar_chart': <function FEPEdgeReportMaker._get_plot_pl_bar_chart>, '_create_pl_bar_fig': <function FEPEdgeReportMaker._create_pl_bar_fig>, 'get_structure_item': <function FEPEdgeReportMaker.get_structure_item>, 'get_2d_tors_annotated_lig_pair': <function FEPEdgeReportMaker.get_2d_tors_annotated_lig_pair>, 'remove_last_atom_highlight': <function FEPEdgeReportMaker.remove_last_atom_highlight>, 'add_atom_highlight': <function FEPEdgeReportMaker.add_atom_highlight>, 'on_move': <function FEPEdgeReportMaker.on_move>, '_highlight_matching_torsion_atoms': <function FEPEdgeReportMaker._highlight_matching_torsion_atoms>, 'create_torsions_plot': <function FEPEdgeReportMaker.create_torsions_plot>, 'get_torsions_plot': <function FEPEdgeReportMaker.get_torsions_plot>, '_get_torsion_plot_img': <function FEPEdgeReportMaker._get_torsion_plot_img>, '_get_annotated_2d_lig_img': <function FEPEdgeReportMaker._get_annotated_2d_lig_img>, '_ligand_torsion_report': <function FEPEdgeReportMaker._ligand_torsion_report>, '_get_ligand_torsion_text': <function FEPEdgeReportMaker._get_ligand_torsion_text>, '_ligand_report': <function FEPEdgeReportMaker._ligand_report>, '_ligand_properties': <function FEPEdgeReportMaker._ligand_properties>, '_ligand_rmsd_wrt_protein': <function FEPEdgeReportMaker._ligand_rmsd_wrt_protein>, '_get_ligand_wrt_prot_rmsd_text': <function FEPEdgeReportMaker._get_ligand_wrt_prot_rmsd_text>, '_get_ligand_wrt_prot_rmsd_plot': <function FEPEdgeReportMaker._get_ligand_wrt_prot_rmsd_plot>, '_protein_report': <function FEPEdgeReportMaker._protein_report>, '_protein_rmsf': <function FEPEdgeReportMaker._protein_rmsf>, '_get_protein_rmsf_text': <function FEPEdgeReportMaker._get_protein_rmsf_text>, '_add_sse_span': <function FEPEdgeReportMaker._add_sse_span>, '_add_b_factor': <function FEPEdgeReportMaker._add_b_factor>, '_add_interacting_residues': <function FEPEdgeReportMaker._add_interacting_residues>, 'gen_protein_rmsf_image': <function FEPEdgeReportMaker.gen_protein_rmsf_image>, 'get_protein_rmsf': <function FEPEdgeReportMaker.get_protein_rmsf>, '_b_factor_valid': <function FEPEdgeReportMaker._b_factor_valid>, '_gen_protein_rmsf_ax': <function FEPEdgeReportMaker._gen_protein_rmsf_ax>, '_protein_rmsd': <function FEPEdgeReportMaker._protein_rmsd>, '_get_protein_rmsd_text': <function FEPEdgeReportMaker._get_protein_rmsd_text>, '_get_protein_lambda_rmsd_plot': <function FEPEdgeReportMaker._get_protein_lambda_rmsd_plot>, '_get_pair_rmsd_plot': <function FEPEdgeReportMaker._get_pair_rmsd_plot>, '_create_pair_rmsd_fig': <function FEPEdgeReportMaker._create_pair_rmsd_fig>, '_get_sequence_viewer_image': <function FEPEdgeReportMaker._get_sequence_viewer_image>, '_free_energy_convergence_profiles': <function FEPEdgeReportMaker._free_energy_convergence_profiles>, '_get_free_energy_convergence_text': <function FEPEdgeReportMaker._get_free_energy_convergence_text>, '_gen_free_energy_convergence_table': <function FEPEdgeReportMaker._gen_free_energy_convergence_table>, '_gen_free_energy_convergence_plot': <function FEPEdgeReportMaker._gen_free_energy_convergence_plot>, '_gen_free_energy_convergence_fig': <function FEPEdgeReportMaker._gen_free_energy_convergence_fig>, '_ligand_perturbation_details': <function FEPEdgeReportMaker._ligand_perturbation_details>, '_generate_2d_lig_images': <function FEPEdgeReportMaker._generate_2d_lig_images>, '_generate_aligned_2d_lig_pair': <function FEPEdgeReportMaker._generate_aligned_2d_lig_pair>, '_protein_details': <function FEPEdgeReportMaker._protein_details>, '_salt_details': <function FEPEdgeReportMaker._salt_details>, 'get_2d_ligand_image': <function FEPEdgeReportMaker.get_2d_ligand_image>, '_get_2d_ligand_image': <function FEPEdgeReportMaker._get_2d_ligand_image>, '_get_temp_image_fn': <function FEPEdgeReportMaker._get_temp_image_fn>, '_report_fep_simulation_details': <function FEPEdgeReportMaker._report_fep_simulation_details>, 'error': <function FEPEdgeReportMaker.error>, 'str': <function FEPEdgeReportMaker.str>, '__dict__': <attribute '__dict__' of 'FEPEdgeReportMaker' objects>, '__weakref__': <attribute '__weakref__' of 'FEPEdgeReportMaker' objects>, '__doc__': None})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.fep_edge_report_maker'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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()
get_2d_tors_annotated_lig_pair(tors1, tors2, tors_from, tors_to)

Returns structure scenes for two 2d ligands with annotations.

B_FACTOR = '#9400D3'
HELIX = 'helix'
HELIX_COLOR = '#F06040'
STRAND = 'strand'
STRAND_COLOR = '#40C0E0'
VERBOSE = False
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.desmond.fep_edge_report_maker', '__doc__': '\n This class generates a PDF report for FEP+ for protein residue mutation.\n ', '__init__': <function PRMEdgeReportMaker.__init__>, 'report': <function PRMEdgeReportMaker.report>, '_ligand_details': <function PRMEdgeReportMaker._ligand_details>, '_fragment_perturbation_details': <function PRMEdgeReportMaker._fragment_perturbation_details>, '_protein_ligand_report': <function PRMEdgeReportMaker._protein_ligand_report>, '_get_pl_text': <function PRMEdgeReportMaker._get_pl_text>, '_get_free_energy_convergence_text': <function PRMEdgeReportMaker._get_free_energy_convergence_text>, '_get_ligand_torsion_text': <function PRMEdgeReportMaker._get_ligand_torsion_text>, 'get_2d_tors_annotated_lig_pair': <function PRMEdgeReportMaker.get_2d_tors_annotated_lig_pair>, '_generate_2d_lig_images': <function PRMEdgeReportMaker._generate_2d_lig_images>, '_generate_aligned_2d_lig_pair': <function PRMEdgeReportMaker._generate_aligned_2d_lig_pair>, '_ligand_properties': <function PRMEdgeReportMaker._ligand_properties>, '_protein_details': <function PRMEdgeReportMaker._protein_details>, '_ligand_report': <function PRMEdgeReportMaker._ligand_report>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.fep_edge_report_maker'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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 of torsions from ligand 1.
  • tors2 (list) – 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.
Type:

list

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_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)
get_rest_density_text
get_structure_item(st)

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

Parameters:st – Structure to draw in 2D

@typr st: structure.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)

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