pasd.noeTools
index
/home/schwitrs/xplor/python/pasd/noeTools.py


 
Output PASD data as restraint lists.

 
Functions
       
estimateBounds(intensity, distanceBins)
Given a peak's intensity and a list 
of (min intensity, upper bound) pairs,
return the proper lower and upper bounds.
generateDistanceBounds(peaks)
Given a sequence of Peaks, set the distance bounds for each peak
from binning the intensities.
getDistanceBinsFromIntensities(intensities, distanceBins=None)
# uses Dan Garrett's "algorithm":
# 1.  Sort intensities list
# 2.  largest 20% of peaks become "strong" (1.8 - 2.7)
# 3.  next 30% become "medium" (1.8 - 3.3)
# 4.  next 30% into "weak" (1.8 - 5.0)
# 5.  last 20% into "very weak" (1.8 - 6.0)
 
The distanceBins argument contains a sequence of 3-membered tuples,
the first two of which specify the lower and upper distance bounds, 
while the third specifies the lower bound of the absolute value of 
intensity of a peak relative in the intensity range of the input
values.
 
Returns a list of tuples containing
 (lowerIntensityBound, (lowerDist, upperDist))
makeNEFRestraintLinks(restraintTables, linkageInfo)
Generate a
nef_peak_restraint_links saveset linking PASD peak assignments to
NEF peaks.
 
Return a string NEF record.
removeIntersectedPeakAssignments(peak)
Removes peakAssignments whose from and to shiftAssignments have 
intersecting proton selections.
 
To be used before writing out in classic xplor table format, 
since the classic xplor NOE potential can't handle non-disjoint selection
pairs.
removeLowLikelihoodPeakAssignments(pot, cutoff=0.9, preventUnassignment=False)
Remove peak assignments with likelihood lower than the cutoff value.
If preventUnassignment=True, in the event of a peak having no assignments
greater than cutoff, keep that with the largest likelihood rather than
deleting the peak entirely.
 
Returns a named tuple with these members
  numRemoved       - number of removed peak assignments
  numPeaksAffected - number of peaks having some peak assignments removed
  numLRremoved     - number of removed long-range peak assignments
  numGoodRemoved   - number of removed good peak assignments
  numGoodLRremoved - number of removed good long-range peak assignments
writeOneXplorAssignment(outfile, peak, removeIntersected)
Internal routine to be called by writeXplorAssignments.
writeXplorAssignments(filename=None, remarksList=[], noePot=None, peaks=[], removeIntersected=True)
Routine to write XPLOR assignment statements for PASD peaks.
 
Given a list of pasdPeak.Peaks or a pasdPot.PASDPot, write
out appropriate XPLOR-formatted restraints from the associated assignments.