dan2097 / jna-inchi

Wrapper to access InChI from Java
GNU Lesser General Public License v2.1
9 stars 7 forks source link

Incorrect SMILES to InChI allenal stereochemistry handling #8

Closed dan2097 closed 2 years ago

dan2097 commented 5 years ago

In an allenal system e.g. AB(A')=C=D(E)E', the original InChI API uses A,B,D,E as reference atoms. However the IXA API uses A,A',E,E'. This does better capture that the system is effectively an extended tetrahedran.

The SMILES to InChI input incorrectly assumes the former convention. This needs to be fixed and documented as to what the expected behaviour is. Adding static convenience methods to construct appropriate InchiStereo objects for double bond/tetrahedral/allenal stereo may help.

The case where a reference atom is an implicit hydrogen needs to be handled.

dan2097 commented 2 years ago

Also according to the InChI technical manual (and the code)

Only cumulenes that have 3 double bonds and allenes that have 2 double bonds are treated as possibly stereogenic

so for longer cumulenes we should ignore the stereochemistry...

dan2097 commented 2 years ago

Remaining issues with allene/cumulene stereochemistry addressed by 139bf9ae3d2b2d2714e63b53a587b86eef2ed0a2 and 1fc84d159fdf97d9d77722425f467c7ae9dcaa20