OpenBabel is a convenient converter between different chemical formats. If I convert to SMILES, however, although I checked the option "Delete hydrogens (make implicit)". I still have H in the SMILES codes.

enter image description here

It's the same with the command line. It also does not remove H.

obabel.exe Molecule.log -osmi -d 

I still have, e.g. ...C[CH]C... in the SMILES. Of course, I could replace all occurrences of [CH] by C, but I'm not sure whether I would mess up the SMILES and/or the molecule. How can I get rid of the hydrogen? Why is it actually in there? Did I miss any other options during conversion?

  • $\begingroup$ Provide some example molecules maybe? $\endgroup$
    – Curt F.
    Jul 26 '19 at 13:01
  • 2
    $\begingroup$ When I do obabel -:"[CH4]" -ofpt -o SMILES the output is C, so I'm not sure why the command line (at least) isn't working for you. $\endgroup$
    – Curt F.
    Jul 26 '19 at 16:03
  • $\begingroup$ @Curt F., right, an example is missing. I cannot place the Gaussian file here. Which exact section in the Gaussian output file (start/end keywords) is actually extracted by OpenBabel? Well, for a demo try caffeine CN1C=NC2=C1C(=O)N(C(=O)N2C)C which gets CH3 drawn. But in the meantime I found another option in OpenBabel "do not draw terminal C(and attached H) explicitely". With this it looks fine. However, with conversion from Gaussian output file I also once got two double bonds to Nitrogen. I'm not a chemist, but this sounds wrong to me. I need to dig out an example which I can show. $\endgroup$
    – theozh
    Jul 28 '19 at 5:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.