Files
rdkit/External/INCHI-API
Yakov Pechersky 87a6c7163d Use index-order kekulization in MolToInchi (#9226)
MolToInchi has called MolOps::Kekulize(*m, false) for years, but PR #9125 changed the default traversal to canonical=true. That pulls rankFragmentAtoms() and the canonicalization path into the InChI conversion even though the tested InChI outputs stay the same.

Validation:
- rdkit.Chem.UnitTestInchi passed before and after this change on upstream/master (18 tests, OK in both runs).
- No InChI output drift was observed between stock and patched builds on Regress/Data/mols.1000.sdf.gz, rdkit/Chem/test_data/pubchem-hard-set.sdf.gz, or the atom-order regression molecules added in Code/GraphMol/catch_graphmol.cpp.

Performance:
- Release_2026_03_1 Python MolToInchi on Regress/Data/mols.1000.sdf.gz improved from 0.40712s to 0.38871s median (-4.52%).
- Release_2026_03_1 rdinchi MolToInchi on the same dataset improved from 0.39755s to 0.37814s median (-4.88%).
- Release_2026_03_1 standalone C++ MolToInchi on /tmp/mols.1000.sdf improved from 7.66775s to 7.03474s wall time (-8.26%), from 20.57B to 19.04B cycles (-7.46%), and from 121.78M to 114.05M cache misses (-6.35%).
2026-04-07 06:17:40 +02:00
..
2014-08-14 05:38:17 +02:00
2025-05-11 05:10:18 +02:00
2025-05-11 05:10:18 +02:00

To build the optional InChI support, run cmake with the
-DRDK_BUILD_INCHI_SUPPORT=ON argument. If InChI sources could not be
found, the CMake build system will attempt to download the InChI
distribution from the following URL:

http://www.inchi-trust.org/wp/wp-content/uploads/2014/06/INCHI-1-API.zip

The default download URL and MD5 checksum can be overridden with the
following CMake definitions:

INCHI_URL
INCHI_MD5SUM

If INCHI_URL is set to "", no download will be attempted.
If INCHI_MD5SUM is set to "", no MD5 checksum will be performed.

If you prefer to install InChI sources manually, please follow these
instructions:

1. Download the zip file from
   http://www.inchi-trust.org/wp/wp-content/uploads/2014/06/INCHI-1-API.zip

2. Unzip the package, which creates a INCHI-1-API folder.

3. In the unzipped folder, find INCHI-1-API/INCHI_API/inchi_dll, under which
   there are 73 files including things like ichi.h and ikey_dll.c. Create a
   'src' directory inside the same directory that contains this README file
   you are readingCopy, and copy all those 73 files 'src' you have just
   created. The actual path is '$RDBASE/External/INCHI-API/src'.

4. Rerun `cmake` with `-DRDK_BUILD_INCHI_SUPPORT=ON` as an additional argument

Alternatively, if you are on a UNIX variant system (Linux, Mac OS X, Cygwin,
etc), you may invoke the included script `download-inchi.sh`:
	
	$ bash download-inchi.sh

When the download is successful, rerun`cmake` with
`-DRDK_BUILD_INCHI_SUPPORT=ON` as an additional argument