Commit 48e9fc53 authored by Gregor Michalicek's avatar Gregor Michalicek

Write out unfixed allElectronCharges again

parent 47573c88
...@@ -16,6 +16,7 @@ CONTAINS ...@@ -16,6 +16,7 @@ CONTAINS
USE m_types USE m_types
USE m_cdntot USE m_cdntot
USE m_xmlOutput
IMPLICIT NONE IMPLICIT NONE
! .. ! ..
! .. Scalar Arguments .. ! .. Scalar Arguments ..
...@@ -56,7 +57,7 @@ CONTAINS ...@@ -56,7 +57,7 @@ CONTAINS
! In this case do nothing except when forced to fix! ! In this case do nothing except when forced to fix!
CALL cdntot( stars,atoms,sym, vacuum,input,cell,oneD,& CALL cdntot( stars,atoms,sym, vacuum,input,cell,oneD,&
qpw,rho,rht,.FALSE., qtot,qis) qpw,rho,rht,.TRUE., qtot,qis)
!The total nucleii charge !The total nucleii charge
zc=SUM(atoms%neq(:)*atoms%zatom(:)) zc=SUM(atoms%neq(:)*atoms%zatom(:))
...@@ -81,17 +82,20 @@ CONTAINS ...@@ -81,17 +82,20 @@ CONTAINS
END IF END IF
WRITE (6,FMT=8000) zc,fix WRITE (6,FMT=8000) zc,fix
IF (ABS(fix-1.0)<1.E-6) RETURN !no second calculation of cdntot as nothing was fixed IF (ABS(fix-1.0)<1.E-6) RETURN !no second calculation of cdntot as nothing was fixed
CALL openXMLElementNoAttributes('fixedCharges')
CALL cdntot( stars,atoms,sym, vacuum,input,cell,oneD,& CALL cdntot( stars,atoms,sym, vacuum,input,cell,oneD,&
qpw,rho,rht,l_printData, qtot,qis) qpw,rho,rht,l_printData, qtot,qis)
CALL closeXMLElement('fixedCharges')
!+roa !+roa
ELSE ELSE
fix = (zc - qtot) / qis + 1. fix = (zc - qtot) / qis + 1.
qpw(:stars%ng3,:) = fix*qpw(:stars%ng3,:) qpw(:stars%ng3,:) = fix*qpw(:stars%ng3,:)
WRITE (6,FMT=8001) zc,fix WRITE (6,FMT=8001) zc,fix
IF (ABS(fix-1.0)<1.E-6) RETURN !no second calculation of cdntot as nothing was fixed IF (ABS(fix-1.0)<1.E-6) RETURN !no second calculation of cdntot as nothing was fixed
CALL openXMLElementNoAttributes('fixedCharges')
CALL cdntot( stars,atoms,sym, vacuum,input,cell,oneD,& CALL cdntot( stars,atoms,sym, vacuum,input,cell,oneD,&
qpw,rho,rht,l_printData, qtot,qis) qpw,rho,rht,l_printData, qtot,qis)
CALL closeXMLElement('fixedCharges')
ENDIF ENDIF
IF (fix>1.1) CALL juDFT_WARN("You lost too much charge") IF (fix>1.1) CALL juDFT_WARN("You lost too much charge")
......
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