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:
PyQt6.QtWidgets.QWidget
- __init__(parent)¶
Construct widget.
- 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.
- __init__(parent=None, add_options=True, **kwargs)¶
- Parameters
parent (qwidget) – the widget over which this dialog should be shown. If not given, the Dialog will be placed by PyQt.
caption (str) – the name that appears in the titlebar of this dialog. If not given the title will be the default PyQt caption.
directory (str) – the initial directory displayed in this dialog, default is the current directory.
filter (str) – the list of filters that can be applied to this directory the format is
"Filetype1 (*.ex1);;Filetype2 (*.ex2 *.ex3)"
. Default is all files.custom_sidebar (bool) – True if the Schrodinger sidebar should be used, False if the default PyQt sidebar should be used.
sidebar_links (dict) – Use to create extra links in the left-hand sidebar of the dialog. the keys of the dictionary are a unique identifier for each link (note that ‘home’ and ‘working’ are already used), and the values are tuples of the form (path, name) where path and name are str, path indicates the path the sidebar link points to, and name is the name displayed for the link.
- 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:
PyQt6.QtWidgets.QLineEdit
A
QtWidgets.QLineEdit
with a builtin validator for floats or integers.- __init__(parent=None, width=50, validate_type='float', minimum=None, maximum=None)¶
- 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.RowActionItem(row)¶
Bases:
PyQt6.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
- __init__(row)¶
- Parameters
row (mixed) – The row associated with the cell. This can be anything (i.e. integer index, row object, etc.) and is used to track the row.
- 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.