schrodinger.ui.qt.forcefield.controllers module

class schrodinger.ui.qt.forcefield.controllers.OPLSForcefieldController(opls_version_combo: schrodinger.ui.qt.mapperwidgets._comboboxes.MappableComboBox | schrodinger.ui.qt.mapperwidgets._comboboxes.MappableSelect, use_custom_checkbox: QAbstractButton, settings_button: QAbstractButton, *, parent: PyQt6.QtWidgets.QWidget | None = None, opls_dir_validator: OPLSValidator | None = None, allowed_opls_versions: Iterable[OPLSVersion] = (14, 17, 16))

Bases: TargetMixin, QObject

Manage OPLS state and synchronize caller-supplied controls.

The private state retains the configured directory and the explicit custom-mode toggle independently. Consumers see only the effective OPLSForcefield projection.

Variables:

forcefieldChanged – Emitted with the new effective force field.

forcefieldChanged

A pyqtSignal emitted by instances of the class.

settingsRequested

A pyqtSignal emitted by instances of the class.

DEFAULT_ALLOWED_OPLS_VERSIONS = (14, 17, 16)
__init__(opls_version_combo: schrodinger.ui.qt.mapperwidgets._comboboxes.MappableComboBox | schrodinger.ui.qt.mapperwidgets._comboboxes.MappableSelect, use_custom_checkbox: QAbstractButton, settings_button: QAbstractButton, *, parent: PyQt6.QtWidgets.QWidget | None = None, opls_dir_validator: OPLSValidator | None = None, allowed_opls_versions: Iterable[OPLSVersion] = (14, 17, 16)) → None
Parameters:

allowed_opls_versions – OPLS versions the user may select. By default, all supported versions are considered; versions without a license are omitted.

forcefield() → OPLSForcefield

Return the effective force field represented by the controls.

setForcefield(value: OPLSForcefield) → None

Set the effective force field and notify an owning mapper.

allowedOPLSVersions() → tuple[OPLSVersion, ...]
setAllowedOPLSVersions(versions: Iterable[OPLSVersion]) → None
usesCustomOPLS() → bool
setUseCustomOPLS(use_custom: bool) → None
getOPLSVersion() → OPLSVersion
getOPLSDir() → str | None

Return the effective OPLS directory, or None for standard OPLS.

syncMaestroPreferences() → None

Restore preference-backed state from the current preferences.

validate() → tuple[bool, str]
targetGetValue() → OPLSForcefield
targetSetValue(value: OPLSForcefield) → None