schrodinger.application.models.datamodels.definition module

Classes to represent a LiveDesign model definition i.e. the parameters intrinsic to a model such as the logic a model will run, the number and type of inputs and outputs, etc.

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.definition.InputType

Bases: JsonableEnum

STRING = 'STRING'
INTEGER = 'INTEGER'
FLOAT = 'FLOAT'
BOOLEAN = 'BOOLEAN'
FILE = 'FILE'
ENTITY = 'ENTITY'
STRUCTURE = 'STRUCTURE'
class schrodinger.application.models.datamodels.definition.OutputType

Bases: JsonableEnum

STRING = 'STRING'
INTEGER = 'INTEGER'
FLOAT = 'FLOAT'
BOOLEAN = 'BOOLEAN'
FILE = 'FILE'
STRUCTURE = 'STRUCTURE'
class schrodinger.application.models.datamodels.definition.ExecutionMode

Bases: JsonableEnum

How to execute the model logic

IN_PROCESS = 'IN-PROCESS'
LOCAL_JOB = 'LOCAL-JOB'
REMOTE_JOB = 'REMOTE-JOB'
class schrodinger.application.models.datamodels.definition.LogicType

Bases: JsonableEnum

PYTHON_SCRIPT = 'PYTHON-SCRIPT'
BEAM_PIPELINE_STR = 'BEAM-YAML-STR'
PYTHON_MAP_FUNC = 'PYTHON-MAP-FUNC'
class schrodinger.application.models.datamodels.definition.Logic(*args, _param_type=<object object>, **kwargs)

Bases: CompoundParam

Information about the logic that the model runs.

Variables:
  • logic_type – The type of logic (e.g., Python script, Beam YAML).

  • is_built_in – Whether ot not the logic is stored in the mmshare repo.

  • version – The version of the logic.

  • content – Can be the path to a logic file or a beam yaml string. If it’s a path, the base dir may be determined by factors such as the logic type and whether it is built-in or not.

logic_type: LogicType

A parameter of the class.

is_built_in: bool

A parameter of the class.

version: int

A parameter of the class.

content: str

A parameter of the class.

contentChanged

A pyqtSignal emitted by instances of the class.

contentReplaced

A pyqtSignal emitted by instances 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.

logic_typeChanged

A pyqtSignal emitted by instances of the class.

logic_typeReplaced

A pyqtSignal emitted by instances of the class.

versionChanged

A pyqtSignal emitted by instances of the class.

versionReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.application.models.datamodels.definition.ChildConstraint

Bases: JsonableEnum

The constraint for static inputs (i.e. non-column inputs) on child configurations. Higher number corresponds to more restrictive constraints.

  • OVERRIDABLE: This var has a value that will be inherited by the child,

    and the child may override it.

  • FIXED: This var has a value that will be inherited by all children.

  • HIDDEN: Same as FIXED, but is hidden from the user.

OVERRIDABLE = 0
FIXED = 1
HIDDEN = 2
class schrodinger.application.models.datamodels.definition.InputInterface

Bases: object

name: str
getValue() str
getConstraint() ChildConstraint
hasMatchingConstraint(other: Self) bool
class schrodinger.application.models.datamodels.definition.InputDef(*args, _param_type=<object object>, **kwargs)

Bases: InputInterface, CompoundParam

Parameters:
  • name – The internal input name.

  • display_name – The user-facing display name.

  • docstring – A description of the input.

  • default_val – The default value for the input.

  • type – The type of the input.

  • is_column – Whether the input should come from a LiveDesign column.

name: str

A parameter of the class.

display_name: str

A parameter of the class.

docstring: str

A parameter of the class.

default_val: str

A parameter of the class.

type: InputType

A parameter of the class.

is_column: bool

A parameter of the class.

getValue() str
getConstraint() ChildConstraint
default_valChanged

A pyqtSignal emitted by instances of the class.

default_valReplaced

A pyqtSignal emitted by instances of the class.

display_nameChanged

A pyqtSignal emitted by instances of the class.

display_nameReplaced

A pyqtSignal emitted by instances of the class.

docstringChanged

A pyqtSignal emitted by instances of the class.

docstringReplaced

A pyqtSignal emitted by instances of the class.

is_columnChanged

A pyqtSignal emitted by instances of the class.

is_columnReplaced

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.

typeChanged

A pyqtSignal emitted by instances of the class.

typeReplaced

A pyqtSignal emitted by instances of the class.

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

Bases: CompoundParam

Parameters:
  • name – The internal output name (also column header in the results.csv file).

  • display_name – The user-facing display name.

  • docstring – A description of the output.

  • type – The type of the output.

name: str

A parameter of the class.

docstring: str

A parameter of the class.

display_name: str

A parameter of the class.

type: OutputType

A parameter of the class.

display_nameChanged

A pyqtSignal emitted by instances of the class.

display_nameReplaced

A pyqtSignal emitted by instances of the class.

docstringChanged

A pyqtSignal emitted by instances of the class.

docstringReplaced

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.

typeChanged

A pyqtSignal emitted by instances of the class.

typeReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.application.models.datamodels.definition.ModelInterface

Bases: object

metadata: ModelMetadata
inputs: list[InputInterface]
getId() str
getVersion() str
getInputByName(name: str) InputInterface

Return the input with the given name.

Raises:

KeyError – If no input with the given name exists in the model.

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

Bases: ModelInterface, CompoundParam

execution_mode: ExecutionMode

A parameter of the class.

logic: Logic

A parameter of the class.

metadata: ModelMetadata

A parameter of the class.

inputs: list[InputDef]

A parameter of the class.

outputs: list[OutputDef]

A parameter of the class.

execution_modeChanged

A pyqtSignal emitted by instances of the class.

execution_modeReplaced

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.

logicChanged

A pyqtSignal emitted by instances of the class.

logicReplaced

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.

outputsChanged

A pyqtSignal emitted by instances of the class.

outputsReplaced

A pyqtSignal emitted by instances of the class.