Prevent "InChiKey=" in exported InChiKey?

User 0261d34ad7

28-10-2011 10:15:38

Hi,


I'm trying to generate InChiKey strings from a Molecule object in Java ( mol.exportToFormat("inchikey") ), however the generated string includes "InChiKey=" at the start. As far as I know this isn't a valid InChiKey, and I'm having to strip it off in order to get the actual key.


Does anyone know how to export the pure InChiKey, or is the string manipulation the only way?


Thanks,


James Siddle

ChemAxon 0a9e2a55e1

02-11-2011 10:23:46

Hi,


When we first included InChIKey in Marvin we made the same output as the standard inchi (3 line InChI, AuxInfo, InChIKey), then after a user-request we have made the inchikey export option also available, as the 3rd line of the inchi:key output. Now there is no option to write only the string after InChIKey= .


There can be an option to only export the part You need, but it will be the same one line String manipulation You can use now, and there will be no speedup or slowdown, because the generation of the key is much slower then any String maipulation.


Best Regards,


Peter

User 0261d34ad7

09-11-2011 12:23:16

Hi,


OK, that makes sense - thank you.


It would be handy to have an option that ensures only the key is exported, if only because it will prevent future compatibility problems. If, for example, the prefix of the inchi-key changes, then we would need to roll out a fix to ensure. As it stands we need to check that the prefix is exactly what we're expecting...


However we have a working solution so we're good for now.


Thanks,


Jim