|
From: Pavlo S. <psolntse@d.umn.edu> - 2010-08-17 15:27:14
|
I use MOForge and found what its doesn't read output file from
Gassian09. I also wrote very simple script:
#!/usr/bin/python
import sys
from cclib.parser import ccopen
from cclib.progress import TextProgress
import logging
progress = TextProgress()
myfile = ccopen(sys.argv[1],progress,logging.ERROR)
data = myfile.parse()
coord = data.atomcoords
print "Number of atoms is %d " % data.natom
print "Mult = %d " % data.mult
print "NMO = %d" % data.nmo
for j in range(0, data.natom):
print "%f\t\t%f\t\t%f" % (coord[-1, j, 0] , coord[-1, j, 1],
coord[-1, j, 2])
# END
This script works fine with Gaussian 03 files, but with Gaussian 09 i
got error:
[----------] 0% QM convergenceTraceback (most recent call last):
File "./hello.py", line 11, in <module>
data = myfile.parse()
File
"/usr/local/lib/python2.6/dist-packages/cclib/parser/logfileparser.py",
line 221, in parse
self.extract(inputfile, line)
File
"/usr/local/lib/python2.6/dist-packages/cclib/parser/gaussianparser.py",
line 851, in extract
atomname = "%s%s" % (parts[2], parts[1])
IndexError: list index out of range
# END
and script stopped. Are you going to make Gaussian 09 files working in
the cclib or you already done this? How can i fix this problem?
Best, Pavlo.
|