schrodinger.application.jaguar.gui.tabs.theory_tab module

class schrodinger.application.jaguar.gui.tabs.theory_tab.ExcitedStateInfo(excited_state, excited_state_mode, singlet, triplet)

Bases: tuple

excited_state

Alias for field number 0

excited_state_mode

Alias for field number 1

singlet

Alias for field number 2

triplet

Alias for field number 3

class schrodinger.application.jaguar.gui.tabs.theory_tab.TheoryTab(parent, input_selector=None)

Bases: schrodinger.application.jaguar.gui.tabs.base_tab.LoadsTheoryMixin, schrodinger.application.jaguar.gui.tabs.base_tab.BaseTab

A tab for selecting the level of theory.

Variables
  • spinTreatmentChanged (PyQt5.QtCore.pyqtSignal) – A signal emitted when the spin treatment changes. No arguments are emitted. Note that this signal is not emitted when the theory level changes from DFT to HF, even if that results in a change in the state of the spin unrestricted checkbox. The theory_level_changed signal will be emitted in those cases, however, and the state of the spin unrestricted checkbox can be queried via getSpinUnrestricted.

  • excited_state_changed (PyQt5.QtCore.pyqtSignal) – A signal emitted when the state of the ‘Excited state’ checkbox changes. No arguments are emitted. The state of the excited state checkbox can be queried via getExcitedState.

  • hamiltonianChanged (PyQt5.QtCore.pyqtSignal) – A signal emitted when the Hamiltonian changes. No arguments are emitted. The current Hamiltonian can be queried via getHamiltonian.

  • THEORY_INDICES (dict) – A dictionary of {index in the theory combo box: theory name}. Note that this combo box is populated in the ui file, so this dictionary must agree with the ui file.

  • THEORY_TO_INDEX (dict) – A dictionary of {theory name: index in the theory drop down} (i.e. the reverse of THEORY_INDICES)

  • CORE_LOCALIZATION_METHODS – An OrderedDict of {localization method: mmjag keyword value} used to populate the core localization combo box.

  • VALENCE_LOCALIZATION_METHODS (collections.OrderedDict) – An OrderedDict of {localization method: mmjag keyword value} used to populate the valence localization combo box.

  • RESONANCE – An OrderedDict of {resonance method: mmjag keyword value} used to populate the resonance combo box.

  • LMP2_KEYWORDS (frozenset) – A set of keywords that may only appear if the level of theory is LMP2. This set is used in loadSettings for validation purposes.

  • DFT_OR_HF_KEYWORDS (frozenset) – A set of keywords that may only appear if the level of theory is HF or DFT. This set is used in loadSettings for validation purposes.

  • DFT_GRID_KEYWORDS (frozenset) – A set of keywords that correspond to DFT grid density. This set is used in loadSettings for validation purposes.

  • DFT_ONLY_KEYWORDS (frozenset) – A set of keywords that may only appear if the level of theory is DFT. This set is used in loadSettings for validation purposes. Note that keywords in DFT_GRID_KEYWORDS do not need to be repeated here.

  • GRID_DENSITY (collections.OrderedDict) – An OrderedDict of {grid density name: (gdftmed value, gdftfine value, gdftgrad value)} used to populate the grid density combo box.

  • GRID_DENSITY_REV (collections.OrderedDict) – An OrderedDict of {(gdftmed value, gdftfine value, gdftgrad value): grid density name} (i.e. the reverse of GRID_DENSITY)

  • EXCITED_STATE_CB_TEXT (str) – Text that will be shown for the excited state check box.

NAME = 'Theory'
HELP_TOPIC = 'JAGUAR_TOPIC_THEORY_FOLDER'
UI_MODULES = (<module 'schrodinger.application.jaguar.gui.ui.theory_tab_ui' from '/scr/buildbot/savedbuilds/2024-3/NB/build-133/internal/lib/python3.11/site-packages/schrodinger/application/jaguar/gui/ui/theory_tab_ui.py'>,)
THEORY_COMBO_DFT = 0
THEORY_COMBO_HF = 1
THEORY_COMBO_LMP2 = 2
THEORY_COMBO_RIMP2 = 3
THEORY_INDICES = {0: 'DFT', 1: 'HF', 2: 'LMP2', 3: 'RI-MP2'}
THEORY_TO_INDEX = {'DFT': 0, 'HF': 1, 'LMP2': 2, 'RI-MP2': 3}
CORE_LOCALIZATION_METHODS = {'Boys': 1, 'None': 0, 'Pipek-Mezey': 2, 'Pipek-Mezey (alt)': 3}
VALENCE_LOCALIZATION_METHODS = {'Boys': 1, 'Pipek-Mezey': 2, 'Pipek-Mezey (alt)': 3}
RESONANCE = {'Full delocalization': 2, 'None': 0, 'Partial delocalization': 1}
LMP2_KEYWORDS = frozenset({'iheter', 'ireson', 'loclmp2c', 'loclmp2v', 'mp2'})
DFT_OR_HF_KEYWORDS = frozenset({'icis', 'iuhf', 'maxciit', 'nroot'})
DFT_GRID_KEYWORDS = frozenset({'gdftfine', 'gdftgrad', 'gdftmed'})
DFT_ONLY_KEYWORDS = frozenset({'dftname', 'idft'})
GRID_DENSITY = {'Fine': (-13, -13, -13), 'Maximum': (-14, -14, -14), 'Medium': (-10, -11, -12)}
GRID_DENSITY_REV = {(-14, -14, -14): 'Maximum', (-13, -13, -13): 'Fine', (-10, -11, -12): 'Medium'}
EXCITED_STATE_TYPES = {'Singlet': (1, 0), 'Singlet & Triplet': (1, 1), 'Triplet': (0, 1)}
HAMILTONIAN = {'Nonrelativistic': '', 'Scalar ZORA (relativistic)': 'zora-1c'}
EXCITED_STATE_CB_TEXT = 'Excited state (TDDFT)'
spinTreatmentChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

excited_state_changed

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

hamiltonianChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

setup()

Perform tab specific initialization. This function should be defined in subclasses if initialization is needed.

getSpinTreatment(theory_level)

Return whether spin unrestricted check box is checked or not

param theory_level

Theory level to get spin treatment for.

type theory_level

str

Returns

The appropriate spin treatment for the specified theory level. :rtype: bool or NoneType

getExcitedState()

Return whether excited state check box is checked or not

Returns

If DFT or HF is currently selected, returns ExcitedStateInfo object that contains the state of the excited state checkbox, excited state mode (ITDA) and whether excited state type ‘Singlet’ is selected. If LMP2 is currently selected (which has no spin unrestricted check box), ExcitedStateInfo values are None.

Return type

ExcitedStateInfo

getTheoryLevel()

Return the current theory level being used for tab settings.

Returns

The current theory level

Return type

str

setTheoryLevel(theory_level)

Set the current level of theory.

Parameters

theory_level (str) – Level of theory to be set. Should be one of THEORY_DFT, THEORY_HF, THEORY_LMP2 or THEORY_RIMP2

getHamiltonian()

Return the current Hamiltonian setting

Returns

The current Hamiltonian setting

Return type

str

getMmJagKeywords(theory_level=None)

Return a dictionary of Jaguar keywords.

Parameters

theory_level (str) – Theory level to get the keywords for. If not specified, settings will be returned for the current theory_combo selection.

loadSettings(jag_input)

Restore tab settings from mmjag keywords. This function should be defined in subclasses.

Parameters

jag_input (schrodinger.application.jaguar.input.JaguarInput) – The Jaguar settings to base the tab settings on

class schrodinger.application.jaguar.gui.tabs.theory_tab.ProvidesTheoryTheoryTab(parent, input_selector=None)

Bases: schrodinger.application.jaguar.gui.tabs.base_tab.ProvidesTheoryMixin, schrodinger.application.jaguar.gui.tabs.theory_tab.TheoryTab

A theory tab that sets theory level/method in addition to theory settings.

setup()

Perform tab specific initialization. This function should be defined in subclasses if initialization is needed.

getDefaultKeywords()

The mmjag default DFT functional name is “”, which would cause a HF level of theory. Instead, set a default functional of B3LYP-D3.

Returns

Dictionary of default keywords for this tab.

Return type

dict

loadSettings(jag_input)

Restore tab settings from mmjag keywords. This function should be defined in subclasses.

Parameters

jag_input (schrodinger.application.jaguar.input.JaguarInput) – The Jaguar settings to base the tab settings on

getMmJagKeywords()

Return a dictionary of Jaguar keywords.

Parameters

theory_level (str) – Theory level to get the keywords for. If not specified, settings will be returned for the current theory_combo selection.

getTheoryLevel()

Get the current theory level

Returns

The current theory level. Will be one of: “DFT”, “HF”, “LMP2”, “RIMP2” or “Mixed”

Return type

str

getAllUsedTheoryLevels()
Returns

A tuple of all theory levels used

Return type

tuple

getTheoryLevelForEid(eid)

Return the theory level set for the specified entry ID.

Parameters

eid (int) – Entry ID to get theory level for.

Returns

The theory level set for this entry ID.

Return type

str

getMethodForEid(eid)

Return the method set for the specified entry ID.

Parameters

eid (int) – Entry ID to get the method for

Returns

Method for this entry ID

Return type

str

getCommonMethod()
Returns

If all entries have the same method set, return the method. Otherwise return None

Return type

str or None

getCommonTheoryLevel()
Returns

If all entries have the same theory level set, return the theory. level Otherwise return None

Return type

str or None

class schrodinger.application.jaguar.gui.tabs.theory_tab.ProvidesTheoryTheoryTabNoSoZora(parent, input_selector=None)

Bases: schrodinger.application.jaguar.gui.tabs.theory_tab.ProvidesTheoryTheoryTab

A ProvidesTheoryTheoryTab that removes the Spin-orbit ZORA option.

HAMILTONIAN = {'Nonrelativistic': '', 'Scalar ZORA (relativistic)': 'zora-1c'}
class schrodinger.application.jaguar.gui.tabs.theory_tab.TheoryTabNoSoZora(parent, input_selector=None)

Bases: schrodinger.application.jaguar.gui.tabs.theory_tab.TheoryTab

A theory tab that removes the Spin-orbit ZORA option. Used for panels involving optimizations.

HAMILTONIAN = {'Nonrelativistic': '', 'Scalar ZORA (relativistic)': 'zora-1c'}
class schrodinger.application.jaguar.gui.tabs.theory_tab.TheoryTabOptimization(parent, input_selector=None)

Bases: schrodinger.application.jaguar.gui.tabs.theory_tab.TheoryTabNoSoZora

This tab is used for ‘Optimization’ task.

EXCITED_STATE_TYPES = {'Singlet': (1, 0), 'Triplet': (0, 1)}
EXCITED_STATE_CB_TEXT = 'Optimize first excited state (TDDFT)'
class schrodinger.application.jaguar.gui.tabs.theory_tab.TheoryTabWithSoZora(parent, input_selector=None)

Bases: schrodinger.application.jaguar.gui.tabs.theory_tab.TheoryTab

A theory tab that includes Spin-orbit ZORA option. Used for Single Point Energy panel only!

HAMILTONIAN = {'Nonrelativistic': '', 'Scalar ZORA (relativistic)': 'zora-1c', 'Spin-orbit ZORA (relativistic)': 'zora-2c'}
class schrodinger.application.jaguar.gui.tabs.theory_tab.ComboRadioSelector(category_dict, parent=None)

Bases: PyQt6.QtWidgets.QWidget

This is compound widget for selecting categorized choices. The categories are presented in a combo box, and the choices are shown below as a set of radio buttons that is dynamically generated every time the category is changed.

When a category is selected, the previous choice for that category is remembered and re-selected.

The choiceChanged signal is emitted any time the current choice is changed. This includes when the category combo is changed by the user and when the current choice is changed programmatically via the setCurrentChoice() method.

choiceChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

__init__(category_dict, parent=None)

Initializes the widget with source data.

Parameters

category_dict (dict of str mapped to list of str) – a dictionary mapping category name to a list of strings representing all the choices for that category. To specify an ordering for categories in the combobox, use an OrderedDict.

setData(category_dict)

Set the source data for this widget. See the constructor documentation for details on the category_dict argument.

onCategoryChanged(index)

Responds to changes in the combobox selection by updating radio buttons with the choices for the selected category.

Parameters

index (int) – index of selected category in combobox.

currentChoice()

Returns the currently selected choice as a string.

setCurrentChoice(choice)

Sets the currently selected choice, changing the category if necessary. If a choice appears in more than one category, the first occurrence will be selected.

Parameters

choice (str) – the choice to be selected in upper case

currentCategory()

Returns the currently selected category.

class schrodinger.application.jaguar.gui.tabs.theory_tab.DFTComboRadioSelector(category_dict, parent=None)

Bases: schrodinger.application.jaguar.gui.tabs.theory_tab.ComboRadioSelector

Customized ComboRadioSelector which adds on the radio button for enabling and disabling the combobox and radio buttons.

__init__(category_dict, parent=None)

Initializes the widget with source data.

Parameters

category_dict (dict of str mapped to list of str) – a dictionary mapping category name to a list of strings representing all the choices for that category. To specify an ordering for categories in the combobox, use an OrderedDict.

setSelectorEnabled(state=True)

Overrides the parent method because we don’t want to disable the radio button itself when it gets de-selected.