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

Class PhaseMarkers

       object --+                
                |                
sip.simplewrapper --+            
                    |            
          sip.wrapper --+        
                        |        
     PyQt4.QtCore.QObject --+    
                            |    
            Qt.QtCore.QObject --+
                                |
                               PhaseMarkers

Class for adding pharmacophore feature markers and controlling their visibility.

Instance Methods [hide private]
 
editingFinished(...)
signal that gets emitted when feature editing is finished.
 
editingRequested(...)
signal that gets emitted when when user right clicks on a feature marker in the Workspace.
 
__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.
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, allow_picking=True)
Add all pharmacophore feature markers for a given structure.
 
addSites(self, sites, entry_id, use_highlight=False, allow_picking=True)
Add pharmacophore features for given sites.
 
addFeature(self, sites, feature_name, feature_index, color, use_highlight, entry_id, allow_picking=True)
Add pharmacophore feature marker.
tuple
getFeature(self, feature_name, entry_id)
Retrieve markers for the specified feature.
list
getAllFeatures(self)
Retrieve markers for all features (projected point features are excluded).
list
getSites(self, entry_id)
Get list of sites for all features with a given entry id.
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, allow_picking=True)
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.
 
hasXvolMarkers(self, entry_id)
Checks whether excluded volume markers for a given entry ID exist.
 
removeXvolMarkers(self, entry_id)
Removes all excluded volume markers for a given entry.
 
removeXvolMarkersWithIDs(self, entry_id, sphere_indices)
Removes excluded volume markers with specified sphere ids for a given entry.
 
removeAllXvolMarkers(self)
Removes all excluded volume markers.
 
addXvolMarkers(self, entry_id, x_vol, interactive=False)
Adds excluded volume markers for a given entry ID.
int
findXvolSphereIndex(self, entry_id, pick_id)
Finds excluded volume sphere index for a given sphere pick id.
 
setXvolSelected(self, entry_id, sphere_indices)
Selects spheres with given sphere ids for a given entry id.
 
updateXvolMarker(self, entry_id, sphere_index, r, x, y, z)
This function is called to change radius and coordinates of excluded volume with a given sphere id and entry id.
 
hasTolMarkers(self, entry_id)
Checks whether tolerance markers for a given entry ID exist.
 
removeTolMarkers(self, entry_id)
Removes all tolerance markers for a given entry.
 
removeAllTolMarkers(self)
Removes all tolerance markers.
 
addTolMarkers(self, entry_id, hypo)
Adds tolerance markers for a given entry ID.
schrodinger.MM_Project
projectModel(self)
Returns a Maestro project object.
 
hasRefCtMarker(self, entry_id)
Checks whether refernce ligand marker for a given entry ID exists.
 
removeRefCtMarker(self, entry_id)
Removes all reference ligand markers for a given entry.
 
removeAllRefCtMarkers(self)
Removes all reference ligand markers.
 
addRefCtMarker(self, entry_id, ref_ct)
Adds reference ligand markers for a given entry ID.
 
setSelection(self, features, entry_id, selected)
Sets selection mode for multiple features.
 
setFeatureSelection(self, feature_name, entry_id, selected)
Set specified pharmacophore feature selection mode.
 
clearSelection(self)
Clear 'selection' for all pharmacophore features.
 
setPropertyLabelVisible(self, entry_id, visible)
Shows or hides detailed (property) label for all feature markers.
 
setProjectedPointsVisible(self, entry_id, visible)
Shows or hides projected points.
 
_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 Qt.QtCore.QObject: connect, emit

Inherited from PyQt4.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChildren, inherits, installEventFilter, isWidgetType, killTimer, metaObject, moveToThread, objectName, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, trUtf8

Inherited from sip.simplewrapper: __new__

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

Class Variables [hide private]

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

editingFinished(...)

 
signal that gets emitted when feature editing is finished. This signal is emitted regardless of whether feature was changed or not.

editingRequested(...)

 
signal that gets emitted when when user right clicks on a feature marker in the Workspace. This signal is emitted only if feature is not associated with the hypothesis in the Project Table.

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

 

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

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, allow_picking=True)

 

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
  • 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
Returns: list
list of sites that were added for this structure

addSites(self, sites, entry_id, use_highlight=False, allow_picking=True)

 

Add pharmacophore features for given sites.

Parameters:
  • sites (list) - list of pharmacophore sites
  • entry_id (int) - structure entry id
  • use_highlight (list) - indicates whether sites 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

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

 

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
  • feature_index (int) - index of site in hypothesis (0 to numSites-1)
  • color (list) - list of float rgb values that define color of this feature's markers
  • use_highlight (bool) - flag defining whether this marker should be highlighted
  • entry_id (int) - entry id of the structure that this feature is associated with
  • 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

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

getAllFeatures(self)

 

Retrieve markers for all features (projected point features are excluded).

Returns: list
list of pharmacophore markers

getSites(self, entry_id)

 

Get list of sites for all features with a given entry id.

Parameters:
  • entry_id (int) - entry_id
Returns: list
list of sites

getFeatureNames(self, entry_id)

 

Get list of feature names that were found for the structure with a given entry id. Feature names are sorted in alphabetical order. We exclude projected point features (their names start with 'Q').

Parameters:
  • entry_id (int

    @return; list of feature names

    ) - entry_id
Returns: list

addFeaturesForWorkspaceLigands(self, fds, allow_picking=True)

 

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

Parameters:
  • fds - list of feature definitions
  • 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
  • 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.

hasXvolMarkers(self, entry_id)

 

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

Parameters:
  • entry_id (int) - entry ID

removeXvolMarkers(self, entry_id)

 

Removes all excluded volume markers for a given entry.

Parameters:
  • entry_id (int) - entry ID

removeXvolMarkersWithIDs(self, entry_id, sphere_indices)

 

Removes excluded volume markers with specified sphere ids for a given entry.

Parameters:
  • entry_id (int) - entry ID
  • sphere_indices (list) - list of sphere indices

addXvolMarkers(self, entry_id, x_vol, interactive=False)

 

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
  • interactive (bool) - indicates whether markers should be 'interactive'

findXvolSphereIndex(self, entry_id, pick_id)

 

Finds excluded volume sphere index for a given sphere pick id. Pick id is used to identify graphics3d objects picked in the Workspace.

Parameters:
  • entry_id (int) - entry ID
  • pick_id (int) - pick id of graphics3d object
Returns: int
index of sphere with a given pick id in the list that PhaseXvolMarkers object maintains.

setXvolSelected(self, entry_id, sphere_indices)

 

Selects spheres with given sphere ids for a given entry id.

Parameters:
  • entry_id (int) - entry ID
  • sphere_indices (list) - list of sphere indices

updateXvolMarker(self, entry_id, sphere_index, r, x, y, z)

 

This function is called to change radius and coordinates of excluded volume with a given sphere id and entry id.

Parameters:
  • entry_id (int) - entry ID
  • sphere_index (int) - sphere index
  • r (float) - new radius
  • x (float) - new x-coordinate
  • y (float) - new y-coordinate
  • z (float) - new z-coordinate

hasTolMarkers(self, entry_id)

 

Checks whether tolerance markers for a given entry ID exist.

Parameters:
  • entry_id (int) - entry ID

removeTolMarkers(self, entry_id)

 

Removes all tolerance markers for a given entry.

Parameters:
  • entry_id (int) - entry ID

addTolMarkers(self, entry_id, hypo)

 

Adds tolerance markers for a given entry ID.

Parameters:

projectModel(self)

 

Returns a Maestro project object.

Returns: schrodinger.MM_Project
Maestro project object.

hasRefCtMarker(self, entry_id)

 

Checks whether refernce ligand marker for a given entry ID exists.

Parameters:
  • entry_id (int) - entry ID

removeRefCtMarker(self, entry_id)

 

Removes all reference ligand markers for a given entry.

Parameters:
  • entry_id (int) - entry ID

addRefCtMarker(self, entry_id, ref_ct)

 

Adds reference ligand markers for a given entry ID.

Parameters:
  • entry_id (str) - entry ID
  • ref_ct (int

    @note ownership is transferred to maestro project.

    ) - data object that contains reference ligands

setSelection(self, features, entry_id, selected)

 

Sets selection mode for multiple features.

Parameters:
  • features (list) - list of feature names
  • entry_id (int) - entry id of the structure that this feature is associated with
  • selected (bool) - indicates whether feature should be selected or not

setFeatureSelection(self, feature_name, entry_id, selected)

 

Set specified pharmacophore feature selection mode. Shows glow effect around markers.

Parameters:
  • feature_name - feature name
  • feature_name - str
  • entry_id (int) - entry id of the structure that this feature is associated with
  • selected (bool) - indicates whether feature should be selected or not

setPropertyLabelVisible(self, entry_id, visible)

 

Shows or hides detailed (property) label for all feature markers.

Parameters:
  • entry_id (int) - entry id of the structure that these features are associated with
  • visible (bool) - whether to make property labels visible or not

setProjectedPointsVisible(self, entry_id, visible)

 

Shows or hides projected points.

Parameters:
  • entry_id (int) - entry id of the structure that these features are associated with
  • visible (bool) - whether to make projected points visible or not

_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)