schrodinger.ui.qt.appframework2.jobs module

Job runners are subclasses of task runners. See the tasks module for more general information.

class schrodinger.ui.qt.appframework2.jobs.RunMode

Bases: enum.Enum

An enumeration.

START = 1
STU = 3
WRITE = 2
class schrodinger.ui.qt.appframework2.jobs.JobOptions

Bases: object

A simple class for storing the options for a particular job runner. These options pertain to a runner, not to a specific job. For example, the host parameter only determines whether a host can be specified for this job type, not which host to use for any particular run.

__init__()

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

toDict()
class schrodinger.ui.qt.appframework2.jobs.JobConfig(job_options)

Bases: object

Holds the standard configuration settings for a particular job run. The job options determine what settings are available.

__init__(job_options)
Parameters:job_options (JobOptions) – the options for the associated job type.
applySettings(settings)
hostFlag()
dispFlag()
projFlag()
viewnameFlag()
appendFlags(cmdlist, run_mode=<RunMode.START: 1>)

Takes a cmdlist and appends the standard configuration flags appropriate for the context. This will depend on whether the intent is to start or write the job and whether maestro is available.

Parameters:
  • cmdlist (list) – the original command list
  • run_mode (RunMode) – which action is being taken - start, write, or STU
summaryText()

Generates the text to display in the status bar via the updateStatusText method.

class schrodinger.ui.qt.appframework2.jobs.JobWrapper(job, settings=None, name='', **kwargs)

Bases: schrodinger.ui.qt.appframework2.tasks.AbstractTaskWrapper

Wraps jobcontrol.Job objects to present a common interface for af2.tasks. See tasks.AbstractTaskWrapper for more information.

self.isRunning() and self.status() both call Job.readAgain(). This results in a bit of redundancy - if this causes performance issues, it can be optimized later.

TASK_CLASS

alias of schrodinger.job.jobcontrol.Job

__init__(job, settings=None, name='', **kwargs)
Parameters:
  • task (see derived class) – the underlying task object (depends on subclass)
  • name (str) – the task name
  • settings (dict) – the settings used to run this task
  • test_mode (bool) – disables type-checking of the task object. Used for mocking that task in tests
isRunning()

Whether this task is currently running.

status()

The current status of the task. The schema is flexible and can be agreed upon with the corresponding runner.

jobId()
getName()
setName(name)
settings()

Returns the settings that were used to run this task.

class schrodinger.ui.qt.appframework2.jobs.WrittenJobWrapper(task, settings=None, name='', test_mode=False)

Bases: schrodinger.ui.qt.appframework2.tasks.AbstractTaskWrapper

This is basically an empty wrapper for representing a written job.

TASK_CLASS

alias of builtins.str

isRunning()

Whether this task is currently running.

status()

The current status of the task. The schema is flexible and can be agreed upon with the corresponding runner.

jobId()
filename()
__init__(task, settings=None, name='', test_mode=False)
Parameters:
  • task (see derived class) – the underlying task object (depends on subclass)
  • name (str) – the task name
  • settings (dict) – the settings used to run this task
  • test_mode (bool) – disables type-checking of the task object. Used for mocking that task in tests
getName()
setName(name)
settings()

Returns the settings that were used to run this task.

class schrodinger.ui.qt.appframework2.jobs.BaseJobRunner(messaging_callback=None, settings_callback=None)

Bases: schrodinger.ui.qt.appframework2.tasks.AbstractTaskRunner

A job runner is a type of task runner that performs its task via launching a job under job control.

__init__(messaging_callback=None, settings_callback=None)

Initializes a new task runner

Parameters:messaging_callback

callback used for interacting with the user. This includes both reporting results or errors and asking questions to the user. The callback should be of the form:

f(message_type, text, options=None, runner=None)

where message_type is one of ERROR, WARNING, or QUESTION, text is the text of the message to be displayed, and options is an optional dict which can be used by the callback. For example, a dialog title could be passed to the callback via the options dict. The callback should never depend on the presence or absence of any options. The runner is simply the runner that is making the call, so that the callback can tell which runner is invoking the callback.

When the message is a question, the function should return the user’s response, typically True or False for a yes/no question.

Parameters:settings_callback

callback for communicating state with the parent object. This callback can be used both to push state to or pull state from the parent object. The callback should be of the form:

f(settings=None, runner=None)

If no settings are passed in, the callback should return the state of the parent object (i.e. the panel state) in the form of a dictionary.

The runner can be passed in as well if the callback needs to access the runner to properly process the callback.

If a settings dictionary is passed in, the callback should apply any settings in the dictionary to the parent object (thus altering its state). Passing in an empty dictionary is a no-op.

start()

Starts the task. This includes the preliminary work of calling preValidate() and running validation before attempting to actually start the task itself.

The actual starting of the task should be handled in the _start method in the derived classes and will vary depening on the type of runner.

resetState()
addTask(task)

Add a new task to be tracked. This should be called whenever a task is started.

Parameters:task (AbstractTaskWrapper) – the task
findJob(jobid)

Finds a wrapped job by its job id.

Parameters:jobid (str) – the job id
Returns:the job
Return type:JobWrapper
viewname()
update()

Slot method to update the state of the job runner.

write()

Call this to write out a job to be run later.

getSHFilename()

Returns the .sh filename for the next job.

writeSTU()

Writes out a STU test set.

createJobDir()
nextJobDir()
makeSchrodingerCmd(*args)

Builds a $SCHRODINGER command string from all the args passed in. The resulting string is suitable for use in a cmdlist and formatted for use in starting or writing the job depending on self.run_mode. In START mode, the $SCHRODINGER environment variable will be expanded. In WRITE mode, it will stay as $SCHRODINGER and the path will be delimited with linux-style forward slashes.

Example: self.makeSchrodingerCmd(‘utilities’, ‘my_utility’) will return “${SCHRODINGER}/utilities/my_utility” in WRITE mode.

getSchrodingerRun()

Returns the correct version of the $SCHRODINGER/run string. This will depend on whether the intent is to start or to write the job.

makeCmdList()

Implement this to generate a cmdlist. This cmdlist will be used for write functionality.

setupJobOptions(options)

Override this to set the job options for this job. The options is passed in by the framework. Modify and return the options object. The options object will determine, for example, what the config dialog should look like. For example:

options.incorporation = False
options.create_job_dir = False
return options

If this method is not overridden, default options will be used.

Parameters:options (JobOptions) – the options object to be customized.
jobOptions()
setConfig(config)
getNextConfig()
appendConfigFlags(cmdlist)
setCustomName(name)

Sets a custom name for the next task to be run.

Parameters:name (str) – the custom name. Pass in an empty string to return to standard naming.
updateStatusText()

Override this to update the status, for example, when settings have changed or the current task runner is switched.

blockSignals(self, bool) → bool
childEvent(self, QChildEvent)
children(self) → List[QObject]
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
defaultSettings()

Override this method to define default values for any settings. This dictionary of default settings will be used to reset the parent.

deleteLater(self)
destroyed

destroyed(self, object: QObject = None) [signal]

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → List[QByteArray]
error(text, caption='Error')
event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject

findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject

findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]

findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]

findTask(name)
info(text, caption='Info')
inherits(self, str) → bool
installEventFilter(self, QObject)
isRunning()
isSignalConnected(self, QMetaMethod) → bool
isWidgetType(self) → bool
isWindowType(self) → bool
killTimer(self, int)
metaObject(self) → QMetaObject
moveToThread(self, QThread)
nameChanged
names()
nextName(name_list=None)

Returns the name that will be assigned to the next task that gets run. There is no currentName(), as multiple tasks might be running concurrently. To get the name of an existing task, use task.getName().

If a custom name has been set, that will be used as the next name. Otherwise, the base name will be used to generate a new unique name.

This method can be overridden to alter the task naming behavior.

Parameters:name_list (list of basestring) – Optional list of names to uniquify against. If not given, the name will be compared against the stored self.names()
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

parent(self) → QObject
postProcess(task)

Override this to include any logic that should be run whenever a task completes. This method is called whenever a task stops running, whether it succeeded, failed, or encounrtered an error.

The completed task is passed in as a parameter to allow querying and modification of the task instance.

There is currently no mechanism for ensuring this logic gets run between maestro sesions. If a session is closed while the job is running, this method will never be called. Use this method to perform only actions that make sense in the context of a single session.

Parameters:task (AbstractTaskWrapper) – the task that has ended
postStart(task)

Override this to include any logic that should be run immediately after a task is started. This will only be run after a task actually starts.

The started task is passed in as a parameter to allow interaction with the task instance. Note that there is no guarantee that the task is still running when this method is called.

Parameters:task (AbstractTaskWrapper) – the task that was just started
preValidate()

Override this to include any logic that should be run prior to the validation step.

Returns:Whether this step has succeeded. Returning False will result in aborting the task
Return type:bool
property(self, str) → Any
pullSettings()

This method calls the settings callback, which should return the user’s input for this job, such as input files, options, etc. For GUI panels, this is how the panel state is applied to the job runner.

pushSettings(settings=None)

Pushes a settings dictionary via the settings callback. Doing this will alter the state of the parent object (generally the panel). This function can be used to reset the panel or load saved presets.

If a settings dictionary is not passed in, the current job settings will be used.

Parameters:settings (dict) – a settings dictionary to push to the parent object
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(text, caption='Question')
receivers(self, PYQT_SIGNAL) → int
removeEventFilter(self, QObject)
reportValidation(results)

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

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

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

Resets the parent object using the default settings defined by the task runner.

resetAll()
resetAllRequested
runValidation(silent=False, validate_children=True, stop_on_fail=True)

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

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

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

Return type:

ValidationResults or bool

sender(self) → QObject
senderSignalIndex(self) → int
setCallbacks(messaging_callback=None, settings_callback=None)
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) → bool
setRunnerOptions()

Optional override to set options for the runner. Not overriding this at all results in using all default values.

self.allow custom_name - whether name is user-editable. Default: False

self.allow_concurrent - whether another task can be started while one is still running. Default: True

self.history_length - how many past jobs to keep track of. Default: 5

self.base_name - the base for task names. The base name gets modified to generate unique task names. Ex. MyTask_3. Default: “task”

self.runner_name - a name to describe the type of task. Equivalent to program_name for jobs. Default: ‘task’

settings()
showMessage(message_type, text, options=None)

Communicates with the parent object via the messaging_callback. This method generally doesn’t need to be called; call error, warning, question, or info instead.

Parameters:
  • message_type (int) – the type of message to send
  • text (str) – the main text of the message
  • options (dict) – a dictionary of other options to be processed by the messaging_callback.
signalsBlocked(self) → bool
startFailed
startRequested
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
stateChanged
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
status(text, timeout=3000, color=None)

Request a status message to be displayed by the runner’s parent.

Parameters:
  • text (str) – the text to display
  • timeout (int) – duration in ms to display the status. A timeout of 0 results in a permanent message.
  • color (QtGui.QColor) – color of the status message.
taskEnded
taskStarted
tasks()
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
warning(text, caption='Warning')
class schrodinger.ui.qt.appframework2.jobs.CmdJobRunner(messaging_callback=None, settings_callback=None)

Bases: schrodinger.ui.qt.appframework2.jobs.BaseJobRunner

This is the basic job runner for setting up and running a cmd line job. The job is launched using jobcontrol.launch_job().

makeCmdList()

This is the main method that needs to be implemented to define a specific cmd job runner. It should just return a complete cmd list for the job to be launched. Standard job options should be left off.

__init__(messaging_callback=None, settings_callback=None)

Initializes a new task runner

Parameters:messaging_callback

callback used for interacting with the user. This includes both reporting results or errors and asking questions to the user. The callback should be of the form:

f(message_type, text, options=None, runner=None)

where message_type is one of ERROR, WARNING, or QUESTION, text is the text of the message to be displayed, and options is an optional dict which can be used by the callback. For example, a dialog title could be passed to the callback via the options dict. The callback should never depend on the presence or absence of any options. The runner is simply the runner that is making the call, so that the callback can tell which runner is invoking the callback.

When the message is a question, the function should return the user’s response, typically True or False for a yes/no question.

Parameters:settings_callback

callback for communicating state with the parent object. This callback can be used both to push state to or pull state from the parent object. The callback should be of the form:

f(settings=None, runner=None)

If no settings are passed in, the callback should return the state of the parent object (i.e. the panel state) in the form of a dictionary.

The runner can be passed in as well if the callback needs to access the runner to properly process the callback.

If a settings dictionary is passed in, the callback should apply any settings in the dictionary to the parent object (thus altering its state). Passing in an empty dictionary is a no-op.

addTask(task)

Add a new task to be tracked. This should be called whenever a task is started.

Parameters:task (AbstractTaskWrapper) – the task
appendConfigFlags(cmdlist)
blockSignals(self, bool) → bool
childEvent(self, QChildEvent)
children(self) → List[QObject]
connectNotify(self, QMetaMethod)
createJobDir()
customEvent(self, QEvent)
defaultSettings()

Override this method to define default values for any settings. This dictionary of default settings will be used to reset the parent.

deleteLater(self)
destroyed

destroyed(self, object: QObject = None) [signal]

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → List[QByteArray]
error(text, caption='Error')
event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject

findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject

findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]

findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]

findJob(jobid)

Finds a wrapped job by its job id.

Parameters:jobid (str) – the job id
Returns:the job
Return type:JobWrapper
findTask(name)
getNextConfig()
getSHFilename()

Returns the .sh filename for the next job.

getSchrodingerRun()

Returns the correct version of the $SCHRODINGER/run string. This will depend on whether the intent is to start or to write the job.

info(text, caption='Info')
inherits(self, str) → bool
installEventFilter(self, QObject)
isRunning()
isSignalConnected(self, QMetaMethod) → bool
isWidgetType(self) → bool
isWindowType(self) → bool
jobOptions()
killTimer(self, int)
makeSchrodingerCmd(*args)

Builds a $SCHRODINGER command string from all the args passed in. The resulting string is suitable for use in a cmdlist and formatted for use in starting or writing the job depending on self.run_mode. In START mode, the $SCHRODINGER environment variable will be expanded. In WRITE mode, it will stay as $SCHRODINGER and the path will be delimited with linux-style forward slashes.

Example: self.makeSchrodingerCmd(‘utilities’, ‘my_utility’) will return “${SCHRODINGER}/utilities/my_utility” in WRITE mode.

metaObject(self) → QMetaObject
moveToThread(self, QThread)
nameChanged
names()
nextJobDir()
nextName(name_list=None)

Returns the name that will be assigned to the next task that gets run. There is no currentName(), as multiple tasks might be running concurrently. To get the name of an existing task, use task.getName().

If a custom name has been set, that will be used as the next name. Otherwise, the base name will be used to generate a new unique name.

This method can be overridden to alter the task naming behavior.

Parameters:name_list (list of basestring) – Optional list of names to uniquify against. If not given, the name will be compared against the stored self.names()
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

parent(self) → QObject
postProcess(task)

Override this to include any logic that should be run whenever a task completes. This method is called whenever a task stops running, whether it succeeded, failed, or encounrtered an error.

The completed task is passed in as a parameter to allow querying and modification of the task instance.

There is currently no mechanism for ensuring this logic gets run between maestro sesions. If a session is closed while the job is running, this method will never be called. Use this method to perform only actions that make sense in the context of a single session.

Parameters:task (AbstractTaskWrapper) – the task that has ended
postStart(task)

Override this to include any logic that should be run immediately after a task is started. This will only be run after a task actually starts.

The started task is passed in as a parameter to allow interaction with the task instance. Note that there is no guarantee that the task is still running when this method is called.

Parameters:task (AbstractTaskWrapper) – the task that was just started
preValidate()

Override this to include any logic that should be run prior to the validation step.

Returns:Whether this step has succeeded. Returning False will result in aborting the task
Return type:bool
property(self, str) → Any
pullSettings()

This method calls the settings callback, which should return the user’s input for this job, such as input files, options, etc. For GUI panels, this is how the panel state is applied to the job runner.

pushSettings(settings=None)

Pushes a settings dictionary via the settings callback. Doing this will alter the state of the parent object (generally the panel). This function can be used to reset the panel or load saved presets.

If a settings dictionary is not passed in, the current job settings will be used.

Parameters:settings (dict) – a settings dictionary to push to the parent object
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(text, caption='Question')
receivers(self, PYQT_SIGNAL) → int
removeEventFilter(self, QObject)
reportValidation(results)

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

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

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

Resets the parent object using the default settings defined by the task runner.

resetAll()
resetAllRequested
resetState()
runValidation(silent=False, validate_children=True, stop_on_fail=True)

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

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

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

Return type:

ValidationResults or bool

sender(self) → QObject
senderSignalIndex(self) → int
setCallbacks(messaging_callback=None, settings_callback=None)
setConfig(config)
setCustomName(name)

Sets a custom name for the next task to be run.

Parameters:name (str) – the custom name. Pass in an empty string to return to standard naming.
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) → bool
setRunnerOptions()

Optional override to set options for the runner. Not overriding this at all results in using all default values.

self.allow custom_name - whether name is user-editable. Default: False

self.allow_concurrent - whether another task can be started while one is still running. Default: True

self.history_length - how many past jobs to keep track of. Default: 5

self.base_name - the base for task names. The base name gets modified to generate unique task names. Ex. MyTask_3. Default: “task”

self.runner_name - a name to describe the type of task. Equivalent to program_name for jobs. Default: ‘task’

settings()
setupJobOptions(options)

Override this to set the job options for this job. The options is passed in by the framework. Modify and return the options object. The options object will determine, for example, what the config dialog should look like. For example:

options.incorporation = False
options.create_job_dir = False
return options

If this method is not overridden, default options will be used.

Parameters:options (JobOptions) – the options object to be customized.
showMessage(message_type, text, options=None)

Communicates with the parent object via the messaging_callback. This method generally doesn’t need to be called; call error, warning, question, or info instead.

Parameters:
  • message_type (int) – the type of message to send
  • text (str) – the main text of the message
  • options (dict) – a dictionary of other options to be processed by the messaging_callback.
signalsBlocked(self) → bool
start()

Starts the task. This includes the preliminary work of calling preValidate() and running validation before attempting to actually start the task itself.

The actual starting of the task should be handled in the _start method in the derived classes and will vary depening on the type of runner.

startFailed
startRequested
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
stateChanged
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
status(text, timeout=3000, color=None)

Request a status message to be displayed by the runner’s parent.

Parameters:
  • text (str) – the text to display
  • timeout (int) – duration in ms to display the status. A timeout of 0 results in a permanent message.
  • color (QtGui.QColor) – color of the status message.
taskEnded
taskStarted
tasks()
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
update()

Slot method to update the state of the job runner.

updateStatusText()

Override this to update the status, for example, when settings have changed or the current task runner is switched.

viewname()
warning(text, caption='Warning')
write()

Call this to write out a job to be run later.

writeSTU()

Writes out a STU test set.

schrodinger.ui.qt.appframework2.jobs.cmdlist_to_cmd(cmdlist)

Converts a command list to a command string. Don’t do this if you can possibly avoid it.

subprocess.list2cmdline() is not sufficient because it won’t quote env vars like $SCHRODINGER (which can expand to “path with spaces”

Parameters:cmdlist (list) – a list of commands
Returns:sh interpolable list
schrodinger.ui.qt.appframework2.jobs.set_sh_file_flags(filename)
schrodinger.ui.qt.appframework2.jobs.get_first_hostname(host)

Given a host string, get the corresponding hosts list from jobcontrol and return the first hostname from that list.

Parameters:host (string) –
Hosts string which determine the string value of result server argument. These are values usually from configuration dialog and is of the form “galina” or “galina:1” or “galina,monica” or “galina:2,monica:3” or “galina monica” or “galina:2 monica:3”.
rtype:str
return:Hostname based on the first of the first hosts in the jobcontrol list.
schrodinger.ui.qt.appframework2.jobs.job_belongs_to_panel(jobid, viewname)

Return True if jobid belongs to viewname of a panel. Used by incorporation callbacks to determine if the job belongs to us.

Parameters:
  • jobid (str) – jobid for a given job
  • viewname (str) – viewname corresponding to panel