schrodinger.application.models.datamodels.configuration module

Classes to represent a LiveDesign model configuration i.e. a set of values and inheritance rules corresponding to a model definition.

Many of these classes inherit CompoundParam, which is built upon QtCore.QObject. CompoundParam implements features such as serialization, versioning adapters, and Qt signals. As such, it’s a useful base class for data classes.

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

Bases: CompoundParam

A difference in constraints for an given input between two model instances.

Variables:
  • input_name – The name of the input whose constraint has changed.

  • old_constraint – The previous constraint.

  • new_constraint – The new constraint.

input_name: str

A parameter of the class.

old_constraint: ChildConstraint

A parameter of the class.

new_constraint: ChildConstraint

A parameter of the class.

input_nameChanged

A pyqtSignal emitted by instances of the class.

input_nameReplaced

A pyqtSignal emitted by instances of the class.

new_constraintChanged

A pyqtSignal emitted by instances of the class.

new_constraintReplaced

A pyqtSignal emitted by instances of the class.

old_constraintChanged

A pyqtSignal emitted by instances of the class.

old_constraintReplaced

A pyqtSignal emitted by instances of the class.

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

Bases: InputInterface, CompoundParam

name: str

A parameter of the class.

val: str

A parameter of the class.

child_constraint: ChildConstraint

A parameter of the class.

getValue()
getConstraint()
applyConstraint(constraint: ChildConstraint) None

Set the child constraint based on an ancestor configuration. May also modify the value.

Parameters:

constraint – The new constraint to apply.

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.

valChanged

A pyqtSignal emitted by instances of the class.

valReplaced

A pyqtSignal emitted by instances of the class.

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

Bases: ModelInterface, CompoundParam

Variables:
  • definition_id – The ID of the model definition on which this configuration is based.

  • config_id – The ID of this model configuration.

  • parent_config_id – The ID of the parent model configuration, if this configuration is a child. None if this is the root configuration.

  • metadata – Metadata for this model configuration.

  • auto_recalculate – Whether or not this model configuration should automatically recalculate when versions change.

  • settings – The settings for this model configuration.

definition_id: str

A parameter of the class.

parent_config_id: str

A parameter of the class.

metadata: ModelMetadata

A parameter of the class.

auto_recalculate: bool

A parameter of the class.

inputs: list[InputConfig]

A parameter of the class.

getConstraintDiffs(other: Self) list[ConstraintDiff]
auto_recalculateChanged

A pyqtSignal emitted by instances of the class.

auto_recalculateReplaced

A pyqtSignal emitted by instances of the class.

definition_idChanged

A pyqtSignal emitted by instances of the class.

definition_idReplaced

A pyqtSignal emitted by instances of the class.

inputsChanged

A pyqtSignal emitted by instances of the class.

inputsReplaced

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.

parent_config_idChanged

A pyqtSignal emitted by instances of the class.

parent_config_idReplaced

A pyqtSignal emitted by instances of the class.