schrodinger.maestro.markers module¶
Module for placing markers in the Workspace.
- class schrodinger.maestro.markers.Icons¶
Bases:
objectConstants for marker icons
- class schrodinger.maestro.markers.Marker(name=None, asl='NOT all', color=(1, 1, 1))¶
Bases:
objectClass 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).
- property name¶
- Returns:
Marker name
- Return type:
str
- hide()¶
Hide the markers
- show(asl=None)¶
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)¶
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.
- setColor(color)¶
- Parameters:
color (tuple(float, float, float)) – The amount of red, green, and blue to use, each ranging from 0.0 to 1.0.
- class schrodinger.maestro.markers.AtomMarker(atom, marker_color=None, icon=_pymaecxx.MM_GRAPHICS_ICON_NONE, alt_color=None, highlight=False)¶
Bases:
_BaseMarkerClass 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)¶
- 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.colorinstance. 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 whenhighlightis True. If not given,colorwill be used.highlight (bool) – Whether the marker should be highlighted. A highlighted marker is indicated with thicker lines and is colored using
alt_colorinstead ofcolor.
- 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.
- class schrodinger.maestro.markers.PairMarker(atom1, atom2, marker_color=None, icon=_pymaecxx.MM_GRAPHICS_ICON_NONE, text='', alt_color=None, highlight=False)¶
Bases:
_BaseMarkerClass 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)¶
- 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.colorinstance. 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 whenhighlightis True. If not given,colorwill be used.highlight (bool) – Whether the marker should be highlighted. A highlighted marker is indicated with thicker lines and is colored using
alt_colorinstead 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.
- class schrodinger.maestro.markers.TripleMarker(atom1, atom2, atom3, marker_color=None, icon=_pymaecxx.MM_GRAPHICS_ICON_NONE, text='', alt_color=None, highlight=False)¶
Bases:
_BaseMarkerClass 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)¶
- 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.colorinstance. 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 whenhighlightis True. If not given,colorwill be used.highlight (bool) – Whether the marker should be highlighted. A highlighted marker is indicated with thicker lines and is colored using
alt_colorinstead 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.
- class schrodinger.maestro.markers.QuadMarker(atom1, atom2, atom3, atom4, marker_color=None, icon=_pymaecxx.MM_GRAPHICS_ICON_NONE, text='', alt_color=None, highlight=False)¶
Bases:
_BaseMarkerClass 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)¶
- 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.colorinstance. 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 whenhighlightis True. If not given,colorwill be used.highlight (bool) – Whether the marker should be highlighted. A highlighted marker is indicated with thicker lines and is colored using
alt_colorinstead 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.
- class schrodinger.maestro.markers.LineMarker(coord1, entry_id1, coord2, entry_id2, marker_color=None, alt_color=None, line_width=1)¶
Bases:
_BaseMarkerClass 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.colorinstance. 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 whenhighlightis True. If not given,colorwill 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.
- exception schrodinger.maestro.markers.NotInWorkspaceError¶
Bases:
ExceptionAn exception when trying to display a marker covering atoms that are not currently in the workspace.