patonlab / GoodVibes

Calculate quasi-harmonic free energies from Gaussian output files with temperature and other corrections
http://www.patonlab.colostate.edu
MIT License
137 stars 51 forks source link

Fix error with large charges #13

Closed jaimergp closed 6 years ago

jaimergp commented 6 years ago

The Gaussian parser fails if one file has large charge (say, -11). In those cases, the Gaussian output does not feature a space between the = and the <charge> value:

 Charge =-11 Multiplicity = 1

As a result one less field is obtained after the .split() method on the line, resulting in an IndexError when accessing the multiplicity value at line 338. This PR provides an alternative way of obtaining the multiplicity, splitting by = first, instead of blanks.