From: Noel O'B. <bao...@gm...> - 2010-08-13 08:24:38
|
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. > > 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. bz2 seems to work better than the others. What size are we talking about for a single point calc? If you have access to Gaussian, maybe try "pop=full iop(3/33=1,3/36=-1)" and see if that reduces the file size. If too big, I'll try and think of some way of getting a test into regression.py. > 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? Since we are not 100% sure of the cause, it'd be better if we didn't rely on any data apart from this section. I think it should be easy enough to do, e.g. find where the 1s ends (do all calculations have a 1s on the first line?). > Adam > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > cclib-devel mailing list > ccl...@li... > https://lists.sourceforge.net/lists/listinfo/cclib-devel > |