Friday, July 27, 2007

CML file reloaded

Here's an updated version of a valid CML file:

<?xml version="1.0"?>
<molecule xmlns=""
xmlns:iupac="" id="CS_oxolane">
<formula concise=" C 4 H 8 O 1 "/>
<identifier convention="iupac:inchi" value="1/C4H8O/c1-2-4-5-3-1/h1-4H2"/>
<name convention="IUPAC">Oxolan</name>
<atom id="a1" elementType="C" x3="-0.03" y3="1.09" z3="-0.03"/>
<atom id="a2" elementType="C" x3="-1.33" y3="0.28" z3="0.024"/>
<atom id="a3" elementType="O" x3="-1.01" y3="-1.10" z3="-0.13"/>
<atom id="a4" elementType="C" x3="0.39" y3="-1.30" z3="0.02"/>
<atom id="a5" elementType="C" x3="1.09" y3="0.06" z3="-0.04"/>
<atom id="a6" elementType="H" x3="0.04" y3="1.79" z3="0.82"/>
<atom id="a7" elementType="H" x3="-0.00" y3="1.73" z3="-0.94"/>
<atom id="a8" elementType="H" x3="-2.03" y3="0.51" z3="-0.79"/>
<atom id="a9" elementType="H" x3="-1.86" y3="0.39" z3="0.98"/>
<atom id="a10" elementType="H" x3="0.68" y3="-1.98" z3="-0.79"/>
<atom id="a11" elementType="H" x3="0.55" y3="-1.81" z3="0.98"/>
<atom id="a12" elementType="H" x3="1.72" y3="0.15" z3="-0.94"/>
<atom id="a13" elementType="H" x3="1.78" y3="0.20" z3="0.82"/>
<bond atomRefs2="a1 a2" order="1"/>
<bond atomRefs2="a2 a3" order="1"/>
<bond atomRefs2="a3 a4" order="1"/>
<bond atomRefs2="a4 a5" order="1"/>
<bond atomRefs2="a5 a1" order="1"/>
<bond atomRefs2="a1 a6" order="1"/>
<bond atomRefs2="a1 a7" order="1"/>
<bond atomRefs2="a2 a8" order="1"/>
<bond atomRefs2="a2 a9" order="1"/>
<bond atomRefs2="a4 a10" order="1"/>
<bond atomRefs2="a4 a11" order="1"/>
<bond atomRefs2="a5 a12" order="1"/>
<bond atomRefs2="a5 a13" order="1"/>
<property dictRef="cml:molwt" title="Molecular weight">
<scalar dataType="xsd:double" dictRef="cml:molwt" units="units:g">
<property dictRef="cml:isotopicwt" title="Monoisotopic mass">
<scalar dataType="xsd:double" dictRef="cml:monoisotopicwt" units="units:g">
<property dictRef="cml:mp" title="Melting point">
<scalar dataType="xsd:double" errorValue="1.0" dictRef="cml:mp" units="units:celsius">
<property dictRef="cml:bp" title="Boiling point">
<scalar dataType="xsd:double" errorValue="1.0" dictRef="cml:bp" units="units:celsius">


Egon Willighagen said...

Jerome, except for the lower case problems you already mentioned on IRC, I also not that the dictRef attribute values use undefined namespaces... the content is supposed to be 'qualified', but the prefixes are not bound to a namespace. You need to add lines like: xmlns:iupac="http://thenamespace" and similar for xmlns:unit, xmlns:cml and xmlns:xsd.

Jerome Pansanel said...

I've updated the CML file. I hope that is right now.
For the name tag, we have:
Is it not better to have:
convention="iupac:name" ?

Julie said...

Thanks for sharing...
HD Access for just $10 a month to your FAVORITE Channels!