-
Notifications
You must be signed in to change notification settings - Fork 173
Closed
Description
The attached output (cl.zip) file throws an error when parsed:
import cclib
cclib.ccopen("../../data/cl.out").parse()
The error:
...
.../cclib/cclib/parser/logfileparser.py in parse(self, progress, fupdate, cupdate)
327 # in data._attrlist will be moved to final data object that is returned.
328 try:
--> 329 self.extract(inputfile, line)
330 except StopIteration:
331 self.logger.error("Unexpectedly encountered end of logfile.")
.../cclib/cclib/parser/orcaparser.py in extract(self, inputfile, line)
1009
1010 nonzero = numpy.nonzero(vibfreqs)[0]
-> 1011 self.first_mode = nonzero[0]
1012 # Take all modes after first
1013 # Mode between imaginary and real modes could be 0
IndexError: index 0 is out of bounds for axis 0 with size 0
The problem seems to be the number of frequencies (it's a single atom!):
...
-----------------------
VIBRATIONAL FREQUENCIES
-----------------------
Scaling factor for frequencies = 1.000000000 (already applied!)
0: 0.00 cm**-1
1: 0.00 cm**-1
2: 0.00 cm**-1
------------
NORMAL MODES
------------
...
Could a try...except
clause solve it? Some parts of the output are also affected by the fact that it's a single atom, such as entropy calculations, which could also throw new errors:
...
The entropies will be listed as multiplied by the temperature to get
units of energy
Electronic entropy ... 0.00065446 Eh 0.41 kcal/mol
Vibrational entropy ... -inf Eh -inf kcal/mol
Rotational entropy ... 0.00000000 Eh 0.00 kcal/mol
Translational entropy ... 0.01740262 Eh 10.92 kcal/mol
-----------------------------------------------------------------------
Final entropy term ... -inf Eh -inf kcal/mol
-------------------
GIBBS FREE ENTHALPY
-------------------
...
The correct behaviour is to consider Vibrational entropy
equal to zero and sum all lines again into Final entropy term
. (Enthalpies look fine, but the Final Gibbs free enthalpy
is also inf
in the output....)