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

Class PhaseFeatureMixin

object --+
         |
        PhaseFeatureMixin

A mixin for adding pharmacophore feature markers and controlling their visibility.

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
 
closeEvent(self, event)
Remove all features when the panel is closed.
 
addFeature(self, sites, feature_name, color, entry_id)
Add pharmacophore feature marker.
tuple
getFeature(self, feature_name, entry_id)
Retrieve markers for the specified feature.
tuple
_createFeature(self, sites, color, entry_id)
Create markers for the given pharmacophore sites.
 
_workspaceChanged(self, what_changed)
This function is called when Maestro workspace is changed.
 
_updateFeatures(self)
Show or hide features for entries that are included or excluded in the workspace.
 
removeFeature(self, feature_name, entry_id)
Removes markers for the specified pharmacophore feature.
 
removeAllFeatures(self)
Removes markers for all pharmacophore features.
 
removeAllFeaturesForEntry(self, entry_id)
Removes markers for all features associated with a given entry.
 
showFeature(self, feature_name, entry_id)
Show markers for the specified pharmacophore feature.
 
showAllFeatures(self)
Shows markers for all pharmacophore features.
 
showAllFeaturesForEntry(self, entry_id)
Shows markers for all features associated with a given entry.
 
_showFeatureForKey(self, feature_key)
Show markers for a given feature key.
 
hideFeature(self, feature_name, entry_id)
Hide markers for the specified pharmacophore feature.
 
hideAllFeatures(self)
Hide markers for all pharmacophore features.
 
hideAllFeaturesForEntry(self, entry_id)
Hide markers for all features associated with a given entry.
 
_hideFeatureForKey(self, feature_key)
Hide markers for a given feature key.
 
_genFeatureKey(self, feature_name, entry_id)
Create a unique feature key.
list
_getKeysForEntry(self, entry_id)
Get a list of all feature keys for a given entry id.
set
_getEntryIDs(self)
Get a list of unique entry ids that feature markers stored in this mixin are associated with.
tuple
_calculateArrowTail(self, x, y, z, px, py, pz, rad, rcyl)
Calculate coordinates of the projected point arrow tail position.

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

Class Variables [hide private]
int ARROW_RADII = 0.15
radius of the arrow that is drawn between pharmacophore site and projected points.
int SPHERE_RADII = 0.8
radius of the pharmacophore site
Instance Variables [hide private]
dict _phase_features
A dictionary containing all pharmacophore feature markers associated with this panel.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

addFeature(self, sites, feature_name, color, entry_id)

 

Add pharmacophore feature marker.

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.
  • feature_name (str) - feature name
  • color (list) - list of float rgb values that define color of this feature's markers
  • entry_id (int) - entry id of the structure that this feature is associated with
Decorators:
  • @markers.requires_maestro

getFeature(self, feature_name, entry_id)

 

Retrieve markers for the specified feature.

Parameters:
  • feature_name (str) - feature name
  • entry_id (int) - entry id of the structure that this feature is associated with
Returns: tuple
Decorators:
  • @markers.requires_maestro

_createFeature(self, sites, color, 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
  • entry_id (int) - entry id of the structure that this feature is associated with
Returns: tuple

_workspaceChanged(self, what_changed)

 

This function is called when Maestro workspace is changed.

Decorators:
  • @maestro_callback.workspace_changed_active_project

_updateFeatures(self)

 

Show or hide features for entries that are included or excluded in the workspace. Delete features for entries, which were deleted from the project.

removeFeature(self, feature_name, entry_id)

 

Removes markers for the specified pharmacophore feature.

Parameters:
  • feature_name - feature name
  • feature_name - str
  • entry_id (int) - entry id of the structure that this feature is associated with
Decorators:
  • @markers.requires_maestro

removeAllFeatures(self)

 

Removes markers for all pharmacophore features.

Decorators:
  • @markers.requires_maestro

removeAllFeaturesForEntry(self, entry_id)

 

Removes markers for all features associated with a given entry.

Parameters:
  • entry_id (int) - entry id of the structure that this feature is associated with
Decorators:
  • @markers.requires_maestro

showFeature(self, feature_name, entry_id)

 

Show markers for the specified pharmacophore feature.

Parameters:
  • feature_name - feature name
  • feature_name - str
  • entry_id (int) - entry id of the structure that this feature is associated with
Decorators:
  • @markers.requires_maestro

showAllFeatures(self)

 

Shows markers for all pharmacophore features.

Decorators:
  • @markers.requires_maestro

showAllFeaturesForEntry(self, entry_id)

 

Shows markers for all features associated with a given entry.

Parameters:
  • entry_id (int) - entry id of the structure that this feature is associated with
Decorators:
  • @markers.requires_maestro

_showFeatureForKey(self, feature_key)

 

Show markers for a given feature key.

Parameters:
  • feature_key (str) - unique feature key.

hideFeature(self, feature_name, entry_id)

 

Hide markers for the specified pharmacophore feature.

Parameters:
  • feature_name - feature name
  • feature_name - str
  • entry_id (int) - entry id of the structure that this feature is associated with
Decorators:
  • @markers.requires_maestro

hideAllFeatures(self)

 

Hide markers for all pharmacophore features.

Decorators:
  • @markers.requires_maestro

hideAllFeaturesForEntry(self, entry_id)

 

Hide markers for all features associated with a given entry.

Parameters:
  • entry_id (int) - entry id of the structure that this feature is associated with
Decorators:
  • @markers.requires_maestro

_hideFeatureForKey(self, feature_key)

 

Hide markers for a given feature key.

Parameters:
  • feature_key (str) - unique feature key.

_genFeatureKey(self, feature_name, entry_id)

 

Create a unique feature key.

Parameters:
  • feature_name - feature name
  • feature_name - str
  • entry_id (int) - entry id of the structure that this feature is associated with
Returns:
A tuple

_getKeysForEntry(self, entry_id)

 

Get a list of all feature keys for a given entry id.

Parameters:
  • entry_id (int) - entry id of the structure that this feature is associated with
Returns: list
list of feature keys

_getEntryIDs(self)

 

Get a list of unique entry ids that feature markers stored in this mixin are associated with.

Returns: set
set of unique entry ids

_calculateArrowTail(self, 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 radii
  • rcyl (float) - radii of the arrow cylinder
Returns: tuple
tuple that contains xyz coordinates of the arrow tail point

Instance Variable Details [hide private]

_phase_features

A dictionary containing all pharmacophore feature markers associated with this panel. Keys are generated via _genFeatureKey function. Values contain a tuple of two markers: pharmacophore site marker (sphere) and one or more arrow markers for projected points.
Type:
dict