Even though it would be a no-brainer to write a small script for OASA to do it, it seemed to me that the InChI software itself should allow something like this.
After some poking around the
stdinchi-1
help messages, here is my solution:cat test.inchi | stdinchi-1 -STDIO -InChI2Struct 2>/dev/null |(the code was broken into multiple lines to display properly)
grep AuxInfo | stdinchi-1 -STDIO -InpAux 2>/dev/null |
grep InChI=
This command assumes you have the
stdinchi-1
program in your path and that you are using a decent OS, with grep
and cat
commands available (or at least some approximation like Cygwin).The input file
test.inchi
contains a list of InChIs - one per line. The output is in the same format.The sequence of commands at first converts the old InChI into the AuxInfo format used by the InChI program, then uses it as input to generate a new standard InChI.
Hopefully someone would find this information useful.