schrodinger.application.matsci.siteselector.siteselector module¶
Classes for displaying site selection information and options for organometallic complexes of different VSEPR geometries
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.matsci.siteselector.siteselector.CoordinationSite(value)¶
Bases:
PyQt6.QtWidgets.QGraphicsTextItem
QGraphicsTextItem for displaying the number of the coordination site
- selected¶
Signal when the site is selected
- deselected¶
Signal when the site is deselected (a selected site is clicked again
- __init__(value)¶
Create a CoordinationSite object
- Parameters
value (int) – The number the user will see for this site. Note that this will be one greater than the index into python arrays for this site.
- setClickable(state)¶
Set whether this site is clickable
- Parameters
state (bool) – Whether the site can be clicked on or not
- mousePressEvent(event)¶
Catch when the mouse clicks on this site and select/deselect the site
- Parameters
event (QMouseEvent) – The event that generated this call
- moveToPosition(xval, yval)¶
Move the label to its starting position - should only be called at the beginning.
- setShiftLeft()¶
Set this label as one that shifts to the left when a ligand designator is added to the label.
- select(state=True, released=False)¶
Select or deselect the label and emit the proper signal
- Parameters
state (bool) – True if the label is to be selected, False if not
- addDesignator(text)¶
Add a ligand designator to the label to indicate that it is currently assigned to that ligand coordination site.
- Parameters
text (str) – The designator to add to the site label
- released(index)¶
A ligand has released this coordination site because a different site was picked.
- class schrodinger.application.matsci.siteselector.siteselector.OctahedralSiteSelector¶
Bases:
PyQt6.QtWidgets.QFrame
A Panel that puts up an octahedral geometry and allows the user to select sites.
- SIZE = 500¶
- CENTER = 250¶
- MOVEXBY = 50¶
- MOVEYBY = 80¶
- LOCATION = {0: [410, 227], 1: [241, 60], 2: [325, 375], 3: [241, 400], 4: [75, 227], 5: [158, 80]}¶
The locations of the site labels in pixels.
- IMAGE_FILE = '/scr/buildbot/savedbuilds/2024-3/NB/build-133/internal/lib/python3.11/site-packages/schrodinger/application/matsci/siteselector/octahedral.png'¶
- __init__()¶
Create an OctahedralSiteSelector object
- addLigandDesignator(site, designator)¶
Add a ligand site desginator to a selected coordination site label
- Parameters
designator (str) – The string to add to the site label
- markShiftedDesignators()¶
Mark the labels that should shift left when a ligand designator is added to it. We shift some labels left so they don’t clash with the geometry image.
This should be re-implemented for each specific geometry image.
- deselectSelectedSites(ignore=None)¶
Deselect selected sites other than the ignored one
- Parameters
ignore (int or None) – Deselect any site other than this one (zero-based). If ignore=None, all sites are deselected.
- quietlySelectSite(index)¶
Select the given site but do not emit any selection signals
- Parameters
index (int) – The zero-based index of the site to ignore
- setSiteClickable(index, state)¶
Set whether the given site is clickable
- Parameters
index (int) – The zero-based index of the site
state (bool) – Whether the site should be clickable
- class schrodinger.application.matsci.siteselector.siteselector.TrigonalBipyramidalSiteSelector¶
Bases:
schrodinger.application.matsci.siteselector.siteselector.OctahedralSiteSelector
- SIZE = 500¶
- CENTER = 250¶
- MOVEXBY = 60¶
- MOVEYBY = 45¶
- LOCATION = {0: [223, 20], 1: [223, 430], 2: [420, 226], 3: [55, 128], 4: [55, 325]}¶
The locations of the site labels in pixels.
- IMAGE_FILE = '/scr/buildbot/savedbuilds/2024-3/NB/build-133/internal/lib/python3.11/site-packages/schrodinger/application/matsci/siteselector/trigonal_bipyramidal.png'¶
- markShiftedDesignators()¶
Mark the labels that should shift left when a ligand designator is added to it. We shift some labels left so they don’t clash with the geometry image.
- class schrodinger.application.matsci.siteselector.siteselector.SquarePlanarSiteSelector¶
Bases:
schrodinger.application.matsci.siteselector.siteselector.OctahedralSiteSelector
- SIZE = 500¶
- CENTER = 250¶
- MOVEXBY = 50¶
- MOVEYBY = 80¶
- LOCATION = {0: [410, 227], 1: [241, 60], 2: [241, 400], 3: [75, 227]}¶
The locations of the site labels in pixels.
- IMAGE_FILE = '/scr/buildbot/savedbuilds/2024-3/NB/build-133/internal/lib/python3.11/site-packages/schrodinger/application/matsci/siteselector/square_planar.png'¶
- markShiftedDesignators()¶
Mark the labels that should shift left when a ligand designator is added to it. We shift some labels left so they don’t clash with the geometry image.
- class schrodinger.application.matsci.siteselector.siteselector.TetrahedralSiteSelector¶
Bases:
schrodinger.application.matsci.siteselector.siteselector.OctahedralSiteSelector
- SIZE = 500¶
- CENTER = 250¶
- MOVEXBY = 50¶
- MOVEYBY = 80¶
- LOCATION = {0: [241, 60], 1: [380, 310], 2: [95, 310], 3: [239, 400]}¶
The locations of the site labels in pixels.
- IMAGE_FILE = '/scr/buildbot/savedbuilds/2024-3/NB/build-133/internal/lib/python3.11/site-packages/schrodinger/application/matsci/siteselector/tetrahedral.png'¶
- markShiftedDesignators()¶
Mark the labels that should shift left when a ligand designator is added to it. We shift some labels left so they don’t clash with the geometry image.
- class schrodinger.application.matsci.siteselector.siteselector.TrigonalPlanarSiteSelector¶
Bases:
schrodinger.application.matsci.siteselector.siteselector.OctahedralSiteSelector
- SIZE = 500¶
- CENTER = 250¶
- MOVEXBY = 60¶
- MOVEYBY = 40¶
- LOCATION = {0: [415, 231], 1: [67, 32], 2: [70, 432]}¶
The locations of the site labels in pixels.
- IMAGE_FILE = '/scr/buildbot/savedbuilds/2024-3/NB/build-133/internal/lib/python3.11/site-packages/schrodinger/application/matsci/siteselector/trigonal_planar.png'¶
- markShiftedDesignators()¶
Mark the labels that should shift left when a ligand designator is added to it. We shift some labels left so they don’t clash with the geometry image.
- class schrodinger.application.matsci.siteselector.siteselector.LinearSiteSelector¶
Bases:
schrodinger.application.matsci.siteselector.siteselector.OctahedralSiteSelector
- SIZE = 500¶
- CENTER = 250¶
- MOVEXBY = 60¶
- MOVEYBY = 40¶
- LOCATION = {0: [415, 220], 1: [50, 220]}¶
The locations of the site labels in pixels.
- IMAGE_FILE = '/scr/buildbot/savedbuilds/2024-3/NB/build-133/internal/lib/python3.11/site-packages/schrodinger/application/matsci/siteselector/linear.png'¶
- markShiftedDesignators()¶
Mark the labels that should shift left when a ligand designator is added to it. We shift some labels left so they don’t clash with the geometry image.
- class schrodinger.application.matsci.siteselector.siteselector.OrderedOctahedralSiteSelector¶
Bases:
schrodinger.application.matsci.siteselector.siteselector.OctahedralSiteSelector
Overrides the parent class to put coordination sites in a more rational order for tri and tetradentate ligands
- SIZE = 500¶
- CENTER = 250¶
- LOCATION = {0: [410, 227], 1: [241, 60], 2: [75, 227], 3: [241, 400], 4: [325, 375], 5: [158, 80]}¶
The locations of the site labels in pixels.
- markShiftedDesignators()¶
Mark the labels that should shift left when a ligand designator is added to it. We shift some labels left so they don’t clash with the geometry image.
- class schrodinger.application.matsci.siteselector.siteselector.OrderedSquarePlanarSiteSelector¶
Bases:
schrodinger.application.matsci.siteselector.siteselector.SquarePlanarSiteSelector
Overrides the parent class to put coordination sites in a more rational order for tri and tetradentate ligands
- SIZE = 500¶
- CENTER = 250¶
- LOCATION = {0: [410, 227], 1: [241, 60], 2: [75, 227], 3: [241, 400]}¶
The locations of the site labels in pixels.
- markShiftedDesignators()¶
Mark the labels that should shift left when a ligand designator is added to it. We shift some labels left so they don’t clash with the geometry image.
- class schrodinger.application.matsci.siteselector.siteselector.SiteRadioButton(ligand_index, *args, **kwargs)¶
Bases:
schrodinger.ui.qt.swidgets.SRadioButton
A RadioButton that coordinates the information for a ligand coordination site
- released¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- __init__(ligand_index, *args, **kwargs)¶
Create a SiteRadioButton object
- Parameters
ligand_index (int) – The index of the ligand this radio button is for. This should correspond to the order of the ligands top to bottom in the frame.
Other arguments & keywords are passed on to the parent class
- sitePicked(site_index)¶
A coordination site was picked while this was the active radiobutton
- Parameters
site_index (int) – The index of the site that was picked.
- updateLabel()¶
Give the user some indication of what coordination site is currently picked for this button
- siteUnpicked(site)¶
A coordination site was just deselected by the user. If this button held that site, it not longer does.
We do not emit the released signal here because the site has already been deselected.
- Parameters
site (int) – The index of the site that was unpicked
- class schrodinger.application.matsci.siteselector.siteselector.Ligand(row, index, layout=None)¶
Bases:
PyQt6.QtWidgets.QFrame
A row of widgets for a single ligand
- __init__(row, index, layout=None)¶
Create a Ligand object
- Parameters
row (LigandRow) – The main panel LigandRow object that provides the data for this ligand
index (int) – The ligand index for this ligand (top ligand is 0, next ligand is 1, etc.)
layout (QLayout) – The layout to place this widget row in
- getSlots()¶
Return which coordination sites this ligand is connected to
- Return type
list
- Returns
List of int, each integer is a coordination site index. The first item is for R1, the second, if it exists is for R2. A list item of None is returned if a coordination site has not been set for an R value
- class schrodinger.application.matsci.siteselector.siteselector.LigandSelector(ligand_rows, layout=None)¶
Bases:
PyQt6.QtWidgets.QFrame
The master frame that stores a row for each ligand
- __init__(ligand_rows, layout=None)¶
Create a LigandSelector object
- Parameters
ligand_rows (list) – LigandRow objects from the master panel for each ligand
layout (QLayout) – The layout to place this object into
- getButtons()¶
Return a list of all ligand radiobuttons
- Return type
list
- Returns
list of all
SiteRadioButton
objects
- getCurrentButton()¶
Return the currently checked button and its ID
- Return type
(
SiteRadioButton
, int)- Returns
The currently-checked radio button and its ID (in the button group)
- nextButton(id=None)¶
Check the next button in line after the currently checked button
- Parameters
id (int) – Button group ID of the button to use as the currently checked button
- getSlots()¶
Return the coordination sites picked for all the ligands. The sites will be returned in the same order the ligands appear in the LigandRow objects in the master.
- Return type
list
- Returns
list of int, each int is a coordination site index
- class schrodinger.application.matsci.siteselector.siteselector.SiteSelectionDialog(geometry, rows, parent=None, defined_slots=None)¶
Bases:
PyQt6.QtWidgets.QDialog
The dialog window that allows the user to select coordination sites for each ligand
- SELECTORS = {'Linear': <class 'schrodinger.application.matsci.siteselector.siteselector.LinearSiteSelector'>, 'Octahedral': <class 'schrodinger.application.matsci.siteselector.siteselector.OctahedralSiteSelector'>, 'Square planar': <class 'schrodinger.application.matsci.siteselector.siteselector.SquarePlanarSiteSelector'>, 'Tetrahedral': <class 'schrodinger.application.matsci.siteselector.siteselector.TetrahedralSiteSelector'>, 'Trigonal bipyramidal': <class 'schrodinger.application.matsci.siteselector.siteselector.TrigonalBipyramidalSiteSelector'>, 'Trigonal planar': <class 'schrodinger.application.matsci.siteselector.siteselector.TrigonalPlanarSiteSelector'>}¶
- __init__(geometry, rows, parent=None, defined_slots=None)¶
Create a SiteSelectionDialog object
- Parameters
geometry (str) – The VESPR geometry of the complex
row – list of LigandRow objects to extract ligands from
parent (QWidget) – The window to display this dialog over
defined_slots (list) – Each item in the list is the slot that coordinate site will use. The first item of the list is the slot for the R1 site of the first ligand in the first ligand row. The second item is the slot for the R2 site of the first ligand in the first ligand row (if that ligand is bidentate) or the R1 site of the next ligand, etc. A slot, in this case, is the metal atom coordination site.
- siteDeselected(site)¶
A coordination site was deselected by clicking on it. Let the radio buttons know so the one that was holding it will know it is no longer holding it.
- Parameters
site (int) – The coordination site that was deselected. This value will be one less than what the user sees. (Site 1 emits site=0)
- siteSelected(site)¶
A coordination site was selected. Let the current radiobutton know that it has a site, update the site label, and move to the next ligand site.
- Parameters
site (int) – The coordination site that was selected. This value will be one less than what the user sees. (Site 1 emits site=0)
- accept()¶
Save button callback. Store the selected ligand sites