CML HDF5

From wiki.openchemistry.org
Jump to navigation Jump to search

This page contains a proposal for an extension to CML which would enable the storage of heavy-data (e.g. coordinate sets) in external HDF5 files.

Example

The following shows a CML file containing an ethanol molecule with its 3D coordinates stored in an external HDF5 file:

<?xml version="1.0"?>
<molecule xmlns="http://www.xml-cml.org/schema/cml2/core" id="CS_ethanol">
  <externalFile format="hdf5" file="ethanol.h5"/>
  <externalData type="coords3" format="hdf5" arrayName="Coordinates"/>
  <formula concise=" C 2 H 6 O 1 "/>
  <name convention="IUPAC">Ethanol</name>
  <atomArray>
   <atom id="a1" elementType="H"/>
   <atom id="a2" elementType="C"/>
   <atom id="a3" elementType="H"/>
   <atom id="a4" elementType="H"/>
   <atom id="a5" elementType="C"/>
   <atom id="a6" elementType="H"/>
   <atom id="a7" elementType="H"/>
   <atom id="a8" elementType="O"/>
   <atom id="a9" elementType="H"/>
  </atomArray>
  <bondArray>
    <bond atomRefs2="a1 a2" order="1"/>
    <bond atomRefs2="a2 a3" order="1"/>
    <bond atomRefs2="a2 a4" order="1"/>
    <bond atomRefs2="a2 a5" order="1"/>
    <bond atomRefs2="a5 a6" order="1"/>
    <bond atomRefs2="a5 a7" order="1"/>
    <bond atomRefs2="a5 a8" order="1"/>
    <bond atomRefs2="a8 a9" order="1"/>
  </bondArray>
</molecule>