QChASM / AaronTools.py

Python tools for automating routine tasks encountered when running quantum chemistry computations.
https://aarontools.readthedocs.io/en/latest/
GNU General Public License v3.0
43 stars 8 forks source link

parsing ORCA double hybrid with RI #10

Closed joegair closed 1 year ago

joegair commented 1 year ago

FilerReader has problems with ORCA outputs computed with double hybrid methods using the (default) RI approximation

I could not open files that used ! pwpb95 def2-qzvpp def2-qZVPP/C tightscf or ! dsd-pbep86 d3 def2-qzvpp def2-qZVPP/C tightscf

Notably, I could open files that used a double hybrid method without the RI approximation, eg ! dsd-pbep86 d3 def2-qzvpP def2-qZVPP/C tightscf noRI

The difference is in the line RI-MP2 CORRELATION ENERGY: -1.414209774 Eh with RI versus MP2 CORRELATION ENERGY : -1.414382553 Eh without RI

I think the error basically boils down to the fact that there is no space separating ENERGY and : in RI-MP2 CORRELATION ENERGY: whereas there is a space in MP2 CORRELATION ENERGY :

File ~/anaconda3/envs/python/lib/python3.10/site-packages/AaronTools/fileIO.py:1105, in FileReader.read_file(self, get_all, just_geom, scan_read_all, freq_name, conf_name, nbo_name, max_length)
   1103     self.read_mol2(f)
   1104 elif self.file_type == "out":
...
-> 1686     item = line.split()[-6] + " correlation energy"
   1687     self.other[item] = float(line.split()[-2])
   1689 elif re.match("E\(\S+\)\s+...\s+-?\d+\.\d+$", line):

IndexError: list index out of range
ajs99778 commented 1 year ago

Thanks for reporting this. I've fixed this on GitHub to use a regular expression instead of splitting on white space.

joegair commented 1 year ago

Thanks for the super fast turnaround!On Mar 17, 2023, at 5:09 PM, Tony Schaefer @.***> wrote: Thanks for reporting this. I've fixed this on GitHub to use a regular expression instead of splitting on white space.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>