termAnalysis
index
/home/schwitrs/xplor/python/termAnalysis.py


 
Tools to aid in reporting on and analyzing pot.Pot terms

 
Classes
       
builtins.tuple(builtins.object)
TermEntry

 
AnalyzeTermEntry = class TermEntry(builtins.tuple)
    AnalyzeTermEntry(func, title, prefix, moduleName, doc)
 
TermEntry(func, title, prefix, moduleName, doc)
 
 
Method resolution order:
TermEntry
builtins.tuple
builtins.object

Methods defined here:
__getnewargs__(self)
Return self as a plain tuple.  Used by copy and pickle.
__repr__(self)
Return a nicely formatted representation string
_asdict(self)
Return a new dict which maps field names to their values.
_replace(self, /, **kwds)
Return a new TermEntry object replacing specified fields with new values

Class methods defined here:
_make(iterable) from builtins.type
Make a new TermEntry object from a sequence or iterable

Static methods defined here:
__new__(_cls, func, title, prefix, moduleName, doc)
Create new instance of TermEntry(func, title, prefix, moduleName, doc)

Data descriptors defined here:
func

 
Alias for field number 0
title

 
Alias for field number 1
prefix

 
Alias for field number 2
moduleName

 
Alias for field number 3
doc

 
Alias for field number 4

Data and other attributes defined here:
_field_defaults = {}
_fields = ('func', 'title', 'prefix', 'moduleName', 'doc')

Methods inherited from builtins.tuple:
__add__(self, value, /)
Return self+value.
__contains__(self, key, /)
Return key in self.
__eq__(self, value, /)
Return self==value.
__ge__(self, value, /)
Return self>=value.
__getattribute__(self, name, /)
Return getattr(self, name).
__getitem__(self, key, /)
Return self[key].
__gt__(self, value, /)
Return self>value.
__hash__(self, /)
Return hash(self).
__iter__(self, /)
Implement iter(self).
__le__(self, value, /)
Return self<=value.
__len__(self, /)
Return len(self).
__lt__(self, value, /)
Return self<value.
__mul__(self, value, /)
Return self*value.
__ne__(self, value, /)
Return self!=value.
__rmul__(self, value, /)
Return value*self.
count(self, value, /)
Return number of occurrences of value.
index(self, value, start=0, stop=9223372036854775807, /)
Return first index of value.
 
Raises ValueError if the value is not present.

Class methods inherited from builtins.tuple:
__class_getitem__(...) from builtins.type
See PEP 585

 
Functions
       
analyze(potList, extraTerms=<potList.PotList; proxy of <Swig Object of type 'rc_DerivedPot< PotList > *' at 0x7f9b72a3ff60> >, outFilename=0)
pretty print appropriate terms from the given PotList and return
them in a remarks string.
The optional extraTerms is a PotList of terms which do not
contribute to the total energy, but which should be analyzed all the same-
use this for cross-validated potential terms. The potList and extraTerms
arguments can have type of Pot, PotList, list or tuple.
 
If outFilename is specified, the verbose violations info is written to
the specified file.
canonicalTermName(name)
Return the registered term name given a string. Currently, this simply
makes the term name search case insensitive.
genHeaderHelp(term)
Return reStructured text string for the specified term.
getHeaderNames()
getPotTerms(potList, names)
return in a list all the potential terms in potList whose potType()
matches names. names can be a string or a list of strings.
loadRegisteringModules()
Load all modules which call registerTerm- to populate the header help
information.
moduleName(termName)
Return module name of associated term
reduce(...)
reduce(function, sequence[, initial]) -> value
 
Apply a function of two arguments cumulatively to the items of a sequence,
from left to right, so as to reduce the sequence to a single value.
For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates
((((1+2)+3)+4)+5).  If initial is present, it is placed before the items
of the sequence in the calculation, and serves as a default when the
sequence is empty.
registerExtraStats(potType, name, function, supportsList=False, precision=3)
register extra terms, averages over selected structures will be
reported by restraintStats
 
The four arguments are the potential type as given by the potName
accessor, the name of the property to be averaged (a string), a
function to be called on the pot term, like this: function(term) and
which returns a floating value, and whether this function supports a
list of terms. The function argument can also return a list of float
values, but in this case registerExtraStats should be called only a
single time for each potType. The precision argument specifies number of
digits after the decimal point printed in the .stats file.
registerTerm(analyzeFunc, termTitle, termPrefix, termDoc)
register an analysis function to be called by the analyze() function
[see below].
 
One should specify an analysis function which takes a list of potential
terms as an argument, and two strings to identify the potential term - long
form, and short form, respectively.
 
The termDoc argument documents the output of the returned string - in
reStructuredText. This string is produced by the headerHelp helper
program.
 
analyzeFunc should return a string containing an analysis summary. A more
detailed analysis can be printed to stdout.
summarizePotentials(potList)
get rms, violations summaries from potential terms
xplorDocMarkupToRST(text)
Convert Xplor-NIH-specific documentation markup to reStructuredText.
 
Converted tags include
       <\m NAME> - creates a link for Xplor-NIH module named NAME
       <\s NAME> - creates a link for Python module named NAME
       <\l LINK NAME> - creates a link LINK with tag NAME

 
Data
        extraStats = {'DiffPot': [ExtraStatsInfo(name='Optimized Temperature, [K]'... 0x7f9b726b4790>, supportsList=True, precision=3)], 'NOEPot': [ExtraStatsInfo(name='Corr.', function=<function ...0x7f9b71d56ee0>, supportsList=False, precision=3)], 'PRE': [ExtraStatsInfo(name='Q-factor', function=<functi... 0x7f9b726c9550>, supportsList=True, precision=3), ExtraStatsInfo(name='correlation', function=<fun... 0x7f9b726c95e0>, supportsList=True, precision=3), ExtraStatsInfo(name='tau_c', function=<function ... 0x7f9b723da310>, supportsList=True, precision=3)], 'RDCPot1': [ExtraStatsInfo(name='R-fac', function=<function ...0x7f9b72f56430>, supportsList=False, precision=3), ExtraStatsInfo(name='R-infinite', function=<func...0x7f9b72f564c0>, supportsList=False, precision=3), ExtraStatsInfo(name='Chi^2', function=<function ...0x7f9b72f565e0>, supportsList=False, precision=3), ExtraStatsInfo(name='Correlation', function=<fun...0x7f9b72f563a0>, supportsList=False, precision=3), ExtraStatsInfo(name='Da', function=<function Da at 0x7f9b72a44820>, supportsList=False, precision=3), ExtraStatsInfo(name='Rhombicity', function=<func...0x7f9b72a448b0>, supportsList=False, precision=3)], 'SolnScatPot': [ExtraStatsInfo(name='Chi^2', function=<function ...0x7f9b71dbd4c0>, supportsList=False, precision=3)], 'VarTensor': [ExtraStatsInfo(name='RDC R-fac', function=<funct...0x7f9b726a9670>, supportsList=False, precision=3), ExtraStatsInfo(name='RDC Chi^2', function=<funct...0x7f9b726a9700>, supportsList=False, precision=3)]}
registeredTerms = [TermEntry(func=<function RDC_analyze at 0x7f9b72...ficient between calculated and observed RDCs.\n"), TermEntry(func=<function analyze at 0x7f9b729b64...n different\n ensemble members.\n'), TermEntry(func=<function VarTensor_analyze at 0x...047 (1999).]\n\n\n '), TermEntry(func=<function analyze at 0x7f9b726b47...xes," J. Am. Chem. Soc. 131, 9522-9531 (2009)\n'), TermEntry(func=<function analyze at 0x7f9b726c9b...n J. Am. Chem. Soc. 126, 5879-5896 (2004).\n'), TermEntry(func=<function CSA_analyze at 0x7f9b72...eholders not containing\nuseful information. \n'), TermEntry(func=<function analyze at 0x7f9b7210f9... - the number of violated restraints.\n \n'), TermEntry(func=<function analyze at 0x7f9b71c9a1...between calculated and observed\nis reported.\n'), TermEntry(func=<function analyze at 0x7f9b71d56f...ion between calculated and observed distances\n'), TermEntry(func=<function analyze at 0x7f9b71dbd3... of I_i.\n\n ')]
registeringModules = ['anglePot', 'ccrPotTools', 'csaPotTools', 'cstMagTools', 'diffPotTools', 'distSymmTools', 'ensWeightsTools', 'globDiffPotTools', 'gyrPotTools', 'h3JNCPot', 'hbPotTools', 'hmxPotTools', 'jCoupPotTools', 'nbTargetPotTools', 'noePotTools', 'orderPotTools', 'posRMSDPotTools', 'planeDistTools', 'posDiffPotTools', 'prePotTools', ...]