Print

Print


Dear Brian,

This is a slightly different beast from last time. We are not dealing with
reading old data, but with the program trying to set a distance restraint
between a resonance and itself.

As far as I can see, the code already rejects peaks too close to the
diagonal, but this one sneaked in anyway. A permanent fix will have to
wait till next week (when Tim is back). Meanwhile, you can fix it as
follows:

insert new lines 469-470 in
/usr/local/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/ConstraintBasic.py,
so the inner for loop reads :

        for resonance1 in peakResonances[1]:
          fixedResonance1 = getFixedResonance(constraintHead,resonance1)
          if fixedResonance0 is fixedResonance1:
            continue
          item = NmrConstraints.DistanceConstraintItem(constraint, etc.

Yours,

Rasmus

---------------------------------------------------------------------------
Dr. Rasmus H. Fogh                  Email: [log in to unmask]
Dept. of Biochemistry, University of Cambridge,
80 Tennis Court Road, Cambridge CB2 1GA, UK.     FAX (01223)766002

On Thu, 9 Sep 2004, Brian Smith wrote:

> When trying to Structure -> Shift match constraints I got the following:
>
> Traceback (most recent call last):
>   File "/usr/lib64/python2.2/lib-tk/Tkinter.py", line 1316, in __call__
>     return apply(self.func, args)
>   File
> "/usr/local/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/CalcAmbigDistConstraintsPopup.py",
> line 708, in calculateConstraints
>     ignoreDiagonals=self.ignoreDiagonals,
> intensityType=self.intensityType)
>   File
> "/usr/local/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/ConstraintBasic.py",
> line 469, in makeAmbigDistConstraints
>     item = NmrConstraints.DistanceConstraintItem(constraint,
> resonances=[fixedResonance0,fixedResonance1])
>   File "/usr/local/ccpnmr/ccpnmr1.0/python/ccp/api/NmrConstraints.py",
> line 8987, in __init__
>     setattr(self, key, value)
>   File "/usr/local/ccpnmr/ccpnmr1.0/python/ccp/api/NmrConstraints.py",
> line 9122, in setResonances
>     raise ApiError('ccp.NmrConstraints.DistanceConstraintItem.resonances
> list may not contain duplicates')
> ApiError: ccp.NmrConstraints.DistanceConstraintItem.resonances list may
> not contain duplicates
>
>
> --
> Dr. Brian O. Smith ---------------------- B.Smith at bio.gla.ac.uk
>           Division of Biochemistry & Molecular Biology,
>               Institute Biomedical & Life Sciences,
> Joseph Black Building, University of Glasgow, Glasgow G12 8QQ, UK.
> Tel: 0141 330 5167/6459                         Fax: 0141 330 8640
>