schrodinger.application.phase.phase_markers module¶
Phase pharmacophore workspace markers.
Copyright Schrodinger, LLC. All rights reserved.
-
schrodinger.application.phase.phase_markers.
set_freestyle_site_type
(site, feature_type)¶ Updates a site with the given pharmacophore feature type, and if applicable assigns projected coordinates of the corresponding free-style site type.
Returns: pharmacophore site Return type: phase.PhpSite
Parameters: feature_type (str) – site’s feature type
-
schrodinger.application.phase.phase_markers.
is_site_grouped
(site)¶ Get whether site is grouped
Parameters: site (phase.PhpSite) – pharmacophore site Returns: whether or not site is grouped Return type: bool
-
schrodinger.application.phase.phase_markers.
get_mask_name
(site)¶ Get the name of the site’s mask
Parameters: site (phase.PhpSite) – pharmacophore site Returns: site mask min match name Return type: str
-
class
schrodinger.application.phase.phase_markers.
PhaseFeatureMarker
(site, entry_id, color, use_highlight, allow_picking=True)¶ Bases:
object
Class defining a single Phase marker.
-
ARROW_RADII
= 0.065¶
-
SPHERE_RADII
= 0.4¶
-
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)¶
-
MASKED_COLOR
= (0.35, 0.35, 0.35)¶
-
FEATURE_TYPE
= 'Feature Type'¶
-
USE_IN_SCREEN
= 'Use in Screening'¶
-
ALLOWED_TO_MATCH
= 'Allowed to match'¶
-
FORBIDDEN_TO_MATCH
= 'Forbidden to match'¶
-
TOLERANCE
= 'Tolerance'¶
-
XP_SCORE
= 'XP Score'¶
-
feature_counter
= 1¶
-
__init__
(site, entry_id, color, use_highlight, allow_picking=True)¶ Feature marker initializer.
Parameters: - site (
phase.PhpSite
) – pharmacophore site for this marker - entry_id (int) – entry id of structure this feature belongs to
- color (list) – feature marker color defined as a list of rgb values
- use_highlight (bool) – whether this marker should be highlighted
- allow_picking (bool) – whether this marker can be ‘picked’, which allows showing a context menu when right-clicked
- site (
-
feature_type
¶ Phase type string of the pharmacophore site
-
feature_name
¶ Display name of the pharmacophore site
-
feature_coordinates
¶ List of coordinates of the main site and any projected coordinates
-
is_projected
¶ Whether the marker represents a Q projected feature
-
__del__
(_isinstance=<built-in function isinstance>, _module=<class 'module'>, _maestro=<module 'schrodinger.maestro.maestro' from '/scr/buildbot/savedbuilds/2018-4/NB/build-145/internal/lib/python3.6/site-packages/schrodinger/maestro/maestro.py'>)¶ Remove graphics text objects, not handled by Python garbage collector
-
getHypoID
()¶ Return the hypothesis name/ID for the hypothesis from which this feature is from.
-
setRightClickHandler
(pick_category)¶ Sets right click handler for a given pick category.
Parameters: - pick_category – picking category of markers
- type – str
-
createLabels
()¶ Create the labels for the sites of this feature in the Workspace.
-
clearLabels
()¶ Remove all marker labels.
-
showLabels
()¶ Show all marker labels.
-
hideLabels
()¶ Hide all marker labels.
-
setIsGlowing
(is_glowing)¶ Enables or disables glow effect for the object.
Parameters: is_glowing (bool) – whether the object is glowing
-
setSelected
(select)¶ Shows glow effect when this feature is selected.
Parameters: select (bool) – whether this feature should be selected
-
show
()¶
-
hide
()¶
-
clear
()¶
-
mask
()¶ Mask the feature in workspace by setting a dull grey color to marker.
-
unmask
()¶ Unmask the feature in workspace by setting default color to marker.
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.phase.phase_markers', '__doc__': '\n Class defining a single Phase marker.\n ', 'ARROW_RADII': 0.065, 'SPHERE_RADII': 0.4, '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), 'MASKED_COLOR': (0.35, 0.35, 0.35), 'FEATURE_TYPE': 'Feature Type', 'USE_IN_SCREEN': 'Use in Screening', 'ALLOWED_TO_MATCH': 'Allowed to match', 'FORBIDDEN_TO_MATCH': 'Forbidden to match', 'TOLERANCE': 'Tolerance', 'XP_SCORE': 'XP Score', 'feature_counter': 1, '__init__': <function PhaseFeatureMarker.__init__>, 'feature_type': <property object>, 'feature_name': <property object>, 'feature_coordinates': <property object>, 'is_projected': <property object>, '__del__': <function PhaseFeatureMarker.__del__>, 'getHypoID': <function PhaseFeatureMarker.getHypoID>, '_getFeatureProperties': <function PhaseFeatureMarker._getFeatureProperties>, '_createFeature': <function PhaseFeatureMarker._createFeature>, '_createAromaticFeature': <function PhaseFeatureMarker._createAromaticFeature>, '_addToMarkerGroup': <function PhaseFeatureMarker._addToMarkerGroup>, 'setRightClickHandler': <function PhaseFeatureMarker.setRightClickHandler>, 'createLabels': <function PhaseFeatureMarker.createLabels>, 'clearLabels': <function PhaseFeatureMarker.clearLabels>, 'showLabels': <function PhaseFeatureMarker.showLabels>, 'hideLabels': <function PhaseFeatureMarker.hideLabels>, 'setIsGlowing': <function PhaseFeatureMarker.setIsGlowing>, 'setSelected': <function PhaseFeatureMarker.setSelected>, '_setGlowing': <function PhaseFeatureMarker._setGlowing>, '_setColor': <function PhaseFeatureMarker._setColor>, 'show': <function PhaseFeatureMarker.show>, 'hide': <function PhaseFeatureMarker.hide>, 'clear': <function PhaseFeatureMarker.clear>, 'mask': <function PhaseFeatureMarker.mask>, 'unmask': <function PhaseFeatureMarker.unmask>, '__dict__': <attribute '__dict__' of 'PhaseFeatureMarker' objects>, '__weakref__': <attribute '__weakref__' of 'PhaseFeatureMarker' objects>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.phase.phase_markers'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
class
schrodinger.application.phase.phase_markers.
PhaseSphere
(*args, **kwargs)¶ Bases:
schrodinger.graphics3d.sphere.MaestroSphere
Phase sphere graphics object.
-
__init__
(*args, **kwargs)¶ Constructor requires:
x, y, z: coordinate specifying center of sphere in Angstroms.
- color: One of:
- Color object Color name (string) Tuple of (R, G, B) (each 0.0-1.0)
radius: radius of the sphere in Angstroms
Optional arguments:
- opacity: 0.0 (transparent) through 1.0 (opaque)
- Defaults to 1.0
- resolution: 4 to 50
- Defaults to 16
-
setSelected
(selected, color=None)¶ Shows sphere as selected (with a glow effect). Glow effect color only needs to be specified when turning it ‘on’.
Parameters: - selected (bool) – whether sphere should be selected
- color (tuple) – color used for selected glow effect.
-
__class__
¶ alias of
builtins.type
-
__del__
(_hasattr=<built-in function hasattr>, _maestro=<module 'schrodinger.maestro.maestro' from '/scr/buildbot/savedbuilds/2018-4/NB/build-145/internal/lib/python3.6/site-packages/schrodinger/maestro/maestro.py'>)¶
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.phase.phase_markers', '__doc__': '\n Phase sphere graphics object.\n ', '__init__': <function PhaseSphere.__init__>, 'setSelected': <function PhaseSphere.setSelected>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.phase.phase_markers'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
b
¶ Blue value in RGB triplet
-
g
¶ Green value in RGB triplet
-
groupHidden
()¶ Called when the group of this object is hidden. Hide the Maestro object(s).
-
groupShown
()¶ Called when the group of this object is shown. Show the Maestro object, if we are being shown.
-
hide
()¶ Hide the object. It will not be drawn when the group is drawn.
-
isGroupShown
()¶ Returns True if this object’s group is shown. False otherwise.
-
isShown
()¶ Returns True if this object shown. False otherwise.
-
material
¶ Sphere’s material
-
opacity
¶ Sphere’s opacity
-
pick_category
¶ Sphere’s picking category
-
pick_id
¶ Sphere object’s pick ID
-
r
¶ Red value in RGB triplet
-
radius
¶ Sphere’s radius
-
setColors
()¶
-
setCoords
()¶
-
setEntryID
(entry_id)¶ Sets entry ID for Maestro object (necessary to render in tile-by-entry mode.
Parameters: entry_id (str) – Object’s entry ID.
-
setGlowColor
(r, g, b)¶ Sets glow color for the object.
Parameters: - r (float) – Red component of glow color [0.0 .. 1.0]
- g (float) – Green component of glow color [0.0 .. 1.0]
- b (float) – Blue component of glow color [0.0 .. 1.0]
-
setIsGlowing
(is_glowing)¶ Enables or disables glow effect for the object.
Parameters: is_glowing (bool) – Whether the object is glowing.
-
setRGBColors
(r, g, b)¶
-
setRightClickOnGObject
(pymodule, pyfunc)¶ Sets the python callback which should be called whenever given graphics object is right clicked.
Parameters: - pymodule (str) – Python module
- pyfunc (str) – Python function
-
setXYZCoords
(x, y, z)¶
-
show
()¶ Display this object, if it was hidden
-
x
¶ X coordinate
-
y
¶ Y coordinate
-
z
¶ Z coordinate
-
-
class
schrodinger.application.phase.phase_markers.
PhaseSphereMarkers
(entry_id)¶ Bases:
object
Base class that defines group of sphere markers.
-
SPHERE_COLOR
= (1.0, 1.0, 0.0)¶
-
SELECTED_COLOR
= (0.25, 0.5, 0.95)¶
-
SPHERE_OPACITY
= 0.1¶
-
SPHERE_RESOLUTION
= 20¶
-
ANGLE_DEP_TRANSPARENCY
= True¶
-
next_sphere_id
= 1¶
-
__init__
(entry_id)¶ Marker initializer.
Parameters: entry_id (int) – hypothesis entry ID
-
addSphere
(xyz, radius)¶ Adds spehere to marker group.
Parameters: - xyz ((float, float, float)) – sphere coordinates
- radius (float) – sphere radius
-
setSphereRadiusAndCoords
(sphere_index, r, x, y, z)¶ Sets sphere radius and coordinates.
Parameters: - sphere_index (int) – index of sphere in self.spheres list
- r (float) – sphere radius
- x – sphere x-coordinate
- x – float
- y – sphere y-coordinate
- y – float
- z – sphere z-coordinate
- z – float
-
removeSpheres
(sphere_indices)¶ Removes spheres from the group.
Parameters: sphere_indices (list) – list of indices to the self.sphere list
-
setSelected
(sphere_indices)¶ Shows the specified spheres as selected (with a glow effect).
Parameters: sphere_indices (list) – list of indices to the self.sphere list
-
resetSelected
()¶ Resets current selection.
-
show
()¶ Show all spheres for this group.
-
hide
()¶ Hide all spheres for this group.
-
showSphere
(sphere_idx)¶ Show the specified sphere.
Parameters: sphere_idx (int) – index of the sphere in self.spheres list to show.
-
hideSphere
(sphere_idx)¶ Hide the specified sphere.
Parameters: sphere_idx (int) – index of the sphere in self.spheres list to hide.
-
clear
()¶ Deletes all spheres for this group.
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.phase.phase_markers', '__doc__': '\n Base class that defines group of sphere markers.\n ', 'SPHERE_COLOR': (1.0, 1.0, 0.0), 'SELECTED_COLOR': (0.25, 0.5, 0.95), 'SPHERE_OPACITY': 0.1, 'SPHERE_RESOLUTION': 20, 'ANGLE_DEP_TRANSPARENCY': True, 'next_sphere_id': 1, '__init__': <function PhaseSphereMarkers.__init__>, 'addSphere': <function PhaseSphereMarkers.addSphere>, 'setSphereRadiusAndCoords': <function PhaseSphereMarkers.setSphereRadiusAndCoords>, 'removeSpheres': <function PhaseSphereMarkers.removeSpheres>, 'setSelected': <function PhaseSphereMarkers.setSelected>, 'resetSelected': <function PhaseSphereMarkers.resetSelected>, 'show': <function PhaseSphereMarkers.show>, 'hide': <function PhaseSphereMarkers.hide>, 'showSphere': <function PhaseSphereMarkers.showSphere>, 'hideSphere': <function PhaseSphereMarkers.hideSphere>, 'clear': <function PhaseSphereMarkers.clear>, '__dict__': <attribute '__dict__' of 'PhaseSphereMarkers' objects>, '__weakref__': <attribute '__weakref__' of 'PhaseSphereMarkers' objects>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.phase.phase_markers'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
class
schrodinger.application.phase.phase_markers.
PhaseXvolMarkers
(entry_id, x_vol, interactive=False)¶ Bases:
schrodinger.application.phase.phase_markers.PhaseSphereMarkers
Class that defines group of spheres for the excluded volume.
-
SPHERE_COLOR
= (0.2, 0.9, 0.95)¶
-
SPHERE_OPACITY
= 0.2¶
-
__init__
(entry_id, x_vol, interactive=False)¶ Marker initializer.
Parameters: - entry_id (int) – hypothesis entry ID
- x_vol (
phase.PhpExclVol
) – excluded volume object
-
addExcludedVolumes
(x_vol)¶ Adds excluded volume spheres to the current group.
Parameters: x_vol ( phase.PhpExclVol
) – excluded volume object
-
ANGLE_DEP_TRANSPARENCY
= True¶
-
SELECTED_COLOR
= (0.25, 0.5, 0.95)¶
-
SPHERE_RESOLUTION
= 20¶
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.phase.phase_markers', '__doc__': '\n Class that defines group of spheres for the excluded volume.\n ', 'SPHERE_COLOR': (0.2, 0.9, 0.95), 'SPHERE_OPACITY': 0.2, '__init__': <function PhaseXvolMarkers.__init__>, 'addExcludedVolumes': <function PhaseXvolMarkers.addExcludedVolumes>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.phase.phase_markers'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
addSphere
(xyz, radius)¶ Adds spehere to marker group.
Parameters: - xyz ((float, float, float)) – sphere coordinates
- radius (float) – sphere radius
-
clear
()¶ Deletes all spheres for this group.
-
hide
()¶ Hide all spheres for this group.
-
hideSphere
(sphere_idx)¶ Hide the specified sphere.
Parameters: sphere_idx (int) – index of the sphere in self.spheres list to hide.
-
next_sphere_id
= 1¶
-
removeSpheres
(sphere_indices)¶ Removes spheres from the group.
Parameters: sphere_indices (list) – list of indices to the self.sphere list
-
resetSelected
()¶ Resets current selection.
-
setSelected
(sphere_indices)¶ Shows the specified spheres as selected (with a glow effect).
Parameters: sphere_indices (list) – list of indices to the self.sphere list
-
setSphereRadiusAndCoords
(sphere_index, r, x, y, z)¶ Sets sphere radius and coordinates.
Parameters: - sphere_index (int) – index of sphere in self.spheres list
- r (float) – sphere radius
- x – sphere x-coordinate
- x – float
- y – sphere y-coordinate
- y – float
- z – sphere z-coordinate
- z – float
-
show
()¶ Show all spheres for this group.
-
showSphere
(sphere_idx)¶ Show the specified sphere.
Parameters: sphere_idx (int) – index of the sphere in self.spheres list to show.
-
-
class
schrodinger.application.phase.phase_markers.
PhaseTolMarkers
(entry_id, sites)¶ Bases:
schrodinger.application.phase.phase_markers.PhaseSphereMarkers
Class that defines group of tolerance spheres.
-
SPHERE_COLOR
= (0.5, 0.5, 0.5)¶
-
SPHERE_OPACITY
= 0.5¶
-
__init__
(entry_id, sites)¶ Marker initializer.
Parameters: - entry_id (int) – hypothesis entry ID
- sites (list of
phase.PhpSite
) – Phase hypothesis sites
-
showTolMarker
(site)¶ Show tolerance marker for the given site.
Parameters: site ( phase.PhpSite
) – Phase hypothesis site
-
hideTolMarker
(site)¶ Hide tolerance marker for the given site.
Parameters: site ( phase.PhpSite
) – Phase hypothesis site
-
ANGLE_DEP_TRANSPARENCY
= True¶
-
SELECTED_COLOR
= (0.25, 0.5, 0.95)¶
-
SPHERE_RESOLUTION
= 20¶
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.phase.phase_markers', '__doc__': '\n Class that defines group of tolerance spheres.\n ', 'SPHERE_COLOR': (0.5, 0.5, 0.5), 'SPHERE_OPACITY': 0.5, '__init__': <function PhaseTolMarkers.__init__>, 'showTolMarker': <function PhaseTolMarkers.showTolMarker>, 'hideTolMarker': <function PhaseTolMarkers.hideTolMarker>, '_genTolMarkerKey': <function PhaseTolMarkers._genTolMarkerKey>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.phase.phase_markers'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
addSphere
(xyz, radius)¶ Adds spehere to marker group.
Parameters: - xyz ((float, float, float)) – sphere coordinates
- radius (float) – sphere radius
-
clear
()¶ Deletes all spheres for this group.
-
hide
()¶ Hide all spheres for this group.
-
hideSphere
(sphere_idx)¶ Hide the specified sphere.
Parameters: sphere_idx (int) – index of the sphere in self.spheres list to hide.
-
next_sphere_id
= 1¶
-
removeSpheres
(sphere_indices)¶ Removes spheres from the group.
Parameters: sphere_indices (list) – list of indices to the self.sphere list
-
resetSelected
()¶ Resets current selection.
-
setSelected
(sphere_indices)¶ Shows the specified spheres as selected (with a glow effect).
Parameters: sphere_indices (list) – list of indices to the self.sphere list
-
setSphereRadiusAndCoords
(sphere_index, r, x, y, z)¶ Sets sphere radius and coordinates.
Parameters: - sphere_index (int) – index of sphere in self.spheres list
- r (float) – sphere radius
- x – sphere x-coordinate
- x – float
- y – sphere y-coordinate
- y – float
- z – sphere z-coordinate
- z – float
-
show
()¶ Show all spheres for this group.
-
showSphere
(sphere_idx)¶ Show the specified sphere.
Parameters: sphere_idx (int) – index of the sphere in self.spheres list to show.
-
-
class
schrodinger.application.phase.phase_markers.
PhaseMarkers
(*args, **kwargs)¶ Bases:
PyQt5.QtCore.QObject
Class for adding pharmacophore feature markers and controlling their visibility.
Variables: - editingFinished (
QtCore.pyqtSignal
) – signal that gets emitted when feature editing is finished. This signal is emitted regardless of whether feature was changed or not. - closeFeatureEditDialog (
QtCore.pyqtSignal
) – signal that gets emitted when any open edit feature dialog should be closed. This signal is emitted when the Phase GUI workflow changes, or the panel is closed.
-
editingFinished
¶
-
closeFeatureEditDialog
¶
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
featureExists
(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: True if features were already added and False otherwise Return type: bool
-
addStructureFeatures
(st, mapper, entry_id, allow_picking=True)¶ Add all pharmacophore feature markers for a given structure.
Parameters: - st (
structure.Structure
) – molecule structure - mapper (phase.PhpSiteMapper) – Site mapper
- entry_id (int) – structure entry id
- allow_picking (bool) – whether this marker can be ‘picked’, which allows showing a context menu when right-clicked
Returns: list of sites that were added for this structure
Return type: list
- st (
-
addSites
(sites, entry_id, use_highlight=False, allow_picking=True)¶ Add pharmacophore features for given sites.
Parameters: - sites (list of
phase.PhpSite
) – list of pharmacophore sites - entry_id (int) – structure entry id
- use_highlight (list) – indicates whether sites should be ‘highlighted’
- allow_picking (bool) – whether this marker can be ‘picked’, which allows showing a context menu when right-clicked
- sites (list of
-
getFeature
(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 that contains pharmacophore and projected points marker
Return type: tuple
-
getAllFeatures
()¶ Retrieve markers for all features.
Returns: list of pharmacophore markers Return type: list
-
getSites
(entry_id)¶ Get list of sites for all features with a given entry id.
Parameters: entry_id (int) – entry_id Returns: list of sites Return type: list
-
getFeatureNames
(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.
Parameters: entry_id (int) – entry_id :return; list of feature names :rtype: list
-
addFeaturesForWorkspaceLigands
(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
Return type: list of ints Returns: List of entry IDs for the included ligands.
-
removeFeature
(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
-
removeAllFeatures
()¶ Removes markers for all pharmacophore features.
-
removeAllFeaturesForEntry
(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
(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
-
showAllFeatures
()¶ Shows markers for all pharmacophore features.
-
showAllFeaturesForEntry
(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
-
showAllFeaturesForEntryByType
(entry_id, feature_types)¶ Show markers for all given feature types associated with a given entry.
Parameters: - entry_id (int) – entry id of the structure that these features are associated with.
- feature_types (List of str) – list of feature types that markers should be shown for.
-
hideFeature
(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
-
hideAllFeatures
()¶ Hide markers for all pharmacophore features.
-
hideAllFeaturesForEntry
(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
-
hasXvolMarkers
(entry_id)¶ Checks whether excluded volume markers for a given entry ID exist.
Parameters: entry_id (int) – entry ID
-
removeXvolMarkers
(entry_id)¶ Removes all excluded volume markers for a given entry.
Parameters: entry_id (int) – entry ID
-
removeXvolMarkersWithIDs
(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
-
removeAllXvolMarkers
()¶ Removes all excluded volume markers.
-
addXvolMarkers
(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
(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: index of sphere with a given pick id in the list that PhaseXvolMarkers object maintains.
Return type: int
-
setXvolSelected
(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
(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
(entry_id)¶ Checks whether tolerance markers for a given entry ID exist.
Parameters: entry_id (int) – entry ID
-
removeTolMarkers
(entry_id)¶ Removes all tolerance markers for a given entry.
Parameters: entry_id (int) – entry ID
-
removeAllTolMarkers
()¶ Removes all tolerance markers.
-
addTolMarkers
(entry_id, sites)¶ Adds tolerance markers for a given entry ID.
Parameters: - entry_id (int) – entry ID
- sites (list of
phase.PhpSite
) – Phase hypothesis sites
-
showTolMarker
(entry_id, site)¶ Show tolerance marker for the given entry ID and site.
Parameters: - entry_id (int) – hypothesis entry ID
- site (
phase.PhpSite
) – Phase hypothesis site
-
hideTolMarker
(entry_id, site)¶ Hide tolerance marker for the given entry ID and site.
Parameters: - entry_id (int) – hypothesis entry ID
- site (
phase.PhpSite
) – Phase hypothesis site
-
projectModel
()¶ Returns a Maestro project object.
Return type: schrodinger.MM_Project
Returns: Maestro project object.
-
hasRefCtMarker
(entry_id)¶ Checks whether refernce ligand marker for a given entry ID exists.
Parameters: entry_id (int) – entry ID
-
removeRefCtMarker
(entry_id)¶ Removes all reference ligand markers for a given entry.
Parameters: entry_id (int) – entry ID
-
removeAllRefCtMarkers
()¶ Removes all reference ligand markers.
-
addRefCtMarker
(entry_id, ref_ct)¶ Adds reference ligand markers for a given entry ID.
Parameters: - entry_id (str) – entry ID
- ref_ct (int) – data object that contains reference ligands
:note ownership is transferred to maestro project.
-
setSelection
(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
(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
-
clearSelection
()¶ Clear ‘selection’ for all pharmacophore features.
-
setPropertyLabelVisible
(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
-
getFeatureFromId
(marker_id)¶ Return the marker with the given ID.
Parameters: marker_id (int) – ID of the marker (.id attribute) :return Marker object :rtype
PhaseFeatureMarker
-
__class__
¶ alias of
sip.wrappertype
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.phase.phase_markers', '__doc__': '\n Class for adding pharmacophore feature markers and controlling their\n visibility.\n\n :cvar editingFinished: signal that gets emitted when feature editing is\n finished. This signal is emitted regardless of whether feature was changed\n or not.\n :vartype editingFinished: `QtCore.pyqtSignal`\n\n :cvar closeFeatureEditDialog: signal that gets emitted when any open edit\n feature dialog should be closed. This signal is emitted when the Phase GUI\n workflow changes, or the panel is closed.\n :vartype closeFeatureEditDialog: `QtCore.pyqtSignal`\n ', 'editingFinished': <unbound PYQT_SIGNAL PhaseMarkers.editingFinished[]>, 'closeFeatureEditDialog': <unbound PYQT_SIGNAL PhaseMarkers.closeFeatureEditDialog[]>, '__init__': <function PhaseMarkers.__init__>, 'featureExists': <function PhaseMarkers.featureExists>, 'addStructureFeatures': <function PhaseMarkers.addStructureFeatures>, 'addSites': <function PhaseMarkers.addSites>, 'getFeature': <function PhaseMarkers.getFeature>, 'getAllFeatures': <function PhaseMarkers.getAllFeatures>, 'getSites': <function PhaseMarkers.getSites>, 'getFeatureNames': <function PhaseMarkers.getFeatureNames>, 'addFeaturesForWorkspaceLigands': <function PhaseMarkers.addFeaturesForWorkspaceLigands>, '_updateFeatures': <function PhaseMarkers._updateFeatures>, 'removeFeature': <function PhaseMarkers.removeFeature>, 'removeAllFeatures': <function PhaseMarkers.removeAllFeatures>, 'removeAllFeaturesForEntry': <function PhaseMarkers.removeAllFeaturesForEntry>, 'showFeature': <function PhaseMarkers.showFeature>, 'showAllFeatures': <function PhaseMarkers.showAllFeatures>, 'showAllFeaturesForEntry': <function PhaseMarkers.showAllFeaturesForEntry>, 'showAllFeaturesForEntryByType': <function PhaseMarkers.showAllFeaturesForEntryByType>, '_showFeatureForKey': <function PhaseMarkers._showFeatureForKey>, 'hideFeature': <function PhaseMarkers.hideFeature>, 'hideAllFeatures': <function PhaseMarkers.hideAllFeatures>, 'hideAllFeaturesForEntry': <function PhaseMarkers.hideAllFeaturesForEntry>, '_hideFeatureForKey': <function PhaseMarkers._hideFeatureForKey>, 'hasXvolMarkers': <function PhaseMarkers.hasXvolMarkers>, 'removeXvolMarkers': <function PhaseMarkers.removeXvolMarkers>, 'removeXvolMarkersWithIDs': <function PhaseMarkers.removeXvolMarkersWithIDs>, 'removeAllXvolMarkers': <function PhaseMarkers.removeAllXvolMarkers>, 'addXvolMarkers': <function PhaseMarkers.addXvolMarkers>, 'findXvolSphereIndex': <function PhaseMarkers.findXvolSphereIndex>, 'setXvolSelected': <function PhaseMarkers.setXvolSelected>, 'updateXvolMarker': <function PhaseMarkers.updateXvolMarker>, 'hasTolMarkers': <function PhaseMarkers.hasTolMarkers>, 'removeTolMarkers': <function PhaseMarkers.removeTolMarkers>, 'removeAllTolMarkers': <function PhaseMarkers.removeAllTolMarkers>, 'addTolMarkers': <function PhaseMarkers.addTolMarkers>, 'showTolMarker': <function PhaseMarkers.showTolMarker>, 'hideTolMarker': <function PhaseMarkers.hideTolMarker>, 'projectModel': <function PhaseMarkers.projectModel>, 'hasRefCtMarker': <function PhaseMarkers.hasRefCtMarker>, 'removeRefCtMarker': <function PhaseMarkers.removeRefCtMarker>, 'removeAllRefCtMarkers': <function PhaseMarkers.removeAllRefCtMarkers>, 'addRefCtMarker': <function PhaseMarkers.addRefCtMarker>, 'setSelection': <function PhaseMarkers.setSelection>, 'setFeatureSelection': <function PhaseMarkers.setFeatureSelection>, 'clearSelection': <function PhaseMarkers.clearSelection>, 'setPropertyLabelVisible': <function PhaseMarkers.setPropertyLabelVisible>, '_genFeatureKey': <function PhaseMarkers._genFeatureKey>, '_getKeysForEntry': <function PhaseMarkers._getKeysForEntry>, '_getEntryIDs': <function PhaseMarkers._getEntryIDs>, 'getFeatureFromId': <function PhaseMarkers.getFeatureFromId>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattr__
(self, str) → object¶
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.phase.phase_markers'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-
blockSignals
(self, bool) → bool¶
-
childEvent
(self, QChildEvent)¶
-
children
(self) → object¶
-
connectNotify
(self, QMetaMethod)¶
-
customEvent
(self, QEvent)¶
-
deleteLater
(self)¶
-
destroyed
¶ destroyed(self, QObject = None) [signal]
-
disconnect
(self)¶
-
disconnectNotify
(self, QMetaMethod)¶
-
dumpObjectInfo
(self)¶
-
dumpObjectTree
(self)¶
-
dynamicPropertyNames
(self) → object¶
-
event
(self, QEvent) → bool¶
-
eventFilter
(self, QObject, QEvent) → bool¶
-
findChild
(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject¶ findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject
-
findChildren
(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]¶ findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]
-
inherits
(self, str) → bool¶
-
installEventFilter
(self, QObject)¶
-
isSignalConnected
(self, QMetaMethod) → bool¶
-
isWidgetType
(self) → bool¶
-
isWindowType
(self) → bool¶
-
killTimer
(self, int)¶
-
metaObject
(self) → QMetaObject¶
-
moveToThread
(self, QThread)¶
-
objectName
(self) → str¶
-
objectNameChanged
¶ objectNameChanged(self, str) [signal]
-
parent
(self) → QObject¶
-
property
(self, str) → Any¶
-
pyqtConfigure
(...)¶ Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
-
receivers
(self, PYQT_SIGNAL) → int¶
-
removeEventFilter
(self, QObject)¶
-
sender
(self) → QObject¶
-
senderSignalIndex
(self) → int¶
-
setObjectName
(self, str)¶
-
setParent
(self, QObject)¶
-
setProperty
(self, str, Any) → bool¶
-
signalsBlocked
(self) → bool¶
-
startTimer
(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int¶
-
staticMetaObject
= <PyQt5.QtCore.QMetaObject object>¶
-
thread
(self) → QThread¶
-
timerEvent
(self, QTimerEvent)¶
-
tr
(self, str, disambiguation: str = None, n: int = -1) → str¶
- editingFinished (
-
schrodinger.application.phase.phase_markers.
get_phase_markers
()¶ This function returns global PhaseMarkers object that should be used to generate Phase marker throughout Maestro session.
Returns: PhaseMarkers object Return type: PhaseMarkers
-
schrodinger.application.phase.phase_markers.
update_hypothesis_entry
(hypo, entry_id)¶ Updates the structure in the project table for the given entry ID with the current PhaseHypothesis, updating the reference ligand if needed.
Parameters: - hypo (
hypothesis.PhaseHypothesis
) – hypothesis to assign to the given PT entry - entry_id (int or str) – entry id to set hypothesis to
- hypo (
-
schrodinger.application.phase.phase_markers.
show_workspace_phase_markers
(entry_ids, include_Q=False)¶ Delays the call to show workspace phase markers with a single shot to allow for the project table project_model to update appropriately.
Parameters: - entry_ids (list of int) – list of Phase hypothesis entries
- include_Q (bool) – whether to include Q site phase markers
-
schrodinger.application.phase.phase_markers.
hide_workspace_phase_markers
(entry_ids)¶ Removes Phase pharmacophore site markers for given entries.
Parameters: entry_ids (list) – list of Phase hypothesis entries
-
schrodinger.application.phase.phase_markers.
project_close
()¶ Delete all Phase feature markers.
-
schrodinger.application.phase.phase_markers.
setup_project_close
()¶ Sets up function that should be called when project is closed.
-
schrodinger.application.phase.phase_markers.
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
-
schrodinger.application.phase.phase_markers.
set_excluded_volume_visible
(entry_id, visible, hypo=None)¶ 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
- hypo (hypothesis.PhaseHypothesis) – the hypothesis or None. If None, the hypothesis will be obtained from the project entry id.
-
schrodinger.application.phase.phase_markers.
set_reference_ligand_visible
(entry_id, visible, hypo=None)¶ 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
- hypo (hypothesis.PhaseHypothesis) – the hypothesis or None. If None, the hypothesis will be obtained from the project entry id.
-
schrodinger.application.phase.phase_markers.
set_feature_tolerance_visible
(entry_id, visible, hypo=None)¶ 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
- hypo (hypothesis.PhaseHypothesis) – the hypothesis or None. If None, the hypothesis will be obtained from the project entry id.
-
schrodinger.application.phase.phase_markers.
set_property_labels_visible
(entry_id, visible, hypo=None)¶ 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
- hypo (hypothesis.PhaseHypothesis) – the hypothesis or None. If None, the hypothesis will be obtained from the project entry id.
-
schrodinger.application.phase.phase_markers.
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
-
schrodinger.application.phase.phase_markers.
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