schrodinger.application.jaguar.gui.tabs.optimization_tab module

class schrodinger.application.jaguar.gui.tabs.optimization_tab.OptimizationTab(parent, input_selector=None)

Bases: schrodinger.application.jaguar.gui.tabs.coordinates.CoordinateTab

NAME = 'Optimization'
UI_MODULES = (<module 'schrodinger.application.jaguar.gui.ui.optimization_tab_ui' from '/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/application/jaguar/gui/ui/optimization_tab_ui.py'>,)
HELP_TOPIC = 'JAGUAR_TOPIC_OPTIMIZATION_FOLDER'
CONVERGENCE_CRITERIA = {'Custom': 6, 'Default': 2, 'Loose': 3, 'Tight': 5}
INITIAL_HESSIAN = {'Fischer-Almlof guess': -1, 'Quantum-mechanical': 4, 'Schlegel guess': 0, 'Unit Hessian': 1}
COORDINATE_OPTS = {'Cartesian': 0, 'Redundant internal': 1, 'Z-matrix': 2}
ALL_CONSTRAINTS_BUTTON = {0: (True, 'Add Selected Atoms'), 1: (True, 'Add Selected Atoms'), 2: (True, 'Add Selected Atoms'), 3: (True, 'Add Selected Atoms'), 4: (True, 'Add All Atom Pairs'), 5: (True, 'Add All Bond Angles'), 6: (True, 'Add All Torsions')}
SETS_IACCG_CUSTOM = True
setup()

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

getMmJagKeywords()

This function returns dictionary of mmjag keywords for this tab. Since this tab does not set any keywords it returns an empty dictionary.

Returns

mmjag keywords dictionary

Return type

dict

getConvergenceKeywords()

Get keywords from convergence criteria widgets.

Returns

A dictionary of keywords

Return type

dict

loadSettings(jag_input)

Restore scan coordinates settings from Jaguar handle.

Parameters

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

loadConvergenceKeywords(jag_input)

Load the convergence criteria settings.

Parameters

jag_input (schrodinger.application.jaguar.input.JaguarInput) – The Jaguar settings to load.

loadConstraintCoordinates(jag_input)

Load constraint coordinates from Jaguar handle.

Parameters

jag_input (schrodinger.application.jaguar.input.JaguarInput) – The Jaguar handle where tab settings are saved.

saveSettings(jag_input, eid=None)

Save constraint coordinate settings in jaguar handle.

See parent class for argument documentation

deleteCurrentRow()

This function is called to delete row which is currently selected from the coordinates table.

deleteAllRows()

This function is called to delete all rows from the coordinates table.

addCoordinate(st, atoms, coordinate_type, target_value=None)

Add new coordinate row.

Parameters
  • st (schrodinger.structure.Structure) – structure

  • atoms (list) – atom indices

  • coordinate_type (int) – coordinate type

  • target_value (float) – target coordinate value

convergenceTypeChanged(index)

This function is called when convergence type is changed. If ‘Custom’ is selected extra options frame is shown. Otherwise, it is hidden.

Parameters

index (int) – convergence type combo box index

pickCompleted(atoms)

This slot is called when required number of atoms for the current coordinate type has been picked.

Parameters

atoms (list) – list of atom indices

updateAllConstraintsPB()

This function is called when coordinate type is changed to update text and visibility of the button that adds all constraints.

addConsButtonPressed()

This function is called when ‘add all constraints/add selected atoms’ button is clicked. It determines current coordinate type and calls appropriate function to add all/selected constraints.

getAllAtomPairs(st)

This function returns a list of all possible atom pairs in a given structure.

Parameters

st (schrodinger.structure.Structure) – structure

Returns

list that contains pairs of atom indices

Return type

list

getAllAngles(st)

This function returns list that contains lists of atoms for each bond angle in a given structure.

Parameters

st (schrodinger.structure.Structure) – structure

Returns

list that contains lists of atom indices for each bond angle

Return type

list

getAllTorsions(st)

This function returns list that contains lists of atoms for each torsion angle in a given structure.

Parameters

st (schrodinger.structure.Structure) – structure

Returns

list that contains lists of atom indices for each torsion

Return type

list

class schrodinger.application.jaguar.gui.tabs.optimization_tab.ConstraintCoordinateColumns

Bases: object

Constants for table columns.

NAMES = ('Atom Indices', 'Coordinate', 'Type', 'Target Value')
NUM_COLS = 4
INDICES = 0
COORD_NAME = 1
COORD_TYPE = 2
TARGET_VAL = 3
class schrodinger.application.jaguar.gui.tabs.optimization_tab.ConstraintCoordinateData(st, atoms, coordinate_type, target_value=None)

Bases: schrodinger.application.jaguar.gui.tabs.coordinates.CoordinateData

This class stores all data for a single constraint coordinate.

Variables
  • st (schrodinger.structure.Structure) – ct structure for which coordinates are defined

  • atom_indices (list) – indices of atoms, which define this coordinate

  • coordinate_name (str) – name of this coordinate based on atom indices

  • coordinate_type (int) – coordinate type

  • target_value (float) – target value of this coordinate

__init__(st, atoms, coordinate_type, target_value=None)

Initialize coordinates data given a structure, set of atom indices and coordinate type.

Parameters
  • st (schrodinger.structure.Structure) – structure

  • atoms (list) – atom indices

  • coordinate_type (int) – coordinate type

  • target_value (float) – target coordinate value

class schrodinger.application.jaguar.gui.tabs.optimization_tab.ConstraintCoordinatesDelegate

Bases: PyQt6.QtWidgets.QItemDelegate

This delegate is used to validate values entered in ‘target value’ column.

COLUMN = <schrodinger.application.jaguar.gui.tabs.optimization_tab.ConstraintCoordinateColumns object>
createEditor(parent, option, index)

This function returns an editor widget (QLineEdit) for ‘target value’ column.

Parameters
  • parent (QtWidgets.QWidget) – parent widget

  • option (QtWidgets.QStyleOptionViewItem) – not used, but kept for compatibility

  • index (QtCore.QModelIndex) – model index

Returns

QLineEdit editor widget

Return type

QtWidgets.QLineEdit

setEditorData(editor, index)

This function read data from model, converts it to text and sets it in the editor widget.

Parameters
  • editor (QtWidgets.QLineEdit) – editor widget

  • index (QtCore.QModelIndex) – model index

setModelData(editor, model, index)

This function reads text from QLineEdit and writes it to the model

Parameters
  • editor (QtWidgets.QLineEdit) – editor widget

  • model (QtCore.QAbstractItemModel) – data model

  • index (QtCore.QModelIndex) – model index

class schrodinger.application.jaguar.gui.tabs.optimization_tab.ConstraintCoordinatesProxyModel(parent)

Bases: PyQt6.QtCore.QSortFilterProxyModel

A proxy model that allows to hide columns.

COLUMN = <schrodinger.application.jaguar.gui.tabs.optimization_tab.ConstraintCoordinateColumns object>
__init__(parent)
filterAcceptsColumn(column, index)

Modified from the parent class to define columns that should be visible.

Parameters
  • column (int) – the column index

  • index (QModelIndex) – Unused, but kept for PyQt compatibility

class schrodinger.application.jaguar.gui.tabs.optimization_tab.ConstraintCoordinatesModel(parent=None)

Bases: schrodinger.application.jaguar.gui.tabs.coordinates.CoordinatesModel

A model to store scan tab coordinates data.

COLUMN = <schrodinger.application.jaguar.gui.tabs.optimization_tab.ConstraintCoordinateColumns object>
addCoordinate(st, atoms, coordinate_type, target_value=None)

Add new coordinate row.

Parameters
  • st (schrodinger.structure.Structure) – structure

  • atoms (list) – atom indices

  • coordinate_type (int) – coordinate type

  • target_value (float) – target coordinate value

appendFromModel(model)

Append the rows in the given model to this model

Type

ConstraintCoordinatesModel

Param

The model to append rows from

flags(index)

Returns flags for the specified cell. Whether it is editable or not.

Parameters

index (PyQt5.QtCore.QModelIndex) – The index to retrieve flags for.

data(index, role=ItemDataRole.DisplayRole)

Retrieve the requested data

Parameters
  • index (PyQt5.QtCore.QModelIndex) – The index to retrieve data for

  • role (int) – The role to retrieve data for

Returns

The requested data

setData(index, value, role=ItemDataRole.EditRole)

Modify coordinate values.

Parameters
  • index (QtCore.QModelIndex) – the index of table cell

  • value (str) – new value

  • role (int) – The role to set data for.

class schrodinger.application.jaguar.gui.tabs.optimization_tab.ActiveOptimizationTab(parent, input_selector=None)

Bases: schrodinger.application.jaguar.gui.tabs.optimization_tab.OptimizationTab

Tab used in place of optimization tab in Transition State Search panel

Variables

activeConstraintsToggled (PyQt5.QtCore.pyqtSignal) – A signal emitted when the active constraints check box is toggled

activeConstraintsToggled

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()

Setup UI elements

saveSettings(jag_input, eid=None)

Save per-atom settings to Jaguar input.

Parameters
loadConstraintCoordinates(jag_input)

Load constraint coordinates from Jaguar handle.

Parameters

jag_input (schrodinger.application.jaguar.input.JaguarInput) – The Jaguar handle where tab settings are saved.

enableActiveChkIfConstraintsAdded()

Enable the active constraints check box if there are constraints added to the list or disable it if there are not.

addCoordinate(st, atoms, coordinate_type, target_value=None)

Add a coordinate and enable active checkbox if successfully added

deleteAllRows()

Delete all constraint rows and disable active checkbox

deleteCurrentRow()

Delete current row and disable active checkbox if no more rows remain

onSearchMethodChanged(method_id)

Enable or disable active constraints toggle depending on the search method selection in the Transition State tab.

Parameters

method_id (int) – button id corresponding to a search method selected in the Transition State tab.

class schrodinger.application.jaguar.gui.tabs.optimization_tab.NoCustomIACCGOptimizationTab(parent, input_selector=None)

Bases: schrodinger.application.jaguar.gui.tabs.optimization_tab.OptimizationTab

Subclass of OptimizationTab that does not set the iaccg keyword

SETS_IACCG_CUSTOM = False