schrodinger.application.glide.gui module¶
Classes and functions that are shared between the Glide GridGen and Docking panels.
Copyright Schrodinger, LLC. All rights reserved.
- schrodinger.application.glide.gui.find_equivalent_atoms(st, anum)¶
Given a structure atom, return a list of atoms that are identical to it. If no identical atoms are found, and empty list is returned.
- class schrodinger.application.glide.gui.GlideWorkspaceMarkers¶
Bases:
schrodinger.ui.qt.appframework2.markers.MarkerMixin
Class for marking constraints and excluded volumes in the Workspace. Along with the marker, optional labels are also drawn.
- __init__()¶
- clear()¶
Remove all added labels.
- add(center=None, radius=None, atom=None, color=None, name=None, opacity=0.8)¶
Add another marker to draw.
Either center and radius need to be specified (to draw a sphere) or an atom object (to draw atom markers).
- show()¶
Show the markers in the Workspace.
- hide()¶
Hide the markers from the Workspace.
- setVisible(visible)¶
Show the markers if “visible” is True, hide otherwise.
- showLabels()¶
Enable labels.
- hideLabels()¶
Disable labels.
- setLabelsVisible(visible)¶
Show the labels if “visible” is True, hide otherwise.
- addJaguarMarker(atoms, color=None, icon=None, text='', alt_color=None, highlight=False)¶
Add a marker to the specified atom(s)
- Parameters
atoms (list or
schrodinger.structure._StructureAtom
) – The atom or list of atoms to mark. A list may contain between one and four atoms (inclusive).color (tuple, str, int, or
schrodinger.structutils.color
) – The color of the marker and icon. 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 self.MARKER_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. Note that this argument will be ignored when marking a single atom.
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
.
- Returns
The newly created marker
- Return type
schrodinger.maestro.markers._BaseMarker
- Raises
ValueError – If a marker already exists for the specified atoms
- 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.
- addMarker(atoms, color=(1.0, 1.0, 1.0), group_name=None)¶
Generates a set of simple, dot-styled markers for a group of atoms.
- Parameters
atoms (list or
schrodinger.structure._StructureAtom
) – List of atoms to be markedcolor (tuple of 3 floats) – The amount of red, green and blue to use, each ranging from 0.0 to 1.0. Default is white (1., 1., 1.).
@group_name: Optional string to set as the name of this group of markers in Maestro. If not set, a unique identifier will be generated.
- addMarkerFromAsl(asl, color=(1.0, 1.0, 1.0), group_name=None)¶
Generates a set of simple, dot-styled markers for group of Workspace atoms that match the given ASL. Same atoms continue to be marked even if the Workspace is later modified such that ASL matching changes.
- Parameters
asl – ASL for the atoms to mark.
color (tuple of 3 floats) – The amount of red, green and blue to use, each ranging from 0.0 to 1.0. Default is white (1., 1., 1.).
@group_name: Optional string to set as the name of this group of markers in Maestro. If not set, a unique identifier will be generated.
- Returns
Marker object
- Return type
markers.Marker
- closeEvent(event)¶
Hide all markers when the panel is closed.
- getAllJaguarMarkers()¶
Get all markers._BaseMarker currently loaded into the panel
- Returns
An iterator of markers._BaseMarker
- Return type
iterator
- getAllMarkers()¶
Get all markers.Marker loaded into the panel
- Returns
list(markers.Marker)
- Return type
list
- getJaguarMarker(atoms)¶
Retrieve a marker for the specified atom(s)
- Parameters
atoms (list or
schrodinger.structure._StructureAtom
) – The atom or list of atoms to retrieve the marker for. A list may contain between one and four atoms (inclusive).- Returns
The requested marker
- Return type
schrodinger.maestro.markers._BaseMarker
- Raises
ValueError – If no marker exists for the specified atoms
- Note
As indicated by the return type, this function only returns
schrodinger.maestro.markers._BaseMarker
derived markers. Multi atomschrodinger.maestro.markers.Marker
type markers are not accessible in this way.
- hideAllJaguarMarkers()¶
Hide all
schrodinger.maestro.markers._BaseMarker
markers for this panel
- hideAllMarkers()¶
Hide all
schrodinger.maestro.markers.Marker
markers for this panel.
- hideEvent(event)¶
- removeAllJaguarMarkers()¶
Remove all markers
schrodinger.maestro.markers._BaseMarker
markers from this panel
- removeAllJaguarMarkersForEntry(eid)¶
Remove all markers for the specified entry id from this panel
- Parameters
eid (str) – The entry id to remove markers for
- removeAllMarkers()¶
Remove all
schrodinger.maestro.markers.Marker
markers from this panel.
- removeJaguarMarker(marker)¶
Removes the specified marker
- Parameters
marker (
schrodinger.maestro.markers._BaseMarker
) – The marker to remove- Raises
ValueError – If there is no marker on the specified atoms
- removeJaguarMarkerForAtoms(atoms)¶
Removes the marker for specified atom(s)
- Parameters
atoms (list or
schrodinger.structure._StructureAtom
) – The atom or list of atoms to retrieve the marker for. A list may contain between one and four atoms (inclusive).- Raises
ValueError – If no marker exists for the specified atoms
- removeMarker(marker)¶
Remove the
schrodinger.maestro.markers.Marker
- Parameters
marker (
schrodinger.maestro.markers.Marker
) – Marker to remove- Raises
ValueError – If marker is the wrong type or is not associated with the panel.
- showAllJaguarMarkers()¶
Show all
schrodinger.maestro.markers._BaseMarker
markers for which all marked atoms are in the workspace. Hide all other markers.
- showAllMarkers()¶
Set all
schrodinger.maestro.markers.Marker
markers to be shown if the relevant atoms are in the workspace. These markers are hidden automatically by Maestro when atoms are excluded.
- showEvent(event)¶
Re-show all panel markers when the panel is re-shown.