schrodinger.test.stu.outcomes.jaguar module¶
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
- schrodinger.test.stu.outcomes.jaguar.jaguarDiff(testFile, refFile, *options)[source]¶
Compare every property available in the Jaguar/QSite out file against a reference.
Usage:
# file.out - Path of the file to be compared # reference.out - Path of the reference file outcome_workup = jaguarDiff('file.out', 'reference.out', 'tol=1.0', 'log=workup.log', 'config=config.txt', 'value=1e-4')
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
- schrodinger.test.stu.outcomes.jaguar.get_tol_override(tolOverrides, prop)[source]¶
search for override – allows for wildcards as *
- schrodinger.test.stu.outcomes.jaguar.printline(prop, o_value, ref_value, logArray, tolOverrides)[source]¶
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.
- schrodinger.test.stu.outcomes.jaguar.getJagVersion(fileName)[source]¶
Gets the jaguar version from a jaguar/qsite output file
- schrodinger.test.stu.outcomes.jaguar.optionTest(aName, aValue, tolOverrides)[source]¶
Parses input arguments. Can be used on either command line or config file. :param aName: Name of the parameter :type aName: str :param aValue: Parameter’s value :type aValue: str :param tolOverrides: Tolerances. Results are appended. :type tolOverrides: dict
- schrodinger.test.stu.outcomes.jaguar.parseConfigFile(tolOverrides)[source]¶
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
- schrodinger.test.stu.outcomes.jaguar.n2s(number, precision=3)[source]¶
some hackish formatting stuff
- schrodinger.test.stu.outcomes.jaguar.getRMSD(test, ref)[source]¶
finds the RMSD between the atoms in two structure objects
- schrodinger.test.stu.outcomes.jaguar.get_mems_from_file(filename)[source]¶
Scan a Jaguar outfile for memory used in each subprogram.
- Parameters
filename (str) – file name
- Returns
Memory used for each subprogram
- Return type
dictionary
- schrodinger.test.stu.outcomes.jaguar.getMemDiffs(test, ref, tolOverrides)[source]¶
Finds the difference in memory usage (for each subprogram) between the two runs. This diff is skipped unless a tolerance is manually given.
- Parameters
test (str) – Name of the test output file
ref (str) – Name of the reference output file
tolOverrides (dict) – Tolerances for specific tests. This function is interested in Memory% which provides a minimum tolerance as a percent difference.
- Returns
Memory differences of each executable type between the two files
- Return type
list