mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-23 04:43:45 +01:00
Merge branch 'dev-stable' of https://github.com/QuantumPackage/qp2 into dev-stable
This commit is contained in:
commit
9a9e2cc049
@ -120,7 +120,9 @@ function qp()
|
|||||||
if [[ $? -eq 0 ]] ; then
|
if [[ $? -eq 0 ]] ; then
|
||||||
COMMAND='qp_$@'
|
COMMAND='qp_$@'
|
||||||
eval "$COMMAND" "${EZFIO_FILE}"
|
eval "$COMMAND" "${EZFIO_FILE}"
|
||||||
|
result=$?
|
||||||
unset COMMAND
|
unset COMMAND
|
||||||
|
return $result
|
||||||
else
|
else
|
||||||
_qp_usage
|
_qp_usage
|
||||||
fi
|
fi
|
||||||
|
@ -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