schrodinger.application.matsci.guibase module¶
GUI classes/function shared by multiple Materials Science panels.
Copyright Schrodinger, LLC. All rights reserved.
-
class
schrodinger.application.matsci.guibase.
MultiJobApp
(**kwargs)¶ Bases:
schrodinger.ui.qt.appframework2.af2.JobApp
Subclass of AF2 JobApp that allows launching multiple simultanious jobs.
Every panel subclassing this should re-implement getJobCount() and getJobSpec() methods. A start method should NOT be implemented.
-
validateJobCount
(**kwargs)¶
-
showLaunchStatus
(num_succeeded, njobs)¶ Show a label at the bottom of the panel with status of the launch.
-
getJobCount
()¶ Over-ride in the subclass to return the number of jobs that the user would like to start. Used for validation.
:return the number of jobs that the user requests. :rtype: int
-
multiJobStart
()¶ Custom “start” method. For each job, creates a job sub-directory, cd’s into it, and launches the job there.
- :return list of return values from self.launchFromJobSpec() calls.
- Each value is a Job object or False, in start mode, or True/False in write mode.
-
launchFromJobSpec
(sub_jobname, job_num, oplsdir=None)¶ Re-implemented from JobApp; options and behavior is somewhat differnt.
Starts or write the command for the given subjob.
Returns: Job object on successful start; True on successful write, False on failure.
-
DrawChildren
= 2¶
-
DrawWindowBackground
= 1¶
-
IGNORE_DELAYED_CALLBACKS
= False¶
-
IgnoreMask
= 4¶
-
NO_PROGRESS_BAR
= 0¶
-
PROGRESS_BAR_NO_TEXT
= 2¶
-
PROGRESS_BAR_WITH_TEXT
= 1¶
-
class
PaintDeviceMetric
¶ Bases:
int
-
__abs__
¶ abs(self)
-
__add__
¶ Return self+value.
-
__and__
¶ Return self&value.
-
__bool__
¶ self != 0
-
__ceil__
()¶ Ceiling of an Integral returns itself.
-
__class__
¶ alias of
sip.enumtype
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'PyQt5.QtGui', '__dict__': <attribute '__dict__' of 'PaintDeviceMetric' objects>, '__doc__': None, '__reduce__': <method '_pickle_enum' of 'PaintDeviceMetric' objects>})¶
-
__dir__
() → list¶ default dir() implementation
-
__divmod__
¶ Return divmod(self, value).
-
__eq__
¶ Return self==value.
-
__float__
¶ float(self)
-
__floor__
()¶ Flooring an Integral returns itself.
-
__floordiv__
¶ Return self//value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__getnewargs__
()¶
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__index__
¶ Return self converted to an integer, if self is suitable for use as an index into a list.
-
__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.
-
__int__
¶ int(self)
-
__invert__
¶ ~self
-
__le__
¶ Return self<=value.
-
__lshift__
¶ Return self<<value.
-
__lt__
¶ Return self<value.
-
__mod__
¶ Return self%value.
-
__module__
= 'PyQt5.QtGui'¶
-
__mul__
¶ Return self*value.
-
__ne__
¶ Return self!=value.
-
__neg__
¶ -self
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__or__
¶ Return self|value.
-
__pos__
¶ +self
-
__pow__
¶ Return pow(self, value, mod).
-
__radd__
¶ Return value+self.
-
__rand__
¶ Return value&self.
-
__rdivmod__
¶ Return divmod(value, self).
-
__reduce__
()¶
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__rfloordiv__
¶ Return value//self.
-
__rlshift__
¶ Return value<<self.
-
__rmod__
¶ Return value%self.
-
__rmul__
¶ Return value*self.
-
__ror__
¶ Return value|self.
-
__round__
()¶ Rounding an Integral returns itself. Rounding with an ndigits argument also returns an integer.
-
__rpow__
¶ Return pow(value, self, mod).
-
__rrshift__
¶ Return value>>self.
-
__rshift__
¶ Return self>>value.
-
__rsub__
¶ Return value-self.
-
__rtruediv__
¶ Return value/self.
-
__rxor__
¶ Return value^self.
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
()¶ Returns size in memory, in bytes
-
__str__
¶ Return str(self).
-
__sub__
¶ Return self-value.
-
__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).
-
__truediv__
¶ Return self/value.
-
__trunc__
()¶ Truncating an Integral returns itself.
-
__xor__
¶ Return self^value.
-
bit_length
() → int¶ Number of bits necessary to represent self in binary. >>> bin(37) ‘0b100101’ >>> (37).bit_length() 6
-
conjugate
()¶ Returns self, the complex conjugate of any int.
-
denominator
¶ the denominator of a rational number in lowest terms
-
from_bytes
(bytes, byteorder, *, signed=False) → int¶ Return the integer represented by the given array of bytes.
The bytes argument must be a bytes-like object (e.g. bytes or bytearray).
The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
The signed keyword-only argument indicates whether two’s complement is used to represent the integer.
-
imag
¶ the imaginary part of a complex number
-
numerator
¶ the numerator of a rational number in lowest terms
-
real
¶ the real part of a complex number
-
to_bytes
(length, byteorder, *, signed=False) → bytes¶ Return an array of bytes representing an integer.
The integer is represented using length bytes. An OverflowError is raised if the integer is not representable with the given number of bytes.
The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
The signed keyword-only argument determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
-
-
PdmDepth
= 6¶
-
PdmDevicePixelRatio
= 11¶
-
PdmDevicePixelRatioScaled
= 12¶
-
PdmDpiX
= 7¶
-
PdmDpiY
= 8¶
-
PdmHeight
= 2¶
-
PdmHeightMM
= 4¶
-
PdmNumColors
= 5¶
-
PdmPhysicalDpiX
= 9¶
-
PdmPhysicalDpiY
= 10¶
-
PdmWidth
= 1¶
-
PdmWidthMM
= 3¶
-
class
RenderFlag
¶ Bases:
int
-
__abs__
¶ abs(self)
-
__add__
¶ Return self+value.
-
__and__
¶ Return self&value.
-
__bool__
¶ self != 0
-
__ceil__
()¶ Ceiling of an Integral returns itself.
-
__class__
¶ alias of
sip.enumtype
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'PyQt5.QtWidgets', '__or__': <slot wrapper '__or__' of 'RenderFlag' objects>, '__ror__': <slot wrapper '__ror__' of 'RenderFlag' objects>, '__dict__': <attribute '__dict__' of 'RenderFlag' objects>, '__doc__': None, '__reduce__': <method '_pickle_enum' of 'RenderFlag' objects>})¶
-
__dir__
() → list¶ default dir() implementation
-
__divmod__
¶ Return divmod(self, value).
-
__eq__
¶ Return self==value.
-
__float__
¶ float(self)
-
__floor__
()¶ Flooring an Integral returns itself.
-
__floordiv__
¶ Return self//value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__getnewargs__
()¶
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__index__
¶ Return self converted to an integer, if self is suitable for use as an index into a list.
-
__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.
-
__int__
¶ int(self)
-
__invert__
¶ ~self
-
__le__
¶ Return self<=value.
-
__lshift__
¶ Return self<<value.
-
__lt__
¶ Return self<value.
-
__mod__
¶ Return self%value.
-
__module__
= 'PyQt5.QtWidgets'¶
-
__mul__
¶ Return self*value.
-
__ne__
¶ Return self!=value.
-
__neg__
¶ -self
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__or__
¶ Return self|value.
-
__pos__
¶ +self
-
__pow__
¶ Return pow(self, value, mod).
-
__radd__
¶ Return value+self.
-
__rand__
¶ Return value&self.
-
__rdivmod__
¶ Return divmod(value, self).
-
__reduce__
()¶
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__rfloordiv__
¶ Return value//self.
-
__rlshift__
¶ Return value<<self.
-
__rmod__
¶ Return value%self.
-
__rmul__
¶ Return value*self.
-
__ror__
¶ Return value|self.
-
__round__
()¶ Rounding an Integral returns itself. Rounding with an ndigits argument also returns an integer.
-
__rpow__
¶ Return pow(value, self, mod).
-
__rrshift__
¶ Return value>>self.
-
__rshift__
¶ Return self>>value.
-
__rsub__
¶ Return value-self.
-
__rtruediv__
¶ Return value/self.
-
__rxor__
¶ Return value^self.
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
()¶ Returns size in memory, in bytes
-
__str__
¶ Return str(self).
-
__sub__
¶ Return self-value.
-
__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).
-
__truediv__
¶ Return self/value.
-
__trunc__
()¶ Truncating an Integral returns itself.
-
__xor__
¶ Return self^value.
-
bit_length
() → int¶ Number of bits necessary to represent self in binary. >>> bin(37) ‘0b100101’ >>> (37).bit_length() 6
-
conjugate
()¶ Returns self, the complex conjugate of any int.
-
denominator
¶ the denominator of a rational number in lowest terms
-
from_bytes
(bytes, byteorder, *, signed=False) → int¶ Return the integer represented by the given array of bytes.
The bytes argument must be a bytes-like object (e.g. bytes or bytearray).
The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
The signed keyword-only argument indicates whether two’s complement is used to represent the integer.
-
imag
¶ the imaginary part of a complex number
-
numerator
¶ the numerator of a rational number in lowest terms
-
real
¶ the real part of a complex number
-
to_bytes
(length, byteorder, *, signed=False) → bytes¶ Return an array of bytes representing an integer.
The integer is represented using length bytes. An OverflowError is raised if the integer is not representable with the given number of bytes.
The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
The signed keyword-only argument determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
-
-
class
RenderFlags
¶ Bases:
sip.simplewrapper
QWidget.RenderFlags(Union[QWidget.RenderFlags, QWidget.RenderFlag]) QWidget.RenderFlags(QWidget.RenderFlags)
-
__and__
¶ Return self&value.
-
__bool__
¶ self != 0
-
__class__
¶ alias of
sip.wrappertype
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'PyQt5.QtWidgets', '__hash__': <slot wrapper '__hash__' of 'RenderFlags' objects>, '__lt__': <slot wrapper '__lt__' of 'RenderFlags' objects>, '__le__': <slot wrapper '__le__' of 'RenderFlags' objects>, '__eq__': <slot wrapper '__eq__' of 'RenderFlags' objects>, '__ne__': <slot wrapper '__ne__' of 'RenderFlags' objects>, '__gt__': <slot wrapper '__gt__' of 'RenderFlags' objects>, '__ge__': <slot wrapper '__ge__' of 'RenderFlags' objects>, '__bool__': <slot wrapper '__bool__' of 'RenderFlags' objects>, '__invert__': <slot wrapper '__invert__' of 'RenderFlags' objects>, '__and__': <slot wrapper '__and__' of 'RenderFlags' objects>, '__rand__': <slot wrapper '__rand__' of 'RenderFlags' objects>, '__xor__': <slot wrapper '__xor__' of 'RenderFlags' objects>, '__rxor__': <slot wrapper '__rxor__' of 'RenderFlags' objects>, '__or__': <slot wrapper '__or__' of 'RenderFlags' objects>, '__ror__': <slot wrapper '__ror__' of 'RenderFlags' objects>, '__int__': <slot wrapper '__int__' of 'RenderFlags' objects>, '__iand__': <slot wrapper '__iand__' of 'RenderFlags' objects>, '__ixor__': <slot wrapper '__ixor__' of 'RenderFlags' objects>, '__ior__': <slot wrapper '__ior__' of 'RenderFlags' objects>, '__weakref__': <attribute '__weakref__' of 'RenderFlags' objects>, '__doc__': 'QWidget.RenderFlags()\nQWidget.RenderFlags(Union[QWidget.RenderFlags, QWidget.RenderFlag])\nQWidget.RenderFlags(QWidget.RenderFlags)'})¶
-
__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).
-
__iand__
¶ Return self&=value.
-
__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.
-
__int__
¶ int(self)
-
__invert__
¶ ~self
-
__ior__
¶ Return self|=value.
-
__ixor__
¶ Return self^=value.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'PyQt5.QtWidgets'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__or__
¶ Return self|value.
-
__rand__
¶ Return value&self.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__ror__
¶ Return value|self.
-
__rxor__
¶ Return value^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)
-
__xor__
¶ Return self^value.
-
-
__class__
¶ alias of
sip.wrappertype
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.matsci.guibase', '__doc__': '\n Subclass of AF2 JobApp that allows launching multiple simultanious jobs.\n\n Every panel subclassing this should re-implement getJobCount() and\n getJobSpec() methods. A start method should NOT be implemented.\n ', '_startOrWrite': <function MultiJobApp._startOrWrite>, 'validateJobCount': <function validator.<locals>.setOrder.<locals>.inner>, '_preLaunchValidate': <function MultiJobApp._preLaunchValidate>, 'showLaunchStatus': <function MultiJobApp.showLaunchStatus>, 'getJobCount': <function MultiJobApp.getJobCount>, 'multiJobStart': <function MultiJobApp.multiJobStart>, 'launchFromJobSpec': <function MultiJobApp.launchFromJobSpec>, '_getSHFilename': <function MultiJobApp._getSHFilename>})¶
-
__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).
-
__getitem__
(key)¶
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init__
(**kwargs)¶ Parameters: - stop_before (int) – Exit the constructor before specified step.
- parent (QWidget) – Parent widget, if any.
- in_knime (bool) – Whether we are currently running under KNIME - a mode in which input selector is hidden, optionally a custom Workspace Structure is specified, and buttom bar has OK & Cancel buttons.
- workspace_st_file (bool) – Structure to be returned by getWorkspaceStructure() when in_knime is True.
-
__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.application.matsci.guibase'¶
-
__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__
(key, 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)
-
acceptDrops
(self) → bool¶
-
accessibleDescription
(self) → str¶
-
accessibleName
(self) → str¶
-
actionEvent
(self, QActionEvent)¶
-
actions
(self) → List[QAction]¶
-
activateWindow
(self)¶
-
addAction
(self, QAction)¶
-
addActions
(self, object)¶
-
addJaguarMarker
(atoms, color=None, icon=None, text='', alt_color=None, highlight=False)¶ Add a marker to the specified atom(s)
Parameters: - atoms (list or
schrodinger.structure._StructureAtom
) – The atom or list of atoms to mark. A list may contain between one and four atoms (inclusive). - color (tuple, str, int, or
schrodinger.structutils.color
) – The color of the marker and icon. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, white will be used. - icon (int) – The icon to draw next to the marker. Should be one the self.MARKER_ICONS constants. If not given, no icon will be drawn.
- text (str) – The text to display next to the marker. If not given, no text will be displayed. Note that this argument will be ignored when marking a single atom.
- alt_color (tuple, str, int, or
schrodinger.structutils.color
) – The alternate marker color. This color is always used for text, and is used for the marker and icon whenhighlight
is True. If not given,color
will be used. - highlight (bool) – Whether the marker should be highlighted. A
highlighted marker is indicated with thicker lines and is colored using
alt_color
instead ofcolor
.
Returns: The newly created marker
Return type: schrodinger.maestro.markers._BaseMarker
Raises: ValueError – If a marker already exists for the specified atoms
Note: Either an icon or text may be displayed on a marker, but not both. If both are given, only the text will be shown.
- atoms (list or
-
addMainTaskRunner
(runner, taskwidget)¶ A “main” task runner is a runner that is operated by a task widget (generally a job bar) at the very bottom of the panel. A panel may have more than one main task, but there is always one that is the “current” task. This is useful for panels that have multiple modes, with each mode launching a different job.
The related method, self.setCurrentTask(), is used to switch between main runners that have been added via this function.
Parameters: - runner (tasks.AbstractTaskRuner) – the task runner
- taskwidget (taskwidgets.TaskUIMixin) – the associated task widget
-
addMarker
(atoms, color=(1.0, 1.0, 1.0), group_name=None)¶ Generates a set of simple, dot-styled markers for a group of atoms.
Parameters: - atoms (list or
schrodinger.structure._StructureAtom
) – List of atoms to be marked - color (tuple of 3 floats) – The amount of red, green and blue to use, each ranging from 0.0 to 1.0. Default is white (1., 1., 1.).
@group_name: Optional string to set as the name of this group of markers in Maestro. If not set, a unique identifier will be generated.
- atoms (list or
-
addMarkerFromAsl
(asl, color=(1.0, 1.0, 1.0), group_name=None)¶ Generates a set of simple, dot-styled markers for group of Workspace atoms that match the given ASL. Same atoms continue to be marked even if the Workspace is later modified such that ASL matching changes.
Parameters: - asl – ASL for the atoms to mark.
- color (tuple of 3 floats) – The amount of red, green and blue to use, each ranging from 0.0 to 1.0. Default is white (1., 1., 1.).
@group_name: Optional string to set as the name of this group of markers in Maestro. If not set, a unique identifier will be generated.
Returns: Marker object Return type: markers.Marker
-
addProjectJobNote
(job_id, jobname)¶ Adds a note to the project annotation file. :param job_id: The ID of the job, as assigned by Maestro :type job_id: string :param jobname: The name of the job, as shown in the job panel :type jobname: string
-
adjustSize
(self)¶
-
applyAliasedSettings
(settings)¶ Applies any aliased settings with new values from the dictionary. Any aliases not present in the settings dictionary will be left unchanged.
Parameters: settings (dict) – a dictionary mapping aliases to new values to apply
-
applySettings
(settings, target=None)¶
-
autoFillBackground
(self) → bool¶
-
backgroundRole
(self) → QPalette.ColorRole¶
-
baseSize
(self) → QSize¶
-
blockSignals
(self, bool) → bool¶
-
buildCallbackDicts
()¶ Create a dictionary of all methods that have a maestro_callback decorator.
-
changeEvent
(self, QEvent)¶
-
childAt
(self, QPoint) → QWidget¶ childAt(self, int, int) -> QWidget
-
childEvent
(self, QChildEvent)¶
-
children
(self) → object¶
-
childrenRect
(self) → QRect¶
-
childrenRegion
(self) → QRegion¶
-
cleanup
()¶
-
cleanupWriteCmd
(cmdlist)¶ Removes options from the command that only work within Maestro. :param cmdlist: the job invocation command :type cmdlist: list
-
clearFocus
(self)¶
-
clearMask
(self)¶
-
close
(self) → bool¶
-
closeEvent
(event)¶ Receives the close event and calls the panel’s ‘close’-decorated appmethod. If the appmethod specifically returns False, the close event will be ignored and the panel will remain open. All other return values (including None) will allow the panel to proceed with closing.
This is a PyQT slot method and should not be explicitly called.
-
cmdListToCmd
(cmdlist)¶ Converts a command list to a command string.
Parameters: cmdlist (list) – a list of commands Returns: a command string with all arguments wrapped in double quotes
-
colorCount
(self) → int¶
-
configDialogSettings
()¶
-
connectNotify
(self, QMetaMethod)¶
-
contentsMargins
(self) → QMargins¶
-
contentsRect
(self) → QRect¶
-
contextMenuEvent
(self, QContextMenuEvent)¶
-
contextMenuPolicy
(self) → Qt.ContextMenuPolicy¶
-
create
(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
-
createBottomBar
()¶
-
createInputSelector
()¶
-
createJobDir
()¶
-
createWindowContainer
(QWindow, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = 0) → QWidget¶
-
currentTaskRunner
()¶
-
cursor
(self) → QCursor¶
-
customContextMenuRequested
¶ customContextMenuRequested(self, QPoint) [signal]
-
customEvent
(self, QEvent)¶
-
definePanelSettings
()¶ Override this method to define the settings for the panel. The aliased settings provide an interface for saving/restoring panel state as well as for interacting with task/job runners that need to access the panel state in a way that is agnostic to the specifics of widget names and types.
Each panel setting is defined by a tuple that specifies the mapping of alias to panel setting. An optional third element in the tuple can be used to group settings by category. This allows multiple settings to share the same alias.
Each setting can either point to a specific object (usually a qt widget), or a pair of setter/getter functions.
If the mapped object is a string, this will be interpreted by af2 as referring to an attribute on the panel, and a AttributeSettingWrapper instance will automatically be created. For example, specifying the string ‘num_atoms’ will create a mapping to self.num_atoms which will simply get and set the value of that instance member.
Custom setter and getter functions should take the form getter(), returning a value that can be encoded/decoded by JSON, and setter(value), where the type of value is the same as the return type of the getter.
Commonly used objects/widgets should be handled automatically in settings.py. It’s worth considering whether it makes more sense to use a custom setter/getter here or add support for the widget in settings.py.
Returns: a list of tuples defining the custom settings. Return type: list of tuples. Each tuple can be of type (str, object, str) or (str, (callable, callable), str) where the final str is optional. Custom settings tuples consists of up to three elements:
alias - a string identier for the setting. Ex. “box_centroid”
either:
- an object of a type that is supported by settings.py or
- the string name of an existing panel attribute (i.e. member variable), or
- a (getter, setter) tuple. The getter should take no arguments, and the setter should take a single value.
optionally, a group identifier. This can be useful if the panel runs two different jobs that both have a parameter with the same name but that needs to map to different widgets. If a setting has a group name, it will be ignored by runners unless the runner name matches the group name.
-
deleteLater
(self)¶
-
depth
(self) → int¶
-
destroy
(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
-
destroyed
¶ destroyed(self, QObject = None) [signal]
-
devType
(self) → int¶
-
devicePixelRatio
(self) → int¶
-
devicePixelRatioF
(self) → float¶
-
devicePixelRatioFScale
() → float¶
-
disconnect
(self)¶
-
disconnectNotify
(self, QMetaMethod)¶
-
dragEnterEvent
(self, QDragEnterEvent)¶
-
dragLeaveEvent
(self, QDragLeaveEvent)¶
-
dragMoveEvent
(self, QDragMoveEvent)¶
-
dropEvent
(self, QDropEvent)¶
-
dumpObjectInfo
(self)¶
-
dumpObjectTree
(self)¶
-
dynamicPropertyNames
(self) → object¶
-
effectiveWinId
(self) → sip.voidptr¶
-
ensurePolished
(self)¶
-
enterEvent
(self, QEvent)¶
-
error
(text, preferences=None, key='')¶ Display an error dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.
Parameters: - text (str) – The information to display in the dialog
- preferences (
schrodinger.utils.preferences.Preferences
object) – The Preferences class to use to store the show/don’t show preference for this dialog. Note that the Preferences object must currently be set to the preference group containing key. - key (str) – The key to store the preference under
Return type: None
-
event
(self, QEvent) → bool¶
-
eventFilter
(self, QObject, QEvent) → bool¶
-
find
(sip.voidptr) → QWidget¶
-
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]
-
focusInEvent
(self, QFocusEvent)¶
-
focusNextChild
(self) → bool¶
-
focusNextPrevChild
(self, bool) → bool¶
-
focusOutEvent
(self, QFocusEvent)¶
-
focusPolicy
(self) → Qt.FocusPolicy¶
-
focusPreviousChild
(self) → bool¶
-
focusProxy
(self) → QWidget¶
-
focusWidget
(self) → QWidget¶
-
font
(self) → QFont¶
-
fontInfo
(self) → QFontInfo¶
-
fontMetrics
(self) → QFontMetrics¶
-
foregroundRole
(self) → QPalette.ColorRole¶
-
frameGeometry
(self) → QRect¶
-
frameSize
(self) → QSize¶
-
generateStatus
()¶ Generate the text to put into the status bar
Returns: The text to put into the status bar Return type: str
-
geometry
(self) → QRect¶
-
getAliasedSettings
()¶
-
getAliasedValue
(alias)¶
-
getAllJaguarMarkers
()¶ Get all markers._BaseMarker currently loaded into the panel
Returns: An iterator of markers._BaseMarker Return type: iterator
-
getAllMarkers
()¶ Get all markers.Marker loaded into the panel
Returns: list(markers.Marker) Return type: list
-
getCmdListArgValue
(cmdlist, arg)¶
-
getConfigDialog
()¶
-
getContentsMargins
(self) → Tuple[int, int, int, int]¶
-
getJaguarMarker
(atoms)¶ Retrieve a marker for the specified atom(s)
Parameters: atoms (list or schrodinger.structure._StructureAtom
) – The atom or list of atoms to retrieve the marker for. A list may contain between one and four atoms (inclusive).Returns: The requested marker Return type: schrodinger.maestro.markers._BaseMarker
Raises: ValueError – If no marker exists for the specified atoms Note: As indicated by the return type, this function only returns schrodinger.maestro.markers._BaseMarker
derived markers. Multi atomschrodinger.maestro.markers.Marker
type markers are not accessible in this way.
-
getJobSpec
()¶
-
getObjValue
(obj)¶
-
getPanelState
()¶ Gets the current state of the panel in the form of a serializable dict. The state consists of the settings specified in definePanelSettings() as well as the automatically harvested settings.
-
getPersistenceKey
(alias)¶ Return a unique identifier for saving/restoring a setting in the preferences. Override this method to change the key scheme (this is necessary if creating a common resource which is shared by multiple panels).
Parameters: alias (str) – the alias for which we are generating a key
-
getSettings
(target=None, ignore_list=None)¶
-
getWorkspaceStructure
()¶ If panel is open in Maestro session, returns the current workspace
schrodinger.strucutre.Structure
.If panel is open from outside of Maestro, returns the self.workspace_st if self.workspace_st_file is available. Used while running from command line or starting the panel from KNIME.
Returns None otherwise.
Return type: schrodinger.structure.Structure
or NoneReturns: Maestro workspace structure or None
-
grab
(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(-1, -1))) → QPixmap¶
-
grabGesture
(self, Qt.GestureType, flags: Union[Qt.GestureFlags, Qt.GestureFlag] = Qt.GestureFlags())¶
-
grabKeyboard
(self)¶
-
grabMouse
(self)¶ grabMouse(self, Union[QCursor, Qt.CursorShape])
-
grabShortcut
(self, Union[QKeySequence, QKeySequence.StandardKey, str, int], context: Qt.ShortcutContext = Qt.WindowShortcut) → int¶
-
graphicsEffect
(self) → QGraphicsEffect¶
-
graphicsProxyWidget
(self) → QGraphicsProxyWidget¶
-
gui_closed
¶
-
hasFocus
(self) → bool¶
-
hasHeightForWidth
(self) → bool¶
-
hasMouseTracking
(self) → bool¶
-
hasTabletTracking
(self) → bool¶
-
height
(self) → int¶
-
heightForWidth
(self, int) → int¶
-
heightMM
(self) → int¶
-
hide
(self)¶
-
hideAllJaguarMarkers
()¶ Hide all
schrodinger.maestro.markers._BaseMarker
markers for this panel
-
hideAllMarkers
()¶ Hide all
schrodinger.maestro.markers.Marker
markers for this panel.
-
hideEvent
(event)¶
-
ignoreMaestroCallbacks
()¶ A context manager for temporarily disabling Maestro callbacks created using the decorators above. (Note that callbacks that have been manually added using maestro.*_callback_add() will not be disabled.)
Example:
def includeEntry(self, entry_id): proj = maestro.project_table_get() with self.ignoreMaestroCallbacks(): proj[entry_id].in_workspace = project.IN_WORKSPACE @maestro_callback.project_changed def onProjectChanged(self): print "This method will not be called during includeEntry." @maestro_callback.workspace_changed def onWorkspaceChanged(self): print "Neither will this one."
-
info
(text, preferences=None, key='')¶ Display an information dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.
Parameters: - text (str) – The information to display in the dialog
- preferences (
schrodinger.utils.preferences.Preferences
object) – The Preferences class to use to store the show/don’t show preference for this dialog. Note that the Preferences object must currently be set to the preference group containing key. - key (str) – The key to store the preference under
Return type: None
-
inherits
(self, str) → bool¶
-
initPainter
(self, QPainter)¶
-
inputMethodEvent
(self, QInputMethodEvent)¶
-
inputMethodHints
(self) → Qt.InputMethodHints¶
-
inputMethodQuery
(self, Qt.InputMethodQuery) → Any¶
-
insertAction
(self, QAction, QAction)¶
-
insertActions
(self, QAction, Iterable[QAction])¶
-
installEventFilter
(self, QObject)¶
-
isActiveWindow
(self) → bool¶
-
isAncestorOf
(self, QWidget) → bool¶
-
isEnabled
(self) → bool¶
-
isEnabledTo
(self, QWidget) → bool¶
-
isFullScreen
(self) → bool¶
-
isHidden
(self) → bool¶
-
isLeftToRight
(self) → bool¶
-
isMaximized
(self) → bool¶
-
isMinimized
(self) → bool¶
-
isModal
(self) → bool¶
-
isRightToLeft
(self) → bool¶
-
isSignalConnected
(self, QMetaMethod) → bool¶
-
isVisible
(self) → bool¶
-
isVisibleTo
(self, QWidget) → bool¶
-
isWidgetType
(self) → bool¶
-
isWindow
(self) → bool¶
-
isWindowModified
(self) → bool¶
-
isWindowType
(self) → bool¶
-
jobDir
()¶
-
jobname
()¶ Return the job name currently set for the current task.
-
jobnameData
()¶ Provides panel settings that are to be incorporated into job names. If self.default_jobname includes string formatting characters (i.e. %s, {0}, etc.), then this method must be implemented. It should return a tuple or a dictionary to be interpolated into the job name.
-
jobnameDataChanged
()¶ If the job name includes panel settings, then this method should be called whenever the relevant panel settings are modified
-
keyPressEvent
(self, QKeyEvent)¶
-
keyReleaseEvent
(self, QKeyEvent)¶
-
keyboardGrabber
() → QWidget¶
-
killTimer
(self, int)¶
-
lastJobCompleted
¶
-
launchJobCmd
(cmdlist, show_progress_bar=0, auto_add_host=True, use_parallel_flag=True)¶ Launches a job control command. Use this to launch scripts that accept the standard job control options arguments like -HOST, -DISP, etc. By default, automatically populates standard arguments from the config dialog, but will not overwrite if they are already found in cmdlist. For example, if -HOST is found in cmdlist, launchJobCmd will ignore the host specified in the config dialog.
This method honors self.start_mode; it can either launch the script or write out a job file to the job directory.
Parameters: - cmdlist (list) – the command list
- show_progress_bar (int) – Whether or not to show a progress bar tracking the job’s status. If NO_PROGRESS_BAR, no progress bar will be shown. If PROGRESS_BAR_NO_TEXT, a progress bar will be shown. If PROGRESS_BAR_WITH_TEXT, a progress bar will be shown and will also display the job progress text description.
- auto_add_host (bool) – Whether or not to automatically add -HOST flag to command when it is not already included.
- use_parallel_flag (bool) – Whether requesting CPUs > 1 without specifying threads > 1 should be represented by the use of the -PARALLEL X flag (True, default) or -HOST host:X (False). -PARALLEL is a Jaguar flag and may not be appropriate for other programs.
-
launchLauncher
(slauncher, show_progress_bar=0)¶ Either launches a launcher instance or writes the job invocation command, depending on the state of self.start_mode. This allows the panel’s start method to double as a write method.
Calling launchLauncher() is only necessary if creating a customized launcher using makeLauncher().
Parameters: show_progress_bar (int) – Whether or not to show a progress bar tracking the job’s status. If NO_PROGRESS_BAR, no progress bar will be shown. If PROGRESS_BAR_NO_TEXT, a progress bar will be shown. If PROGRESS_BAR_WITH_TEXT, a progress bar will be shown and will also display the job progress text description.
-
launchScript
(script, script_args=None, input_files=[], structure_output_file=None, output_files=[], aux_modules=[], show_progress_bar=0, **kwargs)¶ DEPRECATED for launchFromJobSpec.
Creates and launches a script using makeLauncher. For documentation on method parameters, see makeLauncher below. Use this method for scripts that do not themselves integrate with job control.
This method honors self.start_mode; it can either launch the script or write out a job file to the job directory.
Parameters: show_progress_bar (int) – Whether or not to show a progress bar tracking the job’s status. If NO_PROGRESS_BAR, no progress bar will be shown. If PROGRESS_BAR_NO_TEXT, a progress bar will be shown. If PROGRESS_BAR_WITH_TEXT, a progress bar will be shown and will also display the job progress text description.
-
launcherToCmdList
(slauncher)¶
-
layOut
()¶
-
layout
(self) → QLayout¶
-
layoutDirection
(self) → Qt.LayoutDirection¶
-
leaveEvent
(self, QEvent)¶
-
loadPanelState
(filename=None)¶ Load the panel state from a JSON file
Parameters: filename (str) – the JSON filename. Defaults to “panelstate.json”
-
loadPersistentOptions
()¶ Load all persistent options from the preferences.
-
loadSettings
(jobname)¶ Load the GUI state for the job in the CWD with the given name. Each KNIME panel will need to implement a custom version. For example, the panel may want to read the <jobname.sh> file, parse the list of command-line options, and populate the GUI accordintly. If a panel writes key/value file, then it would need to read it here.
Returns: True if panel state was restored, False if saved state was not found. Return type: bool
-
locale
(self) → QLocale¶
-
logicalDpiX
(self) → int¶
-
logicalDpiY
(self) → int¶
-
lower
(self)¶
-
makeLauncher
(script, script_args=[], input_files=[], structure_output_file=None, output_files=[], aux_modules=[], **kwargs)¶ DEPRECATED for launchFromJobSpec.
Create a launcher.Launcher instance using the settings defined by the panel, its config dialog, and specified arguments. Returns a launcher instance ready to be launched or further modified. Use this method for scripts that do not themselves integrate with job control.
Only use this method if you need to modify the launcher before launching it. Otherwise, the method launchScript() is preferred to create the launcher and launch it.
Parameters: - script (str) – Remote path to the script to be launched. See Launcher documentation for more info. If only launching to localhost is desired, then a local path can be specified.
- script_args (list of str) – arguments to be added to the script’s command line
- input_files (list of str) – input files that will be copied to the temporary job directory.
- structure_output_file (str) – this is the file that will be registered with job control to incorporate at the end of the job
- output_files (list of str) – additional output files to be copied back from the temporary job directory
- aux_modules (list of modules) – Additional modules required by the script
Returns: A prepped launcher
Return type:
-
mapFrom
(self, QWidget, QPoint) → QPoint¶
-
mapFromGlobal
(self, QPoint) → QPoint¶
-
mapFromParent
(self, QPoint) → QPoint¶
-
mapTo
(self, QWidget, QPoint) → QPoint¶
-
mapToGlobal
(self, QPoint) → QPoint¶
-
mapToParent
(self, QPoint) → QPoint¶
-
mask
(self) → QRegion¶
-
maximumHeight
(self) → int¶
-
maximumSize
(self) → QSize¶
-
maximumWidth
(self) → int¶
-
metaObject
(self) → QMetaObject¶
-
metric
(self, QPaintDevice.PaintDeviceMetric) → int¶
-
minimumHeight
(self) → int¶
-
minimumSize
(self) → QSize¶
-
minimumSizeHint
(self) → QSize¶
-
minimumWidth
(self) → int¶
-
mouseDoubleClickEvent
(self, QMouseEvent)¶
-
mouseGrabber
() → QWidget¶
-
mouseMoveEvent
(self, QMouseEvent)¶
-
mousePressEvent
(self, QMouseEvent)¶
-
mouseReleaseEvent
(self, QMouseEvent)¶
-
move
(self, QPoint)¶ move(self, int, int)
-
moveEvent
(self, QMoveEvent)¶
-
moveToThread
(self, QThread)¶
-
nativeEvent
(self, Union[QByteArray, bytes, bytearray], sip.voidptr) → Tuple[bool, int]¶
-
nativeParentWidget
(self) → QWidget¶
-
nextInFocusChain
(self) → QWidget¶
-
normalGeometry
(self) → QRect¶
-
objectName
(self) → str¶
-
objectNameChanged
¶ objectNameChanged(self, str) [signal]
-
overrideWindowFlags
(self, Union[Qt.WindowFlags, Qt.WindowType])¶
-
overrideWindowState
(self, Union[Qt.WindowStates, Qt.WindowState])¶
-
paintEngine
(self) → QPaintEngine¶
-
paintEvent
(self, QPaintEvent)¶
-
paintingActive
(self) → bool¶
-
palette
(self) → QPalette¶
-
classmethod
panel
(run=True)¶ Launch a singleton instance of this class. If the panel has already been instantiated, the existing panel instance will be re-opened and brought to the front.
Parameters: run (bool) – Whether to launch the panel Returns: The singleton panel instance Return type: App
-
parent
(self) → QObject¶
-
parentWidget
(self) → QWidget¶
-
physicalDpiX
(self) → int¶
-
physicalDpiY
(self) → int¶
-
pos
(self) → QPoint¶
-
previousInFocusChain
(self) → QWidget¶
-
processSettings
(settings=None, runner=None)¶ This method is meant to be used as a callback to a task runner. If it is called with no arguments, it returns a dictionary of all the alieased settings. If settings are passed, the settings are first applied to self, and then the newly modified settings are returned.
Parameters: - settings (dict or None) – a settings dictionary to apply to this object
- runner (tasks.AbstractTaskRuner) – the task runner that is invoking this callback. This optional argument is necessary for per-runner grouping of settings
-
processTaskMessage
(message_type, text, options=None, runner=None)¶ This method is meant to be used as a callback to a task runner, and provides a single point of interaction from the runner to the user.
Parameters: - message_type (int) – the type of message being sent
- text (str) – the main text to show the user
- options – extra options
-
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.
-
question
(msg, button1='OK', button2='Cancel', title='Question')¶ Display a prompt dialog window with specified text. Returns True if first button (default OK) is pressed, False otherwise.
-
raise_
(self)¶
-
readShFile
(jobname)¶ Reads the jobname.sh file (written by _write()) and returns the list of command line arguments
-
receivers
(self, PYQT_SIGNAL) → int¶
-
rect
(self) → QRect¶
-
registerJob
(job, show_progress_bar=0)¶ Registers a job with the periodic job check callback and starts timer.
Parameters: - job (jobcontrol.Job) – job to register
- show_progress_bar (int) – Whether or not to show a progress bar tracking the job’s status. If NO_PROGRESS_BAR, no progress bar will be shown. If PROGRESS_BAR_NO_TEXT, a progress bar will be shown. If PROGRESS_BAR_WITH_TEXT, a progress bar will be shown and will also display the job progress text description.
-
releaseKeyboard
(self)¶
-
releaseMouse
(self)¶
-
releaseShortcut
(self, int)¶
-
removeAction
(self, QAction)¶
-
removeAllJaguarMarkers
()¶ Remove all markers
schrodinger.maestro.markers._BaseMarker
markers from this panel
-
removeAllJaguarMarkersForEntry
(eid)¶ Remove all markers for the specified entry id from this panel
Parameters: eid (str) – The entry id to remove markers for
-
removeAllMarkers
()¶ Remove all
schrodinger.maestro.markers.Marker
markers from this panel.
-
removeEventFilter
(self, QObject)¶
-
removeJaguarMarker
(marker)¶ Removes the specified marker
Parameters: marker ( schrodinger.maestro.markers._BaseMarker
) – The marker to removeRaises: ValueError – If there is no marker on the specified atoms
-
removeJaguarMarkerForAtoms
(atoms)¶ Removes the marker for specified atom(s)
Parameters: atoms (list or schrodinger.structure._StructureAtom
) – The atom or list of atoms to retrieve the marker for. A list may contain between one and four atoms (inclusive).Raises: ValueError – If no marker exists for the specified atoms
-
removeLayoutElements
(layout)¶ Remove all widgets from the given layout. Used for customizing KNIME panel wrappers.
-
removeMarker
(marker)¶ Remove the
schrodinger.maestro.markers.Marker
Parameters: marker ( schrodinger.maestro.markers.Marker
) – Marker to removeRaises: ValueError – If marker is the wrong type or is not associated with the panel.
-
render
(self, QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren))¶ render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren))
-
repaint
(self)¶ repaint(self, int, int, int, int) repaint(self, QRect) repaint(self, QRegion)
-
reportValidation
(results)¶ Present validation messages to the user. This is an implmentation of the ValidationMixin interface and does not need to be called directly.
Parameters: results (ValidationResults) – Set of results generated by validate()
-
resetAllRunners
()¶ Resets all task runners associated with this panel (main tasks and other tasks added via setupTaskRunner). This is called from _reset() and normally does not need to be called directly.
-
resize
(self, QSize)¶ resize(self, int, int)
-
resizeEvent
(self, QResizeEvent)¶
-
restoreCursor
(app_wide=True)¶ Restore the application level cursor to the default. If ‘app_wide’ is True then if will be restored for the entire application, if it’s False, it will be just for this panel.
Parameters: app_wide (bool) – If True then this will restore the cursor for the entire application (including Maestro if running there). If False then this will apply only to this panel.
-
restoreGeometry
(self, Union[QByteArray, bytes, bytearray]) → bool¶
-
run
()¶
-
runCanvas
()¶ This handles Canvas-specific logic
-
classmethod
runKnime
(input_selector_file=None, workspace_st_file=None, jobname=None, run=True, load_settings=True, panel_state_file=None)¶ Call this static method to instantiate this panel in KNIME mode - where OK & Cancel buttons are shown at the bottom. Pressing OK button cases the job files to be written to the CWD.
Parameters: - input_selector_file (str) – the filename to be fed into the input selector, replacing interactive input from the user. Required if the panel contains an input selector.
- workspace_st_file (str) – the filename containing the
schrodinger.structure.Structure
that replaces the workspace structure in a Maestro session. - jobname (str) – Jobname for the panel
- run (bool) – Whether to launch the panel. If False, just returns the panel instance without starting the event loop.
- load_settings (bool) – Whether to load previous settings for the given jobname from the CWD.
- panel_state_file – Unused (added for backwards compatability)
-
runMaestro
()¶ This can be extended in derived classes to perform maestro-only tasks such as setting up the mini-monitor or connecting maestro callbacks
-
runMode
()¶
-
runStandalone
()¶
-
runSubpanel
()¶
-
runValidation
(silent=False, validate_children=True, stop_on_fail=True)¶ Runs validation and reports the results (unless run silently).
Parameters: - silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
ValidationResults
to a boolean. - validate_children (bool) – run validation on all child objects. See
_validateChildren
for documentation on what this entails. - stop_on_fail (bool) – stop validation when first failure is encountered
Returns: if silent is False, returns the validation results. If silent is True, returns a boolean generated by
reportValidation
.Return type: ValidationResults
or bool- silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
-
sanitizeJobnameText
(text)¶ Modify the given text so it can be used in a job name. White space is replaced with underscores and all other disallowed characters are removed.
Parameters: text (basestring) – The text to sanitize Returns: The sanitized text Return type: basestring
-
saveGeometry
(self) → QByteArray¶
-
savePersistentOptions
()¶ Store all persistent options to the preferences.
-
scroll
(self, int, int)¶ scroll(self, int, int, QRect)
-
sender
(self) → QObject¶
-
senderSignalIndex
(self) → int¶
-
setAcceptDrops
(self, bool)¶
-
setAccessibleDescription
(self, str)¶
-
setAccessibleName
(self, str)¶
-
setAlias
(alias, obj, persistent=False)¶ Sets an alias to conveniently access an object.
Parameters: - alias (hashable) – any hashable, but typically a string name
- obj (object) – the actual object to be referenced
- persistent (bool) – whether to make the setting persistent
-
setAliasedValue
(alias, value)¶
-
setAliases
(alias_dict, persistent=False)¶ Sets multiple aliases at once. Already used aliases are overwritten; other existing aliases are not affected.
Parameters: - alias_dict (dict) – map of aliases to objects
- persistent (bool) – whether to make the settings persistent
-
setAttribute
(self, Qt.WidgetAttribute, on: bool = True)¶
-
setAutoFillBackground
(self, bool)¶
-
setBackgroundRole
(self, QPalette.ColorRole)¶
-
setBaseSize
(self, int, int)¶ setBaseSize(self, QSize)
-
setConfigDialogSettings
(new_values)¶
-
setContentsMargins
(self, int, int, int, int)¶ setContentsMargins(self, QMargins)
-
setContextMenuPolicy
(self, Qt.ContextMenuPolicy)¶
-
setCurrentTask
(index)¶ Selects the current main task for the panel. Switching to a new task involves several steps. These are 1) saving the current panel state to the task runner, 2) hiding the current task widget (and all others), 3) showing the widget for the new task, and 4) setting the panel state to correspond to the new task runner’s settings.
Parameters: index (int) – the index of the task to be selected. The index for each main task is set sequentially from 0 as each task as added using self.addMainTaskRunner()
-
setCursor
(self, Union[QCursor, Qt.CursorShape])¶
-
setDefaults
()¶
-
setDisabled
(self, bool)¶
-
setEnabled
(self, bool)¶
-
setFixedHeight
(self, int)¶
-
setFixedSize
(self, QSize)¶ setFixedSize(self, int, int)
-
setFixedWidth
(self, int)¶
-
setFocus
(self)¶ setFocus(self, Qt.FocusReason)
-
setFocusPolicy
(self, Qt.FocusPolicy)¶
-
setFocusProxy
(self, QWidget)¶
-
setFont
(self, QFont)¶
-
setForegroundRole
(self, QPalette.ColorRole)¶
-
setGeometry
(self, QRect)¶ setGeometry(self, int, int, int, int)
-
setGraphicsEffect
(self, QGraphicsEffect)¶
-
setHidden
(self, bool)¶
-
setInputMethodHints
(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])¶
-
setJobname
(jobname)¶ Set the job name for the current task.
-
setLayout
(self, QLayout)¶
-
setLayoutDirection
(self, Qt.LayoutDirection)¶
-
setLocale
(self, QLocale)¶
-
setMask
(self, QBitmap)¶ setMask(self, QRegion)
-
setMaximumHeight
(self, int)¶
-
setMaximumSize
(self, int, int)¶ setMaximumSize(self, QSize)
-
setMaximumWidth
(self, int)¶
-
setMinimumHeight
(self, int)¶
-
setMinimumSize
(self, int, int)¶ setMinimumSize(self, QSize)
-
setMinimumWidth
(self, int)¶
-
setMouseTracking
(self, bool)¶
-
setObjValue
(obj, value)¶
-
setObjectName
(self, str)¶
-
setPalette
(self, QPalette)¶
-
setPanelOptions
()¶ See parent class for more options.
self.use_mini_jobbar - whether this panel use the narrow version of the bottom job bar. This is useful for narrow panels where the regular job bar is too wide to fit. Default: False
self.viewname - this identifier is used by the mini-monitor so that it knows which jobs belong to this panel. This is automatically generated from the module and class name of the panel and so it does not need to be set unless the module/class names are generic.
self.program_name - a human-readable text name for the job this panel launches. This shows up in the main job monitor to help the user identify the job. Example: “Glide grid generation”. Default: “Job”
self.omit_one_from_standard_jobname - see documentation in jobnames.py
add_driverhost - If True, the backend supports running -DRIVERHOST to specify a different host for the driver job than subjobs. Only certain workflows support this option.
-
setPanelState
(state)¶ Resets the panel and then sets the panel to the specified state
Parameters: state (PanelState) – the panel state to set. This object should originate from a call to getPanelState()
-
setParent
(self, QWidget)¶ setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType])
-
setPersistent
(alias=None)¶ Set options to be persistent. Any options to be made persistent must be aliased, since the alias is used to form the preference key. If no alias is specified, all aliased settings will be made persistent.
Parameters: alias (str or None) – the alias to save, or None
-
setProperty
(self, str, Any) → bool¶
-
setShortcutAutoRepeat
(self, int, enabled: bool = True)¶
-
setShortcutEnabled
(self, int, enabled: bool = True)¶
-
setSizeIncrement
(self, int, int)¶ setSizeIncrement(self, QSize)
-
setSizePolicy
(self, QSizePolicy)¶ setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy)
-
setStatusTip
(self, str)¶
-
setStyle
(self, QStyle)¶
-
setStyleSheet
(self, str)¶
-
setTabOrder
(QWidget, QWidget)¶
-
setTabletTracking
(self, bool)¶
-
setToolTip
(self, str)¶
-
setToolTipDuration
(self, int)¶
-
setUpdatesEnabled
(self, bool)¶
-
setVisible
(self, bool)¶
-
setWaitCursor
(app_wide=True)¶ Set the cursor to the wait cursor. This will be an hourglass, clock or similar. Call restoreCursor() to return to the default cursor.
Parameters: app_wide (bool) – If True then this will apply to the entire application (including Maestro if running there). If False then this will apply only to this panel.
-
setWhatsThis
(self, str)¶
-
setWindowFilePath
(self, str)¶
-
setWindowFlag
(self, Qt.WindowType, on: bool = True)¶
-
setWindowFlags
(self, Union[Qt.WindowFlags, Qt.WindowType])¶
-
setWindowIcon
(self, QIcon)¶
-
setWindowIconText
(self, str)¶
-
setWindowModality
(self, Qt.WindowModality)¶
-
setWindowModified
(self, bool)¶
-
setWindowOpacity
(self, float)¶
-
setWindowRole
(self, str)¶
-
setWindowState
(self, Union[Qt.WindowStates, Qt.WindowState])¶
-
setWindowTitle
(self, str)¶
-
setup
()¶
-
setupJobCmd
(cmdlist, auto_add_host=True, use_parallel_flag=True)¶ Adds standard arguments HOST, NJOBS, PROJ, DISP, VIEWNAME to the cmdlist if they are set in the config dialog. Settings pre-existing in the cmdlist take precedence over the config dialog settings.
Parameters: - cmdlist (list) – the command list
- auto_add_host (bool) – Whether or not to automatically add -HOST flat to command when it is not already included.
- use_parallel_flag (bool) – Whether requesting CPUs > 1 without specifying threads > 1 should be represented by the use of the -PARALLEL X flag (True, default) or -HOST host:X (False). -PARALLEL is a Jaguar flag and may not be appropriate for other programs.
-
setupTaskRunner
(runner, taskwidget)¶ Connects a task widget to a task runner and associates the runner with this af2 panel via the panel callbacks.
This method is called by self.addMainTaskRunner() and does not need to be called for main tasks; however, it is useful for setting up other tasks that are not main tasks - for example, if there is a smaller job that gets launched from a button in the middle of the panel somewhere.
Parameters: - runner (tasks.AbstractTaskRuner) – the task runner
- taskwidget (taskwidgets.TaskUIMixin) – the associated task widget
-
show
()¶ Re-show all panel markers when the panel is re-shown. This separate method is needed for QDialog instances.
-
showAllJaguarMarkers
()¶ Show all
schrodinger.maestro.markers._BaseMarker
markers for which all marked atoms are in the workspace. Hide all other markers.
-
showAllMarkers
()¶ Set all
schrodinger.maestro.markers.Marker
markers to be shown if the relevant atoms are in the workspace. These markers are hidden automatically by Maestro when atoms are excluded.
-
showEvent
(event)¶ When the panel is shown, call the panel’s ‘show’-decorated methods. Note that restoring a minimized panel will not trigger the ‘show’ methods.
-
showFullScreen
(self)¶
-
showMaximized
(self)¶
-
showMinimized
(self)¶
-
showNormal
(self)¶
-
showProgressBarForJob
(job, show_lbl=True, start_timer=True)¶ Show a progress bar that tracks the progress of the specified job
Parameters: - job (
schrodinger.job.jobcontrol.Job
) – The job to track - show_lbl (bool) – If True, the job progress text description will be shown above the progress bar. If False, the text description will not be shown.
- start_timer (bool) – If True, the progress bar will automatically be updated and removed when the job is complete. If False, it is the caller’s responsibility to periodically call self.progress_bar.readJobAndUpdateProgress() and to call self.status_bar.hideProgress() when the job is complete.
- job (
-
showSTUDialog
(sh_txt, jobname)¶ Shows dialog with information necessary to start a STU test, including a label that links to the test suite.
Parameters: sh_txt (str) – Text contained within the .sh file
-
signalsBlocked
(self) → bool¶
-
size
(self) → QSize¶
-
sizeHint
(self) → QSize¶
-
sizeIncrement
(self) → QSize¶
-
sizePolicy
(self) → QSizePolicy¶
-
stackUnder
(self, QWidget)¶
-
startDebug
()¶
-
startTimer
(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int¶
-
startUp
()¶
-
staticMetaObject
= <PyQt5.QtCore.QMetaObject object>¶
-
statusTip
(self) → str¶
-
style
(self) → QStyle¶
-
styleSheet
(self) → str¶
-
syncConfigDialog
()¶
-
tabletEvent
(self, QTabletEvent)¶
-
testAttribute
(self, Qt.WidgetAttribute) → bool¶
-
thread
(self) → QThread¶
-
timerEvent
(self, QTimerEvent)¶
-
title
¶
-
toolTip
(self) → str¶
-
toolTipDuration
(self) → int¶
-
tr
(self, str, disambiguation: str = None, n: int = -1) → str¶
-
underMouse
(self) → bool¶
-
ungrabGesture
(self, Qt.GestureType)¶
-
unsetCursor
(self)¶
-
unsetLayoutDirection
(self)¶
-
unsetLocale
(self)¶
-
update
(self)¶ update(self, QRect) update(self, QRegion) update(self, int, int, int, int)
-
updateGeometry
(self)¶
-
updateJobname
(uniquify_custom=True)¶ Generate a new job name based on the current panel settings
Parameters: uniquify_custom (bool) – Whether we should uniquify custom job name by adding integers to the end. If False, only standard and modified job names will be uniquified. (See JobnameType
for an explanation of job name types.)
-
updateMicroFocus
(self)¶
-
updateStatusBar
()¶ Updates the status bar.
-
updatesEnabled
(self) → bool¶
-
validForceFieldSelectorCustomOPLSDir
()¶ Check whether a force field selector exists and if so whether it is set to use a custom OPLS directory that is valid. :return: whether OPLS directory has issues :rtype: bool
-
validateOPLSDir
(opls_dir=None)¶ See
forcefield.validate_opls_dir()
Parameters: opls_dir (str or None) – the opls dir to validate Returns: the validation result Return type: forcefield.OPLSDirResult
-
visibleRegion
(self) → QRegion¶
-
warning
(text, preferences=None, key='')¶ Display a warning dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.
Parameters: - text (str) – The information to display in the dialog
- preferences (
schrodinger.utils.preferences.Preferences
object) – The Preferences class to use to store the show/don’t show preference for this dialog. Note that the Preferences object must currently be set to the preference group containing key. - key (str) – The key to store the preference under
Return type: None
-
whatsThis
(self) → str¶
-
wheelEvent
(self, QWheelEvent)¶
-
width
(self) → int¶
-
widthMM
(self) → int¶
-
winId
(self) → sip.voidptr¶
-
window
(self) → QWidget¶
-
windowFilePath
(self) → str¶
-
windowFlags
(self) → Qt.WindowFlags¶
-
windowHandle
(self) → QWindow¶
-
windowIcon
(self) → QIcon¶
-
windowIconChanged
¶ windowIconChanged(self, QIcon) [signal]
-
windowIconText
(self) → str¶
-
windowIconTextChanged
¶ windowIconTextChanged(self, str) [signal]
-
windowModality
(self) → Qt.WindowModality¶
-
windowOpacity
(self) → float¶
-
windowRole
(self) → str¶
-
windowState
(self) → Qt.WindowStates¶
-
windowTitle
(self) → str¶
-
windowTitleChanged
¶ windowTitleChanged(self, str) [signal]
-
windowType
(self) → Qt.WindowType¶
-
writeJobCmd
(cmdlist)¶ Writes the job invocation command to a file named “<jobname>.sh” Removes options from the command that are maestro-specific.
-
writePanelState
(filename=None)¶ Write the panel state to a JSON file
Parameters: filename (str) – the JSON filename. Defaults to “panelstate.json”
-
writeStateAndClose
()¶ Called when OK button button is pressed when running in KNIME mode. Will “write” the job files and close the panel.
-
x
(self) → int¶
-
y
(self) → int¶
-
-
class
schrodinger.application.matsci.guibase.
MultiDesmondJobApp
(**kwargs)¶ Bases:
schrodinger.application.matsci.guibase.MultiJobApp
Class with functionality for setting up, validating and running multiple Desmond jobs.
-
setup
()¶
-
setDefaults
()¶
-
getModel
(index)¶ Return the model system at the specified index.
Parameters: index (int) – Index of the system to return Returns: Model system at the specified job index Return type: cms.Cms
-
getJobCount
()¶ Return the number of jobs that the user would like to run.
Returns: Number of jobs to run Return type: int
-
getStructFromPtEntry
()¶ Get the first included entry in the Workspace if that entry is one of the chosen entries, or the first selected entry if no included entry is chosen.
Return type: ( schrodinger.structure.Structure
, string) or (None, None)Returns: one structure from selected or included entries, the structure entry id
-
launchFromJobSpec
(sub_jobname, job_num, oplsdir=None)¶ See parent class for documentation. Here mainly OPLS directory is obtained from structure properties.
-
validateModelLoaded
(**kwargs)¶
-
DrawChildren
= 2¶
-
DrawWindowBackground
= 1¶
-
IGNORE_DELAYED_CALLBACKS
= False¶
-
IgnoreMask
= 4¶
-
NO_PROGRESS_BAR
= 0¶
-
PROGRESS_BAR_NO_TEXT
= 2¶
-
PROGRESS_BAR_WITH_TEXT
= 1¶
-
class
PaintDeviceMetric
¶ Bases:
int
-
__abs__
¶ abs(self)
-
__add__
¶ Return self+value.
-
__and__
¶ Return self&value.
-
__bool__
¶ self != 0
-
__ceil__
()¶ Ceiling of an Integral returns itself.
-
__class__
¶ alias of
sip.enumtype
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'PyQt5.QtGui', '__dict__': <attribute '__dict__' of 'PaintDeviceMetric' objects>, '__doc__': None, '__reduce__': <method '_pickle_enum' of 'PaintDeviceMetric' objects>})¶
-
__dir__
() → list¶ default dir() implementation
-
__divmod__
¶ Return divmod(self, value).
-
__eq__
¶ Return self==value.
-
__float__
¶ float(self)
-
__floor__
()¶ Flooring an Integral returns itself.
-
__floordiv__
¶ Return self//value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__getnewargs__
()¶
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__index__
¶ Return self converted to an integer, if self is suitable for use as an index into a list.
-
__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.
-
__int__
¶ int(self)
-
__invert__
¶ ~self
-
__le__
¶ Return self<=value.
-
__lshift__
¶ Return self<<value.
-
__lt__
¶ Return self<value.
-
__mod__
¶ Return self%value.
-
__module__
= 'PyQt5.QtGui'¶
-
__mul__
¶ Return self*value.
-
__ne__
¶ Return self!=value.
-
__neg__
¶ -self
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__or__
¶ Return self|value.
-
__pos__
¶ +self
-
__pow__
¶ Return pow(self, value, mod).
-
__radd__
¶ Return value+self.
-
__rand__
¶ Return value&self.
-
__rdivmod__
¶ Return divmod(value, self).
-
__reduce__
()¶
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__rfloordiv__
¶ Return value//self.
-
__rlshift__
¶ Return value<<self.
-
__rmod__
¶ Return value%self.
-
__rmul__
¶ Return value*self.
-
__ror__
¶ Return value|self.
-
__round__
()¶ Rounding an Integral returns itself. Rounding with an ndigits argument also returns an integer.
-
__rpow__
¶ Return pow(value, self, mod).
-
__rrshift__
¶ Return value>>self.
-
__rshift__
¶ Return self>>value.
-
__rsub__
¶ Return value-self.
-
__rtruediv__
¶ Return value/self.
-
__rxor__
¶ Return value^self.
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
()¶ Returns size in memory, in bytes
-
__str__
¶ Return str(self).
-
__sub__
¶ Return self-value.
-
__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).
-
__truediv__
¶ Return self/value.
-
__trunc__
()¶ Truncating an Integral returns itself.
-
__xor__
¶ Return self^value.
-
bit_length
() → int¶ Number of bits necessary to represent self in binary. >>> bin(37) ‘0b100101’ >>> (37).bit_length() 6
-
conjugate
()¶ Returns self, the complex conjugate of any int.
-
denominator
¶ the denominator of a rational number in lowest terms
-
from_bytes
(bytes, byteorder, *, signed=False) → int¶ Return the integer represented by the given array of bytes.
The bytes argument must be a bytes-like object (e.g. bytes or bytearray).
The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
The signed keyword-only argument indicates whether two’s complement is used to represent the integer.
-
imag
¶ the imaginary part of a complex number
-
numerator
¶ the numerator of a rational number in lowest terms
-
real
¶ the real part of a complex number
-
to_bytes
(length, byteorder, *, signed=False) → bytes¶ Return an array of bytes representing an integer.
The integer is represented using length bytes. An OverflowError is raised if the integer is not representable with the given number of bytes.
The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
The signed keyword-only argument determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
-
-
PdmDepth
= 6¶
-
PdmDevicePixelRatio
= 11¶
-
PdmDevicePixelRatioScaled
= 12¶
-
PdmDpiX
= 7¶
-
PdmDpiY
= 8¶
-
PdmHeight
= 2¶
-
PdmHeightMM
= 4¶
-
PdmNumColors
= 5¶
-
PdmPhysicalDpiX
= 9¶
-
PdmPhysicalDpiY
= 10¶
-
PdmWidth
= 1¶
-
PdmWidthMM
= 3¶
-
class
RenderFlag
¶ Bases:
int
-
__abs__
¶ abs(self)
-
__add__
¶ Return self+value.
-
__and__
¶ Return self&value.
-
__bool__
¶ self != 0
-
__ceil__
()¶ Ceiling of an Integral returns itself.
-
__class__
¶ alias of
sip.enumtype
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'PyQt5.QtWidgets', '__or__': <slot wrapper '__or__' of 'RenderFlag' objects>, '__ror__': <slot wrapper '__ror__' of 'RenderFlag' objects>, '__dict__': <attribute '__dict__' of 'RenderFlag' objects>, '__doc__': None, '__reduce__': <method '_pickle_enum' of 'RenderFlag' objects>})¶
-
__dir__
() → list¶ default dir() implementation
-
__divmod__
¶ Return divmod(self, value).
-
__eq__
¶ Return self==value.
-
__float__
¶ float(self)
-
__floor__
()¶ Flooring an Integral returns itself.
-
__floordiv__
¶ Return self//value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__getnewargs__
()¶
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__index__
¶ Return self converted to an integer, if self is suitable for use as an index into a list.
-
__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.
-
__int__
¶ int(self)
-
__invert__
¶ ~self
-
__le__
¶ Return self<=value.
-
__lshift__
¶ Return self<<value.
-
__lt__
¶ Return self<value.
-
__mod__
¶ Return self%value.
-
__module__
= 'PyQt5.QtWidgets'¶
-
__mul__
¶ Return self*value.
-
__ne__
¶ Return self!=value.
-
__neg__
¶ -self
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__or__
¶ Return self|value.
-
__pos__
¶ +self
-
__pow__
¶ Return pow(self, value, mod).
-
__radd__
¶ Return value+self.
-
__rand__
¶ Return value&self.
-
__rdivmod__
¶ Return divmod(value, self).
-
__reduce__
()¶
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__rfloordiv__
¶ Return value//self.
-
__rlshift__
¶ Return value<<self.
-
__rmod__
¶ Return value%self.
-
__rmul__
¶ Return value*self.
-
__ror__
¶ Return value|self.
-
__round__
()¶ Rounding an Integral returns itself. Rounding with an ndigits argument also returns an integer.
-
__rpow__
¶ Return pow(value, self, mod).
-
__rrshift__
¶ Return value>>self.
-
__rshift__
¶ Return self>>value.
-
__rsub__
¶ Return value-self.
-
__rtruediv__
¶ Return value/self.
-
__rxor__
¶ Return value^self.
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
()¶ Returns size in memory, in bytes
-
__str__
¶ Return str(self).
-
__sub__
¶ Return self-value.
-
__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).
-
__truediv__
¶ Return self/value.
-
__trunc__
()¶ Truncating an Integral returns itself.
-
__xor__
¶ Return self^value.
-
bit_length
() → int¶ Number of bits necessary to represent self in binary. >>> bin(37) ‘0b100101’ >>> (37).bit_length() 6
-
conjugate
()¶ Returns self, the complex conjugate of any int.
-
denominator
¶ the denominator of a rational number in lowest terms
-
from_bytes
(bytes, byteorder, *, signed=False) → int¶ Return the integer represented by the given array of bytes.
The bytes argument must be a bytes-like object (e.g. bytes or bytearray).
The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
The signed keyword-only argument indicates whether two’s complement is used to represent the integer.
-
imag
¶ the imaginary part of a complex number
-
numerator
¶ the numerator of a rational number in lowest terms
-
real
¶ the real part of a complex number
-
to_bytes
(length, byteorder, *, signed=False) → bytes¶ Return an array of bytes representing an integer.
The integer is represented using length bytes. An OverflowError is raised if the integer is not representable with the given number of bytes.
The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
The signed keyword-only argument determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
-
-
class
RenderFlags
¶ Bases:
sip.simplewrapper
QWidget.RenderFlags(Union[QWidget.RenderFlags, QWidget.RenderFlag]) QWidget.RenderFlags(QWidget.RenderFlags)
-
__and__
¶ Return self&value.
-
__bool__
¶ self != 0
-
__class__
¶ alias of
sip.wrappertype
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'PyQt5.QtWidgets', '__hash__': <slot wrapper '__hash__' of 'RenderFlags' objects>, '__lt__': <slot wrapper '__lt__' of 'RenderFlags' objects>, '__le__': <slot wrapper '__le__' of 'RenderFlags' objects>, '__eq__': <slot wrapper '__eq__' of 'RenderFlags' objects>, '__ne__': <slot wrapper '__ne__' of 'RenderFlags' objects>, '__gt__': <slot wrapper '__gt__' of 'RenderFlags' objects>, '__ge__': <slot wrapper '__ge__' of 'RenderFlags' objects>, '__bool__': <slot wrapper '__bool__' of 'RenderFlags' objects>, '__invert__': <slot wrapper '__invert__' of 'RenderFlags' objects>, '__and__': <slot wrapper '__and__' of 'RenderFlags' objects>, '__rand__': <slot wrapper '__rand__' of 'RenderFlags' objects>, '__xor__': <slot wrapper '__xor__' of 'RenderFlags' objects>, '__rxor__': <slot wrapper '__rxor__' of 'RenderFlags' objects>, '__or__': <slot wrapper '__or__' of 'RenderFlags' objects>, '__ror__': <slot wrapper '__ror__' of 'RenderFlags' objects>, '__int__': <slot wrapper '__int__' of 'RenderFlags' objects>, '__iand__': <slot wrapper '__iand__' of 'RenderFlags' objects>, '__ixor__': <slot wrapper '__ixor__' of 'RenderFlags' objects>, '__ior__': <slot wrapper '__ior__' of 'RenderFlags' objects>, '__weakref__': <attribute '__weakref__' of 'RenderFlags' objects>, '__doc__': 'QWidget.RenderFlags()\nQWidget.RenderFlags(Union[QWidget.RenderFlags, QWidget.RenderFlag])\nQWidget.RenderFlags(QWidget.RenderFlags)'})¶
-
__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).
-
__iand__
¶ Return self&=value.
-
__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.
-
__int__
¶ int(self)
-
__invert__
¶ ~self
-
__ior__
¶ Return self|=value.
-
__ixor__
¶ Return self^=value.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'PyQt5.QtWidgets'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__or__
¶ Return self|value.
-
__rand__
¶ Return value&self.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__ror__
¶ Return value|self.
-
__rxor__
¶ Return value^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)
-
__xor__
¶ Return self^value.
-
-
__class__
¶ alias of
sip.wrappertype
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.matsci.guibase', '__doc__': '\n Class with functionality for setting up, validating and running multiple\n Desmond jobs.\n ', 'setup': <function MultiDesmondJobApp.setup>, 'setDefaults': <function MultiDesmondJobApp.setDefaults>, 'getModel': <function MultiDesmondJobApp.getModel>, 'getJobCount': <function MultiDesmondJobApp.getJobCount>, 'getStructFromPtEntry': <function MultiDesmondJobApp.getStructFromPtEntry>, 'launchFromJobSpec': <function MultiDesmondJobApp.launchFromJobSpec>, 'validateModelLoaded': <function validator.<locals>.setOrder.<locals>.inner>})¶
-
__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).
-
__getitem__
(key)¶
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init__
(**kwargs)¶ Parameters: - stop_before (int) – Exit the constructor before specified step.
- parent (QWidget) – Parent widget, if any.
- in_knime (bool) – Whether we are currently running under KNIME - a mode in which input selector is hidden, optionally a custom Workspace Structure is specified, and buttom bar has OK & Cancel buttons.
- workspace_st_file (bool) – Structure to be returned by getWorkspaceStructure() when in_knime is True.
-
__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.application.matsci.guibase'¶
-
__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__
(key, 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)
-
acceptDrops
(self) → bool¶
-
accessibleDescription
(self) → str¶
-
accessibleName
(self) → str¶
-
actionEvent
(self, QActionEvent)¶
-
actions
(self) → List[QAction]¶
-
activateWindow
(self)¶
-
addAction
(self, QAction)¶
-
addActions
(self, object)¶
-
addJaguarMarker
(atoms, color=None, icon=None, text='', alt_color=None, highlight=False)¶ Add a marker to the specified atom(s)
Parameters: - atoms (list or
schrodinger.structure._StructureAtom
) – The atom or list of atoms to mark. A list may contain between one and four atoms (inclusive). - color (tuple, str, int, or
schrodinger.structutils.color
) – The color of the marker and icon. May be an RGB tuple, color name, color index, orschrodinger.structutils.color
instance. If not given, white will be used. - icon (int) – The icon to draw next to the marker. Should be one the self.MARKER_ICONS constants. If not given, no icon will be drawn.
- text (str) – The text to display next to the marker. If not given, no text will be displayed. Note that this argument will be ignored when marking a single atom.
- alt_color (tuple, str, int, or
schrodinger.structutils.color
) – The alternate marker color. This color is always used for text, and is used for the marker and icon whenhighlight
is True. If not given,color
will be used. - highlight (bool) – Whether the marker should be highlighted. A
highlighted marker is indicated with thicker lines and is colored using
alt_color
instead ofcolor
.
Returns: The newly created marker
Return type: schrodinger.maestro.markers._BaseMarker
Raises: ValueError – If a marker already exists for the specified atoms
Note: Either an icon or text may be displayed on a marker, but not both. If both are given, only the text will be shown.
- atoms (list or
-
addMainTaskRunner
(runner, taskwidget)¶ A “main” task runner is a runner that is operated by a task widget (generally a job bar) at the very bottom of the panel. A panel may have more than one main task, but there is always one that is the “current” task. This is useful for panels that have multiple modes, with each mode launching a different job.
The related method, self.setCurrentTask(), is used to switch between main runners that have been added via this function.
Parameters: - runner (tasks.AbstractTaskRuner) – the task runner
- taskwidget (taskwidgets.TaskUIMixin) – the associated task widget
-
addMarker
(atoms, color=(1.0, 1.0, 1.0), group_name=None)¶ Generates a set of simple, dot-styled markers for a group of atoms.
Parameters: - atoms (list or
schrodinger.structure._StructureAtom
) – List of atoms to be marked - color (tuple of 3 floats) – The amount of red, green and blue to use, each ranging from 0.0 to 1.0. Default is white (1., 1., 1.).
@group_name: Optional string to set as the name of this group of markers in Maestro. If not set, a unique identifier will be generated.
- atoms (list or
-
addMarkerFromAsl
(asl, color=(1.0, 1.0, 1.0), group_name=None)¶ Generates a set of simple, dot-styled markers for group of Workspace atoms that match the given ASL. Same atoms continue to be marked even if the Workspace is later modified such that ASL matching changes.
Parameters: - asl – ASL for the atoms to mark.
- color (tuple of 3 floats) – The amount of red, green and blue to use, each ranging from 0.0 to 1.0. Default is white (1., 1., 1.).
@group_name: Optional string to set as the name of this group of markers in Maestro. If not set, a unique identifier will be generated.
Returns: Marker object Return type: markers.Marker
-
addProjectJobNote
(job_id, jobname)¶ Adds a note to the project annotation file. :param job_id: The ID of the job, as assigned by Maestro :type job_id: string :param jobname: The name of the job, as shown in the job panel :type jobname: string
-
adjustSize
(self)¶
-
applyAliasedSettings
(settings)¶ Applies any aliased settings with new values from the dictionary. Any aliases not present in the settings dictionary will be left unchanged.
Parameters: settings (dict) – a dictionary mapping aliases to new values to apply
-
applySettings
(settings, target=None)¶
-
autoFillBackground
(self) → bool¶
-
backgroundRole
(self) → QPalette.ColorRole¶
-
baseSize
(self) → QSize¶
-
blockSignals
(self, bool) → bool¶
-
buildCallbackDicts
()¶ Create a dictionary of all methods that have a maestro_callback decorator.
-
changeEvent
(self, QEvent)¶
-
childAt
(self, QPoint) → QWidget¶ childAt(self, int, int) -> QWidget
-
childEvent
(self, QChildEvent)¶
-
children
(self) → object¶
-
childrenRect
(self) → QRect¶
-
childrenRegion
(self) → QRegion¶
-
cleanup
()¶
-
cleanupWriteCmd
(cmdlist)¶ Removes options from the command that only work within Maestro. :param cmdlist: the job invocation command :type cmdlist: list
-
clearFocus
(self)¶
-
clearMask
(self)¶
-
close
(self) → bool¶
-
closeEvent
(event)¶ Receives the close event and calls the panel’s ‘close’-decorated appmethod. If the appmethod specifically returns False, the close event will be ignored and the panel will remain open. All other return values (including None) will allow the panel to proceed with closing.
This is a PyQT slot method and should not be explicitly called.
-
cmdListToCmd
(cmdlist)¶ Converts a command list to a command string.
Parameters: cmdlist (list) – a list of commands Returns: a command string with all arguments wrapped in double quotes
-
colorCount
(self) → int¶
-
configDialogSettings
()¶
-
connectNotify
(self, QMetaMethod)¶
-
contentsMargins
(self) → QMargins¶
-
contentsRect
(self) → QRect¶
-
contextMenuEvent
(self, QContextMenuEvent)¶
-
contextMenuPolicy
(self) → Qt.ContextMenuPolicy¶
-
create
(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
-
createBottomBar
()¶
-
createInputSelector
()¶
-
createJobDir
()¶
-
createWindowContainer
(QWindow, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = 0) → QWidget¶
-
currentTaskRunner
()¶
-
cursor
(self) → QCursor¶
-
customContextMenuRequested
¶ customContextMenuRequested(self, QPoint) [signal]
-
customEvent
(self, QEvent)¶
-
definePanelSettings
()¶ Override this method to define the settings for the panel. The aliased settings provide an interface for saving/restoring panel state as well as for interacting with task/job runners that need to access the panel state in a way that is agnostic to the specifics of widget names and types.
Each panel setting is defined by a tuple that specifies the mapping of alias to panel setting. An optional third element in the tuple can be used to group settings by category. This allows multiple settings to share the same alias.
Each setting can either point to a specific object (usually a qt widget), or a pair of setter/getter functions.
If the mapped object is a string, this will be interpreted by af2 as referring to an attribute on the panel, and a AttributeSettingWrapper instance will automatically be created. For example, specifying the string ‘num_atoms’ will create a mapping to self.num_atoms which will simply get and set the value of that instance member.
Custom setter and getter functions should take the form getter(), returning a value that can be encoded/decoded by JSON, and setter(value), where the type of value is the same as the return type of the getter.
Commonly used objects/widgets should be handled automatically in settings.py. It’s worth considering whether it makes more sense to use a custom setter/getter here or add support for the widget in settings.py.
Returns: a list of tuples defining the custom settings. Return type: list of tuples. Each tuple can be of type (str, object, str) or (str, (callable, callable), str) where the final str is optional. Custom settings tuples consists of up to three elements:
alias - a string identier for the setting. Ex. “box_centroid”
either:
- an object of a type that is supported by settings.py or
- the string name of an existing panel attribute (i.e. member variable), or
- a (getter, setter) tuple. The getter should take no arguments, and the setter should take a single value.
optionally, a group identifier. This can be useful if the panel runs two different jobs that both have a parameter with the same name but that needs to map to different widgets. If a setting has a group name, it will be ignored by runners unless the runner name matches the group name.
-
deleteLater
(self)¶
-
depth
(self) → int¶
-
destroy
(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
-
destroyed
¶ destroyed(self, QObject = None) [signal]
-
devType
(self) → int¶
-
devicePixelRatio
(self) → int¶
-
devicePixelRatioF
(self) → float¶
-
devicePixelRatioFScale
() → float¶
-
disconnect
(self)¶
-
disconnectNotify
(self, QMetaMethod)¶
-
dragEnterEvent
(self, QDragEnterEvent)¶
-
dragLeaveEvent
(self, QDragLeaveEvent)¶
-
dragMoveEvent
(self, QDragMoveEvent)¶
-
dropEvent
(self, QDropEvent)¶
-
dumpObjectInfo
(self)¶
-
dumpObjectTree
(self)¶
-
dynamicPropertyNames
(self) → object¶
-
effectiveWinId
(self) → sip.voidptr¶
-
ensurePolished
(self)¶
-
enterEvent
(self, QEvent)¶
-
error
(text, preferences=None, key='')¶ Display an error dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.
Parameters: - text (str) – The information to display in the dialog
- preferences (
schrodinger.utils.preferences.Preferences
object) – The Preferences class to use to store the show/don’t show preference for this dialog. Note that the Preferences object must currently be set to the preference group containing key. - key (str) – The key to store the preference under
Return type: None
-
event
(self, QEvent) → bool¶
-
eventFilter
(self, QObject, QEvent) → bool¶
-
find
(sip.voidptr) → QWidget¶
-
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]
-
focusInEvent
(self, QFocusEvent)¶
-
focusNextChild
(self) → bool¶
-
focusNextPrevChild
(self, bool) → bool¶
-
focusOutEvent
(self, QFocusEvent)¶
-
focusPolicy
(self) → Qt.FocusPolicy¶
-
focusPreviousChild
(self) → bool¶
-
focusProxy
(self) → QWidget¶
-
focusWidget
(self) → QWidget¶
-
font
(self) → QFont¶
-
fontInfo
(self) → QFontInfo¶
-
fontMetrics
(self) → QFontMetrics¶
-
foregroundRole
(self) → QPalette.ColorRole¶
-
frameGeometry
(self) → QRect¶
-
frameSize
(self) → QSize¶
-
generateStatus
()¶ Generate the text to put into the status bar
Returns: The text to put into the status bar Return type: str
-
geometry
(self) → QRect¶
-
getAliasedSettings
()¶
-
getAliasedValue
(alias)¶
-
getAllJaguarMarkers
()¶ Get all markers._BaseMarker currently loaded into the panel
Returns: An iterator of markers._BaseMarker Return type: iterator
-
getAllMarkers
()¶ Get all markers.Marker loaded into the panel
Returns: list(markers.Marker) Return type: list
-
getCmdListArgValue
(cmdlist, arg)¶
-
getConfigDialog
()¶
-
getContentsMargins
(self) → Tuple[int, int, int, int]¶
-
getJaguarMarker
(atoms)¶ Retrieve a marker for the specified atom(s)
Parameters: atoms (list or schrodinger.structure._StructureAtom
) – The atom or list of atoms to retrieve the marker for. A list may contain between one and four atoms (inclusive).Returns: The requested marker Return type: schrodinger.maestro.markers._BaseMarker
Raises: ValueError – If no marker exists for the specified atoms Note: As indicated by the return type, this function only returns schrodinger.maestro.markers._BaseMarker
derived markers. Multi atomschrodinger.maestro.markers.Marker
type markers are not accessible in this way.
-
getJobSpec
()¶
-
getObjValue
(obj)¶
-
getPanelState
()¶ Gets the current state of the panel in the form of a serializable dict. The state consists of the settings specified in definePanelSettings() as well as the automatically harvested settings.
-
getPersistenceKey
(alias)¶ Return a unique identifier for saving/restoring a setting in the preferences. Override this method to change the key scheme (this is necessary if creating a common resource which is shared by multiple panels).
Parameters: alias (str) – the alias for which we are generating a key
-
getSettings
(target=None, ignore_list=None)¶
-
getWorkspaceStructure
()¶ If panel is open in Maestro session, returns the current workspace
schrodinger.strucutre.Structure
.If panel is open from outside of Maestro, returns the self.workspace_st if self.workspace_st_file is available. Used while running from command line or starting the panel from KNIME.
Returns None otherwise.
Return type: schrodinger.structure.Structure
or NoneReturns: Maestro workspace structure or None
-
grab
(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(-1, -1))) → QPixmap¶
-
grabGesture
(self, Qt.GestureType, flags: Union[Qt.GestureFlags, Qt.GestureFlag] = Qt.GestureFlags())¶
-
grabKeyboard
(self)¶
-
grabMouse
(self)¶ grabMouse(self, Union[QCursor, Qt.CursorShape])
-
grabShortcut
(self, Union[QKeySequence, QKeySequence.StandardKey, str, int], context: Qt.ShortcutContext = Qt.WindowShortcut) → int¶
-
graphicsEffect
(self) → QGraphicsEffect¶
-
graphicsProxyWidget
(self) → QGraphicsProxyWidget¶
-
gui_closed
¶
-
hasFocus
(self) → bool¶
-
hasHeightForWidth
(self) → bool¶
-
hasMouseTracking
(self) → bool¶
-
hasTabletTracking
(self) → bool¶
-
height
(self) → int¶
-
heightForWidth
(self, int) → int¶
-
heightMM
(self) → int¶
-
hide
(self)¶
-
hideAllJaguarMarkers
()¶ Hide all
schrodinger.maestro.markers._BaseMarker
markers for this panel
-
hideAllMarkers
()¶ Hide all
schrodinger.maestro.markers.Marker
markers for this panel.
-
hideEvent
(event)¶
-
ignoreMaestroCallbacks
()¶ A context manager for temporarily disabling Maestro callbacks created using the decorators above. (Note that callbacks that have been manually added using maestro.*_callback_add() will not be disabled.)
Example:
def includeEntry(self, entry_id): proj = maestro.project_table_get() with self.ignoreMaestroCallbacks(): proj[entry_id].in_workspace = project.IN_WORKSPACE @maestro_callback.project_changed def onProjectChanged(self): print "This method will not be called during includeEntry." @maestro_callback.workspace_changed def onWorkspaceChanged(self): print "Neither will this one."
-
info
(text, preferences=None, key='')¶ Display an information dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.
Parameters: - text (str) – The information to display in the dialog
- preferences (
schrodinger.utils.preferences.Preferences
object) – The Preferences class to use to store the show/don’t show preference for this dialog. Note that the Preferences object must currently be set to the preference group containing key. - key (str) – The key to store the preference under
Return type: None
-
inherits
(self, str) → bool¶
-
initPainter
(self, QPainter)¶
-
inputMethodEvent
(self, QInputMethodEvent)¶
-
inputMethodHints
(self) → Qt.InputMethodHints¶
-
inputMethodQuery
(self, Qt.InputMethodQuery) → Any¶
-
insertAction
(self, QAction, QAction)¶
-
insertActions
(self, QAction, Iterable[QAction])¶
-
installEventFilter
(self, QObject)¶
-
isActiveWindow
(self) → bool¶
-
isAncestorOf
(self, QWidget) → bool¶
-
isEnabled
(self) → bool¶
-
isEnabledTo
(self, QWidget) → bool¶
-
isFullScreen
(self) → bool¶
-
isHidden
(self) → bool¶
-
isLeftToRight
(self) → bool¶
-
isMaximized
(self) → bool¶
-
isMinimized
(self) → bool¶
-
isModal
(self) → bool¶
-
isRightToLeft
(self) → bool¶
-
isSignalConnected
(self, QMetaMethod) → bool¶
-
isVisible
(self) → bool¶
-
isVisibleTo
(self, QWidget) → bool¶
-
isWidgetType
(self) → bool¶
-
isWindow
(self) → bool¶
-
isWindowModified
(self) → bool¶
-
isWindowType
(self) → bool¶
-
jobDir
()¶
-
jobname
()¶ Return the job name currently set for the current task.
-
jobnameData
()¶ Provides panel settings that are to be incorporated into job names. If self.default_jobname includes string formatting characters (i.e. %s, {0}, etc.), then this method must be implemented. It should return a tuple or a dictionary to be interpolated into the job name.
-
jobnameDataChanged
()¶ If the job name includes panel settings, then this method should be called whenever the relevant panel settings are modified
-
keyPressEvent
(self, QKeyEvent)¶
-
keyReleaseEvent
(self, QKeyEvent)¶
-
keyboardGrabber
() → QWidget¶
-
killTimer
(self, int)¶
-
lastJobCompleted
¶
-
launchJobCmd
(cmdlist, show_progress_bar=0, auto_add_host=True, use_parallel_flag=True)¶ Launches a job control command. Use this to launch scripts that accept the standard job control options arguments like -HOST, -DISP, etc. By default, automatically populates standard arguments from the config dialog, but will not overwrite if they are already found in cmdlist. For example, if -HOST is found in cmdlist, launchJobCmd will ignore the host specified in the config dialog.
This method honors self.start_mode; it can either launch the script or write out a job file to the job directory.
Parameters: - cmdlist (list) – the command list
- show_progress_bar (int) – Whether or not to show a progress bar tracking the job’s status. If NO_PROGRESS_BAR, no progress bar will be shown. If PROGRESS_BAR_NO_TEXT, a progress bar will be shown. If PROGRESS_BAR_WITH_TEXT, a progress bar will be shown and will also display the job progress text description.
- auto_add_host (bool) – Whether or not to automatically add -HOST flag to command when it is not already included.
- use_parallel_flag (bool) – Whether requesting CPUs > 1 without specifying threads > 1 should be represented by the use of the -PARALLEL X flag (True, default) or -HOST host:X (False). -PARALLEL is a Jaguar flag and may not be appropriate for other programs.
-
launchLauncher
(slauncher, show_progress_bar=0)¶ Either launches a launcher instance or writes the job invocation command, depending on the state of self.start_mode. This allows the panel’s start method to double as a write method.
Calling launchLauncher() is only necessary if creating a customized launcher using makeLauncher().
Parameters: show_progress_bar (int) – Whether or not to show a progress bar tracking the job’s status. If NO_PROGRESS_BAR, no progress bar will be shown. If PROGRESS_BAR_NO_TEXT, a progress bar will be shown. If PROGRESS_BAR_WITH_TEXT, a progress bar will be shown and will also display the job progress text description.
-
launchScript
(script, script_args=None, input_files=[], structure_output_file=None, output_files=[], aux_modules=[], show_progress_bar=0, **kwargs)¶ DEPRECATED for launchFromJobSpec.
Creates and launches a script using makeLauncher. For documentation on method parameters, see makeLauncher below. Use this method for scripts that do not themselves integrate with job control.
This method honors self.start_mode; it can either launch the script or write out a job file to the job directory.
Parameters: show_progress_bar (int) – Whether or not to show a progress bar tracking the job’s status. If NO_PROGRESS_BAR, no progress bar will be shown. If PROGRESS_BAR_NO_TEXT, a progress bar will be shown. If PROGRESS_BAR_WITH_TEXT, a progress bar will be shown and will also display the job progress text description.
-
launcherToCmdList
(slauncher)¶
-
layOut
()¶
-
layout
(self) → QLayout¶
-
layoutDirection
(self) → Qt.LayoutDirection¶
-
leaveEvent
(self, QEvent)¶
-
loadPanelState
(filename=None)¶ Load the panel state from a JSON file
Parameters: filename (str) – the JSON filename. Defaults to “panelstate.json”
-
loadPersistentOptions
()¶ Load all persistent options from the preferences.
-
loadSettings
(jobname)¶ Load the GUI state for the job in the CWD with the given name. Each KNIME panel will need to implement a custom version. For example, the panel may want to read the <jobname.sh> file, parse the list of command-line options, and populate the GUI accordintly. If a panel writes key/value file, then it would need to read it here.
Returns: True if panel state was restored, False if saved state was not found. Return type: bool
-
locale
(self) → QLocale¶
-
logicalDpiX
(self) → int¶
-
logicalDpiY
(self) → int¶
-
lower
(self)¶
-
makeLauncher
(script, script_args=[], input_files=[], structure_output_file=None, output_files=[], aux_modules=[], **kwargs)¶ DEPRECATED for launchFromJobSpec.
Create a launcher.Launcher instance using the settings defined by the panel, its config dialog, and specified arguments. Returns a launcher instance ready to be launched or further modified. Use this method for scripts that do not themselves integrate with job control.
Only use this method if you need to modify the launcher before launching it. Otherwise, the method launchScript() is preferred to create the launcher and launch it.
Parameters: - script (str) – Remote path to the script to be launched. See Launcher documentation for more info. If only launching to localhost is desired, then a local path can be specified.
- script_args (list of str) – arguments to be added to the script’s command line
- input_files (list of str) – input files that will be copied to the temporary job directory.
- structure_output_file (str) – this is the file that will be registered with job control to incorporate at the end of the job
- output_files (list of str) – additional output files to be copied back from the temporary job directory
- aux_modules (list of modules) – Additional modules required by the script
Returns: A prepped launcher
Return type:
-
mapFrom
(self, QWidget, QPoint) → QPoint¶
-
mapFromGlobal
(self, QPoint) → QPoint¶
-
mapFromParent
(self, QPoint) → QPoint¶
-
mapTo
(self, QWidget, QPoint) → QPoint¶
-
mapToGlobal
(self, QPoint) → QPoint¶
-
mapToParent
(self, QPoint) → QPoint¶
-
mask
(self) → QRegion¶
-
maximumHeight
(self) → int¶
-
maximumSize
(self) → QSize¶
-
maximumWidth
(self) → int¶
-
metaObject
(self) → QMetaObject¶
-
metric
(self, QPaintDevice.PaintDeviceMetric) → int¶
-
minimumHeight
(self) → int¶
-
minimumSize
(self) → QSize¶
-
minimumSizeHint
(self) → QSize¶
-
minimumWidth
(self) → int¶
-
mouseDoubleClickEvent
(self, QMouseEvent)¶
-
mouseGrabber
() → QWidget¶
-
mouseMoveEvent
(self, QMouseEvent)¶
-
mousePressEvent
(self, QMouseEvent)¶
-
mouseReleaseEvent
(self, QMouseEvent)¶
-
move
(self, QPoint)¶ move(self, int, int)
-
moveEvent
(self, QMoveEvent)¶
-
moveToThread
(self, QThread)¶
-
multiJobStart
()¶ Custom “start” method. For each job, creates a job sub-directory, cd’s into it, and launches the job there.
- :return list of return values from self.launchFromJobSpec() calls.
- Each value is a Job object or False, in start mode, or True/False in write mode.
-
nativeEvent
(self, Union[QByteArray, bytes, bytearray], sip.voidptr) → Tuple[bool, int]¶
-
nativeParentWidget
(self) → QWidget¶
-
nextInFocusChain
(self) → QWidget¶
-
normalGeometry
(self) → QRect¶
-
objectName
(self) → str¶
-
objectNameChanged
¶ objectNameChanged(self, str) [signal]
-
overrideWindowFlags
(self, Union[Qt.WindowFlags, Qt.WindowType])¶
-
overrideWindowState
(self, Union[Qt.WindowStates, Qt.WindowState])¶
-
paintEngine
(self) → QPaintEngine¶
-
paintEvent
(self, QPaintEvent)¶
-
paintingActive
(self) → bool¶
-
palette
(self) → QPalette¶
-
classmethod
panel
(run=True)¶ Launch a singleton instance of this class. If the panel has already been instantiated, the existing panel instance will be re-opened and brought to the front.
Parameters: run (bool) – Whether to launch the panel Returns: The singleton panel instance Return type: App
-
parent
(self) → QObject¶
-
parentWidget
(self) → QWidget¶
-
physicalDpiX
(self) → int¶
-
physicalDpiY
(self) → int¶
-
pos
(self) → QPoint¶
-
previousInFocusChain
(self) → QWidget¶
-
processSettings
(settings=None, runner=None)¶ This method is meant to be used as a callback to a task runner. If it is called with no arguments, it returns a dictionary of all the alieased settings. If settings are passed, the settings are first applied to self, and then the newly modified settings are returned.
Parameters: - settings (dict or None) – a settings dictionary to apply to this object
- runner (tasks.AbstractTaskRuner) – the task runner that is invoking this callback. This optional argument is necessary for per-runner grouping of settings
-
processTaskMessage
(message_type, text, options=None, runner=None)¶ This method is meant to be used as a callback to a task runner, and provides a single point of interaction from the runner to the user.
Parameters: - message_type (int) – the type of message being sent
- text (str) – the main text to show the user
- options – extra options
-
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.
-
question
(msg, button1='OK', button2='Cancel', title='Question')¶ Display a prompt dialog window with specified text. Returns True if first button (default OK) is pressed, False otherwise.
-
raise_
(self)¶
-
readShFile
(jobname)¶ Reads the jobname.sh file (written by _write()) and returns the list of command line arguments
-
receivers
(self, PYQT_SIGNAL) → int¶
-
rect
(self) → QRect¶
-
registerJob
(job, show_progress_bar=0)¶ Registers a job with the periodic job check callback and starts timer.
Parameters: - job (jobcontrol.Job) – job to register
- show_progress_bar (int) – Whether or not to show a progress bar tracking the job’s status. If NO_PROGRESS_BAR, no progress bar will be shown. If PROGRESS_BAR_NO_TEXT, a progress bar will be shown. If PROGRESS_BAR_WITH_TEXT, a progress bar will be shown and will also display the job progress text description.
-
releaseKeyboard
(self)¶
-
releaseMouse
(self)¶
-
releaseShortcut
(self, int)¶
-
removeAction
(self, QAction)¶
-
removeAllJaguarMarkers
()¶ Remove all markers
schrodinger.maestro.markers._BaseMarker
markers from this panel
-
removeAllJaguarMarkersForEntry
(eid)¶ Remove all markers for the specified entry id from this panel
Parameters: eid (str) – The entry id to remove markers for
-
removeAllMarkers
()¶ Remove all
schrodinger.maestro.markers.Marker
markers from this panel.
-
removeEventFilter
(self, QObject)¶
-
removeJaguarMarker
(marker)¶ Removes the specified marker
Parameters: marker ( schrodinger.maestro.markers._BaseMarker
) – The marker to removeRaises: ValueError – If there is no marker on the specified atoms
-
removeJaguarMarkerForAtoms
(atoms)¶ Removes the marker for specified atom(s)
Parameters: atoms (list or schrodinger.structure._StructureAtom
) – The atom or list of atoms to retrieve the marker for. A list may contain between one and four atoms (inclusive).Raises: ValueError – If no marker exists for the specified atoms
-
removeLayoutElements
(layout)¶ Remove all widgets from the given layout. Used for customizing KNIME panel wrappers.
-
removeMarker
(marker)¶ Remove the
schrodinger.maestro.markers.Marker
Parameters: marker ( schrodinger.maestro.markers.Marker
) – Marker to removeRaises: ValueError – If marker is the wrong type or is not associated with the panel.
-
render
(self, QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren))¶ render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren))
-
repaint
(self)¶ repaint(self, int, int, int, int) repaint(self, QRect) repaint(self, QRegion)
-
reportValidation
(results)¶ Present validation messages to the user. This is an implmentation of the ValidationMixin interface and does not need to be called directly.
Parameters: results (ValidationResults) – Set of results generated by validate()
-
resetAllRunners
()¶ Resets all task runners associated with this panel (main tasks and other tasks added via setupTaskRunner). This is called from _reset() and normally does not need to be called directly.
-
resize
(self, QSize)¶ resize(self, int, int)
-
resizeEvent
(self, QResizeEvent)¶
-
restoreCursor
(app_wide=True)¶ Restore the application level cursor to the default. If ‘app_wide’ is True then if will be restored for the entire application, if it’s False, it will be just for this panel.
Parameters: app_wide (bool) – If True then this will restore the cursor for the entire application (including Maestro if running there). If False then this will apply only to this panel.
-
restoreGeometry
(self, Union[QByteArray, bytes, bytearray]) → bool¶
-
run
()¶
-
runCanvas
()¶ This handles Canvas-specific logic
-
classmethod
runKnime
(input_selector_file=None, workspace_st_file=None, jobname=None, run=True, load_settings=True, panel_state_file=None)¶ Call this static method to instantiate this panel in KNIME mode - where OK & Cancel buttons are shown at the bottom. Pressing OK button cases the job files to be written to the CWD.
Parameters: - input_selector_file (str) – the filename to be fed into the input selector, replacing interactive input from the user. Required if the panel contains an input selector.
- workspace_st_file (str) – the filename containing the
schrodinger.structure.Structure
that replaces the workspace structure in a Maestro session. - jobname (str) – Jobname for the panel
- run (bool) – Whether to launch the panel. If False, just returns the panel instance without starting the event loop.
- load_settings (bool) – Whether to load previous settings for the given jobname from the CWD.
- panel_state_file – Unused (added for backwards compatability)
-
runMaestro
()¶ This can be extended in derived classes to perform maestro-only tasks such as setting up the mini-monitor or connecting maestro callbacks
-
runMode
()¶
-
runStandalone
()¶
-
runSubpanel
()¶
-
runValidation
(silent=False, validate_children=True, stop_on_fail=True)¶ Runs validation and reports the results (unless run silently).
Parameters: - silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
ValidationResults
to a boolean. - validate_children (bool) – run validation on all child objects. See
_validateChildren
for documentation on what this entails. - stop_on_fail (bool) – stop validation when first failure is encountered
Returns: if silent is False, returns the validation results. If silent is True, returns a boolean generated by
reportValidation
.Return type: ValidationResults
or bool- silent (bool) – run without any reporting (i.e. error messages to the
user). This is useful if we want to programmatically test validity.
Changes return value of this method from
-
sanitizeJobnameText
(text)¶ Modify the given text so it can be used in a job name. White space is replaced with underscores and all other disallowed characters are removed.
Parameters: text (basestring) – The text to sanitize Returns: The sanitized text Return type: basestring
-
saveGeometry
(self) → QByteArray¶
-
savePersistentOptions
()¶ Store all persistent options to the preferences.
-
scroll
(self, int, int)¶ scroll(self, int, int, QRect)
-
sender
(self) → QObject¶
-
senderSignalIndex
(self) → int¶
-
setAcceptDrops
(self, bool)¶
-
setAccessibleDescription
(self, str)¶
-
setAccessibleName
(self, str)¶
-
setAlias
(alias, obj, persistent=False)¶ Sets an alias to conveniently access an object.
Parameters: - alias (hashable) – any hashable, but typically a string name
- obj (object) – the actual object to be referenced
- persistent (bool) – whether to make the setting persistent
-
setAliasedValue
(alias, value)¶
-
setAliases
(alias_dict, persistent=False)¶ Sets multiple aliases at once. Already used aliases are overwritten; other existing aliases are not affected.
Parameters: - alias_dict (dict) – map of aliases to objects
- persistent (bool) – whether to make the settings persistent
-
setAttribute
(self, Qt.WidgetAttribute, on: bool = True)¶
-
setAutoFillBackground
(self, bool)¶
-
setBackgroundRole
(self, QPalette.ColorRole)¶
-
setBaseSize
(self, int, int)¶ setBaseSize(self, QSize)
-
setConfigDialogSettings
(new_values)¶
-
setContentsMargins
(self, int, int, int, int)¶ setContentsMargins(self, QMargins)
-
setContextMenuPolicy
(self, Qt.ContextMenuPolicy)¶
-
setCurrentTask
(index)¶ Selects the current main task for the panel. Switching to a new task involves several steps. These are 1) saving the current panel state to the task runner, 2) hiding the current task widget (and all others), 3) showing the widget for the new task, and 4) setting the panel state to correspond to the new task runner’s settings.
Parameters: index (int) – the index of the task to be selected. The index for each main task is set sequentially from 0 as each task as added using self.addMainTaskRunner()
-
setCursor
(self, Union[QCursor, Qt.CursorShape])¶
-
setDisabled
(self, bool)¶
-
setEnabled
(self, bool)¶
-
setFixedHeight
(self, int)¶
-
setFixedSize
(self, QSize)¶ setFixedSize(self, int, int)
-
setFixedWidth
(self, int)¶
-
setFocus
(self)¶ setFocus(self, Qt.FocusReason)
-
setFocusPolicy
(self, Qt.FocusPolicy)¶
-
setFocusProxy
(self, QWidget)¶
-
setFont
(self, QFont)¶
-
setForegroundRole
(self, QPalette.ColorRole)¶
-
setGeometry
(self, QRect)¶ setGeometry(self, int, int, int, int)
-
setGraphicsEffect
(self, QGraphicsEffect)¶
-
setHidden
(self, bool)¶
-
setInputMethodHints
(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])¶
-
setJobname
(jobname)¶ Set the job name for the current task.
-
setLayout
(self, QLayout)¶
-
setLayoutDirection
(self, Qt.LayoutDirection)¶
-
setLocale
(self, QLocale)¶
-
setMask
(self, QBitmap)¶ setMask(self, QRegion)
-
setMaximumHeight
(self, int)¶
-
setMaximumSize
(self, int, int)¶ setMaximumSize(self, QSize)
-
setMaximumWidth
(self, int)¶
-
setMinimumHeight
(self, int)¶
-
setMinimumSize
(self, int, int)¶ setMinimumSize(self, QSize)
-
setMinimumWidth
(self, int)¶
-
setMouseTracking
(self, bool)¶
-
setObjValue
(obj, value)¶
-
setObjectName
(self, str)¶
-
setPalette
(self, QPalette)¶
-
setPanelOptions
()¶ See parent class for more options.
self.use_mini_jobbar - whether this panel use the narrow version of the bottom job bar. This is useful for narrow panels where the regular job bar is too wide to fit. Default: False
self.viewname - this identifier is used by the mini-monitor so that it knows which jobs belong to this panel. This is automatically generated from the module and class name of the panel and so it does not need to be set unless the module/class names are generic.
self.program_name - a human-readable text name for the job this panel launches. This shows up in the main job monitor to help the user identify the job. Example: “Glide grid generation”. Default: “Job”
self.omit_one_from_standard_jobname - see documentation in jobnames.py
add_driverhost - If True, the backend supports running -DRIVERHOST to specify a different host for the driver job than subjobs. Only certain workflows support this option.
-
setPanelState
(state)¶ Resets the panel and then sets the panel to the specified state
Parameters: state (PanelState) – the panel state to set. This object should originate from a call to getPanelState()
-
setParent
(self, QWidget)¶ setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType])
-
setPersistent
(alias=None)¶ Set options to be persistent. Any options to be made persistent must be aliased, since the alias is used to form the preference key. If no alias is specified, all aliased settings will be made persistent.
Parameters: alias (str or None) – the alias to save, or None
-
setProperty
(self, str, Any) → bool¶
-
setShortcutAutoRepeat
(self, int, enabled: bool = True)¶
-
setShortcutEnabled
(self, int, enabled: bool = True)¶
-
setSizeIncrement
(self, int, int)¶ setSizeIncrement(self, QSize)
-
setSizePolicy
(self, QSizePolicy)¶ setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy)
-
setStatusTip
(self, str)¶
-
setStyle
(self, QStyle)¶
-
setStyleSheet
(self, str)¶
-
setTabOrder
(QWidget, QWidget)¶
-
setTabletTracking
(self, bool)¶
-
setToolTip
(self, str)¶
-
setToolTipDuration
(self, int)¶
-
setUpdatesEnabled
(self, bool)¶
-
setVisible
(self, bool)¶
-
setWaitCursor
(app_wide=True)¶ Set the cursor to the wait cursor. This will be an hourglass, clock or similar. Call restoreCursor() to return to the default cursor.
Parameters: app_wide (bool) – If True then this will apply to the entire application (including Maestro if running there). If False then this will apply only to this panel.
-
setWhatsThis
(self, str)¶
-
setWindowFilePath
(self, str)¶
-
setWindowFlag
(self, Qt.WindowType, on: bool = True)¶
-
setWindowFlags
(self, Union[Qt.WindowFlags, Qt.WindowType])¶
-
setWindowIcon
(self, QIcon)¶
-
setWindowIconText
(self, str)¶
-
setWindowModality
(self, Qt.WindowModality)¶
-
setWindowModified
(self, bool)¶
-
setWindowOpacity
(self, float)¶
-
setWindowRole
(self, str)¶
-
setWindowState
(self, Union[Qt.WindowStates, Qt.WindowState])¶
-
setWindowTitle
(self, str)¶
-
setupJobCmd
(cmdlist, auto_add_host=True, use_parallel_flag=True)¶ Adds standard arguments HOST, NJOBS, PROJ, DISP, VIEWNAME to the cmdlist if they are set in the config dialog. Settings pre-existing in the cmdlist take precedence over the config dialog settings.
Parameters: - cmdlist (list) – the command list
- auto_add_host (bool) – Whether or not to automatically add -HOST flat to command when it is not already included.
- use_parallel_flag (bool) – Whether requesting CPUs > 1 without specifying threads > 1 should be represented by the use of the -PARALLEL X flag (True, default) or -HOST host:X (False). -PARALLEL is a Jaguar flag and may not be appropriate for other programs.
-
setupTaskRunner
(runner, taskwidget)¶ Connects a task widget to a task runner and associates the runner with this af2 panel via the panel callbacks.
This method is called by self.addMainTaskRunner() and does not need to be called for main tasks; however, it is useful for setting up other tasks that are not main tasks - for example, if there is a smaller job that gets launched from a button in the middle of the panel somewhere.
Parameters: - runner (tasks.AbstractTaskRuner) – the task runner
- taskwidget (taskwidgets.TaskUIMixin) – the associated task widget
-
show
()¶ Re-show all panel markers when the panel is re-shown. This separate method is needed for QDialog instances.
-
showAllJaguarMarkers
()¶ Show all
schrodinger.maestro.markers._BaseMarker
markers for which all marked atoms are in the workspace. Hide all other markers.
-
showAllMarkers
()¶ Set all
schrodinger.maestro.markers.Marker
markers to be shown if the relevant atoms are in the workspace. These markers are hidden automatically by Maestro when atoms are excluded.
-
showEvent
(event)¶ When the panel is shown, call the panel’s ‘show’-decorated methods. Note that restoring a minimized panel will not trigger the ‘show’ methods.
-
showFullScreen
(self)¶
-
showLaunchStatus
(num_succeeded, njobs)¶ Show a label at the bottom of the panel with status of the launch.
-
showMaximized
(self)¶
-
showMinimized
(self)¶
-
showNormal
(self)¶
-
showProgressBarForJob
(job, show_lbl=True, start_timer=True)¶ Show a progress bar that tracks the progress of the specified job
Parameters: - job (
schrodinger.job.jobcontrol.Job
) – The job to track - show_lbl (bool) – If True, the job progress text description will be shown above the progress bar. If False, the text description will not be shown.
- start_timer (bool) – If True, the progress bar will automatically be updated and removed when the job is complete. If False, it is the caller’s responsibility to periodically call self.progress_bar.readJobAndUpdateProgress() and to call self.status_bar.hideProgress() when the job is complete.
- job (
-
showSTUDialog
(sh_txt, jobname)¶ Shows dialog with information necessary to start a STU test, including a label that links to the test suite.
Parameters: sh_txt (str) – Text contained within the .sh file
-
signalsBlocked
(self) → bool¶
-
size
(self) → QSize¶
-
sizeHint
(self) → QSize¶
-
sizeIncrement
(self) → QSize¶
-
sizePolicy
(self) → QSizePolicy¶
-
stackUnder
(self, QWidget)¶
-
startDebug
()¶
-
startTimer
(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int¶
-
startUp
()¶
-
staticMetaObject
= <PyQt5.QtCore.QMetaObject object>¶
-
statusTip
(self) → str¶
-
style
(self) → QStyle¶
-
styleSheet
(self) → str¶
-
syncConfigDialog
()¶
-
tabletEvent
(self, QTabletEvent)¶
-
testAttribute
(self, Qt.WidgetAttribute) → bool¶
-
thread
(self) → QThread¶
-
timerEvent
(self, QTimerEvent)¶
-
title
¶
-
toolTip
(self) → str¶
-
toolTipDuration
(self) → int¶
-
tr
(self, str, disambiguation: str = None, n: int = -1) → str¶
-
underMouse
(self) → bool¶
-
ungrabGesture
(self, Qt.GestureType)¶
-
unsetCursor
(self)¶
-
unsetLayoutDirection
(self)¶
-
unsetLocale
(self)¶
-
update
(self)¶ update(self, QRect) update(self, QRegion) update(self, int, int, int, int)
-
updateGeometry
(self)¶
-
updateJobname
(uniquify_custom=True)¶ Generate a new job name based on the current panel settings
Parameters: uniquify_custom (bool) – Whether we should uniquify custom job name by adding integers to the end. If False, only standard and modified job names will be uniquified. (See JobnameType
for an explanation of job name types.)
-
updateMicroFocus
(self)¶
-
updateStatusBar
()¶ Updates the status bar.
-
updatesEnabled
(self) → bool¶
-
validForceFieldSelectorCustomOPLSDir
()¶ Check whether a force field selector exists and if so whether it is set to use a custom OPLS directory that is valid. :return: whether OPLS directory has issues :rtype: bool
-
validateJobCount
(**kwargs)¶
-
validateOPLSDir
(opls_dir=None)¶ See
forcefield.validate_opls_dir()
Parameters: opls_dir (str or None) – the opls dir to validate Returns: the validation result Return type: forcefield.OPLSDirResult
-
visibleRegion
(self) → QRegion¶
-
warning
(text, preferences=None, key='')¶ Display a warning dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.
Parameters: - text (str) – The information to display in the dialog
- preferences (
schrodinger.utils.preferences.Preferences
object) – The Preferences class to use to store the show/don’t show preference for this dialog. Note that the Preferences object must currently be set to the preference group containing key. - key (str) – The key to store the preference under
Return type: None
-
whatsThis
(self) → str¶
-
wheelEvent
(self, QWheelEvent)¶
-
width
(self) → int¶
-
widthMM
(self) → int¶
-
winId
(self) → sip.voidptr¶
-
window
(self) → QWidget¶
-
windowFilePath
(self) → str¶
-
windowFlags
(self) → Qt.WindowFlags¶
-
windowHandle
(self) → QWindow¶
-
windowIcon
(self) → QIcon¶
-
windowIconChanged
¶ windowIconChanged(self, QIcon) [signal]
-
windowIconText
(self) → str¶
-
windowIconTextChanged
¶ windowIconTextChanged(self, str) [signal]
-
windowModality
(self) → Qt.WindowModality¶
-
windowOpacity
(self) → float¶
-
windowRole
(self) → str¶
-
windowState
(self) → Qt.WindowStates¶
-
windowTitle
(self) → str¶
-
windowTitleChanged
¶ windowTitleChanged(self, str) [signal]
-
windowType
(self) → Qt.WindowType¶
-
writeJobCmd
(cmdlist)¶ Writes the job invocation command to a file named “<jobname>.sh” Removes options from the command that are maestro-specific.
-
writePanelState
(filename=None)¶ Write the panel state to a JSON file
Parameters: filename (str) – the JSON filename. Defaults to “panelstate.json”
-
writeStateAndClose
()¶ Called when OK button button is pressed when running in KNIME mode. Will “write” the job files and close the panel.
-
x
(self) → int¶
-
y
(self) → int¶
-
-
class
schrodinger.application.matsci.guibase.
PerStrucConfigDialog
(parent, title='', jobname='', checkcommand=None, multi_gpgpu_allowed=True, **kw)¶ Bases:
schrodinger.application.desmond.gui.DesmondGuiConfigDialog
Dialog for configuring jobs that can have CPUs/GPUs per input structure specified.
-
CPU_UNIT_LABEL
= 'processors per structure'¶
-
GPU_UNIT_LABEL
= 'GPUs per structure'¶
-
CANCEL
= 'Cancel'¶
-
HELP
= 'Help'¶
-
HOST_LABEL_TEXT
= 'Host:'¶
-
SAVE
= 'OK'¶
-
START
= 'Run'¶
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.matsci.guibase', '__doc__': '\n Dialog for configuring jobs that can have CPUs/GPUs per input structure\n specified.\n ', 'CPU_UNIT_LABEL': 'processors per structure', 'GPU_UNIT_LABEL': 'GPUs per structure'})¶
-
__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__
(parent, title='', jobname='', checkcommand=None, multi_gpgpu_allowed=True, **kw)¶ See class docstring. Raises an Exception if the disposition specified as the default is not recognized.
If pre_close_command is specified, it will be run when the user presses the Start button. The dialog is only closed if that function returns 0.
-
__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.application.matsci.guibase'¶
-
__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)
-
activate
()¶ Display the dialog and return the dialog parameters as as StartDialogParam object. If the dialog was cancelled then return None and restore the prior state.
-
applySettings
(settings)¶ See parent class docstring
-
cpus3Edited
(ignored=None)¶
-
currentHost
(menu=None, hosts=None)¶ Returns the host currently selected in the menu parameter. If none is given, use self.host_menu. Validates that the menu item matches the corresponding self.hosts member variable. currentHost() can be overridden to use a different menu by default.
Parameters: - menu (
QtWidgets.QComboBox
) – Menu to check for current host - hosts (list) – List of hosts if not using self.hosts attribute
- menu (
-
classmethod
getGPGPUs
(hostname)¶ Given a host, return a list of GPUs
-
getHostPref
()¶ Get the stored host preference if available
Returns: Stored host preference if available or None Return type: str or None
-
getHostType
()¶
-
getHosts
(_1=True, _2=False)¶ Get the hosts based on current CPU/GPU setting.
Returns: List of current hosts Return type: config_dialog.Host
-
getSettings
(extra_kws=None)¶ Return dialog state by saving the state of the checkbox and then calling the base class
-
getTotalOpenMPCPUs
()¶ Compute the total number of Open MP CPUs to use based on the number of threads and subjobs the user entered
Return type: int Returns: total number of CPUs
-
isCPUHost
()¶
-
isGPUHost
()¶
-
onProcUnitComboIndexChanged
(use_host=None)¶ Update the available hosts based on the current processor unit type. Will also hide/show widgets based on whether GPU is selected but no GPU hosts are available or not.
Parameters: use_host (str) – Host to be set in the host combo
-
onWriteRequested
()¶ Slot for Write button.
-
savePressed
()¶ Slot for Save button
-
setUpButtonBox
()¶ Set up the dialog’s button box.
-
setupHostCombo
(combo, use_host=None)¶
-
setupHostLayout
()¶ Setup the host layout, including hostlist/table and numbers of cpus (including cpus3).
-
showHelp
()¶
-
startPressed
()¶ Slot for OK and Run button
-
updateCPULimits
()¶ This method is called whenever host selection is changed. It updates maximum number of allowed CPUs.
-
updateOpenMPInfo
()¶ Show/Hide the proper frames and update the processors label
-
updateOpenMPLabel
()¶ Update the Open MP label with the current number of processors requested
-
updateQueueResources
()¶ This updates the queue resources display when the host has changed.
-
validate
()¶ Checks the panel to make sure settings are valid. Return False if any validation test fails, otherwise return True.
-
validateAndAccept
()¶ Validate the settings, and if no errors are found, close the dialog.
-
validateNumCpus
(host, editfield, silent=False)¶ Validate number of CPUs :type host: Host :param host: the host on which the CPUs reside :type editfield: QWidget :param editfield: widget specifying the number of CPUs :type silent: bool :param silent: suppresses warning dialogs when set to True
-
validateNumGpus
(host, editfield, silent=False)¶ Validate number of GPUs :type host: Host :param host: the host on which the GPUs reside :type editfield: QWidget :param editfield: widget specifying the number of GPUs :type silent: bool :param silent: suppresses warning dialogs when set to True
-
validateNumOpenMP
(host, silent=False)¶ Checks to make sure the number of requested processors and threads is consistent with what we know of the host capabilities.
Parameters: - host (Host) – The host on which the CPUs reside
- silent (bool) – suppresses warning dialogs when set to True
Return type: bool
Returns: True if number of processors & threads is allowed, False if not
-
validateNumProcs
(silent=False)¶ See ConfigDialog.validateNumProcs docstring.
-
warning
(text)¶ Display a warning window with the specified text.
-
-
class
schrodinger.application.matsci.guibase.
PerStrucSingleGpuConfigDialog
(*args, **kwargs)¶ Bases:
schrodinger.application.desmond.gui.SingleGpuDesmondGuiConfigDialog
Class to configure jobs that can use a single GPU per input structure.
-
CPU_UNIT_LABEL
= 'processors per structure'¶
-
GPU_UNIT_LABEL
= 'GPUs per structure'¶
-
CANCEL
= 'Cancel'¶
-
HELP
= 'Help'¶
-
HOST_LABEL_TEXT
= 'Host:'¶
-
SAVE
= 'OK'¶
-
START
= 'Run'¶
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.matsci.guibase', '__doc__': '\n Class to configure jobs that can use a single GPU per input structure.\n ', 'CPU_UNIT_LABEL': 'processors per structure', 'GPU_UNIT_LABEL': 'GPUs per structure'})¶
-
__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__
(*args, **kwargs)¶ See class docstring. Raises an Exception if the disposition specified as the default is not recognized.
If pre_close_command is specified, it will be run when the user presses the Start button. The dialog is only closed if that function returns 0.
-
__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.application.matsci.guibase'¶
-
__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)
-
activate
()¶ Display the dialog and return the dialog parameters as as StartDialogParam object. If the dialog was cancelled then return None and restore the prior state.
-
applySettings
(settings)¶ See parent class docstring
-
cpus3Edited
(ignored=None)¶
-
currentHost
(menu=None, hosts=None)¶ Returns the host currently selected in the menu parameter. If none is given, use self.host_menu. Validates that the menu item matches the corresponding self.hosts member variable. currentHost() can be overridden to use a different menu by default.
Parameters: - menu (
QtWidgets.QComboBox
) – Menu to check for current host - hosts (list) – List of hosts if not using self.hosts attribute
- menu (
-
classmethod
getGPGPUs
(hostname)¶ Given a host, return a list of GPUs
-
getHostPref
()¶ Get the stored host preference if available
Returns: Stored host preference if available or None Return type: str or None
-
getHostType
()¶
-
getHosts
(_1=True, _2=False)¶ Get the hosts based on current CPU/GPU setting.
Returns: List of current hosts Return type: config_dialog.Host
-
getSettings
(extra_kws=None)¶ Return dialog state by saving the state of the checkbox and then calling the base class
-
getTotalOpenMPCPUs
()¶ Compute the total number of Open MP CPUs to use based on the number of threads and subjobs the user entered
Return type: int Returns: total number of CPUs
-
isCPUHost
()¶
-
isGPUHost
()¶
-
onProcUnitComboIndexChanged
(use_host=None)¶ Update the available hosts based on the current processor unit type. Will also hide/show widgets based on whether GPU is selected but no GPU hosts are available or not.
Parameters: use_host (str) – Host to be set in the host combo
-
onWriteRequested
()¶ Slot for Write button.
-
savePressed
()¶ Slot for Save button
-
setUpButtonBox
()¶ Set up the dialog’s button box.
-
setupHostCombo
(combo, use_host=None)¶
-
setupHostLayout
()¶ Setup the host layout, including hostlist/table and numbers of cpus (including cpus3).
-
showHelp
()¶
-
startPressed
()¶ Slot for OK and Run button
-
updateCPULimits
()¶ This method is called whenever host selection is changed. It updates maximum number of allowed CPUs.
-
updateOpenMPInfo
()¶ Show/Hide the proper frames and update the processors label
-
updateOpenMPLabel
()¶ Update the Open MP label with the current number of processors requested
-
updateQueueResources
()¶ This updates the queue resources display when the host has changed.
-
validate
()¶ Checks the panel to make sure settings are valid. Return False if any validation test fails, otherwise return True.
-
validateAndAccept
()¶ Validate the settings, and if no errors are found, close the dialog.
-
validateNumCpus
(host, editfield, silent=False)¶ Validate number of CPUs :type host: Host :param host: the host on which the CPUs reside :type editfield: QWidget :param editfield: widget specifying the number of CPUs :type silent: bool :param silent: suppresses warning dialogs when set to True
-
validateNumGpus
(host, editfield, silent=False)¶ Validate number of GPUs :type host: Host :param host: the host on which the GPUs reside :type editfield: QWidget :param editfield: widget specifying the number of GPUs :type silent: bool :param silent: suppresses warning dialogs when set to True
-
validateNumOpenMP
(host, silent=False)¶ Checks to make sure the number of requested processors and threads is consistent with what we know of the host capabilities.
Parameters: - host (Host) – The host on which the CPUs reside
- silent (bool) – suppresses warning dialogs when set to True
Return type: bool
Returns: True if number of processors & threads is allowed, False if not
-
validateNumProcs
(silent=False)¶ See ConfigDialog.validateNumProcs docstring.
-
warning
(text)¶ Display a warning window with the specified text.
-