schrodinger.application.steps.filters module

Filter steps that take input Mols and only outputs Mols that meet certain criteria.

NOTE::

You can import UniqueSmilesFilter from this module, which will either be InMemoryUniqueSmilesFilter or BQDedupeChain (which will filter using BigQuery) depending on whether you have the environment variable SCHRODINGER_GCP_KEY defined.

You can generally use UniqueSmilesFilter for your workflows and users will define SCHRODINGER_GCP_KEY as needed when they scale higher, but if you know a part of your workflow will be low-volume then it would be better to use InMemoryUniqueSmilesFilter instead.

All of the above also applies to RandomSampleFilter, which also has an in-memory and bigquery variant.

class schrodinger.application.steps.filters.InMemoryUniqueRandomSampleFilter(*args, **kwargs)

Bases: schrodinger.stepper.stepper.Chain

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

n: int

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
seed: int

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
nChanged
nReplaced
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
seedChanged
seedReplaced
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
buildChain()

This method must be implemented by subclasses to build the chain. The chain is built by modifying self.steps. The chain’s composition may be dependent on self.settings.

property Input
property InputSerializer

The default serializer that simply uses json.loads and json.dumps

property Output
property OutputSerializer

The default serializer that simply uses json.loads and json.dumps

__init__(*args, **kwargs)

See class docstring for info on the different constructor arguments.

__len__()
addStep(step)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings for the chain as well as for every step in the chain that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the workflow steps and their settings (recursively).

Parameters

prefix (str) – the text to start each line with

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(input_file: str, starting_step_id: Optional[str] = None)

Set the input file for the chain. If starting_step_id is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.

setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(inputs: Iterable[Any], starting_step_id: Optional[str] = None)

Set the inputs for the chain. If starting_step_id is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.

setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setStartingStep(starting_step: str)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
validateChain()

Checks that the declaration of the chain is internally consistent - i.e. that each step is valid and each step’s Input class matches the preceding step’s Output class.

validateSettings()

Check whether the chain settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation simply returns problems from all child steps.

Return type

list[TaskError or TaskWarning]

writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.InMemoryUniqueSmilesFilter(*args, **kwargs)

Bases: schrodinger.application.steps.basesteps.MolReduceStep

Only allow molecules through whose canonical SMILES was not previously encountered.

reduceFunction(mols)

The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.

Example:

def reduceFunction(self, words):
    # Find all unique words
    seen_words = set()
    for word in words:
        if word not in seen_words:
            seen_words.add(word)
            yield word
Input

alias of rdkit.Chem.rdchem.Mol

InputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

Output

alias of rdkit.Chem.rdchem.Mol

OutputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

Settings

alias of schrodinger.models.parameters.CompoundParam

__init__(*args, **kwargs)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(fname)
setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(*args, **kwargs)
setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
validateSettings()

Check whether the step settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.

Return type

list[TaskError or TaskWarning]

writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.InMemoryRandomSampleFilter(*args, **kwargs)

Bases: schrodinger.application.steps.basesteps.MolReduceStep

A filter that takes a random subsample of molecules. The sample size can be set through the step’s settings n.

Implementation of Algorithm R, but without knowing the size of sequence to sample from. See https://en.wikipedia.org/wiki/Reservoir_sampling

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

n: int

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
seed: int

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
nChanged
nReplaced
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
seedChanged
seedReplaced
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
validateSettings()

Check whether the step settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.

Return type

list[TaskError or TaskWarning]

reduceFunction(mols)

The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.

Example:

def reduceFunction(self, words):
    # Find all unique words
    seen_words = set()
    for word in words:
        if word not in seen_words:
            seen_words.add(word)
            yield word
Input

alias of rdkit.Chem.rdchem.Mol

InputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

Output

alias of rdkit.Chem.rdchem.Mol

OutputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

__init__(*args, **kwargs)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(fname)
setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(*args, **kwargs)
setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.CloudOptionMixin

Bases: object

A mixin that allows the task a choice between cloud based or in-memory.

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

use_cloud_services: bool

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
use_cloud_servicesChanged
use_cloud_servicesReplaced
valueChanged
validateSettings()
class schrodinger.application.steps.filters.UniqueRandomSampleFilter(*args, **kwargs)

Bases: schrodinger.application.steps.filters.CloudOptionMixin, schrodinger.stepper.stepper.Chain

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.application.steps.filters.CloudOptionMixin.Settings

table: schrodinger.application.steps.bigquery_deduplication.BQTable
n: int

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
seed: int

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
nChanged
nReplaced
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
seedChanged
seedReplaced
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
tableChanged
tableReplaced
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
use_cloud_services: bool

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
use_cloud_servicesChanged
use_cloud_servicesReplaced
valueChanged
buildChain()

This method must be implemented by subclasses to build the chain. The chain is built by modifying self.steps. The chain’s composition may be dependent on self.settings.

property Input
property InputSerializer

The default serializer that simply uses json.loads and json.dumps

property Output
property OutputSerializer

The default serializer that simply uses json.loads and json.dumps

__init__(*args, **kwargs)
__len__()
addStep(step)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings for the chain as well as for every step in the chain that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the workflow steps and their settings (recursively).

Parameters

prefix (str) – the text to start each line with

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(input_file: str, starting_step_id: Optional[str] = None)

Set the input file for the chain. If starting_step_id is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.

setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(inputs: Iterable[Any], starting_step_id: Optional[str] = None)

Set the inputs for the chain. If starting_step_id is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.

setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setStartingStep(starting_step: str)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
validateChain()

Checks that the declaration of the chain is internally consistent - i.e. that each step is valid and each step’s Input class matches the preceding step’s Output class.

validateSettings()

Check whether the chain settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation simply returns problems from all child steps.

Return type

list[TaskError or TaskWarning]

writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.UniqueSmilesFilter(*args, **kwargs)

Bases: schrodinger.application.steps.filters.CloudOptionMixin, schrodinger.stepper.stepper.Chain

A link step to determine whether cloud services are setup for SMILES filtering or to default to an in-memory filter task.

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.application.steps.filters.CloudOptionMixin.Settings

table: schrodinger.application.steps.bigquery_deduplication.BQTable
DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
tableChanged
tableReplaced
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
use_cloud_services: bool

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
use_cloud_servicesChanged
use_cloud_servicesReplaced
valueChanged
buildChain()

This method must be implemented by subclasses to build the chain. The chain is built by modifying self.steps. The chain’s composition may be dependent on self.settings.

property Input
property InputSerializer

The default serializer that simply uses json.loads and json.dumps

property Output
property OutputSerializer

The default serializer that simply uses json.loads and json.dumps

__init__(*args, **kwargs)
__len__()
addStep(step)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings for the chain as well as for every step in the chain that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the workflow steps and their settings (recursively).

Parameters

prefix (str) – the text to start each line with

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(input_file: str, starting_step_id: Optional[str] = None)

Set the input file for the chain. If starting_step_id is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.

setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(inputs: Iterable[Any], starting_step_id: Optional[str] = None)

Set the inputs for the chain. If starting_step_id is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.

setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setStartingStep(starting_step: str)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
validateChain()

Checks that the declaration of the chain is internally consistent - i.e. that each step is valid and each step’s Input class matches the preceding step’s Output class.

validateSettings()

Check whether the chain settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation simply returns problems from all child steps.

Return type

list[TaskError or TaskWarning]

writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.RandomSampleFilter(*args, **kwargs)

Bases: schrodinger.application.steps.filters.CloudOptionMixin, schrodinger.stepper.stepper.Chain

A link step to determine whether cloud services are setup for SMILES random sampling or to default to an in-memory sampling task.

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.application.steps.filters.CloudOptionMixin.Settings

table: schrodinger.application.steps.bigquery_deduplication.BQTable
n: int

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
seed: int

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
nChanged
nReplaced
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
seedChanged
seedReplaced
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
tableChanged
tableReplaced
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
use_cloud_services: bool

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
use_cloud_servicesChanged
use_cloud_servicesReplaced
valueChanged
buildChain()

This method must be implemented by subclasses to build the chain. The chain is built by modifying self.steps. The chain’s composition may be dependent on self.settings.

property Input
property InputSerializer

The default serializer that simply uses json.loads and json.dumps

property Output
property OutputSerializer

The default serializer that simply uses json.loads and json.dumps

__init__(*args, **kwargs)
__len__()
addStep(step)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings for the chain as well as for every step in the chain that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the workflow steps and their settings (recursively).

Parameters

prefix (str) – the text to start each line with

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(input_file: str, starting_step_id: Optional[str] = None)

Set the input file for the chain. If starting_step_id is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.

setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(inputs: Iterable[Any], starting_step_id: Optional[str] = None)

Set the inputs for the chain. If starting_step_id is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.

setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setStartingStep(starting_step: str)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
validateChain()

Checks that the declaration of the chain is internally consistent - i.e. that each step is valid and each step’s Input class matches the preceding step’s Output class.

validateSettings()

Check whether the chain settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation simply returns problems from all child steps.

Return type

list[TaskError or TaskWarning]

writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.MaeUniqueSmilesFilter(*args, **kwargs)

Bases: schrodinger.application.steps.basesteps.MaeMapStep

Filter structures based on unique seen SMILES.

setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

mapFunction(st)
Input

alias of schrodinger.structure._structure.Structure

InputSerializer

alias of schrodinger.stepper.stepper._DynamicSerializer

Output

alias of schrodinger.structure._structure.Structure

OutputSerializer

alias of schrodinger.stepper.stepper._DynamicSerializer

Settings

alias of schrodinger.models.parameters.CompoundParam

__init__(*args, **kwargs)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)

The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.

Example:

def reduceFunction(self, words):
    # Find all unique words
    seen_words = set()
    for word in words:
        if word not in seen_words:
            seen_words.add(word)
            yield word
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(fname)
setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(*args, **kwargs)
setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
validateSettings()

Check whether the step settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.

Return type

list[TaskError or TaskWarning]

writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.SmartsFilter(*args, **kwargs)

Bases: schrodinger.application.steps.basesteps.MolMapStep

Only allow molecules that have a SMARTS substructure defined in settings.

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

core_smarts: str

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
core_smartsChanged
core_smartsReplaced
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
validateSettings()

Check whether the step settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.

Return type

list[TaskError or TaskWarning]

setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

mapFunction(mol)
Input

alias of rdkit.Chem.rdchem.Mol

InputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

Output

alias of rdkit.Chem.rdchem.Mol

OutputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

__init__(*args, **kwargs)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)

The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.

Example:

def reduceFunction(self, words):
    # Find all unique words
    seen_words = set()
    for word in words:
        if word not in seen_words:
            seen_words.add(word)
            yield word
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(fname)
setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(*args, **kwargs)
setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.ChiralCenterCountFilter(*args, **kwargs)

Bases: schrodinger.application.steps.basesteps.MolMapStep

Only allow molecules through that have the number of chiral centers that falls in the ranged determined by settings’ min_value and max_value, with the borders included.

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

min_value: int

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
max_value: int

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
max_valueChanged
max_valueReplaced
metaObject(self) QMetaObject
min_valueChanged
min_valueReplaced
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
validateSettings()

Check whether the step settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.

Return type

list[TaskError or TaskWarning]

mapFunction(mol)
Input

alias of rdkit.Chem.rdchem.Mol

InputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

Output

alias of rdkit.Chem.rdchem.Mol

OutputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

__init__(*args, **kwargs)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)

The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.

Example:

def reduceFunction(self, words):
    # Find all unique words
    seen_words = set()
    for word in words:
        if word not in seen_words:
            seen_words.add(word)
            yield word
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(fname)
setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(*args, **kwargs)
setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.ProductFilterMixin

Bases: object

A mixin that only allows molecules through whose SMARTS substructure count passes all product filters defined in the settings.

If the settings has cflt_file defined, it will be considered to be the path from which to create the smarts_filter to use.

Since the filter.SmartsFilter can checkStructure with either Mol or Structure objects the behavior is completely determined by the class that it is a mixin for, i.e., either an MolMapStep or MaeMapStep.

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

Variables
  • smarts_filter – the smarts filter or None

  • cflt_file – if defined the source to

cflt_file: schrodinger.stepper.stepper.StepperFile

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
cflt_fileChanged
cflt_fileReplaced
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
validateSettings()
setUp()
mapFunction(molecule)
class schrodinger.application.steps.filters.ProductFilter(*args, **kwargs)

Bases: schrodinger.application.steps.filters.ProductFilterMixin, schrodinger.application.steps.basesteps.MolMapStep

See ProductFilterMixin

Input

alias of rdkit.Chem.rdchem.Mol

InputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

Output

alias of rdkit.Chem.rdchem.Mol

OutputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

Variables
  • smarts_filter – the smarts filter or None

  • cflt_file – if defined the source to

DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
cflt_file: schrodinger.stepper.stepper.StepperFile

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
cflt_fileChanged
cflt_fileReplaced
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
__init__(*args, **kwargs)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
mapFunction(molecule)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)

The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.

Example:

def reduceFunction(self, words):
    # Find all unique words
    seen_words = set()
    for word in words:
        if word not in seen_words:
            seen_words.add(word)
            yield word
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(fname)
setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(*args, **kwargs)
setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
validateSettings()

Check whether the step settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.

Return type

list[TaskError or TaskWarning]

writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.MaeProductFilter(*args, **kwargs)

Bases: schrodinger.application.steps.filters.ProductFilterMixin, schrodinger.application.steps.basesteps.MaeMapStep

See ProductFilterMixin

Input

alias of schrodinger.structure._structure.Structure

InputSerializer

alias of schrodinger.stepper.stepper._DynamicSerializer

Output

alias of schrodinger.structure._structure.Structure

OutputSerializer

alias of schrodinger.stepper.stepper._DynamicSerializer

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

Variables
  • smarts_filter – the smarts filter or None

  • cflt_file – if defined the source to

DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
cflt_file: schrodinger.stepper.stepper.StepperFile

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
cflt_fileChanged
cflt_fileReplaced
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
__init__(*args, **kwargs)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
mapFunction(molecule)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)

The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.

Example:

def reduceFunction(self, words):
    # Find all unique words
    seen_words = set()
    for word in words:
        if word not in seen_words:
            seen_words.add(word)
            yield word
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(fname)
setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(*args, **kwargs)
setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
validateSettings()

Check whether the step settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.

Return type

list[TaskError or TaskWarning]

writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.PropertyFilter(*args, **kwargs)

Bases: schrodinger.application.steps.basesteps.MolMapStep

Only allows molecules through whose properties pass all property filters defined in the settings.

If the settings has filter_file defined, it will be considered to be the path from which to create the filters to be used.

If the filter filename has the .json extension, it will be interpreted as a JSON filter file of the kind used by a few panels, including PathFinder; that filter format is implemented by schrodinger.ui.qt.filter_dialog_dir.filter_core.

A file without the .json extension is considered to be regular text with the format of the filter file is that of what pathfinder and canvas filter uses, e.g., lines like:

r_rdkit_TPSA > 30.0 < 150.0
i_rdkit_NumRotatableBonds < 10
i_rdkit_NumChiralCenters == 1
r_rdkit_MolWt > 150.0 < 575.0
class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

filter_file: schrodinger.stepper.stepper.StepperFile

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
filter_fileChanged
filter_fileReplaced
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
validateSettings()

Check whether the step settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.

Return type

list[TaskError or TaskWarning]

setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

mapFunction(mol)
Input

alias of rdkit.Chem.rdchem.Mol

InputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

Output

alias of rdkit.Chem.rdchem.Mol

OutputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

__init__(*args, **kwargs)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)

The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.

Example:

def reduceFunction(self, words):
    # Find all unique words
    seen_words = set()
    for word in words:
        if word not in seen_words:
            seen_words.add(word)
            yield word
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(fname)
setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(*args, **kwargs)
setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.PropertyRangeSettings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

The property_ranges dict should have, as keys, the property key and, as values, the range, [min, max] of values allowed for that property where the ends are included in what is considered to be acceptable.

Override _appendPropertyNameIssues to validate the property name, i.e., a key in the property_ranges dict.

property_ranges: Dict[str, List[float]]

A Param to represent dictionaries. Values of this param will have a mutated signal that will be emitted whenever any mutation method is called.

The constructor optionally takes a value_class keyword argument to specify what type of class the values will be. This information will be used for jsonifying the dictionary if specified. (Note that non-string keys are not currently supported for jsonification. This may change in the future. See PANEL-13029).

validate(step)

Validate the settings on behalf of a step.

Parameters

step – stepper._BaseStep

Return type

list[TaskError or TaskWarning]

DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
property_rangesChanged
property_rangesReplaced
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
class schrodinger.application.steps.filters.ProfileSettings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.application.steps.filters.PropertyRangeSettings

The property_ranges should be a dict where the key is the property name (a string that exists in filtering.DESCRIPTORS_DICT). The value should be the range of values allowed for that property where the ends are included in what is considered to be acceptable.

property_ranges: Dict[str, List[float]]

A Param to represent dictionaries. Values of this param will have a mutated signal that will be emitted whenever any mutation method is called.

The constructor optionally takes a value_class keyword argument to specify what type of class the values will be. This information will be used for jsonifying the dictionary if specified. (Note that non-string keys are not currently supported for jsonification. This may change in the future. See PANEL-13029).

DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
property_rangesChanged
property_rangesReplaced
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
validate(step)

Validate the settings on behalf of a step.

Parameters

step – stepper._BaseStep

Return type

list[TaskError or TaskWarning]

valueChanged
class schrodinger.application.steps.filters.ProfileFilter(*args, **kwargs)

Bases: schrodinger.application.steps.basesteps.MolMapStep

A product filter where the property profile is defined by the settings.

The complexity_max is a dictionary with the property name as key and the value above which the complexity is incremented. If the total complexity exceeds max_complexity the molecule is rejected.

Example in yaml notation:

ProfileFilter:
    property_ranges:
        MolWt: [250, 500]
        FractionCSP3: [0, 1]
        AlogP: [-1, 4]
        NumRotatableBonds: &NumRotatableBonds_range [0, 10]
See

ProfileSettings

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.application.steps.filters.ProfileSettings

core_complexity: Dict[str, int]

A Param to represent dictionaries. Values of this param will have a mutated signal that will be emitted whenever any mutation method is called.

The constructor optionally takes a value_class keyword argument to specify what type of class the values will be. This information will be used for jsonifying the dictionary if specified. (Note that non-string keys are not currently supported for jsonification. This may change in the future. See PANEL-13029).

max_complexity: int

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
large_ring_cutoff: int

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
__init__(*args, **kwargs)
largeRingCount(mol)
validate(step)

Validate the settings on behalf of a step.

Parameters

step – stepper._BaseStep

Return type

list[TaskError or TaskWarning]

DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
core_complexityChanged
core_complexityReplaced
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
large_ring_cutoffChanged
large_ring_cutoffReplaced
max_complexityChanged
max_complexityReplaced
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
property_ranges: Dict[str, List[float]]

A Param to represent dictionaries. Values of this param will have a mutated signal that will be emitted whenever any mutation method is called.

The constructor optionally takes a value_class keyword argument to specify what type of class the values will be. This information will be used for jsonifying the dictionary if specified. (Note that non-string keys are not currently supported for jsonification. This may change in the future. See PANEL-13029).

property_rangesChanged
property_rangesReplaced
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
validateSettings()

Check whether the step settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.

Return type

list[TaskError or TaskWarning]

setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

mapFunction(mol)
Input

alias of rdkit.Chem.rdchem.Mol

InputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

Output

alias of rdkit.Chem.rdchem.Mol

OutputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

__init__(*args, **kwargs)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)

The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.

Example:

def reduceFunction(self, words):
    # Find all unique words
    seen_words = set()
    for word in words:
        if word not in seen_words:
            seen_words.add(word)
            yield word
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(fname)
setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(*args, **kwargs)
setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.MaePropertyFilter(*args, **kwargs)

Bases: schrodinger.application.steps.basesteps.MaeMapStep

Only passes Maestro structures if all numeric structure level properties falls in the ranges defined by the settings.

The property_ranges dict should have, as keys, the property key and, as values, the range, [min, max] of values allowed for that property where the ends are included in what is considered to be acceptable.

If a structure does not contain the key, it is assumed to be acceptable.

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.application.steps.filters.PropertyRangeSettings

property_ranges: Dict[str, List[float]]

A Param to represent dictionaries. Values of this param will have a mutated signal that will be emitted whenever any mutation method is called.

The constructor optionally takes a value_class keyword argument to specify what type of class the values will be. This information will be used for jsonifying the dictionary if specified. (Note that non-string keys are not currently supported for jsonification. This may change in the future. See PANEL-13029).

ALLOWED_PREFIXES = {'b_', 'i_', 'r_'}
DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
property_rangesChanged
property_rangesReplaced
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
validate(step)

Validate the settings on behalf of a step.

Parameters

step – stepper._BaseStep

Return type

list[TaskError or TaskWarning]

valueChanged
validateSettings()

Check whether the step settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.

Return type

list[TaskError or TaskWarning]

mapFunction(st)
Input

alias of schrodinger.structure._structure.Structure

InputSerializer

alias of schrodinger.stepper.stepper._DynamicSerializer

Output

alias of schrodinger.structure._structure.Structure

OutputSerializer

alias of schrodinger.stepper.stepper._DynamicSerializer

__init__(*args, **kwargs)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)

The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.

Example:

def reduceFunction(self, words):
    # Find all unique words
    seen_words = set()
    for word in words:
        if word not in seen_words:
            seen_words.add(word)
            yield word
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(fname)
setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(*args, **kwargs)
setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.FepFilter(*args, **kwargs)

Bases: schrodinger.application.steps.basesteps.MolMapStep

Only allow molecules through that are amenable to FEP calculations.

A molecule is considered to be amenable if it is an acceptable perturbation with settings.min_edges other molecules in the self.settings.ref_mols.

A perturbation is considered acceptable if the number of heavy atoms in the perturbation from the maximum common substructure (MCS) is less than or equal to settings.max_hac_diff.

The settings contain the following parameters:

  • fep_references_file: the title-less SMILES file with SMILES in the 0th column (the way that Maestro exports them…)

  • ref_mols: the list of references (Chem.Mol objects)

  • min_edges: the minimum number of edges needed

  • max_hac_diff: the maximum number of heavy atoms not part of the MCS

if the fep_references_file is defined, the ref_mols will be ignored.

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

fep_references_file: schrodinger.stepper.stepper.StepperFile

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
ref_mols: List[rdkit.Chem.rdchem.Mol]

A Param to represent lists. Values of this param will have a mutated signal that will be emitted whenever any mutation method is called.

The constructor optionally takes a item_class keyword argument to specify what type of class the items in the list will be. This information will be used for jsonifying the list if specified.

min_edges: int

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
max_hac_diff: int

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
fep_references_fileChanged
fep_references_fileReplaced
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
max_hac_diffChanged
max_hac_diffReplaced
metaObject(self) QMetaObject
min_edgesChanged
min_edgesReplaced
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
ref_molsChanged
ref_molsReplaced
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
validateSettings()

Check whether the step settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.

Return type

list[TaskError or TaskWarning]

setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

mapFunction(mol)
Input

alias of rdkit.Chem.rdchem.Mol

InputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

Output

alias of rdkit.Chem.rdchem.Mol

OutputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

__init__(*args, **kwargs)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)

The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.

Example:

def reduceFunction(self, words):
    # Find all unique words
    seen_words = set()
    for word in words:
        if word not in seen_words:
            seen_words.add(word)
            yield word
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(fname)
setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(*args, **kwargs)
setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.RangeFilter(*args, **kwargs)

Bases: schrodinger.application.steps.basesteps.MolMapStep

A filter that only passes the Mol part of a ScoredMol objects if the score is in the range determined by settings’ min_value and max_value, with borders included.

Input

alias of schrodinger.application.steps.dataclasses.ScoredMol

InputSerializer

alias of schrodinger.application.steps.dataclasses.ScoredMolSerializer

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

min_value: float

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
max_value: float

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
max_valueChanged
max_valueReplaced
metaObject(self) QMetaObject
min_valueChanged
min_valueReplaced
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
validateSettings()

Check whether the step settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.

Return type

list[TaskError or TaskWarning]

mapFunction(scored_mol)
Output

alias of rdkit.Chem.rdchem.Mol

OutputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

__init__(*args, **kwargs)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)

The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.

Example:

def reduceFunction(self, words):
    # Find all unique words
    seen_words = set()
    for word in words:
        if word not in seen_words:
            seen_words.add(word)
            yield word
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(fname)
setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(*args, **kwargs)
setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.ScoreFilter(scorer_class=None, **kwargs)

Bases: schrodinger.application.steps.basesteps.MolMolWorkflow

A base class a for step consisting of a self.SCORER_CLASS instance followed by a RangeFilter.

Variables

SCORER_CLASS (ScorerStep) – the class that will compute the value to be filtered

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

score_filter: dict

A Param to represent dictionaries. Values of this param will have a mutated signal that will be emitted whenever any mutation method is called.

The constructor optionally takes a value_class keyword argument to specify what type of class the values will be. This information will be used for jsonifying the dictionary if specified. (Note that non-string keys are not currently supported for jsonification. This may change in the future. See PANEL-13029).

DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
score_filterChanged
score_filterReplaced
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
__init__(scorer_class=None, **kwargs)
SCORER_CLASS

alias of NotImplementedError

buildChain()

This method must be implemented by subclasses to build the chain. The chain is built by modifying self.steps. The chain’s composition may be dependent on self.settings.

Input

alias of rdkit.Chem.rdchem.Mol

InputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

Output

alias of rdkit.Chem.rdchem.Mol

OutputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

STEPS = ()
__len__()
addStep(step)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings for the chain as well as for every step in the chain that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the workflow steps and their settings (recursively).

Parameters

prefix (str) – the text to start each line with

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(input_file: str, starting_step_id: Optional[str] = None)

Set the input file for the chain. If starting_step_id is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.

setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(inputs: Iterable[Any], starting_step_id: Optional[str] = None)

Set the inputs for the chain. If starting_step_id is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.

setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setStartingStep(starting_step: str)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
validateChain()

Checks that the declaration of the chain is internally consistent - i.e. that each step is valid and each step’s Input class matches the preceding step’s Output class.

validateSettings()

Check whether the chain settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation simply returns problems from all child steps.

Return type

list[TaskError or TaskWarning]

writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.ScoreFilterChain(*args, **kwargs)

Bases: schrodinger.application.steps.basesteps.MolMolWorkflow

A base class for chains consisting of ScoreFilter

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

score_filters: List[Dict]

A Param to represent lists. Values of this param will have a mutated signal that will be emitted whenever any mutation method is called.

The constructor optionally takes a item_class keyword argument to specify what type of class the items in the list will be. This information will be used for jsonifying the list if specified.

DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
score_filtersChanged
score_filtersReplaced
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
SCORER_CLASS

alias of NotImplementedError

validateSettings()

Check whether the chain settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation simply returns problems from all child steps.

Return type

list[TaskError or TaskWarning]

buildChain()

This method must be implemented by subclasses to build the chain. The chain is built by modifying self.steps. The chain’s composition may be dependent on self.settings.

Input

alias of rdkit.Chem.rdchem.Mol

InputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

Output

alias of rdkit.Chem.rdchem.Mol

OutputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

STEPS = ()
__init__(*args, **kwargs)
__len__()
addStep(step)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings for the chain as well as for every step in the chain that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the workflow steps and their settings (recursively).

Parameters

prefix (str) – the text to start each line with

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(input_file: str, starting_step_id: Optional[str] = None)

Set the input file for the chain. If starting_step_id is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.

setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(inputs: Iterable[Any], starting_step_id: Optional[str] = None)

Set the inputs for the chain. If starting_step_id is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.

setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setStartingStep(starting_step: str)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
validateChain()

Checks that the declaration of the chain is internally consistent - i.e. that each step is valid and each step’s Input class matches the preceding step’s Output class.

writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.LigandMLScoreFilterChain(*args, **kwargs)

Bases: schrodinger.application.steps.filters.ScoreFilterChain

A variable length chain of LigandMLFilters, allowed to be empty.

The configuration information is a list of LigandMLScorer settings combined with those of a RangeFilter for each ligand ML model to use.

Example yaml file configuration:

LigandMLScoreFilterChain:
  score_filters:
    - ml_file: model1.qzip
      min_value: -3.0
      max_value: 2.0
    - ml_file: model2.qzip
      max_value: 200
SCORER_CLASS

alias of schrodinger.application.steps.scorers.LigandMLScorer

Input

alias of rdkit.Chem.rdchem.Mol

InputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

Output

alias of rdkit.Chem.rdchem.Mol

OutputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

STEPS = ()
class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
score_filters: List[Dict]

A Param to represent lists. Values of this param will have a mutated signal that will be emitted whenever any mutation method is called.

The constructor optionally takes a item_class keyword argument to specify what type of class the items in the list will be. This information will be used for jsonifying the list if specified.

score_filtersChanged
score_filtersReplaced
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
__init__(*args, **kwargs)
__len__()
addStep(step)
blockSignals(self, b: bool) bool
buildChain()

This method must be implemented by subclasses to build the chain. The chain is built by modifying self.steps. The chain’s composition may be dependent on self.settings.

childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings for the chain as well as for every step in the chain that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the workflow steps and their settings (recursively).

Parameters

prefix (str) – the text to start each line with

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(input_file: str, starting_step_id: Optional[str] = None)

Set the input file for the chain. If starting_step_id is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.

setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(inputs: Iterable[Any], starting_step_id: Optional[str] = None)

Set the inputs for the chain. If starting_step_id is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.

setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setStartingStep(starting_step: str)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
validateChain()

Checks that the declaration of the chain is internally consistent - i.e. that each step is valid and each step’s Input class matches the preceding step’s Output class.

validateSettings()

Check whether the chain settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation simply returns problems from all child steps.

Return type

list[TaskError or TaskWarning]

writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.

class schrodinger.application.steps.filters.MaxMolWtFilter(*args, **kwargs)

Bases: schrodinger.application.steps.basesteps.MolMapStep

A step that filters Chem.Mol objects by molecular weight.

Note that if no max_mol_wt is set in the settings, this filter will just become an identity step.

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

max_mol_wt: float

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
DataClass

This class can be used to declare a public attribute on a CompoundParam. Declared public attributes can be used without error.

Example usage:

class Coord(CompoundParam):
    x: int
    y: int
    note = NonParamAttribute()

coord = Coord()
coord.note = "hello" # No error
__init__(default_value=<object object>, _param_type=<object object>, **kwargs)
classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, b: bool) bool
block_signal_propagation()
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
classmethod configureParam()

Override this class method to set up the abstract param class (e.g. setParamReference on child params.)

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
classmethod defaultValue()

Returns the default value for this abstract param:

default_atom = Atom.defaultValue()
assert Atom.coord.x == 0
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
classmethod fromJson(json_obj)

A factory method which constructs a new object from a given dict loaded from a json string or file.

Parameters

json_obj (dict) – A json-loaded dictionary to create an object from.

Returns

An instance of this class.

Return type

cls

classmethod fromJsonImplementation(json_dict)

Sets the value of this compound param value object from a JSON dict.

Warning

This should never be called directly.

getAbstractParam()

Return the corresponding abstract param for this instance.

classmethod getJsonBlacklist()

Override to customize what params are serialized.

Implementations should return a list of abstract params that should be omitted from serialization.

..NOTE

Returned abstract params must be direct child params of cls, e.g. cls.name, not cls.coord.x.

classmethod getParamSignal(obj, signal_type='Changed')
classmethod getParamValue(obj)

Enables access to a param value on a compound param via an abstract param reference:

a = Atom()
assert Atom.coord.x.getParamValue(a) == 0 # ints default to 0
a.coord.x = 3
assert Atom.coord.x.getParamValue(a) == 3
Parameters

param (CompoundParam) – The owner param to get a param value from

classmethod getSubParam(name)

Get the value of a subparam using the string name:

c = Coord()
assert c.getSubParam('x') == 0

Note

Using the string name to access params is generally discouraged, but can be useful for serializing/deserializing param data.

Parameters

name (str) – The name of the subparam to get the value for.

classmethod getSubParams()

Return a dictionary mapping subparam names to their values.

getTypeHint()
get_version()

Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.

inherits(self, classname: str) bool
initAbstract()
initConcrete()

Override to customize initialization of concrete params.

initializeValue()

Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.

installEventFilter(self, a0: QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault()

Whether the current value of this instance matches the default value.

isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
max_mol_wtChanged
max_mol_wtReplaced
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

classmethod owner()

Get the owner of the param:

# Can be called on an abstract param:
assert Coord.x.owner() == Coord

# ...or on an instance of a CompoundParam
a = Atom()
assert a.coord.owner() == a
classmethod ownerChain()

Returns a list of param owners starting from the toplevel param and ending with self. Examples:

foo.bar.atom.coord.ownerChain() will return [foo, bar, atom, coord] where every item is a concrete param.

Foo.bar.atom.coord.x.ownerChain() will return [Foo, Foo.bar, Foo.atom.coord, Foo.atom.coord.x] where every item is an abstract params.

classmethod paramName()

Get the name of the param:

# Can be called on an abstract param:
print(Coord.x.paramName()) # 'x'

# ...or on an instance of a CompoundParam
a = Atom()
a.coord.paramName() # 'coord'
parent(self) QObject
property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
reset(*abstract_params)

Resets this compound param to its default value:

class Line(CompoundParam):
    start = Coord(x=1, y=2)
    end = Coord(x=4, y=5)
line = Line()
line.start.x = line.end.x = 10
assert line.start.x == line.end.x == 10
line.reset()
assert line.start.x == 1
assert line.end.x == 4

Any number of abstract params may be passed in to perform a partial reset of only the specified params:

line.start.x = line.end.x = 10
line.reset(Line.start.x)  # resets just start.x
assert line.start.x == 1
assert line.end.x == 10

line.reset(Line.end)      # resets the entire end point
assert line.end.x == 4

line.start.y = line.end.y = 10
line.reset(Line.start.y, Line.end.y)  # resets the y-coord of both
assert line.start.y == 2
assert line.end.y == 5
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
classmethod setParamValue(obj, value)

Set the value of a param on an object by specifying the instance and the value:

# Setting the param value of a basic param
a = Atom()
Atom.coord.x.setParamValue(a, 5)
assert a.coord.x == 5

# setParamValue can also be used to set the value of CompoundParams
c = Coord()
c.x = 10
atom.coord.setParamValue(a, c)
assert atom.coord.x == 10
Parameters
  • param – The owner param to set a subparam value of.

  • value – The value to set the subparam value to.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
classmethod setReference(param1, param2)

Call this class method from configureParam to indicate that two params should be kept in sync. The initial values will start with the default value of param1. Example:

class Square(CompoundParam):
    width: float = 5
    height: float = 10

    @classmethod
    def configureParam(cls):
        super().configureParam()
        cls.setReference(cls.width, cls.height)

square = Square()
assert square.width == square.height == 5 # Default value of width
                                          # takes priority
square.height = 7
assert square.width == square.height == 7
square.width = 6
assert square.width == square.height == 6
Parameters
  • param1 – The first abstract param to keep synced

  • param2 – The second abstract param. After instantiation, this param will take on the value of param1.

setValue(value=None, **kwargs)

Set the value of this CompoundParam to match value.

Parameters
  • value – The value to set this CompoundParam to. It should be the same type as this CompoundParam.

  • kwargs – For internal use only.

signalsBlocked(self) bool
skip_eq_check()
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toDict()

Return a dictionary version of this CompoundParam. The returned dictionary is fully nested and contains no CompoundParam instances

a = Atom()
a_dict = a.toDict()
assert a_dict['coord']['x'] == 0
assert a_dict['coord'] == {'x':0, 'y':0}
toJson(_mark_version=True)

Create and returns a data structure made up of jsonable items.

Return type

An instance of one the classes from NATIVE_JSON_DATATYPES

toJsonImplementation()

Returns a JSON representation of this value object.

Warning

This should never be called directly.

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
valueChanged
validateSettings()
Returns

A settings error if the max mol. weight setting is not properly set, None otherwise.

Return type

List[stepper.SettingsError] or None

Input

alias of rdkit.Chem.rdchem.Mol

InputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

Output

alias of rdkit.Chem.rdchem.Mol

OutputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

__init__(*args, **kwargs)
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
cleanUp()

Hook for adding any type of work that needs to happen after all outputs are exhausted or if some outputs are created and the step is destroyed.

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getInputTopic() Optional[schrodinger.stepper.stepper.Topic]
getLicenseRequirements()
getMetricsLoggerDepth() Optional[int]
getOutputSerializer()
getOutputTopic() Optional[schrodinger.stepper.stepper.Topic]
getOutputs()

Gets all the outputs in a list by fully iterating the output generator.

getResources(param_type, resource_type)

Get the stepper resources in the settings that are instances of param_type and have a resource_type attribute that is resource_type.

Note does not work for list/set/tuple subparams in the settings.

Parameters
  • param_type (tasks._TaskResource) – the resource parameter type

  • resource_type (ResourceType) – the type of resource to get

Returns

the set of stepper resources of resource_type

Return type

set of tasks._TaskResource

getRunInfo()
getStepDepth() int

Get the depth of a step which is defined as how nested it is. A step run in isolation (i.e. not within a chain) has a depth level of 0.

getStepId()
inherits(self, classname: str) bool
initializeTopics()
inputs()
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
mapFunction(mol)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

outputs(*args, **kwargs)
parent(self) QObject
prettyPrintRunInfo()

Format and print info about the step’s run.

property(self, name: str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
reduceFunction(inputs)

The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.

Example:

def reduceFunction(self, words):
    # Find all unique words
    seen_words = set()
    for word in words:
        if word not in seen_words:
            seen_words.add(word)
            yield word
removeEventFilter(self, a0: QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) QObject
senderSignalIndex(self) int
setBatchSettings(*args, **kwargs)
setInputFile(fname)
setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])
setInputs(*args, **kwargs)
setObjectName(self, name: str)
setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setSettings(*args, **kwargs)
setUp()

Hook for adding any type of work that needs to happen before any outputs are created.

signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
property topic_prefix
property topic_suffix
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
usingPubsub()
writeOutputsToFile(fname)

Write outputs to fname. By default, the output file will consist of one line for each output with whatever is produced when passing the out- put to str. Override this method if more complex behavior is needed.