spartaPotTools
index


 
Tools to aid in setup/analysis of the Sparta potential energy term.
 
This module provides functions to simplify the creation, manipulation and
analysis of spartaPot.SpartaPot potential terms.

 
Classes
       
builtins.object
SShiftClipper

 
class SShiftClipper(builtins.object)
    SShiftClipper(verbose=False)
 

 
  Methods defined here:
__init__(s, verbose=False)
Initialize self.  See help(type(self)) for accurate signature.
clip(s, atom, shift)
Check if shift of specified atom.Atom is an outlier.
Return a clipped chemical shift value

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
Functions
       
analyze(potList)
Perform analysis of spartaPot.SpartaPot  terms and return nicely
formatted summary.
applyIsotopeCorrection(p, correct='computed')
Given a spartaPot.SpartaPot object, update the CA and CB chemical
shift tables with appropriate deuterium chemical shifts. If you have
measured CA and CB chemical shifts with fully deuterated samples, you
should call this function before comparing or refining against SPARTA
predicted chemical shift values.
 
The correct argument is used to specify whether the tabulated correction
is added to the computed chemical shift value (default), or subtracted
from the observed values.
checkCSReference(p, verbose=False)
Given a spartaPot.SpartaPot object or a list thereof, check the
reference for CA/CB, C and HA chemical shifts.
 
If verbose is True, status messages will be printed for each test.
 
A dictionary of computed referencing corrections whose keys are the
atom names 'CA', 'CB', 'HA' and 'C'.
create_SpartaPot(name, filename=None, restraints='', selection='all', format='plain', saveSet=None, spartaObj=None, annSet='20110324', defaultError=1, selectionFilter='all', useTableErrors=False, ambiguousGlyHA=False, segid=None, verbose=0)
Create one or more instance of a spartaPot.SpartaPot given a
restraint table filename or string. The format of this string can
be plain (internal Xplor-NIH format), 'TALOS', 'PIPP', or 'NMRSTAR'.
Optionally, a sparta.Sparta object can be supplied. The NEF format 
is supported by passing the nef object returned by nefTools.readNEF()
as the restraints argument. The saveSet argument can be specified to
choose a specific set of chemical shifts from an NMRSTAR or NEF table.
 
The selection argument specifies which atoms are included in the chemical
shift calculation.
 
If useTableErrors is True, errors for restraints are taken from a table
from Sparta (per residue, per atom type data) averaged over
psi/phi surfaces. Otherwise, errors not specified in a restraint table are
set to defaultError.
 
The selectionFitler argument is passed to SpartaPot to filter which
chemical shifts will be used as restraints.
 
If ambiguousGlyHA is True, HA1 and HA2 stereo specific chemical
shifts will be made ambiguous.
linearFit(x, y)
Fit to a linear equation given input data in vectors x and y.
Return tuple of slope, intercept, rms.
reduce(...)
reduce(function, iterable[, initial]) -> value
 
Apply a function of two arguments cumulatively to the items of a sequence
or iterable, from left to right, so as to reduce the iterable 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 iterable in the calculation, and serves as a default when the
iterable is empty.

 
Data
        deuteriumIsotopeShifts = {'#': {'CA': -0.55, 'CB': -0.71}, 'A': {'CA': -0.68, 'CB': -1.0}, 'C': {'CA': -0.55, 'CB': -0.71}, 'D': {'CA': -0.55, 'CB': -0.71}, 'E': {'CA': -0.69, 'CB': -0.97}, 'F': {'CA': -0.55, 'CB': -0.71}, 'G': {'CA': -0.78, 'CB': 0.0}, 'H': {'CA': -0.55, 'CB': -0.71}, 'I': {'CA': -0.77, 'CB': -1.28}, 'K': {'CA': -0.69, 'CB': -1.11}, ...}
errTable = {'A': {'C': 1.1803, 'CA': 0.7272, 'CB': 0.9862, 'HA': 0.248, 'HN': 0.4665, 'N': 2.1977}, 'C': {'C': 1.3336, 'CA': 1.7251, 'CB': 2.1403, 'HA': 0.3277, 'HN': 0.5272, 'N': 2.7183}, 'D': {'C': 1.1026, 'CA': 0.8881, 'CB': 1.0826, 'HA': 0.2307, 'HN': 0.4883, 'N': 2.4507}, 'E': {'C': 1.0043, 'CA': 0.8603, 'CB': 0.9597, 'HA': 0.226, 'HN': 0.4585, 'N': 2.2795}, 'F': {'C': 1.1134, 'CA': 1.16, 'CB': 1.1719, 'HA': 0.3195, 'HN': 0.5049, 'N': 2.4639}, 'G': {'C': 1.1789, 'CA': 0.839, 'HA': 0.3095, 'HN': 0.5341, 'N': 2.5161}, 'H': {'C': 1.1312, 'CA': 1.2755, 'CB': 1.531, 'HA': 0.31, 'HN': 0.5327, 'N': 2.6716}, 'I': {'C': 1.1133, 'CA': 1.2634, 'CB': 1.2393, 'HA': 0.2788, 'HN': 0.4567, 'N': 2.6296}, 'K': {'C': 1.0389, 'CA': 0.9389, 'CB': 0.984, 'HA': 0.2359, 'HN': 0.462, 'N': 2.3347}, 'L': {'C': 1.0904, 'CA': 0.8278, 'CB': 1.1123, 'HA': 0.2453, 'HN': 0.4505, 'N': 2.3406}, ...}
forceConstants = {'C': 0.8541722899675755, 'CA': 1.10803324099723, 'CB': 0.7694675284702986, 'HA': 15.2587890625, 'HN': 3.8446751249519413, 'N': 0.15635160411273513}