execMimic.py

nrelmat.execMimic.main()[source]

Mimics the execution of a program by checking that the input files are as we expect, and then copying previously calculated output files.

This program is used to mimic the execution of VASP for validity testing. See pylada/testValid.

Command line parameters:

Parameter Type Description
-bugLev integer Debug level. Normally 0.
-specFile string JSON file containing specs. See below.

specFile Contents:

Parameter Description
refRoot Root dir of the reference tree
workRoot Root dir of the tree to be checked
inFiles List of files to be checked in each work dir
outFiles List of files to copy from ref dir to work dir. If ‘’, copy all except inFiles and omits.
omitFiles List of regexs of outFiles to omit.
absEpsilon
Absolute epsilon for comparing floats of
work inFile vs ref inFile.
relEpsilon
Relative epsilon for comparing floats of
work inFile vs ref inFile.
logFile Log file for execMimic output.

inSpec file example::

{
  "absEpsilon":   "1.e-6",
  "relEpsilon":   "1.e-6",
  "refRoot":      "/home/me/reference",
  "workRoot":     "/home/me/test",
  "inFiles":      "INCAR,KPOINTS,POSCAR,POTCAR",
  "outFiles":     "",
  "omitFiles":    "^pbs.*$,^std.*$",
  "logFile":      "/home/me/execMimic.log"
}
nrelmat.execMimic.testRegexs(regexs, fname)[source]

Returns True if fname matches any of the regex.

nrelmat.execMimic.checkFiles(logName, absEpsilon, relEpsilon, patha, pathb)[source]

Compares two files. If they are identical except for possible floating points within absolute absEpsilon and relative relEpsilon, return True.

Previous topic

augmentDb.py

Next topic

fillDbVasp.py

This Page