- Import and Export support the CDXML file format.
- See the following reference pages for full general information:
|Import, Export||import from or export to a file|
|CloudImport, CloudExport||import from or export to a cloud object|
|ImportString, ExportString||import from or export to a string|
|ImportByteArray, ExportByteArray||import from or export to a byte array|
Background & Context
- MIME type: chemical/x-cdxmlXML version of the ChemDraw Exchange format, CDX.
- Represents an arbitrary number of chemical compounds.
- XML format.
- Stores atomic coordinates, chemical bond information and metadata.
Import & Export
- Import["file.cdxml"] imports a CDXML file as a molecule.
- Export["file",mol] exports a molecule to a CDXML file.
- Two-dimensional coordinates from the CDXML file are stored in the molecule in the AtomDiagramCoordinates option value.
- Use mol["AtomDiagramCoordinates"] to retrieve the coordinates from the imported molecule mol.
- See the reference pages for full general information on Import.
- ImportString and ExportString support the CDXML format.
Examplesopen allclose all
Basic Examples (3)
Export Options (1)
With the default setting of IncludeHydrogensAutomatic, hydrogen atoms attached to carbon atoms are treated as implicit and not exported to the file. For octanol, only the hydrogen attached directly to the oxygen atom is included explicitly: