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

Module phase_markers

Classes [hide private]
  WorkspaceSite
This is special class we use when adding sites manually in workspace.
  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.
  EditFeatureDialog
Class for Phase feature editor dialog.
  ScreeningEditFeatureDialog
Advanced version of EditFeatureDialog that adds screening options for sites in Phase hypothesis.
Functions [hide private]
tuple
get_site_coords(site)
This function returns site coordinates.
tuple
_calculate_arrow_tail(x, y, z, px, py, pz, rad, rcyl)
Calculate coordinates of the projected point arrow tail position.
 
copy_site(from_site, to_site)
Copy data from one site to another.
list
copy_sites(sites)
Makes a copy of sites in a given list and returns it as new list.
int
get_fragment_for_sites(sites)
This function is called to create fragment structure for a given list of sites.
hypothesis.PhaseHypothesis
set_hypo_ref_props(hypo, props_dict)
Sets the CT-level properties of the reference ligand of the hypothesis, and returns the new hypothesis.
float
get_tol_value(hypo, site_index)
Returns tolerance value for a site in hypothesis.
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)
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_workspace_phase_markers(entry_ids)
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.
 
right_click_handler(pick_id, x, y)
Right click callback is called when user right clicks on a graphics object in the workspace at position (x,y) which has pick id as pick_id.
Variables [hide private]
  ENABLED_ROLE = 31
  DEFAULT_TOL = 2.0
  maestro = schrodinger.get_maestro()
  markers = None
hash(x)
  edit_dialogs = {}
  LABEL_FONT_NAME = maestro.get_font_names() [0]
  __package__ = 'schrodinger.application.phase'
Function Details [hide private]

get_site_coords(site)

 

This function returns site coordinates.

Returns: tuple
site xyz coordinates

_calculate_arrow_tail(x, y, z, px, py, pz, 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:
  • x (float) - x-coordinate of the pharmacophore site
  • y (float) - y-coordinate of the pharmacophore site
  • z (float) - z-coordinate of the pharmacophore site
  • px (float) - x-coordinate of the projected point (arrow end point)
  • py (float) - y-coordinate of the projected point (arrow end point)
  • pz (float) - z-coordinate 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

copy_site(from_site, to_site)

 

Copy data from one site to another.

Parameters:

copy_sites(sites)

 

Makes a copy of sites in a given list and returns it as new list.

Parameters:
  • sites (list) - list of sites
Returns: list
copy of original list

get_fragment_for_sites(sites)

 

This function is called to create fragment structure for a given list of sites.

Parameters:
  • sites (list) - list of sites from which fragment will be created
Returns: int
fragment ct handle

set_hypo_ref_props(hypo, props_dict)

 

Sets the CT-level properties of the reference ligand of the hypothesis, and returns the new hypothesis.

Parameters:
Returns: hypothesis.PhaseHypothesis
Updated hypothesis.

get_tol_value(hypo, site_index)

 

Returns tolerance value for a site in hypothesis. If hypothesis does not have tolerance property returns default value.

Parameters:
  • hypo (phase.PhpHypoAdaptor) - hypothesis object
  • site_index (int) - index of site in the hypothesis
Returns: float
tolerance value

get_phase_markers()

 

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

Returns: PhaseMarkers
PhaseMarkers object

_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 (str) - Phase hypothesis entry id

_show_workspace_phase_markers(entry_ids)

 

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) - list of Phase hypothesis entries

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

right_click_handler(pick_id, x, y)

 

Right click callback is called when user right clicks on a graphics object in the workspace at position (x,y) which has pick id as pick_id.

Parameters:
  • pick_id (int) - Pick id
  • x (int) - X position in the workspace
  • y (int) - Y position in the workspace