Package schrodinger :: Package test :: Package stu :: Package outcomes :: Module jaguar
[hide private]
[frames] | no frames]

Module jaguar

Provides the jaguarDiff workup method for use with jaguar and qsite jobs. It wraps the qsite/jaguar output class 'diff' function so that it produces results which are meaningful to STU. Can also be used from the command line.

$Revision 0.1 $


Copyright: (c) Schrodinger, LLC. All rights reserved

Functions [hide private]
 
jaguarDiff(testFile, refFile, *options)
Compare every property available in the Jaguar/QSite out file against a reference.
 
get_tol_override(tolOverrides, prop)
search for override -- allows for wildcards as *
 
printline(prop, o_value, ref_value, logArray, tolOverrides)
Compares the difference between two properties to a tolerance.
 
getJagVersion(fileName)
Gets the jaguar version from a jaguar/qsite output file
 
optionTest(aName, aValue, tolOverrides)
Parses input arguments.
 
parseConfigFile(tolOverrides)
Parses a config file for use in this script.
 
n2s(number, precision=3)
some hackish formatting stuff
 
getRMSD(test, ref)
finds the RMSD between the atoms in two structure objects
dict
getMemDiffs(test, ref, tolOverrides)
Finds the difference in memory usage (for each subprogram) between the two runs.
Variables [hide private]
  _version = "$Revision 0.1 $"
  minPrecision = 2e-6
  minPrecisionPercent = 5.0
Function Details [hide private]

jaguarDiff(testFile, refFile, *options)

 

Compare every property available in the Jaguar/QSite out file against a reference.

Usage:

       outcome_workup = jaguarDiff(file.out, reference.out, tol=1.0,
           log=workup.log, config=config.txt, value=1e-4)
               file.out         - Path of the file to be compared
               reference.out    - Path of the reference file
       Optional parameters:
               tol=value        - A multipler to by which loosen ALL tolerances
               log=file         - Path to an optional output log.  if it is
                                  not provided, the output is written to the
                                  console.
               config=file      - A configuration file format as follows
                       Any text after a '#' character is a comment, and is
                       ignored all other text is in key/value pairs, one per
                       line. possible keys are: log, tol, and any value that
                       appears in the output file
                       i.e.
                       value = 1e-4
                       overrides the tolerance for 'value' to 1e-4
               timing=boolean   -if true, jobs can 'fail' based on timing
                                 alone.  Default is false.
               All other arguments are taken to be tolerance overrides for
               specific values

printline(prop, o_value, ref_value, logArray, tolOverrides)

 

Compares the difference between two properties to a tolerance. If the difference is greater than the tolerance, appends a string explaning this to an output array. This function recurses to examine differences within arrays and dictionaries.

Parameters:
  • prop - The name of the property
  • o_value - The 'output value' to be compared
  • ref_value - The reference value to be compared
  • logArray - An array of strings, each of which describes a difference. Results are appended.
  • tolOverrides (dict) - tolerance overrides for specific property names.

optionTest(aName, aValue, tolOverrides)

 

Parses input arguments. Can be used on either command line or config file.

Parameters:
  • aName (str) - Name of the parameter
  • aValue (str) - Parameter's value
  • tolOverrides (dict) - Tolerances. Results are appended.

parseConfigFile(tolOverrides)

 

Parses a config file for use in this script. Config file follows this example format:

   log = workup.log    #Everything following a pound is a comment
   tol  2.0                    #equals signs are optional
   energy_2_electron = 1e-2    #mostly, the config file is a place to
                               #put multiple tolerance overrides.
Parameters:
  • tolOverrides - A dictionary containing any known options, mostly tolerance overrides

getMemDiffs(test, ref, tolOverrides)

 

Finds the difference in memory usage (for each subprogram) between the two runs.

Parameters:
  • test (str) - Name of the test output file
  • ref (str) - Name of the reference output file
  • tolOverrides (dict) - Tolerances for specific properties. This function is interested in Mb and Mb% which provide minimum tolerances in Mb and percent difference, respectively.
Returns: dict
Memory differences of each executable type between the two files