schrodinger.maestro.markers module¶
Module for placing markers in the Workspace.
-
class
schrodinger.maestro.markers.
Icons
¶ Bases:
object
Constants for marker icons
-
NONE
¶ Used by autodoc_mock_imports.
-
LOCK
¶ Used by autodoc_mock_imports.
-
SPRING
¶ Used by autodoc_mock_imports.
-
EYE
¶ Used by autodoc_mock_imports.
-
EQUALS
¶ Used by autodoc_mock_imports.
-
FRAGMARK
¶ Used by autodoc_mock_imports.
-
CHECKMARK
¶ Used by autodoc_mock_imports.
-
DIAMOND
¶ Used by autodoc_mock_imports.
-
RSI
¶ Used by autodoc_mock_imports.
-
TRANSROT
¶ Used by autodoc_mock_imports.
-
TORSIONROTATE
¶ Used by autodoc_mock_imports.
-
CHECK
¶ Used by autodoc_mock_imports.
-
SCISSORS
¶ Used by autodoc_mock_imports.
-
BREAK
¶ Used by autodoc_mock_imports.
-
DDRIVE
¶ Used by autodoc_mock_imports.
-
LONEPAIR
¶ Used by autodoc_mock_imports.
-
SMAGGLASS
¶ Used by autodoc_mock_imports.
-
GMAGGLASS
¶ Used by autodoc_mock_imports.
-
MAGGLASS
¶ Used by autodoc_mock_imports.
-
WMAGGLASS
¶ Used by autodoc_mock_imports.
-
IMAGGLASS
¶ Used by autodoc_mock_imports.
-
VMAGGLASS
¶ Used by autodoc_mock_imports.
-
EMAGGLASS
¶ Used by autodoc_mock_imports.
-
ARROWDOWN
¶ Used by autodoc_mock_imports.
-
SCANATOM
¶ Used by autodoc_mock_imports.
-
SCANDIST
¶ Used by autodoc_mock_imports.
-
SCANANGLE
¶ Used by autodoc_mock_imports.
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
schrodinger.maestro.markers.
Marker
(name=None, asl='NOT all', color=(1, 1, 1))¶ Bases:
object
Class to manipulate a set of markers in the Workspace by ASLs. The only parameter that can be controlled is the color of the marker.
This marker is useful for showing a picked ligand or residue, for example.
-
__init__
(name=None, asl='NOT all', color=(1, 1, 1))¶ Create a Marker object
Parameters: - name (str) – The name of the marker group. Used for unique identification of the marker within Maestro. By default a unique string identifier is generated.
- asl (str) – The ASL defining which atoms should be marked. By default no atoms are marked.
- red – The amount of red, green, and blue to use, each ranging from 0.0 to 1.0. Default is white (1, 1, 1).
-
hide
()¶ Hide the markers
-
show
(asl=None)¶ Show the markers. If a new ASL is shown, then the previous markers get cleared and the new atoms are marked.
Parameters: asl (str) – The ASL defining which atoms should be marked. This replaces any previous ASL marked by this Marker instance.
-
setVisible
(show)¶ Show the marker if <show> is True; hide otherwise. Useful for hooking up to a slot of a QCheckBox.
-
setAsl
(asl)¶ Update the ASL of this marker to the given string, without affecting the visibility of it.
-
-
class
schrodinger.maestro.markers.
AtomMarker
(atom, marker_color=None, icon=<sphinx.ext.autodoc.importer._MockObject object>, alt_color=None, highlight=False)¶ Bases:
schrodinger.maestro.markers._BaseMarker
Class for marking a single atom.
-
SETTINGS_VARS
= {'alt_color', 'color', 'highlight', 'icon'}¶
-
__init__
(atom, marker_color=None, icon=<sphinx.ext.autodoc.importer._MockObject object>, alt_color=None, highlight=False)¶ Parameters: - atom (
schrodinger.structure._StructureAtom
) – The atom to mark - marker_color (tuple, str, int, or
schrodinger.structutils.color
) – The color of the marker. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, white will be used. - icon (int) – The icon to draw next to the marker. Should be one the Icons.* constants. If not given, no icon will be drawn.
- alt_color (tuple, str, int, or
schrodinger.structutils.color
) – The alternate marker color. This color is always used for text, and is used for the marker and icon whenhighlight
is True. If not given,color
will be used. - highlight (bool) – Whether the marker should be highlighted. A
highlighted marker is indicated with thicker lines and is colored using
alt_color
instead ofcolor
.
- atom (
-
setText
(text)¶ Change the marker text
Parameters: text (str) – The text to display next to the marker. If not given, no text will be displayed.
-
applySettings
(settings)¶ Apply the specified marker settings
Parameters: settings (dict) – A dictionary of marker settings. The keys of this dictionary must appear in SETTINGS_VARS
. Note that not all keys need to be specified.
-
classmethod
defaultSettings
()¶ Get the default marker settings
Returns: A dictionary of marker settings. The keys of this dictionary will be SETTING_VARS
.Return type: dict
-
getSettings
()¶ Get the current marker settings.
Returns: A dictionary of the marker settings. The keys of this dictionary will be SETTING_VARS
.Return type: dict
-
hide
()¶ Hide this marker.
-
setAltColor
(alt_color)¶ Change the text color
Parameters: alt_color (tuple, str, int, or schrodinger.structutils.color
) – The color of the text. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, the marker color will be used.
-
setColor
(marker_color)¶ Change the marker and icon color
Parameters: marker_color (tuple, str, int, or schrodinger.structutils.color
) – The color of the marker. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, white will be used.
-
setHighlight
(highlight)¶ Change whether the marker is highlighted. A highlighted marker is indicated with thicker lines and is colored using
alt_color
instead ofcolor
.Parameters: highlight (bool) – Whether the marker should be highlighted.
-
setIcon
(icon)¶ Change the marker icon
Parameters: icon (int) – The icon to draw next to the marker. Should be one the Icons.* constants. If not given, no icon will be drawn.
-
setVisible
(show)¶ If “show” is True, show the marker, otherwise hide it.
-
show
()¶ Show this marker.
-
update
()¶ Update the marker in response to the workspace contents changing. If any marked atom is not in the workspace, the marker will be deleted.
-
-
class
schrodinger.maestro.markers.
PairMarker
(atom1, atom2, marker_color=None, icon=<sphinx.ext.autodoc.importer._MockObject object>, text='', alt_color=None, highlight=False)¶ Bases:
schrodinger.maestro.markers._BaseMarker
Class for marking two atoms. Useful for marking bonds and distances.
-
__init__
(atom1, atom2, marker_color=None, icon=<sphinx.ext.autodoc.importer._MockObject object>, text='', alt_color=None, highlight=False)¶ Parameters: - atom1 (
schrodinger.structure._StructureAtom
) – The first atom to mark - atom2 (
schrodinger.structure._StructureAtom
) – The second atom to mark - marker_color (tuple, str, int, or
schrodinger.structutils.color
) – The color of the marker. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, white will be used. - icon (int) – The icon to draw next to the marker. Should be one the Icons.* constants. If not given, no icon will be drawn.
- text (str) – The text to display next to the marker. If not given, no text will be displayed.
- alt_color (tuple, str, int, or
schrodinger.structutils.color
) – The alternate marker color. This color is always used for text, and is used for the marker and icon whenhighlight
is True. If not given,color
will be used. - highlight (bool) – Whether the marker should be highlighted. A
highlighted marker is indicated with thicker lines and is colored using
alt_color
instead ofcolor
.
Note: Either an icon or text may be displayed on a marker, but not both. If both are given, only the text will be shown.
- atom1 (
-
SETTINGS_VARS
= {'alt_color', 'color', 'highlight', 'icon', 'text'}¶
-
applySettings
(settings)¶ Apply the specified marker settings
Parameters: settings (dict) – A dictionary of marker settings. The keys of this dictionary must appear in SETTINGS_VARS
. Note that not all keys need to be specified.
-
classmethod
defaultSettings
()¶ Get the default marker settings
Returns: A dictionary of marker settings. The keys of this dictionary will be SETTING_VARS
.Return type: dict
-
getSettings
()¶ Get the current marker settings.
Returns: A dictionary of the marker settings. The keys of this dictionary will be SETTING_VARS
.Return type: dict
-
hide
()¶ Hide this marker.
-
setAltColor
(alt_color)¶ Change the text color
Parameters: alt_color (tuple, str, int, or schrodinger.structutils.color
) – The color of the text. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, the marker color will be used.
-
setColor
(marker_color)¶ Change the marker and icon color
Parameters: marker_color (tuple, str, int, or schrodinger.structutils.color
) – The color of the marker. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, white will be used.
-
setHighlight
(highlight)¶ Change whether the marker is highlighted. A highlighted marker is indicated with thicker lines and is colored using
alt_color
instead ofcolor
.Parameters: highlight (bool) – Whether the marker should be highlighted.
-
setIcon
(icon)¶ Change the marker icon
Parameters: icon (int) – The icon to draw next to the marker. Should be one the Icons.* constants. If not given, no icon will be drawn.
-
setText
(text)¶ Change the marker text
Parameters: text (str) – The text to display next to the marker. If not given, no text will be displayed.
-
setVisible
(show)¶ If “show” is True, show the marker, otherwise hide it.
-
show
()¶ Show this marker.
-
update
()¶ Update the marker in response to the workspace contents changing. If any marked atom is not in the workspace, the marker will be deleted.
-
-
class
schrodinger.maestro.markers.
TripleMarker
(atom1, atom2, atom3, marker_color=None, icon=<sphinx.ext.autodoc.importer._MockObject object>, text='', alt_color=None, highlight=False)¶ Bases:
schrodinger.maestro.markers._BaseMarker
Class for marking three atoms. Useful for marking bond angles.
-
__init__
(atom1, atom2, atom3, marker_color=None, icon=<sphinx.ext.autodoc.importer._MockObject object>, text='', alt_color=None, highlight=False)¶ Parameters: - atom1 (
schrodinger.structure._StructureAtom
) – The first atom to mark - atom2 (
schrodinger.structure._StructureAtom
) – The second atom to mark - atom3 (
schrodinger.structure._StructureAtom
) – The third atom to mark - marker_color (tuple, str, int, or
schrodinger.structutils.color
) – The color of the marker. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, white will be used. - icon (int) – The icon to draw next to the marker. Should be one the Icons.* constants. If not given, no icon will be drawn.
- text (str) – The text to display next to the marker. If not given, no text will be displayed.
- alt_color (tuple, str, int, or
schrodinger.structutils.color
) – The alternate marker color. This color is always used for text, and is used for the marker and icon whenhighlight
is True. If not given,color
will be used. - highlight (bool) – Whether the marker should be highlighted. A
highlighted marker is indicated with thicker lines and is colored using
alt_color
instead ofcolor
.
Note: Either an icon or text may be displayed on a marker, but not both. If both are given, only the text will be shown.
- atom1 (
-
SETTINGS_VARS
= {'alt_color', 'color', 'highlight', 'icon', 'text'}¶
-
applySettings
(settings)¶ Apply the specified marker settings
Parameters: settings (dict) – A dictionary of marker settings. The keys of this dictionary must appear in SETTINGS_VARS
. Note that not all keys need to be specified.
-
classmethod
defaultSettings
()¶ Get the default marker settings
Returns: A dictionary of marker settings. The keys of this dictionary will be SETTING_VARS
.Return type: dict
-
getSettings
()¶ Get the current marker settings.
Returns: A dictionary of the marker settings. The keys of this dictionary will be SETTING_VARS
.Return type: dict
-
hide
()¶ Hide this marker.
-
setAltColor
(alt_color)¶ Change the text color
Parameters: alt_color (tuple, str, int, or schrodinger.structutils.color
) – The color of the text. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, the marker color will be used.
-
setColor
(marker_color)¶ Change the marker and icon color
Parameters: marker_color (tuple, str, int, or schrodinger.structutils.color
) – The color of the marker. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, white will be used.
-
setHighlight
(highlight)¶ Change whether the marker is highlighted. A highlighted marker is indicated with thicker lines and is colored using
alt_color
instead ofcolor
.Parameters: highlight (bool) – Whether the marker should be highlighted.
-
setIcon
(icon)¶ Change the marker icon
Parameters: icon (int) – The icon to draw next to the marker. Should be one the Icons.* constants. If not given, no icon will be drawn.
-
setText
(text)¶ Change the marker text
Parameters: text (str) – The text to display next to the marker. If not given, no text will be displayed.
-
setVisible
(show)¶ If “show” is True, show the marker, otherwise hide it.
-
show
()¶ Show this marker.
-
update
()¶ Update the marker in response to the workspace contents changing. If any marked atom is not in the workspace, the marker will be deleted.
-
-
class
schrodinger.maestro.markers.
QuadMarker
(atom1, atom2, atom3, atom4, marker_color=None, icon=<sphinx.ext.autodoc.importer._MockObject object>, text='', alt_color=None, highlight=False)¶ Bases:
schrodinger.maestro.markers._BaseMarker
Class for marking four atoms. Useful for marking dihedral angles.
-
__init__
(atom1, atom2, atom3, atom4, marker_color=None, icon=<sphinx.ext.autodoc.importer._MockObject object>, text='', alt_color=None, highlight=False)¶ Parameters: - atom1 (
schrodinger.structure._StructureAtom
) – The first atom to mark - atom2 (
schrodinger.structure._StructureAtom
) – The second atom to mark - atom3 (
schrodinger.structure._StructureAtom
) – The third atom to mark - atom3 – The fourth atom to mark
- marker_color (tuple, str, int, or
schrodinger.structutils.color
) – The color of the marker. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, white will be used. - icon (int) – The icon to draw next to the marker. Should be one the Icons.* constants. If not given, no icon will be drawn.
- text (str) – The text to display next to the marker. If not given, no text will be displayed.
- alt_color (tuple, str, int, or
schrodinger.structutils.color
) – The alternate marker color. This color is always used for text, and is used for the marker and icon whenhighlight
is True. If not given,color
will be used. - highlight (bool) – Whether the marker should be highlighted. A
highlighted marker is indicated with thicker lines and is colored using
alt_color
instead ofcolor
.
Note: Either an icon or text may be displayed on a marker, but not both. If both are given, only the text will be shown.
- atom1 (
-
SETTINGS_VARS
= {'alt_color', 'color', 'highlight', 'icon', 'text'}¶
-
applySettings
(settings)¶ Apply the specified marker settings
Parameters: settings (dict) – A dictionary of marker settings. The keys of this dictionary must appear in SETTINGS_VARS
. Note that not all keys need to be specified.
-
classmethod
defaultSettings
()¶ Get the default marker settings
Returns: A dictionary of marker settings. The keys of this dictionary will be SETTING_VARS
.Return type: dict
-
getSettings
()¶ Get the current marker settings.
Returns: A dictionary of the marker settings. The keys of this dictionary will be SETTING_VARS
.Return type: dict
-
hide
()¶ Hide this marker.
-
setAltColor
(alt_color)¶ Change the text color
Parameters: alt_color (tuple, str, int, or schrodinger.structutils.color
) – The color of the text. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, the marker color will be used.
-
setColor
(marker_color)¶ Change the marker and icon color
Parameters: marker_color (tuple, str, int, or schrodinger.structutils.color
) – The color of the marker. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, white will be used.
-
setHighlight
(highlight)¶ Change whether the marker is highlighted. A highlighted marker is indicated with thicker lines and is colored using
alt_color
instead ofcolor
.Parameters: highlight (bool) – Whether the marker should be highlighted.
-
setIcon
(icon)¶ Change the marker icon
Parameters: icon (int) – The icon to draw next to the marker. Should be one the Icons.* constants. If not given, no icon will be drawn.
-
setText
(text)¶ Change the marker text
Parameters: text (str) – The text to display next to the marker. If not given, no text will be displayed.
-
setVisible
(show)¶ If “show” is True, show the marker, otherwise hide it.
-
show
()¶ Show this marker.
-
update
()¶ Update the marker in response to the workspace contents changing. If any marked atom is not in the workspace, the marker will be deleted.
-
-
class
schrodinger.maestro.markers.
LineMarker
(coord1, entry_id1, coord2, entry_id2, marker_color=None, alt_color=None, line_width=1)¶ Bases:
schrodinger.maestro.markers._BaseMarker
Class for marking two arbitrary points. Useful for marking lines between two graphics3d objects.
-
__init__
(coord1, entry_id1, coord2, entry_id2, marker_color=None, alt_color=None, line_width=1)¶ Parameters: - coord1 (List of int) – The first coordinate to mark
- coord1 – The second coordinate to mark
- entry_id1 (int) – Entry ID the first coordinate is associated with. This is to simplify when the line marker should be shown and hidden.
- entry_id2 (int) – Entry ID the second coordinate is associated with.
- marker_color (tuple, str, int, or
schrodinger.structutils.color
) – The color of the marker. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, white will be used. - alt_color (tuple, str, int, or
schrodinger.structutils.color
) – The alternate marker color. This color is always used for text, and is used for the marker and icon whenhighlight
is True. If not given,color
will be used. - line_width (int) – Width of the line
-
update
()¶ See parent class documentation.
Update the marker in response to the workspace contents changing. If either one of the entries the marker vertices belong to is no longer included in workspace, the marker will be deleted.
-
SETTINGS_VARS
= {'alt_color', 'color', 'highlight', 'icon', 'text'}¶
-
applySettings
(settings)¶ Apply the specified marker settings
Parameters: settings (dict) – A dictionary of marker settings. The keys of this dictionary must appear in SETTINGS_VARS
. Note that not all keys need to be specified.
-
classmethod
defaultSettings
()¶ Get the default marker settings
Returns: A dictionary of marker settings. The keys of this dictionary will be SETTING_VARS
.Return type: dict
-
getSettings
()¶ Get the current marker settings.
Returns: A dictionary of the marker settings. The keys of this dictionary will be SETTING_VARS
.Return type: dict
-
hide
()¶ Hide this marker.
-
setAltColor
(alt_color)¶ Change the text color
Parameters: alt_color (tuple, str, int, or schrodinger.structutils.color
) – The color of the text. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, the marker color will be used.
-
setColor
(marker_color)¶ Change the marker and icon color
Parameters: marker_color (tuple, str, int, or schrodinger.structutils.color
) – The color of the marker. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, white will be used.
-
setHighlight
(highlight)¶ Change whether the marker is highlighted. A highlighted marker is indicated with thicker lines and is colored using
alt_color
instead ofcolor
.Parameters: highlight (bool) – Whether the marker should be highlighted.
-
setIcon
(icon)¶ Change the marker icon
Parameters: icon (int) – The icon to draw next to the marker. Should be one the Icons.* constants. If not given, no icon will be drawn.
-
setText
(text)¶ Change the marker text
Parameters: text (str) – The text to display next to the marker. If not given, no text will be displayed.
-
setVisible
(show)¶ If “show” is True, show the marker, otherwise hide it.
-
show
()¶ Show this marker.
-
-
exception
schrodinger.maestro.markers.
NotInWorkspaceError
¶ Bases:
Exception
An exception when trying to display a marker covering atoms that are not currently in the workspace.
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-