Biskit :: Xplorer :: Xplorer :: Class Xplorer
[hide private]
[frames] | no frames]

Class Xplorer

source code

Prepare and run a xplor job


To Do: Most of this has been abstracted into Executor next thing to do is to subclass Executor and delete redundant parts

Instance Methods [hide private]
  __init__(self, inpFile, xout=None, bin=settings.xplor_bin, node=None, nice=0, log=None, debug=0, verbose=None, **params)
str version(self)
Version of class.
float runXplor(self, finp)
Run Xplor with given inp file and wait until it is finished.
  run(self, inp_mirror=None)
Run the callculation.
  cleanup(self)
Remove temporary files, override it but call it in the child
  parseLog(self)
Parse xplor log into self.logLines
1 isFailed(self)
Calculation completion check.
  prepare(self)
called before running xplor, override!
  finish(self)
called after normal termination, override!
  failed(self)
called after aborted calculation, override!
str generateInp(self, inp, fout)
Replace formatstr place holders in inp by fields of this class.
  saveXLog(self, fname)
Save the content of the XPlor log file to a new file.

Method Details [hide private]

__init__(self, inpFile, xout=None, bin=settings.xplor_bin, node=None, nice=0, log=None, debug=0, verbose=None, **params)
(Constructor)

source code 
Parameters:
  • inpFile (str) - file name of inp template
  • xout (str) - file name of xplor log file (None->discard) (default: None)
  • bin (str) - file name of xplor binary (default: settings.xplor_bin)
  • node (str) - host for calculation (None->local) (default: None)
  • nice (int) - nice level (default: 0)
  • log (str OR None) - Biskit.LogFile, program log (None->STOUT) (default: None)
  • debug (0|1) - keep all temporary files (default: 0)
  • verbose (0|1) - print xplor command to log [log != STDOUT]
  • params (key=value) - additional key=value pairs for inp file

version(self)

source code 

Version of class.
Returns: str
version

runXplor(self, finp)

source code 

Run Xplor with given inp file and wait until it is finished. Called by run().
Parameters:
  • finp (str) - name of existing input file (w/o place holders)
Returns: float
run time in s

run(self, inp_mirror=None)

source code 

Run the callculation. This calls (in that order):
Parameters:
  • inp_mirror (str) - file name for formatted copy of inp file (default: None)

cleanup(self)

source code 

Remove temporary files, override it but call it in the child

parseLog(self)

source code 

Parse xplor log into self.logLines

isFailed(self)

source code 

Calculation completion check.
Returns: 1
if xplor died

prepare(self)

source code 

called before running xplor, override!

finish(self)

source code 

called after normal termination, override!

failed(self)

source code 

called after aborted calculation, override!
Raises:
  • RunError - if Xplor terminated with an error

generateInp(self, inp, fout)

source code 

Replace formatstr place holders in inp by fields of this class.
Parameters:
  • inp (str) - content of the input file with place holders
  • fout (str) - output file mane (xplor input file)
Returns: str
complete inp file
Raises:

saveXLog(self, fname)

source code 

Save the content of the XPlor log file to a new file.
Parameters:
  • fname (str) - target file name
Raises:
  • XPlorerError - if logLines is empty (Xplor hasn't been run)