mirror of https://gitlab.com/QEF/q-e.git
Added to ld1.x the possibility to write the all-electron charge in a file after
an all-electron run. git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7224 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
14db1c13a1
commit
0837b89e25
|
@ -31,7 +31,7 @@ subroutine ld1_readin
|
|||
upf_v1_format, file_pseudo, file_pseudopw, &
|
||||
file_potscf, file_screen, file_qvan, file_recon, &
|
||||
file_wfcaegen, file_wfcncgen, file_wfcusgen, &
|
||||
file_core, file_beta, file_chi, author, &
|
||||
file_core, file_beta, file_chi, file_charge, author, &
|
||||
nld, rpwe, rlderiv, eminld, emaxld, deld, &
|
||||
ecutmin, ecutmax, decut, rytoev_fact, verbosity, &
|
||||
frozen_core, lsdts, new_core_ps, cau_fact, &
|
||||
|
@ -91,6 +91,7 @@ subroutine ld1_readin
|
|||
cau_fact, & ! speed of light in a.u.
|
||||
vdw, & ! if .true. vdW coefficient in TF+vW will be calculated
|
||||
noscf, & ! if .true. the charge density is not computed
|
||||
file_charge, & ! file with the all-electron charge
|
||||
write_coulomb, & ! if .true. write a fake pseudopotential file with the
|
||||
! Coulomb potential for usage in all-electron calculations
|
||||
relpert ! compute relativistic perturbative corrections
|
||||
|
@ -152,6 +153,7 @@ subroutine ld1_readin
|
|||
file_recon = ' '
|
||||
file_screen = ' '
|
||||
file_core = ' '
|
||||
file_charge = ' '
|
||||
file_chi = ' '
|
||||
file_beta = ' '
|
||||
file_qvan = ' '
|
||||
|
@ -648,7 +650,7 @@ subroutine bcast_input()
|
|||
USE mp, ONLY : mp_bcast
|
||||
USE ld1inc, ONLY : zed, beta, tr2, iswitch, nlc, rlderiv, eminld, emaxld, &
|
||||
deld, lsd, rel, lsmall, isic, latt, title, prefix, vdw, &
|
||||
nld, noscf, relpert
|
||||
nld, noscf, relpert, file_charge
|
||||
|
||||
|
||||
implicit none
|
||||
|
@ -672,6 +674,7 @@ implicit none
|
|||
call mp_bcast( noscf, ionode_id )
|
||||
call mp_bcast( relpert, ionode_id )
|
||||
call mp_bcast( vdw, ionode_id )
|
||||
call mp_bcast( file_charge, ionode_id )
|
||||
#endif
|
||||
return
|
||||
end subroutine bcast_input
|
||||
|
|
|
@ -309,6 +309,7 @@ MODULE ld1inc
|
|||
file_pseudo, & ! input file containing the pseudopotential
|
||||
file_pseudopw ! output file where the pseudopot is written
|
||||
CHARACTER(len=256) :: & ! output filenames read from input, containing:
|
||||
file_charge, & ! all-electron total charge only
|
||||
file_chi, & ! chi functions
|
||||
file_beta, & ! beta functions
|
||||
file_qvan, & ! qvan functions
|
||||
|
|
|
@ -19,7 +19,8 @@ subroutine write_results
|
|||
nwf, nn, ll, jj, el, isw, oc, enl, file_wavefunctions, &
|
||||
dhrsic, dxcsic, eps0, iter, psi, rytoev_fact, lsmall, &
|
||||
core_state, ekinc, ekinv, ae_fc_energy, cau_fact, &
|
||||
relpert, evel, edar, eso, noscf, iswitch
|
||||
relpert, evel, edar, eso, noscf, iswitch, rho, &
|
||||
file_charge
|
||||
|
||||
use funct, only : get_iexch, get_dft_name
|
||||
implicit none
|
||||
|
@ -429,6 +430,26 @@ subroutine write_results
|
|||
call write_wfcfile(nomefile,psiaux,elaux,counter-1)
|
||||
enddo
|
||||
endif
|
||||
|
||||
if (file_charge.ne.' ') then
|
||||
if (ionode) &
|
||||
open(unit=20,file=file_charge, status='unknown', iostat=ios, err=100 )
|
||||
100 call mp_bcast(ios, ionode_id)
|
||||
call errore('write_results','opening file'//file_charge,abs(ios))
|
||||
if (ionode) then
|
||||
IF (lsd<1) THEN
|
||||
do n=1,grid%mesh
|
||||
write(20,'(2e20.9)') grid%r(n), rho(n,1)
|
||||
enddo
|
||||
ELSE
|
||||
do n=1,grid%mesh
|
||||
write(20,'(3e20.9)') grid%r(n), rho(n,1), rho(n,2)
|
||||
enddo
|
||||
ENDIF
|
||||
close(20)
|
||||
endif
|
||||
endif
|
||||
|
||||
write(stdout,'(/,5x,24(''-''), '' End of All-electron run '',24(''-''),/)')
|
||||
|
||||
return
|
||||
|
|
|
@ -266,6 +266,14 @@ input_description -distribution {Quantum Espresso} -program ld1.x {
|
|||
}
|
||||
}
|
||||
|
||||
var file_charge -type CHARACTER {
|
||||
default { ' ' }
|
||||
info {
|
||||
Name of the file where the code writes the all-electron
|
||||
total charge. No charge is written if file_charge=' '.
|
||||
}
|
||||
}
|
||||
|
||||
var config -type CHARACTER {
|
||||
default { ' ' }
|
||||
info {
|
||||
|
|
Loading…
Reference in New Issue