diff --git a/fastlogfileparser/orca/utils/regexes.py b/fastlogfileparser/orca/utils/regexes.py index 1ecd762..d0ddc2c 100644 --- a/fastlogfileparser/orca/utils/regexes.py +++ b/fastlogfileparser/orca/utils/regexes.py @@ -7,7 +7,7 @@ # charge and multiplicity (also in the input file section) DATA = { - "input_coordinates": r"\|[ \d]{3}>.\w{1,2}[ ]{2,3}([\s+\d+\s+\d+\s+-?\d+\.\d+\s+-?\d+\.\d+\s+-?\d+\.\d+]+)\n", + "input_coordinates": r"\|[ \d]{3}>.\w{1,2}((?:\s+-?\d+\.\d+){3})\n", "energy": r"FINAL SINGLE POINT ENERGY\s+(-?\d+.\d+)\n", "charge_and_multiplicity": r"...> \* xyz (-?\d) (\d)\n", "dipole_au": r"Magnitude \(a.u.\) :\s+(-?\d+.\d+)\n", diff --git a/test/data.tar.xz b/test/data.tar.xz index e9e5d9d..4937a12 100644 Binary files a/test/data.tar.xz and b/test/data.tar.xz differ diff --git a/test/orca_test.py b/test/orca_test.py index 7120668..a91f30a 100644 --- a/test/orca_test.py +++ b/test/orca_test.py @@ -79,3 +79,37 @@ def test_fast_orca_logfile_parser_dlpno(): [1.645021, 1.795278, -0.262281], ] assert result.t1_diagnostic == 0.020468528 + + file = os.path.join(os.path.dirname(__file__), "data", "new0.log") + (result,) = fast_orca_logfile_parser(file) + assert result.route_section == "uHF UNO DLPNO-CCSD(T)-F12D cc-pvtz-f12 def2/J cc-pvqz/c cc-pvqz-f12-cabs RIJCOSX NormalSCF NormalPNO" + assert result.run_time == 2487.0 + assert result.charge_and_multiplicity == [0, 2] + assert result.dipole_au == 1.2223 + assert result.input_coordinates == [ + [3.168756, 0.617416, 0.838343], + [3.342538, -0.171879, -0.273373], + [3.231292, 1.52192, 0.496184], + [-0.353131, 2.159183, -0.274323], + [-1.383522, 1.260144, 0.210082], + [-1.906832, 0.315325, -0.774906], + [-1.015519, -0.14966, 0.327211], + [-2.194255, -0.839194, 1.024401], + [-3.117528, -0.362224, -0.138892], + [0.395569, -0.625623, 0.323837], + [0.784995, -1.897751, -0.325493], + [1.104734, -0.625515, -0.941397], + [-0.830015, 3.090032, -0.614811], + [0.256545, 1.755537, -1.104269], + [0.324377, 2.412603, 0.555524], + [-1.67445, 0.440579, -1.835674], + [-2.086192, -1.932501, 1.058548], + [-2.424313, -0.45513, 2.028426], + [-3.508643, -1.197417, -0.736345], + [-3.938058, 0.317744, 0.131875], + [1.003453, -0.303868, 1.182447], + [1.623734, -2.464501, 0.091067], + [0.034747, -2.493109, -0.857952], + [2.288893, -0.298935, -0.766574] + ] + assert result.t1_diagnostic == 0.017765837