schrodinger.tasks.jobtasks_ module

class schrodinger.tasks.jobtasks_.JobOptions(default_value=<object object>, _explicit_abstract=False, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

supports_subjobs

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 Owner(object):
    data_x = IntParam()
    data_y = IntParam()

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

owner_instance = Owner()
owner_instance.data_x = 4

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

Warning

As descriptors, instances of this class will not behave correctly if used as class variables.

Variables:
  • DataClass (type) – The type of data the param describes.
  • is_abstract (bool) – Whether this param is an abstract (ie class attribute) param.
  • valueChanged (QtCore.pyqtSignal) – A signal emitted whenever the param is changed.
  • default_value (DataClass) – The default value of the param. If unset, the default value is whatever value is created when calling DataClass()
  • param_name (str) – The name of the attribute this param is set as. For example, Owner.data_x.param_name would be ‘data_x’.
  • instance_attr_name (str) – The name of the attribute used to store param values on instances.
  • abstract_attr_name (str) – The name of the attribute used to store abstract params on class objects.
incorporate

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 Owner(object):
    data_x = IntParam()
    data_y = IntParam()

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

owner_instance = Owner()
owner_instance.data_x = 4

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

Warning

As descriptors, instances of this class will not behave correctly if used as class variables.

Variables:
  • DataClass (type) – The type of data the param describes.
  • is_abstract (bool) – Whether this param is an abstract (ie class attribute) param.
  • valueChanged (QtCore.pyqtSignal) – A signal emitted whenever the param is changed.
  • default_value (DataClass) – The default value of the param. If unset, the default value is whatever value is created when calling DataClass()
  • param_name (str) – The name of the attribute this param is set as. For example, Owner.data_x.param_name would be ‘data_x’.
  • instance_attr_name (str) – The name of the attribute used to store param values on instances.
  • abstract_attr_name (str) – The name of the attribute used to store abstract params on class objects.
supports_gpu

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 Owner(object):
    data_x = IntParam()
    data_y = IntParam()

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

owner_instance = Owner()
owner_instance.data_x = 4

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

Warning

As descriptors, instances of this class will not behave correctly if used as class variables.

Variables:
  • DataClass (type) – The type of data the param describes.
  • is_abstract (bool) – Whether this param is an abstract (ie class attribute) param.
  • valueChanged (QtCore.pyqtSignal) – A signal emitted whenever the param is changed.
  • default_value (DataClass) – The default value of the param. If unset, the default value is whatever value is created when calling DataClass()
  • param_name (str) – The name of the attribute this param is set as. For example, Owner.data_x.param_name would be ‘data_x’.
  • instance_attr_name (str) – The name of the attribute used to store param values on instances.
  • abstract_attr_name (str) – The name of the attribute used to store abstract params on class objects.
DataClass

alias of builtins.object

__init__(default_value=<object object>, _explicit_abstract=False, **kwargs)

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

aboutToReplace
blockSignals(self, bool) → bool
childEvent(self, QChildEvent)
children(self) → object
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

destroyed(self, QObject = None) [signal]

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → object
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.

:rtype : cls

classmethod fromJsonImplementation(json_dict)

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

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.

incorporateChanged
incorporateReplaced
inherits(self, str) → bool
initAbstract()

Override this method to define logic specfically for initializing abstract instances of this param.

initConcrete()

Override this method to define logic specfically for initializing concrete instances of this param. This will generally only run for compound params, as atomic params are not typically instantiated outside of class declaration.

installEventFilter(self, QObject)
isDefault()
isSignalConnected(self, QMetaMethod) → bool
isWidgetType(self) → bool
isWindowType(self) → bool
is_abstract = True
killTimer(self, int)
metaObject(self) → QMetaObject
moveToThread(self, QThread)
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

owner()

Returns the owner of this param. Works for both concrete and abstract params. Returns None if the param has no owner. Follows the same rules as ownerChain.

ownerChain()

Returns the owner chain for this param. This works for concrete params and abstract params. Examples:

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

Foo.bar.atom.coord.x.ownerChain() will return [Foo, bar, atom.coord, x] where Foo is a class and all other items are abstract params.

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)

Resets this compound param to its default value. If no arguments are passed in, the entire param is reset. Any number of abstract params may be optionally passed in to perform a partial reset to default value of specified sub-params. For example, given a compound param with two xyz coordinates as endpoints:

class Line(CompoundParam):
start = Coord(x=1, y=2, z=3) end = Coord(x=4, y=5, z=6)

line = Line()

We can reset the entire line:

line.reset()

Or just certain parts:

line.reset(Line.start.x) # resets just start.x line.start.reset(Coord.x) # another way to reset start.x line.reset(Line.end) # resets the entire end point line.reset(Line.start.z, Line.end.z) # resets the z-coord of both
Parameters:args – abstract sub-params of self
sender(self) → QObject
senderSignalIndex(self) → int
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) → bool
setValue(value=None, **kwargs)

Set the value of this compound param instance. This mutates the compound param to be equal to value; it does not make the compound param /identical/ to value.

Parameters:value (self.DataClass or dict) – either another param instance of the same type or a dictionary mapping the sub-param names to values.
signalsBlocked(self) → bool
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
supports_gpuChanged
supports_gpuReplaced
supports_subjobsChanged
supports_subjobsReplaced
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
toDict()
toJson(_mark_version=True)

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

Return type:An instance of one the classes from NATIVE_JSON_DATATYPES
toJsonImplementation()

Returns a JSON representation of this value object.

tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
class schrodinger.tasks.jobtasks_.HostParam(default_value=<object object>, _explicit_abstract=False, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

name

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 Owner(object):
    data_x = IntParam()
    data_y = IntParam()

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

owner_instance = Owner()
owner_instance.data_x = 4

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

Warning

As descriptors, instances of this class will not behave correctly if used as class variables.

Variables:
  • DataClass (type) – The type of data the param describes.
  • is_abstract (bool) – Whether this param is an abstract (ie class attribute) param.
  • valueChanged (QtCore.pyqtSignal) – A signal emitted whenever the param is changed.
  • default_value (DataClass) – The default value of the param. If unset, the default value is whatever value is created when calling DataClass()
  • param_name (str) – The name of the attribute this param is set as. For example, Owner.data_x.param_name would be ‘data_x’.
  • instance_attr_name (str) – The name of the attribute used to store param values on instances.
  • abstract_attr_name (str) – The name of the attribute used to store abstract params on class objects.
DataClass

alias of builtins.object

__init__(default_value=<object object>, _explicit_abstract=False, **kwargs)

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

aboutToReplace
blockSignals(self, bool) → bool
childEvent(self, QChildEvent)
children(self) → object
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

destroyed(self, QObject = None) [signal]

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → object
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.

:rtype : cls

classmethod fromJsonImplementation(json_dict)

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

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()

Override this method to define logic specfically for initializing abstract instances of this param.

initConcrete()

Override this method to define logic specfically for initializing concrete instances of this param. This will generally only run for compound params, as atomic params are not typically instantiated outside of class declaration.

installEventFilter(self, QObject)
isDefault()
isSignalConnected(self, QMetaMethod) → bool
isWidgetType(self) → bool
isWindowType(self) → bool
is_abstract = True
killTimer(self, int)
metaObject(self) → QMetaObject
moveToThread(self, QThread)
nameChanged
nameReplaced
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

owner()

Returns the owner of this param. Works for both concrete and abstract params. Returns None if the param has no owner. Follows the same rules as ownerChain.

ownerChain()

Returns the owner chain for this param. This works for concrete params and abstract params. Examples:

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

Foo.bar.atom.coord.x.ownerChain() will return [Foo, bar, atom.coord, x] where Foo is a class and all other items are abstract params.

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)

Resets this compound param to its default value. If no arguments are passed in, the entire param is reset. Any number of abstract params may be optionally passed in to perform a partial reset to default value of specified sub-params. For example, given a compound param with two xyz coordinates as endpoints:

class Line(CompoundParam):
start = Coord(x=1, y=2, z=3) end = Coord(x=4, y=5, z=6)

line = Line()

We can reset the entire line:

line.reset()

Or just certain parts:

line.reset(Line.start.x) # resets just start.x line.start.reset(Coord.x) # another way to reset start.x line.reset(Line.end) # resets the entire end point line.reset(Line.start.z, Line.end.z) # resets the z-coord of both
Parameters:args – abstract sub-params of self
sender(self) → QObject
senderSignalIndex(self) → int
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) → bool
setValue(value=None, **kwargs)

Set the value of this compound param instance. This mutates the compound param to be equal to value; it does not make the compound param /identical/ to value.

Parameters:value (self.DataClass or dict) – either another param instance of the same type or a dictionary mapping the sub-param names to values.
signalsBlocked(self) → bool
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
toDict()
toJson(_mark_version=True)

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

Return type:An instance of one the classes from NATIVE_JSON_DATATYPES
toJsonImplementation()

Returns a JSON representation of this value object.

tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
class schrodinger.tasks.jobtasks_.JobInput(default_value=<object object>, _explicit_abstract=False, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

DASH_STRING = '--'
toCmdArgs()
DataClass

alias of builtins.object

__init__(default_value=<object object>, _explicit_abstract=False, **kwargs)

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

aboutToReplace
blockSignals(self, bool) → bool
childEvent(self, QChildEvent)
children(self) → object
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

destroyed(self, QObject = None) [signal]

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → object
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.

:rtype : cls

classmethod fromJsonImplementation(json_dict)

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

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()

Override this method to define logic specfically for initializing abstract instances of this param.

initConcrete()

Override this method to define logic specfically for initializing concrete instances of this param. This will generally only run for compound params, as atomic params are not typically instantiated outside of class declaration.

installEventFilter(self, QObject)
isDefault()
isSignalConnected(self, QMetaMethod) → bool
isWidgetType(self) → bool
isWindowType(self) → bool
is_abstract = True
killTimer(self, int)
metaObject(self) → QMetaObject
moveToThread(self, QThread)
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

owner()

Returns the owner of this param. Works for both concrete and abstract params. Returns None if the param has no owner. Follows the same rules as ownerChain.

ownerChain()

Returns the owner chain for this param. This works for concrete params and abstract params. Examples:

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

Foo.bar.atom.coord.x.ownerChain() will return [Foo, bar, atom.coord, x] where Foo is a class and all other items are abstract params.

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)

Resets this compound param to its default value. If no arguments are passed in, the entire param is reset. Any number of abstract params may be optionally passed in to perform a partial reset to default value of specified sub-params. For example, given a compound param with two xyz coordinates as endpoints:

class Line(CompoundParam):
start = Coord(x=1, y=2, z=3) end = Coord(x=4, y=5, z=6)

line = Line()

We can reset the entire line:

line.reset()

Or just certain parts:

line.reset(Line.start.x) # resets just start.x line.start.reset(Coord.x) # another way to reset start.x line.reset(Line.end) # resets the entire end point line.reset(Line.start.z, Line.end.z) # resets the z-coord of both
Parameters:args – abstract sub-params of self
sender(self) → QObject
senderSignalIndex(self) → int
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) → bool
setValue(value=None, **kwargs)

Set the value of this compound param instance. This mutates the compound param to be equal to value; it does not make the compound param /identical/ to value.

Parameters:value (self.DataClass or dict) – either another param instance of the same type or a dictionary mapping the sub-param names to values.
signalsBlocked(self) → bool
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
toDict()
toJson(_mark_version=True)

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

Return type:An instance of one the classes from NATIVE_JSON_DATATYPES
toJsonImplementation()

Returns a JSON representation of this value object.

tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
class schrodinger.tasks.jobtasks_.LaunchParams(default_value=<object object>, _explicit_abstract=False, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

host
nsubjobs

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 Owner(object):
    data_x = IntParam()
    data_y = IntParam()

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

owner_instance = Owner()
owner_instance.data_x = 4

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

Warning

As descriptors, instances of this class will not behave correctly if used as class variables.

Variables:
  • DataClass (type) – The type of data the param describes.
  • is_abstract (bool) – Whether this param is an abstract (ie class attribute) param.
  • valueChanged (QtCore.pyqtSignal) – A signal emitted whenever the param is changed.
  • default_value (DataClass) – The default value of the param. If unset, the default value is whatever value is created when calling DataClass()
  • param_name (str) – The name of the attribute this param is set as. For example, Owner.data_x.param_name would be ‘data_x’.
  • instance_attr_name (str) – The name of the attribute used to store param values on instances.
  • abstract_attr_name (str) – The name of the attribute used to store abstract params on class objects.
DataClass

alias of builtins.object

__init__(default_value=<object object>, _explicit_abstract=False, **kwargs)

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

aboutToReplace
blockSignals(self, bool) → bool
childEvent(self, QChildEvent)
children(self) → object
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

destroyed(self, QObject = None) [signal]

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → object
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.

:rtype : cls

classmethod fromJsonImplementation(json_dict)

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

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.

hostChanged
hostReplaced
inherits(self, str) → bool
initAbstract()

Override this method to define logic specfically for initializing abstract instances of this param.

initConcrete()

Override this method to define logic specfically for initializing concrete instances of this param. This will generally only run for compound params, as atomic params are not typically instantiated outside of class declaration.

installEventFilter(self, QObject)
isDefault()
isSignalConnected(self, QMetaMethod) → bool
isWidgetType(self) → bool
isWindowType(self) → bool
is_abstract = True
killTimer(self, int)
metaObject(self) → QMetaObject
moveToThread(self, QThread)
nsubjobsChanged
nsubjobsReplaced
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

owner()

Returns the owner of this param. Works for both concrete and abstract params. Returns None if the param has no owner. Follows the same rules as ownerChain.

ownerChain()

Returns the owner chain for this param. This works for concrete params and abstract params. Examples:

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

Foo.bar.atom.coord.x.ownerChain() will return [Foo, bar, atom.coord, x] where Foo is a class and all other items are abstract params.

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)

Resets this compound param to its default value. If no arguments are passed in, the entire param is reset. Any number of abstract params may be optionally passed in to perform a partial reset to default value of specified sub-params. For example, given a compound param with two xyz coordinates as endpoints:

class Line(CompoundParam):
start = Coord(x=1, y=2, z=3) end = Coord(x=4, y=5, z=6)

line = Line()

We can reset the entire line:

line.reset()

Or just certain parts:

line.reset(Line.start.x) # resets just start.x line.start.reset(Coord.x) # another way to reset start.x line.reset(Line.end) # resets the entire end point line.reset(Line.start.z, Line.end.z) # resets the z-coord of both
Parameters:args – abstract sub-params of self
sender(self) → QObject
senderSignalIndex(self) → int
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) → bool
setValue(value=None, **kwargs)

Set the value of this compound param instance. This mutates the compound param to be equal to value; it does not make the compound param /identical/ to value.

Parameters:value (self.DataClass or dict) – either another param instance of the same type or a dictionary mapping the sub-param names to values.
signalsBlocked(self) → bool
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
toDict()
toJson(_mark_version=True)

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

Return type:An instance of one the classes from NATIVE_JSON_DATATYPES
toJsonImplementation()

Returns a JSON representation of this value object.

tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
class schrodinger.tasks.jobtasks_.AbstractJobTask(*args, **kwargs)

Bases: schrodinger.tasks.tasks_.AbstractTask

JOB_OPTIONS
launch_params
input_files

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.

output_files

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.

backend_name = None
input
__init__(*args, **kwargs)

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

DONE = 4
DataClass

alias of builtins.object

FAILED = 3
JOB_OPTIONSChanged
JOB_OPTIONSReplaced
NOTRUNNING = 0
RUNNING = 2
STARTING = 1
aboutToReplace
blockSignals(self, bool) → bool
childEvent(self, QChildEvent)
children(self) → object
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

destroyed(self, QObject = None) [signal]

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → object
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.

:rtype : cls

classmethod fromJsonFilename(filename)
classmethod fromJsonImplementation(json_dict)

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

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()

Override this method to define logic specfically for initializing abstract instances of this param.

initConcrete()

Override this method to define logic specfically for initializing concrete instances of this param. This will generally only run for compound params, as atomic params are not typically instantiated outside of class declaration.

inputChanged
inputReplaced
input_filesChanged
input_filesReplaced
installEventFilter(self, QObject)
isDefault()
isSignalConnected(self, QMetaMethod) → bool
isStartable()
isWidgetType(self) → bool
isWindowType(self) → bool
is_abstract = True
killTimer(self, int)
launch_paramsChanged
launch_paramsReplaced
metaObject(self) → QMetaObject
moveToThread(self, QThread)
name
nameChanged
nameReplaced
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

output

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 Owner(object):
    data_x = IntParam()
    data_y = IntParam()

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

owner_instance = Owner()
owner_instance.data_x = 4

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

Warning

As descriptors, instances of this class will not behave correctly if used as class variables.

Variables:
  • DataClass (type) – The type of data the param describes.
  • is_abstract (bool) – Whether this param is an abstract (ie class attribute) param.
  • valueChanged (QtCore.pyqtSignal) – A signal emitted whenever the param is changed.
  • default_value (DataClass) – The default value of the param. If unset, the default value is whatever value is created when calling DataClass()
  • param_name (str) – The name of the attribute this param is set as. For example, Owner.data_x.param_name would be ‘data_x’.
  • instance_attr_name (str) – The name of the attribute used to store param values on instances.
  • abstract_attr_name (str) – The name of the attribute used to store abstract params on class objects.
outputChanged
outputReplaced
output_filesChanged
output_filesReplaced
owner()

Returns the owner of this param. Works for both concrete and abstract params. Returns None if the param has no owner. Follows the same rules as ownerChain.

ownerChain()

Returns the owner chain for this param. This works for concrete params and abstract params. Examples:

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

Foo.bar.atom.coord.x.ownerChain() will return [Foo, bar, atom.coord, x] where Foo is a class and all other items are abstract params.

parent(self) → QObject
postprocess()
preprocess()
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)
reportValidation(results)

Present validation messages to the user. This is an implmentation of the ValidationMixin interface and does not need to be called directly.

This method assumes that error and question methods have been defined in the subclass, as in e.g. widget_mixins.MessageBoxMixin.

Parameters:results (validation.ValidationResults) – Set of validation results generated by validate
Returns:if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.
reset(*args)

Resets this compound param to its default value. If no arguments are passed in, the entire param is reset. Any number of abstract params may be optionally passed in to perform a partial reset to default value of specified sub-params. For example, given a compound param with two xyz coordinates as endpoints:

class Line(CompoundParam):
start = Coord(x=1, y=2, z=3) end = Coord(x=4, y=5, z=6)

line = Line()

We can reset the entire line:

line.reset()

Or just certain parts:

line.reset(Line.start.x) # resets just start.x line.start.reset(Coord.x) # another way to reset start.x line.reset(Line.end) # resets the entire end point line.reset(Line.start.z, Line.end.z) # resets the z-coord of both
Parameters:args – abstract sub-params of self
runValidation(silent=False, validate_children=True, stop_on_fail=True)

Runs validation and reports the results (unless run silently).

Parameters:
  • silent (bool) – run without any reporting (i.e. error messages to the user). This is useful if we want to programmatically test validity. Changes return value of this method from ValidationResults to a boolean.
  • validate_children (bool) – run validation on all child objects. See _validateChildren for documentation on what this entails.
  • stop_on_fail (bool) – stop validation when first failure is encountered
Returns:

if silent is False, returns the validation results. If silent is True, returns a boolean generated by reportValidation.

Return type:

ValidationResults or bool

sender(self) → QObject
senderSignalIndex(self) → int
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) → bool
setValue(value=None, **kwargs)

Set the value of this compound param instance. This mutates the compound param to be equal to value; it does not make the compound param /identical/ to value.

Parameters:value (self.DataClass or dict) – either another param instance of the same type or a dictionary mapping the sub-param names to values.
signalsBlocked(self) → bool
start()
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
status
statusChanged
statusReplaced
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
toDict()
toJson(_mark_version=True)

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

Return type:An instance of one the classes from NATIVE_JSON_DATATYPES
toJsonImplementation()

Returns a JSON representation of this value object.

tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
wait(timeout=None)

Block until the task is finished executing or timeout seconds have passed.

Parameters:timeout (NoneType or int) – Amount of time in seconds to wait before timing out. If None or a negative number, this method will wait until the task is finished.
class schrodinger.tasks.jobtasks_.CmdJobTask(*args, **kwargs)

Bases: schrodinger.tasks.jobtasks_.AbstractJobTask

start()
toCmd()
getInputArgs()
DONE = 4
DataClass

alias of builtins.object

FAILED = 3
JOB_OPTIONS
JOB_OPTIONSChanged
JOB_OPTIONSReplaced
NOTRUNNING = 0
RUNNING = 2
STARTING = 1
__init__(*args, **kwargs)

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

aboutToReplace
backend_name = None
blockSignals(self, bool) → bool
childEvent(self, QChildEvent)
children(self) → object
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

destroyed(self, QObject = None) [signal]

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → object
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.

:rtype : cls

classmethod fromJsonFilename(filename)
classmethod fromJsonImplementation(json_dict)

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

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()

Override this method to define logic specfically for initializing abstract instances of this param.

initConcrete()

Override this method to define logic specfically for initializing concrete instances of this param. This will generally only run for compound params, as atomic params are not typically instantiated outside of class declaration.

input
inputChanged
inputReplaced
input_files

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.

input_filesChanged
input_filesReplaced
installEventFilter(self, QObject)
isDefault()
isSignalConnected(self, QMetaMethod) → bool
isStartable()
isWidgetType(self) → bool
isWindowType(self) → bool
is_abstract = True
killTimer(self, int)
launch_params
launch_paramsChanged
launch_paramsReplaced
metaObject(self) → QMetaObject
moveToThread(self, QThread)
name
nameChanged
nameReplaced
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

output

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 Owner(object):
    data_x = IntParam()
    data_y = IntParam()

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

owner_instance = Owner()
owner_instance.data_x = 4

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

Warning

As descriptors, instances of this class will not behave correctly if used as class variables.

Variables:
  • DataClass (type) – The type of data the param describes.
  • is_abstract (bool) – Whether this param is an abstract (ie class attribute) param.
  • valueChanged (QtCore.pyqtSignal) – A signal emitted whenever the param is changed.
  • default_value (DataClass) – The default value of the param. If unset, the default value is whatever value is created when calling DataClass()
  • param_name (str) – The name of the attribute this param is set as. For example, Owner.data_x.param_name would be ‘data_x’.
  • instance_attr_name (str) – The name of the attribute used to store param values on instances.
  • abstract_attr_name (str) – The name of the attribute used to store abstract params on class objects.
outputChanged
outputReplaced
output_files

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.

output_filesChanged
output_filesReplaced
owner()

Returns the owner of this param. Works for both concrete and abstract params. Returns None if the param has no owner. Follows the same rules as ownerChain.

ownerChain()

Returns the owner chain for this param. This works for concrete params and abstract params. Examples:

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

Foo.bar.atom.coord.x.ownerChain() will return [Foo, bar, atom.coord, x] where Foo is a class and all other items are abstract params.

parent(self) → QObject
postprocess()
preprocess()
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)
reportValidation(results)

Present validation messages to the user. This is an implmentation of the ValidationMixin interface and does not need to be called directly.

This method assumes that error and question methods have been defined in the subclass, as in e.g. widget_mixins.MessageBoxMixin.

Parameters:results (validation.ValidationResults) – Set of validation results generated by validate
Returns:if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.
reset(*args)

Resets this compound param to its default value. If no arguments are passed in, the entire param is reset. Any number of abstract params may be optionally passed in to perform a partial reset to default value of specified sub-params. For example, given a compound param with two xyz coordinates as endpoints:

class Line(CompoundParam):
start = Coord(x=1, y=2, z=3) end = Coord(x=4, y=5, z=6)

line = Line()

We can reset the entire line:

line.reset()

Or just certain parts:

line.reset(Line.start.x) # resets just start.x line.start.reset(Coord.x) # another way to reset start.x line.reset(Line.end) # resets the entire end point line.reset(Line.start.z, Line.end.z) # resets the z-coord of both
Parameters:args – abstract sub-params of self
runValidation(silent=False, validate_children=True, stop_on_fail=True)

Runs validation and reports the results (unless run silently).

Parameters:
  • silent (bool) – run without any reporting (i.e. error messages to the user). This is useful if we want to programmatically test validity. Changes return value of this method from ValidationResults to a boolean.
  • validate_children (bool) – run validation on all child objects. See _validateChildren for documentation on what this entails.
  • stop_on_fail (bool) – stop validation when first failure is encountered
Returns:

if silent is False, returns the validation results. If silent is True, returns a boolean generated by reportValidation.

Return type:

ValidationResults or bool

sender(self) → QObject
senderSignalIndex(self) → int
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) → bool
setValue(value=None, **kwargs)

Set the value of this compound param instance. This mutates the compound param to be equal to value; it does not make the compound param /identical/ to value.

Parameters:value (self.DataClass or dict) – either another param instance of the same type or a dictionary mapping the sub-param names to values.
signalsBlocked(self) → bool
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
status
statusChanged
statusReplaced
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
toDict()
toJson(_mark_version=True)

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

Return type:An instance of one the classes from NATIVE_JSON_DATATYPES
toJsonImplementation()

Returns a JSON representation of this value object.

tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
wait(timeout=None)

Block until the task is finished executing or timeout seconds have passed.

Parameters:timeout (NoneType or int) – Amount of time in seconds to wait before timing out. If None or a negative number, this method will wait until the task is finished.
class schrodinger.tasks.jobtasks_.CmdDriverJobTask(*args, **kwargs)

Bases: schrodinger.tasks.jobtasks_.CmdJobTask

toCmd()
wrapCmdInLaunchApi(cmd)
makeJobSpecFromCmd(cmd)
makeLaunchParams()
DONE = 4
DataClass

alias of builtins.object

FAILED = 3
JOB_OPTIONS
JOB_OPTIONSChanged
JOB_OPTIONSReplaced
NOTRUNNING = 0
RUNNING = 2
STARTING = 1
__init__(*args, **kwargs)

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

aboutToReplace
backend_name = None
blockSignals(self, bool) → bool
childEvent(self, QChildEvent)
children(self) → object
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

destroyed(self, QObject = None) [signal]

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → object
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.

:rtype : cls

classmethod fromJsonFilename(filename)
classmethod fromJsonImplementation(json_dict)

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

getInputArgs()
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()

Override this method to define logic specfically for initializing abstract instances of this param.

initConcrete()

Override this method to define logic specfically for initializing concrete instances of this param. This will generally only run for compound params, as atomic params are not typically instantiated outside of class declaration.

input
inputChanged
inputReplaced
input_files

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.

input_filesChanged
input_filesReplaced
installEventFilter(self, QObject)
isDefault()
isSignalConnected(self, QMetaMethod) → bool
isStartable()
isWidgetType(self) → bool
isWindowType(self) → bool
is_abstract = True
killTimer(self, int)
launch_params
launch_paramsChanged
launch_paramsReplaced
metaObject(self) → QMetaObject
moveToThread(self, QThread)
name
nameChanged
nameReplaced
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

output

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 Owner(object):
    data_x = IntParam()
    data_y = IntParam()

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

owner_instance = Owner()
owner_instance.data_x = 4

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

Warning

As descriptors, instances of this class will not behave correctly if used as class variables.

Variables:
  • DataClass (type) – The type of data the param describes.
  • is_abstract (bool) – Whether this param is an abstract (ie class attribute) param.
  • valueChanged (QtCore.pyqtSignal) – A signal emitted whenever the param is changed.
  • default_value (DataClass) – The default value of the param. If unset, the default value is whatever value is created when calling DataClass()
  • param_name (str) – The name of the attribute this param is set as. For example, Owner.data_x.param_name would be ‘data_x’.
  • instance_attr_name (str) – The name of the attribute used to store param values on instances.
  • abstract_attr_name (str) – The name of the attribute used to store abstract params on class objects.
outputChanged
outputReplaced
output_files

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.

output_filesChanged
output_filesReplaced
owner()

Returns the owner of this param. Works for both concrete and abstract params. Returns None if the param has no owner. Follows the same rules as ownerChain.

ownerChain()

Returns the owner chain for this param. This works for concrete params and abstract params. Examples:

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

Foo.bar.atom.coord.x.ownerChain() will return [Foo, bar, atom.coord, x] where Foo is a class and all other items are abstract params.

parent(self) → QObject
postprocess()
preprocess()
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)
reportValidation(results)

Present validation messages to the user. This is an implmentation of the ValidationMixin interface and does not need to be called directly.

This method assumes that error and question methods have been defined in the subclass, as in e.g. widget_mixins.MessageBoxMixin.

Parameters:results (validation.ValidationResults) – Set of validation results generated by validate
Returns:if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.
reset(*args)

Resets this compound param to its default value. If no arguments are passed in, the entire param is reset. Any number of abstract params may be optionally passed in to perform a partial reset to default value of specified sub-params. For example, given a compound param with two xyz coordinates as endpoints:

class Line(CompoundParam):
start = Coord(x=1, y=2, z=3) end = Coord(x=4, y=5, z=6)

line = Line()

We can reset the entire line:

line.reset()

Or just certain parts:

line.reset(Line.start.x) # resets just start.x line.start.reset(Coord.x) # another way to reset start.x line.reset(Line.end) # resets the entire end point line.reset(Line.start.z, Line.end.z) # resets the z-coord of both
Parameters:args – abstract sub-params of self
runValidation(silent=False, validate_children=True, stop_on_fail=True)

Runs validation and reports the results (unless run silently).

Parameters:
  • silent (bool) – run without any reporting (i.e. error messages to the user). This is useful if we want to programmatically test validity. Changes return value of this method from ValidationResults to a boolean.
  • validate_children (bool) – run validation on all child objects. See _validateChildren for documentation on what this entails.
  • stop_on_fail (bool) – stop validation when first failure is encountered
Returns:

if silent is False, returns the validation results. If silent is True, returns a boolean generated by reportValidation.

Return type:

ValidationResults or bool

sender(self) → QObject
senderSignalIndex(self) → int
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) → bool
setValue(value=None, **kwargs)

Set the value of this compound param instance. This mutates the compound param to be equal to value; it does not make the compound param /identical/ to value.

Parameters:value (self.DataClass or dict) – either another param instance of the same type or a dictionary mapping the sub-param names to values.
signalsBlocked(self) → bool
start()
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
status
statusChanged
statusReplaced
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
toDict()
toJson(_mark_version=True)

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

Return type:An instance of one the classes from NATIVE_JSON_DATATYPES
toJsonImplementation()

Returns a JSON representation of this value object.

tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
wait(timeout=None)

Block until the task is finished executing or timeout seconds have passed.

Parameters:timeout (NoneType or int) – Amount of time in seconds to wait before timing out. If None or a negative number, this method will wait until the task is finished.
class schrodinger.tasks.jobtasks_.ComboJobTask(*args, **kwargs)

Bases: schrodinger.tasks.jobtasks_.CmdDriverJobTask

run_as_backend

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 Owner(object):
    data_x = IntParam()
    data_y = IntParam()

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

owner_instance = Owner()
owner_instance.data_x = 4

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

Warning

As descriptors, instances of this class will not behave correctly if used as class variables.

Variables:
  • DataClass (type) – The type of data the param describes.
  • is_abstract (bool) – Whether this param is an abstract (ie class attribute) param.
  • valueChanged (QtCore.pyqtSignal) – A signal emitted whenever the param is changed.
  • default_value (DataClass) – The default value of the param. If unset, the default value is whatever value is created when calling DataClass()
  • param_name (str) – The name of the attribute this param is set as. For example, Owner.data_x.param_name would be ‘data_x’.
  • instance_attr_name (str) – The name of the attribute used to store param values on instances.
  • abstract_attr_name (str) – The name of the attribute used to store abstract params on class objects.
json_filename
json_out_filename
__init__(*args, **kwargs)

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

backend_name = None
prepareStart()
start()
writeJsonFile(filename)
getInputArgs()
runBackend()
backendMain()
DONE = 4
DataClass

alias of builtins.object

FAILED = 3
JOB_OPTIONS
JOB_OPTIONSChanged
JOB_OPTIONSReplaced
NOTRUNNING = 0
RUNNING = 2
STARTING = 1
aboutToReplace
blockSignals(self, bool) → bool
childEvent(self, QChildEvent)
children(self) → object
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

destroyed(self, QObject = None) [signal]

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → object
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.

:rtype : cls

classmethod fromJsonFilename(filename)
classmethod fromJsonImplementation(json_dict)

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

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()

Override this method to define logic specfically for initializing abstract instances of this param.

initConcrete()

Override this method to define logic specfically for initializing concrete instances of this param. This will generally only run for compound params, as atomic params are not typically instantiated outside of class declaration.

input
inputChanged
inputReplaced
input_files

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.

input_filesChanged
input_filesReplaced
installEventFilter(self, QObject)
isDefault()
isSignalConnected(self, QMetaMethod) → bool
isStartable()
isWidgetType(self) → bool
isWindowType(self) → bool
is_abstract = True
killTimer(self, int)
launch_params
launch_paramsChanged
launch_paramsReplaced
makeJobSpecFromCmd(cmd)
makeLaunchParams()
metaObject(self) → QMetaObject
moveToThread(self, QThread)
name
nameChanged
nameReplaced
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

output

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 Owner(object):
    data_x = IntParam()
    data_y = IntParam()

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

owner_instance = Owner()
owner_instance.data_x = 4

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

Warning

As descriptors, instances of this class will not behave correctly if used as class variables.

Variables:
  • DataClass (type) – The type of data the param describes.
  • is_abstract (bool) – Whether this param is an abstract (ie class attribute) param.
  • valueChanged (QtCore.pyqtSignal) – A signal emitted whenever the param is changed.
  • default_value (DataClass) – The default value of the param. If unset, the default value is whatever value is created when calling DataClass()
  • param_name (str) – The name of the attribute this param is set as. For example, Owner.data_x.param_name would be ‘data_x’.
  • instance_attr_name (str) – The name of the attribute used to store param values on instances.
  • abstract_attr_name (str) – The name of the attribute used to store abstract params on class objects.
outputChanged
outputReplaced
output_files

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.

output_filesChanged
output_filesReplaced
owner()

Returns the owner of this param. Works for both concrete and abstract params. Returns None if the param has no owner. Follows the same rules as ownerChain.

ownerChain()

Returns the owner chain for this param. This works for concrete params and abstract params. Examples:

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

Foo.bar.atom.coord.x.ownerChain() will return [Foo, bar, atom.coord, x] where Foo is a class and all other items are abstract params.

parent(self) → QObject
postprocess()
preprocess()
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)
reportValidation(results)

Present validation messages to the user. This is an implmentation of the ValidationMixin interface and does not need to be called directly.

This method assumes that error and question methods have been defined in the subclass, as in e.g. widget_mixins.MessageBoxMixin.

Parameters:results (validation.ValidationResults) – Set of validation results generated by validate
Returns:if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.
reset(*args)

Resets this compound param to its default value. If no arguments are passed in, the entire param is reset. Any number of abstract params may be optionally passed in to perform a partial reset to default value of specified sub-params. For example, given a compound param with two xyz coordinates as endpoints:

class Line(CompoundParam):
start = Coord(x=1, y=2, z=3) end = Coord(x=4, y=5, z=6)

line = Line()

We can reset the entire line:

line.reset()

Or just certain parts:

line.reset(Line.start.x) # resets just start.x line.start.reset(Coord.x) # another way to reset start.x line.reset(Line.end) # resets the entire end point line.reset(Line.start.z, Line.end.z) # resets the z-coord of both
Parameters:args – abstract sub-params of self
runValidation(silent=False, validate_children=True, stop_on_fail=True)

Runs validation and reports the results (unless run silently).

Parameters:
  • silent (bool) – run without any reporting (i.e. error messages to the user). This is useful if we want to programmatically test validity. Changes return value of this method from ValidationResults to a boolean.
  • validate_children (bool) – run validation on all child objects. See _validateChildren for documentation on what this entails.
  • stop_on_fail (bool) – stop validation when first failure is encountered
Returns:

if silent is False, returns the validation results. If silent is True, returns a boolean generated by reportValidation.

Return type:

ValidationResults or bool

run_as_backendChanged
run_as_backendReplaced
sender(self) → QObject
senderSignalIndex(self) → int
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) → bool
setValue(value=None, **kwargs)

Set the value of this compound param instance. This mutates the compound param to be equal to value; it does not make the compound param /identical/ to value.

Parameters:value (self.DataClass or dict) – either another param instance of the same type or a dictionary mapping the sub-param names to values.
signalsBlocked(self) → bool
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
status
statusChanged
statusReplaced
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
toCmd()
toDict()
toJson(_mark_version=True)

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

Return type:An instance of one the classes from NATIVE_JSON_DATATYPES
toJsonImplementation()

Returns a JSON representation of this value object.

tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
wait(timeout=None)

Block until the task is finished executing or timeout seconds have passed.

Parameters:timeout (NoneType or int) – Amount of time in seconds to wait before timing out. If None or a negative number, this method will wait until the task is finished.
wrapCmdInLaunchApi(cmd)