mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-30 15:15:38 +01:00
Adapted trexio file for full path
This commit is contained in:
parent
b108b69726
commit
590463063f
@ -2,6 +2,6 @@ program export_trexio_prog
|
|||||||
implicit none
|
implicit none
|
||||||
read_wf = .True.
|
read_wf = .True.
|
||||||
SOFT_TOUCH read_wf
|
SOFT_TOUCH read_wf
|
||||||
call export_trexio(.False.)
|
call export_trexio(.False.,.False.)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,18 +1,28 @@
|
|||||||
subroutine export_trexio(update)
|
subroutine export_trexio(update,full_path)
|
||||||
use trexio
|
use trexio
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Exports the wave function in TREXIO format
|
! Exports the wave function in TREXIO format
|
||||||
END_DOC
|
END_DOC
|
||||||
|
|
||||||
logical, intent(in) :: update
|
logical, intent(in) :: update, full_path
|
||||||
integer(trexio_t) :: f(N_states) ! TREXIO file handle
|
integer(trexio_t) :: f(N_states) ! TREXIO file handle
|
||||||
integer(trexio_exit_code) :: rc
|
integer(trexio_exit_code) :: rc
|
||||||
integer :: k
|
integer :: k, iunit
|
||||||
double precision, allocatable :: factor(:)
|
double precision, allocatable :: factor(:)
|
||||||
character*(256) :: filenames(N_states)
|
character*(256) :: filenames(N_states), fp
|
||||||
character :: rw
|
character :: rw
|
||||||
|
|
||||||
|
integer, external :: getunitandopen
|
||||||
|
|
||||||
|
if (full_path) then
|
||||||
|
fp = trexio_filename
|
||||||
|
call system('realpath '//trim(fp)//' > '//trim(fp)//'.tmp')
|
||||||
|
iunit = getunitandopen(trim(fp)//'.tmp','r')
|
||||||
|
read(iunit,'(A)') trexio_filename
|
||||||
|
close(iunit, status='delete')
|
||||||
|
endif
|
||||||
|
|
||||||
filenames(1) = trexio_filename
|
filenames(1) = trexio_filename
|
||||||
do k=2,N_states
|
do k=2,N_states
|
||||||
write(filenames(k),'(A,I3.3)') trim(trexio_filename)//'.', k-1
|
write(filenames(k),'(A,I3.3)') trim(trexio_filename)//'.', k-1
|
||||||
@ -49,6 +59,8 @@ subroutine export_trexio(update)
|
|||||||
enddo
|
enddo
|
||||||
call ezfio_set_trexio_trexio_file(trexio_filename)
|
call ezfio_set_trexio_trexio_file(trexio_filename)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
! ------------------------------------------------------------------------------
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
! Electrons
|
! Electrons
|
||||||
|
Loading…
Reference in New Issue
Block a user