Package schrodinger :: Package application :: Package desmond :: Module cmj
[hide private]
[frames] | no frames]

Module cmj

This module provides fundamental facilities for writing a multisim driver script, for writing multisim concrete stage classes, and for dealing with protocol files.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  Queue
  JobStatus
  JobOutput
  JobInput
  RetryTimer
  JobErrorHandler
  Job
  JobAdapter
This adapts the `Job' class to the `que.BaseJob' class.
  _create_param_when_needed
  StageBase
  _get_jc_backend_when_needed
  Engine
  StopRequest
  ParseError
  AslValidator
Functions [hide private]
 
_print(loglevel, msg)
 
print_tonull(msg)
 
print_silent(msg)
 
print_quiet(msg)
 
print_verbose(msg)
 
print_debug(msg)
 
is_restartable_version(version_string)
 
build_stages(stage_list, out_fname=None, stage_state=[])
 
build_stagelinks(stage_list)
 
probe_checkpoint(fname, indent="")
 
escape_string(s)
 
append_stage(cmj_fname, stage_type, cfg_file=None, jobname=None, dir=None, compress=None, parameter={})
 
msj2sea(fname, msj_content=None)
Parses a file as specified by 'fname' or a string given by 'msj_content' (if both are given, the former will be ignored), and returns a 'sea.Map' object that represents the stage settings with a structure like the following: stage = [ { <stage 1 settings> } { <stage 2 settings> } { <stage 3 settings> } ...
 
msj2sea_full(fname, msj_content=None, pset="")
 
parse_msj(fname, msj_content=None, pset="")
`sea.macro_dict' must be set properly before calling this function.
 
write_msj(stage_list, fname=None, to_str=True)
Given a list of stages, writes out a .msj file of the name `fname'.
 
write_sea2msj(stage_list, fname=None, to_str=True)
 
_collect_inputfile_from_file_list(list_, fname_list)
 
_collect_inputfile_from_file_map(map, fname_list)
 
_collect_inputfile_from_list(list_, fname_list)
 
_collect_inputfile_from_map(map, fname_list)
 
collect_inputfile(stage_list)
Returns a list of file names.
 
validate_asl_expr(stage_list)
Validates all ASL expressions that start with the "asl:" prefix.
 
reg_checking(name, func)
Variables [hide private]
  VERSION = "3.8.5.19"
  QUEUE = None
hash(x)
  ENGINE = None
hash(x)
  LOGLEVEL = ["silent", "quiet", "verbose", "debug",]
  GENERAL_LOGLEVEL = "quiet"
  PACKAGE_SUFFIX = ".tgz"
  CHECKPOINT_SUFFIX = "-multisim_checkpoint"
  CHECKPOINT_FNAME = "$MASTERJOBNAME"+ CHECKPOINT_SUFFIX
  last_logtime = None
hash(x)
  PARAM = None
hash(x)
  _operator = {}
  fname = "my_test.msj"
  begin_time = time.time()
  end_time = time.time()
Function Details [hide private]

msj2sea(fname, msj_content=None)

 

Parses a file as specified by 'fname' or a string given by 'msj_content' (if both are given, the former will be ignored),
and returns a 'sea.Map' object that represents the stage settings with a structure like the following:
  stage = [
     { <stage 1 settings> }
     { <stage 2 settings> }
     { <stage 3 settings> }
     ...
  ]
Each stage's name can be accessed in this way: raw.stage[1].__NAME__, where 'raw' is the returned 'sea.Map' object.

write_msj(stage_list, fname=None, to_str=True)

 

Given a list of stages, writes out a .msj file of the name `fname'. If 'to_str' is True, a string will be returned. The returned string contains the contents of the .msj file. If 'to_str' is False and not file name is provided, then this function does nothing.