Dear Gary,
We thought about this one. The easiest solution we can do is to add a
derived 'resonances' link on PeakDimContrib, that would return
[mySelf.resonance] for a PeakDimContrib. The all AbstractPeakDimContrib
would have a 'resonances' link.
In the end we decided against it, because
1) It would make the model more complex to understand, and it is hard
enough already.
2) We suspect that few people would use it.
So I am afraid you will have to put is a bit of code like this:
if hasattr(myAbstractPeakDimContrib, 'resonance'):
x = myAbstractPeakDimContrib.resonance
else:
x = myAbstractPeakDimContrib.resonances
Regretfully 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 Fri, 17 Aug 2007, Gary S. Thompson wrote:
> Rasmus Fogh wrote:
>
> >Dear Gary,
> >
> >Worth thinking about.
> >
> >Tha background is that we need to allow for assignment to multiple
> >resionances, for e.g. J couplings, RDCs, or MQ shifts. But in the vast
> >majority of the cases there is only a single shift. We could have had
> >multiple resonances in all cases, but deided against it since it would an
> >unnecessary pain in the 99% of cases where you only wanted one, and since
> >this part of the model is used a lot. Your proposal would combine the
> >advantages of both. It would make the model a little more confusing,
> >though.
> >
> >I'll see what TIm says too. To speed the discussion along, could you give
> >an example (or more) of when one might want to use this?
> >
> >Yours,
> >
> >Rasmus
> >
> >
> >
> I am currently checking a peak list for duplicate assignments or subsets
> of duplicate assignments on each peak. Now if someone uses it with a
> list that has a
>
> peakDimContribN it will die as I do a getResonance and don't check the type (effectively these could both be subclasses of each other in terms of data content ;-) though)
>
> regards
> gary
>
> >---------------------------------------------------------------------------
> >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 Fri, 17 Aug 2007, Gary S. Thompson wrote:
> >
> >
> >
> >>Dear Developers
> >>
> >>Just a passing thought (and if I have said it before or there is an
> >>obvious answer I apologise) Iif you are looking at peakDimContribs there
> >>are two classes that may be present peakDimContrib and peakDimContribN.
> >>Both contain resonances but are accessed differently resonance
> >>(peakDimContrib can contain only one resonance) vs resonances so you
> >>have to special case. Shouldn't there be a way of getting the resonances
> >>in a peakDimContrib irrespective of the type of peakDimContrib...
> >>
> >>e.g. abstractPeakDimContrib.getAllResonances() for example
> >>
> >>
> >>regards
> >>gary
> >>
> >>
> >>
> >>--
> >>-------------------------------------------------------------------
> >>Dr Gary Thompson
> >>Astbury Centre for Structural Molecular Biology,
> >>University of Leeds, Astbury Building,
> >>Leeds, LS2 9JT, West-Yorkshire, UK Tel. +44-113-3433024
> >>email: [log in to unmask] Fax +44-113-2331407
> >>-------------------------------------------------------------------
> >>
> >>
> >>
> >
> >.
> >
> >
> >
>
>
> --
> -------------------------------------------------------------------
> Dr Gary Thompson
> Astbury Centre for Structural Molecular Biology,
> University of Leeds, Astbury Building,
> Leeds, LS2 9JT, West-Yorkshire, UK Tel. +44-113-3433024
> email: [log in to unmask] Fax +44-113-2331407
> -------------------------------------------------------------------
>
|