schrodinger.application.bioluminate.bwidgets module

Collection of widgets common to multiple BioLuminate panels.

Copyright (c) Schrodinger, LLC. All rights reserved

class schrodinger.application.bioluminate.bwidgets.ImportWidget(parent)

Bases: PyQt5.QtWidgets.QWidget

asGrid()
createImportWidget(button_title, action_params=None, objname=None, action_order=None, icon=':/schrodinger/application/bioluminate/actions/icons_dir/msv_open_file')

Returns a list of widgets that comprise an ImportWidget.

class schrodinger.application.bioluminate.bwidgets.SequenceFileDialog(parent=None, add_options=True, **kwargs)

Bases: schrodinger.ui.qt.filedialog.FileDialog

Custom class to handle opening files related to sequences.

CAPTION = 'Import Sequences'
DEFAULT_FILTERS = 'FASTA (*.fasta *.fst *.fas *.seq);;Maestro (*.mae *.maegz *.mae.gz );;PDB (*.pdb *.ent);;SWISSPROT (*.sw *.sp *.swiss *.swissprot);;GCG (*.gcg *.msf);;EMBL (*.embl *.emb);;PIR (*.pir);;All Files (*.*)'

The default MSV filters.

REFERENCE_FILTERS = 'Common (*.fasta *.fst *.fas *.seq *.mae *.maegz *.mae.gz *.pdb *.ent *.txt);;FASTA (*.fasta *.fst *.fas *.seq);;PDB (*.pdb *.ent);;Maestro (*.mae *.maegz *.mae.gz );;All Files (*.*)'

Filters for reference sequences in homology model building.

STRUCTURE_FILTERS = 'Structure files (*.mae *.maegz *.mae.gz *.pdb *.ent);;Maestro (*.mae *.maegz *.mae.gz );;PDB (*.pdb *.ent)'

Filters that have structures associated with them.

addOptions()

Adds three widgets on the bottom of the dialog window that allow users to optionally:

  • Align to query sequence
  • Replace matching sequences
  • Incorporate PDB files into Maestro
getOpenFileName(multiple=False)

Convenience function that returns a single filename as selected by the user

The base class base_file_dialog documents the keyword arguments for this class.

Return type:str or None
Returns:full pathname of the file selected by the user, or None if Cancel was pressed
static get_open_file_names(parent=None, add_options=True, multiple=True, **kwargs)
static get_open_file_name(parent=None, add_options=True, **kwargs)
class schrodinger.application.bioluminate.bwidgets.NumericLineEdit(parent=None, width=50, validate_type='float', minimum=None, maximum=None)

Bases: PyQt5.QtWidgets.QLineEdit

A QtWidgets.QLineEdit with a builtin validator for floats or integers.

validate()

Checks to see if the lineedit has acceptable input and changes the widget to indicate invalid input. Even with a validator set users can input invalid args so this helps out.

class schrodinger.application.bioluminate.bwidgets.LoadingIcon(parent=None)

Bases: PyQt5.QtGui.QMovie

Animates a “loading” icon that can be used by any Qt object that has the setIcon method.

Example:

def startTask(self):

self.button = QtWidgets.QPushButton(‘Button’)

self.loading_icon = bwidgets.LoadingIcon(self) self.loading_icon.startLoading(self.button)

self.launchTask()

def taskCallback(self):

self.loading_icon.stopLoading()
startLoading(qt_obj)

Set the qt_obj’s icon to a loading icon.

Parameters:qt_obj – Object to set icon for. Must have setIcon method.
cycle()

The callback for the frameChanged signal. This will grab the pixmap of the current frame and create an icon from it. It then sets the self.qt_obj’s icon to this icon.

stopLoading()

Removes the loading icon and sets the object’s icon back to the original icon

class schrodinger.application.bioluminate.bwidgets.RowActionItem(row)

Bases: PyQt5.QtWidgets.QWidget

Custom widget to be used in a table cell. It will create a widget that contains multiple small push buttons with icons. This will end up looking like just a small icon in the cell. Multipe actions can be added to a single cell

addActionItem(icon, tooltip, callback)

Add an action to the cell widget.

Parameters:
  • icon (QtGui.QIcon) – the icon for the action
  • callback (callable) – The callback for the action
paintEvent(*args, **kwargs)

Override the paintEvent to create the layout for the cell.

class schrodinger.application.bioluminate.bwidgets.QuickHelpButton(message_title, message_text)

Bases: PyQt5.QtWidgets.QPushButton

A help button that has a blue gradient