schrodinger.ui.chooseligand module

class schrodinger.ui.chooseligand.ChooseLigandModel(parent, allLigands)

Bases: PyQt6.QtCore.QAbstractTableModel

__init__(parent, allLigands)
rowCount(self, parent: QModelIndex = QModelIndex()) int
columnCount(self, parent: QModelIndex = QModelIndex()) int
data(self, index: QModelIndex, role: int = Qt.DisplayRole) Any
headerData(self, section: int, orientation: Qt.Orientation, role: int = Qt.DisplayRole) Any
class schrodinger.ui.chooseligand.ChooseLigandDialog(parent, complex_st, ligands_list, text=None)

Bases: PyQt6.QtWidgets.QDialog

__init__(parent, complex_st, ligands_list, text=None)
Parameters
  • parent (QWidget) – Parent for the dialog window.

  • complex_st (structure.Structure object) – Receptor/ligand complex structure.

  • ligands_list (list(schrodinger.structutils.analyze.Ligand)) – List of ligands to choose from.

  • text (str) – Label to show at the top of the ligands table.

tableViewClicked(idx)
accept(self)
getSelectedLigand()
schrodinger.ui.chooseligand.choose_ligand(parent, complex_st, text=None)

Given a Structure object and a parent window, ask the user to select a ligand from the complex (if more than one is available).

If no ligands are present, ValueError is raised.

If only one ligand was present, the Ligand instance for it is returned.

If the user selected a ligand, the Ligand instance for that ligand is returned (See schrodinger.structutils.analyze.Ligand)

If the user cancelled the dialog, None is returned.

Parameters
  • parent (QWidget) – Parent for the dialog window.

  • complex_st (structure.Structure object) – Receptor/ligand complex structure.

  • text (str) – Label to show at the top of the ligands table.

class schrodinger.ui.chooseligand.TestApp

Bases: schrodinger.ui.qt.appframework.AppFramework

Class for testing this module.

__init__()

See class docstring.

command()
schrodinger.ui.chooseligand.test()