Openbabel is not converting Gaussian Z-matrix
I ran into an issue when OpenBabel (a great and extremely useful problem) could not convert my custom-generated Gaussian Z-matrix to XYZ format. The problem is that probably major flaw of OpenBabel are very terse error messages (mostly just "0 molecules converted", and even with ---errorlevel 25 option I got only:
==============================
*** Open Babel Audit Log in ReadChemObjectImpl
OpenBabel<IP_ADDRESS>Read molecule Gaussian Z-Matrix Input
==============================
*** Open Babel Audit Log in Clear
Ran OpenBabel<IP_ADDRESS>Clear Molecule
==============================
*** Open Babel Audit Log in ReadChemObjectImpl
OpenBabel<IP_ADDRESS>Read molecule Gaussian Z-Matrix Input
==============================
*** Open Babel Audit Log in Clear
Ran OpenBabel<IP_ADDRESS>Clear Molecule
0 molecules converted
). Some other file was converting just fine, with no obvious differences between their contents! I spent a long time trying to understand what is wrong with the second file, but to no avail.
The file which converts without any problem:
# This is a dummy route line, required for OpenBabel for the conversion
This molecule contains 26 atoms.
0 1
C
C 1 1.4141
C 2 1.3856 1 117.29
C 1 1.4077 2 121.06 3 -1.09
C 4 1.4088 1 121.27 2 2.37
C 3 1.4075 2 121.95 1 -0.93
C 3 1.5118 2 128.77 1 -176.79
C 7 1.4378 3 105.16 2 175.55
C 6 1.5156 3 108.80 2 -176.32
N 8 1.4317 7 122.53 3 -177.58
C 10 1.3629 8 120.12 7 -146.43
C 11 1.3942 10 120.44 8 -178.97
C 12 1.4024 11 119.82 10 -3.12
C 13 1.4110 12 118.94 11 1.63
C 10 1.3704 8 119.11 7 32.69
O 7 1.2445 3 125.27 2 -1.31
O 9 1.2448 6 124.96 3 -179.37
H 2 1.<PHONE_NUMBER>.72 6 -181.70
H 4 1.1010 1 119.57 2 -178.73
H 5 1.<PHONE_NUMBER>.12 3 179.30
H 11 1.<PHONE_NUMBER>.87 8 1.70
H 12 1.<PHONE_NUMBER>.95 10 178.60
H 13 1.<PHONE_NUMBER>.77 11 182.82
H 14 1.<PHONE_NUMBER>.94 12 -180.61
H 15 1.<PHONE_NUMBER>.78 11 178.99
H 1 1.<PHONE_NUMBER>.78 18 0.45
The file which fails to convert:
#T HF/3-21G Opt Integral(Grid=SG1)
H2O2 H2O2 GeometryOptimization GeomOpt GeometryOptimization 1
0 1
O
H 1 1.0
O 1 1.4 2 105.0
H 3 1.0 1 105.0 2 176.0
O <PHONE_NUMBER>
H 5 1.0 1 105.0 2 52.5
H 5 1.0 6 105.0 1 178.0
This is OpenBabel version 2.4.1 on Debian 10.
P.S. I sincerely don't know whether this question belongs better to the Chemistry StackExchange or to other forum, but I presume the question might appear to be useful for someone someday. 268