From 9186a9493f1e5dbf849b6cd32982f375dc05d906 Mon Sep 17 00:00:00 2001 From: q-posev Date: Mon, 23 May 2022 16:02:45 +0200 Subject: [PATCH] Adapt the tests to shifted MO indices --- python/test/test_api.py | 4 ++-- tests/test_f.f90 | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/python/test/test_api.py b/python/test/test_api.py index a2092b8..60e8dd2 100644 --- a/python/test/test_api.py +++ b/python/test/test_api.py @@ -335,8 +335,8 @@ dets_tmp = dets_np[read_buf_size-1][:] # divide by 2 because in this test int_num is the total number of integers (i.e. up-spin + down_spin) orb_list_up, orb_list_dn = trexio.to_orbital_list_up_dn(int(int_num/2), dets_tmp) -assert(orb_list_up[0] == 2) -assert(orb_list_dn[0] == 1) +assert(orb_list_up[0] == 1) +assert(orb_list_dn[0] == 0) #print(orb_list_up) #print(orb_list_dn) diff --git a/tests/test_f.f90 b/tests/test_f.f90 index 61511b1..e3cacc1 100644 --- a/tests/test_f.f90 +++ b/tests/test_f.f90 @@ -429,8 +429,12 @@ subroutine test_read(file_name, back_end) ! convert one given determinant into lists of orbitals rc = trexio_to_orbital_list_up_dn(3, det_list(:, offset_det_data_read+1), orb_list_up, orb_list_dn, occ_num_up, occ_num_dn) !write(*,*) occ_num_up, occ_num_dn + ! Print occupied orbitals for an up-spin component of a given determinant !write(*,*) orb_list_up(1:occ_num_up) + ! Print integers representanting a given determinant fully (up- and down-spin components) !write(*,*) det_list(:, offset_det_data_read+1) + ! Print binary representation of the first integer bit field of a given determinant + !write(*,'(B64.64)') det_list(1, offset_det_data_read+1) call trexio_assert(rc, TREXIO_SUCCESS) if (occ_num_up == 16 .and. occ_num_dn == 5) then write(*,*) 'SUCCESS CONVERT DET LIST'