schrodinger.ui.picking module

class schrodinger.ui.picking.MaestrolessLigandListModel(st, parent=None)

Bases: schrodinger.ui.qt.table_helper.RowBasedListModel

Model for ligand lists that can be used outside of Maestro.

class schrodinger.ui.picking.MaestrolessPickLigandDialog(st, parent=None)

Bases: PyQt5.QtWidgets.QDialog

Dialog to allow users to pick ligands outside of Maestro. Used by ifd_gui.py and covalent_docking_gui.py

accept()

Called when the user clicks OK button

class schrodinger.ui.picking.MaestrolessPickResidueDialog(st, lig_st=None, find_ws_lig=False, multi_select=True, parent=None)

Bases: schrodinger.ui.picking._BaseMaestrolessPickResDialog

Class for picking residues outside of Maestro.

ALL_RESIDUES = 'All residues'
NEAR_RESIDUES = 'Residues near ligand (within 5A)'
PickModelClass

alias of PickResidueModel

af2SettingsGetValue()

Used with schrodinger.ui.qt.appframework2.settings.SettingsMixin to save the dialog state to JSON.

Returns:List of panel attributes to serialize
Return type:list
af2SettingsSetValue(value)

Used with schrodinger.ui.qt.appframework2.settings.SettingsMixin to reload the dialog state from JSON.

Parameters:value (list) – Values to set for the panel
onShowComboIndexChanged()

Called when the index of the Show combo box is changed. Updates the available residues based on the selected option.

updateNumPickedResiduesLabel()

Update the label for number of picked residues.

class schrodinger.ui.picking.Pick3DObjectToggle(checkbox, pick_function, pick_category, pick_text='Pick an object')

Bases: schrodinger.ui.picking._PickToggle

Class meant to replicate a Maestro pick toggle. This object allows you to pick objects from the schrodinger.graphics3d module. This picker allows you to pick any object assigned to the picking category argument ‘pick_category’

Parameters:
  • checkbox – The QCheckBox object for the picking toggle
  • pick_function – Will be called when a bond is picked. Must be a callable function that accepts two arguments (atom numbers)
  • pick_category – The category of objects to pick, this string should match whatever value you passed to the 3D Objects when you created them.
  • pick_text – text that will be displayed in Maestro’s status area (default “Pick a bond”)
class schrodinger.ui.picking.PickAtomToggle(checkbox, pick_function, pick_text='Pick an atom', enable_lasso=False)

Bases: schrodinger.ui.picking._PickToggle

Class meant to replicate Maestro atom pick toggles. Takes an argument ‘checkbox’ that represents the checkbox for the picking toggle.

class schrodinger.ui.picking.PickBondToggle(checkbox, pick_function, pick_text='Pick a bond')

Bases: schrodinger.ui.picking._PickToggle

Class meant to replicate Maestro bond pick toggles.

The argument ‘checkbox’ represents the QCheckBox object for the picking toggle

The following options are supported:
pick_function - will be called when a bond is picked. Must be a callable
function that accepts two arguments (atom numbers)
pick_text - text that will be displayed in Maestro’s status area
(default “Pick a bond”)
class schrodinger.ui.picking.PickMixedToggle(checkbox, pick_atom_function, pick_bond_function, pick_atom_text='Pick an atom', pick_bond_text='Pick a bond', enable_lasso=False)

Bases: schrodinger.ui.picking._PickToggle

Class allowing to pick atom or bond depending on internal state.

enable_lasso
setPickAtom(state)

Turn pick atom mode on and off. If it’s off bonds will be picked instead.

Parameters:state (bool) – True or False, if True atoms will be picked. Otherwise bonds will be picked.
setPickBond(state)

Convenience function to turn pick atom mode on and off. If its off bonds will be picked instead.

Parameters:state (bool) – True or False, if True bonds will be picked. Otherwise atoms will be picked.
class schrodinger.ui.picking.PickResidueModel(parent, multi_select=True)

Bases: schrodinger.ui.picking._BaseMaestrolessPickModel

Model for tables to allow picking residues from a structure outside of Maestro.

Column

alias of PickResidueColumns

ROW_CLASS

alias of PickResidueRow

class schrodinger.ui.picking.PickResidueRow(res, distance=None)

Bases: schrodinger.ui.picking.ResidueRow

Base class for rows to be used in models inheriting _BaseMaestrolessPickModel.

class schrodinger.ui.picking.PickResiduesChangedMixin

Bases: object

Mixin to provide common signals for dialogs that allow users to pick residues.

getResiduesCenter(res_objs)

Return the (x, y, z) tuple for the center of the selected residues. Will raise ValueError if no residues were picked.

@pram res_objs: Residue objects to get the center of :type res_objs: List of ResidueRow

Returns:Tuple of center x, y, z coordinates
Return type:tuple of (float, float, float)
getResiduesList(res_objs)

Return the list of residue strings (e.g. [‘A:217’, ‘A:231b’]) of the selected residues.

Parameters:res_objs (List of ResidueRow) – List of residue objects to get strings for

:return List of residue strings for each row. @rtyp: list of str

residues_centroid_changed
residues_changed
class schrodinger.ui.picking.PickTorsionToggle(checkbox, pick_function, pick_text='Pick 4 atoms to define a torsion')

Bases: schrodinger.ui.picking._PickToggle

Class for creating a picker that allows the user to define a torsion by sequentually picking 4 atoms. Takes an argument ‘checkbox’ that represents the checkbox for the picking toggle.

class schrodinger.ui.picking.ResidueRow(res, markers_color=None)

Bases: schrodinger.ui.qt.appframework2.markers.MarkerMixin

Class representing a residue in the active site. Used by ResiduesModel and SelectResiduesDialog.

findInStructure(st)