From bb3b69e62b6d5946a0653d9be7a87c72a403100a Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 25 May 2022 14:58:35 +0200 Subject: [PATCH] Minor changes --- devel/cassdtq/generators.irp.f | 10 +- devel/trexio/qp_import_trexio.py | 8 +- devel/trexio/trexio_f.f90 | 4270 ++++++++++++++++++++---------- 3 files changed, 2898 insertions(+), 1390 deletions(-) diff --git a/devel/cassdtq/generators.irp.f b/devel/cassdtq/generators.irp.f index 66ffe10..2114e35 100644 --- a/devel/cassdtq/generators.irp.f +++ b/devel/cassdtq/generators.irp.f @@ -31,11 +31,11 @@ BEGIN_PROVIDER [ integer, N_det_generators ] call write_int(6,N_det_generators,'Number of generators') END_PROVIDER - BEGIN_PROVIDER [ integer(bit_kind), psi_det_generators, (N_int,2,psi_det_size) ] -&BEGIN_PROVIDER [ double precision, psi_coef_generators, (psi_det_size,N_states) ] -&BEGIN_PROVIDER [ integer(bit_kind), psi_det_sorted_gen, (N_int,2,psi_det_size) ] -&BEGIN_PROVIDER [ double precision, psi_coef_sorted_gen, (psi_det_size,N_states) ] -&BEGIN_PROVIDER [ integer, psi_det_sorted_gen_order, (psi_det_size) ] + BEGIN_PROVIDER [ integer(bit_kind), psi_det_generators, (N_int,2,N_det) ] +&BEGIN_PROVIDER [ double precision, psi_coef_generators, (N_det,N_states) ] +&BEGIN_PROVIDER [ integer(bit_kind), psi_det_sorted_gen, (N_int,2,N_det) ] +&BEGIN_PROVIDER [ double precision, psi_coef_sorted_gen, (N_det,N_states) ] +&BEGIN_PROVIDER [ integer, psi_det_sorted_gen_order, (N_det) ] implicit none BEGIN_DOC ! For Single reference wave functions, the generator is the diff --git a/devel/trexio/qp_import_trexio.py b/devel/trexio/qp_import_trexio.py index 2037a8f..371ec21 100755 --- a/devel/trexio/qp_import_trexio.py +++ b/devel/trexio/qp_import_trexio.py @@ -248,7 +248,10 @@ def write_ezfio(trexio_filename, filename): "ROHF" : "Canonical", "UHF" : "Canonical", "Natural": "Natural" } - label = labels[trexio.read_mo_type(trexio_file)] + try: + label = labels[trexio.read_mo_type(trexio_file)] + except KeyError: + label = "Canonical" ezfio.set_mo_basis_mo_label(label) try: @@ -369,7 +372,8 @@ def get_full_path(file_path): if __name__ == '__main__': ARGUMENTS = docopt(__doc__) - trexio_filename = get_full_path(ARGUMENTS['FILE']) + FILE = ARGUMENTS['FILE'] + trexio_filename = get_full_path(FILE) if ARGUMENTS["--output"]: EZFIO_FILE = get_full_path(ARGUMENTS["--output"]) diff --git a/devel/trexio/trexio_f.f90 b/devel/trexio/trexio_f.f90 index e8b1e79..4060676 100644 --- a/devel/trexio/trexio_f.f90 +++ b/devel/trexio/trexio_f.f90 @@ -3,8 +3,9 @@ module trexio use, intrinsic :: iso_c_binding implicit none - integer, parameter :: trexio_exit_code = 4 - integer, parameter :: trexio_backend = 4 + integer, parameter :: trexio_exit_code = c_int32_t + integer, parameter :: trexio_back_end_t = c_int32_t + integer, parameter :: trexio_t = c_int64_t character(kind=c_char), parameter :: TREXIO_DELIM = c_new_line @@ -36,3254 +37,4703 @@ integer(trexio_exit_code), parameter :: TREXIO_UNSAFE_ARRAY_DIM = 23 integer(trexio_exit_code), parameter :: TREXIO_ATTR_MISSING = 24 integer(trexio_exit_code), parameter :: TREXIO_DSET_MISSING = 25 integer(trexio_exit_code), parameter :: TREXIO_BACK_END_MISSING = 26 +integer(trexio_exit_code), parameter :: TREXIO_INVALID_ARG_6 = 27 +integer(trexio_exit_code), parameter :: TREXIO_INVALID_ARG_7 = 28 +integer(trexio_exit_code), parameter :: TREXIO_INVALID_ARG_8 = 29 integer(trexio_exit_code), parameter :: TREXIO_INVALID_STR_LEN = 30 integer(trexio_exit_code), parameter :: TREXIO_INT_SIZE_OVERFLOW = 31 +integer(trexio_exit_code), parameter :: TREXIO_SAFE_MODE = 32 +integer(trexio_exit_code), parameter :: TREXIO_INVALID_ELECTRON_NUM = 33 +integer(trexio_exit_code), parameter :: TREXIO_INVALID_DETERMINANT_NUM = 34 +integer(trexio_exit_code), parameter :: TREXIO_INVALID_STATE = 35 +integer(trexio_exit_code), parameter :: TREXIO_VERSION_PARSING_ISSUE = 36 interface subroutine trexio_string_of_error (error, string) bind(C, name='trexio_string_of_error_f') use, intrinsic :: iso_c_binding import - integer (trexio_exit_code), intent(in), value :: error - character, intent(out) :: string(128) + integer(trexio_exit_code), intent(in), value :: error + character(kind=c_char), intent(out) :: string(128) end subroutine trexio_string_of_error end interface -integer(trexio_backend), parameter :: TREXIO_HDF5 = 0 - integer(trexio_backend), parameter :: TREXIO_TEXT = 1 -! integer(trexio_backend), parameter :: TREXIO_JSON = 2 - integer(trexio_backend), parameter :: TREXIO_INVALID_BACK_END = 2 +integer(trexio_back_end_t), parameter :: TREXIO_HDF5 = 0 + integer(trexio_back_end_t), parameter :: TREXIO_TEXT = 1 +! integer(trexio_back_end_t), parameter :: TREXIO_JSON = 2 + integer(trexio_back_end_t), parameter :: TREXIO_INVALID_BACK_END = 2 + integer(trexio_back_end_t), parameter :: TREXIO_AUTO = TREXIO_INVALID_BACK_END interface - logical function trexio_has_backend (back_end) bind(C) + logical(c_bool) function trexio_has_back_end (back_end) bind(C) use, intrinsic :: iso_c_binding - integer(4), intent(in), value :: back_end + import + integer(trexio_back_end_t), intent(in), value :: back_end + end function trexio_has_back_end +end interface + +interface + logical(c_bool) function trexio_has_backend (back_end) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_back_end_t), intent(in), value :: back_end end function trexio_has_backend end interface interface - integer(8) function trexio_open_c (filename, mode, backend, rc_open) bind(C, name="trexio_open") + integer(trexio_t) function trexio_open_c (filename, mode, back_end, rc_open) bind(C, name="trexio_open") use, intrinsic :: iso_c_binding import - character(kind=c_char), dimension(*) :: filename - character, intent(in), value :: mode - integer(trexio_backend), intent(in), value :: backend - integer(trexio_exit_code), intent(out) :: rc_open + character(kind=c_char), dimension(*) :: filename + character(kind=c_char), intent(in), value :: mode + integer(trexio_back_end_t), intent(in), value :: back_end + integer(trexio_exit_code), intent(out) :: rc_open end function trexio_open_c end interface interface - integer function trexio_set_one_based(trex_file) bind(C) + integer(trexio_exit_code) function trexio_set_one_based(trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_set_one_based end interface interface - integer function trexio_close (trex_file) bind(C) + integer(trexio_exit_code) function trexio_close (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_close end interface -character(len = 12) :: TREXIO_PACKAGE_VERSION = "2.0.0" -integer(4) :: TREXIO_VERSION_MAJOR = 2 -integer(4) :: TREXIO_VERSION_MINOR = 0 -integer(4) :: TREXIO_VERSION_PATCH = 0 +interface + integer(trexio_exit_code) function trexio_inquire_c (filename) bind(C, name="trexio_inquire") + use, intrinsic :: iso_c_binding + import + character(kind=c_char), dimension(*) :: filename + end function trexio_inquire_c +end interface interface - integer function trexio_has_metadata_code_num (trex_file) bind(C) + integer(trexio_exit_code) function trexio_set_state (trex_file, state) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: state + end function trexio_set_state +end interface + +interface + integer(trexio_exit_code) function trexio_get_state (trex_file, state) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: state + end function trexio_get_state +end interface + +interface + integer function trexio_info () bind(C) + use, intrinsic :: iso_c_binding + end function trexio_info +end interface + +interface + integer(trexio_exit_code) function trexio_to_orbital_list(N_int, d1, list, occupied_num) bind(C) + 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) :: occupied_num + end function trexio_to_orbital_list +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) + 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) :: occ_num_up + integer(c_int32_t), intent(inout) :: occ_num_dn + end function trexio_to_orbital_list_up_dn +end interface + +character(len = 12) :: TREXIO_PACKAGE_VERSION = "2.2.0" +integer :: TREXIO_VERSION_MAJOR = 2 +integer :: TREXIO_VERSION_MINOR = 2 +integer :: TREXIO_VERSION_PATCH = 0 +character(len = 64) :: TREXIO_GIT_HASH = "6edb5a39d7cd093df621dcd10b9a90b0c70b8170" + +interface + integer(trexio_exit_code) function trexio_delete_metadata (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_metadata +end interface + +interface + integer(trexio_exit_code) function trexio_delete_electron (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_electron +end interface + +interface + integer(trexio_exit_code) function trexio_delete_nucleus (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_nucleus +end interface + +interface + integer(trexio_exit_code) function trexio_delete_ecp (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_ecp +end interface + +interface + integer(trexio_exit_code) function trexio_delete_basis (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_basis +end interface + +interface + integer(trexio_exit_code) function trexio_delete_ao (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_ao +end interface + +interface + integer(trexio_exit_code) function trexio_delete_ao_1e_int (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_ao_1e_int +end interface + +interface + integer(trexio_exit_code) function trexio_delete_ao_2e_int (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_ao_2e_int +end interface + +interface + integer(trexio_exit_code) function trexio_delete_mo (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_mo +end interface + +interface + integer(trexio_exit_code) function trexio_delete_mo_1e_int (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_mo_1e_int +end interface + +interface + integer(trexio_exit_code) function trexio_delete_mo_2e_int (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_mo_2e_int +end interface + +interface + integer(trexio_exit_code) function trexio_delete_determinant (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_determinant +end interface + +interface + integer(trexio_exit_code) function trexio_delete_state (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_state +end interface + +interface + integer(trexio_exit_code) function trexio_delete_rdm (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_rdm +end interface + +interface + integer(trexio_exit_code) function trexio_delete_qmc (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file + end function trexio_delete_qmc +end interface + +interface + integer(trexio_exit_code) function trexio_has_metadata_code_num (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_metadata_code_num end interface interface - integer function trexio_has_metadata_author_num (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_metadata_author_num (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_metadata_author_num end interface interface - integer function trexio_has_electron_up_num (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_metadata_unsafe (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_metadata_unsafe +end interface + +interface + integer(trexio_exit_code) function trexio_has_electron_num (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_electron_num +end interface + +interface + integer(trexio_exit_code) function trexio_has_electron_up_num (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_electron_up_num end interface interface - integer function trexio_has_electron_dn_num (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_electron_dn_num (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_electron_dn_num end interface interface - integer function trexio_has_nucleus_num (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_nucleus_num (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_nucleus_num end interface interface - integer function trexio_has_nucleus_repulsion (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_nucleus_repulsion (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_nucleus_repulsion end interface interface - integer function trexio_has_ecp_num (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ecp_num (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ecp_num end interface interface - integer function trexio_has_basis_prim_num (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_basis_prim_num (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_basis_prim_num end interface interface - integer function trexio_has_basis_shell_num (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_basis_shell_num (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_basis_shell_num end interface interface - integer function trexio_has_ao_cartesian (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ao_cartesian (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ao_cartesian end interface interface - integer function trexio_has_ao_num (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ao_num (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ao_num end interface interface - integer function trexio_has_mo_num (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_mo_num (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_mo_num end interface interface - integer function trexio_has_metadata_package_version (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_determinant_num (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_determinant_num +end interface + +interface + integer(trexio_exit_code) function trexio_has_state_num (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_state_num +end interface + +interface + integer(trexio_exit_code) function trexio_has_qmc_num (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_qmc_num +end interface + +interface + integer(trexio_exit_code) function trexio_has_metadata_package_version (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(trexio_t), intent(in), value :: trex_file end function trexio_has_metadata_package_version end interface interface - integer function trexio_has_metadata_description (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_metadata_description (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(trexio_t), intent(in), value :: trex_file end function trexio_has_metadata_description end interface interface - integer function trexio_has_nucleus_point_group (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_nucleus_point_group (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(trexio_t), intent(in), value :: trex_file end function trexio_has_nucleus_point_group end interface interface - integer function trexio_has_basis_type (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_basis_type (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(trexio_t), intent(in), value :: trex_file end function trexio_has_basis_type end interface interface - integer function trexio_has_mo_type (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_mo_type (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(trexio_t), intent(in), value :: trex_file end function trexio_has_mo_type end interface interface - integer function trexio_has_nucleus_charge (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_nucleus_charge (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_nucleus_charge end interface interface - integer function trexio_has_nucleus_coord (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_nucleus_coord (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_nucleus_coord end interface interface - integer function trexio_has_ecp_max_ang_mom_plus_1 (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ecp_max_ang_mom_plus_1 (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ecp_max_ang_mom_plus_1 end interface interface - integer function trexio_has_ecp_z_core (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ecp_z_core (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ecp_z_core end interface interface - integer function trexio_has_ecp_ang_mom (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ecp_ang_mom (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ecp_ang_mom end interface interface - integer function trexio_has_ecp_nucleus_index (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ecp_nucleus_index (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ecp_nucleus_index end interface interface - integer function trexio_has_ecp_exponent (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ecp_exponent (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ecp_exponent end interface interface - integer function trexio_has_ecp_coefficient (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ecp_coefficient (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ecp_coefficient end interface interface - integer function trexio_has_ecp_power (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ecp_power (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ecp_power end interface interface - integer function trexio_has_basis_nucleus_index (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_basis_nucleus_index (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_basis_nucleus_index end interface interface - integer function trexio_has_basis_shell_ang_mom (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_basis_shell_ang_mom (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_basis_shell_ang_mom end interface interface - integer function trexio_has_basis_shell_factor (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_basis_shell_factor (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_basis_shell_factor end interface interface - integer function trexio_has_basis_shell_index (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_basis_shell_index (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_basis_shell_index end interface interface - integer function trexio_has_basis_exponent (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_basis_exponent (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_basis_exponent end interface interface - integer function trexio_has_basis_coefficient (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_basis_coefficient (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_basis_coefficient end interface interface - integer function trexio_has_basis_prim_factor (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_basis_prim_factor (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_basis_prim_factor end interface interface - integer function trexio_has_ao_shell (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ao_shell (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ao_shell end interface interface - integer function trexio_has_ao_normalization (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ao_normalization (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ao_normalization end interface interface - integer function trexio_has_ao_1e_int_overlap (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ao_1e_int_overlap (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ao_1e_int_overlap end interface interface - integer function trexio_has_ao_1e_int_kinetic (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ao_1e_int_kinetic (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ao_1e_int_kinetic end interface interface - integer function trexio_has_ao_1e_int_potential_n_e (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ao_1e_int_potential_n_e (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ao_1e_int_potential_n_e end interface interface - integer function trexio_has_ao_1e_int_ecp_local (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ao_1e_int_ecp (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - end function trexio_has_ao_1e_int_ecp_local + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_ao_1e_int_ecp end interface interface - integer function trexio_has_ao_1e_int_ecp_non_local (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ao_1e_int_core_hamiltonian (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - end function trexio_has_ao_1e_int_ecp_non_local -end interface - -interface - integer function trexio_has_ao_1e_int_core_hamiltonian (trex_file) bind(C) - use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ao_1e_int_core_hamiltonian end interface interface - integer function trexio_has_mo_coefficient (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_mo_coefficient (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_mo_coefficient end interface interface - integer function trexio_has_mo_occupation (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_mo_occupation (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_mo_occupation end interface interface - integer function trexio_has_mo_1e_int_overlap (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_mo_1e_int_overlap (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_mo_1e_int_overlap end interface interface - integer function trexio_has_mo_1e_int_kinetic (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_mo_1e_int_kinetic (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_mo_1e_int_kinetic end interface interface - integer function trexio_has_mo_1e_int_potential_n_e (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_mo_1e_int_potential_n_e (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_mo_1e_int_potential_n_e end interface interface - integer function trexio_has_mo_1e_int_ecp_local (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_mo_1e_int_ecp (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - end function trexio_has_mo_1e_int_ecp_local + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_mo_1e_int_ecp end interface interface - integer function trexio_has_mo_1e_int_ecp_non_local (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_mo_1e_int_core_hamiltonian (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - end function trexio_has_mo_1e_int_ecp_non_local -end interface - -interface - integer function trexio_has_mo_1e_int_core_hamiltonian (trex_file) bind(C) - use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_mo_1e_int_core_hamiltonian end interface interface - integer function trexio_has_rdm_1e (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_rdm_1e (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_rdm_1e end interface interface - integer function trexio_has_rdm_1e_up (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_rdm_1e_up (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_rdm_1e_up end interface interface - integer function trexio_has_rdm_1e_dn (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_rdm_1e_dn (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_rdm_1e_dn end interface interface - integer function trexio_has_ao_2e_int_eri (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_qmc_point (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_qmc_point +end interface + +interface + integer(trexio_exit_code) function trexio_has_qmc_psi (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_qmc_psi +end interface + +interface + integer(trexio_exit_code) function trexio_has_qmc_e_loc (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_qmc_e_loc +end interface + +interface + integer(trexio_exit_code) function trexio_has_ao_2e_int_eri (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ao_2e_int_eri end interface interface - integer function trexio_has_ao_2e_int_eri_lr (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_ao_2e_int_eri_lr (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_ao_2e_int_eri_lr end interface interface - integer function trexio_has_mo_2e_int_eri (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_mo_2e_int_eri (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_mo_2e_int_eri end interface interface - integer function trexio_has_mo_2e_int_eri_lr (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_mo_2e_int_eri_lr (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_mo_2e_int_eri_lr end interface interface - integer function trexio_has_rdm_2e (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_rdm_2e (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_rdm_2e end interface interface - integer function trexio_has_rdm_2e_upup (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_rdm_2e_upup (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_rdm_2e_upup end interface interface - integer function trexio_has_rdm_2e_dndn (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_rdm_2e_dndn (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_rdm_2e_dndn end interface interface - integer function trexio_has_rdm_2e_updn (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_rdm_2e_updn (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_rdm_2e_updn end interface interface - integer function trexio_has_metadata_code (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_rdm_2e_dnup (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_rdm_2e_dnup +end interface + +interface + integer(trexio_exit_code) function trexio_has_metadata_code (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_metadata_code end interface interface - integer function trexio_has_metadata_author (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_metadata_author (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_metadata_author end interface interface - integer function trexio_has_nucleus_label (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_nucleus_label (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_nucleus_label end interface interface - integer function trexio_has_mo_class (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_mo_class (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_mo_class end interface interface - integer function trexio_has_mo_symmetry (trex_file) bind(C) + integer(trexio_exit_code) function trexio_has_mo_symmetry (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file + import + integer(c_int64_t), intent(in), value :: trex_file end function trexio_has_mo_symmetry end interface interface - integer function trexio_read_metadata_code_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_has_state_label (trex_file) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_state_label +end interface + +interface + integer(trexio_exit_code) function trexio_read_metadata_code_num_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_metadata_code_num_32 end interface interface - integer function trexio_read_metadata_author_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_metadata_author_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_metadata_author_num_32 end interface interface - integer function trexio_read_electron_up_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_metadata_unsafe_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num + end function trexio_read_metadata_unsafe_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_electron_num_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_electron_num_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_electron_up_num_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_electron_up_num_32 end interface interface - integer function trexio_read_electron_dn_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_electron_dn_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_electron_dn_num_32 end interface interface - integer function trexio_read_nucleus_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_nucleus_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_nucleus_num_32 end interface interface - integer function trexio_read_nucleus_repulsion_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_nucleus_repulsion_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: num end function trexio_read_nucleus_repulsion_32 end interface interface - integer function trexio_read_ecp_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_ecp_num_32 end interface interface - integer function trexio_read_basis_prim_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_basis_prim_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_basis_prim_num_32 end interface interface - integer function trexio_read_basis_shell_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_basis_shell_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_basis_shell_num_32 end interface interface - integer function trexio_read_ao_cartesian_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_ao_cartesian_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_ao_cartesian_32 end interface interface - integer function trexio_read_ao_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_ao_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_ao_num_32 end interface interface - integer function trexio_read_mo_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_mo_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_mo_num_32 end interface interface - integer function trexio_read_metadata_code_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_determinant_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num + end function trexio_read_determinant_num_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_state_num_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_state_num_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_qmc_num_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_qmc_num_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_metadata_code_num_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_metadata_code_num_64 end interface interface - integer function trexio_read_metadata_author_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_metadata_author_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: num end function trexio_read_metadata_author_num_64 end interface interface - integer function trexio_read_electron_up_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_metadata_unsafe_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: num + end function trexio_read_metadata_unsafe_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_electron_num_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_electron_num_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_electron_up_num_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_electron_up_num_64 end interface interface - integer function trexio_read_electron_dn_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_electron_dn_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: num end function trexio_read_electron_dn_num_64 end interface interface - integer function trexio_read_nucleus_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_nucleus_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: num end function trexio_read_nucleus_num_64 end interface interface - integer function trexio_read_nucleus_repulsion_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_nucleus_repulsion_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: num end function trexio_read_nucleus_repulsion_64 end interface interface - integer function trexio_read_ecp_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: num end function trexio_read_ecp_num_64 end interface interface - integer function trexio_read_basis_prim_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_basis_prim_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: num end function trexio_read_basis_prim_num_64 end interface interface - integer function trexio_read_basis_shell_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_basis_shell_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: num end function trexio_read_basis_shell_num_64 end interface interface - integer function trexio_read_ao_cartesian_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_ao_cartesian_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: num end function trexio_read_ao_cartesian_64 end interface interface - integer function trexio_read_ao_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_ao_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: num end function trexio_read_ao_num_64 end interface interface - integer function trexio_read_mo_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_mo_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: num end function trexio_read_mo_num_64 end interface interface - integer function trexio_read_metadata_code_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_determinant_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: num + end function trexio_read_determinant_num_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_state_num_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_state_num_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_qmc_num_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_qmc_num_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_metadata_code_num (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_metadata_code_num end interface interface - integer function trexio_read_metadata_author_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_metadata_author_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_metadata_author_num end interface interface - integer function trexio_read_electron_up_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_metadata_unsafe (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num + end function trexio_read_metadata_unsafe +end interface + +interface + integer(trexio_exit_code) function trexio_read_electron_num (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_electron_num +end interface + +interface + integer(trexio_exit_code) function trexio_read_electron_up_num (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_electron_up_num end interface interface - integer function trexio_read_electron_dn_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_electron_dn_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_electron_dn_num end interface interface - integer function trexio_read_nucleus_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_nucleus_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_nucleus_num end interface interface - integer function trexio_read_nucleus_repulsion (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_nucleus_repulsion (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: num end function trexio_read_nucleus_repulsion end interface interface - integer function trexio_read_ecp_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_ecp_num end interface interface - integer function trexio_read_basis_prim_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_basis_prim_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_basis_prim_num end interface interface - integer function trexio_read_basis_shell_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_basis_shell_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_basis_shell_num end interface interface - integer function trexio_read_ao_cartesian (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_ao_cartesian (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_ao_cartesian end interface interface - integer function trexio_read_ao_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_ao_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_ao_num end interface interface - integer function trexio_read_mo_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_mo_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: num end function trexio_read_mo_num end interface interface - integer function trexio_read_metadata_package_version_c (trex_file, str, max_str_len) & + integer(trexio_exit_code) function trexio_read_determinant_num (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_determinant_num +end interface + +interface + integer(trexio_exit_code) function trexio_read_state_num (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_state_num +end interface + +interface + integer(trexio_exit_code) function trexio_read_qmc_num (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_qmc_num +end interface + +interface + integer(trexio_exit_code) function trexio_read_metadata_package_version_c (trex_file, str, max_str_len) & bind(C, name="trexio_read_metadata_package_version") use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(out) :: str(*) - integer(4), intent(in), value :: max_str_len + import + integer(trexio_t), intent(in), value :: trex_file + character(kind=c_char), intent(out) :: str(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_read_metadata_package_version_c end interface interface - integer function trexio_read_metadata_description_c (trex_file, str, max_str_len) & + integer(trexio_exit_code) function trexio_read_metadata_description_c (trex_file, str, max_str_len) & bind(C, name="trexio_read_metadata_description") use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(out) :: str(*) - integer(4), intent(in), value :: max_str_len + import + integer(trexio_t), intent(in), value :: trex_file + character(kind=c_char), intent(out) :: str(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_read_metadata_description_c end interface interface - integer function trexio_read_nucleus_point_group_c (trex_file, str, max_str_len) & + integer(trexio_exit_code) function trexio_read_nucleus_point_group_c (trex_file, str, max_str_len) & bind(C, name="trexio_read_nucleus_point_group") use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(out) :: str(*) - integer(4), intent(in), value :: max_str_len + import + integer(trexio_t), intent(in), value :: trex_file + character(kind=c_char), intent(out) :: str(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_read_nucleus_point_group_c end interface interface - integer function trexio_read_basis_type_c (trex_file, str, max_str_len) & + integer(trexio_exit_code) function trexio_read_basis_type_c (trex_file, str, max_str_len) & bind(C, name="trexio_read_basis_type") use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(out) :: str(*) - integer(4), intent(in), value :: max_str_len + import + integer(trexio_t), intent(in), value :: trex_file + character(kind=c_char), intent(out) :: str(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_read_basis_type_c end interface interface - integer function trexio_read_mo_type_c (trex_file, str, max_str_len) & + integer(trexio_exit_code) function trexio_read_mo_type_c (trex_file, str, max_str_len) & bind(C, name="trexio_read_mo_type") use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(out) :: str(*) - integer(4), intent(in), value :: max_str_len + import + integer(trexio_t), intent(in), value :: trex_file + character(kind=c_char), intent(out) :: str(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_read_mo_type_c end interface interface - integer function trexio_read_nucleus_charge_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_nucleus_charge_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_nucleus_charge_32 end interface interface - integer function trexio_read_nucleus_coord_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_nucleus_coord_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_nucleus_coord_32 end interface interface - integer function trexio_read_ecp_max_ang_mom_plus_1_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_max_ang_mom_plus_1_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_ecp_max_ang_mom_plus_1_32 end interface interface - integer function trexio_read_ecp_z_core_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_z_core_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_ecp_z_core_32 end interface interface - integer function trexio_read_ecp_ang_mom_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_ang_mom_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_ecp_ang_mom_32 end interface interface - integer function trexio_read_ecp_nucleus_index_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_nucleus_index_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_ecp_nucleus_index_32 end interface interface - integer function trexio_read_ecp_exponent_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_exponent_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_ecp_exponent_32 end interface interface - integer function trexio_read_ecp_coefficient_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_coefficient_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_ecp_coefficient_32 end interface interface - integer function trexio_read_ecp_power_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_power_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_ecp_power_32 end interface interface - integer function trexio_read_basis_nucleus_index_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_nucleus_index_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_basis_nucleus_index_32 end interface interface - integer function trexio_read_basis_shell_ang_mom_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_shell_ang_mom_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_basis_shell_ang_mom_32 end interface interface - integer function trexio_read_basis_shell_factor_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_shell_factor_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_basis_shell_factor_32 end interface interface - integer function trexio_read_basis_shell_index_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_shell_index_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_basis_shell_index_32 end interface interface - integer function trexio_read_basis_exponent_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_exponent_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_basis_exponent_32 end interface interface - integer function trexio_read_basis_coefficient_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_coefficient_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_basis_coefficient_32 end interface interface - integer function trexio_read_basis_prim_factor_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_prim_factor_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_basis_prim_factor_32 end interface interface - integer function trexio_read_ao_shell_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_shell_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_ao_shell_32 end interface interface - integer function trexio_read_ao_normalization_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_normalization_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_ao_normalization_32 end interface interface - integer function trexio_read_ao_1e_int_overlap_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_overlap_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_ao_1e_int_overlap_32 end interface interface - integer function trexio_read_ao_1e_int_kinetic_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_kinetic_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_ao_1e_int_kinetic_32 end interface interface - integer function trexio_read_ao_1e_int_potential_n_e_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_potential_n_e_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + 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_32 end interface interface - integer function trexio_read_ao_1e_int_ecp_local_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_ecp_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) - end function trexio_read_ao_1e_int_ecp_local_32 + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_ecp_32 end interface interface - integer function trexio_read_ao_1e_int_ecp_non_local_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_core_hamiltonian_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) - end function trexio_read_ao_1e_int_ecp_non_local_32 -end interface - -interface - integer function trexio_read_ao_1e_int_core_hamiltonian_32 (trex_file, dset) bind(C) - use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + 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_32 end interface interface - integer function trexio_read_mo_coefficient_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_coefficient_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_mo_coefficient_32 end interface interface - integer function trexio_read_mo_occupation_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_occupation_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_mo_occupation_32 end interface interface - integer function trexio_read_mo_1e_int_overlap_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_overlap_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_mo_1e_int_overlap_32 end interface interface - integer function trexio_read_mo_1e_int_kinetic_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_kinetic_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_mo_1e_int_kinetic_32 end interface interface - integer function trexio_read_mo_1e_int_potential_n_e_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_potential_n_e_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + 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_32 end interface interface - integer function trexio_read_mo_1e_int_ecp_local_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_ecp_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) - end function trexio_read_mo_1e_int_ecp_local_32 + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_ecp_32 end interface interface - integer function trexio_read_mo_1e_int_ecp_non_local_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_core_hamiltonian_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) - end function trexio_read_mo_1e_int_ecp_non_local_32 -end interface - -interface - integer function trexio_read_mo_1e_int_core_hamiltonian_32 (trex_file, dset) bind(C) - use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + 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_32 end interface interface - integer function trexio_read_rdm_1e_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_rdm_1e_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_rdm_1e_32 end interface interface - integer function trexio_read_rdm_1e_up_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_rdm_1e_up_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_rdm_1e_up_32 end interface interface - integer function trexio_read_rdm_1e_dn_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_rdm_1e_dn_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) end function trexio_read_rdm_1e_dn_32 end interface interface - integer function trexio_read_nucleus_charge_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_qmc_point_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(out) :: dset(*) + end function trexio_read_qmc_point_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_qmc_psi_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_qmc_psi_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_qmc_e_loc_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_qmc_e_loc_32 +end interface + +interface + integer(trexio_exit_code) function trexio_read_nucleus_charge_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_nucleus_charge_64 end interface interface - integer function trexio_read_nucleus_coord_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_nucleus_coord_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_nucleus_coord_64 end interface interface - integer function trexio_read_ecp_max_ang_mom_plus_1_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_max_ang_mom_plus_1_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: dset(*) end function trexio_read_ecp_max_ang_mom_plus_1_64 end interface interface - integer function trexio_read_ecp_z_core_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_z_core_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: dset(*) end function trexio_read_ecp_z_core_64 end interface interface - integer function trexio_read_ecp_ang_mom_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_ang_mom_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: dset(*) end function trexio_read_ecp_ang_mom_64 end interface interface - integer function trexio_read_ecp_nucleus_index_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_nucleus_index_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: dset(*) end function trexio_read_ecp_nucleus_index_64 end interface interface - integer function trexio_read_ecp_exponent_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_exponent_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_ecp_exponent_64 end interface interface - integer function trexio_read_ecp_coefficient_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_coefficient_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_ecp_coefficient_64 end interface interface - integer function trexio_read_ecp_power_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_power_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: dset(*) end function trexio_read_ecp_power_64 end interface interface - integer function trexio_read_basis_nucleus_index_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_nucleus_index_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: dset(*) end function trexio_read_basis_nucleus_index_64 end interface interface - integer function trexio_read_basis_shell_ang_mom_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_shell_ang_mom_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: dset(*) end function trexio_read_basis_shell_ang_mom_64 end interface interface - integer function trexio_read_basis_shell_factor_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_shell_factor_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_basis_shell_factor_64 end interface interface - integer function trexio_read_basis_shell_index_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_shell_index_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: dset(*) end function trexio_read_basis_shell_index_64 end interface interface - integer function trexio_read_basis_exponent_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_exponent_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_basis_exponent_64 end interface interface - integer function trexio_read_basis_coefficient_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_coefficient_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_basis_coefficient_64 end interface interface - integer function trexio_read_basis_prim_factor_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_prim_factor_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_basis_prim_factor_64 end interface interface - integer function trexio_read_ao_shell_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_shell_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: dset(*) end function trexio_read_ao_shell_64 end interface interface - integer function trexio_read_ao_normalization_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_normalization_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_ao_normalization_64 end interface interface - integer function trexio_read_ao_1e_int_overlap_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_overlap_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_ao_1e_int_overlap_64 end interface interface - integer function trexio_read_ao_1e_int_kinetic_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_kinetic_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_ao_1e_int_kinetic_64 end interface interface - integer function trexio_read_ao_1e_int_potential_n_e_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_potential_n_e_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + 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_64 end interface interface - integer function trexio_read_ao_1e_int_ecp_local_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_ecp_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) - end function trexio_read_ao_1e_int_ecp_local_64 + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_ecp_64 end interface interface - integer function trexio_read_ao_1e_int_ecp_non_local_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_core_hamiltonian_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) - end function trexio_read_ao_1e_int_ecp_non_local_64 -end interface - -interface - integer function trexio_read_ao_1e_int_core_hamiltonian_64 (trex_file, dset) bind(C) - use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + 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_64 end interface interface - integer function trexio_read_mo_coefficient_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_coefficient_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_mo_coefficient_64 end interface interface - integer function trexio_read_mo_occupation_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_occupation_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_mo_occupation_64 end interface interface - integer function trexio_read_mo_1e_int_overlap_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_overlap_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_mo_1e_int_overlap_64 end interface interface - integer function trexio_read_mo_1e_int_kinetic_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_kinetic_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_mo_1e_int_kinetic_64 end interface interface - integer function trexio_read_mo_1e_int_potential_n_e_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_potential_n_e_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + 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_64 end interface interface - integer function trexio_read_mo_1e_int_ecp_local_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_ecp_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) - end function trexio_read_mo_1e_int_ecp_local_64 + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_ecp_64 end interface interface - integer function trexio_read_mo_1e_int_ecp_non_local_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_core_hamiltonian_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) - end function trexio_read_mo_1e_int_ecp_non_local_64 -end interface - -interface - integer function trexio_read_mo_1e_int_core_hamiltonian_64 (trex_file, dset) bind(C) - use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + 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_64 end interface interface - integer function trexio_read_rdm_1e_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_rdm_1e_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_rdm_1e_64 end interface interface - integer function trexio_read_rdm_1e_up_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_rdm_1e_up_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_rdm_1e_up_64 end interface interface - integer function trexio_read_rdm_1e_dn_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_rdm_1e_dn_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_rdm_1e_dn_64 end interface interface - integer function trexio_read_nucleus_charge (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_qmc_point_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_qmc_point_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_qmc_psi_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_qmc_psi_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_qmc_e_loc_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_qmc_e_loc_64 +end interface + +interface + integer(trexio_exit_code) function trexio_read_nucleus_charge (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_nucleus_charge end interface interface - integer function trexio_read_nucleus_coord (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_nucleus_coord (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_nucleus_coord end interface interface - integer function trexio_read_ecp_max_ang_mom_plus_1 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_max_ang_mom_plus_1 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_ecp_max_ang_mom_plus_1 end interface interface - integer function trexio_read_ecp_z_core (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_z_core (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_ecp_z_core end interface interface - integer function trexio_read_ecp_ang_mom (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_ang_mom (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_ecp_ang_mom end interface interface - integer function trexio_read_ecp_nucleus_index (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_nucleus_index (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_ecp_nucleus_index end interface interface - integer function trexio_read_ecp_exponent (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_exponent (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_ecp_exponent end interface interface - integer function trexio_read_ecp_coefficient (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_coefficient (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_ecp_coefficient end interface interface - integer function trexio_read_ecp_power (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ecp_power (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_ecp_power end interface interface - integer function trexio_read_basis_nucleus_index (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_nucleus_index (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_basis_nucleus_index end interface interface - integer function trexio_read_basis_shell_ang_mom (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_shell_ang_mom (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_basis_shell_ang_mom end interface interface - integer function trexio_read_basis_shell_factor (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_shell_factor (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_basis_shell_factor end interface interface - integer function trexio_read_basis_shell_index (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_shell_index (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_basis_shell_index end interface interface - integer function trexio_read_basis_exponent (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_exponent (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_basis_exponent end interface interface - integer function trexio_read_basis_coefficient (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_coefficient (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_basis_coefficient end interface interface - integer function trexio_read_basis_prim_factor (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_basis_prim_factor (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_basis_prim_factor end interface interface - integer function trexio_read_ao_shell (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_shell (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(out) :: dset(*) end function trexio_read_ao_shell end interface interface - integer function trexio_read_ao_normalization (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_normalization (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_ao_normalization end interface interface - integer function trexio_read_ao_1e_int_overlap (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_overlap (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_ao_1e_int_overlap end interface interface - integer function trexio_read_ao_1e_int_kinetic (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_kinetic (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_ao_1e_int_kinetic end interface interface - integer function trexio_read_ao_1e_int_potential_n_e (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_potential_n_e (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + 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 end interface interface - integer function trexio_read_ao_1e_int_ecp_local (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_ecp (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) - end function trexio_read_ao_1e_int_ecp_local + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_ao_1e_int_ecp end interface interface - integer function trexio_read_ao_1e_int_ecp_non_local (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_ao_1e_int_core_hamiltonian (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) - end function trexio_read_ao_1e_int_ecp_non_local -end interface - -interface - integer function trexio_read_ao_1e_int_core_hamiltonian (trex_file, dset) bind(C) - use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + 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 end interface interface - integer function trexio_read_mo_coefficient (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_coefficient (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_mo_coefficient end interface interface - integer function trexio_read_mo_occupation (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_occupation (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_mo_occupation end interface interface - integer function trexio_read_mo_1e_int_overlap (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_overlap (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_mo_1e_int_overlap end interface interface - integer function trexio_read_mo_1e_int_kinetic (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_kinetic (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_mo_1e_int_kinetic end interface interface - integer function trexio_read_mo_1e_int_potential_n_e (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_potential_n_e (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + 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 end interface interface - integer function trexio_read_mo_1e_int_ecp_local (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_ecp (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) - end function trexio_read_mo_1e_int_ecp_local + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) + end function trexio_read_mo_1e_int_ecp end interface interface - integer function trexio_read_mo_1e_int_ecp_non_local (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_mo_1e_int_core_hamiltonian (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) - end function trexio_read_mo_1e_int_ecp_non_local -end interface - -interface - integer function trexio_read_mo_1e_int_core_hamiltonian (trex_file, dset) bind(C) - use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + 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 end interface interface - integer function trexio_read_rdm_1e (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_rdm_1e (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_rdm_1e end interface interface - integer function trexio_read_rdm_1e_up (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_rdm_1e_up (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_rdm_1e_up end interface interface - integer function trexio_read_rdm_1e_dn (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_read_rdm_1e_dn (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(out) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(out) :: dset(*) end function trexio_read_rdm_1e_dn end interface interface - integer function trexio_read_ao_2e_int_eri (trex_file, & + integer(trexio_exit_code) function trexio_read_qmc_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_qmc_point +end interface + +interface + integer(trexio_exit_code) function trexio_read_qmc_psi (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_qmc_psi +end interface + +interface + integer(trexio_exit_code) function trexio_read_qmc_e_loc (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_qmc_e_loc +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_2e_int_eri (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(inout) :: buffer_size - integer(4), intent(out) :: index_sparse(*) - double precision, intent(out) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + real(c_double), intent(out) :: value_sparse(*) end function trexio_read_ao_2e_int_eri end interface interface - integer function trexio_read_ao_2e_int_eri_lr (trex_file, & + integer(trexio_exit_code) function trexio_read_safe_ao_2e_int_eri (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(out) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_read_safe_ao_2e_int_eri +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_2e_int_eri_lr (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(inout) :: buffer_size - integer(4), intent(out) :: index_sparse(*) - double precision, intent(out) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + real(c_double), intent(out) :: value_sparse(*) end function trexio_read_ao_2e_int_eri_lr end interface interface - integer function trexio_read_mo_2e_int_eri (trex_file, & + integer(trexio_exit_code) function trexio_read_safe_ao_2e_int_eri_lr (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(out) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_read_safe_ao_2e_int_eri_lr +end interface + +interface + integer(trexio_exit_code) function trexio_read_mo_2e_int_eri (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(inout) :: buffer_size - integer(4), intent(out) :: index_sparse(*) - double precision, intent(out) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + real(c_double), intent(out) :: value_sparse(*) end function trexio_read_mo_2e_int_eri end interface interface - integer function trexio_read_mo_2e_int_eri_lr (trex_file, & + integer(trexio_exit_code) function trexio_read_safe_mo_2e_int_eri (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(out) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_read_safe_mo_2e_int_eri +end interface + +interface + integer(trexio_exit_code) function trexio_read_mo_2e_int_eri_lr (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(inout) :: buffer_size - integer(4), intent(out) :: index_sparse(*) - double precision, intent(out) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + real(c_double), intent(out) :: value_sparse(*) end function trexio_read_mo_2e_int_eri_lr end interface interface - integer function trexio_read_rdm_2e (trex_file, & + integer(trexio_exit_code) function trexio_read_safe_mo_2e_int_eri_lr (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(out) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_read_safe_mo_2e_int_eri_lr +end interface + +interface + integer(trexio_exit_code) function trexio_read_rdm_2e (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(inout) :: buffer_size - integer(4), intent(out) :: index_sparse(*) - double precision, intent(out) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + real(c_double), intent(out) :: value_sparse(*) end function trexio_read_rdm_2e end interface interface - integer function trexio_read_rdm_2e_upup (trex_file, & + integer(trexio_exit_code) function trexio_read_safe_rdm_2e (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(out) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_read_safe_rdm_2e +end interface + +interface + integer(trexio_exit_code) function trexio_read_rdm_2e_upup (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(inout) :: buffer_size - integer(4), intent(out) :: index_sparse(*) - double precision, intent(out) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + real(c_double), intent(out) :: value_sparse(*) end function trexio_read_rdm_2e_upup end interface interface - integer function trexio_read_rdm_2e_dndn (trex_file, & + integer(trexio_exit_code) function trexio_read_safe_rdm_2e_upup (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(out) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_read_safe_rdm_2e_upup +end interface + +interface + integer(trexio_exit_code) function trexio_read_rdm_2e_dndn (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(inout) :: buffer_size - integer(4), intent(out) :: index_sparse(*) - double precision, intent(out) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + real(c_double), intent(out) :: value_sparse(*) end function trexio_read_rdm_2e_dndn end interface interface - integer function trexio_read_rdm_2e_updn (trex_file, & + integer(trexio_exit_code) function trexio_read_safe_rdm_2e_dndn (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(out) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_read_safe_rdm_2e_dndn +end interface + +interface + integer(trexio_exit_code) function trexio_read_rdm_2e_updn (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(inout) :: buffer_size - integer(4), intent(out) :: index_sparse(*) - double precision, intent(out) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + real(c_double), intent(out) :: value_sparse(*) end function trexio_read_rdm_2e_updn end interface interface - integer function trexio_read_ao_2e_int_eri_size (trex_file, & + integer(trexio_exit_code) function trexio_read_safe_rdm_2e_updn (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(out) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_read_safe_rdm_2e_updn +end interface + +interface + integer(trexio_exit_code) function trexio_read_rdm_2e_dnup (trex_file, & + offset_file, buffer_size, & + index_sparse, value_sparse) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + real(c_double), intent(out) :: value_sparse(*) + end function trexio_read_rdm_2e_dnup +end interface + +interface + integer(trexio_exit_code) function trexio_read_safe_rdm_2e_dnup (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int32_t), intent(out) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(out) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_read_safe_rdm_2e_dnup +end interface + +interface + integer(trexio_exit_code) function trexio_read_ao_2e_int_eri_size (trex_file, & size_max) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: size_max + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: size_max end function trexio_read_ao_2e_int_eri_size end interface interface - integer function trexio_read_ao_2e_int_eri_lr_size (trex_file, & + integer(trexio_exit_code) function trexio_read_ao_2e_int_eri_lr_size (trex_file, & size_max) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: size_max + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: size_max end function trexio_read_ao_2e_int_eri_lr_size end interface interface - integer function trexio_read_mo_2e_int_eri_size (trex_file, & + integer(trexio_exit_code) function trexio_read_mo_2e_int_eri_size (trex_file, & size_max) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: size_max + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: size_max end function trexio_read_mo_2e_int_eri_size end interface interface - integer function trexio_read_mo_2e_int_eri_lr_size (trex_file, & + integer(trexio_exit_code) function trexio_read_mo_2e_int_eri_lr_size (trex_file, & size_max) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: size_max + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: size_max end function trexio_read_mo_2e_int_eri_lr_size end interface interface - integer function trexio_read_rdm_2e_size (trex_file, & + integer(trexio_exit_code) function trexio_read_rdm_2e_size (trex_file, & size_max) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: size_max + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: size_max end function trexio_read_rdm_2e_size end interface interface - integer function trexio_read_rdm_2e_upup_size (trex_file, & + integer(trexio_exit_code) function trexio_read_rdm_2e_upup_size (trex_file, & size_max) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: size_max + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: size_max end function trexio_read_rdm_2e_upup_size end interface interface - integer function trexio_read_rdm_2e_dndn_size (trex_file, & + integer(trexio_exit_code) function trexio_read_rdm_2e_dndn_size (trex_file, & size_max) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: size_max + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: size_max end function trexio_read_rdm_2e_dndn_size end interface interface - integer function trexio_read_rdm_2e_updn_size (trex_file, & + integer(trexio_exit_code) function trexio_read_rdm_2e_updn_size (trex_file, & size_max) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(out) :: size_max + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: size_max end function trexio_read_rdm_2e_updn_size end interface interface - integer function trexio_read_metadata_code_low (trex_file, dset, max_str_len) bind(C) + integer(trexio_exit_code) function trexio_read_rdm_2e_dnup_size (trex_file, & + size_max) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(out) :: dset(*) - integer(4), intent(in), value :: max_str_len + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: size_max + end function trexio_read_rdm_2e_dnup_size +end interface + +interface + integer(trexio_exit_code) function trexio_read_metadata_code_low (trex_file, dset, max_str_len) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + character(kind=c_char), intent(out) :: dset(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_read_metadata_code_low end interface interface - integer function trexio_read_metadata_author_low (trex_file, dset, max_str_len) bind(C) + integer(trexio_exit_code) function trexio_read_metadata_author_low (trex_file, dset, max_str_len) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(out) :: dset(*) - integer(4), intent(in), value :: max_str_len + import + integer(c_int64_t), intent(in), value :: trex_file + character(kind=c_char), intent(out) :: dset(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_read_metadata_author_low end interface interface - integer function trexio_read_nucleus_label_low (trex_file, dset, max_str_len) bind(C) + integer(trexio_exit_code) function trexio_read_nucleus_label_low (trex_file, dset, max_str_len) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(out) :: dset(*) - integer(4), intent(in), value :: max_str_len + import + integer(c_int64_t), intent(in), value :: trex_file + character(kind=c_char), intent(out) :: dset(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_read_nucleus_label_low end interface interface - integer function trexio_read_mo_class_low (trex_file, dset, max_str_len) bind(C) + integer(trexio_exit_code) function trexio_read_mo_class_low (trex_file, dset, max_str_len) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(out) :: dset(*) - integer(4), intent(in), value :: max_str_len + import + integer(c_int64_t), intent(in), value :: trex_file + character(kind=c_char), intent(out) :: dset(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_read_mo_class_low end interface interface - integer function trexio_read_mo_symmetry_low (trex_file, dset, max_str_len) bind(C) + integer(trexio_exit_code) function trexio_read_mo_symmetry_low (trex_file, dset, max_str_len) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(out) :: dset(*) - integer(4), intent(in), value :: max_str_len + import + integer(c_int64_t), intent(in), value :: trex_file + character(kind=c_char), intent(out) :: dset(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_read_mo_symmetry_low end interface interface - integer function trexio_write_metadata_code_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_read_state_label_low (trex_file, dset, max_str_len) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + character(kind=c_char), intent(out) :: dset(*) + integer(c_int32_t), intent(in), value :: max_str_len + end function trexio_read_state_label_low +end interface + +interface + integer(trexio_exit_code) function trexio_write_metadata_code_num_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_metadata_code_num_32 end interface interface - integer function trexio_write_metadata_author_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_metadata_author_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_metadata_author_num_32 end interface interface - integer function trexio_write_electron_up_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_metadata_unsafe_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num + end function trexio_write_metadata_unsafe_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_electron_num_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_electron_num_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_electron_up_num_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_electron_up_num_32 end interface interface - integer function trexio_write_electron_dn_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_electron_dn_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_electron_dn_num_32 end interface interface - integer function trexio_write_nucleus_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_nucleus_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_nucleus_num_32 end interface interface - integer function trexio_write_nucleus_repulsion_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_nucleus_repulsion_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in), value :: num end function trexio_write_nucleus_repulsion_32 end interface interface - integer function trexio_write_ecp_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_ecp_num_32 end interface interface - integer function trexio_write_basis_prim_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_basis_prim_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_basis_prim_num_32 end interface interface - integer function trexio_write_basis_shell_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_basis_shell_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_basis_shell_num_32 end interface interface - integer function trexio_write_ao_cartesian_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_ao_cartesian_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_ao_cartesian_32 end interface interface - integer function trexio_write_ao_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_ao_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_ao_num_32 end interface interface - integer function trexio_write_mo_num_32 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_mo_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_mo_num_32 end interface interface - integer function trexio_write_metadata_code_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_state_num_32 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num + end function trexio_write_state_num_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_qmc_num_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_qmc_num_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_metadata_code_num_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_metadata_code_num_64 end interface interface - integer function trexio_write_metadata_author_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_metadata_author_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: num end function trexio_write_metadata_author_num_64 end interface interface - integer function trexio_write_electron_up_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_metadata_unsafe_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: num + end function trexio_write_metadata_unsafe_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_electron_num_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_electron_num_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_electron_up_num_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_electron_up_num_64 end interface interface - integer function trexio_write_electron_dn_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_electron_dn_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: num end function trexio_write_electron_dn_num_64 end interface interface - integer function trexio_write_nucleus_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_nucleus_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: num end function trexio_write_nucleus_num_64 end interface interface - integer function trexio_write_nucleus_repulsion_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_nucleus_repulsion_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in), value :: num end function trexio_write_nucleus_repulsion_64 end interface interface - integer function trexio_write_ecp_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: num end function trexio_write_ecp_num_64 end interface interface - integer function trexio_write_basis_prim_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_basis_prim_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: num end function trexio_write_basis_prim_num_64 end interface interface - integer function trexio_write_basis_shell_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_basis_shell_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: num end function trexio_write_basis_shell_num_64 end interface interface - integer function trexio_write_ao_cartesian_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_ao_cartesian_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: num end function trexio_write_ao_cartesian_64 end interface interface - integer function trexio_write_ao_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_ao_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: num end function trexio_write_ao_num_64 end interface interface - integer function trexio_write_mo_num_64 (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_mo_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: num end function trexio_write_mo_num_64 end interface interface - integer function trexio_write_metadata_code_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_state_num_64 (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: num + end function trexio_write_state_num_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_qmc_num_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_qmc_num_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_metadata_code_num (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_metadata_code_num end interface interface - integer function trexio_write_metadata_author_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_metadata_author_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_metadata_author_num end interface interface - integer function trexio_write_electron_up_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_metadata_unsafe (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num + end function trexio_write_metadata_unsafe +end interface + +interface + integer(trexio_exit_code) function trexio_write_electron_num (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_electron_num +end interface + +interface + integer(trexio_exit_code) function trexio_write_electron_up_num (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_electron_up_num end interface interface - integer function trexio_write_electron_dn_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_electron_dn_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_electron_dn_num end interface interface - integer function trexio_write_nucleus_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_nucleus_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_nucleus_num end interface interface - integer function trexio_write_nucleus_repulsion (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_nucleus_repulsion (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in), value :: num end function trexio_write_nucleus_repulsion end interface interface - integer function trexio_write_ecp_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_ecp_num end interface interface - integer function trexio_write_basis_prim_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_basis_prim_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_basis_prim_num end interface interface - integer function trexio_write_basis_shell_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_basis_shell_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_basis_shell_num end interface interface - integer function trexio_write_ao_cartesian (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_ao_cartesian (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_ao_cartesian end interface interface - integer function trexio_write_ao_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_ao_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_ao_num end interface interface - integer function trexio_write_mo_num (trex_file, num) bind(C) + integer(trexio_exit_code) function trexio_write_mo_num (trex_file, num) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: num + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: num end function trexio_write_mo_num end interface interface - integer function trexio_write_metadata_package_version_c (trex_file, str, max_str_len) & + integer(trexio_exit_code) function trexio_write_state_num (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_state_num +end interface + +interface + integer(trexio_exit_code) function trexio_write_qmc_num (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_qmc_num +end interface + +interface + integer(trexio_exit_code) function trexio_write_metadata_package_version_c (trex_file, str, max_str_len) & bind(C, name="trexio_write_metadata_package_version") use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(in) :: str(*) - integer(4), intent(in), value :: max_str_len + import + integer(trexio_t), intent(in), value :: trex_file + character(kind=c_char), intent(in) :: str(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_write_metadata_package_version_c end interface interface - integer function trexio_write_metadata_description_c (trex_file, str, max_str_len) & + integer(trexio_exit_code) function trexio_write_metadata_description_c (trex_file, str, max_str_len) & bind(C, name="trexio_write_metadata_description") use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(in) :: str(*) - integer(4), intent(in), value :: max_str_len + import + integer(trexio_t), intent(in), value :: trex_file + character(kind=c_char), intent(in) :: str(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_write_metadata_description_c end interface interface - integer function trexio_write_nucleus_point_group_c (trex_file, str, max_str_len) & + integer(trexio_exit_code) function trexio_write_nucleus_point_group_c (trex_file, str, max_str_len) & bind(C, name="trexio_write_nucleus_point_group") use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(in) :: str(*) - integer(4), intent(in), value :: max_str_len + import + integer(trexio_t), intent(in), value :: trex_file + character(kind=c_char), intent(in) :: str(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_write_nucleus_point_group_c end interface interface - integer function trexio_write_basis_type_c (trex_file, str, max_str_len) & + integer(trexio_exit_code) function trexio_write_basis_type_c (trex_file, str, max_str_len) & bind(C, name="trexio_write_basis_type") use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(in) :: str(*) - integer(4), intent(in), value :: max_str_len + import + integer(trexio_t), intent(in), value :: trex_file + character(kind=c_char), intent(in) :: str(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_write_basis_type_c end interface interface - integer function trexio_write_mo_type_c (trex_file, str, max_str_len) & + integer(trexio_exit_code) function trexio_write_mo_type_c (trex_file, str, max_str_len) & bind(C, name="trexio_write_mo_type") use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(in) :: str(*) - integer(4), intent(in), value :: max_str_len + import + integer(trexio_t), intent(in), value :: trex_file + character(kind=c_char), intent(in) :: str(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_write_mo_type_c end interface interface - integer function trexio_write_nucleus_charge_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_nucleus_charge_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_nucleus_charge_32 end interface interface - integer function trexio_write_nucleus_coord_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_nucleus_coord_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_nucleus_coord_32 end interface interface - integer function trexio_write_ecp_max_ang_mom_plus_1_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_max_ang_mom_plus_1_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_ecp_max_ang_mom_plus_1_32 end interface interface - integer function trexio_write_ecp_z_core_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_z_core_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_ecp_z_core_32 end interface interface - integer function trexio_write_ecp_ang_mom_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_ang_mom_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_ecp_ang_mom_32 end interface interface - integer function trexio_write_ecp_nucleus_index_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_nucleus_index_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_ecp_nucleus_index_32 end interface interface - integer function trexio_write_ecp_exponent_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_exponent_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_ecp_exponent_32 end interface interface - integer function trexio_write_ecp_coefficient_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_coefficient_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_ecp_coefficient_32 end interface interface - integer function trexio_write_ecp_power_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_power_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_ecp_power_32 end interface interface - integer function trexio_write_basis_nucleus_index_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_nucleus_index_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_basis_nucleus_index_32 end interface interface - integer function trexio_write_basis_shell_ang_mom_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_shell_ang_mom_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_basis_shell_ang_mom_32 end interface interface - integer function trexio_write_basis_shell_factor_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_shell_factor_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_basis_shell_factor_32 end interface interface - integer function trexio_write_basis_shell_index_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_shell_index_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_basis_shell_index_32 end interface interface - integer function trexio_write_basis_exponent_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_exponent_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_basis_exponent_32 end interface interface - integer function trexio_write_basis_coefficient_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_coefficient_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_basis_coefficient_32 end interface interface - integer function trexio_write_basis_prim_factor_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_prim_factor_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_basis_prim_factor_32 end interface interface - integer function trexio_write_ao_shell_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_shell_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_ao_shell_32 end interface interface - integer function trexio_write_ao_normalization_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_normalization_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_ao_normalization_32 end interface interface - integer function trexio_write_ao_1e_int_overlap_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_overlap_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_ao_1e_int_overlap_32 end interface interface - integer function trexio_write_ao_1e_int_kinetic_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_kinetic_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_ao_1e_int_kinetic_32 end interface interface - integer function trexio_write_ao_1e_int_potential_n_e_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_potential_n_e_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + 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_32 end interface interface - integer function trexio_write_ao_1e_int_ecp_local_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_ecp_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) - end function trexio_write_ao_1e_int_ecp_local_32 + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_ecp_32 end interface interface - integer function trexio_write_ao_1e_int_ecp_non_local_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_core_hamiltonian_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) - end function trexio_write_ao_1e_int_ecp_non_local_32 -end interface - -interface - integer function trexio_write_ao_1e_int_core_hamiltonian_32 (trex_file, dset) bind(C) - use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + 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_32 end interface interface - integer function trexio_write_mo_coefficient_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_coefficient_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_mo_coefficient_32 end interface interface - integer function trexio_write_mo_occupation_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_occupation_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_mo_occupation_32 end interface interface - integer function trexio_write_mo_1e_int_overlap_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_overlap_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_mo_1e_int_overlap_32 end interface interface - integer function trexio_write_mo_1e_int_kinetic_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_kinetic_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_mo_1e_int_kinetic_32 end interface interface - integer function trexio_write_mo_1e_int_potential_n_e_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_potential_n_e_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + 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_32 end interface interface - integer function trexio_write_mo_1e_int_ecp_local_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_ecp_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) - end function trexio_write_mo_1e_int_ecp_local_32 + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_ecp_32 end interface interface - integer function trexio_write_mo_1e_int_ecp_non_local_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_core_hamiltonian_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) - end function trexio_write_mo_1e_int_ecp_non_local_32 -end interface - -interface - integer function trexio_write_mo_1e_int_core_hamiltonian_32 (trex_file, dset) bind(C) - use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + 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_32 end interface interface - integer function trexio_write_rdm_1e_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_rdm_1e_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_rdm_1e_32 end interface interface - integer function trexio_write_rdm_1e_up_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_rdm_1e_up_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_rdm_1e_up_32 end interface interface - integer function trexio_write_rdm_1e_dn_32 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_rdm_1e_dn_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) end function trexio_write_rdm_1e_dn_32 end interface interface - integer function trexio_write_nucleus_charge_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_qmc_point_32 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_float), intent(in) :: dset(*) + end function trexio_write_qmc_point_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_qmc_psi_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_qmc_psi_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_qmc_e_loc_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_qmc_e_loc_32 +end interface + +interface + integer(trexio_exit_code) function trexio_write_nucleus_charge_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_nucleus_charge_64 end interface interface - integer function trexio_write_nucleus_coord_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_nucleus_coord_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_nucleus_coord_64 end interface interface - integer function trexio_write_ecp_max_ang_mom_plus_1_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_max_ang_mom_plus_1_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in) :: dset(*) end function trexio_write_ecp_max_ang_mom_plus_1_64 end interface interface - integer function trexio_write_ecp_z_core_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_z_core_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in) :: dset(*) end function trexio_write_ecp_z_core_64 end interface interface - integer function trexio_write_ecp_ang_mom_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_ang_mom_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in) :: dset(*) end function trexio_write_ecp_ang_mom_64 end interface interface - integer function trexio_write_ecp_nucleus_index_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_nucleus_index_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in) :: dset(*) end function trexio_write_ecp_nucleus_index_64 end interface interface - integer function trexio_write_ecp_exponent_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_exponent_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_ecp_exponent_64 end interface interface - integer function trexio_write_ecp_coefficient_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_coefficient_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_ecp_coefficient_64 end interface interface - integer function trexio_write_ecp_power_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_power_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in) :: dset(*) end function trexio_write_ecp_power_64 end interface interface - integer function trexio_write_basis_nucleus_index_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_nucleus_index_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in) :: dset(*) end function trexio_write_basis_nucleus_index_64 end interface interface - integer function trexio_write_basis_shell_ang_mom_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_shell_ang_mom_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in) :: dset(*) end function trexio_write_basis_shell_ang_mom_64 end interface interface - integer function trexio_write_basis_shell_factor_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_shell_factor_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_basis_shell_factor_64 end interface interface - integer function trexio_write_basis_shell_index_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_shell_index_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in) :: dset(*) end function trexio_write_basis_shell_index_64 end interface interface - integer function trexio_write_basis_exponent_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_exponent_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_basis_exponent_64 end interface interface - integer function trexio_write_basis_coefficient_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_coefficient_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_basis_coefficient_64 end interface interface - integer function trexio_write_basis_prim_factor_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_prim_factor_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_basis_prim_factor_64 end interface interface - integer function trexio_write_ao_shell_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_shell_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in) :: dset(*) end function trexio_write_ao_shell_64 end interface interface - integer function trexio_write_ao_normalization_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_normalization_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_ao_normalization_64 end interface interface - integer function trexio_write_ao_1e_int_overlap_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_overlap_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_ao_1e_int_overlap_64 end interface interface - integer function trexio_write_ao_1e_int_kinetic_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_kinetic_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_ao_1e_int_kinetic_64 end interface interface - integer function trexio_write_ao_1e_int_potential_n_e_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_potential_n_e_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + 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_64 end interface interface - integer function trexio_write_ao_1e_int_ecp_local_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_ecp_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) - end function trexio_write_ao_1e_int_ecp_local_64 + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_ecp_64 end interface interface - integer function trexio_write_ao_1e_int_ecp_non_local_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_core_hamiltonian_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) - end function trexio_write_ao_1e_int_ecp_non_local_64 -end interface - -interface - integer function trexio_write_ao_1e_int_core_hamiltonian_64 (trex_file, dset) bind(C) - use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + 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_64 end interface interface - integer function trexio_write_mo_coefficient_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_coefficient_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_mo_coefficient_64 end interface interface - integer function trexio_write_mo_occupation_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_occupation_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_mo_occupation_64 end interface interface - integer function trexio_write_mo_1e_int_overlap_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_overlap_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_mo_1e_int_overlap_64 end interface interface - integer function trexio_write_mo_1e_int_kinetic_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_kinetic_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_mo_1e_int_kinetic_64 end interface interface - integer function trexio_write_mo_1e_int_potential_n_e_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_potential_n_e_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + 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_64 end interface interface - integer function trexio_write_mo_1e_int_ecp_local_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_ecp_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) - end function trexio_write_mo_1e_int_ecp_local_64 + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_ecp_64 end interface interface - integer function trexio_write_mo_1e_int_ecp_non_local_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_core_hamiltonian_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) - end function trexio_write_mo_1e_int_ecp_non_local_64 -end interface - -interface - integer function trexio_write_mo_1e_int_core_hamiltonian_64 (trex_file, dset) bind(C) - use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + 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_64 end interface interface - integer function trexio_write_rdm_1e_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_rdm_1e_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_rdm_1e_64 end interface interface - integer function trexio_write_rdm_1e_up_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_rdm_1e_up_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_rdm_1e_up_64 end interface interface - integer function trexio_write_rdm_1e_dn_64 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_rdm_1e_dn_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_rdm_1e_dn_64 end interface interface - integer function trexio_write_nucleus_charge (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_qmc_point_64 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_qmc_point_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_qmc_psi_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_qmc_psi_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_qmc_e_loc_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_qmc_e_loc_64 +end interface + +interface + integer(trexio_exit_code) function trexio_write_nucleus_charge (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_nucleus_charge end interface interface - integer function trexio_write_nucleus_coord (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_nucleus_coord (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_nucleus_coord end interface interface - integer function trexio_write_ecp_max_ang_mom_plus_1 (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_max_ang_mom_plus_1 (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_ecp_max_ang_mom_plus_1 end interface interface - integer function trexio_write_ecp_z_core (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_z_core (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_ecp_z_core end interface interface - integer function trexio_write_ecp_ang_mom (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_ang_mom (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_ecp_ang_mom end interface interface - integer function trexio_write_ecp_nucleus_index (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_nucleus_index (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_ecp_nucleus_index end interface interface - integer function trexio_write_ecp_exponent (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_exponent (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_ecp_exponent end interface interface - integer function trexio_write_ecp_coefficient (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_coefficient (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_ecp_coefficient end interface interface - integer function trexio_write_ecp_power (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ecp_power (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_ecp_power end interface interface - integer function trexio_write_basis_nucleus_index (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_nucleus_index (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_basis_nucleus_index end interface interface - integer function trexio_write_basis_shell_ang_mom (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_shell_ang_mom (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_basis_shell_ang_mom end interface interface - integer function trexio_write_basis_shell_factor (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_shell_factor (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_basis_shell_factor end interface interface - integer function trexio_write_basis_shell_index (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_shell_index (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_basis_shell_index end interface interface - integer function trexio_write_basis_exponent (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_exponent (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_basis_exponent end interface interface - integer function trexio_write_basis_coefficient (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_coefficient (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_basis_coefficient end interface interface - integer function trexio_write_basis_prim_factor (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_basis_prim_factor (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_basis_prim_factor end interface interface - integer function trexio_write_ao_shell (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_shell (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(4), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in) :: dset(*) end function trexio_write_ao_shell end interface interface - integer function trexio_write_ao_normalization (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_normalization (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_ao_normalization end interface interface - integer function trexio_write_ao_1e_int_overlap (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_overlap (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_ao_1e_int_overlap end interface interface - integer function trexio_write_ao_1e_int_kinetic (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_kinetic (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_ao_1e_int_kinetic end interface interface - integer function trexio_write_ao_1e_int_potential_n_e (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_potential_n_e (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + 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 end interface interface - integer function trexio_write_ao_1e_int_ecp_local (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_ecp (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) - end function trexio_write_ao_1e_int_ecp_local + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_ao_1e_int_ecp end interface interface - integer function trexio_write_ao_1e_int_ecp_non_local (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_ao_1e_int_core_hamiltonian (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) - end function trexio_write_ao_1e_int_ecp_non_local -end interface - -interface - integer function trexio_write_ao_1e_int_core_hamiltonian (trex_file, dset) bind(C) - use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + 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 end interface interface - integer function trexio_write_mo_coefficient (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_coefficient (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_mo_coefficient end interface interface - integer function trexio_write_mo_occupation (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_occupation (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_mo_occupation end interface interface - integer function trexio_write_mo_1e_int_overlap (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_overlap (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_mo_1e_int_overlap end interface interface - integer function trexio_write_mo_1e_int_kinetic (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_kinetic (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_mo_1e_int_kinetic end interface interface - integer function trexio_write_mo_1e_int_potential_n_e (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_potential_n_e (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + 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 end interface interface - integer function trexio_write_mo_1e_int_ecp_local (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_ecp (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) - end function trexio_write_mo_1e_int_ecp_local + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) + end function trexio_write_mo_1e_int_ecp end interface interface - integer function trexio_write_mo_1e_int_ecp_non_local (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_mo_1e_int_core_hamiltonian (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) - end function trexio_write_mo_1e_int_ecp_non_local -end interface - -interface - integer function trexio_write_mo_1e_int_core_hamiltonian (trex_file, dset) bind(C) - use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + 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 end interface interface - integer function trexio_write_rdm_1e (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_rdm_1e (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_rdm_1e end interface interface - integer function trexio_write_rdm_1e_up (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_rdm_1e_up (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_rdm_1e_up end interface interface - integer function trexio_write_rdm_1e_dn (trex_file, dset) bind(C) + integer(trexio_exit_code) function trexio_write_rdm_1e_dn (trex_file, dset) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - real(8), intent(in) :: dset(*) + import + integer(c_int64_t), intent(in), value :: trex_file + real(c_double), intent(in) :: dset(*) end function trexio_write_rdm_1e_dn end interface interface - integer function trexio_write_ao_2e_int_eri (trex_file, & + integer(trexio_exit_code) function trexio_write_qmc_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_qmc_point +end interface + +interface + integer(trexio_exit_code) function trexio_write_qmc_psi (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_qmc_psi +end interface + +interface + integer(trexio_exit_code) function trexio_write_qmc_e_loc (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_qmc_e_loc +end interface + +interface + integer(trexio_exit_code) function trexio_write_ao_2e_int_eri (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(in), value :: buffer_size - integer(4), intent(in) :: index_sparse(*) - double precision, intent(in) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + real(c_double), intent(in) :: value_sparse(*) end function trexio_write_ao_2e_int_eri end interface interface - integer function trexio_write_ao_2e_int_eri_lr (trex_file, & + integer(trexio_exit_code) function trexio_write_safe_ao_2e_int_eri (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(in) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_write_safe_ao_2e_int_eri +end interface + +interface + integer(trexio_exit_code) function trexio_write_ao_2e_int_eri_lr (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(in), value :: buffer_size - integer(4), intent(in) :: index_sparse(*) - double precision, intent(in) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + real(c_double), intent(in) :: value_sparse(*) end function trexio_write_ao_2e_int_eri_lr end interface interface - integer function trexio_write_mo_2e_int_eri (trex_file, & + integer(trexio_exit_code) function trexio_write_safe_ao_2e_int_eri_lr (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(in) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_write_safe_ao_2e_int_eri_lr +end interface + +interface + integer(trexio_exit_code) function trexio_write_mo_2e_int_eri (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(in), value :: buffer_size - integer(4), intent(in) :: index_sparse(*) - double precision, intent(in) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + real(c_double), intent(in) :: value_sparse(*) end function trexio_write_mo_2e_int_eri end interface interface - integer function trexio_write_mo_2e_int_eri_lr (trex_file, & + integer(trexio_exit_code) function trexio_write_safe_mo_2e_int_eri (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(in) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_write_safe_mo_2e_int_eri +end interface + +interface + integer(trexio_exit_code) function trexio_write_mo_2e_int_eri_lr (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(in), value :: buffer_size - integer(4), intent(in) :: index_sparse(*) - double precision, intent(in) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + real(c_double), intent(in) :: value_sparse(*) end function trexio_write_mo_2e_int_eri_lr end interface interface - integer function trexio_write_rdm_2e (trex_file, & + integer(trexio_exit_code) function trexio_write_safe_mo_2e_int_eri_lr (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(in) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_write_safe_mo_2e_int_eri_lr +end interface + +interface + integer(trexio_exit_code) function trexio_write_rdm_2e (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(in), value :: buffer_size - integer(4), intent(in) :: index_sparse(*) - double precision, intent(in) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + real(c_double), intent(in) :: value_sparse(*) end function trexio_write_rdm_2e end interface interface - integer function trexio_write_rdm_2e_upup (trex_file, & + integer(trexio_exit_code) function trexio_write_safe_rdm_2e (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(in) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_write_safe_rdm_2e +end interface + +interface + integer(trexio_exit_code) function trexio_write_rdm_2e_upup (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(in), value :: buffer_size - integer(4), intent(in) :: index_sparse(*) - double precision, intent(in) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + real(c_double), intent(in) :: value_sparse(*) end function trexio_write_rdm_2e_upup end interface interface - integer function trexio_write_rdm_2e_dndn (trex_file, & + integer(trexio_exit_code) function trexio_write_safe_rdm_2e_upup (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(in) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_write_safe_rdm_2e_upup +end interface + +interface + integer(trexio_exit_code) function trexio_write_rdm_2e_dndn (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(in), value :: buffer_size - integer(4), intent(in) :: index_sparse(*) - double precision, intent(in) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + real(c_double), intent(in) :: value_sparse(*) end function trexio_write_rdm_2e_dndn end interface interface - integer function trexio_write_rdm_2e_updn (trex_file, & + integer(trexio_exit_code) function trexio_write_safe_rdm_2e_dndn (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(in) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_write_safe_rdm_2e_dndn +end interface + +interface + integer(trexio_exit_code) function trexio_write_rdm_2e_updn (trex_file, & offset_file, buffer_size, & index_sparse, value_sparse) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - integer(8), intent(in), value :: offset_file - integer(8), intent(in), value :: buffer_size - integer(4), intent(in) :: index_sparse(*) - double precision, intent(in) :: value_sparse(*) + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + real(c_double), intent(in) :: value_sparse(*) end function trexio_write_rdm_2e_updn end interface interface - integer function trexio_write_metadata_code_low (trex_file, dset, max_str_len) bind(C) + integer(trexio_exit_code) function trexio_write_safe_rdm_2e_updn (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(in) :: dset(*) - integer(4), intent(in), value :: max_str_len + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(in) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_write_safe_rdm_2e_updn +end interface + +interface + integer(trexio_exit_code) function trexio_write_rdm_2e_dnup (trex_file, & + offset_file, buffer_size, & + index_sparse, value_sparse) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + real(c_double), intent(in) :: value_sparse(*) + end function trexio_write_rdm_2e_dnup +end interface + +interface + integer(trexio_exit_code) function trexio_write_safe_rdm_2e_dnup (trex_file, & + offset_file, buffer_size, & + index_sparse, index_size, & + value_sparse, value_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int32_t), intent(in) :: index_sparse(*) + integer(c_int64_t), intent(in), value :: index_size + real(c_double), intent(in) :: value_sparse(*) + integer(c_int64_t), intent(in), value :: value_size + end function trexio_write_safe_rdm_2e_dnup +end interface + +interface + integer(trexio_exit_code) function trexio_write_metadata_code_low (trex_file, dset, max_str_len) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + character(kind=c_char), intent(in) :: dset(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_write_metadata_code_low end interface interface - integer function trexio_write_metadata_author_low (trex_file, dset, max_str_len) bind(C) + integer(trexio_exit_code) function trexio_write_metadata_author_low (trex_file, dset, max_str_len) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(in) :: dset(*) - integer(4), intent(in), value :: max_str_len + import + integer(c_int64_t), intent(in), value :: trex_file + character(kind=c_char), intent(in) :: dset(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_write_metadata_author_low end interface interface - integer function trexio_write_nucleus_label_low (trex_file, dset, max_str_len) bind(C) + integer(trexio_exit_code) function trexio_write_nucleus_label_low (trex_file, dset, max_str_len) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(in) :: dset(*) - integer(4), intent(in), value :: max_str_len + import + integer(c_int64_t), intent(in), value :: trex_file + character(kind=c_char), intent(in) :: dset(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_write_nucleus_label_low end interface interface - integer function trexio_write_mo_class_low (trex_file, dset, max_str_len) bind(C) + integer(trexio_exit_code) function trexio_write_mo_class_low (trex_file, dset, max_str_len) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(in) :: dset(*) - integer(4), intent(in), value :: max_str_len + import + integer(c_int64_t), intent(in), value :: trex_file + character(kind=c_char), intent(in) :: dset(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_write_mo_class_low end interface interface - integer function trexio_write_mo_symmetry_low (trex_file, dset, max_str_len) bind(C) + integer(trexio_exit_code) function trexio_write_mo_symmetry_low (trex_file, dset, max_str_len) bind(C) use, intrinsic :: iso_c_binding - integer(8), intent(in), value :: trex_file - character, intent(in) :: dset(*) - integer(4), intent(in), value :: max_str_len + import + integer(c_int64_t), intent(in), value :: trex_file + character(kind=c_char), intent(in) :: dset(*) + integer(c_int32_t), intent(in), value :: max_str_len end function trexio_write_mo_symmetry_low end interface +interface + integer(trexio_exit_code) function trexio_write_state_label_low (trex_file, dset, max_str_len) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + character(kind=c_char), intent(in) :: dset(*) + integer(c_int32_t), intent(in), value :: max_str_len + end function trexio_write_state_label_low +end interface + +interface + integer(trexio_exit_code) function trexio_has_determinant_list (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_determinant_list +end interface + +interface + integer(trexio_exit_code) function trexio_has_determinant_coefficient (trex_file) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + end function trexio_has_determinant_coefficient +end interface + +interface + integer(trexio_exit_code) function trexio_get_int64_num (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_get_int64_num +end interface +interface + integer(trexio_exit_code) function trexio_read_determinant_list(trex_file, & + offset_file, buffer_size, list) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int64_t), intent(out) :: list(*) + end function trexio_read_determinant_list +end interface + +interface + integer(trexio_exit_code) function trexio_read_safe_determinant_list (trex_file, & + offset_file, buffer_size, & + list, list_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + integer(c_int64_t), intent(out) :: list(*) + integer(c_int64_t), intent(in), value :: list_size + end function trexio_read_safe_determinant_list +end interface + +interface + integer(trexio_exit_code) function trexio_read_safe_determinant_coefficient (trex_file, & + offset_file, buffer_size, & + coefficient, coefficient_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + real(c_double), intent(out) :: coefficient(*) + integer(c_int64_t), intent(in), value :: coefficient_size + end function trexio_read_safe_determinant_coefficient +end interface + +interface + integer(trexio_exit_code) function trexio_read_determinant_coefficient(trex_file, & + offset_file, buffer_size, coefficient) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(inout) :: buffer_size + real(c_double), intent(out) :: coefficient(*) + end function trexio_read_determinant_coefficient +end interface + +interface + integer(trexio_exit_code) function trexio_read_determinant_coefficient_size (trex_file, & + size_max) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(out) :: size_max + end function trexio_read_determinant_coefficient_size +end interface +interface + integer(trexio_exit_code) function trexio_write_determinant_list (trex_file, & + offset_file, buffer_size, list) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int64_t), intent(in) :: list(*) + end function trexio_write_determinant_list +end interface + +interface + integer(trexio_exit_code) function trexio_write_safe_determinant_list (trex_file, & + offset_file, buffer_size, & + list, list_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + integer(c_int64_t), intent(in) :: list(*) + integer(c_int64_t), intent(in), value :: list_size + end function trexio_write_safe_determinant_list +end interface + +interface + integer(trexio_exit_code) function trexio_write_determinant_coefficient(trex_file, & + offset_file, buffer_size, coefficient) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + real(c_double), intent(in) :: coefficient(*) + end function trexio_write_determinant_coefficient +end interface + +interface + integer(trexio_exit_code) function trexio_write_safe_determinant_coefficient (trex_file, & + offset_file, buffer_size, & + coefficient, coefficient_size) bind(C) + use, intrinsic :: iso_c_binding + import + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int64_t), intent(in), value :: offset_file + integer(c_int64_t), intent(in), value :: buffer_size + real(c_double), intent(in) :: coefficient(*) + integer(c_int64_t), intent(in), value :: coefficient_size + end function trexio_write_safe_determinant_coefficient +end interface contains - integer(8) function trexio_open (filename, mode, backend, rc_open) + integer(trexio_t) function trexio_open (filename, mode, back_end, rc_open) use, intrinsic :: iso_c_binding, only : c_null_char implicit none - character(len=*), intent(in) :: filename - character, intent(in), value :: mode - integer(trexio_backend), intent(in), value :: backend - integer(trexio_exit_code), intent(out) :: rc_open - character(len=len_trim(filename)+1) :: filename_c + character(len=*), intent(in) :: filename + character, intent(in), value :: mode + integer(trexio_back_end_t), intent(in), value :: back_end + integer(trexio_exit_code), intent(out) :: rc_open + character(len=len_trim(filename)+1) :: filename_c integer(trexio_exit_code) :: rc filename_c = trim(filename) // c_null_char - trexio_open = trexio_open_c(filename_c, mode, backend, rc_open) + trexio_open = trexio_open_c(filename_c, mode, back_end, rc_open) if (trexio_open == 0_8 .or. rc_open /= TREXIO_SUCCESS) then return endif @@ -3294,15 +4744,25 @@ contains endif end function trexio_open +integer(trexio_exit_code) function trexio_inquire (filename) + use, intrinsic :: iso_c_binding + implicit none + character(len=*), intent(in) :: filename + character(len=len_trim(filename)+1) :: filename_c + + filename_c = trim(filename) // c_null_char + trexio_inquire = trexio_inquire_c(filename_c) +end function trexio_inquire + subroutine trexio_strarray2str(str_array, max_num_str, max_len_str, str_res) use, intrinsic :: iso_c_binding, only : c_null_char implicit none - integer(8), intent(in), value :: max_num_str ! number of elements in strign array + integer(c_int64_t), intent(in), value :: max_num_str ! number of elements in strign array integer, intent(in), value :: max_len_str ! maximum length of a string in an array character(len=*), intent(in) :: str_array(*) character(len=:), allocatable, intent(out) :: str_res - integer :: i + integer(c_int64_t) :: i str_res = '' do i = 1, max_num_str @@ -3315,19 +4775,17 @@ end subroutine trexio_strarray2str subroutine trexio_str2strarray(str_flat, max_num_str, max_len_str, str_array) implicit none - integer(8), intent(in), value :: max_num_str ! number of elements in strign array - integer, intent(in), value :: max_len_str ! maximum length of a string in an array - character, intent(in) :: str_flat(*) - character(len=*), intent(inout) :: str_array(*) + integer(c_int64_t), intent(in), value :: max_num_str ! number of elements in strign array + integer, intent(in), value :: max_len_str ! maximum length of a string in an array + character(kind=c_char), intent(in) :: str_flat(*) + character(len=*), intent(inout) :: str_array(*) character(len=max_len_str) :: tmp_str - integer :: i, j, k, ind, offset - integer(8) :: len_flat + integer(c_int64_t) :: i, j, k, ind, len_flat len_flat = (max_len_str+1)*max_num_str + 1 ind=1 - offset=1 do i=1,max_num_str k = 1 tmp_str='' @@ -3340,7 +4798,6 @@ subroutine trexio_str2strarray(str_flat, max_num_str, max_len_str, str_array) k = k + 1 enddo str_array(i)=tmp_str - offset=ind enddo end subroutine trexio_str2strarray @@ -3348,8 +4805,8 @@ end subroutine trexio_str2strarray subroutine trexio_assert(trexio_rc, check_rc, success_message) implicit none - integer, intent(in), value :: trexio_rc - integer, intent(in), value :: check_rc + integer, intent(in), value :: trexio_rc + integer, intent(in), value :: check_rc character(len=*), intent(in), optional :: success_message character*(128) :: str @@ -3359,69 +4816,69 @@ subroutine trexio_assert(trexio_rc, check_rc, success_message) else call trexio_string_of_error(trexio_rc, str) print *, trim(str) - call exit(1) + stop 1 endif end subroutine trexio_assert -integer function trexio_read_metadata_package_version (trex_file, str, max_str_len) +integer(trexio_exit_code) function trexio_read_metadata_package_version (trex_file, str, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(trexio_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character, intent(out) :: str(*) trexio_read_metadata_package_version = trexio_read_metadata_package_version_c(trex_file, str, max_str_len) end function trexio_read_metadata_package_version -integer function trexio_read_metadata_description (trex_file, str, max_str_len) +integer(trexio_exit_code) function trexio_read_metadata_description (trex_file, str, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(trexio_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character, intent(out) :: str(*) trexio_read_metadata_description = trexio_read_metadata_description_c(trex_file, str, max_str_len) end function trexio_read_metadata_description -integer function trexio_read_nucleus_point_group (trex_file, str, max_str_len) +integer(trexio_exit_code) function trexio_read_nucleus_point_group (trex_file, str, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(trexio_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character, intent(out) :: str(*) trexio_read_nucleus_point_group = trexio_read_nucleus_point_group_c(trex_file, str, max_str_len) end function trexio_read_nucleus_point_group -integer function trexio_read_basis_type (trex_file, str, max_str_len) +integer(trexio_exit_code) function trexio_read_basis_type (trex_file, str, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(trexio_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character, intent(out) :: str(*) trexio_read_basis_type = trexio_read_basis_type_c(trex_file, str, max_str_len) end function trexio_read_basis_type -integer function trexio_read_mo_type (trex_file, str, max_str_len) +integer(trexio_exit_code) function trexio_read_mo_type (trex_file, str, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(trexio_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character, intent(out) :: str(*) trexio_read_mo_type = trexio_read_mo_type_c(trex_file, str, max_str_len) end function trexio_read_mo_type -integer function trexio_read_metadata_code (trex_file, dset, max_str_len) +integer(trexio_exit_code) function trexio_read_metadata_code (trex_file, dset, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(inout) :: dset(*) character, allocatable :: str_compiled(:) - integer(8) :: metadata_code_num - integer :: rc + integer(c_int64_t) :: metadata_code_num + integer(trexio_exit_code) :: rc rc = trexio_read_metadata_code_num_64(trex_file, metadata_code_num) if (rc /= TREXIO_SUCCESS) trexio_read_metadata_code = rc @@ -3440,15 +4897,15 @@ integer function trexio_read_metadata_code (trex_file, dset, max_str_len) end function trexio_read_metadata_code -integer function trexio_read_metadata_author (trex_file, dset, max_str_len) +integer(trexio_exit_code) function trexio_read_metadata_author (trex_file, dset, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(inout) :: dset(*) character, allocatable :: str_compiled(:) - integer(8) :: metadata_author_num - integer :: rc + integer(c_int64_t) :: metadata_author_num + integer(trexio_exit_code) :: rc rc = trexio_read_metadata_author_num_64(trex_file, metadata_author_num) if (rc /= TREXIO_SUCCESS) trexio_read_metadata_author = rc @@ -3467,15 +4924,15 @@ integer function trexio_read_metadata_author (trex_file, dset, max_str_len) end function trexio_read_metadata_author -integer function trexio_read_nucleus_label (trex_file, dset, max_str_len) +integer(trexio_exit_code) function trexio_read_nucleus_label (trex_file, dset, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(inout) :: dset(*) character, allocatable :: str_compiled(:) - integer(8) :: nucleus_num - integer :: rc + integer(c_int64_t) :: nucleus_num + integer(trexio_exit_code) :: rc rc = trexio_read_nucleus_num_64(trex_file, nucleus_num) if (rc /= TREXIO_SUCCESS) trexio_read_nucleus_label = rc @@ -3494,15 +4951,15 @@ integer function trexio_read_nucleus_label (trex_file, dset, max_str_len) end function trexio_read_nucleus_label -integer function trexio_read_mo_class (trex_file, dset, max_str_len) +integer(trexio_exit_code) function trexio_read_mo_class (trex_file, dset, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(inout) :: dset(*) character, allocatable :: str_compiled(:) - integer(8) :: mo_num - integer :: rc + integer(c_int64_t) :: mo_num + integer(trexio_exit_code) :: rc rc = trexio_read_mo_num_64(trex_file, mo_num) if (rc /= TREXIO_SUCCESS) trexio_read_mo_class = rc @@ -3521,15 +4978,15 @@ integer function trexio_read_mo_class (trex_file, dset, max_str_len) end function trexio_read_mo_class -integer function trexio_read_mo_symmetry (trex_file, dset, max_str_len) +integer(trexio_exit_code) function trexio_read_mo_symmetry (trex_file, dset, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(inout) :: dset(*) character, allocatable :: str_compiled(:) - integer(8) :: mo_num - integer :: rc + integer(c_int64_t) :: mo_num + integer(trexio_exit_code) :: rc rc = trexio_read_mo_num_64(trex_file, mo_num) if (rc /= TREXIO_SUCCESS) trexio_read_mo_symmetry = rc @@ -3548,11 +5005,38 @@ integer function trexio_read_mo_symmetry (trex_file, dset, max_str_len) end function trexio_read_mo_symmetry -integer function trexio_write_metadata_package_version (trex_file, str, max_str_len) +integer(trexio_exit_code) function trexio_read_state_label (trex_file, dset, max_str_len) + implicit none + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len + character(len=*), intent(inout) :: dset(*) + + character, allocatable :: str_compiled(:) + integer(c_int64_t) :: state_num + integer(trexio_exit_code) :: rc + + rc = trexio_read_state_num_64(trex_file, state_num) + if (rc /= TREXIO_SUCCESS) trexio_read_state_label = rc + + allocate(str_compiled(state_num*(max_str_len+1)+1)) + + rc = trexio_read_state_label_low(trex_file, str_compiled, max_str_len) + if (rc /= TREXIO_SUCCESS) then + deallocate(str_compiled) + trexio_read_state_label = rc + else + call trexio_str2strarray(str_compiled, state_num, max_str_len, dset) + deallocate(str_compiled) + trexio_read_state_label = TREXIO_SUCCESS + endif + +end function trexio_read_state_label + +integer(trexio_exit_code) function trexio_write_metadata_package_version (trex_file, str, max_str_len) use, intrinsic :: iso_c_binding, only : c_null_char implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(trexio_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(in) :: str character(len=len_trim(str)+1) :: str_c @@ -3563,11 +5047,11 @@ integer function trexio_write_metadata_package_version (trex_file, str, max_str_ end function trexio_write_metadata_package_version -integer function trexio_write_metadata_description (trex_file, str, max_str_len) +integer(trexio_exit_code) function trexio_write_metadata_description (trex_file, str, max_str_len) use, intrinsic :: iso_c_binding, only : c_null_char implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(trexio_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(in) :: str character(len=len_trim(str)+1) :: str_c @@ -3578,11 +5062,11 @@ integer function trexio_write_metadata_description (trex_file, str, max_str_len) end function trexio_write_metadata_description -integer function trexio_write_nucleus_point_group (trex_file, str, max_str_len) +integer(trexio_exit_code) function trexio_write_nucleus_point_group (trex_file, str, max_str_len) use, intrinsic :: iso_c_binding, only : c_null_char implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(trexio_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(in) :: str character(len=len_trim(str)+1) :: str_c @@ -3593,11 +5077,11 @@ integer function trexio_write_nucleus_point_group (trex_file, str, max_str_len) end function trexio_write_nucleus_point_group -integer function trexio_write_basis_type (trex_file, str, max_str_len) +integer(trexio_exit_code) function trexio_write_basis_type (trex_file, str, max_str_len) use, intrinsic :: iso_c_binding, only : c_null_char implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(trexio_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(in) :: str character(len=len_trim(str)+1) :: str_c @@ -3608,11 +5092,11 @@ integer function trexio_write_basis_type (trex_file, str, max_str_len) end function trexio_write_basis_type -integer function trexio_write_mo_type (trex_file, str, max_str_len) +integer(trexio_exit_code) function trexio_write_mo_type (trex_file, str, max_str_len) use, intrinsic :: iso_c_binding, only : c_null_char implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(trexio_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(in) :: str character(len=len_trim(str)+1) :: str_c @@ -3623,15 +5107,15 @@ integer function trexio_write_mo_type (trex_file, str, max_str_len) end function trexio_write_mo_type -integer function trexio_write_metadata_code (trex_file, dset, max_str_len) +integer(trexio_exit_code) function trexio_write_metadata_code (trex_file, dset, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(in) :: dset(*) character(len=:), allocatable :: str_compiled - integer(8) :: metadata_code_num - integer :: rc + integer(c_int64_t) :: metadata_code_num + integer(trexio_exit_code) :: rc rc = trexio_read_metadata_code_num_64(trex_file, metadata_code_num) if (rc /= TREXIO_SUCCESS) then @@ -3643,15 +5127,15 @@ integer function trexio_write_metadata_code (trex_file, dset, max_str_len) end function trexio_write_metadata_code -integer function trexio_write_metadata_author (trex_file, dset, max_str_len) +integer(trexio_exit_code) function trexio_write_metadata_author (trex_file, dset, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(in) :: dset(*) character(len=:), allocatable :: str_compiled - integer(8) :: metadata_author_num - integer :: rc + integer(c_int64_t) :: metadata_author_num + integer(trexio_exit_code) :: rc rc = trexio_read_metadata_author_num_64(trex_file, metadata_author_num) if (rc /= TREXIO_SUCCESS) then @@ -3663,15 +5147,15 @@ integer function trexio_write_metadata_author (trex_file, dset, max_str_len) end function trexio_write_metadata_author -integer function trexio_write_nucleus_label (trex_file, dset, max_str_len) +integer(trexio_exit_code) function trexio_write_nucleus_label (trex_file, dset, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(in) :: dset(*) character(len=:), allocatable :: str_compiled - integer(8) :: nucleus_num - integer :: rc + integer(c_int64_t) :: nucleus_num + integer(trexio_exit_code) :: rc rc = trexio_read_nucleus_num_64(trex_file, nucleus_num) if (rc /= TREXIO_SUCCESS) then @@ -3683,15 +5167,15 @@ integer function trexio_write_nucleus_label (trex_file, dset, max_str_len) end function trexio_write_nucleus_label -integer function trexio_write_mo_class (trex_file, dset, max_str_len) +integer(trexio_exit_code) function trexio_write_mo_class (trex_file, dset, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(in) :: dset(*) character(len=:), allocatable :: str_compiled - integer(8) :: mo_num - integer :: rc + integer(c_int64_t) :: mo_num + integer(trexio_exit_code) :: rc rc = trexio_read_mo_num_64(trex_file, mo_num) if (rc /= TREXIO_SUCCESS) then @@ -3703,15 +5187,15 @@ integer function trexio_write_mo_class (trex_file, dset, max_str_len) end function trexio_write_mo_class -integer function trexio_write_mo_symmetry (trex_file, dset, max_str_len) +integer(trexio_exit_code) function trexio_write_mo_symmetry (trex_file, dset, max_str_len) implicit none - integer(8), intent(in), value :: trex_file - integer(4), intent(in), value :: max_str_len + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len character(len=*), intent(in) :: dset(*) character(len=:), allocatable :: str_compiled - integer(8) :: mo_num - integer :: rc + integer(c_int64_t) :: mo_num + integer(trexio_exit_code) :: rc rc = trexio_read_mo_num_64(trex_file, mo_num) if (rc /= TREXIO_SUCCESS) then @@ -3723,4 +5207,24 @@ integer function trexio_write_mo_symmetry (trex_file, dset, max_str_len) end function trexio_write_mo_symmetry +integer(trexio_exit_code) function trexio_write_state_label (trex_file, dset, max_str_len) + implicit none + integer(c_int64_t), intent(in), value :: trex_file + integer(c_int32_t), intent(in), value :: max_str_len + character(len=*), intent(in) :: dset(*) + + character(len=:), allocatable :: str_compiled + integer(c_int64_t) :: state_num + integer(trexio_exit_code) :: rc + + rc = trexio_read_state_num_64(trex_file, state_num) + if (rc /= TREXIO_SUCCESS) then + trexio_write_state_label = rc + else + call trexio_strarray2str(dset, state_num, max_str_len, str_compiled) + trexio_write_state_label = trexio_write_state_label_low(trex_file, str_compiled, max_str_len) + endif + +end function trexio_write_state_label + end module trexio