Package schrodinger :: Package job :: Module jobcontrol :: Class _Backend
[hide private]
[frames] | no frames]

Class _Backend

object --+
         |
        _Backend
Known Subclasses:

An interface to mmjobbe. Because this class does nothing useful if not already running under jobcontrol, all methods should be no-ops if there is no job_id attribute.

Instance Methods [hide private]
 
__init__(self)
Get the job_id and jobdir pathname of the current Job Control process (only meaningful if running under Job Control).
 
getJob(self)
Retrieve a read-only instance of a job record (as an instance of the Job class).
 
__getstate__(self)
 
__del__(self)
Clean up library initializations.
 
setStructureOutputFile(self, file)
Set the backend structure file.
 
addOutputFile(self, file)
Add an output file for job control to copy back to the launch host.
 
addRequiredOutputFile(self, file)
Add a required output file for job control to copy back to the launch host.
 
addLogFile(self, file)
Add a log file.
 
addMonitorFile(self, file)
Add a monitor file.
 
setStructureMonitorFile(self, file)
set structure monitor file.
 
copyOutputFile(self, path)
Copy a completed output file or directory back to the launch directory.
 
syncdb(self)
tell jmonitor to update the job record immediately.
 
sendMessageToParent(self, message)
Send message <message> (string) to the parent of this job.
 
sendMessageToSubjobs(self, message)
Send message <message> (string) to each child of this job.
 
sendMessageToSubjob(self, message, jobid)
Send message <message> (string) to the job specified as <jobid>.
 
addMessageName(self, msgname)
Add message type to be queued for the backend to read using nextMessage().
 
nextMessage(self)
Return next unread message from the queue if there is one or None if there are no messages.
 
setJobProgress(self, steps=0, totalsteps=0, description='')
Tell jmonitor to set the job progress (steps out of total steps).
 
deleteSubJob(self, jobid)
Tell jmonitor of the backend to delete the subjob field from the parent job record.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

Get the job_id and jobdir pathname of the current Job Control process (only meaningful if running under Job Control). Using the get_backend() function should be preferred to initializing a _Backend object explicitly.

Overrides: object.__init__

getJob(self)

 

Retrieve a read-only instance of a job record (as an instance of the Job class).

Changes made to the job record after this method is called (e.g. via setStructureOutputFile) will not be visible in the record returned. It should be called again to get any updates.

addOutputFile(self, file)

 

Add an output file for job control to copy back to the launch host. Job control will silently skip this file if it does not exist.

addRequiredOutputFile(self, file)

 

Add a required output file for job control to copy back to the launch host. If this file does not exist at the end of the job, then job control will mark the job as "died".

copyOutputFile(self, path)

 

Copy a completed output file or directory back to the launch directory.

Parameters:
  • path (str) - The path to the file or directory that should be copied

sendMessageToParent(self, message)

 

Send message <message> (string) to the parent of this job. If this job does not have a parent, nothing will be done.

Normally it should not be necessary to use this method.

sendMessageToSubjobs(self, message)

 

Send message <message> (string) to each child of this job. If this job does not have any subjobs, nothing will be done.

Normally it should not be necessary to use this method.

sendMessageToSubjob(self, message, jobid)

 

Send message <message> (string) to the job specified as <jobid>.

Normally it should not be necessary to use this method.

addMessageName(self, msgname)

 

Add message type to be queued for the backend to read using nextMessage(). Only messages whose first word is in this list will be returned by nextMessage().

nextMessage(self)

 

Return next unread message from the queue if there is one or None if there are no messages. The types of messages to return must first be specified via addMessageName().

setJobProgress(self, steps=0, totalsteps=0, description='')

 

Tell jmonitor to set the job progress (steps out of total steps). Set either steps and totalsteps, or description, or both.