schrodinger.models.parameters module¶
- schrodinger.models.parameters.classandinstancemethod(func)[source]¶
Decorator used to indicate that a particular method in a class declaration should work as both a class method and an instance method. Only works when used in a HybridMethodsMixin subclass. Example:
class Foo(HybridMethodsMixin): x = 1 @classandinstancemethod: def bar(self): print(x) f = Foo() f.x = 3 Foo.bar() # prints '1' f.bar() # prints '3'
- class schrodinger.models.parameters.HybridMethodsMixin(*args, **kwargs)[source]¶
Bases:
object
Mixin that allows the use of the
classandinstancemethod
decorator.
- class schrodinger.models.parameters.ParamType(value)[source]¶
Bases:
enum.Enum
An enumeration.
- ABSTRACT = 'Abstract'¶
- CONCRETE = 'Concrete'¶
- DESCRIPTOR = 'Descriptor'¶
- class schrodinger.models.parameters.SignalType[source]¶
Bases:
object
- Changed = 'Changed'¶
- Mutated = 'mutated'¶
- ItemChanged = 'itemChanged'¶
- Replaced = 'Replaced'¶
- class schrodinger.models.parameters.NonParamAttribute[source]¶
Bases:
object
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
- class schrodinger.models.parameters.Param(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.HybridMethodsMixin
,PyQt5.QtCore.QObject
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¶
alias of
object
- __init__(default_value=<object object>, DataClass=None, deepcopyable=True, *, _param_type=<object object>)[source]¶
- Parameters
default_value (object) – The value to use in constructing the default value for the param. A new param will have the value returned by
DataClass(default_value)
.DataClass (type) – The type to use for values of this param.
deepcopyable (bool) – Whether values of this param are deepcopyable. If this param is not deepcopyable and its owner param is deepcopied, the copy’s subparam value will be identical.
_param_type – For internal use only.
- classmethod paramName()[source]¶
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'
- classmethod ownerChain()[source]¶
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 owner()[source]¶
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
- blockSignals(self, bool) bool ¶
- childEvent(self, QChildEvent)¶
- children(self) List[QObject] ¶
- 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]
- inherits(self, str) bool ¶
- 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]
- 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)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, str)¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- class schrodinger.models.parameters.FloatParam(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.Param
- DataClass¶
alias of
float
- __init__(default_value=<object object>, DataClass=None, deepcopyable=True, *, _param_type=<object object>)¶
- Parameters
default_value (object) – The value to use in constructing the default value for the param. A new param will have the value returned by
DataClass(default_value)
.DataClass (type) – The type to use for values of this param.
deepcopyable (bool) – Whether values of this param are deepcopyable. If this param is not deepcopyable and its owner param is deepcopied, the copy’s subparam value will be identical.
_param_type – For internal use only.
- blockSignals(self, bool) bool ¶
- childEvent(self, QChildEvent)¶
- children(self) List[QObject] ¶
- 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 getParamSignal(*args, **kwargs)¶
- classmethod getParamValue(*args, **kwargs)¶
- getTypeHint()¶
- inherits(self, str) bool ¶
- initAbstract()¶
- installEventFilter(self, QObject)¶
- classmethod isAbstract()¶
Whether the param is an “abstract” param.
- 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)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, str)¶
- classmethod setParamValue(*args, **kwargs)¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- class schrodinger.models.parameters.IntParam(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.Param
- DataClass¶
alias of
int
- __init__(default_value=<object object>, DataClass=None, deepcopyable=True, *, _param_type=<object object>)¶
- Parameters
default_value (object) – The value to use in constructing the default value for the param. A new param will have the value returned by
DataClass(default_value)
.DataClass (type) – The type to use for values of this param.
deepcopyable (bool) – Whether values of this param are deepcopyable. If this param is not deepcopyable and its owner param is deepcopied, the copy’s subparam value will be identical.
_param_type – For internal use only.
- blockSignals(self, bool) bool ¶
- childEvent(self, QChildEvent)¶
- children(self) List[QObject] ¶
- 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 getParamSignal(*args, **kwargs)¶
- classmethod getParamValue(*args, **kwargs)¶
- getTypeHint()¶
- inherits(self, str) bool ¶
- initAbstract()¶
- installEventFilter(self, QObject)¶
- classmethod isAbstract()¶
Whether the param is an “abstract” param.
- 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)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, str)¶
- classmethod setParamValue(*args, **kwargs)¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- class schrodinger.models.parameters.StructureParam(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.Param
- DataClass¶
- __init__(*args, **kwargs)[source]¶
- Parameters
default_value (object) – The value to use in constructing the default value for the param. A new param will have the value returned by
DataClass(default_value)
.DataClass (type) – The type to use for values of this param.
deepcopyable (bool) – Whether values of this param are deepcopyable. If this param is not deepcopyable and its owner param is deepcopied, the copy’s subparam value will be identical.
_param_type – For internal use only.
- blockSignals(self, bool) bool ¶
- childEvent(self, QChildEvent)¶
- children(self) List[QObject] ¶
- 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 getParamSignal(*args, **kwargs)¶
- classmethod getParamValue(*args, **kwargs)¶
- getTypeHint()¶
- inherits(self, str) bool ¶
- initAbstract()¶
- installEventFilter(self, QObject)¶
- classmethod isAbstract()¶
Whether the param is an “abstract” param.
- 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)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, str)¶
- classmethod setParamValue(*args, **kwargs)¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- class schrodinger.models.parameters.StringParam(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.Param
- DataClass¶
alias of
str
- __init__(default_value=<object object>, DataClass=None, deepcopyable=True, *, _param_type=<object object>)¶
- Parameters
default_value (object) – The value to use in constructing the default value for the param. A new param will have the value returned by
DataClass(default_value)
.DataClass (type) – The type to use for values of this param.
deepcopyable (bool) – Whether values of this param are deepcopyable. If this param is not deepcopyable and its owner param is deepcopied, the copy’s subparam value will be identical.
_param_type – For internal use only.
- blockSignals(self, bool) bool ¶
- childEvent(self, QChildEvent)¶
- children(self) List[QObject] ¶
- 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 getParamSignal(*args, **kwargs)¶
- classmethod getParamValue(*args, **kwargs)¶
- getTypeHint()¶
- inherits(self, str) bool ¶
- initAbstract()¶
- installEventFilter(self, QObject)¶
- classmethod isAbstract()¶
Whether the param is an “abstract” param.
- 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)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, str)¶
- classmethod setParamValue(*args, **kwargs)¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- class schrodinger.models.parameters.BoolParam(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.Param
- DataClass¶
alias of
bool
- __init__(default_value=<object object>, DataClass=None, deepcopyable=True, *, _param_type=<object object>)¶
- Parameters
default_value (object) – The value to use in constructing the default value for the param. A new param will have the value returned by
DataClass(default_value)
.DataClass (type) – The type to use for values of this param.
deepcopyable (bool) – Whether values of this param are deepcopyable. If this param is not deepcopyable and its owner param is deepcopied, the copy’s subparam value will be identical.
_param_type – For internal use only.
- blockSignals(self, bool) bool ¶
- childEvent(self, QChildEvent)¶
- children(self) List[QObject] ¶
- 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 getParamSignal(*args, **kwargs)¶
- classmethod getParamValue(*args, **kwargs)¶
- getTypeHint()¶
- inherits(self, str) bool ¶
- initAbstract()¶
- installEventFilter(self, QObject)¶
- classmethod isAbstract()¶
Whether the param is an “abstract” param.
- 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)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, str)¶
- classmethod setParamValue(*args, **kwargs)¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- class schrodinger.models.parameters.TupleParam(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.Param
- DataClass¶
alias of
tuple
- __init__(default_value=<object object>, DataClass=None, deepcopyable=True, *, _param_type=<object object>)¶
- Parameters
default_value (object) – The value to use in constructing the default value for the param. A new param will have the value returned by
DataClass(default_value)
.DataClass (type) – The type to use for values of this param.
deepcopyable (bool) – Whether values of this param are deepcopyable. If this param is not deepcopyable and its owner param is deepcopied, the copy’s subparam value will be identical.
_param_type – For internal use only.
- blockSignals(self, bool) bool ¶
- childEvent(self, QChildEvent)¶
- children(self) List[QObject] ¶
- 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 getParamSignal(*args, **kwargs)¶
- classmethod getParamValue(*args, **kwargs)¶
- getTypeHint()¶
- inherits(self, str) bool ¶
- initAbstract()¶
- installEventFilter(self, QObject)¶
- classmethod isAbstract()¶
Whether the param is an “abstract” param.
- 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)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, str)¶
- classmethod setParamValue(*args, **kwargs)¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- class schrodinger.models.parameters.CompoundParamMeta(name, parents, dct, **kwargs)[source]¶
Bases:
sip.wrappertype
- __init__(*args, **kwargs)¶
- mro()¶
Return a type’s method resolution order.
- class schrodinger.models.parameters.CompoundParamMixin[source]¶
Bases:
object
A base class for sharing params between classes. For example:
class ColorMixin(CompoundParamMixin): color: str = 'red' class ColoredSquare(ColorMixin, CompoundParam): length: int = 5 class ColoredTriangle(ColorMixin, CompoundParam): base: int = 5 height: int = 3
Both
ColoredSquare
andColoredTriangle
will have a paramcolor
.
- class schrodinger.models.parameters.CompoundParam(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.json.JsonableClassMixin
,schrodinger.models.parameters._MutateToMatchMixin
,schrodinger.models.parameters.Param
All
CompoundParam
instances are automatically serializable if their subparams are serializable. To serialize and deserialize, use the schrodinger json module:from schrodinger.models import json class Coord(parameters.CompoundParam): x: int y: int c1 = Coord(x=1, y=2) c1_string = json.dumps(c1) c2 = json.loads(c1_string, DataClass=Coord) assert c1 == c2
- valueChanged¶
- skip_eq_check()¶
- block_signal_propagation()¶
- classmethod configureParam()[source]¶
Override this class method to set up the abstract param class (e.g. setParamReference on child params.)
- classmethod setReference(param1, param2)[source]¶
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.
- 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
- initializeValue()[source]¶
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.
- classmethod getSubParam(name)[source]¶
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 getJsonBlacklist()[source]¶
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
.
- toJsonImplementation(*args, **kwargs)[source]¶
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
- classmethod fromJsonImplementation(json_dict)[source]¶
Sets the value of this compound param value object from a JSON dict.
Warning
This should never be called directly.
- blockSignals(self, bool) bool ¶
- childEvent(self, QChildEvent)¶
- children(self) List[QObject] ¶
- 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]
- 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 getParamSignal(*args, **kwargs)¶
- classmethod getParamValue(*args, **kwargs)¶
- 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()¶
- installEventFilter(self, QObject)¶
- classmethod isAbstract()¶
Whether the param is an “abstract” param.
- 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)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, str)¶
- classmethod setParamValue(*args, **kwargs)¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- 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
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- schrodinger.models.parameters.ParamModel¶
DEPRECATED
Used to be a placeholder in case we wanted to add any logic for the top- level model.
- exception schrodinger.models.parameters.ParamAttributeError[source]¶
Bases:
RuntimeError
We catch
AttributeError`s raised inside of DataClass initialization and inside of param __get__ and __set__ methods and reraise them as `ParamAttributeError`s. If we allow them to be raised as normal `AttributeError`s then `QObject.__getattr__
will swallow the exception and its helpful traceback and raise a different and vague exception.If you see this error, it’s most likely caused by an attempt to access an attribute that doesn’t exist in a param’s DataClass.
- __init__(*args, **kwargs)¶
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class schrodinger.models.parameters.ParamDict[source]¶
Bases:
dict
A helper class to distinguish between dicts used to represent params and regular dicts. It has no additional functionality and should be used sparingly.
- __contains__(key, /)¶
True if the dictionary has the specified key, else False.
- __init__(*args, **kwargs)¶
- __len__()¶
Return len(self).
- clear() None. Remove all items from D. ¶
- copy() a shallow copy of D ¶
- fromkeys(value=None, /)¶
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)¶
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D’s items ¶
- keys() a set-like object providing a view on D’s keys ¶
- pop(k[, d]) v, remove specified key and return the corresponding value. ¶
If key is not found, d is returned if given, otherwise KeyError is raised
- popitem()¶
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)¶
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from dict/iterable E and F. ¶
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D’s values ¶
- schrodinger.models.parameters.permissive_issubclass(obj, cls)[source]¶
Return
issubclass(obj, cls)
without raising an exception ifobj
is not a class. Usable withtyping
classes as well.
- class schrodinger.models.parameters.EnumParam(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.Param
- __init__(enum_class, default_value=<object object>, *args, **kwargs)[source]¶
EnumParam must be initialized with the Enum class that this param is to be based on as well as the default value.
- Parameters
enum_class (enum.Enum) – the enum class to base this pram on
default_value (a member of the enum_class) – The default enum value. If not provided, the param will default to the first value of the enum.
- DataClass¶
alias of
object
- blockSignals(self, bool) bool ¶
- childEvent(self, QChildEvent)¶
- children(self) List[QObject] ¶
- 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 getParamSignal(*args, **kwargs)¶
- classmethod getParamValue(*args, **kwargs)¶
- getTypeHint()¶
- inherits(self, str) bool ¶
- initAbstract()¶
- installEventFilter(self, QObject)¶
- classmethod isAbstract()¶
Whether the param is an “abstract” param.
- 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)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, str)¶
- classmethod setParamValue(*args, **kwargs)¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- schrodinger.models.parameters.generate_method(parent_cls, method_name, signal_name)[source]¶
Creates a new method with the given name that first calls the method of the same name from the parent class and then emits the specified signal.
- Parameters
parent_cls – the parent class
method_name (str) – the name of the new method to be generated
signal (QtCore.pyqtSignal) – the signal that should be emitted whenever the method is called
- class schrodinger.models.parameters.BaseMutableParam(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.Param
Base class for mutable params (eg lists, sets, dicts, etc). Child classes should specify the names of mutation methods on the class, the method used to match an instance of the class to another instance (eg ‘extend’ for list), what methods take iterables, and the actual DataClass. Upon subclass declaration, the
DataClass
will be dynamically wrapped so signals are emitted whenever an instance is mutated.- MUTATE_METHOD_NAMES = ()¶
- REPLACE_METHOD_NAME = None¶
- ITERABLE_ARG_METHOD_NAMES = None¶
- DataClass = None¶
- __init__(default_value=<object object>, *args, **kwargs)[source]¶
- Parameters
default_value (object) – The value to use in constructing the default value for the param. A new param will have the value returned by
DataClass(default_value)
.DataClass (type) – The type to use for values of this param.
deepcopyable (bool) – Whether values of this param are deepcopyable. If this param is not deepcopyable and its owner param is deepcopied, the copy’s subparam value will be identical.
_param_type – For internal use only.
- blockSignals(self, bool) bool ¶
- childEvent(self, QChildEvent)¶
- children(self) List[QObject] ¶
- 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 getParamSignal(*args, **kwargs)¶
- classmethod getParamValue(*args, **kwargs)¶
- getTypeHint()¶
- inherits(self, str) bool ¶
- initAbstract()¶
- installEventFilter(self, QObject)¶
- classmethod isAbstract()¶
Whether the param is an “abstract” param.
- 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)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, str)¶
- classmethod setParamValue(*args, **kwargs)¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- class schrodinger.models.parameters.DictParam(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.BaseMutableParam
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¶
alias of
schrodinger.models.parameters.BaseMutableParam.__init_subclass__.<locals>.DataClassWithSignal
- MUTATE_METHOD_NAMES = ('__setitem__', '__delitem__', 'pop', 'popitem', 'clear', 'update', 'setdefault')¶
- ITERABLE_ARG_METHOD_NAMES = {'update'}¶
- REPLACE_METHOD_NAME = 'update'¶
- __init__(value_class=None, **kwargs)[source]¶
- Parameters
default_value (object) – The value to use in constructing the default value for the param. A new param will have the value returned by
DataClass(default_value)
.DataClass (type) – The type to use for values of this param.
deepcopyable (bool) – Whether values of this param are deepcopyable. If this param is not deepcopyable and its owner param is deepcopied, the copy’s subparam value will be identical.
_param_type – For internal use only.
- blockSignals(self, bool) bool ¶
- childEvent(self, QChildEvent)¶
- children(self) List[QObject] ¶
- 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 getParamSignal(*args, **kwargs)¶
- classmethod getParamValue(*args, **kwargs)¶
- inherits(self, str) bool ¶
- initAbstract()¶
- installEventFilter(self, QObject)¶
- classmethod isAbstract()¶
Whether the param is an “abstract” param.
- 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)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, str)¶
- classmethod setParamValue(*args, **kwargs)¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- class schrodinger.models.parameters.ListParam(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.ItemClassMixin
,schrodinger.models.parameters.BaseMutableParam
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[source]¶
alias of
schrodinger.models.parameters.BaseMutableParam.__init_subclass__.<locals>.DataClassWithSignal
- MUTATE_METHOD_NAMES = ('__setitem__', 'append', 'insert', '__delitem__', 'pop', 'remove', 'extend', 'reverse', 'sort', 'clear', '__iadd__')¶
- ITERABLE_ARG_METHOD_NAMES = {'extend'}¶
- REPLACE_METHOD_NAME = 'extend'¶
- __init__(item_class=None, **kwargs)[source]¶
- Parameters
default_value (object) – The value to use in constructing the default value for the param. A new param will have the value returned by
DataClass(default_value)
.DataClass (type) – The type to use for values of this param.
deepcopyable (bool) – Whether values of this param are deepcopyable. If this param is not deepcopyable and its owner param is deepcopied, the copy’s subparam value will be identical.
_param_type – For internal use only.
- blockSignals(self, bool) bool ¶
- childEvent(self, QChildEvent)¶
- children(self) List[QObject] ¶
- 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 getParamSignal(*args, **kwargs)¶
- classmethod getParamValue(*args, **kwargs)¶
- inherits(self, str) bool ¶
- initAbstract()¶
- installEventFilter(self, QObject)¶
- classmethod isAbstract()¶
Whether the param is an “abstract” param.
- 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)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, str)¶
- classmethod setParamValue(*args, **kwargs)¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- class schrodinger.models.parameters.SetParam(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.ItemClassMixin
,schrodinger.models.parameters.BaseMutableParam
A Param to represent sets. Values of this param will have a
mutated
signal that will be emitted whenever any elment is added or removed from the set.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 set if specified.- DataClass¶
alias of
schrodinger.models.parameters.BaseMutableParam.__init_subclass__.<locals>.DataClassWithSignal
- MUTATE_METHOD_NAMES = {'add', 'clear', 'difference_update', 'discard', 'intersection_update', 'pop', 'remove', 'symmetric_difference_update', 'update'}¶
- ITERABLE_ARG_METHOD_NAMES = {'difference_update', 'intersection_update', 'symmetric_difference_update', 'update'}¶
- REPLACE_METHOD_NAME = 'update'¶
- __init__(item_class=None, **kwargs)[source]¶
- Parameters
default_value (object) – The value to use in constructing the default value for the param. A new param will have the value returned by
DataClass(default_value)
.DataClass (type) – The type to use for values of this param.
deepcopyable (bool) – Whether values of this param are deepcopyable. If this param is not deepcopyable and its owner param is deepcopied, the copy’s subparam value will be identical.
_param_type – For internal use only.
- blockSignals(self, bool) bool ¶
- childEvent(self, QChildEvent)¶
- children(self) List[QObject] ¶
- 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 getParamSignal(*args, **kwargs)¶
- classmethod getParamValue(*args, **kwargs)¶
- inherits(self, str) bool ¶
- initAbstract()¶
- installEventFilter(self, QObject)¶
- classmethod isAbstract()¶
Whether the param is an “abstract” param.
- 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)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, str)¶
- classmethod setParamValue(*args, **kwargs)¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- class schrodinger.models.parameters.ParamListParam(*args, _param_type=<object object>, **kwargs)[source]¶
Bases:
schrodinger.models.parameters.ListParam
A list param that contains
CompoundParam
instances. Signals will be emitted any time an item in the list changes or the contents of the list itself change. See_SignalContainer
and_PLPSignalContainer
for information on specific signals.- ITERABLE_ARG_METHOD_NAMES = {'extend'}¶
- MUTATE_METHOD_NAMES = ('__setitem__', 'append', 'insert', '__delitem__', 'pop', 'remove', 'extend', 'reverse', 'sort', 'clear', '__iadd__')¶
- REPLACE_METHOD_NAME = 'extend'¶
- blockSignals(self, bool) bool ¶
- childEvent(self, QChildEvent)¶
- children(self) List[QObject] ¶
- 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 getParamSignal(*args, **kwargs)¶
- classmethod getParamValue(*args, **kwargs)¶
- getTypeHint()¶
- inherits(self, str) bool ¶
- initAbstract()¶
- installEventFilter(self, QObject)¶
- classmethod isAbstract()¶
Whether the param is an “abstract” param.
- 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)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, str)¶
- classmethod setParamValue(*args, **kwargs)¶
- setParent(self, QObject)¶
- setProperty(self, str, Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, QTimerEvent)¶
- tr(self, str, disambiguation: str = None, n: int = - 1) str ¶
- __init__(item_class, *args, **kwargs)[source]¶
- Parameters
default_value (object) – The value to use in constructing the default value for the param. A new param will have the value returned by
DataClass(default_value)
.DataClass (type) – The type to use for values of this param.
deepcopyable (bool) – Whether values of this param are deepcopyable. If this param is not deepcopyable and its owner param is deepcopied, the copy’s subparam value will be identical.
_param_type – For internal use only.