schrodinger.application.models.datamodels.definition2 module

class schrodinger.application.models.datamodels.definition2.SettingBinding(*args, _param_type=<object object>, **kwargs)

Bases: CompoundParam

A setting value and constraint, used in both model definitions and model configurations.

Variables:

name – The name of this setting. Should match exactly with a field name from a transform’s pydantic config class. The name should be considered immutable after construction.

name: str

A parameter of the class.

value: str

A parameter of the class.

child_constraint: ChildConstraint

A parameter of the class.

child_constraintChanged

A pyqtSignal emitted by instances of the class.

child_constraintReplaced

A pyqtSignal emitted by instances of the class.

nameChanged

A pyqtSignal emitted by instances of the class.

nameReplaced

A pyqtSignal emitted by instances of the class.

valueChanged

A pyqtSignal emitted by instances of the class.

valueReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.application.models.datamodels.definition2.TransformBinding(*args, _param_type=<object object>, **kwargs)

Bases: CompoundParam

Variables:
  • name – The name of this transform. Should match exactly with a transform in the transform catalog. Treat as read-only after construction — renaming is detected and blocked at the ModelConfiguration level.

  • settings – The specification for which transform settings can be overridden by a model.

name: str

A parameter of the class.

settings: list[SettingBinding]

A parameter of the class.

getSettingByName(setting_name: str) → SettingBinding
Raises:

KeyError – if no setting with the given name exists.

getSpec() → TransformSpec

Look up the full read-only TransformSpec from the YAML transform catalog.

getSettingSpec(setting_name: str) → SettingSpec

Return the catalog specification for a setting.

Raises:

KeyError – if the transform is not in the catalog or the setting is not found in the spec.

getFileSettingNames() → set[str]

Return the names of settings whose catalog type is a file path.

nameChanged

A pyqtSignal emitted by instances of the class.

nameReplaced

A pyqtSignal emitted by instances of the class.

settingsChanged

A pyqtSignal emitted by instances of the class.

settingsReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.application.models.datamodels.definition2.ModelInterface

Bases: object

Interface for model classes that hold transforms and metadata.

metadata: ModelMetadata
transforms: list[TransformBinding]
getId() → str
getVersion() → str
getSetting(xform_name: str, setting_name: str) → SettingBinding
Raises:

KeyError – if the transform or setting is not found.

getFileSettings() → list[SettingBinding]

Return explicitly stored file settings on this model layer.

class schrodinger.application.models.datamodels.definition2.ModelDefinition(*args, _param_type=<object object>, **kwargs)

Bases: ModelInterface, CompoundParam

mmshare_version: int

A parameter of the class.

metadata: ModelMetadata

A parameter of the class.

__init__(source_def: Optional[Self] = None, **kwargs: Any)
is_built_in: bool

A parameter of the class.

is_built_inChanged

A pyqtSignal emitted by instances of the class.

is_built_inReplaced

A pyqtSignal emitted by instances of the class.

metadataChanged

A pyqtSignal emitted by instances of the class.

metadataReplaced

A pyqtSignal emitted by instances of the class.

mmshare_versionChanged

A pyqtSignal emitted by instances of the class.

mmshare_versionReplaced

A pyqtSignal emitted by instances of the class.

transformsChanged

A pyqtSignal emitted by instances of the class.

transformsReplaced

A pyqtSignal emitted by instances of the class.

transforms: list[TransformBinding]

A parameter of the class.