rdkit-chemdraw-cdxml
Installation
SKILL.md
RDKit ChemDraw / CDXML Toolkit
Overview
CDXML is an XML serialization of ChemDraw's object tree (CDX is its binary form). RDKit 2022.09+ exposes an optional Revvity ChemDraw parser at rdkit.Chem.rdChemDraw that reads molecules and reactions and writes molecule structures. RDKit cannot write arrows, plus signs, schemes, or text — those are built or edited at the XML level. This skill covers the full read → depict → annotate → write → modify → render loop.
Output contract
A .cdxml is not viewable without ChemDraw, and you cannot run ChemDraw here — so the rendered PNG is the only evidence the file is correct. Therefore:
- Deliver
<name>.cdxmland<name>.pngtogether, matching basenames — never the CDXML alone.build_scheme()and Module 9 write both; the helper raises if the PNG cannot be produced. - Validate before delivering with
scripts/check_scheme.py(rebuilds each molecule from the drawing, sanitizes, checks mass balance across arrows, and critiques layout). Drive it to zero problems. - Report honestly: "opens correctly in ChemDraw" is never something you tested; stereochemistry is not drawn unless you added it. Offer a plain SMILES list of intermediates for schemes with more than three structures.