> Should it be:
>
> p = top.project
>
> for ml in p.nmrMeasurementLists:
> for mm in ml.measurements:
> peakDict = {}
> for peak in mm.peaks:
> peakDict[peak] = 1
>
> peaks = peakDict.keys()
> mm.setPeaks(peaks)
Square brackets are good. :)
However, the indentation is now wrong on the last two lines.
Try:
p = top.project
for ml in p.nmrMeasurementLists:
for mm in ml.measurements:
peakDict = {}
for peak in mm.peaks:
peakDict[peak] = 1
peaks = peakDict.keys()
mm.setPeaks(peaks)
> Tried this but doesn't seem to solve the problem - I get the same error.
> I think I can see where the error is coming from in
> ccpnmr1.0/python/ccp/api/Nmr.py, but am mystified as to what the setPeaks
> function is actually doing!
If the above doesn't work, maybe print out mm.peaks before and after
cleanup. setPeaks sould set the peaks to exactly the input list.
T.
-------------------------------------------------------------------------------
Dr Tim Stevens Email: [log in to unmask]
Department of Biochemistry [log in to unmask]
University of Cambridge Phone: +44 1223 766022 (office)
80 Tennis Court Road +44 7816 338275 (mobile)
Old Addenbrooke's Site +44 1223 364613 (home)
Cambridge CB2 1GA WWWeb: http://www.bio.cam.ac.uk/~tjs23
United Kingdom http://www.pantonia.co.uk
-------------------------------------------------------------------------------
------ +NH3CH(CH(CH3)OH)C(O)NHCH(CH(CH3)CH2CH3)C(O)NHCH(CH2CH2SCH3)CO2- -------
-------------------------------------------------------------------------------
|