Difference between revisions of "CML React"
|(4 intermediate revisions by 3 users not shown)|
|Line 3:||Line 3:|
Latest revision as of 05:10, 12 October 2007
|Chemical MIME Type||Undefined|
|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
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.