From: Noel O'B. <bao...@gm...> - 2010-08-17 18:40:35
|
On 17 August 2010 17:36, Adam Tenderholt <ate...@gm...> wrote: >> On 12 August 2010 23:33, Adam Tenderholt <ate...@gm...> wrote: >>> >>> 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. >> >> I'm sorting this out now. Did you mean 4 spaces (that's what I see >> above)? To avoid any problems could you simply attach the part of the >> file starting from "Molecular orbital coefficients" down to basis >> function 4 as above? > > I decided to include the entire first block and the first couple of lines of the second block. Thanks for taking care of this. :-) > No problem. It should be fixed now. And the test suite can now handle fragment files. It's possible that a molecule with even more basis functions (more than 100 on one atom) or atoms (again, more than 100 atoms) could cause additional problems, but it's hard to predict that in advance. - Noel |