MCPcopy Index your code
hub / github.com/cdk/cdk

github.com/cdk/cdk @cdk-2.12

Chat with this repo
repository ↗ · DeepWiki ↗ · release cdk-2.12 ↗ · + Follow
30,855 symbols 178,882 edges 2,565 files 15,364 documented · 50%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Maven Central Version build Bugs

The Chemistry Development Kit (CDK)

Copyright © 1997-2025 The CDK Development Team

License: LGPL v2, see LICENSE.txt

Home Page | JavaDoc | Wiki | Issues | Mailing List

Introduction

The CDK is an open-source Java library for cheminformatics and bioinformatics.

Key Features: * Molecule and reaction valence bond representation. * Read and write file formats: SMILES, SDF, InChI, Mol2, CML, and others. * Efficient molecule processing algorithms: Ring Finding, Kekulisation, Aromaticity. * Coordinate generation and rendering. * Canonical identifiers for fast exact searching. * Substructure and SMARTS pattern searching. * ECFP, Daylight, MACCS, and other fingerprint methods for similarity searching. * QSAR descriptor calculations

Install

The CDK is a class library intended to be used by other programs, it will not run as a stand-alone program.

The library is built with Apache Maven and currently requires Java 1.7 or later. From the root of the project run to build the JAR files for each module. The bundle/target/ directory contains the main JAR with all dependencies included:

$ mvn install

You can also download a pre-built library JAR from releases.

Include the main JAR on the Java classpath when compiling and running your code:

$ javac -cp cdk-2.11.jar MyClass.java
$ java -cp cdk-2.11.jar:. MyClass

If you are using Maven, you can use the uber cdk-bundle to grab everything, note it is much more efficient to use include the modules you need:

<dependency>
  <artifactId>cdk-bundle</artifactId>
  <groupId>org.openscience.cdk</groupId>
  <version>2.11</version>
</dependency>

If you are a Python user, the Cinfony project provides access via Jython. Noel O'Boyle's Cinfony provides a wrapper around the CDK and over toolkits exposing core functionality as a consistent API. ScyJava can also be used, as explain in ChemPyFormatics.

Further details on building the project in integrated development environments (IDEs) are available on the wiki: * Building the CDK * Maven Reporting Plugins

Getting Help

The Toolkit-Rosetta Wiki Page provides some examples for common tasks. If you need help using the CDK and have questions please use the user mailing list, cdk-user@lists.sf.net (you must subscribe here first to post).

Extension points exported contracts — how you extend this code

IGenerator (Interface)
An IGenerator converts chemical entities into parts of the chemical drawing expressed as {@link IRenderingElemen [20 implementers]
display/render/src/main/java/org/openscience/cdk/renderer/generators/IGenerator.java
AtomMatcher (Interface)
Interface for the AtomMatcher (atoms) in graph. @author Syed Asad Rahman &lt;asad@ebi.ac.uk&gt; @deprecated This class i [145 …
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/matchers/AtomMatcher.java
ISubstanceDescriptor (Interface)
Classes that implement this interface are QSAR substance calculators. [58 implementers]
descriptor/qsarsubstance/src/main/java/org/openscience/cdk/qsar/descriptors/substance/ISubstanceDescriptor.java
ISequenceSubRule (Interface)
Sequence sub rule used in the CIP method to decide which of the two ligands takes precedence {@cdk.cite Cahn1966}. A lis [65 …
descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/rules/ISequenceSubRule.java
IAtomicDescriptor (Interface)
Classes that implement this interface are QSAR descriptor calculators. [128 implementers]
descriptor/qsar/src/main/java/org/openscience/cdk/qsar/IAtomicDescriptor.java
ICDKSelectionChangeListener (Interface)
A ChangeListener for the CDK, to be independent from the Swing package. [29 implementers]
base/standard/src/main/java/org/openscience/cdk/event/ICDKSelectionChangeListener.java
IFingerprinter (Interface)
Interface for fingerprint calculators. @author egonw @cdk.keyword fingerprint [14 implementers]
base/core/src/main/java/org/openscience/cdk/fingerprint/IFingerprinter.java
IAtomTypeTest (Interface)
Interface for org.openscience.cdk.atomtype.IAtomTypeMatcher unit tests. It provides various methods to allow suc [6 implementers]
base/test/src/test/java/org/openscience/cdk/test/atomtype/IAtomTypeTest.java

Core symbols most depended-on inside this repo

newInstance
called by 9283
base/interfaces/src/main/java/org/openscience/cdk/interfaces/IChemObjectBuilder.java
addAtom
called by 8368
base/interfaces/src/main/java/org/openscience/cdk/interfaces/IAtomContainer.java
addBond
called by 7299
base/interfaces/src/main/java/org/openscience/cdk/interfaces/IAtomContainer.java
getAtom
called by 4561
base/interfaces/src/main/java/org/openscience/cdk/interfaces/IAtomContainer.java
getBuilder
called by 3861
base/interfaces/src/main/java/org/openscience/cdk/interfaces/ICDKObject.java
get
called by 3834
base/core/src/main/java/org/openscience/cdk/fingerprint/IBitFingerprint.java
is
called by 3533
base/interfaces/src/main/java/org/openscience/cdk/interfaces/IChemObject.java
debug
called by 2759
base/interfaces/src/main/java/org/openscience/cdk/tools/ILoggingTool.java

Shape

Method 27,872
Class 2,745
Interface 154
Enum 84

Languages

Java100%

Modules by API surface

base/test-core/src/test/java/org/openscience/cdk/atomtype/CDKAtomTypeMatcherTest.java326 symbols
tool/smarts/src/test/java/org/openscience/cdk/smarts/ParserTest.java289 symbols
legacy/src/test/java/org/openscience/cdk/smiles/smarts/parser/ParserTest.java276 symbols
legacy/src/test/java/org/openscience/cdk/smiles/smarts/parser/SmartsQueryVisitorTest.java246 symbols
legacy/src/test/java/org/openscience/cdk/smiles/smarts/parser/SMARTSSearchTest.java230 symbols
storage/smiles/src/test/java/org/openscience/cdk/smiles/SmilesParserTest.java199 symbols
tool/structgen/src/main/java/org/openscience/cdk/structgen/maygen/Maygen.java179 symbols
base/silent/src/main/java/org/openscience/cdk/silent/AtomContainer.java174 symbols
base/data/src/main/java/org/openscience/cdk/AtomContainer.java174 symbols
base/test/src/test/java/org/openscience/cdk/test/interfaces/AbstractAtomContainerTest.java154 symbols
tool/smarts/src/test/java/org/openscience/cdk/smirks/SmirksTest.java147 symbols
base/isomorphism/src/test/java/org/openscience/cdk/isomorphism/ExprTest.java144 symbols

For agents

$ claude mcp add cdk \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact