1
0
mirror of https://gitlab.com/scemama/qp_plugins_scemama.git synced 2024-12-22 12:23:37 +01:00

Storing ERI

This commit is contained in:
Anthony Scemama 2021-12-08 11:09:54 +01:00
parent 427f0569a6
commit dbc66c0c55
2 changed files with 383 additions and 140 deletions

View File

@ -7,6 +7,7 @@ program export_trexio
integer(8) :: f ! TREXIO file handle integer(8) :: f ! TREXIO file handle
integer :: rc integer :: rc
double precision, allocatable :: factor(:)
print *, 'TREXIO file : '//trim(trexio_filename) print *, 'TREXIO file : '//trim(trexio_filename)
print *, '' print *, ''
@ -114,7 +115,6 @@ program export_trexio
rc = trexio_write_basis_shell_ang_mom(f, shell_ang_mom) rc = trexio_write_basis_shell_ang_mom(f, shell_ang_mom)
call check_success(rc) call check_success(rc)
double precision, allocatable :: factor(:)
allocate(factor(shell_num)) allocate(factor(shell_num))
if (ao_normalized) then if (ao_normalized) then
factor(1:shell_num) = shell_normalization_factor(1:shell_num) factor(1:shell_num) = shell_normalization_factor(1:shell_num)
@ -206,6 +206,51 @@ program export_trexio
rc = trexio_write_ao_1e_int_core_hamiltonian(f,ao_one_e_integrals) rc = trexio_write_ao_1e_int_core_hamiltonian(f,ao_one_e_integrals)
call check_success(rc) call check_success(rc)
! Two-e AO integrals
! ------------------
PROVIDE ao_two_e_integrals_in_map
integer(8), parameter :: BUFSIZE=10000_8
double precision :: eri_buffer(BUFSIZE), integral
integer(4) :: eri_index(4,BUFSIZE)
integer(8) :: icount, offset
double precision, external :: get_ao_two_e_integral
icount = 0_8
offset = 0_8
do l=1,ao_num
do k=1,ao_num
do j=l,ao_num
do i=k,ao_num
if (i==j .and. k<l) cycle
if (i<j) cycle
integral = get_ao_two_e_integral(i,j,k,l,ao_integrals_map)
if (integral == 0.d0) cycle
icount += 1_8
eri_buffer(icount) = integral
eri_index(1,icount) = i
eri_index(2,icount) = j
eri_index(3,icount) = k
eri_index(4,icount) = l
if (icount == BUFSIZE) then
rc = trexio_write_ao_2e_int_eri(f, offset, icount, eri_index, eri_buffer)
call check_success(rc)
icount = 0_8
offset += icount
end if
end do
end do
end do
end do
if (icount >= 0_8) then
rc = trexio_write_ao_2e_int_eri(f, offset, icount, eri_index, eri_buffer)
call check_success(rc)
end if
! Molecular orbitals ! Molecular orbitals
! ------------------ ! ------------------
@ -240,10 +285,51 @@ program export_trexio
rc = trexio_write_mo_1e_int_ecp_non_local(f,mo_pseudo_integrals_non_local) rc = trexio_write_mo_1e_int_ecp_non_local(f,mo_pseudo_integrals_non_local)
call check_success(rc) call check_success(rc)
endif endif
!
rc = trexio_write_mo_1e_int_core_hamiltonian(f,one_e_dm_mo) rc = trexio_write_mo_1e_int_core_hamiltonian(f,one_e_dm_mo)
call check_success(rc) call check_success(rc)
! Two-e MO integrals
! ------------------
PROVIDE mo_two_e_integrals_in_map
double precision, external :: mo_two_e_integral
icount = 0_8
offset = 0_8
do l=1,mo_num
do k=1,mo_num
do j=l,mo_num
do i=k,mo_num
if (i==j .and. k<l) cycle
if (i<j) cycle
integral = mo_two_e_integral(i,j,k,l)
if (integral == 0.d0) cycle
icount += 1_8
eri_buffer(icount) = integral
eri_index(1,icount) = i
eri_index(2,icount) = j
eri_index(3,icount) = k
eri_index(4,icount) = l
if (icount == BUFSIZE) then
rc = trexio_write_mo_2e_int_eri(f, offset, icount, eri_index, eri_buffer)
call check_success(rc)
icount = 0_8
offset += icount
end if
end do
end do
end do
end do
if (icount >= 0_8) then
rc = trexio_write_mo_2e_int_eri(f, offset, icount, eri_index, eri_buffer)
call check_success(rc)
end if
! RDM ! RDM
! ---- ! ----
@ -258,6 +344,7 @@ program export_trexio
! call check_success(rc) ! call check_success(rc)
! ------------------------------------------------------------------------------ ! ------------------------------------------------------------------------------
rc = trexio_close(f) rc = trexio_close(f)

View File

@ -37,6 +37,7 @@ integer(trexio_exit_code), parameter :: TREXIO_ATTR_MISSING = 24
integer(trexio_exit_code), parameter :: TREXIO_DSET_MISSING = 25 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_BACK_END_MISSING = 26
integer(trexio_exit_code), parameter :: TREXIO_INVALID_STR_LEN = 30 integer(trexio_exit_code), parameter :: TREXIO_INVALID_STR_LEN = 30
integer(trexio_exit_code), parameter :: TREXIO_INT_SIZE_OVERFLOW = 31
interface interface
subroutine trexio_string_of_error (error, string) bind(C, name='trexio_string_of_error_f') subroutine trexio_string_of_error (error, string) bind(C, name='trexio_string_of_error_f')
@ -369,20 +370,6 @@ interface
end function trexio_has_ao_1e_int_core_hamiltonian end function trexio_has_ao_1e_int_core_hamiltonian
end interface end interface
interface
integer function trexio_has_ao_2e_int_eri (trex_file) bind(C)
use, intrinsic :: iso_c_binding
integer(8), 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)
use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file
end function trexio_has_ao_2e_int_eri_lr
end interface
interface interface
integer function trexio_has_mo_coefficient (trex_file) bind(C) integer function trexio_has_mo_coefficient (trex_file) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -439,6 +426,41 @@ interface
end function trexio_has_mo_1e_int_core_hamiltonian end function trexio_has_mo_1e_int_core_hamiltonian
end interface end interface
interface
integer function trexio_has_rdm_one_e (trex_file) bind(C)
use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file
end function trexio_has_rdm_one_e
end interface
interface
integer function trexio_has_rdm_one_e_up (trex_file) bind(C)
use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file
end function trexio_has_rdm_one_e_up
end interface
interface
integer function trexio_has_rdm_one_e_dn (trex_file) bind(C)
use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file
end function trexio_has_rdm_one_e_dn
end interface
interface
integer function trexio_has_ao_2e_int_eri (trex_file) bind(C)
use, intrinsic :: iso_c_binding
integer(8), 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)
use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file
end function trexio_has_ao_2e_int_eri_lr
end interface
interface interface
integer function trexio_has_mo_2e_int_eri (trex_file) bind(C) integer function trexio_has_mo_2e_int_eri (trex_file) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -453,6 +475,13 @@ interface
end function trexio_has_mo_2e_int_eri_lr end function trexio_has_mo_2e_int_eri_lr
end interface end interface
interface
integer function trexio_has_rdm_two_e (trex_file) bind(C)
use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file
end function trexio_has_rdm_two_e
end interface
interface interface
integer function trexio_has_metadata_code (trex_file) bind(C) integer function trexio_has_metadata_code (trex_file) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -994,22 +1023,6 @@ interface
end function trexio_read_ao_1e_int_core_hamiltonian_32 end function trexio_read_ao_1e_int_core_hamiltonian_32
end interface end interface
interface
integer function trexio_read_ao_2e_int_eri_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_2e_int_eri_32
end interface
interface
integer function trexio_read_ao_2e_int_eri_lr_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_2e_int_eri_lr_32
end interface
interface interface
integer function trexio_read_mo_coefficient_32 (trex_file, dset) bind(C) integer function trexio_read_mo_coefficient_32 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -1075,19 +1088,27 @@ interface
end interface end interface
interface interface
integer function trexio_read_mo_2e_int_eri_32 (trex_file, dset) bind(C) integer function trexio_read_rdm_one_e_32 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
real(4), intent(out) :: dset(*) real(4), intent(out) :: dset(*)
end function trexio_read_mo_2e_int_eri_32 end function trexio_read_rdm_one_e_32
end interface end interface
interface interface
integer function trexio_read_mo_2e_int_eri_lr_32 (trex_file, dset) bind(C) integer function trexio_read_rdm_one_e_up_32 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
real(4), intent(out) :: dset(*) real(4), intent(out) :: dset(*)
end function trexio_read_mo_2e_int_eri_lr_32 end function trexio_read_rdm_one_e_up_32
end interface
interface
integer function trexio_read_rdm_one_e_dn_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_rdm_one_e_dn_32
end interface end interface
interface interface
@ -1282,22 +1303,6 @@ interface
end function trexio_read_ao_1e_int_core_hamiltonian_64 end function trexio_read_ao_1e_int_core_hamiltonian_64
end interface end interface
interface
integer function trexio_read_ao_2e_int_eri_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_2e_int_eri_64
end interface
interface
integer function trexio_read_ao_2e_int_eri_lr_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_2e_int_eri_lr_64
end interface
interface interface
integer function trexio_read_mo_coefficient_64 (trex_file, dset) bind(C) integer function trexio_read_mo_coefficient_64 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -1363,19 +1368,27 @@ interface
end interface end interface
interface interface
integer function trexio_read_mo_2e_int_eri_64 (trex_file, dset) bind(C) integer function trexio_read_rdm_one_e_64 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
real(8), intent(out) :: dset(*) real(8), intent(out) :: dset(*)
end function trexio_read_mo_2e_int_eri_64 end function trexio_read_rdm_one_e_64
end interface end interface
interface interface
integer function trexio_read_mo_2e_int_eri_lr_64 (trex_file, dset) bind(C) integer function trexio_read_rdm_one_e_up_64 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
real(8), intent(out) :: dset(*) real(8), intent(out) :: dset(*)
end function trexio_read_mo_2e_int_eri_lr_64 end function trexio_read_rdm_one_e_up_64
end interface
interface
integer function trexio_read_rdm_one_e_dn_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_rdm_one_e_dn_64
end interface end interface
interface interface
@ -1570,22 +1583,6 @@ interface
end function trexio_read_ao_1e_int_core_hamiltonian end function trexio_read_ao_1e_int_core_hamiltonian
end interface end interface
interface
integer function trexio_read_ao_2e_int_eri (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_2e_int_eri
end interface
interface
integer function trexio_read_ao_2e_int_eri_lr (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_2e_int_eri_lr
end interface
interface interface
integer function trexio_read_mo_coefficient (trex_file, dset) bind(C) integer function trexio_read_mo_coefficient (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -1651,21 +1648,139 @@ interface
end interface end interface
interface interface
integer function trexio_read_mo_2e_int_eri (trex_file, dset) bind(C) integer function trexio_read_rdm_one_e (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
real(8), intent(out) :: dset(*) real(8), intent(out) :: dset(*)
end function trexio_read_rdm_one_e
end interface
interface
integer function trexio_read_rdm_one_e_up (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_rdm_one_e_up
end interface
interface
integer function trexio_read_rdm_one_e_dn (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_rdm_one_e_dn
end interface
interface
integer 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(in), value :: buffer_size
integer(4), intent(in) :: index_sparse(*)
double precision, 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, &
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(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, &
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(out) :: value_sparse(*)
end function trexio_read_mo_2e_int_eri end function trexio_read_mo_2e_int_eri
end interface end interface
interface interface
integer function trexio_read_mo_2e_int_eri_lr (trex_file, dset) bind(C) integer 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 use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
real(8), intent(out) :: dset(*) integer(8), intent(in), value :: offset_file
integer(8), intent(in), value :: buffer_size
integer(4), intent(in) :: index_sparse(*)
double precision, intent(out) :: value_sparse(*)
end function trexio_read_mo_2e_int_eri_lr end function trexio_read_mo_2e_int_eri_lr
end interface end interface
interface
integer function trexio_read_rdm_two_e (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(out) :: value_sparse(*)
end function trexio_read_rdm_two_e
end interface
interface
integer 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
end function trexio_read_ao_2e_int_eri_size
end interface
interface
integer 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
end function trexio_read_ao_2e_int_eri_lr_size
end interface
interface
integer 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
end function trexio_read_mo_2e_int_eri_size
end interface
interface
integer 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
end function trexio_read_mo_2e_int_eri_lr_size
end interface
interface
integer function trexio_read_rdm_two_e_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
end function trexio_read_rdm_two_e_size
end interface
interface interface
integer function trexio_read_metadata_code_low (trex_file, dset, max_str_len) bind(C) integer function trexio_read_metadata_code_low (trex_file, dset, max_str_len) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -2217,22 +2332,6 @@ interface
end function trexio_write_ao_1e_int_core_hamiltonian_32 end function trexio_write_ao_1e_int_core_hamiltonian_32
end interface end interface
interface
integer function trexio_write_ao_2e_int_eri_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_2e_int_eri_32
end interface
interface
integer function trexio_write_ao_2e_int_eri_lr_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_2e_int_eri_lr_32
end interface
interface interface
integer function trexio_write_mo_coefficient_32 (trex_file, dset) bind(C) integer function trexio_write_mo_coefficient_32 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -2298,19 +2397,27 @@ interface
end interface end interface
interface interface
integer function trexio_write_mo_2e_int_eri_32 (trex_file, dset) bind(C) integer function trexio_write_rdm_one_e_32 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
real(4), intent(in) :: dset(*) real(4), intent(in) :: dset(*)
end function trexio_write_mo_2e_int_eri_32 end function trexio_write_rdm_one_e_32
end interface end interface
interface interface
integer function trexio_write_mo_2e_int_eri_lr_32 (trex_file, dset) bind(C) integer function trexio_write_rdm_one_e_up_32 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
real(4), intent(in) :: dset(*) real(4), intent(in) :: dset(*)
end function trexio_write_mo_2e_int_eri_lr_32 end function trexio_write_rdm_one_e_up_32
end interface
interface
integer function trexio_write_rdm_one_e_dn_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_rdm_one_e_dn_32
end interface end interface
interface interface
@ -2505,22 +2612,6 @@ interface
end function trexio_write_ao_1e_int_core_hamiltonian_64 end function trexio_write_ao_1e_int_core_hamiltonian_64
end interface end interface
interface
integer function trexio_write_ao_2e_int_eri_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_2e_int_eri_64
end interface
interface
integer function trexio_write_ao_2e_int_eri_lr_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_2e_int_eri_lr_64
end interface
interface interface
integer function trexio_write_mo_coefficient_64 (trex_file, dset) bind(C) integer function trexio_write_mo_coefficient_64 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -2586,19 +2677,27 @@ interface
end interface end interface
interface interface
integer function trexio_write_mo_2e_int_eri_64 (trex_file, dset) bind(C) integer function trexio_write_rdm_one_e_64 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
real(8), intent(in) :: dset(*) real(8), intent(in) :: dset(*)
end function trexio_write_mo_2e_int_eri_64 end function trexio_write_rdm_one_e_64
end interface end interface
interface interface
integer function trexio_write_mo_2e_int_eri_lr_64 (trex_file, dset) bind(C) integer function trexio_write_rdm_one_e_up_64 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
real(8), intent(in) :: dset(*) real(8), intent(in) :: dset(*)
end function trexio_write_mo_2e_int_eri_lr_64 end function trexio_write_rdm_one_e_up_64
end interface
interface
integer function trexio_write_rdm_one_e_dn_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_rdm_one_e_dn_64
end interface end interface
interface interface
@ -2793,22 +2892,6 @@ interface
end function trexio_write_ao_1e_int_core_hamiltonian end function trexio_write_ao_1e_int_core_hamiltonian
end interface end interface
interface
integer function trexio_write_ao_2e_int_eri (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_2e_int_eri
end interface
interface
integer function trexio_write_ao_2e_int_eri_lr (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_2e_int_eri_lr
end interface
interface interface
integer function trexio_write_mo_coefficient (trex_file, dset) bind(C) integer function trexio_write_mo_coefficient (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -2874,21 +2957,94 @@ interface
end interface end interface
interface interface
integer function trexio_write_mo_2e_int_eri (trex_file, dset) bind(C) integer function trexio_write_rdm_one_e (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
real(8), intent(in) :: dset(*) real(8), intent(in) :: dset(*)
end function trexio_write_rdm_one_e
end interface
interface
integer function trexio_write_rdm_one_e_up (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_rdm_one_e_up
end interface
interface
integer function trexio_write_rdm_one_e_dn (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_rdm_one_e_dn
end interface
interface
integer 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(*)
end function trexio_write_ao_2e_int_eri
end interface
interface
integer 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(*)
end function trexio_write_ao_2e_int_eri_lr
end interface
interface
integer 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(*)
end function trexio_write_mo_2e_int_eri end function trexio_write_mo_2e_int_eri
end interface end interface
interface interface
integer function trexio_write_mo_2e_int_eri_lr (trex_file, dset) bind(C) integer 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 use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
real(8), intent(in) :: dset(*) 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(*)
end function trexio_write_mo_2e_int_eri_lr end function trexio_write_mo_2e_int_eri_lr
end interface end interface
interface
integer function trexio_write_rdm_two_e (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(*)
end function trexio_write_rdm_two_e
end interface
interface interface
integer function trexio_write_metadata_code_low (trex_file, dset, max_str_len) bind(C) integer function trexio_write_metadata_code_low (trex_file, dset, max_str_len) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding