1
0
mirror of https://gitlab.com/scemama/qp_plugins_scemama.git synced 2025-01-03 01:55:52 +01:00

Import trexio

This commit is contained in:
Anthony Scemama 2021-12-30 14:42:50 +01:00
parent a3d0f2f921
commit f87df2b4e9
3 changed files with 514 additions and 90 deletions

View File

@ -73,38 +73,96 @@ subroutine run
print *, 'ECP' print *, 'ECP'
double precision, allocatable :: tmp_double(:,:) integer :: num
integer, allocatable :: tmp_int(:,:)
! rc = trexio_write_ecp_lmax_plus_1(f, pseudo_lmax+1) num = 0
! call check_success(rc) do k=1,pseudo_klocmax
! do i=1,nucl_num
! rc = trexio_write_ecp_z_core(f, nucl_charge_remove) if (pseudo_dz_k(i,k) /= 0.d0) then
! call check_success(rc) num = num+1
! end if
! rc = trexio_write_ecp_local_num_n_max(f, pseudo_klocmax) end do
! call check_success(rc) end do
!
! rc = trexio_write_ecp_local_power(f, pseudo_n_k_transp) do l=1,pseudo_lmax
! call check_success(rc) do k=1,pseudo_kmax
! do i=1,nucl_num
! rc = trexio_write_ecp_local_exponent(f, pseudo_dz_k_transp) if (pseudo_dz_kl(i,k,l) /= 0.d0) then
! call check_success(rc) num = num+1
! end if
! rc = trexio_write_ecp_local_coef(f, pseudo_v_k_transp) end do
! call check_success(rc) end do
! end do
! rc = trexio_write_ecp_non_local_num_n_max(f, pseudo_kmax)
! call check_success(rc) integer, allocatable :: ang_mom(:), nucleus_index(:), power(:), lmax(:)
! double precision, allocatable :: exponent(:), coefficient(:)
! rc = trexio_write_ecp_non_local_power(f, pseudo_n_kl_transp)
! call check_success(rc) allocate(ang_mom(num), nucleus_index(num), exponent(num), coefficient(num), power(num), &
! lmax(nucl_num) )
! rc = trexio_write_ecp_non_local_exponent(f, pseudo_dz_kl_transp)
! call check_success(rc) do i=1,nucl_num
! lmax(i) = 0
! rc = trexio_write_ecp_non_local_coef(f, pseudo_v_kl_transp) do l=1,pseudo_lmax
! call check_success(rc) do k=1,pseudo_kmax
if (pseudo_dz_kl_transp(k,l,i) /= 0.d0) then
lmax(i) = max(lmax(i), l)
end if
end do
end do
end do
j = 0
do i=1,nucl_num
do k=1,pseudo_klocmax
if (pseudo_dz_k_transp(k,i) /= 0.d0) then
j = j+1
ang_mom(j) = lmax(i)+1
nucleus_index(j) = i
exponent(j) = pseudo_dz_k_transp(k,i)
coefficient(j) = pseudo_v_k_transp(k,i)
power(j) = pseudo_n_k_transp(k,i)
end if
end do
do l=1,lmax(i)
do k=1,pseudo_kmax
if (pseudo_dz_kl_transp(k,l,i) /= 0.d0) then
j = j+1
ang_mom(j) = l
nucleus_index(j) = i
exponent(j) = pseudo_dz_kl_transp(k,l,i)
coefficient(j) = pseudo_v_kl_transp(k,l,i)
power(j) = pseudo_n_kl_transp(k,l,i)
end if
end do
end do
end do
lmax(:) = lmax(:)+1
rc = trexio_write_ecp_max_ang_mom_plus_1(f, lmax)
call check_success(rc)
rc = trexio_write_ecp_z_core(f, int(nucl_charge_remove))
call check_success(rc)
rc = trexio_write_ecp_num(f, num)
call check_success(rc)
rc = trexio_write_ecp_ang_mom(f, ang_mom)
call check_success(rc)
rc = trexio_write_ecp_nucleus_index(f, nucleus_index)
call check_success(rc)
rc = trexio_write_ecp_exponent(f, exponent)
call check_success(rc)
rc = trexio_write_ecp_coefficient(f, coefficient)
call check_success(rc)
rc = trexio_write_ecp_power(f, power)
call check_success(rc)
@ -273,8 +331,8 @@ subroutine run
print *, 'MOs' print *, 'MOs'
! rc = trexio_write_mo_type(f, mo_label) rc = trexio_write_mo_type(f, mo_label, len(trim(mo_label)))
! call check_success(rc) call check_success(rc)
rc = trexio_write_mo_num(f, mo_num) rc = trexio_write_mo_num(f, mo_num)
call check_success(rc) call check_success(rc)
@ -302,7 +360,7 @@ subroutine run
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,mo_one_e_integrals)
call check_success(rc) call check_success(rc)
! Two-e MO integrals ! Two-e MO integrals

366
devel/trexio/qp_import_trexio.py Executable file
View File

@ -0,0 +1,366 @@
#!/usr/bin/env python3
"""
convert TREXIO file to EZFIO
Usage:
qp_import_trexio [-o EZFIO_DIR] FILE
Options:
-o --output=EZFIO_DIR Produced directory
by default is FILE.ezfio
"""
import sys
import os
import trexio
import numpy as np
from functools import reduce
from ezfio import ezfio
from docopt import docopt
try:
QP_ROOT = os.environ["QP_ROOT"]
QP_EZFIO = os.environ["QP_EZFIO"]
except KeyError:
print("Error: QP_ROOT environment variable not found.")
sys.exit(1)
else:
sys.path = [QP_EZFIO + "/Python",
QP_ROOT + "/install/resultsFile",
QP_ROOT + "/install",
QP_ROOT + "/scripts"] + sys.path
def generate_xyz(l):
def create_z(x,y,z):
return (x, y, l-(x+y))
def create_y(accu,x,y,z):
if y == 0:
result = [create_z(x,y,z)] + accu
else:
result = create_y([create_z(x,y,z)] + accu , x, y-1, z)
return result
def create_x(accu,x,y,z):
if x == 0:
result = create_y([], x,y,z) + accu
else:
xnew = x-1
ynew = l-xnew
result = create_x(create_y([],x,y,z) + accu , xnew, ynew, z)
return result
result = create_x([], l, 0, 0)
result.reverse()
return result
def write_ezfio(trexio_filename, filename):
try:
trexio_file = trexio.File(trexio_filename,mode='r',back_end=trexio.TREXIO_TEXT)
except:
trexio_file = trexio.File(trexio_filename,mode='r',back_end=trexio.TREXIO_HDF5)
basis_type = trexio.read_basis_type(trexio_file)
if basis_type.lower() != "gaussian":
raise TypeError
ezfio.set_file(filename)
print("Electrons\t...\t", end=' ')
num_alpha = trexio.read_electron_up_num(trexio_file)
num_beta = trexio.read_electron_dn_num(trexio_file)
ezfio.set_electrons_elec_alpha_num(num_alpha)
ezfio.set_electrons_elec_beta_num(num_beta)
print("OK")
print("Nuclei\t\t...\t", end=' ')
charge = trexio.read_nucleus_charge(trexio_file)
ezfio.set_nuclei_nucl_num(len(charge))
ezfio.set_nuclei_nucl_charge(charge)
coord = trexio.read_nucleus_coord(trexio_file)
coord = np.transpose(coord)
ezfio.set_nuclei_nucl_coord(coord)
label = trexio.read_nucleus_label(trexio_file)
nucl_num = trexio.read_nucleus_num(trexio_file)
# Transformt H1 into H
import re
p = re.compile(r'(\d*)$')
label = [p.sub("", x).capitalize() for x in label]
ezfio.set_nuclei_nucl_label(label)
print("OK")
print("Basis\t\t...\t", end=' ')
ezfio.set_basis_basis("Read from TREXIO")
shell_num = trexio.read_basis_shell_num(trexio_file)
prim_num = trexio.read_basis_prim_num(trexio_file)
ezfio.set_basis_shell_num(shell_num)
ezfio.set_basis_prim_num(prim_num)
ang_mom = trexio.read_basis_shell_ang_mom(trexio_file)
nucl_index = trexio.read_basis_nucleus_index(trexio_file)
ezfio.set_basis_shell_ang_mom(ang_mom)
ezfio.set_basis_basis_nucleus_index(nucl_index)
exponent = trexio.read_basis_exponent(trexio_file)
coefficient = trexio.read_basis_coefficient(trexio_file)
ezfio.set_basis_prim_expo(exponent)
ezfio.set_basis_prim_coef(coefficient)
shell_index = trexio.read_basis_shell_index(trexio_file)
ao_shell = trexio.read_ao_shell(trexio_file)
shell_prim_num = []
nucl_shell_num = []
prev = None
count = 0
n = 0
m = 0
for i in ao_shell:
count += 1
if i != prev:
n += 1
m += 1
if prev is None or nucl_index[i] != nucl_index[prev]:
nucl_shell_num.append(m)
m = 0
shell_prim_num.append(count)
count = 0
prev = i
assert (len(nucl_shell_num) == nucl_num)
assert (len(shell_prim_num) == shell_num)
ezfio.set_basis_shell_prim_num(shell_prim_num)
ezfio.set_basis_shell_index(shell_index)
ezfio.set_basis_nucleus_shell_num(nucl_shell_num)
shell_factor = trexio.read_basis_shell_factor(trexio_file)
prim_factor = trexio.read_basis_prim_factor(trexio_file)
print("OK")
print("AOS\t\t...\t", end=' ')
cartesian = trexio.read_ao_cartesian(trexio_file)
ao_num = trexio.read_ao_num(trexio_file)
ezfio.set_ao_basis_ao_num(ao_num)
at = [ nucl_index[i] for i in ao_shell ]
ezfio.set_ao_basis_ao_nucl(at)
num_prim0 = [ 0 for i in range(shell_num) ]
for i in shell_index:
num_prim0[i] += 1
coef = {}
expo = {}
for i,c in enumerate(coefficient):
idx = shell_index[i]
if idx in coef:
coef[idx].append(c)
expo[idx].append(exponent[i])
else:
coef[idx] = [c]
expo[idx] = [exponent[i]]
coefficient = []
exponent = []
power_x = []
power_y = []
power_z = []
num_prim = []
for i in range(shell_num):
for x,y,z in generate_xyz(ang_mom[i]):
power_x.append(x)
power_y.append(y)
power_z.append(z)
coefficient.append(coef[i])
exponent.append(expo[i])
num_prim.append(num_prim0[i])
print (len(coefficient) , ao_num, len(ao_shell))
assert (len(coefficient) == ao_num)
ezfio.set_ao_basis_ao_power(power_x + power_y + power_z)
ezfio.set_ao_basis_ao_prim_num(num_prim)
prim_num_max = max( [ len(x) for x in coefficient ] )
for i in range(ao_num):
coefficient[i] += [0. for j in range(len(coefficient[i]), prim_num_max)]
exponent [i] += [0. for j in range(len(exponent[i]), prim_num_max)]
coefficient = reduce(lambda x, y: x + y, coefficient, [])
exponent = reduce(lambda x, y: x + y, exponent , [])
coef = []
expo = []
for i in range(prim_num_max):
for j in range(i, len(coefficient), prim_num_max):
coef.append(coefficient[j])
expo.append(exponent[j])
ezfio.set_ao_basis_ao_coef(coef)
ezfio.set_ao_basis_ao_expo(expo)
ezfio.set_ao_basis_ao_basis("Read from TREXIO")
print("OK")
# _
# |\/| _ _ |_) _. _ o _
# | | (_) _> |_) (_| _> | _>
#
print("MOS\t\t...\t", end=' ')
mo_num = trexio.read_mo_num(trexio_file)
label = trexio.read_mo_type(trexio_file)
ezfio.set_mo_basis_mo_label(label)
clss = trexio.read_mo_class(trexio_file)
core = [ i for i in clss if i.lower() == "core" ]
inactive = [ i for i in clss if i.lower() == "inactive" ]
active = [ i for i in clss if i.lower() == "active" ]
virtual = [ i for i in clss if i.lower() == "virtual" ]
deleted = [ i for i in clss if i.lower() == "deleted" ]
MoMatrix = trexio.read_mo_coefficient(trexio_file)
ezfio.set_mo_basis_mo_num(mo_num)
ezfio.set_mo_basis_mo_coef(MoMatrix)
print("OK")
print("Pseudos\t\t...\t", end=' ')
ezfio.set_pseudo_do_pseudo(False)
if trexio.has_ecp_ang_mom(trexio_file):
ezfio.set_pseudo_do_pseudo(True)
max_ang_mom_plus_1 = trexio.read_ecp_max_ang_mom_plus_1(trexio_file)
z_core = trexio.read_ecp_z_core(trexio_file)
ang_mom = trexio.read_ecp_ang_mom(trexio_file)
nucleus_index = trexio.read_ecp_nucleus_index(trexio_file)
exponent = trexio.read_ecp_exponent(trexio_file)
coefficient = trexio.read_ecp_coefficient(trexio_file)
power = trexio.read_ecp_power(trexio_file)
lmax = max( max_ang_mom_plus_1 ) - 1
ezfio.set_pseudo_pseudo_lmax(lmax)
ezfio.set_pseudo_nucl_charge_remove(z_core)
prev_center = None
ecp = {}
for i in range(len(ang_mom)):
center = nucleus_index[i]
if center != prev_center:
ecp[center] = { "lmax": max_ang_mom_plus_1[center],
"zcore": zcore[center],
"contr": {} }
for i in range(max_ang_mom_plus_1[center]+1):
ecp[center]["contr"][i] = []
ecp[center]["contr"][ang_mom[i]].append( (coefficient[i], power[i], exponent[i]) )
prev_center = center
ecp_loc = {}
ecp_nl = {}
kmax = 0
klocmax = 0
for center in ecp:
for k in ecp[center]["contr"]:
if k == ecp[center]["lmax"]:
ecp_loc[center] = ecp[center]["contr"][k]
klocmax = max(len(ecp_loc[center], klocmax))
else:
ecp_nl [center][k] = ecp[center]["contr"][k]
kmax = max(len(ecp_nl [center][k], kmax))
ezfio.set_pseudo_pseudo_klocmax(klocmax)
ezfio.set_pseudo_pseudo_kmax(kmax)
pseudo_n_k = [[0 for _ in range(nucl_num)] for _ in range(klocmax)]
pseudo_v_k = [[0. for _ in range(nucl_num)] for _ in range(klocmax)]
pseudo_dz_k = [[0. for _ in range(nucl_num)] for _ in range(klocmax)]
pseudo_n_kl = [[[0 for _ in range(nucl_num)] for _ in range(kmax)] for _ in range(lmax+1)]
pseudo_v_kl = [[[0. for _ in range(nucl_num)] for _ in range(kmax)] for _ in range(lmax+1)]
pseudo_dz_kl = [[[0. for _ in range(nucl_num)] for _ in range(kmax)] for _ in range(lmax+1)]
for center in ecp_loc:
for k in range( len(ecp_loc[center]) ):
v, n, dz = ecp_loc[center]
pseudo_n_k[k][center] = n
pseudo_v_k[k][center] = v
pseudo_dz_k[k][center] = dz
ezfio.set_pseudo_pseudo_n_k(pseudo_n_k)
ezfio.set_pseudo_pseudo_v_k(pseudo_v_k)
ezfio.set_pseudo_pseudo_dz_k(pseudo_dz_k)
for center in ecp_nl:
for k in range( len(ecp_nl[center]) ):
for l in range( len(ecp_nl[center][k]) ):
v, n, dz = ecp_nl[center][k]
pseudo_n_kl[l][k][center] = n
pseudo_v_kl[l][k][center] = v
pseudo_dz_kl[l][k][center] = dz
ezfio.set_pseudo_pseudo_n_kl(pseudo_n_kl)
ezfio.set_pseudo_pseudo_v_kl(pseudo_v_kl)
ezfio.set_pseudo_pseudo_dz_kl(pseudo_dz_kl)
for i in range(nucl_num):
charge[i] -= nucl_charge_remove[i]
ezfio.set_nuclei_nucl_charge(charge)
print("OK")
def get_full_path(file_path):
file_path = os.path.expanduser(file_path)
file_path = os.path.expandvars(file_path)
return file_path
if __name__ == '__main__':
ARGUMENTS = docopt(__doc__)
trexio_filename = get_full_path(ARGUMENTS['FILE'])
if ARGUMENTS["--output"]:
EZFIO_FILE = get_full_path(ARGUMENTS["--output"])
else:
EZFIO_FILE = "{0}.ezfio".format(FILE)
write_ezfio(trexio_filename, EZFIO_FILE)
sys.stdout.flush()

View File

@ -1725,111 +1725,111 @@ end interface
interface interface
integer function trexio_read_ao_2e_int_eri (trex_file, & integer function trexio_read_ao_2e_int_eri (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
integer(8), intent(in), value :: buffer_size integer(8), intent(inout) :: buffer_size
integer(4), intent(in) :: index_sparse(*) integer(4), intent(out) :: index_sparse(*)
double precision, intent(out) :: value_sparse(*) double precision, intent(out) :: value_sparse(*)
end function trexio_read_ao_2e_int_eri end function trexio_read_ao_2e_int_eri
end interface end interface
interface interface
integer function trexio_read_ao_2e_int_eri_lr (trex_file, & integer function trexio_read_ao_2e_int_eri_lr (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
integer(8), intent(in), value :: buffer_size integer(8), intent(inout) :: buffer_size
integer(4), intent(in) :: index_sparse(*) integer(4), intent(out) :: index_sparse(*)
double precision, intent(out) :: value_sparse(*) double precision, intent(out) :: value_sparse(*)
end function trexio_read_ao_2e_int_eri_lr end function trexio_read_ao_2e_int_eri_lr
end interface end interface
interface interface
integer function trexio_read_mo_2e_int_eri (trex_file, & integer function trexio_read_mo_2e_int_eri (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
integer(8), intent(in), value :: buffer_size integer(8), intent(inout) :: buffer_size
integer(4), intent(in) :: index_sparse(*) integer(4), intent(out) :: index_sparse(*)
double precision, intent(out) :: value_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, & integer function trexio_read_mo_2e_int_eri_lr (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
integer(8), intent(in), value :: buffer_size integer(8), intent(inout) :: buffer_size
integer(4), intent(in) :: index_sparse(*) integer(4), intent(out) :: index_sparse(*)
double precision, intent(out) :: value_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 interface
integer function trexio_read_rdm_2e (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
integer(8), intent(in), value :: buffer_size integer(8), intent(inout) :: buffer_size
integer(4), intent(in) :: index_sparse(*) integer(4), intent(out) :: index_sparse(*)
double precision, intent(out) :: value_sparse(*) double precision, intent(out) :: value_sparse(*)
end function trexio_read_rdm_2e end function trexio_read_rdm_2e
end interface end interface
interface interface
integer function trexio_read_rdm_2e_upup (trex_file, & integer function trexio_read_rdm_2e_upup (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
integer(8), intent(in), value :: buffer_size integer(8), intent(inout) :: buffer_size
integer(4), intent(in) :: index_sparse(*) integer(4), intent(out) :: index_sparse(*)
double precision, intent(out) :: value_sparse(*) double precision, intent(out) :: value_sparse(*)
end function trexio_read_rdm_2e_upup end function trexio_read_rdm_2e_upup
end interface end interface
interface interface
integer function trexio_read_rdm_2e_dndn (trex_file, & integer function trexio_read_rdm_2e_dndn (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
integer(8), intent(in), value :: buffer_size integer(8), intent(inout) :: buffer_size
integer(4), intent(in) :: index_sparse(*) integer(4), intent(out) :: index_sparse(*)
double precision, intent(out) :: value_sparse(*) double precision, intent(out) :: value_sparse(*)
end function trexio_read_rdm_2e_dndn end function trexio_read_rdm_2e_dndn
end interface end interface
interface interface
integer function trexio_read_rdm_2e_updn (trex_file, & integer function trexio_read_rdm_2e_updn (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
integer(8), intent(in), value :: buffer_size integer(8), intent(inout) :: buffer_size
integer(4), intent(in) :: index_sparse(*) integer(4), intent(out) :: index_sparse(*)
double precision, intent(out) :: value_sparse(*) double precision, intent(out) :: value_sparse(*)
end function trexio_read_rdm_2e_updn end function trexio_read_rdm_2e_updn
end interface end interface
interface interface
integer function trexio_read_ao_2e_int_eri_size (trex_file, & integer function trexio_read_ao_2e_int_eri_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
@ -1838,7 +1838,7 @@ end interface
interface interface
integer function trexio_read_ao_2e_int_eri_lr_size (trex_file, & integer function trexio_read_ao_2e_int_eri_lr_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
@ -1847,7 +1847,7 @@ end interface
interface interface
integer function trexio_read_mo_2e_int_eri_size (trex_file, & integer function trexio_read_mo_2e_int_eri_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
@ -1856,7 +1856,7 @@ end interface
interface interface
integer function trexio_read_mo_2e_int_eri_lr_size (trex_file, & integer function trexio_read_mo_2e_int_eri_lr_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
@ -1865,7 +1865,7 @@ end interface
interface interface
integer function trexio_read_rdm_2e_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
@ -1874,7 +1874,7 @@ end interface
interface interface
integer function trexio_read_rdm_2e_upup_size (trex_file, & integer function trexio_read_rdm_2e_upup_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
@ -1883,7 +1883,7 @@ end interface
interface interface
integer function trexio_read_rdm_2e_dndn_size (trex_file, & integer function trexio_read_rdm_2e_dndn_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
@ -1892,7 +1892,7 @@ end interface
interface interface
integer function trexio_read_rdm_2e_updn_size (trex_file, & integer function trexio_read_rdm_2e_updn_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
@ -3124,8 +3124,8 @@ end interface
interface interface
integer function trexio_write_ao_2e_int_eri (trex_file, & integer function trexio_write_ao_2e_int_eri (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
@ -3137,8 +3137,8 @@ end interface
interface interface
integer function trexio_write_ao_2e_int_eri_lr (trex_file, & integer function trexio_write_ao_2e_int_eri_lr (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
@ -3150,8 +3150,8 @@ end interface
interface interface
integer function trexio_write_mo_2e_int_eri (trex_file, & integer function trexio_write_mo_2e_int_eri (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
@ -3163,8 +3163,8 @@ end interface
interface interface
integer function trexio_write_mo_2e_int_eri_lr (trex_file, & integer function trexio_write_mo_2e_int_eri_lr (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
@ -3176,8 +3176,8 @@ end interface
interface interface
integer function trexio_write_rdm_2e (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
@ -3189,8 +3189,8 @@ end interface
interface interface
integer function trexio_write_rdm_2e_upup (trex_file, & integer function trexio_write_rdm_2e_upup (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
@ -3202,8 +3202,8 @@ end interface
interface interface
integer function trexio_write_rdm_2e_dndn (trex_file, & integer function trexio_write_rdm_2e_dndn (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file
@ -3215,8 +3215,8 @@ end interface
interface interface
integer function trexio_write_rdm_2e_updn (trex_file, & integer function trexio_write_rdm_2e_updn (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
integer(8), intent(in), value :: trex_file integer(8), intent(in), value :: trex_file
integer(8), intent(in), value :: offset_file integer(8), intent(in), value :: offset_file