5
$\begingroup$

Preamble: Now, I am aware that directly editing the inchikey is, generally speaking, a bad idea, but...

Can I just change the 2nd block of an inchikey to "UHFFFAOY" to get the correct main-layer-only version of the inchikey of that molecule?

example where this seems to be the case (from pubchem):
BSAIUMLZVGUGKX-BQYQJAHWSA-N = trans-2-nonenal
BSAIUMLZVGUGKX-FPLPWBNLSA-N = cis-2-nonenal
BSAIUMLZVGUGKX-UHFFFAOYSA-N = 2-nonenal

I have seen lots of other examples (100s if not 1000s) to support this hypothesis (both for cis/trans and for sterochemistry) and never a counter-example.

$\endgroup$
  • $\begingroup$ If there is no stereo-information then the second layer will be empty. The hash of an empty layer will always be the same. So this is pretty safe to do. However, I have no idea why you would want to do that. $\endgroup$ – Martin - マーチン Feb 9 '17 at 14:04
  • $\begingroup$ @Martin My purpose was finding matches between databases where one might have 2nd block info and the other one doesn't, or for molecules that differ only on stereo and cis/trans. A simple inchikey string manipulation would be faster and less coding than looking up inchi, plugging it into software, and generating the 1st-block-only inchikey. $\endgroup$ – Nathan Lloyd Feb 9 '17 at 21:30
2
$\begingroup$

According to the InCHI FAQ, the 2nd block encodes "encodes stereochemistry and isotopic substitution information". So if you want to generate the corresponding InChIKey for the case where there is no stereo present nor isotopes specified, then it looks like this is possible. If you also want to force the neutral form, you could try setting the final character to 'N' (it may instead be P or O).

Your mileage may vary. To be honest, I wouldn't do this if I were you. I would generate a SMILES without isotopic or stereo information (or remove this programmatically), and then get the InChIKey of that. This would avoid any nasty surprises.

$\endgroup$
  • $\begingroup$ Why would you revert to SMILES when you are working on InChI? $\endgroup$ – Martin - マーチン Feb 9 '17 at 14:01
  • $\begingroup$ Thanks @Noel. The isotopic substitution info is something I had not considered. Also, all my inchikeys are neutral (just because of the databases I'm working with). $\endgroup$ – Nathan Lloyd Feb 9 '17 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.