schrodinger.ui.qt.pdb_dialog module

Contains class that is used to display “Get Pdb Dialog”.

schrodinger.ui.qt.pdb_dialog.validate_pdb_id(pdb_id)

Return True if given string is a valid PDB ID: 4 characters beginning with a digit, and characters 2-4 should be alphanumeric.

schrodinger.ui.qt.pdb_dialog.extract_chain(filename, chain_name)

Extract the specific chain from the given protein structure file. Raises KeyError if chain is not present.

Parameters
  • filename (str) – Name of the protein file.

  • chain_name (str) – Chain to be extracted.

:return : Structure of the extracted chain :rtype: schrodinger.structure.Structure

schrodinger.ui.qt.pdb_dialog.create_biounits(filename)

Generate biological assemblies, and write a single Maestro file with multiple structures. Maestro is used instead of PDB mainly because PDB format doesn’t support custom title properties. Assembly number will be added to the title of each output structure.

class schrodinger.ui.qt.pdb_dialog.PDBDialog(import_pdbs=False)

Bases: schrodinger.ui.qt.widgetmixins.basicmixins.MessageBoxMixin, PyQt6.QtWidgets.QDialog

A QDialog to download Pdb file from pdb_id given by user.

__init__(import_pdbs=False)
setupFetchingOptions()

Set up fetching options menu.

onBiologicalUnitToggled(checked)

Respond to toggling of ‘Biological unit’ checkbox.

Parameters

checked (bool) – whether ‘Biological unit’ checkbox is checked or not

onRetrieveFromLocalToggled(checked)

Respond to toggling of ‘Local Installation Only’ menu item.

Parameters

checked (bool) – whether ‘Local Installation Only’ menu item is checked or not

getHelp()

Show help documentation of functionality of dialog.

updateDownloadButton()

Disable the Download button if there is no PDB ID, else enable it.

with_disabled_panel(self, *args, **kwargs)
execRemoteQueryDialog() bool

Launches the relevant remote query dialog if applicable.

Returns

if the remote dialog is accepted

downloadFile()

Download the pdb file(s) of given PDB ID(s) by user. If diffraction data is requested tries to download diffraction data files and EM maps. If EM maps are found their surfaces are added to corresponding PDB entries in the Project Table.

cancel()

Reject the Pdb dialog.

exec()

Shows the dialog as a modal dialog, blocking until the user closes it.

schrodinger.ui.qt.pdb_dialog.getPdbDialog()

Called by maestro to bring up the dialog box. Returns string of downloaded filenames, separated by semi-colon. On cancel, returns empty string.