Skip to content

Commit

Permalink
Merge pull request #2125 from samblau/qchem
Browse files Browse the repository at this point in the history
Small tweaks / fixes to Q-Chem parsing
  • Loading branch information
mkhorton committed May 3, 2021
2 parents 7ab93bd + 9760bc5 commit adb541c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
11 changes: 2 additions & 9 deletions pymatgen/io/qchem/outputs.py
Expand Up @@ -55,7 +55,7 @@ def __init__(self, filename: str):
self.data["errors"] = []
self.data["warnings"] = {}
self.text = ""
with zopen(filename, "rt") as f:
with zopen(filename, encoding="ISO-8859-1") as f:
self.text = f.read()

# Check if output file contains multiple output files. If so, print an error message and exit
Expand Down Expand Up @@ -277,7 +277,7 @@ def __init__(self, filename: str):
{"key": r"(?i)\s*job(?:_)*type\s*(?:=)*\s*force"},
terminate_on_match=True,
).get("key")
if self.data.get("force", []):
if self.data.get("force_job", []):
self._read_force_data()

self.data["scan_job"] = read_pattern(
Expand Down Expand Up @@ -678,13 +678,6 @@ def _detect_general_warnings(self):
):
self.data["warnings"]["diagonalizing_BBt"] = True

# Check for bad Roothaan step
for scf in self.data["SCF"]:
if abs(scf[0][0] - scf[1][0]) > 10.0:
self.data["warnings"]["bad_roothaan"] = True
if abs(scf[0][0] - scf[1][0]) > 100.0:
self.data["warnings"]["very_bad_roothaan"] = True

def _read_geometries(self):
"""
Parses all geometries from an optimization trajectory.
Expand Down
2 changes: 1 addition & 1 deletion pymatgen/io/qchem/tests/multi_job.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pymatgen/io/qchem/tests/single_job.json

Large diffs are not rendered by default.

0 comments on commit adb541c

Please sign in to comment.