diff --git a/devel/trexio/trexio_f.f90 b/devel/trexio/trexio_f.f90 index 4060676..d99bd21 100644 --- a/devel/trexio/trexio_f.f90 +++ b/devel/trexio/trexio_f.f90 @@ -139,34 +139,35 @@ interface end interface interface - integer(trexio_exit_code) function trexio_to_orbital_list(N_int, d1, list, occupied_num) bind(C) + integer(trexio_exit_code) function trexio_to_orbital_list_c(N_int, d1, list, occupied_num) bind(C, name="trexio_to_orbital_list") use, intrinsic :: iso_c_binding import integer(c_int32_t), intent(in), value :: N_int integer(c_int64_t), intent(in) :: d1(*) - integer(c_int32_t), intent(out) :: list(*) + integer(c_int32_t), intent(inout) :: list(*) integer(c_int32_t), intent(inout) :: occupied_num - end function trexio_to_orbital_list + end function trexio_to_orbital_list_c end interface interface - integer(trexio_exit_code) function trexio_to_orbital_list_up_dn(N_int, d1, list_up, list_dn, occ_num_up, occ_num_dn) bind(C) + integer(trexio_exit_code) function trexio_to_orbital_list_up_dn_c(N_int, d1, list_up, list_dn, occ_num_up, occ_num_dn) & + bind(C, name="trexio_to_orbital_list_up_dn") use, intrinsic :: iso_c_binding import integer(c_int32_t), intent(in), value :: N_int integer(c_int64_t), intent(in) :: d1(*) - integer(c_int32_t), intent(out) :: list_up(*) - integer(c_int32_t), intent(out) :: list_dn(*) + integer(c_int32_t), intent(inout) :: list_up(*) + integer(c_int32_t), intent(inout) :: list_dn(*) integer(c_int32_t), intent(inout) :: occ_num_up integer(c_int32_t), intent(inout) :: occ_num_dn - end function trexio_to_orbital_list_up_dn + end function trexio_to_orbital_list_up_dn_c end interface -character(len = 12) :: TREXIO_PACKAGE_VERSION = "2.2.0" +character(len = 12) :: TREXIO_PACKAGE_VERSION = "2.3.0" integer :: TREXIO_VERSION_MAJOR = 2 -integer :: TREXIO_VERSION_MINOR = 2 +integer :: TREXIO_VERSION_MINOR = 3 integer :: TREXIO_VERSION_PATCH = 0 -character(len = 64) :: TREXIO_GIT_HASH = "6edb5a39d7cd093df621dcd10b9a90b0c70b8170" +character(len = 64) :: TREXIO_GIT_HASH = "189f6de6a9cd51d0be6c44be95deca045f97c555" interface integer(trexio_exit_code) function trexio_delete_metadata (trex_file) bind(C) @@ -280,6 +281,22 @@ interface end function trexio_delete_rdm end interface +interface + integer(trexio_exit_code) function trexio_delete_cell (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_cell +end interface + +interface + integer(trexio_exit_code) function trexio_delete_pbc (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_pbc +end interface + interface integer(trexio_exit_code) function trexio_delete_qmc (trex_file) bind(C) use, intrinsic :: iso_c_binding @@ -416,6 +433,14 @@ interface end function trexio_has_state_num end interface +interface + integer(trexio_exit_code) function trexio_has_pbc_periodic (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_pbc_periodic +end interface + interface integer(trexio_exit_code) function trexio_has_qmc_num (trex_file) bind(C) use, intrinsic :: iso_c_binding @@ -648,6 +673,46 @@ interface end function trexio_has_ao_1e_int_core_hamiltonian end interface +interface + integer(trexio_exit_code) function trexio_has_ao_1e_int_overlap_im (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_ao_1e_int_overlap_im +end interface + +interface + integer(trexio_exit_code) function trexio_has_ao_1e_int_kinetic_im (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_ao_1e_int_kinetic_im +end interface + +interface + integer(trexio_exit_code) function trexio_has_ao_1e_int_potential_n_e_im (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_ao_1e_int_potential_n_e_im +end interface + +interface + integer(trexio_exit_code) function trexio_has_ao_1e_int_ecp_im (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_ao_1e_int_ecp_im +end interface + +interface + integer(trexio_exit_code) function trexio_has_ao_1e_int_core_hamiltonian_im (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_ao_1e_int_core_hamiltonian_im +end interface + interface integer(trexio_exit_code) function trexio_has_mo_coefficient (trex_file) bind(C) use, intrinsic :: iso_c_binding @@ -656,6 +721,14 @@ interface end function trexio_has_mo_coefficient end interface +interface + integer(trexio_exit_code) function trexio_has_mo_coefficient_im (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_mo_coefficient_im +end interface + interface integer(trexio_exit_code) function trexio_has_mo_occupation (trex_file) bind(C) use, intrinsic :: iso_c_binding @@ -704,6 +777,46 @@ interface end function trexio_has_mo_1e_int_core_hamiltonian end interface +interface + integer(trexio_exit_code) function trexio_has_mo_1e_int_overlap_im (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_mo_1e_int_overlap_im +end interface + +interface + integer(trexio_exit_code) function trexio_has_mo_1e_int_kinetic_im (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_mo_1e_int_kinetic_im +end interface + +interface + integer(trexio_exit_code) function trexio_has_mo_1e_int_potential_n_e_im (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_mo_1e_int_potential_n_e_im +end interface + +interface + integer(trexio_exit_code) function trexio_has_mo_1e_int_ecp_im (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_mo_1e_int_ecp_im +end interface + +interface + integer(trexio_exit_code) function trexio_has_mo_1e_int_core_hamiltonian_im (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_mo_1e_int_core_hamiltonian_im +end interface + interface integer(trexio_exit_code) function trexio_has_rdm_1e (trex_file) bind(C) use, intrinsic :: iso_c_binding @@ -728,6 +841,38 @@ interface end function trexio_has_rdm_1e_dn end interface +interface + integer(trexio_exit_code) function trexio_has_cell_a (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_cell_a +end interface + +interface + integer(trexio_exit_code) function trexio_has_cell_b (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_cell_b +end interface + +interface + integer(trexio_exit_code) function trexio_has_cell_c (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_cell_c +end interface + +interface + integer(trexio_exit_code) function trexio_has_pbc_k_point (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_pbc_k_point +end interface + interface integer(trexio_exit_code) function trexio_has_qmc_point (trex_file) bind(C) use, intrinsic :: iso_c_binding @@ -1016,6 +1161,15 @@ interface end function trexio_read_state_num_32 end interface +interface + integer(trexio_exit_code) function trexio_read_pbc_periodic_32 (trex_file, num) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num + end function trexio_read_pbc_periodic_32 +end interface + interface integer(trexio_exit_code) function trexio_read_qmc_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding @@ -1169,6 +1323,15 @@ interface end function trexio_read_state_num_64 end interface +interface + integer(trexio_exit_code) function trexio_read_pbc_periodic_64 (trex_file, num) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: num + end function trexio_read_pbc_periodic_64 +end interface + interface integer(trexio_exit_code) function trexio_read_qmc_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding @@ -1322,6 +1485,15 @@ interface end function trexio_read_state_num end interface +interface + integer(trexio_exit_code) function trexio_read_pbc_periodic (trex_file, num) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num + end function trexio_read_pbc_periodic +end interface + interface integer(trexio_exit_code) function trexio_read_qmc_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding @@ -1593,6 +1765,51 @@ interface end function trexio_read_ao_1e_int_core_hamiltonian_32 end interface +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_overlap_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_overlap_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_kinetic_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_kinetic_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_potential_n_e_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_potential_n_e_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_ecp_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_ecp_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_core_hamiltonian_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_core_hamiltonian_im_32 +end interface + interface integer(trexio_exit_code) function trexio_read_mo_coefficient_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -1602,6 +1819,15 @@ interface end function trexio_read_mo_coefficient_32 end interface +interface + integer(trexio_exit_code) function trexio_read_mo_coefficient_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_mo_coefficient_im_32 +end interface + interface integer(trexio_exit_code) function trexio_read_mo_occupation_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -1656,6 +1882,51 @@ interface end function trexio_read_mo_1e_int_core_hamiltonian_32 end interface +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_overlap_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_overlap_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_kinetic_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_kinetic_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_potential_n_e_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_potential_n_e_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_ecp_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_ecp_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_core_hamiltonian_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_core_hamiltonian_im_32 +end interface + interface integer(trexio_exit_code) function trexio_read_rdm_1e_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -1683,6 +1954,42 @@ interface end function trexio_read_rdm_1e_dn_32 end interface +interface + integer(trexio_exit_code) function trexio_read_cell_a_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_cell_a_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_cell_b_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_cell_b_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_cell_c_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_cell_c_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_pbc_k_point_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_pbc_k_point_32 +end interface + interface integer(trexio_exit_code) function trexio_read_qmc_point_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -1917,6 +2224,51 @@ interface end function trexio_read_ao_1e_int_core_hamiltonian_64 end interface +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_overlap_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_overlap_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_kinetic_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_kinetic_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_potential_n_e_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_potential_n_e_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_ecp_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_ecp_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_core_hamiltonian_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_core_hamiltonian_im_64 +end interface + interface integer(trexio_exit_code) function trexio_read_mo_coefficient_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -1926,6 +2278,15 @@ interface end function trexio_read_mo_coefficient_64 end interface +interface + integer(trexio_exit_code) function trexio_read_mo_coefficient_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_mo_coefficient_im_64 +end interface + interface integer(trexio_exit_code) function trexio_read_mo_occupation_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -1980,6 +2341,51 @@ interface end function trexio_read_mo_1e_int_core_hamiltonian_64 end interface +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_overlap_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_overlap_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_kinetic_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_kinetic_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_potential_n_e_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_potential_n_e_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_ecp_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_ecp_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_core_hamiltonian_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_core_hamiltonian_im_64 +end interface + interface integer(trexio_exit_code) function trexio_read_rdm_1e_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -2007,6 +2413,42 @@ interface end function trexio_read_rdm_1e_dn_64 end interface +interface + integer(trexio_exit_code) function trexio_read_cell_a_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_cell_a_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_cell_b_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_cell_b_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_cell_c_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_cell_c_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_pbc_k_point_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_pbc_k_point_64 +end interface + interface integer(trexio_exit_code) function trexio_read_qmc_point_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -2241,6 +2683,51 @@ interface end function trexio_read_ao_1e_int_core_hamiltonian end interface +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_overlap_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_overlap_im +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_kinetic_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_kinetic_im +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_potential_n_e_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_potential_n_e_im +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_ecp_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_ecp_im +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_1e_int_core_hamiltonian_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_core_hamiltonian_im +end interface + interface integer(trexio_exit_code) function trexio_read_mo_coefficient (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -2250,6 +2737,15 @@ interface end function trexio_read_mo_coefficient end interface +interface + integer(trexio_exit_code) function trexio_read_mo_coefficient_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_mo_coefficient_im +end interface + interface integer(trexio_exit_code) function trexio_read_mo_occupation (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -2304,6 +2800,51 @@ interface end function trexio_read_mo_1e_int_core_hamiltonian end interface +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_overlap_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_overlap_im +end interface + +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_kinetic_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_kinetic_im +end interface + +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_potential_n_e_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_potential_n_e_im +end interface + +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_ecp_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_ecp_im +end interface + +interface + integer(trexio_exit_code) function trexio_read_mo_1e_int_core_hamiltonian_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_core_hamiltonian_im +end interface + interface integer(trexio_exit_code) function trexio_read_rdm_1e (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -2331,6 +2872,42 @@ interface end function trexio_read_rdm_1e_dn end interface +interface + integer(trexio_exit_code) function trexio_read_cell_a (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_cell_a +end interface + +interface + integer(trexio_exit_code) function trexio_read_cell_b (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_cell_b +end interface + +interface + integer(trexio_exit_code) function trexio_read_cell_c (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_cell_c +end interface + +interface + integer(trexio_exit_code) function trexio_read_pbc_k_point (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_pbc_k_point +end interface + interface integer(trexio_exit_code) function trexio_read_qmc_point (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -2922,6 +3499,15 @@ interface end function trexio_write_state_num_32 end interface +interface + integer(trexio_exit_code) function trexio_write_pbc_periodic_32 (trex_file, num) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num + end function trexio_write_pbc_periodic_32 +end interface + interface integer(trexio_exit_code) function trexio_write_qmc_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding @@ -3066,6 +3652,15 @@ interface end function trexio_write_state_num_64 end interface +interface + integer(trexio_exit_code) function trexio_write_pbc_periodic_64 (trex_file, num) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: num + end function trexio_write_pbc_periodic_64 +end interface + interface integer(trexio_exit_code) function trexio_write_qmc_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding @@ -3210,6 +3805,15 @@ interface end function trexio_write_state_num end interface +interface + integer(trexio_exit_code) function trexio_write_pbc_periodic (trex_file, num) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num + end function trexio_write_pbc_periodic +end interface + interface integer(trexio_exit_code) function trexio_write_qmc_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding @@ -3481,6 +4085,51 @@ interface end function trexio_write_ao_1e_int_core_hamiltonian_32 end interface +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_overlap_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_overlap_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_kinetic_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_kinetic_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_potential_n_e_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_potential_n_e_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_ecp_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_ecp_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_core_hamiltonian_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_core_hamiltonian_im_32 +end interface + interface integer(trexio_exit_code) function trexio_write_mo_coefficient_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -3490,6 +4139,15 @@ interface end function trexio_write_mo_coefficient_32 end interface +interface + integer(trexio_exit_code) function trexio_write_mo_coefficient_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_mo_coefficient_im_32 +end interface + interface integer(trexio_exit_code) function trexio_write_mo_occupation_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -3544,6 +4202,51 @@ interface end function trexio_write_mo_1e_int_core_hamiltonian_32 end interface +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_overlap_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_overlap_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_kinetic_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_kinetic_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_potential_n_e_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_potential_n_e_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_ecp_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_ecp_im_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_core_hamiltonian_im_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_core_hamiltonian_im_32 +end interface + interface integer(trexio_exit_code) function trexio_write_rdm_1e_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -3571,6 +4274,42 @@ interface end function trexio_write_rdm_1e_dn_32 end interface +interface + integer(trexio_exit_code) function trexio_write_cell_a_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_cell_a_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_cell_b_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_cell_b_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_cell_c_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_cell_c_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_pbc_k_point_32 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_pbc_k_point_32 +end interface + interface integer(trexio_exit_code) function trexio_write_qmc_point_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -3805,6 +4544,51 @@ interface end function trexio_write_ao_1e_int_core_hamiltonian_64 end interface +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_overlap_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_overlap_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_kinetic_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_kinetic_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_potential_n_e_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_potential_n_e_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_ecp_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_ecp_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_core_hamiltonian_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_core_hamiltonian_im_64 +end interface + interface integer(trexio_exit_code) function trexio_write_mo_coefficient_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -3814,6 +4598,15 @@ interface end function trexio_write_mo_coefficient_64 end interface +interface + integer(trexio_exit_code) function trexio_write_mo_coefficient_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_mo_coefficient_im_64 +end interface + interface integer(trexio_exit_code) function trexio_write_mo_occupation_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -3868,6 +4661,51 @@ interface end function trexio_write_mo_1e_int_core_hamiltonian_64 end interface +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_overlap_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_overlap_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_kinetic_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_kinetic_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_potential_n_e_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_potential_n_e_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_ecp_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_ecp_im_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_core_hamiltonian_im_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_core_hamiltonian_im_64 +end interface + interface integer(trexio_exit_code) function trexio_write_rdm_1e_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -3895,6 +4733,42 @@ interface end function trexio_write_rdm_1e_dn_64 end interface +interface + integer(trexio_exit_code) function trexio_write_cell_a_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_cell_a_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_cell_b_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_cell_b_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_cell_c_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_cell_c_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_pbc_k_point_64 (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_pbc_k_point_64 +end interface + interface integer(trexio_exit_code) function trexio_write_qmc_point_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -4129,6 +5003,51 @@ interface end function trexio_write_ao_1e_int_core_hamiltonian end interface +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_overlap_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_overlap_im +end interface + +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_kinetic_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_kinetic_im +end interface + +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_potential_n_e_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_potential_n_e_im +end interface + +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_ecp_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_ecp_im +end interface + +interface + integer(trexio_exit_code) function trexio_write_ao_1e_int_core_hamiltonian_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_core_hamiltonian_im +end interface + interface integer(trexio_exit_code) function trexio_write_mo_coefficient (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -4138,6 +5057,15 @@ interface end function trexio_write_mo_coefficient end interface +interface + integer(trexio_exit_code) function trexio_write_mo_coefficient_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_mo_coefficient_im +end interface + interface integer(trexio_exit_code) function trexio_write_mo_occupation (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -4192,6 +5120,51 @@ interface end function trexio_write_mo_1e_int_core_hamiltonian end interface +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_overlap_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_overlap_im +end interface + +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_kinetic_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_kinetic_im +end interface + +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_potential_n_e_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_potential_n_e_im +end interface + +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_ecp_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_ecp_im +end interface + +interface + integer(trexio_exit_code) function trexio_write_mo_1e_int_core_hamiltonian_im (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_core_hamiltonian_im +end interface + interface integer(trexio_exit_code) function trexio_write_rdm_1e (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -4219,6 +5192,42 @@ interface end function trexio_write_rdm_1e_dn end interface +interface + integer(trexio_exit_code) function trexio_write_cell_a (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_cell_a +end interface + +interface + integer(trexio_exit_code) function trexio_write_cell_b (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_cell_b +end interface + +interface + integer(trexio_exit_code) function trexio_write_cell_c (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_cell_c +end interface + +interface + integer(trexio_exit_code) function trexio_write_pbc_k_point (trex_file, dset) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_pbc_k_point +end interface + interface integer(trexio_exit_code) function trexio_write_qmc_point (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding @@ -4754,6 +5763,53 @@ integer(trexio_exit_code) function trexio_inquire (filename) trexio_inquire = trexio_inquire_c(filename_c) end function trexio_inquire +integer(trexio_exit_code) function trexio_to_orbital_list(N_int, d1, list, occupied_num) + use, intrinsic :: iso_c_binding + implicit none + + integer(c_int32_t), intent(in), value :: N_int + integer(c_int64_t), intent(in) :: d1(*) + integer(c_int32_t), intent(out) :: list(*) + integer(c_int32_t), intent(out) :: occupied_num + + integer :: i + + trexio_to_orbital_list = trexio_to_orbital_list_c(N_int, d1, list, occupied_num) + if (trexio_to_orbital_list /= TREXIO_SUCCESS) then + return + endif + + do i = 1,occupied_num + list(i) = list(i) + 1 + enddo +end function trexio_to_orbital_list + + +integer(trexio_exit_code) function trexio_to_orbital_list_up_dn(N_int, d1, list_up, list_dn, occ_num_up, occ_num_dn) + use, intrinsic :: iso_c_binding + implicit none + integer(c_int32_t), intent(in), value :: N_int + integer(c_int64_t), intent(in) :: d1(*) + integer(c_int32_t), intent(out) :: list_up(*) + integer(c_int32_t), intent(out) :: list_dn(*) + integer(c_int32_t), intent(out) :: occ_num_up + integer(c_int32_t), intent(out) :: occ_num_dn + + integer :: i + + trexio_to_orbital_list_up_dn = trexio_to_orbital_list_up_dn_c(N_int, d1, list_up, list_dn, occ_num_up, occ_num_dn) + if (trexio_to_orbital_list_up_dn /= TREXIO_SUCCESS) then + return + endif + + do i = 1,occ_num_up + list_up(i) = list_up(i) + 1 + enddo + do i = 1,occ_num_dn + list_dn(i) = list_dn(i) + 1 + enddo +end function trexio_to_orbital_list_up_dn + subroutine trexio_strarray2str(str_array, max_num_str, max_len_str, str_res) use, intrinsic :: iso_c_binding, only : c_null_char implicit none