Hi all,
I'm trying to create a ccpn test project with 2 StructureGeneration with
a distanceConstraintList for each ones.
No problems during the project creation with formatConverter. Bugs
appear when I start to navigate into it.
ex:
>>> from memops.general.Io import loadXmlProjectFile
>>> ccpn_project = loadXmlProjectFile(file = 'test2.xml')
>>> structure_generations = ccpn_project.structureGenerations
>>> print structure_generations
(<ccp.Nmr.StructureGeneration [1]>, <ccp.Nmr.StructureGeneration [2]>)
>>> structure_generation = structure_generations[0]
>>> head = structure_generation.nmrConstraintHead
>>> head
<ccp.Nmr.NmrConstraintHead [1]>
>>> constraint_list = head.findAllConstraintLists()
last xml element read:
</parent>
parser state was:
reading
ERROR loading xml ccp.NmrConstraints constraintSet01/NmrConstraints.xml
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/Bis/bardiaux/ccpnmr/ccpnmr1.0/python/ccp/api/Nmr.py", line
57204, in findAllConstraintLists
contentStorage.load()
File
"/home/Bis/bardiaux/ccpnmr/ccpnmr1.0/python/memops/api/Implementation.py",
line 7259, in load
ioModule.load(stream, self.headObject)
File
"/home/Bis/bardiaux/ccpnmr/ccpnmr1.0/python/ccp/xml/NmrConstraints.py",
line 107, in load
return GeneralXmlIO.load(stream, mapping, parentObject)
File
"/home/Bis/bardiaux/ccpnmr/ccpnmr1.0/python/memops/format/xml/XmlIO.py",
line 370, in load
result = doLoad(stream, mapping, headObject)
File
"/home/Bis/bardiaux/ccpnmr/ccpnmr1.0/python/memops/format/xml/XmlIO.py",
line 705, in doLoad
raise ApiError(loadError +
memops.general.Implementation.ApiError: Error loading fileHeadObject
ccp.Nmr.NmrConstraintHead:[1] differs from file parent
ccp.Nmr.NmrConstraintHead:[2]
>>>
Many thanks for your help.
Here are some interesting parts of the test2 projects data.
*part of test2.xml*
<ContentStorage _ID="_47" serial="42" isStored="true"
isModifiable="true" package="ccp.NmrConstraints" format="xml" url="_4">
<path>constraintSet01/NmrConstraints.xml</path>
</ContentStorage>
<ContentStorage _ID="_48" serial="43" isStored="true"
isModifiable="true" package="ccp.NmrConstraints" format="xml" url="_4">
<path>constraintSet01/NmrConstraints.xml</path>
</ContentStorage>
*test2/ccp/Nmr.xml:*
<?xml version="1.0" encoding="UTF-8"?>
<_StorageUnit time="Tue Mar 7 09:31:23 2006" release="1.0.210"
packageName="ccp.Nmr" root="test2" originator="CCPN Python XmlIO">
<NmrConstraintHead _ID="_1" serial="1">
<structureGenerations _IDREF="_2"/>
<contentStorage>
<key1 serial="42"/>
</contentStorage>
</NmrConstraintHead>
<NmrConstraintHead _ID="_3" serial="2">
<structureGenerations _IDREF="_4"/>
<contentStorage>
<key1 serial="43"/>
</contentStorage>
</NmrConstraintHead>
<StructureGeneration _ID="_2" serial="1" generationType="denovo"
nmrConstraintHead="_1">
<name>it0</name>
</StructureGeneration>
<StructureGeneration _ID="_4" serial="2" generationType="denovo"
nmrConstraintHead="_3">
<name>it1</name>
</StructureGeneration>
</_StorageUnit>
<!--End of Memops Data-->
*head test2/constraintSet01/NmrConstraints.xml:*
<?xml version="1.0" encoding="UTF-8"?>
<_StorageUnit time="Tue Mar 7 09:31:24 2006" release="1.0.210"
packageName="ccp.NmrConstraints" root="test2" originator="CCPN Python
XmlIO">
<parent>
<key1 serial="2"/>
</parent>
<DistanceConstraintList _ID="_1" serial="1" usedForCalculation="true">
<name>unambig_2</name>
--
-----------------------------------------------------
Benjamin Bardiaux | Bioinformatique Structurale
[log in to unmask] | Institut Pasteur
25,28 rue du Docteur Roux 75018 Paris, France
-----------------------------------------------------
|