An InChIkey Collision is Discovered and NOT Based on Stereochemistry   13 comments

InChI Strings and InChIKeys are very much the backbone of ChemSpider and have quickly become a way by which online databases are being connected online. The InChIKey is a hash of the InChiString and when the hash was adopted it was suggested that the likelihood that there would be a collision was very small, the estimate being, as quoted from the official InChI site:

“An example of InChI with its InChKey equivalent is shown below. There is a finite, but very small probability of finding two structures with the same InChIKey. For duplication of only the first block of 14 characters this is 1.3% in 109, equivalent to a single collision in one of 75 databases of 109 compounds each.”

At a previous ACS Meeting Prof Jonathan Goodman from University of Cambridge announced that he had identified a collision. The collision was for two isomers of spongistatin, a rather complex chemical structure with many stereocenters.

Jonathan has “done it again”…what a troublemaker he is (in a supremely gentlemanly way!). I was fortunate enough to receive the news about this collision from him just as I was getting on the flight from ACS Denver to home tonight and asked his permission to blog it as it is both exciting and, I believe, quite surprising news. Why? In this case the collision is for two distinctly different chemicals with totally different formulae and with NO stereochemistry! Very surprising!

As you can see in the figure below the two chemical compounds are simply long branched alkyl chains, one an alcohol and one a ketone.

In case Jonathan’s software tool that he was using to connect to the InChI generation software was doing something untoward with the molfile I confirmed the observation myself by drawing the structures in ACD/ChemSketch and generating the InChIKeys there. And, sure enough…I see exactly the same Standard InChIKeys for both molecules as shown in the movie below. VERY interesting!


13 responses to An InChIkey Collision is Discovered and NOT Based on Stereochemistry

Subscribe to comments with RSS.

  1. While I’m not usually the first to rush out to defend InChI, there is no reason to be surprised by this. Hash tags are supposed to have a purely random chance of colliding. The documentation is clear, and implies that this identifier is not suitable for uniquely identifying a compound, as any computer scientist will confirm when you talk about hash-based lookups… it just narrows down the potential number of matches.

  2. Yes indeed…I agree with everything that you say. That said, it remains surprising (an emotional response) because it’s two collisions in a fairly short time and the original discussions had, I judge, the majority of the community imagining we wouldn’t see one for a long time. It’s probabilities..and just like lotto 649…the chances of getting the 6 numbers 1,2,3,4,5,6 in the lottery is the same as a random set of 6 between 1 and 49.

  3. Is there any particular reason why all structure information is completely “buried” in an image file :-)? And did Jonathan tell you how (on earth) he caught that? I can imagine an “obvious” strategy in case of the the previous collision (spongistatin) he reported, but how did he find this here …

  4. I can’t think of an easy way to put the molfiles onto WordPress 🙂

    They are here:


    I’ve asked Jonathan hoow he has found two collisions…it should be work 🙂

  5. Thanks for the molfiles – Markus

  6. It is right time to upgrade InChI-Key with prefix or suffix for stereo-isomers or the case discussed above. It was a surprise for me too.. thanks to JG for bringing to our notice.. there is opportunity to chemoinformaticians to build better algorithms. MK (denver)

  7. Thanx for the shout out. I hope in the future Prof. Goodman will blog about such finds himself 🙂 I love to hear too if these compounds are “made up” or actually synthesized and/or measured in the real world. Not that it matters to me, just to have the story complete.

    The importance to me is that it helps raise awareness that databases must never use only the InChIKey, but must always provide the full InChI as well. Then the InChIKey is used for it’s function, a short hash to easily find hits, and not as unique identifier.

    • Oh, and what are the ChemSpider identifiers?

    • Well, providing InChIs is one thing – but indexing by them instead of InChIKey (what this problem here kind of implies): not so funny.

      What I find pretty odd currently with this collision:
      – the molecules itself are kind of similar
      – the InChIs itself don’t look similar (at a first glance)
      – I thought the InChIKeys are just calculated by hashing the InChIs …. so two “similar” molecules are made dissimilar by an Identifier which hashed representation “by accident” makes them identical

    • Egon,
      I’d say that the concept of whether these compounds are “made up” or not is a difficult one to answer in this case. I’d describe the structures as “virtual” or “meta” molecules. The top structure has 20 stereocentres therefore represents 2^20 possible isomers, similarly the second represents 2^15 possible isomers. Of course you can perform a racemic synthesis and generate these mixtures but other than proving that you can construct this skeleton, it’s difficult to know what else can be meaningfully measured.

Leave a Reply

%d bloggers like this: