This is a module for use in the backend test utility's workup routine.
General tools are set in the functions and each class contains Desmond
jobtype-specific methods for determining if a job is acceptable.
Copyright (c) Schrodinger, LLC. All rights reserved
|
|
getConfig(config_file)
Get the config parameters |
|
|
|
|
sendEmailNotice(msg,
mail_serv='pdx-mail.schrodinger.com',
recipient_name=None,
recipient_addr='schrodinger.com',
subj_add='')
Send an email to yourself, with "msg" attached. |
|
|
|
|
cleanWorkup(results,
msg)
Easy way to get the pass/fail and return a message that looks decent. |
|
|
|
|
assertByNumber(actual,
required,
buffer=0,
xmsg='')
Used to compare two values given a certain error margin. |
|
|
|
|
assertLessThan(actual,
required,
xmsg='')
Used to compare two values asserting "actual" is less than
"required". |
|
|
|
|
assertBetween(actual,
min_req,
max_req,
buffer=0,
xmsg='')
Used to assert "actual" is within two numbers,
"min_req" and "max_req". |
|
|
|
|
assertByPercent(actual,
required,
buffer=0,
xmsg='')
The same function as assertByNumber except the error margin is a
percentage. |
|
|
|
tuple
|
assertStr(req,
act,
xmsg='')
Compares two strings, or checks for a given string in a file. |
|
|
|
|
| falseAssert(test_message,
value_message) |
|
|
|
|
| trueAssert(test_message,
value_message) |
|
|
|
|
| _printAsserts(val,
msg1,
msg2) |
|
|
|
|
getStats(ilist,
*types)
Returns a list of stats calculated on columns of provided list. |
|
|
|
|
rsq(initial,
new)
Calculates r-squared of two arrays |
|
|
|
|
grpStats(data)
Returns:
avg, stdev and max value for values in dict "data" |
|
|
|
|
lineCt(ifile)
Return the number of lines in file |
|
|
|
|
checkFiles(files)
Checks to see if a list of files exist. |
|
|
|
|
|
|
|
|
|
|
getLines(ifile)
Returns a file's lines as a list |
|
|
|
|
|
|
|
|
|
|
extractData(text,
sub1,
sub2,
start=0,
direction='down')
Extract a substring between two substrings sub1 and sub2 in text It
will cut at the first instance of sub1 and return text after that
until is recognizes sub2. |
|
|
|
|
findData(text,
initial_marker,
end_marker='\n',
clean=False)
Returns line containing |
|
|
|
|
byColumn(ifile,
headers,
make_float=False,
precision=0)
Returns a dictionary with keys equal to the headers and thier values
equal to their column number plus the actual values for that column. |
|
|
|
|
byColumnB(ifile,
headers=[],
make_float=False,
precision=0)
Returns a dictionary with keys equal to the headers and their values
equal to their column number plus the actual values for that column. |
|
|
|
dict
|
byLine(ifile,
delim=' ')
Used to glean data structured in rows. |
|
|
|
|
pullEne(efile,
**kwargs)
Returns the a list of values for the volume found in the ene file |
|
|
|
|
pullSimbox(sfile,
**kwargs)
Extracts values from each column of the _simbox.dat file as a dict |
|
|
|
|
pullEneDat(ifile)
Extracts the values in the EGRP keys from the _enegrp.dat file for
each time step. |
|
|
|
|
pullExchangeInfo(ifile)
Extracts all replica exchange information from desmond log file |
|
|
|
|
|
|
|
pullRate(log_file)
Grab the ns/day rate from a desmond simulation log |
|
|
|
|
getMolCountByFile(ifile,
index=1,
format='maestro')
Returns the mol count on the indicated structure. |
|
|
|
|
|
|
|
|
|
|
checkResNameByFile(ifile,
index=1,
format='maestro')
Searches structures in a file and gathers the unique pdb residue
names and returns them. |
|
|
|
|
getResName(st,
uniques=False)
Searches "st" and gathers the unique pdb residue names and
returns them. |
|
|
|
|
getAtomPropsByFile(ifile,
prop,
index=1,
format='maestro')
Gathers the values for the provided property. |
|
|
|
|
getAtomProps(st,
prop)
Gathers the values for the provided properties of "st" (a
structure.Structure instance). |
|
|
|
|
getStructsByProp(ifile,
ct_prop,
format='maestro',
filter_list=None)
Gets all cts in a file and separates them based on ct-level property. |
|
|
|
|
checkDist(st1,
st2,
asl1,
asl2,
cutoff)
Gets all atoms within a certain distance of asl1 in st1 from asl2 in
st2. |
|
|
|
|
volFromLattice(ifile)
Calculates the volume of the unit cell based on the structure
properies. |
|
|
|
|
getdG(structs)
Returns property name and dG value (for each dG found) as a list of
lists |
|
|
|
|
getDihedrals(cms,
trj,
ref_atoms,
mut_atoms)
Return a list of dihedral angles for the simulation |
|
|
|
|
getWaterModel(ifile)
Returns the pdb residue name for the first atom in the solvent CT |
|
|
|
|
getDesmondHosts(log_file=None,
multisim=False)
Parses the desmond log files for host names. |
|
|
|
|
getLastTime(ifile)
Gets the last time from either a cfg file or ene file |
|
|
|
|
getLamWin(path)
Gets the lambda window for a path with "lambda" in it |
|
|
|
|
runBennett(base_name,
last_time,
last_lambda=11,
precision=None)
Run bennett.py with simulation stage results. |
|
|
|
|
getRoot(from_file='log',
multisim=False)
Gets the root name (common basename) from files in the current
working directory based on the extension indicated. |
|
|
|
|
getSysBldFiles(jobname)
Make a dictionary of all files associated with the job |
|
|
|
|
getMultisimFiles(jobname)
Make a dictionary of all files associated with the job |
|
|
|
|
getDesmondFiles(jobname)
Make a dictionary of all files associated with the job |
|
|
|
|
__doc__ = ...
|
|
|
_version = '$Revision: 1.4 $'
|
|
|
REPOSITORY = '/home/stationw/IMS/results'
|
|
|
CTS = ['full_system', 'membrane', 'ion', 'positive salt', 'neg...
|
|
|
ENE = ['Time', 'E', 'E_p', 'E_k', 'E_x', 'E_f', 'P', 'V', 'T',...
|
|
|
SIM = ['Time', 'ax', 'ay', 'az', 'bx', 'by', 'bz', 'cx', 'cy',...
|
|
|
EGRP = ['time', 'pres', 'vol', 'ke', 'v', 'pe', 'xe', 'Corr_En...
|
|
|
REEX = ['time', 'exchange', 'rep_1', 'rep_2', 'T_1', 'T_2', 'U...
|
|
|
REAL_RE = '[+\\-]?(\\d+(\\.\\d*)?|\\d*\\.\\d+)([eE][+\\-]?\\d+)?'
|
|
|
INT_RE = '[+\\-]?\\d+'
|
|
|
FLOAT_RE = '[+\\-]?(\\d+\\.\\d*|\\d*\\.\\d+)'
|
|
|
__package__ = 'schrodinger.test.stu.outcomes'
|