schrodinger.ui.qt.forcefield.panelx_opls_forcefield_selector module

class schrodinger.ui.qt.forcefield.panelx_opls_forcefield_selector.PanelXOPLSForcefieldSelector(*args, **kwargs)

Bases: MetalsForcefieldMixin, TargetMixin, BaseWidget

PanelX widget for selecting an OPLS force field.

initSetUp() → None

Creates widget from ui and stores it ui_widget.

Suggested subclass use: create and initialize subwidgets, and connect signals.

initLayOut() → None

Create a vertical layout for the widget (widget_layout) and populate it with two vertical sub-layouts: main_layout and bottom_layout.

If the user has specified the ui data member, insert the resultant ui_widget into main_layout.

If the widget already has a layout defined, this method will produce a warning (but not a traceback). main_layout and bottom_layout will be inserted into the existing widget layout, which will not be the same as widget_layout. It is therefore recommended that this mixin is used only with widgets that do not already have a layout.

Suggested subclass use: create, initialize, and populate layouts.

initSetDefaults() → None

Set widget to its default state. If the widget uses a model/mapper, it’s preferable to reset the widget state by resetting the model.

initFinalize() → None

Suggested subclass use: perform any remaining initialization.

setAllowedOPLSVersions(versions: Iterable[OPLSVersion]) → None
syncMaestroPreferences() → None
validate() → tuple[bool, str]
getOPLSVersion() → int

Get the selected OPLS version.

Returns:

The selected OPLS version.

Raises:

NotImplementedError – This method must be implemented by subclasses.

getActiveCustomOplsDir() → str | None

Return the custom OPLS directory currently in use by the force field selector, or None if no custom OPLS directory is actively in use.

Subclasses must override this method. The returned value is used by the metals force field analysis to determine whether to pass a custom OPLS directory to the analysis script.

Returns:

Path to the custom OPLS directory, or None.

Raises:

NotImplementedError – Must be implemented by subclasses.

targetGetValue() → OPLSForcefield
targetSetValue(value: OPLSForcefield) → None