I would like to get the molecular structure as SMILES from Gaussian output files. OpenBabel seems to be the tool made for such tasks. However, the structure is not always correct.
OpenBabel conversion Gaussian09 to SMILES (left):
SMILES generated by some drawing program (right):
Is there a way (maybe a special option in OpenBabel which I missed) to directly get a correct output or to do some "postprocessing" to correct the SMILES afterward for example with RDKit or others?
One way to increase the yield of correct output seems to be the following. If you convert the Gaussian output to InChI first, for the above example you'll get:
Then, if you convert this InChI to SMILES, you'll get:
Which results in the right picture above.
However, even with this workaround some compounds, e.g. with
...C#N... triple bonds are sometimes still incorrect.
I placed a bug report on GitHub. Let's see...
Any strategies, tips, and tricks to reliably and directly get a correct SMILES output are appreciated.