From: Adam T. <ate...@gm...> - 2010-08-12 22:33:27
|
One of my former labmates (Lei) has found a bug in cclib for parsing the mocoeffs section of a Gaussian 09 logfile. It has to do with the spacing of that section. Lines 890-895 of gaussianparser.py (trunk r912) are the relevant parts with parts = line[:11].split() being the main culprit. The part of Lei's file causing the crash is Eigenvalues -- -372.66755-235.72701 -46.03921 -40.79270 -40.79111 1 1 Mn 1S 0.00000 0.47278 0.00000 0.00000 0.00000 2 2S 0.00000 0.40732 0.00000 0.00000 0.00000 3 3S 0.00000 0.21455 0.00000 0.00000 0.00000 4 4S 0.00000 0.01534 0.00000 -0.00002 0.00000 Note that there are 5 spaces before the line begins, meaning 'parts = line[:13].split()' should be used. Other files only have 3 spaces. We've tried to reproduce the spacing that breaks the parser, but so far have failed. It looks like it has to do with the number of basis functions (1128). Unfortunately, this results in a file that is probably too large to be included with a formal bug report and data files. Any thoughts on the best way to fix this bug? Put a conditional on where to split the line depending on the number of basis functions? Adam |