Commit ebee3296 authored by Marco Govoni's avatar Marco Govoni
Browse files

Propagated changes affecting pdep_io to Wfreq.

parent 003a1058
......@@ -20,6 +20,32 @@ MODULE pdep_db
!
!
CONTAINS
!
SUBROUTINE generate_pdep_fname( fname, j, iq)
!
! I/O
!
CHARACTER(LEN=25), INTENT(OUT) :: fname
INTEGER, INTENT(IN) :: j
INTEGER, INTENT(IN), OPTIONAL :: iq
!
! Workspace
!
INTEGER,PARAMETER :: default_iq = 1
INTEGER :: iq_
CHARACTER(LEN=9) :: label_j, label_q
!
IF( PRESENT(iq) ) THEN
iq_ = iq
ELSE
iq_ = default_iq
ENDIF
!
WRITE(label_j,'(i9.9)') j
WRITE(label_q,'(i9.9)') iq_
fname = "Q"//TRIM(ADJUSTL(label_q))//"E"//TRIM(ADJUSTL(label_j))//".json"
!
END SUBROUTINE
!
!
! *****************************
......@@ -63,8 +89,6 @@ MODULE pdep_db
LOGICAL, PARAMETER :: default_lprintinfo = .TRUE.
LOGICAL :: lprintinfo_
! labels
CHARACTER(LEN=9) :: label_j
CHARACTER(LEN=9) :: label_q
CHARACTER(LEN=9) :: label_i
! time
REAL(DP), EXTERNAL :: GET_CLOCK
......@@ -112,9 +136,7 @@ MODULE pdep_db
IF(ALLOCATED(eigenpot_filename)) DEALLOCATE(eigenpot_filename)
ALLOCATE( CHARACTER(LEN=25) :: eigenpot_filename(n_pdep_eigen) )
DO global_j = 1, n_pdep_eigen
WRITE(label_j,'(i9.9)') global_j
WRITE(label_q,'(i9.9)') iq_
eigenpot_filename(global_j) = "Q"//TRIM(ADJUSTL(label_q))//"E"//TRIM(ADJUSTL(label_j))//".json"
CALL generate_pdep_fname( eigenpot_filename(global_j), global_j, iq_)
ENDDO
IF(ALLOCATED(summary_file)) DEALLOCATE(summary_file)
summary_file = TRIM(ADJUSTL(wstat_save_dir)) // "/summary.json"
......@@ -247,8 +269,6 @@ MODULE pdep_db
LOGICAL, PARAMETER :: default_lprintinfo = .TRUE.
LOGICAL :: lprintinfo_
! labels
CHARACTER(LEN=9) :: label_j
CHARACTER(LEN=9) :: label_q
CHARACTER(LEN=9) :: label_i
! time
REAL(DP), EXTERNAL :: GET_CLOCK
......
......@@ -53,6 +53,7 @@ SUBROUTINE solve_gfreq_gamma(l_read_restart)
! USE fft_at_k, ONLY : SINGLEBAND_INVFFT_k,SINGLEBAND_FWFFT_k
USE becmod, ONLY : becp,allocate_bec_type,deallocate_bec_type
USE uspp, ONLY : vkb,nkb
USE pdep_db, ONLY : generate_pdep_fname
USE pdep_io, ONLY : pdep_read_G_and_distribute
USE io_push, ONLY : io_push_title
! USE control_flags, ONLY : gamma_only
......@@ -74,7 +75,8 @@ SUBROUTINE solve_gfreq_gamma(l_read_restart)
! Workspace
!
INTEGER :: i1,i2,i3,ip,ig,glob_ip,ir,ib,iks,m,im
CHARACTER(LEN=512) :: fname
CHARACTER(LEN=:),ALLOCATABLE :: fname
CHARACTER(LEN=25) :: filepot
CHARACTER(LEN=6) :: my_label_b
COMPLEX(DP),ALLOCATABLE :: auxr(:)
INTEGER :: nbndval
......@@ -204,8 +206,8 @@ SUBROUTINE solve_gfreq_gamma(l_read_restart)
!
! Exhume dbs eigenvalue
!
WRITE(my_label_b,'(i6.6)') glob_ip
fname = TRIM( wstat_save_dir ) // "/E"//TRIM(ADJUSTL(my_label_b))//".json"
CALL generate_pdep_fname( filepot, glob_ip )
fname = TRIM( wstat_save_dir ) // "/"// filepot
CALL pdep_read_G_and_distribute(fname,pertg)
!
! Multiply by sqvc
......@@ -331,6 +333,7 @@ SUBROUTINE solve_gfreq_k(l_read_restart)
USE fft_at_k, ONLY : single_invfft_k,single_fwfft_k
USE becmod, ONLY : becp,allocate_bec_type,deallocate_bec_type
USE uspp, ONLY : vkb,nkb
USE pdep_db, ONLY : generate_pdep_fname
USE pdep_io, ONLY : pdep_read_G_and_distribute
USE io_push, ONLY : io_push_title
USE noncollin_module, ONLY : noncolin,npol
......@@ -352,7 +355,8 @@ SUBROUTINE solve_gfreq_k(l_read_restart)
!
INTEGER :: i1,i2,i3,ip,ig,glob_ip,ir,ib,iv,iv_glob,iks,ik,m,im,ikks,ikk,iq,il
INTEGER :: npwk
CHARACTER(LEN=512) :: fname
CHARACTER(LEN=:),ALLOCATABLE :: fname
CHARACTER(LEN=25) :: filepot
CHARACTER(LEN=6) :: my_label_b
CHARACTER(LEN=5) :: my_label_q
COMPLEX(DP),ALLOCATABLE :: auxr(:)
......@@ -530,9 +534,8 @@ SUBROUTINE solve_gfreq_k(l_read_restart)
!
! Exhume dbs eigenvalue
!
WRITE(my_label_b,'(i6.6)') glob_ip
WRITE(my_label_q,'(i5.5)') iq
fname = TRIM( wstat_save_dir ) // "/EQ"//TRIM(ADJUSTL(my_label_q))//"_"//TRIM(ADJUSTL(my_label_b))//".json"
CALL generate_pdep_fname( filepot, glob_ip, iq )
fname = TRIM( wstat_save_dir ) // "/"// filepot
CALL pdep_read_G_and_distribute(fname,pertg,iq)
!
! Multiply by sqvc
......
......@@ -54,6 +54,7 @@ SUBROUTINE solve_wfreq_gamma(l_read_restart,l_generate_plot)
! USE fft_at_k, ONLY : SINGLEBAND_INVFFT_k,SINGLEBAND_FWFFT_k
USE becmod, ONLY : becp,allocate_bec_type,deallocate_bec_type
USE uspp, ONLY : vkb,nkb
USE pdep_db, ONLY : generate_pdep_fname
USE pdep_io, ONLY : pdep_read_G_and_distribute
USE io_push, ONLY : io_push_title
! USE control_flags, ONLY : gamma_only
......@@ -76,7 +77,8 @@ SUBROUTINE solve_wfreq_gamma(l_read_restart,l_generate_plot)
! Workspace
!
INTEGER :: i1,i2,i3,im,ip,ig,glob_ip,ir,iv,iks,ipol,m
CHARACTER(LEN=512) :: fname
CHARACTER(LEN=25) :: filepot
CHARACTER(LEN=:),ALLOCATABLE :: fname
CHARACTER(LEN=6) :: my_label_b
COMPLEX(DP),ALLOCATABLE :: auxr(:)
INTEGER :: nbndval
......@@ -293,8 +295,8 @@ SUBROUTINE solve_wfreq_gamma(l_read_restart,l_generate_plot)
!
! Exhume dbs eigenvalue
!
WRITE(my_label_b,'(i6.6)') glob_ip
fname = TRIM( wstat_save_dir ) // "/E"//TRIM(ADJUSTL(my_label_b))//".json"
CALL generate_pdep_fname( filepot, glob_ip )
fname = TRIM( wstat_save_dir ) // "/"// filepot
CALL pdep_read_G_and_distribute(fname,pertg)
!
! Multiply by sqvc
......@@ -603,6 +605,7 @@ SUBROUTINE solve_wfreq_k(l_read_restart,l_generate_plot)
USE fft_at_k, ONLY : single_invfft_k,single_fwfft_k
USE becmod, ONLY : becp,allocate_bec_type,deallocate_bec_type
USE uspp, ONLY : vkb,nkb
USE pdep_db, ONLY : generate_pdep_fname
USE pdep_io, ONLY : pdep_read_G_and_distribute
USE io_push, ONLY : io_push_title
! USE control_flags, ONLY : gamma_only
......@@ -625,7 +628,8 @@ SUBROUTINE solve_wfreq_k(l_read_restart,l_generate_plot)
! Workspace
!
INTEGER :: i1,i2,i3,im,ip,ig,glob_ip,ir,iv,iks,ik,is,iq,ikqs,ikq,ipol,m
CHARACTER(LEN=512) :: fname
CHARACTER(LEN=25) :: filepot
CHARACTER(LEN=:),ALLOCATABLE :: fname
CHARACTER(LEN=6) :: my_label_b
CHARACTER(LEN=5) :: my_label_q
COMPLEX(DP),ALLOCATABLE :: auxr(:)
......@@ -897,9 +901,8 @@ SUBROUTINE solve_wfreq_k(l_read_restart,l_generate_plot)
!
! Exhume dbs eigenvalue
!
WRITE(my_label_b,'(i6.6)') glob_ip
WRITE(my_label_q,'(i5.5)') iq
fname = TRIM( wstat_save_dir ) // "/EQ"//TRIM(ADJUSTL(my_label_q))//"_"//TRIM(ADJUSTL(my_label_b))//".json"
CALL generate_pdep_fname( filepot, glob_ip, iq )
fname = TRIM( wstat_save_dir ) // "/"// filepot
CALL pdep_read_G_and_distribute(fname,pertg,iq)
!
! Multiply by sqvc
......
......@@ -2,18 +2,22 @@
include ../maketest.inc
default: title all
default: title description all
all: prepare_inputs run
prepare_inputs:
bash prepare_inputs.sh
run:
run: pw wstat wfreq
pw:
${PARA_PREFIX} ${BINDIR}/pw.x -i pw.in > pw.out
tail -5 pw.out
wstat:
${PARA_PREFIX} ${BINDIR}/wstat.x -nimage ${NIMAGE} -i wstat.in > wstat.out
tail -5 wstat.out
wfreq:
${PARA_PREFIX} ${BINDIR}/wfreq.x -nimage ${NIMAGE} -i wfreq.in > wfreq.out
tail -5 wfreq.out
......@@ -26,3 +30,8 @@ title:
@echo "### test001 ###"
@echo "###############"
@echo " "
description:
@echo " "
@echo "SiH4 molecule gamma_only"
@echo " "
......@@ -2,18 +2,25 @@
include ../maketest.inc
default: title all
default: title description all
all: prepare_inputs run
prepare_inputs:
bash prepare_inputs.sh
run:
run: pw wstat1 wstat2 wfreq
pw:
${PARA_PREFIX} ${BINDIR}/pw.x -i pw.in > pw.out
tail -5 pw.out
${PARA_PREFIX} ${BINDIR}/wstat.x -nimage ${NIMAGE} -i wstat.in > wstat.out
tail -5 wstat.out
wstat1:
${PARA_PREFIX} ${BINDIR}/wstat.x -nimage ${NIMAGE} -i wstat1.in > wstat1.out
tail -5 wstat1.out
wstat2:
${PARA_PREFIX} ${BINDIR}/wstat.x -nimage ${NIMAGE} -i wstat2.in > wstat2.out
tail -5 wstat2.out
wfreq:
${PARA_PREFIX} ${BINDIR}/wfreq.x -nimage ${NIMAGE} -i wfreq.in > wfreq.out
tail -5 wfreq.out
......@@ -26,3 +33,8 @@ title:
@echo "### test002 ###"
@echo "###############"
@echo " "
description:
@echo " "
@echo "CH4 molecule gamma_only test n_read_from_file"
@echo " "
......@@ -37,7 +37,7 @@ K_POINTS {gamma}
EOF
cat > wstat.in << EOF
cat > wstat1.in << EOF
{
"input_west": {
"qe_prefix": "test",
......@@ -46,7 +46,22 @@ cat > wstat.in << EOF
},
"wstat_control": {
"wstat_calculation": "S",
"n_pdep_eigen": 50
"n_pdep_eigen": 10
}
}
EOF
cat > wstat2.in << EOF
{
"input_west": {
"qe_prefix": "test",
"west_prefix": "test",
"outdir": "./"
},
"wstat_control": {
"wstat_calculation": "S",
"n_pdep_eigen": 50,
"n_pdep_read_from_file": 5
}
}
EOF
......
......@@ -2,18 +2,22 @@
include ../maketest.inc
default: title all
default: title description all
all: prepare_inputs run
prepare_inputs:
bash prepare_inputs.sh
run:
run: pw wstat wfreq
pw:
${PARA_PREFIX} ${BINDIR}/pw.x -i pw.in > pw.out
tail -5 pw.out
wstat:
${PARA_PREFIX} ${BINDIR}/wstat.x -nimage ${NIMAGE} -i wstat.in > wstat.out
tail -5 wstat.out
wfreq:
${PARA_PREFIX} ${BINDIR}/wfreq.x -nimage ${NIMAGE} -i wfreq.in > wfreq.out
tail -5 wfreq.out
......@@ -26,3 +30,8 @@ title:
@echo "### test003 ###"
@echo "###############"
@echo " "
description:
@echo " "
@echo "CH4 molecule gamma_only spin-polarized"
@echo " "
......@@ -2,18 +2,22 @@
include ../maketest.inc
default: title all
default: title description all
all: prepare_inputs run
prepare_inputs:
bash prepare_inputs.sh
run:
run: pw wstat wfreq
pw:
${PARA_PREFIX} ${BINDIR}/pw.x -i pw.in > pw.out
tail -5 pw.out
wstat:
${PARA_PREFIX} ${BINDIR}/wstat.x -nimage ${NIMAGE} -i wstat.in > wstat.out
tail -5 wstat.out
wfreq:
${PARA_PREFIX} ${BINDIR}/wfreq.x -nimage ${NIMAGE} -i wfreq.in > wfreq.out
tail -5 wfreq.out
......@@ -26,3 +30,8 @@ title:
@echo "### test004 ###"
@echo "###############"
@echo " "
description:
@echo " "
@echo "Si bulk kmesh 1x1x2"
@echo " "
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment