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

Improve trexio module

This commit is contained in:
Anthony Scemama 2022-05-05 13:26:51 +02:00
parent 9745795b3d
commit 63f93db584
3 changed files with 53 additions and 33 deletions

View File

@ -16,15 +16,27 @@ doc: If True, export two-body reduced density matrix
interface: ezfio, ocaml, provider
default: False
[export_ao_ints]
[export_ao_one_e_ints]
type: logical
doc: If True, export one-electron integrals in AO basis
interface: ezfio, ocaml, provider
default: False
[export_mo_one_e_ints]
type: logical
doc: If True, export one-electron integrals in MO basis
interface: ezfio, ocaml, provider
default: False
[export_ao_two_e_ints]
type: logical
doc: If True, export two-electron integrals in AO basis
interface: ezfio, ocaml, provider
default: False
[export_mo_ints]
[export_mo_two_e_ints]
type: logical
doc: If True, export two-electron integrals in MO basis
interface: ezfio, ocaml, provider
default: True
default: False

View File

@ -257,29 +257,32 @@ subroutine run
! One-e AO integrals
! ------------------
print *, 'AO integrals'
if (export_ao_one_e_ints) then
print *, 'AO one-e integrals'
rc = trexio_write_ao_1e_int_overlap(f,ao_overlap)
call trexio_assert(rc, TREXIO_SUCCESS)
rc = trexio_write_ao_1e_int_kinetic(f,ao_kinetic_integrals)
call trexio_assert(rc, TREXIO_SUCCESS)
rc = trexio_write_ao_1e_int_potential_n_e(f,ao_integrals_n_e)
call trexio_assert(rc, TREXIO_SUCCESS)
if (do_pseudo) then
rc = trexio_write_ao_1e_int_ecp(f, ao_pseudo_integrals_local + ao_pseudo_integrals_non_local)
rc = trexio_write_ao_1e_int_overlap(f,ao_overlap)
call trexio_assert(rc, TREXIO_SUCCESS)
endif
rc = trexio_write_ao_1e_int_core_hamiltonian(f,ao_one_e_integrals)
call trexio_assert(rc, TREXIO_SUCCESS)
rc = trexio_write_ao_1e_int_kinetic(f,ao_kinetic_integrals)
call trexio_assert(rc, TREXIO_SUCCESS)
rc = trexio_write_ao_1e_int_potential_n_e(f,ao_integrals_n_e)
call trexio_assert(rc, TREXIO_SUCCESS)
if (do_pseudo) then
rc = trexio_write_ao_1e_int_ecp(f, ao_pseudo_integrals_local + ao_pseudo_integrals_non_local)
call trexio_assert(rc, TREXIO_SUCCESS)
endif
rc = trexio_write_ao_1e_int_core_hamiltonian(f,ao_one_e_integrals)
call trexio_assert(rc, TREXIO_SUCCESS)
end if
! Two-e AO integrals
! ------------------
if (export_ao_ints) then
if (export_ao_two_e_ints) then
print *, 'AO two-e integrals'
PROVIDE ao_two_e_integrals_in_map
integer(8), parameter :: BUFSIZE=10000_8
@ -342,26 +345,29 @@ subroutine run
! One-e MO integrals
! ------------------
print *, 'MO integrals'
if (export_mo_two_e_ints) then
print *, 'MO one-e integrals'
rc = trexio_write_mo_1e_int_kinetic(f,mo_kinetic_integrals)
call trexio_assert(rc, TREXIO_SUCCESS)
rc = trexio_write_mo_1e_int_potential_n_e(f,mo_integrals_n_e)
call trexio_assert(rc, TREXIO_SUCCESS)
if (do_pseudo) then
rc = trexio_write_mo_1e_int_ecp(f,mo_pseudo_integrals_local)
rc = trexio_write_mo_1e_int_kinetic(f,mo_kinetic_integrals)
call trexio_assert(rc, TREXIO_SUCCESS)
endif
rc = trexio_write_mo_1e_int_core_hamiltonian(f,mo_one_e_integrals)
call trexio_assert(rc, TREXIO_SUCCESS)
rc = trexio_write_mo_1e_int_potential_n_e(f,mo_integrals_n_e)
call trexio_assert(rc, TREXIO_SUCCESS)
if (do_pseudo) then
rc = trexio_write_mo_1e_int_ecp(f,mo_pseudo_integrals_local)
call trexio_assert(rc, TREXIO_SUCCESS)
endif
rc = trexio_write_mo_1e_int_core_hamiltonian(f,mo_one_e_integrals)
call trexio_assert(rc, TREXIO_SUCCESS)
end if
! Two-e MO integrals
! ------------------
if (export_mo_ints) then
if (export_mo_two_e_ints) then
print *, 'MO two-e integrals'
PROVIDE mo_two_e_integrals_in_map
double precision, external :: mo_two_e_integral
@ -420,6 +426,7 @@ subroutine run
if (export_rdm) then
PROVIDE two_e_dm_mo
print *, 'Two-e RDM'
icount = 0_8
offset = 0_8

View File

@ -373,7 +373,8 @@ def get_full_path(file_path):
if __name__ == '__main__':
ARGUMENTS = docopt(__doc__)
trexio_filename = get_full_path(ARGUMENTS['FILE'])
FILE = get_full_path(ARGUMENTS['FILE'])
trexio_filename = FILE
if ARGUMENTS["--output"]:
EZFIO_FILE = get_full_path(ARGUMENTS["--output"])