schrodinger.application.steps.converters module

class schrodinger.application.steps.converters.SmilesToMolConverter(*args, **kwargs)[source]

Bases: schrodinger.application.steps.dataclasses.MolOutMixin, schrodinger.tasks.stepper.MapStep

Creates a molecule from the first word in the input string, interpreted as SMILES.

Input

alias of builtins.str

mapFunction(string)[source]

The main computation for this step. This function should take in a single input item and return an iterable of outputs. This allows a single output to produce multiple ouputs (e.g. enumeration).

The output may be yielded as a generator, in order to reduce memory usage.

If only a single output is produced for each input, return it as a single-element list.

Parameters

input

this will be a single input item from the input source. Implementer is encouraged to use a more descriptive, context- specific variable name. Example:

def mapFunction(self, starting_smiles):

InputSerializer

alias of schrodinger.tasks.stepper._DynamicSerializer

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)

Initialize self. See help(type(self)) for accurate signature.

blockSignals(self, bool) → bool
childEvent(self, 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.

cleanUpTables()
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

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

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → List[QByteArray]
event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject

findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject

findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]

findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]

getLicenseRequirements()
getOutputSerializer()
getOutputs()

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

getRunInfo()
getStepId()
inherits(self, str) → bool
inputs()
installEventFilter(self, QObject)
isBigQueryBatched()
isSignalConnected(self, QMetaMethod) → bool
isWidgetType(self) → bool
isWindowType(self) → bool
static is_bq_step(step)
killTimer(self, int)
metaObject(self) → QMetaObject
moveToThread(self, QThread)
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

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

Format and print info about the step’s run.

progressUpdated
property(self, 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, PYQT_SIGNAL) → int
reduceFunction(inputs)
removeEventFilter(self, QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) → QObject
senderSignalIndex(self) → int
setBatchSettings(*args, **kwargs)
setInputBQTable(bq_table, bq_dataset=None)
setInputFile(fname)
setInputs(*args, **kwargs)
setObjectName(self, str)
setOutputBQTable(bq_table)
setParent(self, QObject)
setProperty(self, str, 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, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) → str
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.

writeOutputsToTable()
class schrodinger.application.steps.converters.MolToSmilesConverter(*args, **kwargs)[source]

Bases: schrodinger.application.steps.dataclasses.MolInMixin, schrodinger.tasks.stepper.MapStep

Creates the canonical smiles string for the molecule.

Output

alias of builtins.str

mapFunction(mol)[source]

The main computation for this step. This function should take in a single input item and return an iterable of outputs. This allows a single output to produce multiple ouputs (e.g. enumeration).

The output may be yielded as a generator, in order to reduce memory usage.

If only a single output is produced for each input, return it as a single-element list.

Parameters

input

this will be a single input item from the input source. Implementer is encouraged to use a more descriptive, context- specific variable name. Example:

def mapFunction(self, starting_smiles):

Input

alias of rdkit.Chem.rdchem.Mol

InputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

OutputSerializer

alias of schrodinger.tasks.stepper._DynamicSerializer

Settings

alias of schrodinger.models.parameters.CompoundParam

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

blockSignals(self, bool) → bool
childEvent(self, 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.

cleanUpTables()
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

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

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → List[QByteArray]
event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject

findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject

findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]

findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]

getLicenseRequirements()
getOutputSerializer()
getOutputs()

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

getRunInfo()
getStepId()
inherits(self, str) → bool
inputs()
installEventFilter(self, QObject)
isBigQueryBatched()
isSignalConnected(self, QMetaMethod) → bool
isWidgetType(self) → bool
isWindowType(self) → bool
static is_bq_step(step)
killTimer(self, int)
metaObject(self) → QMetaObject
moveToThread(self, QThread)
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

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

Format and print info about the step’s run.

progressUpdated
property(self, 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, PYQT_SIGNAL) → int
reduceFunction(inputs)
removeEventFilter(self, QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) → QObject
senderSignalIndex(self) → int
setBatchSettings(*args, **kwargs)
setInputBQTable(bq_table, bq_dataset=None)
setInputFile(fname)
setInputs(*args, **kwargs)
setObjectName(self, str)
setOutputBQTable(bq_table)
setParent(self, QObject)
setProperty(self, str, 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, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) → str
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.

writeOutputsToTable()
class schrodinger.application.steps.converters.MolToStructureConverter(*args, **kwargs)[source]

Bases: schrodinger.application.steps.dataclasses.MolInMixin, schrodinger.application.steps.dataclasses.MaeOutMixin, schrodinger.tasks.stepper.MapStep

Step for converting Chem.Mol to structure.Structure objects.

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

Bases: schrodinger.models.parameters.CompoundParam

generate_coordinates: 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)

Initialize self. See help(type(self)) for accurate signature.

classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, bool) → bool
block_signal_propagation()
childEvent(self, 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, QMetaMethod)
customEvent(self, QEvent)
classmethod defaultValue(*args, **kwargs)
deleteLater(self)
destroyed

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

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → List[QByteArray]
event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject

findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject

findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]

findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, 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.

generate_coordinatesChanged
generate_coordinatesReplaced
getAbstractParam(*args, **kwargs)
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(*args, **kwargs)
classmethod getParamValue(*args, **kwargs)
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, 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, QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault(*args, **kwargs)
isSignalConnected(self, QMetaMethod) → bool
isWidgetType(self) → bool
isWindowType(self) → bool
killTimer(self, int)
metaObject(self) → QMetaObject
moveToThread(self, QThread)
objectName(self) → str
objectNameChanged

objectNameChanged(self, 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, 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, PYQT_SIGNAL) → int
removeEventFilter(self, QObject)
reset(*args, **kwargs)
sender(self) → QObject
senderSignalIndex(self) → int
setObjectName(self, str)
classmethod setParamValue(*args, **kwargs)
setParent(self, QObject)
setProperty(self, str, 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(*args, **kwargs)
signalsBlocked(self) → bool
skip_eq_check()
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
thread(self) → QThread
timerEvent(self, QTimerEvent)
toDict(*args, **kwargs)
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(*args, **kwargs)

Abstract method that must be defined by all derived classes. Converts an instance of the derived class into a jsonifiable object.

Returns

A dict made up of JSON native datatypes or Jsonable objects. See the link below for a table of such types. https://docs.python.org/2/library/json.html#encoders-and-decoders

tr(self, str, disambiguation: str = None, n: int = - 1) → str
valueChanged
mapFunction(mol)[source]

The main computation for this step. This function should take in a single input item and return an iterable of outputs. This allows a single output to produce multiple ouputs (e.g. enumeration).

The output may be yielded as a generator, in order to reduce memory usage.

If only a single output is produced for each input, return it as a single-element list.

Parameters

input

this will be a single input item from the input source. Implementer is encouraged to use a more descriptive, context- specific variable name. Example:

def mapFunction(self, starting_smiles):

Input

alias of rdkit.Chem.rdchem.Mol

InputSerializer

alias of schrodinger.application.steps.dataclasses.MolToSmilesSerializer

Output

alias of schrodinger.structure._structure.Structure

OutputSerializer

alias of schrodinger.tasks.stepper._DynamicSerializer

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

blockSignals(self, bool) → bool
childEvent(self, 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.

cleanUpTables()
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

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

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → List[QByteArray]
event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject

findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject

findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]

findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]

getLicenseRequirements()
getOutputSerializer()
getOutputs()

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

getRunInfo()
getStepId()
inherits(self, str) → bool
inputs()
installEventFilter(self, QObject)
isBigQueryBatched()
isSignalConnected(self, QMetaMethod) → bool
isWidgetType(self) → bool
isWindowType(self) → bool
static is_bq_step(step)
killTimer(self, int)
metaObject(self) → QMetaObject
moveToThread(self, QThread)
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

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

Format and print info about the step’s run.

progressUpdated
property(self, 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, PYQT_SIGNAL) → int
reduceFunction(inputs)
removeEventFilter(self, QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) → QObject
senderSignalIndex(self) → int
setBatchSettings(*args, **kwargs)
setInputBQTable(bq_table, bq_dataset=None)
setInputFile(fname)
setInputs(*args, **kwargs)
setObjectName(self, str)
setOutputBQTable(bq_table)
setParent(self, QObject)
setProperty(self, str, 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, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) → str
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.

writeOutputsToTable()
class schrodinger.application.steps.converters.StructureToMolConverter(*args, **kwargs)[source]

Bases: schrodinger.application.steps.dataclasses.MaeInMixin, schrodinger.application.steps.dataclasses.MolOutMixin, schrodinger.tasks.stepper.MapStep

Step for converting structure.Structure to Chem.Mol objects.

mapFunction(st)[source]

The main computation for this step. This function should take in a single input item and return an iterable of outputs. This allows a single output to produce multiple ouputs (e.g. enumeration).

The output may be yielded as a generator, in order to reduce memory usage.

If only a single output is produced for each input, return it as a single-element list.

Parameters

input

this will be a single input item from the input source. Implementer is encouraged to use a more descriptive, context- specific variable name. Example:

def mapFunction(self, starting_smiles):

Input

alias of schrodinger.structure._structure.Structure

InputSerializer

alias of schrodinger.tasks.stepper._DynamicSerializer

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)

Initialize self. See help(type(self)) for accurate signature.

blockSignals(self, bool) → bool
childEvent(self, 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.

cleanUpTables()
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

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

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → List[QByteArray]
event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject

findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject

findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]

findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]

getLicenseRequirements()
getOutputSerializer()
getOutputs()

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

getRunInfo()
getStepId()
inherits(self, str) → bool
inputs()
installEventFilter(self, QObject)
isBigQueryBatched()
isSignalConnected(self, QMetaMethod) → bool
isWidgetType(self) → bool
isWindowType(self) → bool
static is_bq_step(step)
killTimer(self, int)
metaObject(self) → QMetaObject
moveToThread(self, QThread)
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

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

Format and print info about the step’s run.

progressUpdated
property(self, 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, PYQT_SIGNAL) → int
reduceFunction(inputs)
removeEventFilter(self, QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) → QObject
senderSignalIndex(self) → int
setBatchSettings(*args, **kwargs)
setInputBQTable(bq_table, bq_dataset=None)
setInputFile(fname)
setInputs(*args, **kwargs)
setObjectName(self, str)
setOutputBQTable(bq_table)
setParent(self, QObject)
setProperty(self, str, 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, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) → str
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.

writeOutputsToTable()
class schrodinger.application.steps.converters.MaeFiler(*args, **kwargs)[source]

Bases: schrodinger.application.steps.dataclasses.MaeInMixin, schrodinger.tasks.stepper.ReduceStep

A class to write the input Structure objects to a Maestro file.

Output

alias of schrodinger.tasks.stepper.StepperFile

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

Bases: schrodinger.models.parameters.CompoundParam

filename: 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)

Initialize self. See help(type(self)) for accurate signature.

classmethod addSubParam(name, param, update_owner=True)
blockSignals(self, bool) → bool
block_signal_propagation()
childEvent(self, 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, QMetaMethod)
customEvent(self, QEvent)
classmethod defaultValue(*args, **kwargs)
deleteLater(self)
destroyed

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

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → List[QByteArray]
event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
filenameChanged
filenameReplaced
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject

findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject

findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]

findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, 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(*args, **kwargs)
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(*args, **kwargs)
classmethod getParamValue(*args, **kwargs)
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, 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, QObject)
classmethod isAbstract()

Whether the param is an “abstract” param.

isDefault(*args, **kwargs)
isSignalConnected(self, QMetaMethod) → bool
isWidgetType(self) → bool
isWindowType(self) → bool
killTimer(self, int)
metaObject(self) → QMetaObject
moveToThread(self, QThread)
objectName(self) → str
objectNameChanged

objectNameChanged(self, 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, 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, PYQT_SIGNAL) → int
removeEventFilter(self, QObject)
reset(*args, **kwargs)
sender(self) → QObject
senderSignalIndex(self) → int
setObjectName(self, str)
classmethod setParamValue(*args, **kwargs)
setParent(self, QObject)
setProperty(self, str, 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(*args, **kwargs)
signalsBlocked(self) → bool
skip_eq_check()
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
thread(self) → QThread
timerEvent(self, QTimerEvent)
toDict(*args, **kwargs)
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(*args, **kwargs)

Abstract method that must be defined by all derived classes. Converts an instance of the derived class into a jsonifiable object.

Returns

A dict made up of JSON native datatypes or Jsonable objects. See the link below for a table of such types. https://docs.python.org/2/library/json.html#encoders-and-decoders

tr(self, str, disambiguation: str = None, n: int = - 1) → str
valueChanged
validateSettings()[source]

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(strucs)[source]

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 schrodinger.structure._structure.Structure

InputSerializer

alias of schrodinger.tasks.stepper._DynamicSerializer

OutputSerializer

alias of schrodinger.tasks.stepper._DynamicSerializer

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

blockSignals(self, bool) → bool
childEvent(self, 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.

cleanUpTables()
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

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

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → List[QByteArray]
event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject

findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject

findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]

findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]

getLicenseRequirements()
getOutputSerializer()
getOutputs()

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

getRunInfo()
getStepId()
inherits(self, str) → bool
inputs()
installEventFilter(self, QObject)
isBigQueryBatched()
isSignalConnected(self, QMetaMethod) → bool
isWidgetType(self) → bool
isWindowType(self) → bool
static is_bq_step(step)
killTimer(self, int)
metaObject(self) → QMetaObject
moveToThread(self, QThread)
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

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

Format and print info about the step’s run.

progressUpdated
property(self, 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, PYQT_SIGNAL) → int
removeEventFilter(self, QObject)
report(prefix='')

Report the settings and batch settings for this step.

sender(self) → QObject
senderSignalIndex(self) → int
setBatchSettings(*args, **kwargs)
setInputBQTable(bq_table, bq_dataset=None)
setInputFile(fname)
setInputs(*args, **kwargs)
setObjectName(self, str)
setOutputBQTable(bq_table)
setParent(self, QObject)
setProperty(self, str, 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, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) → str
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.

writeOutputsToTable()