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

Class PhaseFeatureMarker

object --+
         |
        PhaseFeatureMarker

Class defining a single Phase marker.

Instance Methods [hide private]
 
__init__(self, sites, feature_index, color, entry_id, feature_name, use_highlight, allow_picking=True)
Feature marker initializer.
 
getHypoID(self)
Return the hypothesis name/ID for the hypothesis from which this feature is from.
 
setPropertyLabelVisible(self, visible)
Shows or hides detailed (property) label for this feature marker.
dict or None
_getFeatureProperties(self)
Returns feature properties such as feature rules, tolerance etc from the hypothesis.
tuple
_createFeature(self, sites, color, opacity, entry_id)
Create markers for the given pharmacophore sites.
tuple
_createAromaticFeature(self, sites, color, opacity, entry_id)
Create markers for the given aromatic feature.
 
setRightClickHandler(self, pick_category)
Sets right click handler for a given pick category.
 
drawLabels(self)
Draw the labels for the sites of this features in the Workspace.
 
setIsGlowing(self, is_glowing)
Enables or disables glow effect for the object.
 
setSelected(self, select)
Shows glow effect when this feature is selected.
 
_setGlowing(self, is_glowing, glow_color)
Enables or disables glow effect for the object.
 
show(self)
 
hide(self)
 
clear(self)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
int ARROW_RADII = 0.065
radius of the arrow that is drawn between pharmacophore site and projected points.
int SPHERE_RADII = 0.4
radius of the pharmacophore site
  TORUS_RADII = 0.45
  TORUS_TUBE_RADII = 0.12
  OPACITY_DEFAULT = 0.4
  OPACITY_SELECTED = 1.0
  GLOW_COLOR = (0.95, 0.5, 0.25)
  SELECTED_COLOR = (0.25, 0.5, 0.95)
  FEATURE_TYPE = 'Feature Type'
  USE_IN_SCREEN = 'Use in Screening'
  ALLOWED_TO_MATCH = 'Allowed to match'
  FORBIDDEN_TO_MATCH = 'Forbidden to match'
  TOLERANCE = 'Tolerance'
  feature_counter = 1
Instance Variables [hide private]
  _phase_features
A dictionary containing all pharmacophore feature
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, sites, feature_index, color, entry_id, feature_name, use_highlight, allow_picking=True)
(Constructor)

 

Feature marker initializer.

Parameters:
  • sites (list) - list of PhpSite objects for this feature
  • feature_index (int) - index of this feature in a hypothesis
  • color (list) - feature marker color defined as a list of rgb values
  • entry_id (int) - entry id of structure this feature belongs to
  • feature_name (str) - feature name
  • use_highlight (bool) - flag defining whether this marker should be highlighted
  • allow_picking - indicates whether feature can be 'picked'. When enabled this would make possible to show context menu when feature is right-clicked. Default is True. @type allow_picking
Overrides: object.__init__

setPropertyLabelVisible(self, visible)

 

Shows or hides detailed (property) label for this feature marker.

Parameters:
  • visible (bool) - whether to make property labels visible or not

_getFeatureProperties(self)

 

Returns feature properties such as feature rules, tolerance etc from the hypothesis. If there is no hypothesis associated with this feature returns None.

Returns: dict or None
dictionary of feature properties keyed on the feature name

_createFeature(self, sites, color, opacity, entry_id)

 

Create markers for the given pharmacophore sites.

Parameters:
  • sites (list) - list of PhpSite objects, where the first element is always pharmacophore site, which is followed by one or more sites for projected points ('Q' site type).
  • color (list) - list of float rgb values that define color of this feature's markers
  • opacity (float) - feature marker opacity
  • entry_id (int) - entry id of the structure that this feature is associated with
Returns: tuple

_createAromaticFeature(self, sites, color, opacity, entry_id)

 

Create markers for the given aromatic feature.

Parameters:
  • sites (list) - list of PhpSite objects, where the first element is always pharmacophore site, which is followed by one or more sites for projected points ('Q' site type).
  • color (list) - list of float rgb values that define color of this feature's markers
  • opacity (float) - feature marker opacity
  • entry_id (int) - entry id of the structure that this feature is associated with
Returns: tuple

setRightClickHandler(self, pick_category)

 

Sets right click handler for a given pick category.

Parameters:
  • pick_category - picking category of markers
  • type - str

setIsGlowing(self, is_glowing)

 

Enables or disables glow effect for the object.

Parameters:
  • is_glowing (bool) - Whether the object is glowing.

setSelected(self, select)

 

Shows glow effect when this feature is selected.

Parameters:
  • select (bool) - indicates whether this feature should be selected

_setGlowing(self, is_glowing, glow_color)

 

Enables or disables glow effect for the object.

Parameters:
  • is_glowing (bool) - Whether the object is glowing.
  • glow_color (tuple) - color that should be used for the glow effect. It is given as a tuple of rgb values.