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 beInMemoryUniqueSmilesFilter
orBQDedupeChain
(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 useInMemoryUniqueSmilesFilter
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)[source]¶
Bases:
schrodinger.stepper.stepper.Chain
- class Settings(*args, _param_type=<object object>, **kwargs)[source]¶
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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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)¶
- nChanged¶
- nReplaced¶
- 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)¶
- seedChanged¶
- seedReplaced¶
- 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¶
- buildChain()[source]¶
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
andjson.dumps
- property Output¶
- property OutputSerializer¶
The default serializer that simply uses
json.loads
andjson.dumps
- __init__(*args, **kwargs)¶
- __len__()¶
- addStep(step)¶
- 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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 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[str])¶
- 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, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- setParent(self, QObject)¶
- setProperty(self, str, 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, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: 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
andSettingsWarning
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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.InMemoryUniqueSmilesFilter(*args, **kwargs)[source]¶
Bases:
schrodinger.application.steps.basesteps.MolReduceStep
Only allow molecules through whose canonical SMILES was not previously encountered.
- reduceFunction(mols)[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
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¶
- __init__(*args, **kwargs)¶
- 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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)¶
- setInputFile(fname)¶
- setInputTopic(inp_topic: Optional[str])¶
- setInputs(*args, **kwargs)¶
- setObjectName(self, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- 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)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- usingPubsub()¶
- validateSettings()¶
Check whether the step settings are valid and return a list of
SettingsError
andSettingsWarning
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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.InMemoryRandomSampleFilter(*args, **kwargs)[source]¶
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)[source]¶
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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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)¶
- nChanged¶
- nReplaced¶
- 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)¶
- seedChanged¶
- seedReplaced¶
- 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
andSettingsWarning
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)[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
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, 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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)¶
- setInputFile(fname)¶
- setInputTopic(inp_topic: Optional[str])¶
- setInputs(*args, **kwargs)¶
- setObjectName(self, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- 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)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: 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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.CloudOptionMixin[source]¶
Bases:
object
A mixin that allows the task a choice between cloud based or in-memory.
- class Settings(*args, _param_type=<object object>, **kwargs)[source]¶
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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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 ¶
- use_cloud_servicesChanged¶
- use_cloud_servicesReplaced¶
- valueChanged¶
- class schrodinger.application.steps.filters.UniqueRandomSampleFilter(*args, **kwargs)[source]¶
Bases:
schrodinger.application.steps.filters.CloudOptionMixin
,schrodinger.stepper.stepper.Chain
- class Settings(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.application.steps.filters.CloudOptionMixin.Settings
- 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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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)¶
- nChanged¶
- nReplaced¶
- 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)¶
- seedChanged¶
- seedReplaced¶
- 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>¶
- tableChanged¶
- tableReplaced¶
- 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 ¶
- 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()[source]¶
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
andjson.dumps
- property Output¶
- property OutputSerializer¶
The default serializer that simply uses
json.loads
andjson.dumps
- __init__(*args, **kwargs)¶
- __len__()¶
- addStep(step)¶
- 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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 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[str])¶
- 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, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- setParent(self, QObject)¶
- setProperty(self, str, 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, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: 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
andSettingsWarning
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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.UniqueSmilesFilter(*args, **kwargs)[source]¶
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)[source]¶
Bases:
schrodinger.application.steps.filters.CloudOptionMixin.Settings
- 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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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>¶
- tableChanged¶
- tableReplaced¶
- 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 ¶
- 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()[source]¶
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
andjson.dumps
- property Output¶
- property OutputSerializer¶
The default serializer that simply uses
json.loads
andjson.dumps
- __init__(*args, **kwargs)¶
- __len__()¶
- addStep(step)¶
- 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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 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[str])¶
- 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, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- setParent(self, QObject)¶
- setProperty(self, str, 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, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: 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
andSettingsWarning
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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.RandomSampleFilter(*args, **kwargs)[source]¶
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)[source]¶
Bases:
schrodinger.application.steps.filters.CloudOptionMixin.Settings
- 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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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)¶
- nChanged¶
- nReplaced¶
- 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)¶
- seedChanged¶
- seedReplaced¶
- 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>¶
- tableChanged¶
- tableReplaced¶
- 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 ¶
- 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()[source]¶
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
andjson.dumps
- property Output¶
- property OutputSerializer¶
The default serializer that simply uses
json.loads
andjson.dumps
- __init__(*args, **kwargs)¶
- __len__()¶
- addStep(step)¶
- 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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 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[str])¶
- 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, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- setParent(self, QObject)¶
- setProperty(self, str, 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, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: 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
andSettingsWarning
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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.MaeUniqueSmilesFilter(*args, **kwargs)[source]¶
Bases:
schrodinger.application.steps.basesteps.MaeMapStep
Filter structures based on unique seen SMILES.
- setUp()[source]¶
Hook for adding any type of work that needs to happen before any outputs are created.
- Input¶
- InputSerializer¶
alias of
schrodinger.stepper.stepper._DynamicSerializer
- Output¶
- OutputSerializer¶
alias of
schrodinger.stepper.stepper._DynamicSerializer
- Settings¶
- __init__(*args, **kwargs)¶
- 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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)¶
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, 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[str])¶
- setInputs(*args, **kwargs)¶
- setObjectName(self, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- setSettings(*args, **kwargs)¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- usingPubsub()¶
- validateSettings()¶
Check whether the step settings are valid and return a list of
SettingsError
andSettingsWarning
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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.SmartsFilter(*args, **kwargs)[source]¶
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)[source]¶
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, 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)¶
- core_smartsChanged¶
- core_smartsReplaced¶
- customEvent(self, QEvent)¶
- classmethod defaultValue(*args, **kwargs)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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
andSettingsWarning
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()[source]¶
Hook for adding any type of work that needs to happen before any outputs are created.
- 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, 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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)¶
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, 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[str])¶
- setInputs(*args, **kwargs)¶
- setObjectName(self, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- setSettings(*args, **kwargs)¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: 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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.ChiralCenterCountFilter(*args, **kwargs)[source]¶
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)[source]¶
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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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)¶
- max_valueChanged¶
- max_valueReplaced¶
- metaObject(self) QMetaObject ¶
- min_valueChanged¶
- min_valueReplaced¶
- 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
andSettingsWarning
to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.- Return type
list[TaskError or TaskWarning]
- 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, 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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)¶
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, 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[str])¶
- setInputs(*args, **kwargs)¶
- setObjectName(self, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- 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)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: 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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.ProductFilterMixin[source]¶
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 thesmarts_filter
to use.Since the
filter.SmartsFilter
cancheckStructure
with eitherMol
orStructure
objects the behavior is completely determined by the class that it is a mixin for, i.e., either anMolMapStep
orMaeMapStep
.- class Settings(*args, _param_type=<object object>, **kwargs)[source]¶
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, bool) bool ¶
- block_signal_propagation()¶
- cflt_fileChanged¶
- cflt_fileReplaced¶
- 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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¶
- class schrodinger.application.steps.filters.ProductFilter(*args, **kwargs)[source]¶
Bases:
schrodinger.application.steps.filters.ProductFilterMixin
,schrodinger.application.steps.basesteps.MolMapStep
- 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, 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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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¶
- __init__(*args, **kwargs)¶
- 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- isWidgetType(self) bool ¶
- isWindowType(self) bool ¶
- killTimer(self, int)¶
- mapFunction(molecule)¶
- 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.
- 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)¶
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, 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[str])¶
- setInputs(*args, **kwargs)¶
- setObjectName(self, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- 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)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- usingPubsub()¶
- validateSettings()¶
Check whether the step settings are valid and return a list of
SettingsError
andSettingsWarning
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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.MaeProductFilter(*args, **kwargs)[source]¶
Bases:
schrodinger.application.steps.filters.ProductFilterMixin
,schrodinger.application.steps.basesteps.MaeMapStep
- Input¶
- InputSerializer¶
alias of
schrodinger.stepper.stepper._DynamicSerializer
- Output¶
- 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, 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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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¶
- __init__(*args, **kwargs)¶
- 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- isWidgetType(self) bool ¶
- isWindowType(self) bool ¶
- killTimer(self, int)¶
- mapFunction(molecule)¶
- 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.
- 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)¶
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, 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[str])¶
- setInputs(*args, **kwargs)¶
- setObjectName(self, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- 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)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- usingPubsub()¶
- validateSettings()¶
Check whether the step settings are valid and return a list of
SettingsError
andSettingsWarning
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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.ScoredSmilesProductFilter(*args, **kwargs)[source]¶
Bases:
schrodinger.application.steps.dataclasses.ScoredSmilesIOMixin
,schrodinger.application.steps.filters.ProductFilterMixin
,schrodinger.application.steps.basesteps.LoggerMixin
,schrodinger.stepper.stepper.MapStep
A ProductFilter using scored smiles and inputs and outputs.
- mapFunction(scored_smiles)[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.application.steps.dataclasses.ScoredSmiles
- InputSerializer¶
alias of
schrodinger.application.steps.dataclasses.ScoredSmilesSerializer
- Output¶
alias of
schrodinger.application.steps.dataclasses.ScoredSmiles
- OutputSerializer¶
alias of
schrodinger.application.steps.dataclasses.ScoredSmilesSerializer
- 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, 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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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¶
- __init__(*args, **kwargs)¶
- 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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)¶
- setInputFile(fname)¶
- setInputTopic(inp_topic: Optional[str])¶
- setInputs(*args, **kwargs)¶
- setObjectName(self, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- 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)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- usingPubsub()¶
- validateSettings()¶
Check whether the step settings are valid and return a list of
SettingsError
andSettingsWarning
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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.PropertyFilter(*args, **kwargs)[source]¶
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)[source]¶
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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- disconnectNotify(self, QMetaMethod)¶
- dumpObjectInfo(self)¶
- dumpObjectTree(self)¶
- dynamicPropertyNames(self) List[QByteArray] ¶
- event(self, QEvent) bool ¶
- eventFilter(self, QObject, QEvent) bool ¶
- filter_fileChanged¶
- filter_fileReplaced¶
- 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
, notcls.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
andSettingsWarning
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()[source]¶
Hook for adding any type of work that needs to happen before any outputs are created.
- 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, 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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)¶
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, 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[str])¶
- setInputs(*args, **kwargs)¶
- setObjectName(self, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- setSettings(*args, **kwargs)¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: 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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.ProfileSettings(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.CompoundParam
The
property_ranges
should be a dict where the key is the property name (a string that exists infiltering.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).
- validate(step)[source]¶
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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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 ¶
- 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, 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¶
- class schrodinger.application.steps.filters.ProfileFilter(*args, **kwargs)[source]¶
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 exceedsmax_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)[source]¶
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
- validate(step)[source]¶
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, 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)¶
- core_complexityChanged¶
- core_complexityReplaced¶
- customEvent(self, QEvent)¶
- classmethod defaultValue(*args, **kwargs)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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)¶
- large_ring_cutoffChanged¶
- large_ring_cutoffReplaced¶
- max_complexityChanged¶
- max_complexityReplaced¶
- 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 ¶
- 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, 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
andSettingsWarning
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()[source]¶
Hook for adding any type of work that needs to happen before any outputs are created.
- 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
- 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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)¶
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, 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[str])¶
- setInputs(*args, **kwargs)¶
- setObjectName(self, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- setSettings(*args, **kwargs)¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: 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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.FepFilter(*args, **kwargs)[source]¶
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 theself.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, theref_mols
will be ignored.- class Settings(*args, _param_type=<object object>, **kwargs)[source]¶
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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- disconnectNotify(self, QMetaMethod)¶
- dumpObjectInfo(self)¶
- dumpObjectTree(self)¶
- dynamicPropertyNames(self) List[QByteArray] ¶
- event(self, QEvent) bool ¶
- eventFilter(self, QObject, QEvent) bool ¶
- fep_references_fileChanged¶
- fep_references_fileReplaced¶
- 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
, notcls.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)¶
- max_hac_diffChanged¶
- max_hac_diffReplaced¶
- metaObject(self) QMetaObject ¶
- min_edgesChanged¶
- min_edgesReplaced¶
- 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 ¶
- ref_molsChanged¶
- ref_molsReplaced¶
- 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
andSettingsWarning
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()[source]¶
Hook for adding any type of work that needs to happen before any outputs are created.
- 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, 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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)¶
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, 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[str])¶
- setInputs(*args, **kwargs)¶
- setObjectName(self, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- setSettings(*args, **kwargs)¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: 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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.RangeFilter(*args, **kwargs)[source]¶
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)[source]¶
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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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)¶
- max_valueChanged¶
- max_valueReplaced¶
- metaObject(self) QMetaObject ¶
- min_valueChanged¶
- min_valueReplaced¶
- 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
andSettingsWarning
to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.- Return type
list[TaskError or TaskWarning]
- Output¶
alias of
rdkit.Chem.rdchem.Mol
- OutputSerializer¶
alias of
schrodinger.application.steps.dataclasses.MolToSmilesSerializer
- __init__(*args, **kwargs)¶
- 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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)¶
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, 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[str])¶
- setInputs(*args, **kwargs)¶
- setObjectName(self, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- 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)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: 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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.ScoreFilter(scorer_class=None, **kwargs)[source]¶
Bases:
schrodinger.application.steps.basesteps.MolMolWorkflow
A base class a for step consisting of a
self.SCORER_CLASS
instance followed by aRangeFilter
.- Variables
SCORER_CLASS (ScorerStep) – the class that will compute the value to be filtered
- class Settings(*args, _param_type=<object object>, **kwargs)[source]¶
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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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)¶
- score_filterChanged¶
- score_filterReplaced¶
- 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¶
- SCORER_CLASS¶
alias of
NotImplementedError
- buildChain()[source]¶
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, 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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 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[str])¶
- 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, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- setParent(self, QObject)¶
- setProperty(self, str, 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, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: 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
andSettingsWarning
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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.ScoreFilterChain(*args, **kwargs)[source]¶
Bases:
schrodinger.application.steps.basesteps.MolMolWorkflow
A base class for chains consisting of
ScoreFilter
- class Settings(*args, _param_type=<object object>, **kwargs)[source]¶
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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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)¶
- score_filtersChanged¶
- score_filtersReplaced¶
- 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¶
- SCORER_CLASS¶
alias of
NotImplementedError
- validateSettings()[source]¶
Check whether the chain settings are valid and return a list of
SettingsError
andSettingsWarning
to report any invalid settings. Default implementation simply returns problems from all child steps.- Return type
list[TaskError or TaskWarning]
- buildChain()[source]¶
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, 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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 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[str])¶
- 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, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- setParent(self, QObject)¶
- setProperty(self, str, 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, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: 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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.LigandMLScoreFilterChain(*args, **kwargs)[source]¶
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 aRangeFilter
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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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)¶
- 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, 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¶
- __init__(*args, **kwargs)¶
- __len__()¶
- addStep(step)¶
- blockSignals(self, 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, 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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 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[str])¶
- 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, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- setParent(self, QObject)¶
- setProperty(self, str, 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, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: 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
andSettingsWarning
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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.MaxMolWtSettings(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.CompoundParam
A compound param that defines a maximum molecular weight.
- 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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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)¶
- max_mol_wtChanged¶
- max_mol_wtReplaced¶
- 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¶
- class schrodinger.application.steps.filters.MaxMolWtMixin(*args, **kwargs)[source]¶
Bases:
object
A mixin for steps that filter Chem.Mol objects by molecular weight. Expects the class to have a max_mol_wt setting.
- validateMaxMolWtSettings()[source]¶
- Returns
A settings error if the max mol. weight setting is not properly set, None otherwise.
- Return type
stepper.SettingsError or None
- class schrodinger.application.steps.filters.ScoredUniqueSmilesFilter(*args, **kwargs)[source]¶
Bases:
schrodinger.application.steps.dataclasses.ScoredSmilesIOMixin
,schrodinger.stepper.stepper.ReduceStep
A filter that yields the
ScoredSmiles
objects that have unique SMILES with thesettings.keep_lowest
determining which score should be retained if duplicated SMILES are encountered.- class Settings(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.CompoundParam
- keep_lowest: 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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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 ¶
- keep_lowestChanged¶
- keep_lowestReplaced¶
- 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¶
- reduceFunction(inputs)[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.application.steps.dataclasses.ScoredSmiles
- InputSerializer¶
alias of
schrodinger.application.steps.dataclasses.ScoredSmilesSerializer
- Output¶
alias of
schrodinger.application.steps.dataclasses.ScoredSmiles
- OutputSerializer¶
alias of
schrodinger.application.steps.dataclasses.ScoredSmilesSerializer
- __init__(*args, **kwargs)¶
- 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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)¶
- setInputFile(fname)¶
- setInputTopic(inp_topic: Optional[str])¶
- setInputs(*args, **kwargs)¶
- setObjectName(self, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- 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)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- usingPubsub()¶
- validateSettings()¶
Check whether the step settings are valid and return a list of
SettingsError
andSettingsWarning
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 tostr
. Override this method if more complex behavior is needed.
- class schrodinger.application.steps.filters.SortedScoreFilter(*args, **kwargs)[source]¶
Bases:
schrodinger.application.steps.dataclasses.ScoredSmilesIOMixin
,schrodinger.stepper.stepper.ReduceStep
A filter that will return the first
max_out
number of scored SMILES, after they have been sorted with a sort order determined by thereverse
setting.- class Settings(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.CompoundParam
- reverse: 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
- max_out: 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, 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(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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.
- 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
, notcls.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)¶
- max_outChanged¶
- max_outReplaced¶
- 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)¶
- reverseChanged¶
- reverseReplaced¶
- 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¶
- Input¶
alias of
schrodinger.application.steps.dataclasses.ScoredSmiles
- InputSerializer¶
alias of
schrodinger.application.steps.dataclasses.ScoredSmilesSerializer
- Output¶
alias of
schrodinger.application.steps.dataclasses.ScoredSmiles
- OutputSerializer¶
alias of
schrodinger.application.steps.dataclasses.ScoredSmilesSerializer
- __init__(*args, **kwargs)¶
- 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.
- property cloud_service_script¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: QObject = None) [signal]
- disconnect(QMetaObject.Connection) bool ¶
- disconnect(self) None
- 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]
- getInputTopic() Optional[str] ¶
- getLicenseRequirements()¶
- getOutputSerializer()¶
- getOutputTopic() Optional[str] ¶
- 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 isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (_StepperResource) – 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 _StepperResource
- getRunInfo()¶
- getStepId()¶
- inherits(self, str) bool ¶
- initializeTopics()¶
- inputs()¶
- installEventFilter(self, QObject)¶
- 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]
- outputs(*args, **kwargs)¶
- parent(self) QObject ¶
- prettyPrintRunInfo()¶
Format and print info about the step’s run.
- 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)[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
- removeEventFilter(self, 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[str])¶
- setInputs(*args, **kwargs)¶
- setObjectName(self, str)¶
- setOutputTopic(outp_topic: Optional[str])¶
- 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)¶
- property topic_prefix¶
- property topic_suffix¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- usingPubsub()¶
- validateSettings()¶
Check whether the step settings are valid and return a list of
SettingsError
andSettingsWarning
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 tostr
. Override this method if more complex behavior is needed.