Page tree

Export options

The argument of MolConverter, MolExporter and the getMol/getM functions (of the applets and beans) is the format string. The format specification ("cml") is followed by ":" and the selected option(s) for CML export.

CodeNameExplanation
a, +a, +a_gen
General aromatization.
a_bas
Basic aromatization.
a_loose 
Loose aromatization.
a_ambig
Ambiguous aromatization.
-a, -a_gen
General Dearomatization.
-a_huckel
Huckel dearomatization.
-a_huckel_ex
Huckel dearomatization, throwing exception in case of failure.
H, +H
Add explicit Hydrogen atoms.
-H
Remove explicit Hydrogen atoms.
A      

Atom attributes are stored in arrays. For 2D molecules, only the x, y coordinates are stored. This is a more compact form of storage than the default (using <atom> tags).

P

Create human readable output: put new XML elements in new lines and indent for embedded elements.

CN

The accuracy of the exported coordinates can be given: N is the length of the decimals of the coordinate, 0 < N ≤ 9

D

This option is important if the molecule has parity information and has 0 dimension. By default during the export, a clean method is invoked on the structure and the generated coordinates and wedge information are exported into CML format but NOT the parity information. However, using this option coordinates and wedge information are not generated but parity information is exported.
Attention: When a CML file containing parity information is imported to Marvin older than 5.8, the parity information will be displayed wrong!

I

Ignore unexportable molecule properties. Without this option the exporter will throw an exception when reach an unexportable property.

BOM

Write the UTF-8 byte order mark (BOM), if the given or the system's encoding is UTF-8.

For example: cml:A or cml:C5.


Example of CML file exported without options:

<?xml version="1.0"?><cml xmlns="http://www.xml-cml.org/schema" xmlns:convention="http://www.xml-cml.org/convention" convention="convention:molecular" xmlns:marvin="http://www.chemaxon.com/marvin/marvinDictRef">
<molecule title="Ethane" id="m1"><atomArray><atom id="a1" elementType="C" x2="0.0" y2="0.0"></atom><atom id="a2" elementType="C" x2="0.0" y2="1.54"></atom></atomArray><bondArray><bond atomRefs2="a1 a2" order="1"></bond></bondArray></molecule>
</cml>

Example of CML file exported with option "A":

<?xml version="1.0"?><cml xmlns="http://www.xml-cml.org/schema" xmlns:convention="http://www.xml-cml.org/convention" convention="convention:molecular" xmlns:marvin="http://www.chemaxon.com/marvin/marvinDictRef">
<molecule title="Ethane" id="m1"><atomArray atomID="a1 a2" elementType="C C" x2="0.0 0.0" y2="0.0 1.54"></atomArray><bondArray><bond atomRefs2="a1 a2" order="1"></bond></bondArray></molecule>
</cml>

Example of CML file exported with option "P":

<?xml version="1.0"?>
<cml xmlns="http://www.xml-cml.org/schema" xmlns:convention="http://www.xml-cml.org/convention" convention="convention:molecular" xmlns:marvin="http://www.chemaxon.com/marvin/marvinDictRef">
<molecule title="Ethane" id="m1">
  <atomArray>
    <atom id="a1" elementType="C" x2="0.0" y2="0.0"/>
    <atom id="a2" elementType="C" x2="0.0" y2="1.54"/>
  </atomArray>
  <bondArray>
    <bond atomRefs2="a1 a2" order="1"/>
  </bondArray>
</molecule>
</cml>

Example of CML file exported with options "AP":

<?xml version="1.0"?>
<cml xmlns="http://www.xml-cml.org/schema" xmlns:convention="http://www.xml-cml.org/convention" convention="convention:molecular" xmlns:marvin="http://www.chemaxon.com/marvin/marvinDictRef">
<molecule title="Ethane" id="m1">
  <atomArray atomID="a1 a2" elementType="C C" x2="0.0 0.0" y2="0.0 1.54"/>
  <bondArray>
    <bond atomRefs2="a1 a2" order="1"/>
  </bondArray>
</molecule>
</cml>