6
$\begingroup$

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.

One example:

enter image description here

OpenBabel conversion Gaussian09 to SMILES (left):

N1(c2ccccc2)[C]2C=CC=CC2=[N]=C1c1ccccc1

SMILES generated by some drawing program (right):

C12=CC=CC=C1N(C3=CC=CC=C3)C(C4=CC=CC=C4)=N2

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?

Update:

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:

InChI=1S/C19H14N2/c1-3-9-15(10-4-1)19-20-17-13-7-8-14-18(17)21(19)16-11-5-2-6-12-16/h1-14H

Then, if you convert this InChI to SMILES, you'll get:

c1ccc(cc1)c1nc2ccccc2n1c1ccccc1

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.

$\endgroup$
8
  • 2
    $\begingroup$ The left structure simply is wrong; that should probably be a bug report for open Babel. Do you have other examples? Also the smiles generated for the right side not apply aromaticity, so I wouldn't regard this as correct either. $\endgroup$ Jul 31, 2019 at 18:45
  • 1
    $\begingroup$ Often structures containing Benzimidazoles are wrong... I will check a bug report for OpenBabel. $\endgroup$
    – theozh
    Jul 31, 2019 at 19:56
  • $\begingroup$ @Martin - マーチン♦, by the way, do you maybe know what exact section OpenBabel is extracting from the Gaussian output file (start/end keywords or headers)?. I found that if you convert first to InChI and then afterwards convert these InChI to SMILES gives a higher "yield" of correct SMILES structures (but still not 100%). $\endgroup$
    – theozh
    Aug 1, 2019 at 8:36
  • $\begingroup$ I don't know, but I assume it's extracting the molecular structure, then probably forms internal coordinates, flattens the molecule, form a graph, translates it to smiles, canonicalise it. InChI just is probably less ambiguous. As for why it might yield 'correct (er)' results, I'm guessing the algorithm is different and more robust. In any case, a canonical smiles should have a 1:1 correspondence to InChI. But still, I'm guessing here... And open Babel is way too complex for me to understand or look into. $\endgroup$ Aug 2, 2019 at 17:31
  • $\begingroup$ Do feel free to submit your findings as an answer! :) $\endgroup$ Feb 28, 2020 at 21:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.