Commit cd3e8ebe authored by Gregor Michalicek's avatar Gregor Michalicek

Enabled writing out the bandgap to out.xml

Also in this commit: Changed the Htr to eV conversion factor
according to the 2014 CODATA recommended value.
parent dd8a53bb
......@@ -46,6 +46,8 @@ CONTAINS
!***********************************************************************
USE m_efnewton
USE m_types
USE m_xmlOutput
USE m_constants
IMPLICIT NONE
TYPE(t_results),INTENT(INOUT) :: results
TYPE(t_mpi),INTENT(IN) :: mpi
......@@ -80,6 +82,7 @@ CONTAINS
! .. Local Arrays ..
REAL :: qc(3)
CHARACTER(LEN=20) :: attributes(2)
! ..
!***********************************************************************
......@@ -119,7 +122,13 @@ CONTAINS
efermi = results%ef
IF (nstef.LT.n) THEN
gap = e(INDEX(nstef+1)) - results%ef
IF ( mpi%irank == 0 ) WRITE (6,FMT=8050) gap
IF ( mpi%irank == 0 ) THEN
attributes = ''
WRITE(attributes(1),'(f20.10)'), gap*hartree_to_ev_const
WRITE(attributes(2),'(a)'), 'eV'
CALL writeXMLElement('bandgap',(/'value','units'/),attributes)
WRITE (6,FMT=8050) gap
END IF
END IF
IF ( mpi%irank == 0 ) THEN
WRITE ( 6,FMT=8010) spindg* (ws-weight)
......
......@@ -8,7 +8,7 @@
REAL,PARAMETER:: tpi_const=2.*3.1415926535897932
REAL,PARAMETER:: fpi_const=4.*3.1415926535897932
REAL,PARAMETER:: sfp_const=sqrt(4.*3.1415926535897932)
REAL,PARAMETER:: hartree_to_ev_const=27.21138505
REAL,PARAMETER:: hartree_to_ev_const=27.21138602 ! value from 2014 CODATA recommended values. Uncertainty is 0.00000017
CHARACTER(2),DIMENSION(0:103),PARAMETER:: namat_const=(/
& 'va',' H','He','Li','Be',' B',' C',' N',' O',' F','Ne',
& 'Na','Mg','Al','Si',' P',' S','Cl','Ar',' K','Ca','Sc','Ti',
......
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