1
0
mirror of https://gitlab.com/scemama/qp_plugins_scemama.git synced 2024-11-07 14:43:41 +01:00

Update trexio plugin

This commit is contained in:
Anthony Scemama 2021-12-10 18:42:49 +01:00
parent dbc66c0c55
commit e485e512f7
4 changed files with 371 additions and 120 deletions

View File

@ -10,3 +10,21 @@ doc: Name of the exported TREXIO file
interface: ezfio, ocaml, provider interface: ezfio, ocaml, provider
default: None default: None
[export_rdm]
type: logical
doc: If True, export two-body reduced density matrix
interface: ezfio, ocaml, provider
default: False
[export_ao_ints]
type: logical
doc: If True, export two-electron integrals in AO basis
interface: ezfio, ocaml, provider
default: False
[export_mo_ints]
type: logical
doc: If True, export two-electron integrals in MO basis
interface: ezfio, ocaml, provider
default: True

View File

@ -4,3 +4,4 @@ mo_one_e_ints
mo_two_e_ints mo_two_e_ints
ao_two_e_ints ao_two_e_ints
ao_one_e_ints ao_one_e_ints
two_body_rdm

View File

@ -1,4 +1,11 @@
program export_trexio program export_trexio
implicit none
read_wf = .True.
SOFT_TOUCH read_wf
call run
end
subroutine run
use trexio use trexio
implicit none implicit none
BEGIN_DOC BEGIN_DOC
@ -53,6 +60,9 @@ program export_trexio
rc = trexio_write_nucleus_label(f, nucl_label, 32) rc = trexio_write_nucleus_label(f, nucl_label, 32)
call check_success(rc) call check_success(rc)
rc = trexio_write_nucleus_repulsion(f, nuclear_repulsion)
call check_success(rc)
! Pseudo-potentials ! Pseudo-potentials
! ----------------- ! -----------------
@ -209,46 +219,48 @@ program export_trexio
! Two-e AO integrals ! Two-e AO integrals
! ------------------ ! ------------------
PROVIDE ao_two_e_integrals_in_map if (export_ao_ints) then
PROVIDE ao_two_e_integrals_in_map
integer(8), parameter :: BUFSIZE=10000_8 integer(8), parameter :: BUFSIZE=10000_8
double precision :: eri_buffer(BUFSIZE), integral double precision :: eri_buffer(BUFSIZE), integral
integer(4) :: eri_index(4,BUFSIZE) integer(4) :: eri_index(4,BUFSIZE)
integer(8) :: icount, offset integer(8) :: icount, offset
double precision, external :: get_ao_two_e_integral double precision, external :: get_ao_two_e_integral
icount = 0_8 icount = 0_8
offset = 0_8 offset = 0_8
do l=1,ao_num do l=1,ao_num
do k=1,ao_num do k=1,ao_num
do j=l,ao_num do j=l,ao_num
do i=k,ao_num do i=k,ao_num
if (i==j .and. k<l) cycle if (i==j .and. k<l) cycle
if (i<j) cycle if (i<j) cycle
integral = get_ao_two_e_integral(i,j,k,l,ao_integrals_map) integral = get_ao_two_e_integral(i,j,k,l,ao_integrals_map)
if (integral == 0.d0) cycle if (integral == 0.d0) cycle
icount += 1_8 icount += 1_8
eri_buffer(icount) = integral eri_buffer(icount) = integral
eri_index(1,icount) = i eri_index(1,icount) = i
eri_index(2,icount) = j eri_index(2,icount) = j
eri_index(3,icount) = k eri_index(3,icount) = k
eri_index(4,icount) = l eri_index(4,icount) = l
if (icount == BUFSIZE) then if (icount == BUFSIZE) then
rc = trexio_write_ao_2e_int_eri(f, offset, icount, eri_index, eri_buffer) rc = trexio_write_ao_2e_int_eri(f, offset, icount, eri_index, eri_buffer)
call check_success(rc) call check_success(rc)
icount = 0_8 icount = 0_8
offset += icount offset += icount
end if end if
end do
end do end do
end do end do
end do end do
end do
if (icount >= 0_8) then if (icount >= 0_8) then
rc = trexio_write_ao_2e_int_eri(f, offset, icount, eri_index, eri_buffer) rc = trexio_write_ao_2e_int_eri(f, offset, icount, eri_index, eri_buffer)
call check_success(rc) call check_success(rc)
end if
end if end if
@ -292,57 +304,96 @@ program export_trexio
! Two-e MO integrals ! Two-e MO integrals
! ------------------ ! ------------------
PROVIDE mo_two_e_integrals_in_map if (export_mo_ints) then
PROVIDE mo_two_e_integrals_in_map
double precision, external :: mo_two_e_integral double precision, external :: mo_two_e_integral
icount = 0_8 icount = 0_8
offset = 0_8 offset = 0_8
do l=1,mo_num do l=1,mo_num
do k=1,mo_num do k=1,mo_num
do j=l,mo_num do j=l,mo_num
do i=k,mo_num do i=k,mo_num
if (i==j .and. k<l) cycle if (i==j .and. k<l) cycle
if (i<j) cycle if (i<j) cycle
integral = mo_two_e_integral(i,j,k,l) integral = mo_two_e_integral(i,j,k,l)
if (integral == 0.d0) cycle if (integral == 0.d0) cycle
icount += 1_8 icount += 1_8
eri_buffer(icount) = integral eri_buffer(icount) = integral
eri_index(1,icount) = i eri_index(1,icount) = i
eri_index(2,icount) = j eri_index(2,icount) = j
eri_index(3,icount) = k eri_index(3,icount) = k
eri_index(4,icount) = l eri_index(4,icount) = l
if (icount == BUFSIZE) then if (icount == BUFSIZE) then
rc = trexio_write_mo_2e_int_eri(f, offset, icount, eri_index, eri_buffer) rc = trexio_write_mo_2e_int_eri(f, offset, icount, eri_index, eri_buffer)
call check_success(rc) call check_success(rc)
icount = 0_8 icount = 0_8
offset += icount offset += icount
end if end if
end do
end do end do
end do end do
end do end do
end do
if (icount >= 0_8) then if (icount >= 0_8) then
rc = trexio_write_mo_2e_int_eri(f, offset, icount, eri_index, eri_buffer) rc = trexio_write_mo_2e_int_eri(f, offset, icount, eri_index, eri_buffer)
call check_success(rc) call check_success(rc)
end if
end if end if
! RDM ! One-e RDM
! ---- ! ---------
! rc = trexio_write_rdm_one_e(f,one_e_dm_mo) rc = trexio_write_rdm_1e(f,one_e_dm_mo)
! call check_success(rc) call check_success(rc)
!
! rc = trexio_write_rdm_one_e_up(f,one_e_dm_mo_alpha_average)
! call check_success(rc)
!
! rc = trexio_write_rdm_one_e_dn(f,one_e_dm_mo_beta_average)
! call check_success(rc)
rc = trexio_write_rdm_1e_up(f,one_e_dm_mo_alpha_average)
call check_success(rc)
rc = trexio_write_rdm_1e_dn(f,one_e_dm_mo_beta_average)
call check_success(rc)
! Two-e RDM
! ---------
if (export_rdm) then
PROVIDE two_e_dm_mo
icount = 0_8
offset = 0_8
do l=1,mo_num
do k=1,mo_num
do j=1,mo_num
do i=1,mo_num
integral = two_e_dm_mo(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_rdm_2e(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_rdm_2e(f, offset, icount, eri_index, eri_buffer)
call check_success(rc)
end if
end if
! ------------------------------------------------------------------------------ ! ------------------------------------------------------------------------------

View File

@ -125,6 +125,13 @@ interface
end function trexio_has_nucleus_num end function trexio_has_nucleus_num
end interface end interface
interface
integer function trexio_has_nucleus_repulsion (trex_file) bind(C)
use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file
end function trexio_has_nucleus_repulsion
end interface
interface interface
integer function trexio_has_ecp_num (trex_file) bind(C) integer function trexio_has_ecp_num (trex_file) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -427,24 +434,24 @@ interface
end interface end interface
interface interface
integer function trexio_has_rdm_one_e (trex_file) bind(C) integer function trexio_has_rdm_1e (trex_file) 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
end function trexio_has_rdm_one_e end function trexio_has_rdm_1e
end interface end interface
interface interface
integer function trexio_has_rdm_one_e_up (trex_file) bind(C) integer function trexio_has_rdm_1e_up (trex_file) 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
end function trexio_has_rdm_one_e_up end function trexio_has_rdm_1e_up
end interface end interface
interface interface
integer function trexio_has_rdm_one_e_dn (trex_file) bind(C) integer function trexio_has_rdm_1e_dn (trex_file) 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
end function trexio_has_rdm_one_e_dn end function trexio_has_rdm_1e_dn
end interface end interface
interface interface
@ -476,10 +483,31 @@ interface
end interface end interface
interface interface
integer function trexio_has_rdm_two_e (trex_file) bind(C) integer function trexio_has_rdm_2e (trex_file) 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
end function trexio_has_rdm_two_e end function trexio_has_rdm_2e
end interface
interface
integer function trexio_has_rdm_2e_upup (trex_file) bind(C)
use, intrinsic :: iso_c_binding
integer(8), 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)
use, intrinsic :: iso_c_binding
integer(8), 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)
use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file
end function trexio_has_rdm_2e_updn
end interface end interface
interface interface
@ -557,6 +585,14 @@ interface
end function trexio_read_nucleus_num_32 end function trexio_read_nucleus_num_32
end interface end interface
interface
integer 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
end function trexio_read_nucleus_repulsion_32
end interface
interface interface
integer function trexio_read_ecp_num_32 (trex_file, num) bind(C) integer function trexio_read_ecp_num_32 (trex_file, num) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -645,6 +681,14 @@ interface
end function trexio_read_nucleus_num_64 end function trexio_read_nucleus_num_64
end interface end interface
interface
integer 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
end function trexio_read_nucleus_repulsion_64
end interface
interface interface
integer function trexio_read_ecp_num_64 (trex_file, num) bind(C) integer function trexio_read_ecp_num_64 (trex_file, num) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -733,6 +777,14 @@ interface
end function trexio_read_nucleus_num end function trexio_read_nucleus_num
end interface end interface
interface
integer 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
end function trexio_read_nucleus_repulsion
end interface
interface interface
integer function trexio_read_ecp_num (trex_file, num) bind(C) integer function trexio_read_ecp_num (trex_file, num) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -1088,27 +1140,27 @@ interface
end interface end interface
interface interface
integer function trexio_read_rdm_one_e_32 (trex_file, dset) bind(C) integer function trexio_read_rdm_1e_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_rdm_one_e_32 end function trexio_read_rdm_1e_32
end interface end interface
interface interface
integer function trexio_read_rdm_one_e_up_32 (trex_file, dset) bind(C) integer function trexio_read_rdm_1e_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_rdm_one_e_up_32 end function trexio_read_rdm_1e_up_32
end interface end interface
interface interface
integer function trexio_read_rdm_one_e_dn_32 (trex_file, dset) bind(C) integer function trexio_read_rdm_1e_dn_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_rdm_one_e_dn_32 end function trexio_read_rdm_1e_dn_32
end interface end interface
interface interface
@ -1368,27 +1420,27 @@ interface
end interface end interface
interface interface
integer function trexio_read_rdm_one_e_64 (trex_file, dset) bind(C) integer function trexio_read_rdm_1e_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_rdm_one_e_64 end function trexio_read_rdm_1e_64
end interface end interface
interface interface
integer function trexio_read_rdm_one_e_up_64 (trex_file, dset) bind(C) integer function trexio_read_rdm_1e_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_rdm_one_e_up_64 end function trexio_read_rdm_1e_up_64
end interface end interface
interface interface
integer function trexio_read_rdm_one_e_dn_64 (trex_file, dset) bind(C) integer function trexio_read_rdm_1e_dn_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_rdm_one_e_dn_64 end function trexio_read_rdm_1e_dn_64
end interface end interface
interface interface
@ -1648,27 +1700,27 @@ interface
end interface end interface
interface interface
integer function trexio_read_rdm_one_e (trex_file, dset) bind(C) integer function trexio_read_rdm_1e (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 function trexio_read_rdm_1e
end interface end interface
interface interface
integer function trexio_read_rdm_one_e_up (trex_file, dset) bind(C) integer function trexio_read_rdm_1e_up (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_up end function trexio_read_rdm_1e_up
end interface end interface
interface interface
integer function trexio_read_rdm_one_e_dn (trex_file, dset) bind(C) integer function trexio_read_rdm_1e_dn (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_dn end function trexio_read_rdm_1e_dn
end interface end interface
interface interface
@ -1724,7 +1776,7 @@ interface
end interface end interface
interface interface
integer function trexio_read_rdm_two_e (trex_file, & integer function trexio_read_rdm_2e (trex_file, &
offset_file, buffer_size, & offset_file, buffer_size, &
index_sparse, value_sparse) bind(C) index_sparse, value_sparse) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -1733,7 +1785,46 @@ interface
integer(8), intent(in), value :: buffer_size integer(8), intent(in), value :: buffer_size
integer(4), intent(in) :: index_sparse(*) integer(4), intent(in) :: index_sparse(*)
double precision, intent(out) :: value_sparse(*) double precision, intent(out) :: value_sparse(*)
end function trexio_read_rdm_two_e end function trexio_read_rdm_2e
end interface
interface
integer 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(in), value :: buffer_size
integer(4), intent(in) :: index_sparse(*)
double precision, intent(out) :: value_sparse(*)
end function trexio_read_rdm_2e_upup
end interface
interface
integer 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(in), value :: buffer_size
integer(4), intent(in) :: index_sparse(*)
double precision, intent(out) :: value_sparse(*)
end function trexio_read_rdm_2e_dndn
end interface
interface
integer 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(in), value :: buffer_size
integer(4), intent(in) :: index_sparse(*)
double precision, intent(out) :: value_sparse(*)
end function trexio_read_rdm_2e_updn
end interface end interface
interface interface
@ -1773,12 +1864,39 @@ interface
end interface end interface
interface interface
integer function trexio_read_rdm_two_e_size (trex_file, & integer function trexio_read_rdm_2e_size (trex_file, &
size_max) bind(C) size_max) 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
integer(8), intent(out) :: size_max integer(8), intent(out) :: size_max
end function trexio_read_rdm_two_e_size end function trexio_read_rdm_2e_size
end interface
interface
integer 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
end function trexio_read_rdm_2e_upup_size
end interface
interface
integer 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
end function trexio_read_rdm_2e_dndn_size
end interface
interface
integer 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
end function trexio_read_rdm_2e_updn_size
end interface end interface
interface interface
@ -1866,6 +1984,14 @@ interface
end function trexio_write_nucleus_num_32 end function trexio_write_nucleus_num_32
end interface end interface
interface
integer 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
end function trexio_write_nucleus_repulsion_32
end interface
interface interface
integer function trexio_write_ecp_num_32 (trex_file, num) bind(C) integer function trexio_write_ecp_num_32 (trex_file, num) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -1954,6 +2080,14 @@ interface
end function trexio_write_nucleus_num_64 end function trexio_write_nucleus_num_64
end interface end interface
interface
integer 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
end function trexio_write_nucleus_repulsion_64
end interface
interface interface
integer function trexio_write_ecp_num_64 (trex_file, num) bind(C) integer function trexio_write_ecp_num_64 (trex_file, num) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -2042,6 +2176,14 @@ interface
end function trexio_write_nucleus_num end function trexio_write_nucleus_num
end interface end interface
interface
integer 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
end function trexio_write_nucleus_repulsion
end interface
interface interface
integer function trexio_write_ecp_num (trex_file, num) bind(C) integer function trexio_write_ecp_num (trex_file, num) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -2397,27 +2539,27 @@ interface
end interface end interface
interface interface
integer function trexio_write_rdm_one_e_32 (trex_file, dset) bind(C) integer function trexio_write_rdm_1e_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_rdm_one_e_32 end function trexio_write_rdm_1e_32
end interface end interface
interface interface
integer function trexio_write_rdm_one_e_up_32 (trex_file, dset) bind(C) integer function trexio_write_rdm_1e_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_rdm_one_e_up_32 end function trexio_write_rdm_1e_up_32
end interface end interface
interface interface
integer function trexio_write_rdm_one_e_dn_32 (trex_file, dset) bind(C) integer function trexio_write_rdm_1e_dn_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_rdm_one_e_dn_32 end function trexio_write_rdm_1e_dn_32
end interface end interface
interface interface
@ -2677,27 +2819,27 @@ interface
end interface end interface
interface interface
integer function trexio_write_rdm_one_e_64 (trex_file, dset) bind(C) integer function trexio_write_rdm_1e_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_rdm_one_e_64 end function trexio_write_rdm_1e_64
end interface end interface
interface interface
integer function trexio_write_rdm_one_e_up_64 (trex_file, dset) bind(C) integer function trexio_write_rdm_1e_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_rdm_one_e_up_64 end function trexio_write_rdm_1e_up_64
end interface end interface
interface interface
integer function trexio_write_rdm_one_e_dn_64 (trex_file, dset) bind(C) integer function trexio_write_rdm_1e_dn_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_rdm_one_e_dn_64 end function trexio_write_rdm_1e_dn_64
end interface end interface
interface interface
@ -2957,27 +3099,27 @@ interface
end interface end interface
interface interface
integer function trexio_write_rdm_one_e (trex_file, dset) bind(C) integer function trexio_write_rdm_1e (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 function trexio_write_rdm_1e
end interface end interface
interface interface
integer function trexio_write_rdm_one_e_up (trex_file, dset) bind(C) integer function trexio_write_rdm_1e_up (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_up end function trexio_write_rdm_1e_up
end interface end interface
interface interface
integer function trexio_write_rdm_one_e_dn (trex_file, dset) bind(C) integer function trexio_write_rdm_1e_dn (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_dn end function trexio_write_rdm_1e_dn
end interface end interface
interface interface
@ -3033,7 +3175,7 @@ interface
end interface end interface
interface interface
integer function trexio_write_rdm_two_e (trex_file, & integer function trexio_write_rdm_2e (trex_file, &
offset_file, buffer_size, & offset_file, buffer_size, &
index_sparse, value_sparse) bind(C) index_sparse, value_sparse) bind(C)
use, intrinsic :: iso_c_binding use, intrinsic :: iso_c_binding
@ -3042,7 +3184,46 @@ interface
integer(8), intent(in), value :: buffer_size integer(8), intent(in), value :: buffer_size
integer(4), intent(in) :: index_sparse(*) integer(4), intent(in) :: index_sparse(*)
double precision, intent(in) :: value_sparse(*) double precision, intent(in) :: value_sparse(*)
end function trexio_write_rdm_two_e end function trexio_write_rdm_2e
end interface
interface
integer 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(*)
end function trexio_write_rdm_2e_upup
end interface
interface
integer 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(*)
end function trexio_write_rdm_2e_dndn
end interface
interface
integer 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(*)
end function trexio_write_rdm_2e_updn
end interface end interface
interface interface