Menu

#718 Wrong spin computed for lithium atom in XYZ -> QChem input

2.3.x
open
nobody
None
5
2012-10-23
2011-04-04
Jiahao Chen
No

For some reason babel treats the hydrogen atom differently from the lithium atom in the xyz parser.

This is what happens for lithium

$ babel -ixyz li.xyz -oreport
FILENAME: li.xyz
FORMULA: Li
MASS: 6.9410
EXACT MASS: 7.0160045
INTERATOMIC DISTANCES
...

$ babel -ixyz li.xyz -oqcin
$comment
li.xyz
$end

$molecule
0 1
3 0 0 0
$end

$rem

$end
1 molecule converted
12 audit log messages

And this is what happens for the hydrogen atom:

$ babel -ixyz test.xyz -oreport
FILENAME: test.xyz
FORMULA: H
MASS: 1.0079
EXACT MASS: 1.0078250
TOTAL SPIN: 2
INTERATOMIC DISTANCES
...

$ babel -ixyz test.xyz -oqcin
$comment
test.xyz
$end

$molecule
0 2
1 0 0 0
$end

$rem

$end
1 molecule converted
11 audit log messages

As can be seen, the Q-Chem input file for the lithium atom has the wrong multiplicity (1=singlet) instead of the expected 2.

Running with ---errorlevel 5, it appears that the lithium atom XYZ input triggers OpenBabel::AssignImplicitValence but not the hydrogen atom XYZ input.

Discussion