Package schrodinger :: Package pipeline :: Module pipeline
[hide private]
[frames] | no frames]

Module pipeline

Classes [hide private]
  StageJob
A "Job" that is used by Pipeline to run a Stage.
  Pipeline
A controller responsible for running the stages in the correct order.
Functions [hide private]
 
log(text)
Prints specified text to the log pipe; adds a return at the end
 
logn(text)
Print the specified text to the log pipe with no newline.
 
add_host_lists(list1, list2)
Append hosts in list2 to list1.
 
subtract_host_lists(list1, dict2)
Return available (not used) hosts.
 
_host_is_queue(hostname)
Return True if hostname is a queue.
 
_get_job(jobid)
Return the job object for job with jobid.
 
importName(modulename, name)
Import a named object from a module in the context of this function.
 
Restart(restart_file, restartbeg=False)
Recover a saved Pipeline instance.
Variables [hide private]
  __doc__ = ...
  DEBUG = log.get_environ_log_level() <= log.DEBUG
  WAITING = 'WAITING'
  RUNNING = 'RUNNING'
  COMPLETED = 'COMPLETED'
  FAILED = 'FAILED'
  RESTARTING = 'RESTARTING'
  updated_from_dump = {}
  old_stage_classes = {"merge.MergeStage": "glide.MergeStage", "...
  global_logfh = sys.stdout
  _job_objects = {}
Function Details [hide private]

logn(text)

 

Print the specified text to the log pipe with no newline. This is especially useful when printing progress periods.

add_host_lists(list1, list2)

 

Append hosts in list2 to list1.

Example:

 list1 = a:5,b:10
 list2 = a:2,c:12
 output = a:7,b:10,c:12

The order of hosts is retained (first list is given priority).

subtract_host_lists(list1, dict2)

 

Return available (not used) hosts. This function subtracts the host dict dict2 from the host dict list1.

Parameters:
  • list1 (dict) - All available hosts (specified by user), with hostname as key and cpu count as value.
  • dict2 (dict) - All used hosts (used by stages)

importName(modulename, name)

 

Import a named object from a module in the context of this function.

For example, if you would like to create an instance of the Foo class from the bar.py module:

   foo_class = importName("bar", "Foo")
   foo_instance = foo_class()
Raises:
  • ImportError - Raised when the object can not be imported.

Restart(restart_file, restartbeg=False)

 

Recover a saved Pipeline instance.

Specify new options only if the settings need to change.

Returns a Pipeline instance recovered from the restart_file. You need to call pipeline.run() in order to get the pipeline running.

Parameters:
  • restartbeg - Whether to start failed stages from beginning.
Raises:
  • RuntimeError - Raised if a Pipeline can't be loaded from the specified file.

Variables Details [hide private]

__doc__

Value:
"""
Classes for running pipelines.

The main class is called Pipeline. This class parses the input file, c\
reates
appropriate stages, and runs them in their own subdirectories.

The StageJob class represents a pipeline job linked to a specific stag\
...

old_stage_classes

Value:
{"merge.MergeStage": "glide.MergeStage", "ligfilter.LigFilterStage": "\
filtering.LigFilterStage", "phase.DBManage": "phase.DBManageStage", "p\
hase.DBConfSites": "phase.DBConfSitesStage", "chargefilter.ChargeFilte\
rStage": "filtering.ChargeFilterStage", "mmgbsa.MMGBSAStage": "prime.M\
MGBSAStage", "mopac.MopacStage": "semiemp.SemiEmpStage", "gencodes.Gen\
CodesStage": "gencodes.Recombine",}