Hello,
It turns out that in v1 of Analysis you could have a distanceConstraint
with two effectively identical distanceConstraintItems. So a
distanceConstraintItem is effectively determined by two resonances, and in
v1 you could have two distanceConstraintItems each with the same two
resonances, but listed in the opposite order. This happens because in v1
that is an ordered list and it didn't check the reverse order. In v2 this
is a set, so it doesn't allow it. So if you try to upgrade a v1 project
with this problem to v2 then the v2 API throws a tizzy.
I've attached a script that you can run from the v1 Analysis prompt to
sort out this problem before submitting to the upgrade server. So if the
removeDuplicates.py script is in the directory where you started up
Analysis you can do:
>>> from removeDuplicates import removeDuplicates
>>> removeDuplicates(top.project)
It tells you how many duplicates there are and asks if you want to delete
them and if so then also asks if you want the project saved (of course you
could also do the latter from the normal Analysis prompt).
The kind of message you would see from the upgrade server if this is a
problem runs like this:
Job failed: ApiError: Cannot add child - key already in use:
ccp.nmr.NmrConstraint.DistanceConstraintItem:<ccp.nmr.NmrConstraint.DistanceConstraint
[13, 1,
27]>:frozenset([<ccp.nmr.NmrConstraint.FixedResonance [13, 105]>,
<ccp.nmr.NmrConstraint.FixedResonance [13, 104]>])
and then some more blurb below that, but that is the important one.
(It's possible we could automatically incorporate this in the upgrade API
but that's not in place yet.)
Wayne
|