Difference between revisions of "CML React"

From Open Babel
Jump to: navigation, search
Line 1: Line 1:

Latest revision as of 04:10, 12 October 2007

Filename Extensions cmlr
Chemical MIME Type Undefined
Specification URL Unknown
Import Yes
Export Yes
Open Babel Version 2.0.0 and later


 Minimal implementation
 This implementation uses libxml2.
 Write options (e.g. -x1ac)
 1  output CML V1.0  or 
 2  output CML V2.0 (default)
 a  output array format for atoms and bonds
 l  molecules in list
 h  use hydrogenCount for all hydrogens
 x  omit XML declaration
 N<prefix> add namespace prefix to elements

Additional Comments

The implementation of this format which reads and writes to and from OBReaction objects is fairly minimal at present. (Currently the only other reaction format in OpenBabel is RXN.) During reading, only the elements <reaction>, <reactant>, <product> and <molecule> are acted upon (the last through CML). The molecules can be collected together in a list at the start of the file and referenced in the reactant and product via e.g. <molecule ref="mol1">.

On writing, the list format can be specified with the -xl option. The list containers are <moleculeList> and <reactionList> and the overall wrapper is <mechanism>. These are non-standard CMLReact element names and would have to be changed (in the code) to <list>,<list> and <cml> if this was unacceptable.