schrodinger.maestro.markers module¶
Module for placing markers in the Workspace.
- class schrodinger.maestro.markers.Marker(name=None, asl='NOT all', color=(1, 1, 1))[source]¶
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))[source]¶
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).
- property name¶
- Returns
Marker name
- Return type
str
- show(asl=None)[source]¶
Show the markers. If a new ASL is specified, 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)[source]¶
Show the marker if <show> is True; hide otherwise. Useful for hooking up to a slot of a QCheckBox.
- class schrodinger.maestro.markers.AtomMarker(atom, marker_color=None, icon=_pymaecxx.MM_GRAPHICS_ICON_NONE, alt_color=None, highlight=False)[source]¶
Bases:
schrodinger.maestro.markers._BaseMarker
Class for marking a single atom.
- SETTINGS_VARS = {'alt_color', 'color', 'highlight', 'icon'}¶
- __init__(atom, marker_color=None, icon=_pymaecxx.MM_GRAPHICS_ICON_NONE, alt_color=None, highlight=False)[source]¶
- Parameters
atom (
schrodinger.structure._StructureAtom
) – The atom to markmarker_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
.
- setText(text)[source]¶
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=_pymaecxx.MM_GRAPHICS_ICON_NONE, text='', alt_color=None, highlight=False)[source]¶
Bases:
schrodinger.maestro.markers._BaseMarker
Class for marking two atoms. Useful for marking bonds and distances.
- __init__(atom1, atom2, marker_color=None, icon=_pymaecxx.MM_GRAPHICS_ICON_NONE, text='', alt_color=None, highlight=False)[source]¶
- Parameters
atom1 (
schrodinger.structure._StructureAtom
) – The first atom to markatom2 (
schrodinger.structure._StructureAtom
) – The second atom to markmarker_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.
- 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=_pymaecxx.MM_GRAPHICS_ICON_NONE, text='', alt_color=None, highlight=False)[source]¶
Bases:
schrodinger.maestro.markers._BaseMarker
Class for marking three atoms. Useful for marking bond angles.
- __init__(atom1, atom2, atom3, marker_color=None, icon=_pymaecxx.MM_GRAPHICS_ICON_NONE, text='', alt_color=None, highlight=False)[source]¶
- Parameters
atom1 (
schrodinger.structure._StructureAtom
) – The first atom to markatom2 (
schrodinger.structure._StructureAtom
) – The second atom to markatom3 (
schrodinger.structure._StructureAtom
) – The third atom to markmarker_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.
- 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=_pymaecxx.MM_GRAPHICS_ICON_NONE, text='', alt_color=None, highlight=False)[source]¶
Bases:
schrodinger.maestro.markers._BaseMarker
Class for marking four atoms. Useful for marking dihedral angles.
- __init__(atom1, atom2, atom3, atom4, marker_color=None, icon=_pymaecxx.MM_GRAPHICS_ICON_NONE, text='', alt_color=None, highlight=False)[source]¶
- Parameters
atom1 (
schrodinger.structure._StructureAtom
) – The first atom to markatom2 (
schrodinger.structure._StructureAtom
) – The second atom to markatom3 (
schrodinger.structure._StructureAtom
) – The third atom to markatom3 – 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.
- 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)[source]¶
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)[source]¶
- 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()[source]¶
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[source]¶
Bases:
Exception
An exception when trying to display a marker covering atoms that are not currently in the workspace.
- __init__(*args, **kwargs)¶
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.