Commit 86901c15 authored by Gregor Michalicek's avatar Gregor Michalicek

Remove some charge output from out.xml

parent 443a89c3
......@@ -7,7 +7,7 @@
SUBROUTINE cdntot(&
& stars,atoms,sym,&
& vacuum,input,cell,oneD,&
& qpw,rho,rht,&
& qpw,rho,rht,l_printData,&
& qtot,qistot)
USE m_intgr, ONLY : intgr3
......@@ -27,6 +27,7 @@
TYPE(t_input),INTENT(IN) :: input
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_cell),INTENT(IN) :: cell
LOGICAL,INTENT(IN) :: l_printData
REAL, INTENT (OUT):: qtot,qistot
! ..
! .. Array Arguments ..
......@@ -117,24 +118,28 @@
names(2) = 'total' ; WRITE(attributes(2),'(f17.10)') q ; lengths(2,1)=5 ; lengths(2,2)=17
names(3) = 'interstitial' ; WRITE(attributes(3),'(f17.10)') qis ; lengths(3,1)=12 ; lengths(3,2)=17
names(4) = 'mtSpheres' ; WRITE(attributes(4),'(f17.10)') SUM(qmt(1:atoms%ntype)) ; lengths(4,1)=9 ; lengths(4,2)=17
IF(input%film) THEN
DO i = 1, vacuum%nvac
WRITE(names(4+i),'(a6,i0)') 'vacuum', i
WRITE(attributes(4+i),'(f17.10)') qvac(i)
lengths(4+i,1)=7
lengths(4+i,2)=17
END DO
CALL writeXMLElementFormPoly('spinDependentCharge',names(1:4+vacuum%nvac),&
attributes(1:4+vacuum%nvac),lengths)
ELSE
CALL writeXMLElementFormPoly('spinDependentCharge',names(1:4),attributes(1:4),lengths)
IF(l_printData) THEN
IF(input%film) THEN
DO i = 1, vacuum%nvac
WRITE(names(4+i),'(a6,i0)') 'vacuum', i
WRITE(attributes(4+i),'(f17.10)') qvac(i)
lengths(4+i,1)=7
lengths(4+i,2)=17
END DO
CALL writeXMLElementFormPoly('spinDependentCharge',names(1:4+vacuum%nvac),&
attributes(1:4+vacuum%nvac),lengths)
ELSE
CALL writeXMLElementFormPoly('spinDependentCharge',names(1:4),attributes(1:4),lengths)
END IF
END IF
qtot = qtot + q
END DO ! loop over spins
DEALLOCATE (lengths)
WRITE (6,FMT=8020) qtot
WRITE (16,FMT=8020) qtot
CALL writeXMLElementFormPoly('totalCharge',(/'value'/),(/qtot/),reshape((/5,20/),(/1,2/)))
IF(l_printData) THEN
CALL writeXMLElementFormPoly('totalCharge',(/'value'/),(/qtot/),reshape((/5,20/),(/1,2/)))
END IF
8000 FORMAT (/,10x,'total charge for spin',i3,'=',f12.6,/,10x,&
& 'interst. charge = ',f12.6,/,&
& (10x,'mt charge= ',4f12.6,/))
......
......@@ -7,7 +7,7 @@
SUBROUTINE qfix(&
& stars,atoms,sym,vacuum,&
& sphhar,input,cell,oneD,&
& qpw,rhtxy,rho,rht,&
& qpw,rhtxy,rho,rht,l_printData,&
& fix)
USE m_types
......@@ -23,6 +23,7 @@
TYPE(t_input),INTENT(IN) :: input
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_cell),INTENT(IN) :: cell
LOGICAL,INTENT(IN) :: l_printData
REAL, INTENT (OUT) :: fix
!-odim
!+odim
......@@ -41,7 +42,7 @@
CALL cdntot(&
& stars,atoms,sym,&
& vacuum,input,cell,oneD,&
& qpw,rho,rht,&
& qpw,rho,rht,.FALSE.,&
& qtot,qis)
zc = 0.
DO 10 n = 1,atoms%ntype
......@@ -99,7 +100,7 @@
CALL cdntot(&
& stars,atoms,sym,&
& vacuum,input,cell,oneD,&
& qpw,rho,rht,&
& qpw,rho,rht,l_printData,&
& qtot,qis)
!+roa
ELSE
......@@ -113,7 +114,7 @@
CALL cdntot(&
& stars,atoms,sym,&
& vacuum,input,cell,oneD,&
& qpw,rho,rht,&
& qpw,rho,rht,l_printData,&
& qtot,qis)
ENDIF
......
......@@ -181,7 +181,7 @@
!-t3e
IF (l_enpara) CLOSE (40)
CALL cdntot(stars,atoms,sym, vacuum,input,cell,oneD, qpw,rho,rht, qtot,dummy)
CALL cdntot(stars,atoms,sym, vacuum,input,cell,oneD, qpw,rho,rht,.TRUE., qtot,dummy)
CALL closeXMLElement('valenceDensity')
!
!---> changes
......@@ -314,8 +314,8 @@ enddo
IF (mpi%irank.EQ.0) THEN
! block 2 unnecessary for slicing: begin
IF (.NOT.sliceplot%slice) THEN
CALL openXMLElement('allElectronCharges',(/'comment'/),(/'inQFix'/))
CALL qfix(stars,atoms,sym,vacuum, sphhar,input,cell,oneD, qpw,rhtxy,rho,rht, fix)
CALL openXMLElementNoAttributes('allElectronCharges')
CALL qfix(stars,atoms,sym,vacuum, sphhar,input,cell,oneD, qpw,rhtxy,rho,rht,.TRUE., fix)
CALL closeXMLElement('allElectronCharges')
!---> pk non-collinear
IF (noco%l_noco) THEN
......
......@@ -360,7 +360,7 @@ CONTAINS
!
! ---> fix the new density
CALL qfix(stars,atoms,sym,vacuum, sphhar,input,cell,oneD,&
qpw,rhtxy,rho,rht, fix)
qpw,rhtxy,rho,rht,.FALSE., fix)
iter = iter + 1
IF (noco%l_noco) THEN
......
......@@ -196,7 +196,7 @@ CONTAINS
IF (.NOT.l_xyav) THEN
CALL timestart("Qfix")
CALL qfix(stars,atoms,sym,vacuum, sphhar,input,cell,oneD, qpw,rhtxy,rho,rht, fix)
CALL qfix(stars,atoms,sym,vacuum, sphhar,input,cell,oneD, qpw,rhtxy,rho,rht,.FALSE., fix)
CALL timestop("Qfix")
ENDIF
IF (input%total.OR.reap) REWIND nt
......
......@@ -148,7 +148,7 @@
CALL qfix(&
& stars,atoms,sym,vacuum,&
& sphhar,input,cell,oneD,&
& qpw,rhtxy,rho,rht,&
& qpw,rhtxy,rho,rht,.FALSE.,&
& fix)
ENDIF
......
......@@ -236,7 +236,7 @@
CALL qfix(&
& stars,atoms,sym,vacuum,&
& sphhar,input,cell,oneD,&
& qpw,rhtxy,rho,rht,&
& qpw,rhtxy,rho,rht,.FALSE.,&
& fix)
!
! Write superposed density onto density file
......
......@@ -141,7 +141,7 @@ CONTAINS
CALL qfix(&
& stars,atoms,sym,vacuum,&
& sphhar,input,cell,oneD,&
& qpw,rhtxy,rho,rht,&
& qpw,rhtxy,rho,rht,.FALSE.,&
& fix)
!---> fouriertransform the diagonal part of the density matrix
......
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