schrodinger.job.jobhandler module¶
- class schrodinger.job.jobhandler.JobHandler(cmd: List[str], viewname: Optional[str] = None, launch_dir: Optional[str] = None)¶
Bases:
schrodinger.job.jobhandler._AbstractJobHandler
A Job Handler for running and waiting on jobs. To use, initialize with a list of strings that you would use with JobViewFilter.launchJob. Then connect
my_jobhandler.jobCompleted
to any slots that need to be executed after the job is finished. The job handler also has a wait method that will pause execution of the current event until the job is finished. Note that during the wait, other ui events will continue to be processed.- __init__(cmd: List[str], viewname: Optional[str] = None, launch_dir: Optional[str] = None)¶
- blockSignals(self, b: bool) bool ¶
- childEvent(self, a0: QChildEvent)¶
- children(self) List[QObject] ¶
- connectNotify(self, signal: QMetaMethod)¶
- customEvent(self, a0: QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: typing.Optional[QObject] = None) [signal]
- disconnect(a0: QMetaObject.Connection) bool ¶
- disconnect(self) None
- disconnectNotify(self, signal: QMetaMethod)¶
- dumpObjectInfo(self)¶
- dumpObjectTree(self)¶
- dynamicPropertyNames(self) List[QByteArray] ¶
- event(self, a0: QEvent) bool ¶
- eventFilter(self, a0: QObject, a1: QEvent) bool ¶
- findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject ¶
- findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
- findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject] ¶
- findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- inherits(self, classname: str) bool ¶
- installEventFilter(self, a0: QObject)¶
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- isWidgetType(self) bool ¶
- isWindowType(self) bool ¶
- jobCompleted¶
- jobDownloadFailed¶
- jobProgressChanged¶
- killTimer(self, id: int)¶
- launchJob(*, _debug_delay=None) schrodinger.job.jobcontrol.Job ¶
Launch the job.
- metaObject(self) QMetaObject ¶
- moveToThread(self, thread: QThread)¶
- objectName(self) str ¶
- objectNameChanged¶
objectNameChanged(self, objectName: str) [signal]
- parent(self) QObject ¶
- property(self, name: str) Any ¶
- pyqtConfigure(...)¶
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
- receivers(self, signal: PYQT_SIGNAL) int ¶
- removeEventFilter(self, a0: QObject)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, name: str)¶
- setParent(self, a0: QObject)¶
- setProperty(self, name: str, value: Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt6.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, a0: QTimerEvent)¶
- tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str ¶
- wait()¶
- class schrodinger.job.jobhandler.AsyncJobHandler(*args, **kwargs)¶
Bases:
schrodinger.job.jobhandler._AbstractJobHandler
A jobhandler that launches jobs asynchronously (i.e. launchJob doesn’t wait for the job to actually start before returning).
- jobStarted¶
- jobLaunchFailed¶
- __init__(*args, **kwargs)¶
See _AbstractJobHandler for arguments.
- blockSignals(self, b: bool) bool ¶
- childEvent(self, a0: QChildEvent)¶
- children(self) List[QObject] ¶
- connectNotify(self, signal: QMetaMethod)¶
- customEvent(self, a0: QEvent)¶
- deleteLater(self)¶
- destroyed¶
destroyed(self, object: typing.Optional[QObject] = None) [signal]
- disconnect(a0: QMetaObject.Connection) bool ¶
- disconnect(self) None
- disconnectNotify(self, signal: QMetaMethod)¶
- dumpObjectInfo(self)¶
- dumpObjectTree(self)¶
- dynamicPropertyNames(self) List[QByteArray] ¶
- event(self, a0: QEvent) bool ¶
- eventFilter(self, a0: QObject, a1: QEvent) bool ¶
- findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject ¶
- findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
- findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject] ¶
- findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- inherits(self, classname: str) bool ¶
- installEventFilter(self, a0: QObject)¶
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- isWidgetType(self) bool ¶
- isWindowType(self) bool ¶
- jobCompleted¶
- jobDownloadFailed¶
- jobProgressChanged¶
- killTimer(self, id: int)¶
- launchJob(*, _debug_delay=None) schrodinger.job.jobcontrol.Job ¶
Launch the job.
- metaObject(self) QMetaObject ¶
- moveToThread(self, thread: QThread)¶
- objectName(self) str ¶
- objectNameChanged¶
objectNameChanged(self, objectName: str) [signal]
- parent(self) QObject ¶
- property(self, name: str) Any ¶
- pyqtConfigure(...)¶
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
- receivers(self, signal: PYQT_SIGNAL) int ¶
- removeEventFilter(self, a0: QObject)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, name: str)¶
- setParent(self, a0: QObject)¶
- setProperty(self, name: str, value: Any) bool ¶
- signalsBlocked(self) bool ¶
- startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt6.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, a0: QTimerEvent)¶
- tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str ¶
- wait()¶
- schrodinger.job.jobhandler.job_incorporated(job_id: str, first_entry_id: int, last_entry_id: int)¶
The function which is called after successful incorporation of the job from maestro. It is called only if job output is incorporated through maestro job incorporation. If individual panels have their own incorporation handler registered via maestro.job_incorporation_function_add(), and the panel is currently open and has handled the incorporation, this function will not be called by Maestro.
- Parameters
job_id – The id of the incorporated job
first_entry_id – The id of the first entry imported in the project from the output structure file associated with the given job.
last_entry_id – The id of the last entry imported in the project from the output structure file associated with the given job.
- schrodinger.job.jobhandler.connect_job_manager_signals()¶
Called by maestro to connect job manager signals to Python slots.
- schrodinger.job.jobhandler.launch_job_with_callback(cmd: List[str], callback: Callable[[schrodinger.job.jobcontrol.Job], None], launch_dir: Optional[str] = None) schrodinger.job.jobcontrol.Job ¶
Launch the given job, and call the specified callback when the job completes (either successfully or with a failure).
- Parameters
cmd – Command list
callback – Function to call when the job completes (either successfully or with a failure), with Job object as the only parameter.
launch_dir – Directory to launch job under
- Raises
RuntimeError – if the job fails to start.
- schrodinger.job.jobhandler.is_auto_download_active()¶
- Returns
Whether job auto-downloading is enabled