From 00421031ed1277df5e6f0921a1dbd7ff1e7f2d9f Mon Sep 17 00:00:00 2001 From: David Waroquiers Date: Fri, 23 Feb 2024 14:14:55 +0100 Subject: [PATCH] Fixed is_uhf parsing method. --- turbomoleio/output/parser.py | 7 ++++++- .../outputs/TM_v7.3.1/escf/Al6_columns/ref_parser.json | 2 +- .../outputs/TM_v7.4.1/escf/Al6_columns/ref_parser.json | 2 +- .../outputs/TM_v7.5.1/escf/Al6_columns/ref_parser.json | 2 +- .../outputs/TM_v7.6/escf/Al6_columns/ref_parser.json | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/turbomoleio/output/parser.py b/turbomoleio/output/parser.py index b85e8db..6f5f207 100644 --- a/turbomoleio/output/parser.py +++ b/turbomoleio/output/parser.py @@ -1363,7 +1363,12 @@ def is_uhf(self): bool. """ # "mode" appears in dscf and escf, while "modus" in ridft and grad. - is_uhf = re.search("UHF (mode|modus) switched on", self.string) is not None + # "UHF mode switched on" has also disappeared in TM >= 7.7. Checking from + # "RPA UHF-EXCITATION-CALCULATION" instead. + is_uhf = ( + re.search("UHF (mode|modus) switched on", self.string) is not None + or re.search("RPA UHF-EXCITATION-CALCULATION", self.string) is not None + ) return is_uhf @lazy_property diff --git a/turbomoleio/testfiles/outputs/TM_v7.3.1/escf/Al6_columns/ref_parser.json b/turbomoleio/testfiles/outputs/TM_v7.3.1/escf/Al6_columns/ref_parser.json index 41193e7..4dbe58f 100644 --- a/turbomoleio/testfiles/outputs/TM_v7.3.1/escf/Al6_columns/ref_parser.json +++ b/turbomoleio/testfiles/outputs/TM_v7.3.1/escf/Al6_columns/ref_parser.json @@ -132,7 +132,7 @@ } }, "s2": null, - "is_uhf": false, + "is_uhf": true, "fermi": null, "integral": { "integral_neglect_threshold": 2.9e-11, diff --git a/turbomoleio/testfiles/outputs/TM_v7.4.1/escf/Al6_columns/ref_parser.json b/turbomoleio/testfiles/outputs/TM_v7.4.1/escf/Al6_columns/ref_parser.json index b26e3ed..4e5de73 100644 --- a/turbomoleio/testfiles/outputs/TM_v7.4.1/escf/Al6_columns/ref_parser.json +++ b/turbomoleio/testfiles/outputs/TM_v7.4.1/escf/Al6_columns/ref_parser.json @@ -132,7 +132,7 @@ } }, "s2": null, - "is_uhf": false, + "is_uhf": true, "fermi": null, "integral": { "integral_neglect_threshold": 2.9e-11, diff --git a/turbomoleio/testfiles/outputs/TM_v7.5.1/escf/Al6_columns/ref_parser.json b/turbomoleio/testfiles/outputs/TM_v7.5.1/escf/Al6_columns/ref_parser.json index be9fb3f..9e5a702 100644 --- a/turbomoleio/testfiles/outputs/TM_v7.5.1/escf/Al6_columns/ref_parser.json +++ b/turbomoleio/testfiles/outputs/TM_v7.5.1/escf/Al6_columns/ref_parser.json @@ -132,7 +132,7 @@ } }, "s2": null, - "is_uhf": false, + "is_uhf": true, "fermi": null, "integral": { "integral_neglect_threshold": 2.9e-11, diff --git a/turbomoleio/testfiles/outputs/TM_v7.6/escf/Al6_columns/ref_parser.json b/turbomoleio/testfiles/outputs/TM_v7.6/escf/Al6_columns/ref_parser.json index 8c4b4bf..0c2a6c2 100644 --- a/turbomoleio/testfiles/outputs/TM_v7.6/escf/Al6_columns/ref_parser.json +++ b/turbomoleio/testfiles/outputs/TM_v7.6/escf/Al6_columns/ref_parser.json @@ -132,7 +132,7 @@ } }, "s2": null, - "is_uhf": false, + "is_uhf": true, "fermi": null, "integral": { "integral_neglect_threshold": 2.9e-11,