doyle-lab-ucla / auto-qchem

Auto-QChem is an automated workflow for the generation and storage of DFT calculations for organic molecules.
https://doyle-lab-ucla.github.io/auto-qchem/
GNU General Public License v3.0
88 stars 18 forks source link

Error caused by capital letter (Density/density)) #5

Closed Yujikaiya closed 2 years ago

Yujikaiya commented 2 years ago

when using get_descriptors(), the error below ocurred.

--> 258 string = re.search("Population.?SCF density.?(\sAlph.?)\n\sCondensed", text, re.DOTALL).group(1) 259 if self.descriptors['multiplicity'] == 1: 260 energies = [re.findall(f"({float_or_int_regex})", s_part) for s_part in string.split("Alpha virt.", 1)]

AttributeError: 'NoneType' object has no attribute 'group'

In the output report of gaussian in our environment (Windows, G16) , the target text is below.

Population analysis using the SCF Density

So, I changed the code

string = re.search("Population.*?SCF [Dd]ensity.*?(\sAlph.*?)\n\s*Condensed", text, re.DOTALL).group(1)

then, error was fixed.