schrodinger.models.parameters module

schrodinger.models.parameters.is_abstract_param(param)
exception schrodinger.models.parameters.ParamAttributeError

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.

__cause__

exception cause

__class__

alias of builtins.type

__context__

exception context

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', '__doc__': "\n We catch `AttributeError`s raised inside of DataClass initialization and\n inside of param __get__ and __set__ methods and reraise them as\n `ParamAttributeError`s. If we allow them to be raised as normal\n `AttributeError`s then `QObject.__getattr__` will swallow the exception\n and its helpful traceback and raise a different and vague exception.\n\n If you see this error, it's most likely caused by an attempt to\n access an attribute that doesn't exist in a param's DataClass.\n ", '__weakref__': <attribute '__weakref__' of 'ParamAttributeError' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__

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

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__setstate__()
__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__suppress_context__
__traceback__
__weakref__

list of weak references to the object (if defined)

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

class schrodinger.models.parameters.Param(default_value=None, DataClass=None)

Bases: 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 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.
valueChanged
suspend_signals()
__init__(default_value=None, DataClass=None)

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

is_abstract = True
DataClass

alias of builtins.object

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
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.

__repr__()

Return repr(self).

__class__

alias of sip.wrappertype

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', '__doc__': "\n Base class for all Param classes. A Param is a descriptor for storing data,\n which means that a single Param instance will manage the data values for\n multiple instances of the class that owns it. Example::\n\n class Owner(object):\n data_x = IntParam()\n data_y = IntParam()\n\n An instance of the Owner class can be created normally, and Params can be\n accessed as normal attributes::\n\n owner_instance = Owner()\n owner_instance.data_x = 4\n\n When a Param value is set, the :code:`valueChanged` signal is emitted.\n Params can be serialized and deserialized to and from JSON.\n\n .. WARNING::\n As descriptors, instances of this class will not behave correctly if\n used as class variables.\n\n :cvar DataClass: The type of data the param describes.\n :vartype DataClass: type\n\n :ivar is_abstract: Whether this param is an abstract (ie class attribute)\n param.\n :vartype is_abstract: bool\n\n :ivar valueChanged: A signal emitted whenever the param is changed.\n :vartype valueChanged: QtCore.pyqtSignal\n\n :ivar default_value: The default value of the param. If unset, the default\n value is whatever value is created when calling `DataClass()`\n :vartype default_value: DataClass\n\n :ivar param_name: The name of the attribute this param is set as. For\n example, `Owner.data_x.param_name` would be 'data_x'.\n :vartype param_name: str\n\n :ivar instance_attr_name: The name of the attribute used to store param values\n on instances.\n :vartype instance_attr_name: str\n\n :ivar abstract_attr_name: The name of the attribute used to store abstract\n params on class objects.\n :vartype abstract_attr_name: str\n ", 'DataClass': <class 'object'>, 'valueChanged': <unbound PYQT_SIGNAL Param.valueChanged[]>, 'is_abstract': True, 'suspend_signals': <function flag_context_manager.<locals>.flag_context_manager_inner>, '__init__': <function Param.__init__>, '__get__': <function Param.__get__>, '_getValue': <function Param._getValue>, '_makeNewValue': <function Param._makeNewValue>, '__set__': <function Param.__set__>, '__set_name__': <function Param.__set_name__>, '_setValue': <function Param._setValue>, '_makeAbstractParam': <function Param._makeAbstractParam>, '_initAbstractParam': <function Param._initAbstractParam>, 'owner': <function Param.owner>, 'ownerChain': <function Param.ownerChain>, '_propagateSignal': <function Param._propagateSignal>, '_abstractStr': <function Param._abstractStr>, '__repr__': <function Param.__repr__>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattr__(self, str) → object
__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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]

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.CompoundParam(default_value=None, **kwargs)

Bases: schrodinger.models.json.JsonableClassMixin, schrodinger.models.parameters.Param

A collection of Params that itself is a Param. Instances of this class are used as both descriptors and as return values from the descriptor. This allows sub-params to be accessed in the most natural way (i.e. param = container.param, subparam = param.subparam), since the return value of the first descriptor has the descriptors for the sub-params.

To create a compound param, subclass and add params as class attributes. Example:

class Coordinate(CompoundParam):
    x = FloatParam()
    y = FloatParam()
    z = FloatParam(4) # Specify default value

Since CompoundsParams are Params, they can also be included within other compound params:

class Line(CompoundParam):
    startpoint = Coordinate()
    endpoint = Coordinate(x=3, y=2) # specify default value by kwargs

Signal propagation. Executing the following lines:

l = Line()
l.endpoint.x = 5

will result in multiple signals being emitted:

l.endpoint.xChanged
l.endpoint.valueChanged
l.endpointChanged
l.valueChanged

For any nested param, the change can be detected via either the paramChanged signal or the generic valueChanged signal. For a top-level param, only the valueChanged signal will be available.

Compound params can also be serialized to JSON and deserialized from JSON.

Warning

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

aboutToReplace
classmethod __init_subclass__()

This method modifies the creation of CompoundParam subclasses by dynamically adding a signal to the compound param for each subparam. The signal is named <subparam-name>Changed. (ex. coord.xChanged and coord.yChanged). This way, subclasses of CompoundParam do not need to explicitly define signals for each subparam.

__init__(default_value=None, **kwargs)

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

DataClass

alias of builtins.object

__getattribute__(name)

If an AttributeError is raised during the getting of a child param, recast the error as a ParamAttributeError and raise. Otherwise, proceed normally.

__deepcopy__(memo)
toDict()
__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
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.
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
toJsonImplementation()

Returns a JSON representation of this value object.

classmethod fromJsonImplementation(json_dict)

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

__eq__(other)

Return self==value.

__ne__(other)

Return self!=value.

isDefault()
__str__()

Return str(self).

__class__

alias of sip.wrappertype

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', '__doc__': '\n A collection of Params that itself is a Param. Instances of this class are\n used as both descriptors and as return values from the descriptor. This\n allows sub-params to be accessed in the most natural way (i.e. param =\n container.param, subparam = param.subparam), since the return value of the\n first descriptor has the descriptors for the sub-params.\n\n To create a compound param, subclass and add params as class attributes.\n Example::\n\n class Coordinate(CompoundParam):\n x = FloatParam()\n y = FloatParam()\n z = FloatParam(4) # Specify default value\n\n Since CompoundsParams are Params, they can also be included within other\n compound params::\n\n class Line(CompoundParam):\n startpoint = Coordinate()\n endpoint = Coordinate(x=3, y=2) # specify default value by kwargs\n\n Signal propagation. Executing the following lines::\n\n l = Line()\n l.endpoint.x = 5\n\n will result in multiple signals being emitted::\n\n l.endpoint.xChanged\n l.endpoint.valueChanged\n l.endpointChanged\n l.valueChanged\n\n For any nested param, the change can be detected via either the :code:`paramChanged`\n signal or the generic :code:`valueChanged` signal. For a top-level param, only the\n :code:`valueChanged` signal will be available.\n\n Compound params can also be serialized to JSON and deserialized from JSON.\n\n .. WARNING::\n As descriptors, instances of this class will not behave correctly if\n used as class variables.\n ', 'aboutToReplace': <unbound PYQT_SIGNAL CompoundParam.aboutToReplace[object]>, '__init_subclass__': <classmethod object>, '__init__': <function CompoundParam.__init__>, '__getattribute__': <function CompoundParam.__getattribute__>, '__deepcopy__': <function CompoundParam.__deepcopy__>, '_makeNewValue': <function CompoundParam._makeNewValue>, '_setupValue': <function CompoundParam._setupValue>, 'toDict': <function CompoundParam.toDict>, '__set__': <function CompoundParam.__set__>, '_setValue': <function CompoundParam._setValue>, 'setValue': <function CompoundParam.setValue>, 'reset': <function CompoundParam.reset>, 'toJsonImplementation': <function CompoundParam.toJsonImplementation>, 'fromJsonImplementation': <classmethod object>, '__eq__': <function CompoundParam.__eq__>, '__ne__': <function CompoundParam.__ne__>, 'isDefault': <function CompoundParam.isDefault>, '__str__': <function CompoundParam.__str__>, '__hash__': None, '_CompoundParam_jsonAdapters': []})
__dir__() → list

default dir() implementation

__format__()

default object formatter

__ge__

Return self>=value.

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__getattr__(self, str) → object
__gt__

Return self>value.

__hash__ = None
__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return repr(self).

__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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

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
installEventFilter(self, QObject)
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)
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>
suspend_signals()
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
valueChanged
class schrodinger.models.parameters.ParamModel(default_value=None, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

Inherit all functionality of CompoundParam with name that designates this class as a model. Models should themselves be parameters so that their corresponding view can be easily incorporated into a parent view. In this case, the model of the parent view will contain the model of the child view as a parameter.

WARNING: as descriptors, instances of this class will not behave normally if used as class variables.

DataClass

alias of builtins.object

__class__

alias of sip.wrappertype

__deepcopy__(memo)
__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', '__doc__': '\n Inherit all functionality of `CompoundParam` with name that\n designates this class as a model. Models should themselves be parameters so\n that their corresponding view can be easily incorporated into a parent view.\n In this case, the model of the parent view will contain the model of the\n child view as a parameter.\n\n WARNING: as descriptors, instances of this class will not behave normally\n if used as class variables.\n ', '_ParamModel_jsonAdapters': [], '_child_param_names': []})
__dir__() → list

default dir() implementation

__eq__(other)

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__getattr__(self, str) → object
__getattribute__(name)

If an AttributeError is raised during the getting of a child param, recast the error as a ParamAttributeError and raise. Otherwise, proceed normally.

__gt__

Return self>value.

__hash__ = None
__init__(default_value=None, **kwargs)

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

classmethod __init_subclass__()

This method modifies the creation of CompoundParam subclasses by dynamically adding a signal to the compound param for each subparam. The signal is named <subparam-name>Changed. (ex. coord.xChanged and coord.yChanged). This way, subclasses of CompoundParam do not need to explicitly define signals for each subparam.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__(other)

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return repr(self).

__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__()

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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
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
schrodinger.models.parameters.is_toplevel_param(param, obj)

Determine whether the abstract param represents the entire compound param instance as opposed to a field in the compound param. Examples:

is_toplevel_param(Coord, coord) # True is_toplevel_param(Coord.x, coord) # False is_toplevel_param(Atom.coord, atom.coord) # False
Parameters:
schrodinger.models.parameters.param_value_to_dict(value)

Takes any representation of a param and returns a dictionary representation of param values keyed by param name. Compound params are represented as nested dictionaries. The representation can be a dictionary or an object with params.

Parameters:value (dict | object) – a dictionary or an object that has one or more params as member variables.
schrodinger.models.parameters.set_obj_params_from_value(obj, value)

Updates the values of all params in an object using the values specified in a dictionary of values keyed by param name.

Parameters:
  • obj (object) – an object that has one or more params as member variables.
  • value (dict | object) – a representation of a parameter, which can be dictionary of param names and desired values or an object with params, which will be converted into a dictionary. Any param or value which does not correspond to a param on the object will result in a ValueError being raised.
schrodinger.models.parameters.get_obj_param_value(obj, param)

Enables access to a param value on an object via an abstract param reference. The abstract reference is the one which begins with a class rather than an instance. Example, for an instance a1 of class Atom:

val = get_obj_param_value(a1, Atom.coord.x)

val should have the value of a1.coord.x, e.g. a float. It can also return a non-fundamental type, for example:

val = get_obj_param_value(a1, Atom.coord)

In this case, val is a1.coord, an instance of a Coord class that has x and :code`y` attributes.

Parameters:
  • obj – the instance from which to get the param value
  • param (Param) – an abstract Param reference that belongs to obj
schrodinger.models.parameters.set_obj_param_value(obj, param, value)

Set the value of a param on an instance by specifying the instance, an abstract param reference, and the value. Example, for an instance a1 of class Atom:

set_obj_param_value(a1, Atom.coord.x, 5)

This should set the value of a1.coord.x to 5. This function can also be used to set the value of more complicated parameters, e.g:

c = Coord()
c.x = 5
c.y = 1
set_obj_param_value(a1, Atom.coord, c)

This should set the value of a1.coord.x to 5 and the value of a1.coord.y to 1. If the Coord class had any other attributes, it would overwrite the values of those as well in a1.coord.

Parameters:
  • obj – the instance from which to get the param value
  • param (Param) – an abstract Param reference
  • value – the value to set
schrodinger.models.parameters.get_abstract_param(concrete_param)

Get the abstract param that corresponds to a concrete param

schrodinger.models.parameters.get_obj_param_values(obj)

Given an object that has params, return a dictionary of all its params values, keyed by the name of each param.

class schrodinger.models.parameters.SignalType

Bases: object

Changed = 'Changed'
Mutated = 'mutated'
ItemChanged = 'itemChanged'
Replaced = 'Replaced'
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', 'Changed': 'Changed', 'Mutated': 'mutated', 'ItemChanged': 'itemChanged', 'Replaced': 'Replaced', '__dict__': <attribute '__dict__' of 'SignalType' objects>, '__weakref__': <attribute '__weakref__' of 'SignalType' objects>, '__doc__': None})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__

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

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

schrodinger.models.parameters.get_param_signal(model, abstract_param, signal_type='Changed')
schrodinger.models.parameters.get_replaced_signal(param)
Parameters:param – the concrete compound param to get the replaced signal for
schrodinger.models.parameters.get_all_replaced_signals(obj)
class schrodinger.models.parameters.FloatParam(default_value=None, DataClass=None)

Bases: schrodinger.models.parameters.Param

DataClass

alias of builtins.float

__class__

alias of sip.wrappertype

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', 'DataClass': <class 'float'>, '__doc__': None})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__getattr__(self, str) → object
__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(default_value=None, DataClass=None)

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

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return repr(self).

__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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]

inherits(self, str) → bool
installEventFilter(self, QObject)
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)
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>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
class schrodinger.models.parameters.IntParam(default_value=None, DataClass=None)

Bases: schrodinger.models.parameters.Param

DataClass

alias of builtins.int

__class__

alias of sip.wrappertype

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', 'DataClass': <class 'int'>, '__doc__': None})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__getattr__(self, str) → object
__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(default_value=None, DataClass=None)

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

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return repr(self).

__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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]

inherits(self, str) → bool
installEventFilter(self, QObject)
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)
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>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
class schrodinger.models.parameters.StringParam(default_value=None, DataClass=None)

Bases: schrodinger.models.parameters.Param

DataClass

alias of builtins.str

__class__

alias of sip.wrappertype

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', 'DataClass': <class 'str'>, '__doc__': None})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__getattr__(self, str) → object
__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(default_value=None, DataClass=None)

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

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return repr(self).

__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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]

inherits(self, str) → bool
installEventFilter(self, QObject)
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)
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>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
class schrodinger.models.parameters.BoolParam(default_value=None, DataClass=None)

Bases: schrodinger.models.parameters.Param

DataClass

alias of builtins.bool

__class__

alias of sip.wrappertype

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', 'DataClass': <class 'bool'>, '__doc__': None})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__getattr__(self, str) → object
__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(default_value=None, DataClass=None)

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

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return repr(self).

__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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]

inherits(self, str) → bool
installEventFilter(self, QObject)
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)
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>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
class schrodinger.models.parameters.TupleParam(default_value=None, DataClass=None)

Bases: schrodinger.models.parameters.Param

DataClass

alias of builtins.tuple

__class__

alias of sip.wrappertype

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', 'DataClass': <class 'tuple'>, '__doc__': None})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__getattr__(self, str) → object
__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(default_value=None, DataClass=None)

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

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return repr(self).

__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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]

inherits(self, str) → bool
installEventFilter(self, QObject)
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)
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>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
class schrodinger.models.parameters.EnumParam(enum_class, default_value=None, *args, **kwargs)

Bases: schrodinger.models.parameters.Param

__init__(enum_class, default_value=None, *args, **kwargs)

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 builtins.object

__class__

alias of sip.wrappertype

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', '__init__': <function EnumParam.__init__>, '_setValue': <function EnumParam._setValue>, '_makeAbstractParam': <function EnumParam._makeAbstractParam>, '__doc__': None})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__getattr__(self, str) → object
__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return repr(self).

__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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]

inherits(self, str) → bool
installEventFilter(self, QObject)
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)
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>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
schrodinger.models.parameters.generate_method(parent_cls, method_name, signal_name)

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(default_value=None, DataClass=None)

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), 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
DataClass = None
classmethod __init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__class__

alias of sip.wrappertype

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', '__doc__': "\n Base class for mutable params (eg lists, sets, dicts, etc). Child classes\n should specify the names of mutation methods on the class, the method used\n to match an instance of the class to another instance (eg 'extend' for\n list), and the actual DataClass. Upon subclass declaration, the `DataClass`\n will be dynamically wrapped so signals are emitted whenever an instance\n is mutated.\n ", 'MUTATE_METHOD_NAMES': (), 'REPLACE_METHOD_NAME': None, 'DataClass': None, '__init_subclass__': <classmethod object>, '_setValue': <function BaseMutableParam._setValue>, '_castValue': <function BaseMutableParam._castValue>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__getattr__(self, str) → object
__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(default_value=None, DataClass=None)

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

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return repr(self).

__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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]

inherits(self, str) → bool
installEventFilter(self, QObject)
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)
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>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
class schrodinger.models.parameters.DictParam(value_class=None)

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

MUTATE_METHOD_NAMES = ('__setitem__', '__delitem__', 'pop', 'popitem', 'clear', 'update', 'setdefault')
REPLACE_METHOD_NAME = 'update'
__init__(value_class=None)

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

DataClass

alias of BaseMutableParam.__init_subclass__.<locals>.DataClassWithSignal

__class__

alias of sip.wrappertype

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', '__doc__': '\n A Param to represent dictionaries. Values of this param will have a\n `mutated` signal that will be emitted whenever any mutation method\n is called.\n\n The constructor optionally takes a `value_class` keyword argument\n to specify what type of class the values will be. This information will be\n used for jsonifying the dictionary if specified. (Note that non-string\n keys are not currently supported for jsonification. This may change in\n the future. See PANEL-13029).\n ', 'DataClass': <class 'schrodinger.models.parameters.BaseMutableParam.__init_subclass__.<locals>.DataClassWithSignal'>, 'MUTATE_METHOD_NAMES': ('__setitem__', '__delitem__', 'pop', 'popitem', 'clear', 'update', 'setdefault'), 'REPLACE_METHOD_NAME': 'update', '__init__': <function DictParam.__init__>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__getattr__(self, str) → object
__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

classmethod __init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return repr(self).

__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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]

inherits(self, str) → bool
installEventFilter(self, QObject)
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)
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>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
class schrodinger.models.parameters.IdDictParam(value_class=None)

Bases: schrodinger.models.parameters.DictParam

DataClass

alias of BaseMutableParam.__init_subclass__.<locals>.DataClassWithSignal

MUTATE_METHOD_NAMES = ('__setitem__', '__delitem__', 'pop', 'popitem', 'clear', 'update', 'setdefault', 'updateFromIterable')
REPLACE_METHOD_NAME = 'update'
__class__

alias of sip.wrappertype

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', 'DataClass': <class 'schrodinger.models.parameters.BaseMutableParam.__init_subclass__.<locals>.DataClassWithSignal'>, 'MUTATE_METHOD_NAMES': ('__setitem__', '__delitem__', 'pop', 'popitem', 'clear', 'update', 'setdefault', 'updateFromIterable'), '__doc__': None})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__getattr__(self, str) → object
__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(value_class=None)

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

classmethod __init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return repr(self).

__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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]

inherits(self, str) → bool
installEventFilter(self, QObject)
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)
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>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
class schrodinger.models.parameters.ListParam(item_class=None)

Bases: 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.

MUTATE_METHOD_NAMES = ('__setitem__', 'append', 'insert', '__delitem__', 'pop', 'remove', 'extend', 'reverse', 'sort', 'clear', '__iadd__')
REPLACE_METHOD_NAME = 'extend'
__init__(item_class=None)

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

DataClass

alias of BaseMutableParam.__init_subclass__.<locals>.DataClassWithSignal

__class__

alias of sip.wrappertype

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', '__doc__': '\n A Param to represent lists. Values of this param will have a\n `mutated` signal that will be emitted whenever any mutation method\n is called.\n\n The constructor optionally takes a `item_class` keyword argument\n to specify what type of class the items in the list will be. This\n information will be used for jsonifying the list if specified.\n ', 'DataClass': <class 'schrodinger.models.parameters.BaseMutableParam.__init_subclass__.<locals>.DataClassWithSignal'>, 'MUTATE_METHOD_NAMES': ('__setitem__', 'append', 'insert', '__delitem__', 'pop', 'remove', 'extend', 'reverse', 'sort', 'clear', '__iadd__'), 'REPLACE_METHOD_NAME': 'extend', '__init__': <function ListParam.__init__>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__getattr__(self, str) → object
__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

classmethod __init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return repr(self).

__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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]

inherits(self, str) → bool
installEventFilter(self, QObject)
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)
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>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
class schrodinger.models.parameters.SetParam(item_class=None)

Bases: 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.

MUTATE_METHOD_NAMES = {'difference_update', 'clear', 'update', 'symmetric_difference_update', 'intersection_update', 'discard', 'pop', 'add', 'remove'}
REPLACE_METHOD_NAME = 'update'
__init__(item_class=None)

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

DataClass

alias of BaseMutableParam.__init_subclass__.<locals>.DataClassWithSignal

__class__

alias of sip.wrappertype

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', '__doc__': '\n A Param to represent sets. Values of this param will have a\n `mutated` signal that will be emitted whenever any elment is added\n or removed from the set.\n\n The constructor optionally takes a `item_class` keyword argument\n to specify what type of class the items in the list will be. This\n information will be used for jsonifying the set if specified.\n ', 'DataClass': <class 'schrodinger.models.parameters.BaseMutableParam.__init_subclass__.<locals>.DataClassWithSignal'>, 'MUTATE_METHOD_NAMES': {'difference_update', 'clear', 'update', 'symmetric_difference_update', 'intersection_update', 'discard', 'pop', 'add', 'remove'}, 'REPLACE_METHOD_NAME': 'update', '__init__': <function SetParam.__init__>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__getattr__(self, str) → object
__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

classmethod __init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return repr(self).

__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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]

inherits(self, str) → bool
installEventFilter(self, QObject)
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)
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>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
class schrodinger.models.parameters.ParamListParam(item_class, *args, **kwargs)

Bases: schrodinger.models.parameters.ListParam

A list param that contains CompoundParam (or ParamModel) instances. Any time the value of an item in the list is changed, the ParamListParam will emit an itemChanged signal.

__init__(item_class, *args, **kwargs)

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

MUTATE_METHOD_NAMES = ('__setitem__', 'append', 'insert', '__delitem__', 'pop', 'remove', 'extend', 'reverse', 'sort', 'clear', '__iadd__')
REPLACE_METHOD_NAME = 'extend'
__class__

alias of sip.wrappertype

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', '__doc__': '\n A list param that contains `CompoundParam` (or `ParamModel`) instances. Any\n time the value of an item in the list is changed, the `ParamListParam` will\n emit an :code:`itemChanged` signal.\n ', '__init__': <function ParamListParam.__init__>, '_castValue': <function ParamListParam._castValue>, '_setValue': <function ParamListParam._setValue>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__get__(owner_instance, owner_class)

Returns the value of this param for the specific owner instance. If the value has not been set, the default value will be returned.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • owner_class (type) – the class of the owner.
__getattr__(self, str) → object
__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

classmethod __init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()

Return repr(self).

__set__(owner_instance, value)

Set the value of this param for the specific owner instance.

Parameters:
  • owner_instance (object) – the instance on which this param is an attribute. The value returned will correspond to this instance.
  • value (self.DataClass) – the value to set this param to
__set_name__(owner_name, name)

Saves the name this param is saved as.

Parameters:
  • owner_instance (object) – The instance on which this param is an attribute.
  • name (str) – The name of the attribute this descriptor was set to.
__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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]

inherits(self, str) → bool
installEventFilter(self, QObject)
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)
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>
suspend_signals()
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
valueChanged
DataClass

alias of BaseMutableParam.__init_subclass__.<locals>.DataClassWithSignal

class schrodinger.models.parameters.ParamDict

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.

__class__

alias of builtins.type

__contains__()

True if D has a key k, else False.

__delattr__

Implement delattr(self, name).

__delitem__

Delete self[key].

__dict__ = mappingproxy({'__module__': 'schrodinger.models.parameters', '__doc__': '\n A helper class to distinguish between dicts used to represent params and\n regular dicts. It has no additional functionality and should be used\n sparingly.\n ', '__dict__': <attribute '__dict__' of 'ParamDict' objects>, '__weakref__': <attribute '__weakref__' of 'ParamDict' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__getitem__()

x.__getitem__(y) <==> x[y]

__gt__

Return self>value.

__hash__ = None
__init__

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

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__iter__

Implement iter(self).

__le__

Return self<=value.

__len__

Return len(self).

__lt__

Return self<value.

__module__ = 'schrodinger.models.parameters'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__setitem__

Set self[key] to value.

__sizeof__() → size of D in memory, in bytes
__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
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() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
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