I am trying to find some good resources to understand generation of InChIKeys from the InChI. There seems to be no resource available online. I have gone through the Wikipedia article for InChI, but it hardly contains any information as to how the InChI keys are generated. Can anyone provide me with this information as to how we can generate InChIKeys from InChI. Also, if you happen to find any good resources for the same, please do share them with me.
InChI is the acronym for the IUPAC International Chemical Identifier. It is basically as system, to catalogue molecular information. Its prime advantage is, that it is just a text string. That basically means, that it can easily be understood by machines. The other advantage is, that it is also human readable. It consists of several layers: the molecular formula, connectivity of the heavy atoms, placement of the hydrogen atoms/ stereochemical information. This shall not be confused with the IChIKey, which is a string of 27 characters derived from the hash code of the InChI string.
A quite thorough presentation/ documentation of the software and its algorithms (including the generation of the InChI string and the InChIKey) is available as an open access paper (currently asap): Stephen R Heller, Alan McNaught, Igor Pletnev, Stephen Stein and Dmitrii Tchekhovskoi, Journal of Cheminformatics, 2015, 7:23. Since the abstract is not very comprehensive, I will quote a short passage from the introduction, which outlines the contents of the article:
We then describe the workflow of InChI generation (normalization, canonicalization, and serialization stages), as well as generation of the compact hashed code derived from InChI (InChIKey); the related algorithms and implementation details are briefly discussed.
In response to R.M.'s comment I am also including the introductory sentence of the linked paper, which describes what an IChIKey is:
InChIKey is a compact chemical identifier derived from InChI. The InChIKey is always only 27-characters long.
For a more technical description of the algorithms and the scope of the InChI string and the InChIKey, the reader is pointed towards the technical manual: Stein S, Heller S, Tchekhovskoi D, Pletnev I. IUPAC International Chemical Identifier (InChI) InChI version 1, software version 1.04 (2011) Technical Manual. The description of the InChIKey can be found in section V, pp 53-62:
The InChIKey is a character signature based on a hash code of the InChI string. A hash code is a fixed length condensed digital representation of a variable length character string. Providing a signature derived from an InChI string is helpful for search applications, including Web searching and chemical structure database indexing; also, it may serve as a checksum for verifying InChI, for example, after transmission over a network.
Please note that the InChIKey by itself does not contain enough information to restore the molecular structure. This is also mentioned in the open access paper:
A disadvantage of the InChIKey is that one loses the ability to algorithmically restore a structure from a textual label: InChIKey is a structure-based registry-lookup identifier [...].
But these are not the only sources. As an IUPAC member, most information relating to the developement and implementation can be accessed freely at iupac.org. Since itself is an non-profit organisation, it also has its own website, www.inchi-trust.org. This includes a very extensive technical FAQ (html and pdf) and since it is open source software also the source code.
The software is still actively developed by the chemical community and the trust itself. As of the current version (1.04, Sept. 2011) there are still several shortcomings, which have bean addressed in Structure that breaks InChI.
According to Wikipedia, the InChikey is generated by a hashing algorithm, like the SHA-2. The InChi key is designed for use in search, and thus is not necessarily designed to be comprehensible to the end user.
If you are looking for a way to generate InChi keys from InChis, there are a number of software packages that do so, including the open source program from IUPAC via the InChi Trust: http://www.inchi-trust.org/downloads/.
InChi is published under a more permissive variation of the GPL, so in addition to the standalone executable, you can download the code as well. Then, you can sift through the code for the hashing algorithm and figure out what it is doing. InChi even has a project on SourceForge. The provided documentation at these locations likely includes the workings of the algorithm, but remember that InChi key was designed to produce a string of characters from a structure that a computer can match; the end user is not necessarily supposed to interact with or parse the InChi key.
If you are looking for existing programs that can also produce InChi keys, IUPAC provides the following list:
The first three comfortably sit in your browser.
Lots of information in this link with references,