9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-21 11:03:29 +01:00

Merge branch 'dev-stable' of https://github.com/QuantumPackage/qp2 into dev-stable

This commit is contained in:
eginer 2024-03-05 17:24:31 +01:00
commit 9a9e2cc049
3 changed files with 19 additions and 5 deletions

View File

@ -120,7 +120,9 @@ function qp()
if [[ $? -eq 0 ]] ; then
COMMAND='qp_$@'
eval "$COMMAND" "${EZFIO_FILE}"
result=$?
unset COMMAND
return $result
else
_qp_usage
fi

View File

@ -2,6 +2,6 @@ program export_trexio_prog
implicit none
read_wf = .True.
SOFT_TOUCH read_wf
call export_trexio(.False.)
call export_trexio(.False.,.False.)
end

View File

@ -1,18 +1,28 @@
subroutine export_trexio(update)
subroutine export_trexio(update,full_path)
use trexio
implicit none
BEGIN_DOC
! Exports the wave function in TREXIO format
END_DOC
logical, intent(in) :: update
logical, intent(in) :: update, full_path
integer(trexio_t) :: f(N_states) ! TREXIO file handle
integer(trexio_exit_code) :: rc
integer :: k
integer :: k, iunit
double precision, allocatable :: factor(:)
character*(256) :: filenames(N_states)
character*(256) :: filenames(N_states), fp
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
do k=2,N_states
write(filenames(k),'(A,I3.3)') trim(trexio_filename)//'.', k-1
@ -49,6 +59,8 @@ subroutine export_trexio(update)
enddo
call ezfio_set_trexio_trexio_file(trexio_filename)
! ------------------------------------------------------------------------------
! Electrons