Package schrodinger :: Package application :: Package jaguar :: Module file_logger
[hide private]
[frames] | no frames]

Module file_logger

General classes and functions related to output files, in particular when running under jobcontrol.

Classes [hide private]
  FileLogger
Class to store names of output files and archive them so that a single file can be registered with jobcontrol and returned from the work directory to the user.
Functions [hide private]
 
register_file(fname, archive=False)
Convenience wrapper for FileLogger.register_file() when using "with FileLogger:" context management.
 
launch_path()
Get the path from which the job was launched.
 
relative_path()
return the path to the cwd, relative to a launch directory If the cwd the same as the launch directory the path is returned as an empty string (does not contain '.')
 
set_structure_file(fname)
Register the file fname as the output structure file with jobcontrol, assumes the file fname, is in the cwd.
 
copy_file(fname)
Copy the file fname running under jobcontrol to the launch dir.
 
transfer_subjob_files(jobbe, job_id, do_recover=False, archive=False)
Copy files held in a job record from the working dir to the launch dir associated with a jobcontrol backend.
 
slugify(mystr)
Transform a string to a valid file and job name
 
make_outmaefile(outmaefile, infiles, status, write_jname=False)
Collect output CTs from Jaguar jobs into a single .mae file
 
make_smapfile(outmaefile, smapfile)
Write a .smap file containing the associations between CT index numbers in the outmaefile, and .vib, .vis, .spm files.
Variables [hide private]
  LEGIT_CHARS = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU...
  SUFFICES_NOT_ARCHIVED = ('.hosts', '.nodes', '.mpinodes', '.di...
  JNAME = 's_j_jname'
  _filelogger = None
hash(x)
  __package__ = 'schrodinger.application.jaguar'
Function Details [hide private]

register_file(fname, archive=False)

 

Convenience wrapper for FileLogger.register_file() when using "with FileLogger:" context management. See FileLogger docstring for more details.

launch_path()

 

Get the path from which the job was launched. if its a local job it will be the cwd.

transfer_subjob_files(jobbe, job_id, do_recover=False, archive=False)

 

Copy files held in a job record from the working dir to the launch dir associated with a jobcontrol backend. This function can handle jobs launched in subdirectories.

Parameters:
  • jobbe (schrodinger.job.jobcontrol._Backend) - The Backend object for the current job.
  • job_id (jobcontrol.Job.JobID) - jobcontrol job id
  • do_recover (bool) - if False, update the .recover file
  • archive (bool) - if True, the file is registered as an archive file.

make_outmaefile(outmaefile, infiles, status, write_jname=False)

 

Collect output CTs from Jaguar jobs into a single .mae file

Parameters:
  • outmaefile (str) - name of output .mae file
  • infiles (list of strs) - subjob input files, including suffix, e.g. mol1.in
  • status (dictionary) - status of each subjob indexed by filename

make_smapfile(outmaefile, smapfile)

 

Write a .smap file containing the associations between CT index numbers in the outmaefile, and .vib, .vis, .spm files. This function relies on CT's in the .mae file having a property 's_j_jname' (stored in JNAME) which maps to the name of the .vib etc file.


Variables Details [hide private]

LEGIT_CHARS

Value:
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._-'

SUFFICES_NOT_ARCHIVED

Value:
('.hosts', '.nodes', '.mpinodes', '.diag')