Package schrodinger :: Package application :: Package phase :: Module phase_markers
[hide private]
[frames] | no frames]

Module phase_markers

Phase pharmacophore workspace markers.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  PhaseFeatureMarker
Class defining a single Phase marker.
  PhaseSphere
Phase sphere graphics object.
  PhaseSphereMarkers
Base class that defines group of sphere markers.
  PhaseXvolMarkers
Class that defines group of spheres for the excluded volume.
  PhaseTolMarkers
Class that defines group of tolerance spheres.
  PhaseMarkers
Class for adding pharmacophore feature markers and controlling their visibility.
Functions [hide private]
tuple
_calculate_arrow_tail(xyz, pxyz, rad, rcyl)
Calculate coordinates of the projected point arrow tail position.
phase.PhpSite
set_freestyle_site_type(site, feature_type)
Updates a site with the given pharmacophore feature type, and if applicable assigns projected coordinates of the corresponding free-style site type.
PhaseMarkers
get_phase_markers()
This function returns global PhaseMarkers object that should be used to generate Phase marker throughout Maestro session.
 
show_workspace_phase_markers(entry_ids, include_Q=False)
Delays the call to show workspace phase markers with a single shot to allow for the project table project_model to update appropriately.
 
_undisplay_entry_atoms(entry_id)
Undisplay all atoms associated with the given entry id in the workspace ct.
 
_show_reference_ligand(entry_ids)
Show reference ligand as a result of including hypothesis entry.
hypothesis.PhaseHypothesis
_get_hypothesis(eid)
Get hypothesis associated with an entry id.
 
_show_workspace_phase_markers(entry_ids, include_Q)
Adds Phase pharmacophore site markers for given entries.
 
hide_workspace_phase_markers(entry_ids)
Removes Phase pharmacophore site markers for given entries.
 
project_close()
Delete all Phase feature markers.
 
setup_project_close()
Sets up function that should be called when project is closed.
 
set_entry_property(entry_id, prop_name, value)
Sets entry ct property to a given value.
 
set_excluded_volume_visible(entry_id, visible)
Toggles hypothesis properties which can be shown in the workspace for hypothesis with a given entry id.
 
set_reference_ligand_visible(entry_id, visible)
Toggles display of reference ligand in the Workspace for hypothesis with a given entry id.
 
set_feature_tolerance_visible(entry_id, visible)
Toggles display of feature tolerance spheres in the Workspace for hypothesis with a given entry id.
 
set_property_labels_visible(entry_id, visible)
Toggles display of feature property labels for hypothesis with a given entry_id.
 
show_phase_hover_markers(pick_id)
Show glow effect when mouse is hovered on a phase marker.
 
hide_phase_hover_markers(pick_id)
Remove glow effect when mouse is moved away from a phase marker.
Variables [hide private]
  maestro = schrodinger.get_maestro()
  markers = None
hash(x)
  LABEL_FONT_NAME = 'Sans Serif'
  __package__ = 'schrodinger.application.phase'
Function Details [hide private]

_calculate_arrow_tail(xyz, pxyz, rad, rcyl)

 

Calculate coordinates of the projected point arrow tail position. Tail position is calculated in such a way that arrow cylinder 'grows' from the surface of the pharmacophore sphere.

Parameters:
  • xyz ((float, float, float)) - coordinates of the pharmacophore site
  • pxyz ((float, float, float)) - coordinates of the projected point (arrow end point)
  • rad (float) - pharmacophore feature sphere radius
  • rcyl (float) - radius of the arrow cylinder
Returns: tuple
tuple that contains xyz coordinates of the arrow tail point

set_freestyle_site_type(site, feature_type)

 

Updates a site with the given pharmacophore feature type, and if applicable assigns projected coordinates of the corresponding free-style site type.

Parameters:
  • feature_type (str) - site's feature type
Returns: phase.PhpSite
pharmacophore site

get_phase_markers()

 

This function returns global PhaseMarkers object that should be used to generate Phase marker throughout Maestro session.

Returns: PhaseMarkers
PhaseMarkers object

show_workspace_phase_markers(entry_ids, include_Q=False)

 

Delays the call to show workspace phase markers with a single shot to allow for the project table project_model to update appropriately.

Parameters:
  • entry_ids (list of int) - list of Phase hypothesis entries
  • include_Q (bool) - whether to include Q site phase markers

_undisplay_entry_atoms(entry_id)

 

Undisplay all atoms associated with the given entry id in the workspace ct. We manipulate the workspace directly here instead of issuing a maestro command so that we don't break the user's ability to undo inclusion (MAE-38226). This function should only be called when we need to bypass maestro command framework.

Parameters:
  • entry_id (int) - Phase hypothesis entry id

_show_reference_ligand(entry_ids)

 

Show reference ligand as a result of including hypothesis entry.

@NOTE - MAE-38321, MAE-38324 This function has to be kept separate from _show_workspace_phase_markers() because it has to be executed immediately rather than running through single slot initiated to execute _show_workspace_phase_markers(). Any project changes have to run always under command execution code in order to allow UNDO. If this function is run through _show_workspace_phase_markers(), then command gets completed before executing this function and we lose the ability to undo.

Parameters:
  • entry_ids (list) - list of Phase hypothesis entries

_get_hypothesis(eid)

 

Get hypothesis associated with an entry id.

Parameters:
  • entry_id - entry id of the structure that this hypothesis associated with
  • eid (int)
Returns: hypothesis.PhaseHypothesis
Hypothesis.

_show_workspace_phase_markers(entry_ids, include_Q)

 

Adds Phase pharmacophore site markers for given entries. Phase hypothesis should be associated with entry in order for the sites to be added. If Phase markers already exist for a given entry id nothing needs to be done.

Parameters:
  • entry_ids (list of int) - list of Phase hypothesis entries
  • include_Q (bool) - whether to include Q site phase markers

hide_workspace_phase_markers(entry_ids)

 

Removes Phase pharmacophore site markers for given entries.

Parameters:
  • entry_ids (list) - list of Phase hypothesis entries

set_entry_property(entry_id, prop_name, value)

 

Sets entry ct property to a given value. This function is used to set special hypothesis properties that define whether excluded volumes, tolerances and reference structure should be visible.

Parameters:
  • entry_id (int) - hypothesis entry id
  • prop_name (str) - property name
  • value (float or int or str) - property value

set_excluded_volume_visible(entry_id, visible)

 

Toggles hypothesis properties which can be shown in the workspace for hypothesis with a given entry id.

Parameters:
  • entry_id (int) - Phase hypothesis entry id
  • visible (bool) - whether to make visible in the workspace or not

set_reference_ligand_visible(entry_id, visible)

 

Toggles display of reference ligand in the Workspace for hypothesis with a given entry id.

Parameters:
  • entry_id (int) - Phase hypothesis entry id
  • visible (bool) - whether to make visible in the workspace or not

set_feature_tolerance_visible(entry_id, visible)

 

Toggles display of feature tolerance spheres in the Workspace for hypothesis with a given entry id.

Parameters:
  • entry_id (int) - Phase hypothesis entry id
  • visible (bool) - whether to make visible in the workspace or not

set_property_labels_visible(entry_id, visible)

 

Toggles display of feature property labels for hypothesis with a given entry_id.

Parameters:
  • entry_id (int) - Phase hypothesis entry id
  • visible (bool) - whether to make property labels visible or not

show_phase_hover_markers(pick_id)

 

Show glow effect when mouse is hovered on a phase marker.

Parameters:
  • pick_id (int) - Phase marker pick id

hide_phase_hover_markers(pick_id)

 

Remove glow effect when mouse is moved away from a phase marker.

Parameters:
  • pick_id (int) - Phase marker pick id