From: Peter Murray-R. <pm...@ca...> - 2003-09-21 15:42:37
|
At 10:02 20/09/2003 +0100, Chris Morley wrote: >2) With the new version of cml.cpp I seem to get an error message with this >(and every CML2 file I have tried): > ><molecule xmlns="http://www.xml-cml.org" id="m1"> > <atomArray> > <atom id="a1" elementType="C" /> > <atom id="a2" elementType="C" /> > <atom id="a3" elementType="C" /> > <atom id="a4" elementType="C" /> > </atomArray> > <bondArray> > <bond atomRefs2="a1 a2" order="2"/> > <bond atomRefs2="a2 a3" order="1"/> > <bond atomRefs2="a3 a4" order="D"/> > </bondArray> ></molecule> > >The error message is: >afterStartAtomArray 0 >atomRef arrays must be given for bonds > >but the output files (in cml2 mol or smi) seems ok I hope I have mended the error. It occurred with CML1+array files. (I can't see anything wrong with the above). I have run the roundtrip and it should work anyway. Pleas let me know if it's OK. NB. the attributes are confusing, though logical. atomRef refers to a single atom (or in <fooArray> to an array of atoms when only one atomRef is required per array element) CML1 with bondArray/bond uses two <string builtin="atomRef"/> elements atomRef1 only occurs in CML2+bondArray and refers to the first atom in the bonds atomRef2 only occurs in CML2+bondArray and refers to the second atom in the bonds atomRefs is a variable length array of references to atoms atomRefs2 is a 2-element array of references to atoms (e.g in CML2+bond or length) atomRefs3 is a 3-element array of references to atoms (e.g in angle) atomRefs4 is a 4-element array of references to atoms (e.g in torsion) It is easy to get these wrong. The examples in test/cmltest should now be definitive P. |