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: PyQt5.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

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: PyQt5.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/2018-2/NB/build-169/internal/lib/python3.6/site-packages/schrodinger/application/matsci/siteselector/octahedral.png'
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/2018-2/NB/build-169/internal/lib/python3.6/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/2018-2/NB/build-169/internal/lib/python3.6/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/2018-2/NB/build-169/internal/lib/python3.6/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/2018-2/NB/build-169/internal/lib/python3.6/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/2018-2/NB/build-169/internal/lib/python3.6/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
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: PyQt5.QtWidgets.QFrame

A row of widgets for a single ligand

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: PyQt5.QtWidgets.QFrame

The master frame that stores a row for each ligand

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: PyQt5.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'>}
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