CML
Code name: cml
Marvin is capable of importing and exporting files in the Chemical Markup
Language. Special atom types are lost during export.
Import. The following tags are recognized:
- <molecule>
Standard (CML2) attributes:
Children:
- <atomArray>
Standard (CML2) array attributes:
- atomID, elementType,
x2, y2,
x3, y3, z3,
formalCharge, isotope
Nonstandard (Marvin only) array attributes:
- residueType, residueId - residue type/ID value or
zero
- residueAtomName - PDB atom name or zero.
- radical - Radical center value or zero.
- reactionStereo - Reaction stereo value or zero.
- rgroupRef - R-group reference value or zero.
- sgroupRef - S-group reference value or zero.
- attachmentPoint - R-group attachment point value or zero.
- mrvQueryProps - Query atom properties or zero.
- mrvStereoGroup, mrvMap
Children:
- <atom>
Standard CML2 attributes:
- id, elementType,
x2, y2,
x3, y3, z3,
formalCharge, isotope
Nonstandard (Marvin only) attributes:
- residueType, residueId - They were present in
CML1 but removed later.
- residueAtomName - PDB atom name.
- radical - Radical center:
"monovalent" (doublet), "divalent",
"divalent1" (singlet), "divalent3"
(triplet) or "trivalent".
- reactionStereo - Reaction stereo:
"Inv" (inversion) or "Ret" (retention).
- rgroupRef - R-group reference. Currently, only
positive integer values are accepted.
- sgroupRef - S-group reference.
- attachmentPoint - R-group attachment point:
"1", (on first site) "2" (on second site)
or "both" (on both sites).
- mrvQueryProps - Query atom properties.
Format: [atom Type:][SMARTS properties], where
atom type can be "A" (any atom), "Q"
(heteroatom),
"L,element1,..." (inclusive atom list) or
"L!element1!..." (exclusive atom list).
SMARTS properties is a semicolon separated list. An
element of the list starts with character `H', `X',
`v', `R', `r' or `a', the following characters are digits
representing an integer value.
Examples: "A:" (any atom), "L!O!S:H1,R1"
(atom is not oxygene, not sulfur, 1 hydrogen is connected to it
and it is inside a ring).
- mrvStereoGroup, mrvMap
An <atom> tag is recognized at import even if the atomArray
container is not present.
- <bondArray>
- <bond atomRefs2="a1 a2" order="order" >
The atom references a1 and a2 must be valid atom ids.
The order value can be "1", "S"
(single), "2", "D" (double), "3",
"T" (triple) or "A" (aromatic).
Non-standard (Marvin only) attributes:
- queryType - Query bond type: "SD"
(single or double), "SA" (single or aromatic),
"DA" (double or aromatic) or "Any".
Children:
- <bondStereo>value</bondStereo>
- Value can be "W" (wedge - up),
"H" (hatch - down),
"C" (cis) or "T" (trans)
- <bondStereo convention="convention" conventionValue="value" />
convention | conventionValue | meaning |
MDL | 1 | up |
MDL | 6 | down |
MDL | 4 | either |
MDL | 3 | cis or trans |
ChemAxon | CTUnspec | cis/trans or unspecified |
A <bond> tag is recognized at import even if the bondArray
container is not present.
- <molecule id="sg1" role="SuperatomSgroup">
- contracted Superatom S-group
- <atomArray>
- <atom>
- <bondArray>
- <bond>
- <molecule id="sg2" role="SuperatomSgroup" />
- expanded Superatom S-group
- <molecule id="sg3" role="MultipleSgroup" atomRefs="a1 a2 ... "/>
- Multiple S-group
- <propertyList>
- <property dictRef="name">
- Molecule property. It is recognized at import even if the
propertyList container is not present.
- <reaction>
- <reactantList>
- <agentList> - Marvin extension
- <productList>
Export options and defaults.
The argument of MolConverter and the getMol
/getM
functions
(of the applets and beans) is the format string. The format specification
("cml") and the option(s) are separated by a colon in the format
string. CML export currently only has one option which affects the compactness
of the storage.
"cml" (default): |
Atoms are stored in <atom> tags, with the
specification of three coordinates (x, y, z) and the element type. |
"cml:A" (array option):
|
Atom attributes are stored in arrays instead of atom tags.
For 2D molecules, only the x, y coordinates are stored.
This is a more compact form of storage.
|
"cml:a" or "cml:+a":
|
Aromatize. |
"cml:-a": |
Dearomatize. |
cml
<?xml version="1.0"?>
<molecule title="ethane">
<atomArray>
<atom id="a1" elementType="C"
x2="0.0" y2="0.0"
x3="0.0" y3="0.0" z3="0.0" />
<atom id="a2" elementType="C"
x2="0.0" y2="1.54"
x3="0.0" y3="1.54" z3="0.0" />
</atomArray>
<bondArray>
<bond atomRefs2="a1 a2" order="1" />
</bondArray>
</molecule>
CML in other programs:
- JChemPaint (last version tested: 1.9.8) and Marvin imports each
other's CML files.
- Jmol 8 imports CML files exported by Marvin that contain 3D
structures.
Jmol is a 3D viewer that does not import bonds but calculates them from
atomic distances. This means that bonds are not imported correctly if
the molecule is 2D.
References