Package schrodinger :: Package application :: Package matsci :: Module jaguarworkflows :: Class WorkFlow
[hide private]
[frames] | no frames]

Class WorkFlow

object --+
         |
        WorkFlow


A class to hold the data for and shepherd a single structure through all
the jobs required to gather its data.

For a typical workflow, the job dependency tree may look like:
                    Neutral Optimization
                             |
    -------------------------------------------------------------------
    |            |          |            |            |               |
Cation Opt  Cation Froz  Anion Opt   Anion Froz   Triplet Opt      TD-DFT
    |                       |
Solution Cat             Solution An
    |                       |
Final Reorg Step         Final Reorg Step

Any job may be submitted by the Workflow to the Queue as long as the jobs 
above it on its branch of the tree have completed successfully.

Instance Methods [hide private]
 
__init__(self, struct, options, count, jobq, strcleaner=None, logger=None)
Create a Workflow object
 
log(self, msg, prefix=True, level=20)
Add a message to the log file
 
getSteps(self)
Create all the steps required for this workflow
bool
check(self)
Check if this workflow is complete.
 
write(self, writer)
Write out the structure for this workflow and all the child structures

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, struct, options, count, jobq, strcleaner=None, logger=None)
(Constructor)

 

Create a Workflow object

Parameters:
  • struct (schrodinger.structure.Structure) - The initial structure to use for the workflow
  • options (argparse Namespace object) - The input options. The only options used by this module is options.host, which are used by Step objects. Other options may be used by custom classes.
  • count (int) - A serial number to distinguish this workflow from other workflows. May be used to create a unique base name.
  • jobq (JobDJ) - The queue to submit jobs to
  • strcleaner (schrodinger.application.matsci.jobutils.StringCleaner or None) - a StringCleaner instance
  • logger (logging.Logger) - The logger for this class
Overrides: object.__init__

log(self, msg, prefix=True, level=20)

 

Add a message to the log file

Parameters:
  • msg (str) - The message to add
  • prefix (bool) - Whether to add information about the workflow and step name to the front of the message string
  • level (int) - A logging constant indicating the priority level of the message

getSteps(self)

 

Create all the steps required for this workflow

This method should almost certainly be overridden by any child class. The example given here is just that - an example

check(self)

 

Check if this workflow is complete. Also, submit the next step(s) if the previous step has finished.

Returns: bool
True if the workflow is complete, False if not

write(self, writer)

 

Write out the structure for this workflow and all the child structures

Parameters:
  • writer (schrodinger.StructureWriter) - The writer to use to write the structure