Skip to content

Commit

Permalink
gen_dcaspt2_restart test: add multi cirtoos test
Browse files Browse the repository at this point in the history
  • Loading branch information
kohei-noda-qcrg committed Jan 4, 2025
1 parent 37a1920 commit 46a0667
Show file tree
Hide file tree
Showing 4 changed files with 4,584 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
totsym: 2
selectroot: 1
Next subspace: I
Subspace: A Sumc2: 1.18745492650451e-08 Energy: -1.8341565541328e-08
Subspace: B Sumc2: 9.73101597556623e-05 Energy: -0.000252379102333566
Subspace: C Sumc2: 3.89922224486996e-05 Energy: -0.000136569356566604
Subspace: D Sumc2: 0.000681765498284919 Energy: -0.0024092126529112
Subspace: E Sumc2: 0.00133896840395821 Energy: -0.00513415984298757
Subspace: F Sumc2: 0.00208341219392722 Energy: -0.00929205851761709
Subspace: G Sumc2: 0.00761383970080123 Energy: -0.0375547863590626
Subspace: H Sumc2: 0.0110952001597402 Energy: -0.0724952047733335
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
totsym: 2
selectroot: 2
Next subspace: G
Subspace: A Sumc2: 0.00114749747320073 Energy: -0.0018245789474798
Subspace: B Sumc2: 5.6989371416954e-10 Energy: -1.09141354947307e-09
Subspace: C Sumc2: 0.0160604167447912 Energy: -0.0203356728115594
Subspace: D Sumc2: 0.0286587956131426 Energy: -0.0458180570006012
Subspace: E Sumc2: 0.0054397827608431 Energy: -0.0169001778170485
Subspace: F Sumc2: 0.000898046678792155 Energy: -0.0019259253958069
20 changes: 20 additions & 0 deletions test/unit_test/gen_dcapst2_restart/test_gen_dcaspt2_restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,26 @@ def test_pass_in_the_middle_subspace_broken(env_setup_gen_restart_file) -> None:
assert ref == result


@pytest.mark.dev
def test_pass_multi_ciroots(env_setup_gen_restart_file) -> None:
(gen_restart_path, test_path, input_path, expected_path) = env_setup_gen_restart_file
os.chdir(test_path)
print(f"input_path: {input_path}")
command = f"{gen_restart_path} {input_path}"
subprocess.run(command.split(), check=True)

for trailing_file_str in ["_2_1", "_2_2"]:
string_ref = get_split_string_list_from_output_file(f"{expected_path}{trailing_file_str}")
string_result = get_split_string_list_from_output_file(f"caspt2_restart{trailing_file_str}")

for ref, result in zip(string_ref, string_result):
assert ref == result
# string_ref = get_split_string_list_from_output_file(expected_path)
# string_result = get_split_string_list_from_output_file("caspt2_restart_4_1")

# for ref, result in zip(string_ref, string_result):
# assert ref == result

@pytest.mark.dev
def test_no_output(env_setup_gen_restart_file) -> None:
(gen_restart_path, test_path, input_path, expected_path) = env_setup_gen_restart_file
Expand Down
Loading

0 comments on commit 46a0667

Please sign in to comment.