CDXML (.cdxml)
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 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
Import Elements
- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements
Examples
open allclose allBasic Examples (3)
Export Options (1)
IncludeHydrogens (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:
To include all atoms in the output file, use IncludeHydrogensTrue:
Be aware that when all atoms are laid out, the structure may not look correct unless all hydrogens are shown when plotted:
Use the PlotTheme option for MoleculePlot to show all atoms: