Difference between revisions of "CML React"

From Open Babel
Jump to: navigation, search
 
Line 23: Line 23:
 
format in OpenBabel is [[RXN]].)  During reading, only the elements  
 
format in OpenBabel is [[RXN]].)  During reading, only the elements  
 
<reaction>, <reactant>, <product> and <molecule> are acted upon (the last
 
<reaction>, <reactant>, <product> and <molecule> are acted upon (the last
through [[CML]]). The molecules can be collected together in
+
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.  
a list at
+
the start of the file and referenced in the reactant and product via e.g.  
+
 
<molecule ref="mol1">.
 
<molecule ref="mol1">.
  

Revision as of 16:37, 26 January 2006

Filename Extensions cmlr
Chemical MIME Type Undefined
Specification URL Unknown
Import {{{import}}}
Export {{{export}}}
Open Babel Version {{{version}}}

Options

 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.