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
 
__del__(self)
 
_workspaceDrawCallback(self)
Called by Maestro when Workspace needs to be drawn.
 
closeEvent(self, event)
Remove all features when the panel is closed.
bool
featureExists(self, entry_id)
This function checks whether pharmacophore features exist for a structure with a given entry_id and returns True or False.
list
addStructureFeatures(self, st, fds, entry_id, selection=[])
Add all pharmacophore feature markers for a given structure.
 
addSites(self, sites, entry_id, selection)
Add pharmacophore features for given sites.
 
addFeature(self, sites, feature_name, color, selected, entry_id)
Add pharmacophore feature marker.
tuple
getFeature(self, feature_name, entry_id)
Retrieve markers for the specified feature.
list
getFeatureNames(self, entry_id)
Get list of feature names that were found for the structure with a given entry id.
list of ints
addFeaturesForWorkspaceLigands(self, fds)
Add feature markers for each included ligand PT entry, according to the given feature definitions.
 
_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.
 
hasXvol(self, entry_id)
Checks whether excluded volume markers for a given entry ID exist.
 
removeXvol(self, entry_id)
Removes all excluded volume markers for a given entry.
 
addXvol(self, entry_id, x_vol)
Adds excluded volume markers for a given entry ID.
 
_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.
 
_genFeatureName(self, feature_type, feature_num)
Generate feature name that starts with the one letter feature type and followed by the feature number.
 
getFeatureFromId(self, marker_id)
Return the marker with the given ID.

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

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

Parameters:
  • _phase_features (dict) - dictionary of 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.
Overrides: object.__init__
(inherited documentation)

featureExists(self, entry_id)

 

This function checks whether pharmacophore features exist for a structure with a given entry_id and returns True or False.

Parameters:
  • entry_id (int) - structure entry_id
Returns: bool
True if features were already added and False otherwise

addStructureFeatures(self, st, fds, entry_id, selection=[])

 

Add all pharmacophore feature markers for a given structure.

Parameters:
  • st (structure.Structure) - molecule structure
  • fds (list) - list of feature definitions
  • entry_id (int) - structure entry id
  • selection (list) - names of features that should be 'selected'
Returns: list
list of sites that were added for this structure

addSites(self, sites, entry_id, selection)

 

Add pharmacophore features for given sites.

Parameters:
  • sites (list) - list of pharmacophore sites
  • entry_id (int) - structure entry id
  • selection (listaa) - names of features that should be 'selected'

addFeature(self, sites, feature_name, color, selected, 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
  • selected (bool) - flag indicating whether feature should be marked as 'selected'
  • entry_id (int) - entry id of the structure that this feature is associated with

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

getFeatureNames(self, entry_id)

 

Get list of feature names that were found for the structure with a given entry id.

Parameters:
  • entry_id (int

    @return; list of feature names

    ) - entry_id
Returns: list

addFeaturesForWorkspaceLigands(self, fds)

 

Add feature markers for each included ligand PT entry, according to the given feature definitions.

Parameters:
  • fds - list of feature definitions
  • st (list)
Returns: list of ints
List of entry IDs for the included ligands.
Decorators:
  • @maestro_required

_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

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

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

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

_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

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

_hideFeatureForKey(self, feature_key)

 

Hide markers for a given feature key.

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

hasXvol(self, entry_id)

 

Checks whether excluded volume markers for a given entry ID exist.

Parameters:
  • entry_id (int) - entry ID

removeXvol(self, entry_id)

 

Removes all excluded volume markers for a given entry.

Parameters:
  • entry_id (int) - entry ID

addXvol(self, entry_id, x_vol)

 

Adds excluded volume markers for a given entry ID.

Parameters:
  • entry_id (int) - entry ID
  • x_vol (phase.PhpExclVol) - data object that contains excluded volumes

_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

_genFeatureName(self, feature_type, feature_num)

 

Generate feature name that starts with the one letter feature type and followed by the feature number. Note that we increment feature number by one to make it 1-based.

Parameters:
  • feature_type (str) - one letter feature type
  • feature_num (int) - feature number

getFeatureFromId(self, marker_id)

 

Return the marker with the given ID.

Parameters:
  • marker_id (int

    @return Marker object @rtype PhaseFeatureMarker

    ) - ID of the marker (.id attribute)