Breaking Changes
- AtomTypeAwareSaturationChecker has been moved to the cdk-legacy module. This was replaced many years ago with the faster and much more comprehensive Kekluization.
New Features and APIs
Hydrogen normalisation
A new API has been added to simplify hydrogen representation normalisation. In the past we had the ability to suppress all hydrogens, make them all explicit or remove all non-chiral hydrogens. We now have a single function which does all of this, the caller specifies what you want and it will add/remove hydrogens as needed keeping all internal state correct and in sync.
IChemObjectBuilder bldr = SilentChemObjectBuilder.getInstance();
SmilesParser smipar = new SmilesParser(bldr);
SmilesGenerator smigen = new SmilesGenerator(SmiFlavor.Default);
IAtomContainer mol = smipar.parseSmiles("C1[C@@H]2CCC(C[C@H](O)C)C[C@@H]2C(C1)[2H]");
AtomContainerManipulator.normalizeHydrogens(mol, HydrogenState.Depiction);
System.err.println(smigen.create(mol) + " Depiction");
AtomContainerManipulator.normalizeHydrogens(mol, HydrogenState.Stereo);
System.err.println(smigen.create(mol) + " Stereo");
AtomContainerManipulator.normalizeHydrogens(mol, HydrogenState.Minimal);
System.err.println(smigen.create(mol) + " Minimal");
AtomContainerManipulator.normalizeHydrogens(mol, HydrogenState.Unsafe);
System.err.println(smigen.create(mol) + " Minimal (unsafe)");Result:
C1[C@@]2(CCC(C[C@H](O)C)C[C@@]2(C(C1)[2H])[H])[H] Depiction
C1[C@@]2(CCC(C[C@](O)(C)[H])C[C@@]2(C(C1)[2H])[H])[H] Stereo
C1[C@@H]2CCC(C[C@H](O)C)C[C@@H]2C(C1)[2H] Minimal
C1[C@@H]2CCC(C[C@H](O)C)C[C@@H]2CC1 Minimal (unsafe)
Markush / RGroup support
We already had some basic support for R Group Query files but this was not tied in nicely to the main toolkit. This release adds the ability to work with these files easier as well as support in CXSMILES. It is now possible to load a CXSMILES with R groups and depict it correctly.
IChemObjectBuilder bldr = SilentChemObjectBuilder.getInstance();
SmilesParser smipar = new SmilesParser(bldr);
IAtomContainer mol = smipar.parseSmiles("C1CNCC(*)C1 |$;;;;;R1$,LN:0:1.3,RG:_R1={OC},{Cl},{C#N}|");
new DepictionGenerator().depict(mol).writeTo("/tmp/tmp.svg");
Note: the link node is now also parsed and stored.
Variable Attachment Matching
Added support for matching variable attachments specified via CXSMARTS.
n1ccccc1.*Cl.*Br |m:6:0.1.2.3.4.5,8:0.1.2.3.4.5|
Atropisomers (via RDKit extension)
We have supported atropisomers for some time but only via 2D coordinates with layouts and CIP naming etc working as expected. RDKit has an extension to allow loading from CXSMILES - although it is not perfect I was at a loss to think of something better and so it makes sense to support it. Currently this is read-only and mainly intended for depiction.
C=CC(=O)N1CCN(c2nc(=O)n(-c3c(C)ccnc3C(C)C)c3nc(-c4c(O)cccc4F)c(F)cc23)[C@@H](C)C1 |wU:12.23| (m)-sotorasib
API to set wedge bonds
A new API has been added to allow setting of wedge bonds to a structure where the coordinates are already known. Note: This function is called automatically when a layout is generated.
StructureDiagramGenerator sdg = new StructureDiagramGenerator();
sdg.generateWedges(mol);Sugar Detection Utility
See #1225
If you want to see the SugarDetectionUtility in action, check out our MOlecule fRagmenTAtion fRamework (MORTAR) application, the SDU will be part of the next release.
What's Changed
- Merged test-extra into extra and more by @egonw in #1180
- Ported cdk.core test classes to the module being tested by @egonw in #1179
- If any bond is hidden in the ring, it should not be filled. by @johnmay in #1181
- Fix #1174. We need better logic when the ring closures are near exten… by @johnmay in #1182
- FIx #1183 InChITautomerGenerator on AtomContainer2 by @johnmay in #1184
- Ensure MDLV3000 stereo 0d works correctly. by @johnmay in #1187
- We need a static variable to be able to use it from a static context. by @johnmay in #1186
- Fix some corner cases in reading of stereochemistry from chair projec… by @johnmay in #1192
- Remove some redundant exceptions. by @johnmay in #1194
- Allow the ExtendedFingerprinter to setHashExplicitHydrogens by @johnmay in #1196
- Fix some issues highlighted by SonarCloud by @johnmay in #1200
- Fixes/smirks 9jul by @johnmay in #1201
- Patch/beam central by @johnmay in #1202
- fix atom property cleanup in DepictionGenerator by @uli-f in #1203
- update maven-compiler-plugin configuration to use instead of
and by @uli-f in #1205 - Depedency updated 2025-07-25 by @egonw in #1204
- dependency updates 08-Aug-2025, use instead of
and by @uli-f in #1209 - Moved more tests from test-standard to standard by @egonw in #1207
- ConjugatedPiSystemsDetector allene handling fix by @JonasSchaub in #1211
- RDKit atropisomers by @johnmay in #1212
- Allow annotation of bond numbers, this was useful for debugging the a… by @johnmay in #1213
- Add InChI AuxInfo to structure functionality; by @fbaensch-beilstein in #1208
- fix issue with empty annotation in depiction by @uli-f in #1214
- Tweaks for jchempaint by @johnmay in #1215
- Depict background size by @johnmay in #1216
- Depict background by @johnmay in #1217
- LargestPiSystemDescriptor visited flags and minor code improvements by @JonasSchaub in #1218
- Fix a corner case with titles for reactions not being set if no CXSMI… by @johnmay in #1219
- Clean up IBond.Stereo and IBond.Display by @johnmay in #1220
- Improved stereochemistry invalidation when modifying molecules (Fixes… by @johnmay in #1222
- Rgroup Improvements by @johnmay in #1223
- Sugar Detection Utility by @JonasSchaub in #1225
- Test cleanup by @johnmay in #1228
- Additional test simplification/dreprecation by @johnmay in #1229
- Move around some XML config files. by @johnmay in #1230
- Simplify the SybylAtomTypeMatcherTest. by @johnmay in #1231
- Handle Link Nodes in CXSMILES (Ring flags now set when reading from SMILES) by @johnmay in #1232
- Make SmallRingDescriptor, WienerNumbersDescriptor, and ALogPDescriptor parallelisable by @JonasSchaub in #1234
- Move the InChI Readers to cdk-inchi module. by @johnmay in #1235
- Add JDK-25 to CI by @mjw99 in #1237
- swap carrier order in DoubleBondStereochemistry::create to satisfy bond alignment constraint by @uli-f in #1226
- use thread safe collection in RoundRobinFormulaGenerator by @SteffenHeu in #1239
- Exhaustive fragmenter fix and improvements by @ToLeWeiss in #1238
- Varattach matching by @johnmay in #1243
- Updated dependencies: maven plugins and library deps by @egonw in #1242
- Some tweaks to abbreviations - based on feedback from https://github.… by @johnmay in #1247
- Add support for loading selection/highlight from CXSMILES and MDL Mol… by @johnmay in #1246
- Add a method to the SDG which allows wedges to be assigned to a struc… by @johnmay in #1249
- adopt and by @egonw in #1250
- CMLXOM 4.15 and Log4j 2.25.3 by @egonw in #1252
- Fix a null pointer exception in MDLV2000Reader by @Mailaender in #1254
- Misc tweaks for Markush rendering. by @johnmay in #1257
- Update the connectivity checker to either respect/ignore (default) va… by @johnmay in #1258
- two more dependency updates (compatible with java 8) by @egonw in #1259
- CDK RGroups by @johnmay in #1260
- Hydrogen Normalization by @johnmay in #1188
- Mar 2026 fixes by @johnmay in #1261
- Downgrade to warning: unnatural elements do not have major isotopes by @egonw in #1265
- Sonarcloud fixes by @johnmay in #1264
- Fixes #1255 - Add in B3_Minus as a valid aromatic atom type. by @johnmay in #1267
- Fixes #1035 - rather than avoid using templates when we have DB stere… by @johnmay in #1266
- Fix an issue with '>' appearing in the titles and messing up SMILES p… by @johnmay in #1269
- Fixes #953 - Tweak the expression handling logic of the QueryAtomCont… by @johnmay in #1268
- Improve ionic bond depictions - fixes https://github.com/cdk/depict/i… by @johnmay in #1270
New Contributors
- @fbaensch-beilstein made their first contribution in #1208
- @SteffenHeu made their first contribution in #1239
- @ToLeWeiss made their first contribution in #1238
Full Changelog: cdk-2.11...cdk-2.12




