Commit d53aa089 authored by Stefan Rost's avatar Stefan Rost

fixed/changed output of coulomb potential for gw

parent 926ac62a
......@@ -118,6 +118,8 @@ SUBROUTINE writeBasis(input,noco,kpts,atoms,sym,cell,enpara,vTot,vCoul,vx,mpi,DI
INTEGER jsp,nk,l,itype
INTEGER numbands, nbasfcn, ndbands !ndbands number of bands without highest (degenerate)
!WRITE(5000,*) 'writeBasis entry'
CALL force%init1(input,atoms)
IF (noco%l_mperp) THEN
......@@ -611,9 +613,17 @@ write(*,*)numbands,ndbands
CALL h5fclose_f(fileID, hdfError)
!-------------------------write potential--------------------
CALL writePotential(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,POT_ARCHIVE_TYPE_TOT_const,vTot%iter,vTot%mt,vTot%pw,vTot%vacz,vTot%vacxy)
CALL writePotential(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,POT_ARCHIVE_TYPE_COUL_const,vCoul%iter,vCoul%mt,vCoul%pw,vCoul%vacz,vCoul%vacxy)
CALL writePotential(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,POT_ARCHIVE_TYPE_X_const,vx%iter,vx%mt,vx%pw,vx%vacz,vx%vacxy)
WRITE(6000,*) ALLOCATED(vCoul%pw)
WRITE(6000,*) ALLOCATED(vCoul%pw_w)
FLUSH(6000)
DO i = 1, stars%ng3
WRITE(6000,'(i7,4f15.8)') i, REAL(vCoul%pw(i,1)), REAL(vCoul%pw_w(i,1))
WRITE(6001,'(i7,4f15.8)') i, REAL(vTot%pw(i,1)), REAL(vTot%pw_w(i,1))
END DO
CALL writePotential(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,POT_ARCHIVE_TYPE_TOT_const,vTot%iter,vTot%mt,vTot%pw_w,vTot%vacz,vTot%vacxy)
CALL writePotential(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,POT_ARCHIVE_TYPE_COUL_const,vCoul%iter,vCoul%mt,vCoul%pw_w,vCoul%vacz,vCoul%vacxy)
CALL writePotential(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,POT_ARCHIVE_TYPE_X_const,vx%iter,vx%mt,vx%pw_w,vx%vacz,vx%vacxy)
......
......@@ -55,6 +55,8 @@ CONTAINS
TYPE(t_potden) :: workden,denRot
INTEGER :: ispin, i
if (mpi%irank==0) WRITE (6,FMT=8000)
8000 FORMAT (/,/,t10,' p o t e n t i a l g e n e r a t o r',/)
......@@ -79,6 +81,13 @@ CONTAINS
CALL vCoul%copy_both_spin(vTot)
vCoul%mt(:,:,:,input%jspins)=vCoul%mt(:,:,:,1)
DO ispin = 1, input%jspins
DO i = 1, stars%ng3
vcoul%pw(i,ispin) = vcoul%pw(i,ispin) / stars%nstr(i)
vcoul%pw_w(i,ispin) = vcoul%pw_w(i,ispin) / stars%nstr(i) !this normalization is needed for gw
END DO
END DO
IF (noco%l_noco) THEN
CALL denRot%init(stars,atoms,sphhar,vacuum,input%jspins,noco%l_noco,0)
denRot=den
......@@ -90,7 +99,7 @@ CONTAINS
!ToDo, check if this is needed for more potentials as well...
CALL vgen_finalize(atoms,stars,vacuum,sym,noco,input,vTot,denRot)
DEALLOCATE(vcoul%pw_w)
!DEALLOCATE(vcoul%pw_w)
CALL bfield(input,noco,atoms,field,vTot)
......
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