<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-33087454</id><updated>2012-01-03T10:33:30.630-08:00</updated><category term='molecular formula'/><category term='make'/><category term='xmllint'/><category term='spectroscopy'/><category term='namespaces'/><category term='aromaticity'/><category term='markup language'/><category term='CML'/><category term='XML'/><category term='Perl'/><category term='chemistry'/><category term='bond'/><category term='LaTeX'/><category term='validation'/><title type='text'>CML Explained</title><subtitle type='html'>&amp;lt;cml&gt;&amp;lt;molecule id="caffeine"&gt;&amp;lt;atomArray/&gt;&amp;lt;bondArray/&gt;&amp;lt;/molecule&gt;&amp;lt;/cml&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cmlexplained.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cmlexplained.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Egon Willighagen</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JxU9YdY1Zl8/AAAAAAAAAAI/AAAAAAAABM4/GA8mWNfbWhg/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-33087454.post-5563443499352729311</id><published>2009-09-18T01:30:00.000-07:00</published><updated>2009-09-18T01:30:58.010-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='markup language'/><category scheme='http://www.blogger.com/atom/ns#' term='CML'/><category scheme='http://www.blogger.com/atom/ns#' term='bond'/><category scheme='http://www.blogger.com/atom/ns#' term='chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='aromaticity'/><title type='text'>Bond order information and aromaticity</title><content type='html'>CML allows you to mark a bond as single (S), double (D), triple (T), but also as aromatic (A). The latter has the downside that one looses the localization of the double bonds, often used in 2D diagrams, e.g. in &lt;a href="http://jchempaint.sf.net"&gt;JChemPaint&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://cdk.sf.net"&gt;CDK&lt;/a&gt; addresses this by storing the aromaticity as additional property on the bond:&lt;pre&gt;&amp;lt;bond atomRefs='a1 a2' order='D'&gt;&lt;br /&gt;  &amp;lt;bondType dictRef="cdk:aromaticBond"/&gt;&lt;br /&gt;&amp;lt;/bond&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33087454-5563443499352729311?l=cmlexplained.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmlexplained.blogspot.com/feeds/5563443499352729311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33087454&amp;postID=5563443499352729311' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/5563443499352729311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/5563443499352729311'/><link rel='alternate' type='text/html' href='http://cmlexplained.blogspot.com/2009/09/bond-order-information-and-aromaticity.html' title='Bond order information and aromaticity'/><author><name>Egon Willighagen</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JxU9YdY1Zl8/AAAAAAAAAAI/AAAAAAAABM4/GA8mWNfbWhg/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33087454.post-8274869760763386180</id><published>2007-09-23T02:16:00.000-07:00</published><updated>2007-09-23T02:33:54.537-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spectroscopy'/><category scheme='http://www.blogger.com/atom/ns#' term='markup language'/><category scheme='http://www.blogger.com/atom/ns#' term='CML'/><title type='text'>Chemical Markup Language for spectra: the JCIM publication</title><content type='html'>Stefan Kuhn wrote a paper on the use of the &lt;a href="http://cml.sourceforge.net/"&gt;Chemical Markup Language&lt;/a&gt; for markup of spectra: &lt;i&gt;Chemical Markup, XML, and the World Wide Web. 7. CMLSpect, an XML Vocabulary for Spectral Data&lt;/i&gt; (doi:&lt;a href="http://dx.doi.org/10.1021/ci600531a" rel="review"&gt;10.1021/ci600531a&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;The abtract:&lt;ul&gt;&lt;i&gt;CMLSpect is an extension of Chemical Markup Language (CML) for managing spectral and other analytical data. It is designed to be flexible enough to contain a wide variety of spectral data. The paper describes the CMLElements used and gives practical examples for common types of spectra. In addition it demonstrates how different views of the data can be expressed and what problems still exist.&lt;/i&gt;&lt;/ul&gt;&lt;br /&gt;Various projects from the authors already put CMLSpect in production use, such as the &lt;a href="http://nmrshiftdb.org/"&gt;NMRShiftDB&lt;/a&gt;, &lt;a href="http://bioclipse.net/"&gt;Bioclipse&lt;/a&gt;, &lt;a href="http://jspecview.sourceforge.net/"&gt;JSpecView&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33087454-8274869760763386180?l=cmlexplained.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmlexplained.blogspot.com/feeds/8274869760763386180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33087454&amp;postID=8274869760763386180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/8274869760763386180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/8274869760763386180'/><link rel='alternate' type='text/html' href='http://cmlexplained.blogspot.com/2007/09/chemical-markup-language-for-spectra.html' title='Chemical Markup Language for spectra: the JCIM publication'/><author><name>Egon Willighagen</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JxU9YdY1Zl8/AAAAAAAAAAI/AAAAAAAABM4/GA8mWNfbWhg/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33087454.post-5126723540808518842</id><published>2007-06-27T06:02:00.000-07:00</published><updated>2008-07-31T01:07:45.319-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='namespaces'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='CML'/><title type='text'>There can be only one (namespace)</title><content type='html'>Today I had a discussion with indexing CML files, such as extraction of molecular formula, author, title, compound names etc. And we came to the point of CML namespaces. And CML has seen a few in the past, listed below. However, only the latest should be used: &lt;b&gt;http://www.xml-cml.org/schema&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;http://www.xml-cml.org/schema&lt;/b&gt;&lt;br /&gt;This is the namespace of the latest CML schema. This one must be used for creating any new CML file.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;http://www.xml-cml.org/schema/cml2/core&lt;/b&gt;&lt;br /&gt;This was the first namespace used in the &lt;a href="http://en.wikipedia.org/wiki/XML_Schema"&gt;XML Schema&lt;/a&gt; definition for CML. It has been used by at least &lt;a href="http://openbabel.sf.net/"&gt;OpenBabel&lt;/a&gt; and the &lt;a href="http://cdk.sf.net/"&gt;CDK&lt;/a&gt;, but is outdated and should no longer be used.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;http://www.xml-cml.org/dtd/cml1_0_1.dtd&lt;/b&gt;&lt;br /&gt;I have no idea if this namespace has actually been used, but it is &lt;a href="http://cml.sourceforge.net/historical/faq.html#namespaces"&gt;mentioned in this official FAQ&lt;/a&gt;. I think it might actually be remnant from the early days of XML Schema: CML 1.0 (DOI:&lt;a href="http://dx.doi.org/10.1021/ci990052b"&gt;10.1021/ci990052b&lt;/a&gt;) was &lt;a href="http://en.wikipedia.org/wiki/Document_Type_Definition"&gt;DTD&lt;/a&gt; based, and DTD has no concept like &lt;a href="http://en.wikipedia.org/wiki/XML_Namespaces"&gt;XML Namespaces&lt;/a&gt;. But namespaces are oh so useful, and used in CML 2.0 (DOI:&lt;a href="http://dx.doi.org/10.1021/ci0256541"&gt;10.1021/ci0256541&lt;/a&gt;) applications like &lt;a href="http://chem-bla-ics.blogspot.com/2006/03/progress-with-cmlrss-plugin-for.html"&gt;CMLRSS&lt;/a&gt; (DOI:&lt;a href="http://dx.doi.org/10.1021/ci034244p"&gt;10.1021/ci034244p&lt;/a&gt;). I am not aware of applications using this cml1_0_1.dtd CML namespace.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33087454-5126723540808518842?l=cmlexplained.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmlexplained.blogspot.com/feeds/5126723540808518842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33087454&amp;postID=5126723540808518842' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/5126723540808518842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/5126723540808518842'/><link rel='alternate' type='text/html' href='http://cmlexplained.blogspot.com/2007/06/there-can-be-only-one-namespace.html' title='There can be only one (namespace)'/><author><name>Egon Willighagen</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JxU9YdY1Zl8/AAAAAAAAAAI/AAAAAAAABM4/GA8mWNfbWhg/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33087454.post-3843789513118496843</id><published>2007-03-08T09:27:00.000-08:00</published><updated>2007-03-08T09:50:21.578-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='molecular formula'/><category scheme='http://www.blogger.com/atom/ns#' term='CML'/><title type='text'>Chemical Formulas in CML</title><content type='html'>Molecular formulas are useful to have in CML, especially when connectivity is not know. Working on Computer Aided Structure Elucidation (CASE) based on NMR and MS data, this is of particular interest, as the input I have is in CML.&lt;br /&gt;&lt;br /&gt;CML provides a few options to contain such, all using the &amp;lt;formula&gt; element (&lt;a href="http://cml.svn.sourceforge.net/viewvc/cml/schema2/trunk/elements/formula.xsd?revision=161&amp;view=markup"&gt;xsd&lt;/a&gt;). The first option is to use a &lt;i&gt;concise&lt;/i&gt; formula, which is a formal specification with all elements that occur on the formula given once, and where the count is explicitly given (all whitespace separated):&lt;pre&gt;&amp;lt;formula concise="C 5 H 10 O 2"/&gt;&lt;/pre&gt; Alternatively, you can use the @inline attribute, and refer to some convention, as in &lt;a href="http://cml.svn.sourceforge.net/viewvc/cml/schema2/trunk/examples/xsd/formula3.xml?view=markup"&gt;here&lt;/a&gt;: &lt;pre&gt;&amp;lt;formula convention="iucr:_chemical_formula_structural" inline="Sn (C2 O4) K F"/&gt;&lt;/pre&gt;&lt;br /&gt;More flexible formats are possible too, such as in &lt;a href="http://cml.svn.sourceforge.net/viewvc/cml/schema2/trunk/examples/xsd/formula2.xml?view=markup"&gt;this example&lt;/a&gt;:&lt;pre&gt;&amp;lt;molecule id="CuprammoniumSulfate"&gt;&lt;br /&gt; &amp;lt;formula id="f2" title="[Cu(NH3)4]2+ SO42-]"&gt;&lt;br /&gt;  &amp;lt;formula id="f21" formalCharge="2"&gt;&lt;br /&gt;   &amp;lt;atomArray id="aa1" elementType="Cu" count="1"/&gt;&lt;br /&gt;   &amp;lt;formula id="f22" count="4"&gt;&lt;br /&gt;    &amp;lt;atomArray elementType="N H" count="1 3"/&gt;&lt;br /&gt;   &amp;lt;/formula&gt;&lt;br /&gt;  &amp;lt;/formula&gt;&lt;br /&gt;  &amp;lt;formula id="f3" formalCharge="-2"&gt;&lt;br /&gt;   &amp;lt;atomArray id="aa2" elementType="S O" count="1 4"/&gt;&lt;br /&gt;  &amp;lt;/formula&gt;&lt;br /&gt; &amp;lt;/formula&gt;&lt;br /&gt;&amp;lt;/molecule&gt;&lt;/pre&gt;&lt;br /&gt;You can see it in action in the &lt;a href="http://chem-file.sourceforge.net/data/index_en.html"&gt;chem-file project&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33087454-3843789513118496843?l=cmlexplained.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmlexplained.blogspot.com/feeds/3843789513118496843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33087454&amp;postID=3843789513118496843' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/3843789513118496843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/3843789513118496843'/><link rel='alternate' type='text/html' href='http://cmlexplained.blogspot.com/2007/03/chemical-formula-in-cml.html' title='Chemical Formulas in CML'/><author><name>Egon Willighagen</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JxU9YdY1Zl8/AAAAAAAAAAI/AAAAAAAABM4/GA8mWNfbWhg/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33087454.post-7979997001499419890</id><published>2007-02-14T05:14:00.000-08:00</published><updated>2007-02-14T05:46:30.047-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xmllint'/><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='CML'/><category scheme='http://www.blogger.com/atom/ns#' term='validation'/><category scheme='http://www.blogger.com/atom/ns#' term='LaTeX'/><category scheme='http://www.blogger.com/atom/ns#' term='make'/><title type='text'>Writing up CML conventions in LaTeX</title><content type='html'>CML is a rather flexible format, which allows, however, to specify it's specifics in form of conventions, as specified in the @convention attribute. Such conventions can put extra restrictions on hierarchy and expected content. For example, we may define a 'simpleMolecule' convention which only allows &amp;lt;atomArray&gt; and &amp;lt;bondArray&gt; inside a &amp;lt;molecule&gt;, and &amp;lt;atom&gt; in &amp;lt;atomArray&gt; and &amp;lt;bond&gt; in &amp;lt;bondArray&gt;:&lt;pre&gt;&amp;lt;molecule convention="simpleMolecule"&gt;&lt;br /&gt;  &amp;lt;atomArray&gt;&lt;br /&gt;    &amp;lt;atom id="c1" elementType="C" hydrogenCount="3"&gt;&lt;br /&gt;    &amp;lt;atom id="n1" elementType="N" hydrogenCount="2"&gt;&lt;br /&gt;  &amp;lt;/atomArray&gt;&lt;br /&gt;  &amp;lt;bondArray&gt;&lt;br /&gt;    &amp;lt;bond atomRefs="c1 n1" order="s"/&gt;&lt;br /&gt;  &amp;lt;/bondArray&gt;&lt;br /&gt;&amp;lt;/molecule&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, such conventions need to be specified. One way of doing this is writing it up in a LaTeX document, which would include explanations and likely code examples. To ensure that these code examples are actually valid CML, the following setup may be used, which separates code examples from the LaTeX source.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Including CML examples in the LaTeX source&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Because the framework makes use of the LaTeX package listings, it cannot make use of the \include command to include the code examples into the PDF. Instead, it makes use of a preprocessor that includes the examples instead. This is the directory layout I have:&lt;pre&gt;.&lt;br /&gt;|-- Makefile&lt;br /&gt;|-- spec.tex.in&lt;br /&gt;|-- examples&lt;br /&gt;|   |-- Makefile&lt;br /&gt;|   |-- schema.xsd&lt;br /&gt;|   |-- simple1d.valid.xml&lt;br /&gt;`-- preproces.pl&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The Makefile creates the PDF from the LaTeX source by first running &lt;i&gt;preproces.pl&lt;/i&gt; on the .tex.in file, and then running &lt;i&gt;pdflatex&lt;/i&gt; on the created .tex file:&lt;pre&gt;all: spec.pdf&lt;br /&gt;&lt;br /&gt;spec.pdf: spec.tex&lt;br /&gt;        pdflatex spec.tex&lt;br /&gt;        pdflatex spec.tex&lt;br /&gt;        pdflatex spec.tex&lt;br /&gt;&lt;br /&gt;spec.tex: spec.tex.in&lt;br /&gt;        perl preproces.pl &lt; spec.tex.in &gt; spec.tex&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The LaTeX source in the .tex.in file looks like:&lt;pre&gt;&lt;br /&gt;\begin{lstlisting}[language=XML,&lt;br /&gt;  caption={Simple 1D ${^13}C$ NMR spectrum.},&lt;br /&gt;  label={list:simple1d}]&lt;br /&gt;% INPUT: simple1d.valid.cml&lt;br /&gt;\end{lstlisting}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The string "% INPUT:" is picked up by the Perl script to include that file. The full script looks like:&lt;pre&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;use diagnostics;&lt;br /&gt;use strict;&lt;br /&gt;&lt;br /&gt;while (my $line = &amp;lt;STDIN&gt;) {&lt;br /&gt;  if ($line =~ /^\%\sINPUT:\s(.*)/) {&lt;br /&gt;    my $file = $1;&lt;br /&gt;    die "Cannot find file 'examples/$file' to insert!\n" if (!(-e "examples/$file"));&lt;br /&gt;    open (INPUT, "&amp;lt;examples/$file");&lt;br /&gt;    while (&amp;lt;INPUT&gt;) { print STDOUT $_; };&lt;br /&gt;  } else {&lt;br /&gt;    print STDOUT $line;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;CML Validation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now that the examples are split out, but tightly integrated in the LaTeX source, validation of the CML examples is easy. I use a simple Makefile for that, which makes use of &lt;i&gt;xmllint&lt;/i&gt;:&lt;pre&gt;&lt;br /&gt;all: validate&lt;br /&gt;&lt;br /&gt;validate: *.valid.cml&lt;br /&gt;        @for f in *.valid.cml; do \&lt;br /&gt;          echo "** Validating $${f} against XML Schema..."; \&lt;br /&gt;          xmllint --noout --schema schema.xsd $${f}; \&lt;br /&gt;        done&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33087454-7979997001499419890?l=cmlexplained.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmlexplained.blogspot.com/feeds/7979997001499419890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33087454&amp;postID=7979997001499419890' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/7979997001499419890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/7979997001499419890'/><link rel='alternate' type='text/html' href='http://cmlexplained.blogspot.com/2007/02/writing-up-cml-conventions-in-latex.html' title='Writing up CML conventions in LaTeX'/><author><name>Egon Willighagen</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JxU9YdY1Zl8/AAAAAAAAAAI/AAAAAAAABM4/GA8mWNfbWhg/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33087454.post-116245072457803706</id><published>2006-11-01T22:53:00.000-08:00</published><updated>2006-11-01T23:12:40.456-08:00</updated><title type='text'>CML id's picky on allowed characters</title><content type='html'>Yesterday, I was hacking on the atom type lists in the &lt;a href="http://cdk.sf.net/"&gt;CDK&lt;/a&gt; (MM2, MMFF94, PDB and a few customs ones) which the project has stored in CML. The files had not been updated to CML 2.3, which is the most recent specification we use in the CDK (see &lt;a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1562342&amp;group_id=20024&amp;atid=120024"&gt;bug #1562342&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;When doing this I found a problem which I have seen more often: the problem was that the MM2 and MMFF94 atom type lists contained '=' and other forbidden characters in the &amp;lt;atomType&gt; @id's. The content of this @id attribute is defined by the &lt;b&gt;idType&lt;/b&gt; in the XML Schema for CML 2.3. It extends the &lt;a href="http://www.w3.org/TR/xmlschema-2/"&gt;XML Schema datatype&lt;/a&gt; &lt;b&gt;xsd:string&lt;/b&gt;, but is also require to match this regular expression: &lt;b&gt;[A-Za-z][A-Za-z0-9\.\-_]*&lt;/b&gt;. That is, it has to start with a upper or lower case letter, and then consists of alphanumerics, dots (.), a hyphen (-), or an underscore (_).&lt;br /&gt;&lt;br /&gt;Now, the atom type lists used to identifiers from the MMFF94 and MM2 force field atom type lists, giving code like:&lt;pre&gt;&lt;br /&gt;&amp;lt;atomType id="N=C"&gt;&lt;br /&gt;  &amp;lt;!-- in imines --&gt;&lt;br /&gt;  &amp;lt;atom elementType="N" formalCharge="0"&gt;&lt;br /&gt;    &amp;lt;scalar dataType="xsd:double" dictRef="cdk:maxBondOrder"&gt;2.0&lt;/scalar&gt;&lt;br /&gt;    &amp;lt;scalar dataType="xsd:double" dictRef="cdk:bondOrderSum"&gt;3.0&lt;/scalar&gt;&lt;br /&gt;    &amp;lt;scalar dataType="xsd:integer" dictRef="cdk:formalNeighbourCount"&gt;2&lt;/scalar&gt;&lt;br /&gt;    &amp;lt;scalar dataType="xsd:integer" dictRef="cdk:valency"&gt;5&lt;/scalar&gt;&lt;br /&gt;  &amp;lt;/atom&gt;&lt;br /&gt;  &amp;lt;scalar dataType="xsd:string" dictRef="cdk:hybridization"&gt;sp2&lt;/scalar&gt;&lt;br /&gt;  &amp;lt;scalar dataType="xsd:string" dictRef="cdk:DA"&gt;A&lt;/scalar&gt;&lt;br /&gt;  &amp;lt;scalar dataType="xsd:string" dictRef="cdk:sphericalMatcher"&gt;N-[1-3];[H]{0,2}+[A-Za-z]*+=[CN].*+&lt;/scalar&gt;&lt;br /&gt;&amp;lt;/atomType&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The solution is to put the original identifier, "N=C" in this example, into a &amp;lt;label&gt; element and &lt;i&gt;fix&lt;/i&gt; the @id:&lt;pre&gt;&lt;br /&gt;&amp;lt;atomType id="NdoubleBondedC"&gt;&lt;br /&gt;  &amp;lt;!-- in imines --&gt;&lt;br /&gt;  &amp;lt;label value="N=C"/&gt;&lt;br /&gt;&amp;lt;/atomType&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It did require to fix the atom type perception too, because those were using the original identifiers to look up atom types.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33087454-116245072457803706?l=cmlexplained.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmlexplained.blogspot.com/feeds/116245072457803706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33087454&amp;postID=116245072457803706' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/116245072457803706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/116245072457803706'/><link rel='alternate' type='text/html' href='http://cmlexplained.blogspot.com/2006/11/cml-ids-picky-on-allowed-characters.html' title='CML id&apos;s picky on allowed characters'/><author><name>Egon Willighagen</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JxU9YdY1Zl8/AAAAAAAAAAI/AAAAAAAABM4/GA8mWNfbWhg/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33087454.post-116151590924339097</id><published>2006-10-22T04:09:00.000-07:00</published><updated>2006-10-22T04:18:29.256-07:00</updated><title type='text'>Creating plain text from CML source</title><content type='html'>Recently the fourth release of the &lt;a href="http://www.blueobelisk.org/"&gt;Blue Obelisk&lt;/a&gt; &lt;a href="http://wiki.cubic.uni-koeln.de/bowiki/index.php/DataRepository"&gt;Data Repository&lt;/a&gt; (BODR) was &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=20024&amp;package_id=179000"&gt;released&lt;/a&gt;. This data repository provides basic data about elements and isotopes, such as high resolution mass information. The data is taken from literature, and the repository is used by several projects, like &lt;a href="http://openbabel.sourceforge.net/"&gt;OpenBabel&lt;/a&gt;, &lt;a href="http://edu.kde.org/kalzium/"&gt;Kalzium&lt;/a&gt;, and the &lt;a href="http://cdk.sf.net/"&gt;CDK&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The data is distributed in CML format to ensure semantic markup, but in some cases it might be easier to work with text files containing bits of information. This blog shows how &lt;a href="http://www.w3.org/TR/xslt"&gt;XSLT&lt;/a&gt; can be used to create such plain text files from the XML search.&lt;br /&gt;&lt;br /&gt;Consider the below XSLT code, which extracts information from the elements.xml in the BODR distribution:&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0"?&gt;&lt;br /&gt;&amp;lt;xsl:stylesheet version="1.0"&lt;br /&gt;  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&lt;br /&gt;  xmlns:cml="http://www.xml-cml.org/schema"&gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;xsl:output method="text"/&gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;xsl:template match="*"&gt;&lt;br /&gt;    &amp;lt;xsl:apply-templates/&gt;&lt;br /&gt;  &amp;lt;/xsl:template&gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;xsl:template match="text()"/&gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;xsl:template match="cml:atom"&gt;&lt;br /&gt;    &amp;lt;xsl:value-of select="cml:label[@dictRef='bo:symbol']/@value"/&gt;&lt;br /&gt;    &amp;lt;xsl:text&gt; &amp;lt;/xsl:text&gt;&lt;br /&gt;    &amp;lt;xsl:value-of select="cml:scalar[@dictRef='bo:exactMass']"/&gt;&lt;br /&gt;    &amp;lt;xsl:text&gt;&lt;br /&gt;&amp;lt;/xsl:text&gt;&lt;br /&gt;  &amp;lt;/xsl:template&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/xsl:stylesheet&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;XSLT is the transformation specification of XSL, and provides means to convert XML documents into other documents, either XML or plain text. The above XSLT creates plain text, as indicated by the &amp;lt;xsl:output&gt; element.&lt;br /&gt;&lt;br /&gt;The three templates define how the XML source is transformed. The first template tells the processor to apply templates for all elements in the XML source (match="*"). The second template matches all text nodes on the XML source, and ensures that all text from the source is ignored, so that we can tune in detail the output.&lt;br /&gt;&lt;br /&gt;The third template is the most interesting one; it defines which information from the source XML is extracted and outputed to the plain text file. The &amp;lt;xsl:value-of&gt; elements define which content from the XML source is send to the output. The above XSLT contains two such elements, and it extracts the element symbol and its exact mass. The logic is define by &lt;a href="http://www.w3.org/TR/xpath"&gt;XPath&lt;/a&gt; statements given in the @match attribute of the &amp;lt;xsl:template&gt; element and the @select attribute of the &amp;lt;xsl:value-of&gt; element.&lt;br /&gt;&lt;br /&gt;This third template applies to all &amp;lt;atom&gt; elements in the CML source, as indicated by the @match attribute. From this element, the &amp;lt;xsl:value-of&gt; elements extract the element symbol using the XPath query &lt;i&gt;cml:label[@dictRef='bo:symbol']/@value&lt;/i&gt;. Or, in natural language: take the content of the @value attribute, of the &amp;lt;cml:label&gt; element which has an @dictRef attribute of which the content is 'bo:symbol'. The second query is &lt;i&gt;cml:scalar[@dictRef='bo:exactMass']&lt;/i&gt;, and says: take the content of the &amp;lt;cml:scalar&gt; element which has an @dictRef attribute of which the content is 'bo:exactMass'.&lt;br /&gt;&lt;br /&gt;Check the elements.xml source code, and it will be clear how to extract other elemental properties. Good luck!&lt;br /&gt;&lt;br /&gt;&lt;div style="font-size: 9pt;"&gt;&lt;a title="technorati" href="http://www.technorati.com/search/chem-bla-ics.blogspot.com"&gt;Technorati&lt;/a&gt; tags: &lt;a title="XML" href="http://technorati.com/tag/XML" rel="tag"&gt;XML&lt;/a&gt;  &lt;a title="CML" href="http://technorati.com/tag/CML" rel="tag"&gt;CML&lt;/a&gt;  &lt;a title="XSLT" href="http://technorati.com/tag/XSLT" rel="tag"&gt;XSLT&lt;/a&gt;  &lt;a title="XPath" href="http://technorati.com/tag/XPath" rel="tag"&gt;XPath&lt;/a&gt;  &lt;a title="Blue" href="http://technorati.com/tag/Blue" rel="tag"&gt;Blue&lt;/a&gt;  &lt;a title="Obelisk" href="http://technorati.com/tag/Obelisk" rel="tag"&gt;Obelisk&lt;/a&gt;  &lt;a title="isotope" href="http://technorati.com/tag/isotope" rel="tag"&gt;isotope&lt;/a&gt;  &lt;a title="data" href="http://technorati.com/tag/data" rel="tag"&gt;data&lt;/a&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33087454-116151590924339097?l=cmlexplained.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmlexplained.blogspot.com/feeds/116151590924339097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33087454&amp;postID=116151590924339097' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/116151590924339097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/116151590924339097'/><link rel='alternate' type='text/html' href='http://cmlexplained.blogspot.com/2006/10/creating-plain-text-from-cml-source.html' title='Creating plain text from CML source'/><author><name>Egon Willighagen</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JxU9YdY1Zl8/AAAAAAAAAAI/AAAAAAAABM4/GA8mWNfbWhg/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33087454.post-115800734595715441</id><published>2006-09-11T13:08:00.000-07:00</published><updated>2006-09-11T13:42:26.030-07:00</updated><title type='text'>InChI's in CML</title><content type='html'>I've seen some incorrect uses of &amp;lt;identifier&gt; for adding &lt;a href="http://www.iupac.org/inchi/"&gt;InChI&lt;/a&gt;'s in CML. The bad code I have seen in the wild looks like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;molecule&gt;&lt;br /&gt;  &amp;lt;identifier convention="iupac:inchi"&gt;InChI=1/CH4/h1H4&amp;lt;/identifier&gt;&lt;br /&gt;&amp;lt;/molecule&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;However, the &amp;lt;identifier&gt; does not allow content other then elements. In XML terms: it does not allow mixed content. You might wonder why it allows any element. This is because the first InChI betas had an XML syntax (InChI still has an XML syntax too).&lt;br /&gt;&lt;br /&gt;If you want the one-line InChI format most of us know, it needs to be put into the @value attribute. Thus:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;molecule&gt;&lt;br /&gt;  &amp;lt;identifier convention="iupac:inchi" value="InChI=1/CH4/h1H4"/&gt;&lt;br /&gt;&amp;lt;/molecule&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-size: 9pt;"&gt;&lt;a title="technorati" href="http://www.technorati.com/search/chem-bla-ics.blogspot.com"&gt;Technorati&lt;/a&gt; tags: &lt;a title="InChI" href="http://technorati.com/tag/InChI" rel="tag"&gt;InChI&lt;/a&gt;  &lt;a title="CML" href="http://technorati.com/tag/CML" rel="tag"&gt;CML&lt;/a&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33087454-115800734595715441?l=cmlexplained.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmlexplained.blogspot.com/feeds/115800734595715441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33087454&amp;postID=115800734595715441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/115800734595715441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/115800734595715441'/><link rel='alternate' type='text/html' href='http://cmlexplained.blogspot.com/2006/09/inchis-in-cml.html' title='InChI&apos;s in CML'/><author><name>Egon Willighagen</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JxU9YdY1Zl8/AAAAAAAAAAI/AAAAAAAABM4/GA8mWNfbWhg/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33087454.post-115727980919800460</id><published>2006-09-03T02:36:00.000-07:00</published><updated>2006-09-03T03:37:15.333-07:00</updated><title type='text'>Scalar data types</title><content type='html'>The CML &amp;lt;scalar&gt; element has an attribute @dataType which allows one to state what the type of the scalar value. Consider the following fragment, which could define a nick name for an atom:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;scalar dataType="xsd;string" title="NickName"&gt;carbonRulez&amp;lt;/scalar&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The CML schema suggests to use the XML Schema Datatypes, as defined in the &lt;a href="http://www.w3.org/TR/2000/WD-xmlschema-2-20000407/"&gt;XML Schema Part 2: Datatypes&lt;/a&gt; specification. For these data types, commonly the &lt;i&gt;xsd&lt;/i&gt; prefix is used, as in the above example.&lt;br /&gt;&lt;br /&gt;Now, this specification allows restricting the content of the string in many ways. For example, that it defines a year:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;scalar dataType="xsd;year" title="DateOfDiscovery"&gt;1891&amp;lt;/scalar&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;It defines fourteen &lt;b&gt;primitive datatypes&lt;/b&gt;: &lt;i&gt;string, boolean, float, double, decimal, timeDuration, recurringDuration, binary, uriReference, ID, IDREF, ENTITY, NOTATION&lt;/i&gt;, and &lt;i&gt;QName&lt;/i&gt;. Of these, the first five have obvious meaning. The specification also defines a number of &lt;b&gt;derived datatypes&lt;/b&gt;. which include these useful types: &lt;i&gt;language, integer, positiveInteger, negativeInteger, data, month&lt;/i&gt; and &lt;i&gt;year&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;The CML schema also defines a large set of custom data types. For example, it defines an &lt;i&gt;elementTypeType&lt;/i&gt; which derives from the &lt;i&gt;xsd:string&lt;/i&gt; and allows only the one/two/three character element name abbreviations ("C", "N", etc), and &lt;i&gt;Dummy&lt;/i&gt;, &lt;i&gt;Du&lt;/i&gt; and &lt;i&gt;R&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;The use of datatypes in XML Schema's is really powerful, and the CML schema allows to define custom datatypes if needed. But I'll save that for a later time.&lt;br /&gt;&lt;br /&gt;&lt;div style="font-size: 9pt;"&gt;&lt;a title="technorati" href="http://www.technorati.com/search/chem-bla-ics.blogspot.com"&gt;Technorati&lt;/a&gt; tags: &lt;a title="CML" href="http://technorati.com/tag/CML" rel="tag"&gt;CML&lt;/a&gt;  &lt;a title="XML" href="http://technorati.com/tag/XML" rel="tag"&gt;XML&lt;/a&gt;  &lt;a title="Schema" href="http://technorati.com/tag/Schema" rel="tag"&gt;Schema&lt;/a&gt;  &lt;a title="datatypes" href="http://technorati.com/tag/datatypes" rel="tag"&gt;datatypes&lt;/a&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33087454-115727980919800460?l=cmlexplained.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmlexplained.blogspot.com/feeds/115727980919800460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33087454&amp;postID=115727980919800460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/115727980919800460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/115727980919800460'/><link rel='alternate' type='text/html' href='http://cmlexplained.blogspot.com/2006/09/scalar-data-types.html' title='Scalar data types'/><author><name>Egon Willighagen</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JxU9YdY1Zl8/AAAAAAAAAAI/AAAAAAAABM4/GA8mWNfbWhg/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33087454.post-115720467385652358</id><published>2006-09-02T06:41:00.000-07:00</published><updated>2006-09-02T06:44:33.870-07:00</updated><title type='text'>CML blog from the source</title><content type='html'>&lt;a href="http://wwmm.ch.cam.ac.uk/blogs/murrayrust/"&gt;Peter Murray-Rust&lt;/a&gt; started a &lt;a href="http://wwmm.ch.cam.ac.uk/blogs/cml/"&gt;blog on CML&lt;/a&gt; too. I do plan to continue to give small CML tips and comments in this blog.&lt;br /&gt;&lt;br /&gt;&lt;div style="font-size: 9pt;"&gt;&lt;a title="technorati" href="http://www.technorati.com/search/chem-bla-ics.blogspot.com"&gt;Technorati&lt;/a&gt; tags: &lt;a title="CML" href="http://technorati.com/tag/CML" rel="tag"&gt;CML&lt;/a&gt;  &lt;a title="blogging" href="http://technorati.com/tag/blogging" rel="tag"&gt;blogging&lt;/a&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33087454-115720467385652358?l=cmlexplained.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmlexplained.blogspot.com/feeds/115720467385652358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33087454&amp;postID=115720467385652358' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/115720467385652358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/115720467385652358'/><link rel='alternate' type='text/html' href='http://cmlexplained.blogspot.com/2006/09/cml-blog-from-source.html' title='CML blog from the source'/><author><name>Egon Willighagen</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JxU9YdY1Zl8/AAAAAAAAAAI/AAAAAAAABM4/GA8mWNfbWhg/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33087454.post-115614541341424457</id><published>2006-08-21T00:29:00.000-07:00</published><updated>2006-09-03T03:41:32.753-07:00</updated><title type='text'>Crystal structures in Jmol</title><content type='html'>The following CML is indicates how unit cell information can be represented. By using the titles 'a', 'b', 'c', 'alpha', 'beta' and 'gamma', &lt;a href="http://www.jmol.org/"&gt;Jmol&lt;/a&gt; is able to read the unit cell properties:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0"?&gt;&lt;br /&gt;&amp;lt;molecule xmlns="http://www.xml-cml.org/schema"&gt;&lt;br /&gt;  &amp;lt;crystal&gt;&lt;br /&gt;   &amp;lt;scalar title="a"&gt;8.781&amp;lt;/scalar&gt;&lt;br /&gt;   &amp;lt;scalar title="b"&gt;8.845&amp;lt;/scalar&gt;&lt;br /&gt;   &amp;lt;scalar title="c"&gt;10.171&amp;lt;/scalar&gt;&lt;br /&gt;   &amp;lt;scalar title="alpha"&gt;90.00&amp;lt;/scalar&gt;&lt;br /&gt;   &amp;lt;scalar title="beta"&gt;101.34&amp;lt;/scalar&gt;&lt;br /&gt;   &amp;lt;scalar title="gamma"&gt;90.00&amp;lt;/scalar&gt;&lt;br /&gt;  &amp;lt;/crystal&gt;&lt;br /&gt;  &amp;lt;atomArray&gt;&lt;br /&gt;    &amp;lt;atom id="Fe1" xFract="1.0" yFract="0.0" zFract="1.0" elementType="Fe"/&gt;&lt;br /&gt;    &amp;lt;atom id="N1" xFract="0.7619" yFract="0.0548" zFract="0.9299" elementType="N"/&gt;&lt;br /&gt;  &amp;lt;/atomArray&gt;&lt;br /&gt;&amp;lt;/molecule&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;However, if you want to make to of the full power of CML, you would not use the @title attributes on the &amp;lt;crystal&gt;'s &amp;lt;scalar&gt; elements, but use @dictRef instead. Dictionary references allow to make the semantics complete: it would explicitely &lt;i&gt;say&lt;/i&gt; what you mean with 'a', or 'beta'. The CML project has setup a simple CML dictionary (namespaced: &lt;i&gt;http://www.xml-cml.org/dict/cmlDict&lt;/i&gt;) which contains the concepts for these six unit cell properties. The example then becomes:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0"?&gt;&lt;br /&gt;&amp;lt;molecule xmlns="http://www.xml-cml.org/schema"&gt;&lt;br /&gt;  &amp;lt;crystal xmlns:cmldict="http://www.xml-cml.org/dict/cmlDict"&gt;&lt;br /&gt;   &amp;lt;scalar dictRef="cmldict:a"&gt;8.781&amp;lt;/scalar&gt;&lt;br /&gt;   &amp;lt;scalar dictRef="cmldict:b"&gt;8.845&amp;lt;/scalar&gt;&lt;br /&gt;   &amp;lt;scalar dictRef="cmldict:c"&gt;10.171&amp;lt;/scalar&gt;&lt;br /&gt;   &amp;lt;scalar dictRef="cmldict:alpha"&gt;90.00&amp;lt;/scalar&gt;&lt;br /&gt;   &amp;lt;scalar dictRef="cmldict:beta"&gt;101.34&amp;lt;/scalar&gt;&lt;br /&gt;   &amp;lt;scalar dictRef="cmldict:gamma"&gt;90.00&amp;lt;/scalar&gt;&lt;br /&gt;  &amp;lt;/crystal&gt;&lt;br /&gt;  &amp;lt;atomArray&gt;&lt;br /&gt;    &amp;lt;atom id="Fe1" xFract="1.0" yFract="0.0" zFract="1.0" elementType="Fe"/&gt;&lt;br /&gt;    &amp;lt;atom id="N1" xFract="0.7619" yFract="0.0548" zFract="0.9299" elementType="N"/&gt;&lt;br /&gt;  &amp;lt;/atomArray&gt;&lt;br /&gt;&amp;lt;/molecule&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Jmol currently does not recognize, and thus ignore, this dictionary (bug &lt;a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1543784&amp;group_id=23629&amp;amp;atid=379133"&gt;#1543784&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;&lt;div style="font-size: 9pt;"&gt;&lt;a title="technorati" href="http://www.technorati.com/search/chem-bla-ics.blogspot.com"&gt;Technorati&lt;/a&gt; tags: &lt;a title="XML" href="http://technorati.com/tag/XML" rel="tag"&gt;XML&lt;/a&gt;  &lt;a title="CML" href="http://technorati.com/tag/CML" rel="tag"&gt;CML&lt;/a&gt;  &lt;a title="Jmol" href="http://technorati.com/tag/Jmol" rel="tag"&gt;Jmol&lt;/a&gt;  &lt;a title="crystallography" href="http://technorati.com/tag/crystallography" rel="tag"&gt;crystallography&lt;/a&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33087454-115614541341424457?l=cmlexplained.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmlexplained.blogspot.com/feeds/115614541341424457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33087454&amp;postID=115614541341424457' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/115614541341424457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/115614541341424457'/><link rel='alternate' type='text/html' href='http://cmlexplained.blogspot.com/2006/08/crystal-structures-in-jmol.html' title='Crystal structures in Jmol'/><author><name>Egon Willighagen</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JxU9YdY1Zl8/AAAAAAAAAAI/AAAAAAAABM4/GA8mWNfbWhg/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33087454.post-115614209823777959</id><published>2006-08-20T23:32:00.000-07:00</published><updated>2006-08-20T23:35:39.083-07:00</updated><title type='text'>CML Explained</title><content type='html'>There seems to be a niche in explaining the use of &lt;a href="http://www.xml-cml.org/"&gt;Chemical Markup Language&lt;/a&gt;, so here goes. This blog will discuss frequently and less frequently asked questions.&lt;br /&gt;&lt;br /&gt;&lt;div style="font-size: 9pt;"&gt;&lt;a title="technorati" href="http://www.technorati.com/search/chem-bla-ics.blogspot.com"&gt;Technorati&lt;/a&gt; tags: &lt;a title="chemistry" href="http://technorati.com/tag/chemistry" rel="tag"&gt;chemistry&lt;/a&gt;  &lt;a title="CML" href="http://technorati.com/tag/CML" rel="tag"&gt;CML&lt;/a&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33087454-115614209823777959?l=cmlexplained.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmlexplained.blogspot.com/feeds/115614209823777959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33087454&amp;postID=115614209823777959' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/115614209823777959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33087454/posts/default/115614209823777959'/><link rel='alternate' type='text/html' href='http://cmlexplained.blogspot.com/2006/08/cml-explained.html' title='CML Explained'/><author><name>Egon Willighagen</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JxU9YdY1Zl8/AAAAAAAAAAI/AAAAAAAABM4/GA8mWNfbWhg/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
