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: 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: Optional[Union[GridCenter, List[float]]] = 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.

class schrodinger.application.glide.gui.GridCenter(*args, _param_type=<object object>, **kwargs)

Bases: CompoundParam

x: float

A parameter of the class.

y: float

A parameter of the class.

z: float

A parameter of the class.

is_center_set: bool

A parameter of the class.

setXYZ(x: float, y: float, z: float)

Set the x, y, and z coordinates of the grid center.

Parameters:
  • x – X coordinate.

  • y – Y coordinate.

  • z – Z coordinate.

is_center_setChanged

A pyqtSignal emitted by instances of the class.

is_center_setReplaced

A pyqtSignal emitted by instances of the class.

xChanged

A pyqtSignal emitted by instances of the class.

xReplaced

A pyqtSignal emitted by instances of the class.

yChanged

A pyqtSignal emitted by instances of the class.

yReplaced

A pyqtSignal emitted by instances of the class.

zChanged

A pyqtSignal emitted by instances of the class.

zReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.application.glide.gui.GridSite(*args, _param_type=<object object>, **kwargs)

Bases: CompoundParam

Class representing a grid box. The values get set either when picking a new ligand in the Receptor tab, or by making changes in the Site tab. When a new ligand is picked, ligand_picked signal is emitted. When the user makes changes in the Site tab, the site_changed signal is emitted.

center: GridCenter

A parameter of the class.

entry_id: int

A parameter of the class.

asl: str

A parameter of the class.

inner_box: tuple

A parameter of the class.

size: float

A parameter of the class.

site_changed

A pyqtSignal emitted by instances of the class.

ligand_picked

A pyqtSignal emitted by instances of the class.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

initConcrete()

Override to customize initialization of concrete params.

reset()

Reset the Gridsite instance to its initial state.

setCustomCenter(center: tuple[float] | None)

Set the center of the grid box to the specified values or (0,0,0) if None.

Parameters:

center – Optional tuple of three floats.

getBoxSizes() tuple[tuple, tuple]

Get the sizes of the inner and outer boxes.

Returns:

A tuple containing the xyz sizes of the inner box and outer box.

ligandPicked(ligmol: _Molecule = None, entry: ProjectRow = None)

Called by the receptor tab when a new ligand is picked. Either ligmol or entry (but not both) must be specified.

Parameters:
  • ligmol – Optional; A _Molecule instance for the picked ligand molecule.

  • entry – Optional; An instance of ProjectRow class.

Raises:

ValueError – If neither ligmol nor entry is specified.

setCenterToLigand()

Set the center of the grid box to the center of the picked ligand (if a ligand was picked). Used by the SiteTab.

setSizeToLigand()

Set the size of the grid box to the size of the picked ligand (if a ligand was picked). Used by the SiteTab.

findLigandAtoms(st: Structure) List[int]

Given a Structure, return a list of the ligand atoms in it.

Parameters:

st – A Structure containing atoms containing ligand atoms.

Returns:

A list of ligand atoms in the structure.

isDefined() bool

Check if the active site is defined.

Returns:

True if the active site is defined; False otherwise.

isSphereInBox(xyz: tuple[float] | schrodinger.application.glide.gui.GridCenter, radius: float) bool

Determine if a sphere is fully within the grid box.

Parameters:
  • xyz – XYZ coordinates representing the center of the sphere.

  • radius – Radius of the sphere.

Returns:

True if the sphere is inside the grid box; False otherwise.

isPointInBox(xyz: tuple[float] | schrodinger.application.glide.gui.GridCenter) bool

Check if a coordinate is within the grid box.

Parameters:

xyz – A list or class representing XYZ coordinates.

Returns:

True if the coordinates are inside the grid box; False otherwise.

hasLigandsInBox(st: Structure) bool

Determine whether there are unidentified ligands in the workspace. Used to warn the user before starting a job.

Parameters:

st – A Structure containing atoms containing ligand atoms.

Returns:

True if there are ligands in the box; False otherwise.

aslChanged

A pyqtSignal emitted by instances of the class.

aslReplaced

A pyqtSignal emitted by instances of the class.

centerChanged

A pyqtSignal emitted by instances of the class.

centerReplaced

A pyqtSignal emitted by instances of the class.

entry_idChanged

A pyqtSignal emitted by instances of the class.

entry_idReplaced

A pyqtSignal emitted by instances of the class.

inner_boxChanged

A pyqtSignal emitted by instances of the class.

inner_boxReplaced

A pyqtSignal emitted by instances of the class.

sizeChanged

A pyqtSignal emitted by instances of the class.

sizeReplaced

A pyqtSignal emitted by instances of the class.