schrodinger.application.matsci.reaction_workflow_gui_utils module¶
GUI utilities for reaction workflows.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.matsci.reaction_workflow_gui_utils.SequenceData(amin, amax, step, value)¶
Bases:
tuple
- amax¶
Alias for field number 1
- amin¶
Alias for field number 0
- step¶
Alias for field number 2
- value¶
Alias for field number 3
- class schrodinger.application.matsci.reaction_workflow_gui_utils.AtomCollectionFrame(label, tag, n_min, idx_getter, sort=True, layout=None, use_picker=False)¶
Bases:
schrodinger.ui.qt.swidgets.SFrame
Manage an atom collection.
- showStructures¶
A
pyqtSignal
emitted by instances of the class.
- __init__(label, tag, n_min, idx_getter, sort=True, layout=None, use_picker=False)¶
Create an instance.
- Parameters
label (str) – the label for the line edit
tag (str) – an identifying tag
n_min (int) – the minimum number of indices needed when specifying indices
idx_getter (function) – function to get indices
sort (bool) – whether to sort the indices
layout (QLayout or None) – the layout to which this widget will be added or None if there isn’t one
use_picker (bool) – if True then use a picker rather than a define button
- layOut()¶
Lay out the widgets.
- setIndices(idxs)¶
Set the indices.
- Parameters
idxs (list) – the idxs
- getIndices()¶
Get the indices.
- Return type
list
- Returns
the indices
- setStructures(structs)¶
Set the structures.
- Parameters
structs (list) – contains schrodinger.structure.Structure
- setOptionsFromRepresentativeStructure()¶
Set GUI options according to the properties of the representative structure.
- isValid()¶
Validate it.
- Raise
rxnwfu.InvalidInput if there is a formatting issue
- reset()¶
Reset it.
- class schrodinger.application.matsci.reaction_workflow_gui_utils.ConformerSelection(*args, show_selection_method=False, **kwargs)¶
Bases:
schrodinger.ui.qt.swidgets.SGroupBox
Manage selection of conformers.
- MAX_N_CONFORMERS_LABEL = 'Maximum number of conformers:'¶
- MIN_N_CONFORMERS_LABEL = 'Minimum number of conformers:'¶
- __init__(*args, show_selection_method=False, **kwargs)¶
- Parameters
show_selection_method (bool) – whether to show the selection method
- updateNConformersLabel()¶
Update the N conformers label.
- getRelEnergy()¶
Return the relative energy in kJ/mol.
- Return type
float or None
- Returns
the relative energy in kJ/mol or None if not using relative energies
- getCmd()¶
Return the command line options.
- Return type
list
- Returns
the command line options which are flags and values
- reset()¶
Reset it.
- class schrodinger.application.matsci.reaction_workflow_gui_utils.ConformationalSearch(*args, show_restrain_atoms=False, show_selection_method=False, show_return_files=True, **kwargs)¶
Bases:
schrodinger.ui.qt.swidgets.SGroupBox
Manage conformational search options.
- __init__(*args, show_restrain_atoms=False, show_selection_method=False, show_return_files=True, **kwargs)¶
Create an instance.
- Parameters
show_restrain_atoms (bool) – whether to show the restrain atoms widget
show_selection_method (bool) – whether to show the selection method
show_return_files (bool) – whether to show the return files checkbox
- csearchEngineChanged()¶
React to a change in conformational search engine.
- getSkipEtaRotamers()¶
Return True if eta-rotamers are to be skipped.
- Return type
bool
- Returns
True if eta-rotamers are to be skipped
- getCmd()¶
Return the command line options.
- Return type
list
- Returns
the command line options which are flags and values
- validate(sts)¶
Validate.
- Parameters
sts (list[
schrodinger.structure.Structure
]) – the structures
- reset()¶
Reset it.
- class schrodinger.application.matsci.reaction_workflow_gui_utils.UniformSequence(label, units, start_data, step_data, num_data, parent_layout=None)¶
Bases:
schrodinger.ui.qt.swidgets.SFrame
Manage a uniform sequence using three spin boxes.
- __init__(label, units, start_data, step_data, num_data, parent_layout=None)¶
Create an instance.
- Parameters
label (str) – the label
units (str) – the units
start_data (SequenceData) – the start data
step_data (SequenceData) – the step data
num_data (SequenceData) – the num data
parent_layout (QLayout) – the layout to which this widget will be added
- getValues()¶
Return a tuple of current values.
- Return type
tuple(float, float, int)
- Returns
a (start, step, num) tuple
- setEnabled(state)¶
Set the enabled state.
- Parameters
state (bool) – True if enabled
- reset()¶
Reset it.
- class schrodinger.application.matsci.reaction_workflow_gui_utils.QMPreOptimization(*args, **kwargs)¶
Bases:
schrodinger.ui.qt.swidgets.SGroupBox
Manage QM pre-optimization.
- __init__(*args, **kwargs)¶
Accepts all arguments normally given for a QGroupBox
- Parameters
layout_type (string) – Module constants VERTICAL, HORIZONTAL or GRID, for the type of internal layout
parent_layout (QBoxLayout) – The layout to place this SGroupBox into
checkable (bool) – Whether the groupbox is checkable, False by default
checked (bool) – Whether the groupbox should be checked if checkable. Default is True for checkable groupboxes.
tip (str) – The tooltip to apply to the group box
flat (bool) – whether to apply FlatStyle
command (function) – function to call when the checkbox emits a ‘clicked()’ signal
toggled_command (function) – function to call when the checkbox emits a ‘toggled()’ signal
- getCmd()¶
Return the command line options.
- Return type
list
- Returns
the command line options which are flags and values
- reset()¶
Reset it.
- class schrodinger.application.matsci.reaction_workflow_gui_utils.Jaguar(master, title, show_temp_and_press=True, **kwargs)¶
Bases:
schrodinger.ui.qt.swidgets.SGroupBox
Manage Jaguar options.
- __init__(master, title, show_temp_and_press=True, **kwargs)¶
Create an instance.
- Parameters
master (QtWidgets.QWidget) – the widget that this groupbox belongs to
title (str) – The title for the groupbox
show_temp_and_press (bool) – whether to show the temperature and pressure widgets
- getCmd()¶
Return the command line options.
- Return type
list
- Returns
the command line options which are flags and values
- reset()¶
Reset it.
- schrodinger.application.matsci.reaction_workflow_gui_utils.get_entries(error, included_entry=False)¶
Return either selected entries or the included entry from the Maestro project table provided that the entries have atoms.
- Parameters
error (function) – function to call on error
included_entry (bool) – if True then consider the included entry, if False then consider selected entries
- Return type
schrodinger.structure.Structure or list[schrodinger.structure.Structure] or None
- Returns
None if any of the entries is missing atoms otherwise a single entry when included_entry or list of entries by default
- class schrodinger.application.matsci.reaction_workflow_gui_utils.RGroupFileFrame(layout=None)¶
Bases:
schrodinger.ui.qt.swidgets.SFrame
Manage a widget for specifying R-group files.
- IMPORT_FILE_COL = 0¶
- FILE_NAME_COL = 1¶
- DIALOG_ID = 'IMPORT_RGROUP_FILE_ID'¶
- filesChanged¶
A
pyqtSignal
emitted by instances of the class.
- __init__(layout=None)¶
Create an instance.
- Parameters
layout (
QLayout
or None) – the layout to which this widget will be added or None if there isn’t one
- layOut()¶
Lay out the widgets.
- tableSelectionChanged()¶
React to a change in the table’s selection.
- deleteSelectedRows()¶
Delete the selected rows.
- addRow()¶
Add a row to the table.
- Return type
int
- Returns
the index of the added row
- isFileValid(path)¶
Check if the given R-group file is valid.
- Raises
rxnwfu.InvalidInput – if the file is not valid
- importFile(idx)¶
Import a file.
- Parameters
idx (int) – the index of the row for which to import the file
- rows()¶
Return row indices of the table.
- Return type
generator
- Returns
the row indices
- copyFiles(path='')¶
Copy the files.
- Parameters
path (str) – the path to which the files will be copied, if not provided will be the cwd
- Raises
RuntimeError – if the path is not valid
- getFileNames()¶
Return the file names.
- Return type
dict
- Returns
keys are row indices, values are the file names
- numberFiles()¶
Return the number of files.
- Return type
int
- Returns
the number of files
- reset()¶
Reset it.
- class schrodinger.application.matsci.reaction_workflow_gui_utils.Descriptor(*args, **kwargs)¶
Bases:
schrodinger.ui.qt.swidgets.SGroupBox
Manage a widget for calculating descriptors.
- BOLTZMANN = 'Boltzmann average'¶
- BOLTZMANN_TIP = '<nobr>Boltzmann average the descriptors over conformers </nobr>using the specified energy structure property and output the average on the lowest energy representative conformer.'¶
- LOWEST = 'Lowest energy'¶
- LOWEST_TIP = '<nobr>Only output descriptors for the lowest energy representative </nobr>conformer.'¶
- __init__(*args, **kwargs)¶
Create an instance.
- layOut()¶
Lay out the widgets.
- isValid()¶
Check if the energy property is valid.
- Return type
bool or (bool, str)
- Returns
The bool is True if everything is OK, False if not. str is given if a dialog should pop up to show the given message. If bool is True, str will post as Question dialog.
- getCmd()¶
Return the command line options.
- Return type
list
- Returns
the command line options which are flags and values
- reset()¶
Reset it.
- class schrodinger.application.matsci.reaction_workflow_gui_utils.ColorPairFrame(layout=None, first_text='', second_text='', first_default_color=(255, 165, 0), second_default_color=(0, 0, 255), command=None, tip='')¶
Bases:
schrodinger.ui.qt.swidgets.SFrame
Manage a widget for specifying a color pair.
- __init__(layout=None, first_text='', second_text='', first_default_color=(255, 165, 0), second_default_color=(0, 0, 255), command=None, tip='')¶
Create an instance.
- Parameters
layout (
QLayout
or None) – the layout to which this widget will be added or None if there isn’t onefirst_text (str) – the text for the first color button
second_text (str) – the text for the second color button
first_default_color (tuple) – the default color for the first color button as an RGB tuple
second_default_color (tuple) – the default color for the second color button as an RGB tuple
command (function or None) – slot for the color button’s clicked signal which takes two arguments, first and second, for the current RGB color tuples
tip (str) – the tooltip for this widget
- layOut(first_text='', second_text='', first_default_color=(255, 165, 0), second_default_color=(0, 0, 255), command=None, tip='')¶
Lay out the widgets.
- Parameters
first_text (str) – the text for the first color button
second_text (str) – the text for the second color button
first_default_color (tuple) – the default color for the first color button as an RGB tuple
second_default_color (tuple) – the default color for the second color button as an RGB tuple
command (function or None) – slot for the color button’s clicked signal which takes two arguments, first and second, for the current RGB color tuples
tip (str) – the tooltip for this widget
- reset()¶
Reset it.
- class schrodinger.application.matsci.reaction_workflow_gui_utils.WorkspaceSuperpositionFrame(layout=None, btn_text='Superpose', tip='', command=None, first_name='first', second_name='second')¶
Bases:
schrodinger.ui.qt.appframework2.maestro_callback.MaestroCallbackWidgetMixin
,schrodinger.ui.qt.swidgets.SFrame
Manage a widget for showing a pair of superposed structures in the Maestro workspace.
- __init__(layout=None, btn_text='Superpose', tip='', command=None, first_name='first', second_name='second')¶
Create an instance.
- Parameters
layout (
QLayout
or None) – the layout to which this widget will be added or None if there isn’t onebtn_text (str) – the text for superpose button
tip (str) – the tooltip for this widget
command (function or None) – slot for the superposition button’s clicked signal
first_name (str) – a name for identifying the first structure
second_name (str) – a name for identifying the second structure
- layOut(btn_text='', tip='', command=None)¶
Lay out the widgets.
- Parameters
btn_text (str) – the text for superpose button
tip (str) – the tooltip for this widget
command (function or None) – slot for the superposition button’s clicked signal
- isValid(first_st, first_idxs, second_st, second_idxs)¶
Validate it, return True if valid, (False, msg) otherwise.
- Parameters
first_st (
schrodinger.structure.Structure
) – the first structurefirst_idxs (list) – superposition indices for the first structure
second_st (
schrodinger.structure.Structure
) – the second structuresecond_idxs (list) – superposition indices for the second structure
- Return type
bool or pair tuple
- Returns
True if valid, (False, msg) otherwise
- static getProjectStructure(st)¶
Return the current project row structure for the given structure.
- Parameters
st (
schrodinger.structure.Structure
) – the structure- Return type
- Returns
the project row structure
- showSuperposed(first_st, first_idxs, second_st, second_idxs)¶
Show the superposed structures in the Maestro workspace.
- Parameters
first_st (
schrodinger.structure.Structure
) – the first structurefirst_idxs (list) – superposition indices for the first structure
second_st (
schrodinger.structure.Structure
) – the second structuresecond_idxs (list) – superposition indices for the second structure
- reset()¶
Reset it.
- class schrodinger.application.matsci.reaction_workflow_gui_utils.RateConstants(*args, **kwargs)¶
Bases:
schrodinger.ui.qt.swidgets.SGroupBox
Manage rate constants.
- STANDARD = 'Standard'¶
- STANDARD_TIP = '<nobr>Use this option to report the rate constant(s) </nobr>for the rate determining step(s) of the reaction using canonical transition state theory.'¶
- EXTENDED = 'Extended'¶
- EXTENDED_TIP = '<nobr>Use this option to report the rate constants using </nobr>a more extensive analysis that is based on transition state theory.'¶
- __init__(*args, **kwargs)¶
Accepts all arguments normally given for a QGroupBox
- Parameters
layout_type (string) – Module constants VERTICAL, HORIZONTAL or GRID, for the type of internal layout
parent_layout (QBoxLayout) – The layout to place this SGroupBox into
checkable (bool) – Whether the groupbox is checkable, False by default
checked (bool) – Whether the groupbox should be checked if checkable. Default is True for checkable groupboxes.
tip (str) – The tooltip to apply to the group box
flat (bool) – whether to apply FlatStyle
command (function) – function to call when the checkbox emits a ‘clicked()’ signal
toggled_command (function) – function to call when the checkbox emits a ‘toggled()’ signal
- getFlags()¶
Return command line flags.
- Raises
AssertionError – unknown option
- Return type
list
- Returns
command line flags
- reset()¶
Reset.
- class schrodinger.application.matsci.reaction_workflow_gui_utils.ReactionWorkflowFrame(layout=None)¶
Bases:
schrodinger.ui.qt.swidgets.SFrame
Manage a widget for reaction workflow options.
- __init__(layout=None)¶
Create an instance.
- Parameters
layout (
QLayout
or None) – the layout to which this widget will be added or None if there isn’t one
- layOut()¶
Lay out the widgets.
- getCmd(job_name=None)¶
Return the command line options.
- Parameters
job_name (str or None) – the job name if there is one
- Return type
list
- Returns
the command line options which are flags and values
- closeEvent(event)¶
React to a close event.
- Parameters
event (QtGui.QCloseEvent) – the event
- projectUpdated()¶
React to a change in the project.
- resetJMSWF()¶
Reset the JMSWF.
- reset()¶
Reset it.
- checkRxnWFStructures()¶
Check the reaction workflow structures.
- Return type
bool or (bool, str)
- Returns
The bool is True if everything is OK, False if not. str is given if a dialog should pop up to show the given message. If bool is True, str will post as Question dialog.