Commit 139ae107 authored by Daniel Wortmann's avatar Daniel Wortmann

Merged develop into hybrid

parent 676c6978
......@@ -16,6 +16,7 @@
USE m_pwint
USE m_types
USE m_juDFT
USE m_convol
USE m_xmlOutput
IMPLICIT NONE
! ..
......@@ -91,7 +92,11 @@
20 CONTINUE
END IF
! -----is region
qis = 0.
IF (.not.judft_was_Argument("-oldfix")) THEN
CALL convol(stars,x,qpw(:,jspin),stars%ufft)
qis = x(1)*cell%omtil
ELSE
qis = 0.
! DO 30 j = 1,nq3
! CALL pwint(
! > k1d,k2d,k3d,n3d,ntypd,natd,nop,invtab,odi,
......@@ -108,6 +113,7 @@
DO j = 1,stars%ng3
qis = qis + qpw(j,jspin)*x(j)*stars%nstr(j)
ENDDO
endif
qistot = qistot + qis
q = q + qis
WRITE (6,FMT=8000) jspin,q,qis, (qmt(n),n=1,atoms%ntype)
......
......@@ -43,7 +43,7 @@ CONTAINS
! off-diagonal elements n_21
!***********************************************************************
!
USE m_constants, ONLY : tpi_const
USE m_constants
USE m_grdchlh
USE m_qsf
USE m_cylbes
......@@ -70,7 +70,7 @@ CONTAINS
INTEGER, INTENT (IN) :: ne
INTEGER, INTENT (IN) :: ikpt
INTEGER,PARAMETER :: n2max=13
REAL,PARAMETER :: emax=2.0/27.2
REAL,PARAMETER :: emax=2.0/hartree_to_ev_const
! .. Array Arguments ..
REAL, INTENT (IN) :: bkpt(3)
REAL, INTENT (IN) :: evac(2,DIMENSION%jspd)
......
program test
use elpa1
integer:: ierr,mpi_subcom, myrowblacs, mycolblacs
integer:: mpi_comm_rows,mpi_comm_cols,m,nb,mycolssca
integer:: mpi_comm_rows,mpi_comm_cols,m,nb,mycolssca,myrowssca
logical :: ok
real :: bsca(10,10)
ok=CHOLESKY_real (m,bsca,SIZE(bsca,1),nb,mycolssca,mpi_comm_rows,mpi_comm_cols,.false.)
real :: bsca(10,10),asca(10,10),eigvec(10,10)
ok= mult_at_b_real('U', 'L',m,m,bsca,myrowssca,asca,SIZE(asca,1),nb, mpi_comm_rows, mpi_comm_cols,eigvec,myrowssca)
end
......@@ -218,6 +218,15 @@ CONTAINS
ENDIF
DEALLOCATE ( cwork )
ENDIF
IF((info.EQ.0).AND.(ne.NE.iu)) THEN
WRITE(*,*) ''
WRITE(*,*) 'Call to LAPACK routine sspevx/dspevx/chpevx/zhpevx resulted in problem:'
WRITE(*,*) 'The library does not report an error but the number of found eigenvalues'
WRITE(*,*) 'does not agree with the target number of eigenvalues to be calculated.'
WRITE(*,*) 'This is a bug in either fleur or the linked LAPACK library.'
WRITE(*,*) ''
CALL juDFT_error("sspevx/dspevx/chpevx/zhpevx failed without explicit errorcode.",calledby="franza")
END IF
IF(addstate) THEN ! cut topmost subspace of degenerate states to avoid symmetry breaking (CF)
iu = ne
ne = ne - 1
......
......@@ -42,8 +42,8 @@ CONTAINS
TYPE(t_tlmplm),INTENT(INOUT) :: tlmplm
LOGICAL,INTENT(IN) :: l_real
REAL, OPTIONAL,ALLOCATABLE,INTENT (INOUT) :: aa_r(:)!(matsize)
COMPLEX, OPTIONAL,ALLOCATABLE,INTENT (INOUT) :: aa_c(:)
REAL, OPTIONAL,INTENT (INOUT) :: aa_r(:)!(matsize)
COMPLEX, OPTIONAL,INTENT (INOUT) :: aa_c(:)
! ..
! .. Local Scalars ..
COMPLEX axx,bxx,cxx,dtd,dtu,dtulo,ulotd,ulotu,ulotulo,utd,utu, utulo,chihlp
......
......@@ -13,8 +13,8 @@ module m_hsmt_hlptomat
implicit none
integer, intent(in) :: nlotot,nv(:),sub_comm
complex, intent(in) :: chi11,chi21,chi22
complex, allocatable,intent(inout) :: aahlp(:)
complex, intent(inout) :: aa(:)
complex, intent(inout) :: aahlp(:)
complex, intent(inout) :: aa(:)
complex, optional,intent(inout) :: bb(:),bbhlp(:)
integer :: ii,ij,ki,kj,n_rank,n_size
......
......@@ -76,7 +76,6 @@ MODULE m_tlmplm
!---> generate the wavefunctions for each l
!
l_write=mpi%irank==0
!$ l_write=.false.
!$ call gaunt2(atoms%lmaxd)
!$OMP PARALLEL DO DEFAULT(NONE)&
......
......@@ -8,7 +8,7 @@ MODULE m_fergwt
CONTAINS
SUBROUTINE fergwt(kpts,input,mpi, ne,eig, results)
USE m_constants, ONLY : pi_const
USE m_constants
USE m_types
IMPLICIT NONE
......@@ -90,7 +90,7 @@ CONTAINS
IF ( mpi%irank == 0 ) WRITE (6,FMT=8000) eps
8000 FORMAT (10x,'warning: eps has been increased to',e12.5)
ENDDO conv_loop
workf = -27.2116*results%ef
workf = -hartree_to_ev_const*results%ef
IF ( mpi%irank == 0 ) THEN
WRITE (16,FMT=8010) results%ef,workf,s
WRITE (6,FMT=8010) results%ef,workf,s
......
MODULE m_efield
use m_juDFT
USE m_juDFT
USE m_constants
IMPLICIT NONE
PRIVATE
PUBLIC :: efield
......@@ -256,9 +257,6 @@
INTEGER, INTENT(IN) :: k1d, k2d, nvac
REAL, INTENT(IN) :: area
! htr -> electron Volt
REAL, PARAMETER :: htr_eV = 27.21138386 ! eV
REAL :: zsigma, sig_b(2), tmp
INTEGER, PARAMETER :: iou = 33
INTEGER :: ios
......@@ -307,8 +305,8 @@
CLOSE (iou)
IF (eV) THEN
E%sig_b(:) = E%sig_b/htr_eV
E%sigEF(:,:,:) = E%sigEF/htr_eV
E%sig_b(:) = E%sig_b/hartree_to_ev_const
E%sigEF(:,:,:) = E%sigEF/hartree_to_ev_const
END IF
! Save average sigEF potential in sig_b and remove it from
! sigEF to avoid double counting; i.e. make g_|| = 0 of sigEF == 0.
......@@ -706,10 +704,10 @@
IF (ALLOCATED(E%sigEF))&
& WRITE (unit,'(3x,a)') 'Average potential:'
WRITE (unit, '(3x,a,f12.5,a, f12.5,a)') 'on sheet 1: ',&
& E%sig_b(1),' htr = ',E%sig_b(1)*htr_eV,' V'
& E%sig_b(1),' htr = ',E%sig_b(1)*hartree_to_ev_const,' V'
IF (nvac > 1) THEN
WRITE (unit, '(3x,a,f12.5,a, f12.5,a)') 'on sheet 2: ',&
& E%sig_b(2),' htr = ',E%sig_b(2)*htr_eV,' V'
& E%sig_b(2),' htr = ',E%sig_b(2)*hartree_to_ev_const,' V'
WRITE (unit,'(3x,a,f14.5,a)')&
& 'Average field (plate to plate):',&
......@@ -781,7 +779,7 @@
& E%sigEF(i,j,ivac)&
& + E%sig_b(ivac),&
& (E%sigEF(i,j,ivac)&
& + E%sig_b(ivac))*htr_eV
& + E%sig_b(ivac))*hartree_to_ev_const
ELSE ! Neumann
WRITE (748, '(4f12.5,2g16.5)')&
& pt_abs(1:2), pt_rel(1:2),&
......
......@@ -110,21 +110,6 @@ SUBROUTINE gen_bz( kpts,sym)
END DO
kpts%nkptf = ic
!IF (kpts%nkptf /= ic) THEN
! WRITE(*,*) ''
! WRITE(*,*) 'Generation of full Brilloun zone from IBZ failed.'
! WRITE(*,*) 'Number of generated k points in full BZ does not'
! WRITE(*,*) 'agree with target.'
! WRITE(*,*) 'Number of generated k points in full BZ: ', ic
! WRITE(*,*) 'Target: ', kpts%nkptf
! WRITE(*,*) ''
! DO ikpt=1,kpts%nkptf
! WRITE(*,*) kpts%bkf(:,ikpt)
! END DO
! CALL juDFT_error("gen_bz: error kpts/symmetry",calledby="gen_bz")
!END IF
! Reallocate bkf, bkp, bksym
ALLOCATE (iarr(kpts%nkptf))
......
......@@ -30,7 +30,7 @@
& atoms,obsolete,vacuum,&
& input,banddos,xcpot,sym,&
& cell,sliceplot,noco,&
& stars,oneD,jij,hybrid,kpts)
& stars,oneD,jij,hybrid,kpts,scale,a1,a2,a3,namex,relcor)
USE m_rwinp
USE m_chkmt
USE m_inpnoco
......@@ -42,36 +42,40 @@
IMPLICIT NONE
! ..
! .. Scalar Arguments ..
TYPE(t_atoms), INTENT(INOUT)::atoms
TYPE(t_obsolete), INTENT(INOUT)::obsolete
TYPE(t_vacuum), INTENT(INOUT)::vacuum
TYPE(t_input), INTENT(INOUT)::input
TYPE(t_banddos), INTENT(INOUT)::banddos
TYPE(t_xcpot), INTENT(INOUT)::xcpot
TYPE(t_sym), INTENT(INOUT)::sym
TYPE(t_cell), INTENT(INOUT)::cell
TYPE(t_sliceplot), INTENT(INOUT)::sliceplot
TYPE(t_noco), INTENT(INOUT)::noco
TYPE(t_stars), INTENT(INOUT)::stars
TYPE(t_oneD), INTENT(INOUT)::oneD
TYPE(t_jij), INTENT(INOUT)::jij
TYPE(t_hybrid), INTENT(INOUT)::hybrid
TYPE(t_kpts), INTENT(INOUT)::kpts
TYPE(t_atoms), INTENT(INOUT) :: atoms
TYPE(t_obsolete), INTENT(INOUT) :: obsolete
TYPE(t_vacuum), INTENT(INOUT) :: vacuum
TYPE(t_input), INTENT(INOUT) :: input
TYPE(t_banddos), INTENT(INOUT) :: banddos
TYPE(t_xcpot), INTENT(INOUT) :: xcpot
TYPE(t_sym), INTENT(INOUT) :: sym
TYPE(t_cell), INTENT(INOUT) :: cell
TYPE(t_sliceplot), INTENT(INOUT) :: sliceplot
TYPE(t_noco), INTENT(INOUT) :: noco
TYPE(t_stars), INTENT(INOUT) :: stars
TYPE(t_oneD), INTENT(INOUT) :: oneD
TYPE(t_jij), INTENT(INOUT) :: jij
TYPE(t_hybrid), INTENT(INOUT) :: hybrid
TYPE(t_kpts), INTENT(INOUT) :: kpts
REAL, INTENT(OUT) :: scale
REAL, INTENT(OUT) :: a1(3)
REAL, INTENT(OUT) :: a2(3)
REAL, INTENT(OUT) :: a3(3)
CHARACTER(len=4), INTENT(OUT) :: namex
CHARACTER(len=12), INTENT(OUT) :: relcor
! .. Local Scalars ..
REAL dr,dtild,r,kmax1,dvac1,zp,scale
REAL dr,dtild,r,kmax1,dvac1,zp
INTEGER i,iz,j,n,n1,na,ntst,nn,ios
LOGICAL l_gga,l_test,l_vca
CHARACTER(len=2) :: str_up,str_do
CHARACTER(len=4) :: namex
CHARACTER(len=12) :: relcor
! ..
! .. Local Arrays ..
CHARACTER(3) noel(atoms%ntype)
CHARACTER(8) llr(0:1)
INTEGER jri1(atoms%ntype),lmax1(atoms%ntype)
REAL rmt1(atoms%ntype),dx1(atoms%ntype)
REAL a1(3),a2(3),a3(3)
! ..
! .. Data statements ..
......
......@@ -55,6 +55,9 @@
WRITE(6,*) "No enpara file found, using default values"
enpara%el0(:,:,1)=0.0
enpara%el0(0,:,1)=-999999.0
enpara%lchange = .FALSE.
enpara%llochg = .FALSE.
enpara%lchg_v = .FALSE.
DO n = 1, atoms%ntype
l_clf = .FALSE.
WRITE(fname,"('corelevels.',i2.2)") NINT(atoms%zatom(n))
......
......@@ -75,6 +75,7 @@ CONTAINS
stars%ng2 = 0
kv(3) = 0
stars%kv2 = 0
DO k1 = stars%mx1,-stars%mx1,-1
kv(1) = k1
k2_loop:DO k2 = stars%mx2,-stars%mx2,-1
......@@ -183,6 +184,7 @@ CONTAINS
! three dimensional stars
!
stars%ng3 = 0
stars%ig = 0
DO k3 = -stars%mx3,stars%mx3
DO k2 = -stars%mx2,stars%mx2
DO k1 = -stars%mx1,stars%mx1
......@@ -210,6 +212,9 @@ CONTAINS
! zrfs,invs: z-reflection, inversion.
IF (sym%zrfs .OR. sym%invs) m0 = 0
stars%ig2 = 0
stars%sk3 = 0.0
stars%kv3 = 0
DO k2 = 1,stars%ng2
DO k3 = m0,stars%mx3
s = SQRT(stars%sk2(k2)**2+ (k3*cell%bmat(3,3))**2)
......@@ -302,6 +307,8 @@ CONTAINS
kidx2=0
!-gu
stars%rgphs(:,:,:) = cmplx(0.0,0.0)
stars%ft2_gfx = 0.0
stars%ft2_gfy = 0.0
DO k = 1,stars%ng3
CALL spgrot(&
......@@ -432,10 +439,9 @@ CONTAINS
! count number of members for each star
! nstr2 ... members of 2-dim stars
!
DO k = 1,stars%ng3
stars%nstr2(stars%ig2(k)) = 0
stars%nstr(k) = 0
ENDDO
stars%nstr2(:) = 0
stars%nstr(:) = 0
DO k3 = -stars%mx3,stars%mx3
DO k2 = -mxx2,mxx2
......@@ -732,6 +738,8 @@ CONTAINS
! sum over phases
!
stars%rgphs(:,:,:) = cmplx(0.0,0.0)
stars%igfft = 0
stars%pgfft = cmplx(0.0,0.0)
starloop: DO k = 1,stars%ng3
CALL spgrot(&
......
......@@ -14,7 +14,7 @@ CONTAINS
CHARACTER(LEN=500):: infostring
PRINT *," Welcome to FLEUR - inpgen (www.flapw.de) "
PRINT *," MaX-Release 1.2 (www.max-centre.eu)"
PRINT *," MaX-Release 1.3 (www.max-centre.eu)"
IF (.NOT. (juDFT_was_argument("-h").OR.juDFT_was_argument("--help"))) RETURN
......
......@@ -140,7 +140,7 @@ SUBROUTINE r_inpXML(&
REAL :: speciesXMLCoreOccs(2,29)
LOGICAL :: speciesXMLPrintCoreStates(29)
INTEGER :: iType, iLO, iSpecies, lNumCount, nNumCount, iLLO, jsp, j, l
INTEGER :: iType, iLO, iSpecies, lNumCount, nNumCount, iLLO, jsp, j, l, absSum
INTEGER :: numberNodes, nodeSum, numSpecies, n2spg, n1, n2, ikpt, iqpt
INTEGER :: atomicNumber, coreStates, gridPoints, lmax, lnonsphr, lmaxAPW
INTEGER :: latticeDef, symmetryDef, nop48, firstAtomOfType, errorStatus
......@@ -158,7 +158,6 @@ SUBROUTINE r_inpXML(&
REAL :: weightScale, eParamUp, eParamDown
LOGICAL :: l_amf
REAL, PARAMETER :: boltzmannConst = 3.1668114e-6 ! value is given in Hartree/Kelvin
REAL, PARAMETER :: htr_eV = 27.21138386 ! eV
......@@ -241,12 +240,10 @@ SUBROUTINE r_inpXML(&
numberNodes = numberNodes + xmlGetNumberOfNodes('/fleurInput/atomGroups/atomGroup/absPos')
numberNodes = numberNodes + xmlGetNumberOfNodes('/fleurInput/atomGroups/atomGroup/filmPos')
atoms%nat = numberNodes
atoms%nat = numberNodes
numberNodes = xmlGetNumberOfNodes('/fleurInput/atomGroups/atomGroup')
atoms%ntype = numberNodes
atoms%ntype = numberNodes
numSpecies = xmlGetNumberOfNodes('/fleurInput/atomSpecies/species')
......@@ -695,8 +692,8 @@ SUBROUTINE r_inpXML(&
! ALLOCATE(input%efield%sigEF(3*k1d, 3*k2d, nvac))
! input%efield%sigEF = 0.0
IF (l_eV) THEN
input%efield%sig_b(:) = input%efield%sig_b/htr_eV
! input%efield%sigEF(:,:,:) = input%efield%sigEF/htr_eV
input%efield%sig_b(:) = input%efield%sig_b/hartree_to_ev_const
! input%efield%sigEF(:,:,:) = input%efield%sigEF/hartree_to_ev_const
END IF
END IF
......@@ -915,6 +912,7 @@ SUBROUTINE r_inpXML(&
IF (numberNodes.EQ.1) THEN
symmetryDef = 2
sym%nop = 48
valueString = TRIM(ADJUSTL(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@filename')))
CALL rw_symfile('r',94,TRIM(ADJUSTL(valueString)),48,cell%bmat,&
......@@ -929,14 +927,27 @@ SUBROUTINE r_inpXML(&
END IF
ALLOCATE(sym%tau(3,sym%nop))
sym%invs = .FALSE.
sym%zrfs = .FALSE.
DO k = 1, sym%nop
absSum = 0
DO i = 1, 3
DO j = 1, 3
sym%mrot(j,i,k) = mrotTemp(j,i,k)
absSum = absSum + ABS(sym%mrot(j,i,k))
END DO
sym%tau(i,k) = tauTemp(i,k)
END DO
IF (absSum.EQ.3) THEN
IF (ALL(sym%tau(:,k).EQ.0.0)) THEN
IF ((sym%mrot(1,1,k).EQ.-1).AND.(sym%mrot(2,2,k).EQ.-1).AND.(sym%mrot(3,3,k).EQ.-1)) sym%invs = .TRUE.
IF ((sym%mrot(1,1,k).EQ.1).AND.(sym%mrot(2,2,k).EQ.1).AND.(sym%mrot(3,3,k).EQ.-1)) sym%zrfs = .TRUE.
END IF
END IF
END DO
sym%invs2 = sym%invs.AND.sym%zrfs
END IF
xPathA = '/fleurInput/cell/symmetryOperations'
......@@ -1176,10 +1187,10 @@ SUBROUTINE r_inpXML(&
CALL juDFT_error("Wrong name of XC-potential!", calledby="r_inpXML")
END IF
xcpot%igrd = 0
obsolete%lwb=.FALSE.
IF (xcpot%icorr.GE.6) THEN
xcpot%igrd = 1
! Am I sure about the following 3 lines? They were included in a similar section in rw_inp
obsolete%lwb=.false.
! Am I sure about the following 2 lines? They were included in a similar section in rw_inp
obsolete%ndvgrd=6
obsolete%chng=-0.1e-11
END IF
......@@ -1352,6 +1363,7 @@ SUBROUTINE r_inpXML(&
enpara%el0 = 0.0
enpara%ello0 = 0.0
enpara%lchange = .FALSE.
enpara%llochg = .FALSE.
dimension%nstd = 29
ALLOCATE(atoms%coreStateOccs(dimension%nstd,2,atoms%ntype))
......@@ -1749,6 +1761,13 @@ SUBROUTINE r_inpXML(&
END IF
vacuum%layers = 1
input%integ = .FALSE.
vacuum%starcoeff = .FALSE.
vacuum%nstars = 0
vacuum%locx = 0.0
vacuum%locy = 0.0
vacuum%nstm = 0
vacuum%tworkf = 0.0
IF ((banddos%vacdos).AND.(numberNodes.EQ.1)) THEN
vacuum%layers = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@layers'))
input%integ = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@integ'))
......
......@@ -460,6 +460,7 @@
!
READ (UNIT=5,FMT=7210,END=99,ERR=99) stars%gmax,xcpot%gmaxxc
WRITE (6,9110) stars%gmax,xcpot%gmaxxc
stars%gmaxInit = stars%gmax
7210 FORMAT (2f10.6)
!
INQUIRE(file='fl7para',exist=ldum) ! fl7para must not exist for input%gw=2
......@@ -690,7 +691,8 @@
banddos%sig_dos=1e-4
READ (UNIT=5,FMT='(9x,f10.5,10x,f10.5,9x,f10.5)',&
& END=98,ERR=98) banddos%e2_dos,banddos%e1_dos,banddos%sig_dos
kpts%posScale = 1.0
! added for exact-exchange or hybrid functional calculations:
! read in the number of k-points and nx,ny and nz given in the last line
......
......@@ -196,12 +196,16 @@ FUNCTION xmlGetAttributeValue(xPath)
WRITE(*,*) TRIM(ADJUSTL(xPath))
CALL juDFT_error("Attribute value could not be obtained.",calledby="xmlGetAttributeValue")
END IF
DO i=1, 255
value(i:i) = valueFromC(i)
value = ''
i = 1
DO WHILE ((valueFromC(i).NE.C_NULL_CHAR).AND.(i.LE.255))
value(i:i) = valueFromC(i)
i = i + 1
END DO
length = LEN_TRIM(value(1:INDEX(value, CHAR(0))))
length = i-1
xmlGetAttributeValue = value(1:length-1)
xmlGetAttributeValue = value(1:length)
END FUNCTION xmlGetAttributeValue
......
......@@ -32,7 +32,9 @@
!<--Locals
INTEGER(HID_t)::testid
INTEGER ::hdferr
!>
!>
testid = 0
hdferr = 0
CALL h5eclear_f(hdferr)
!No automatic error checking!
CALL h5eset_auto_f(0, hdferr)
......@@ -62,7 +64,9 @@
!<--Locals
INTEGER(HID_t)::testid
INTEGER ::hdferr
!>
!>
testid = 0
hdferr = 0
CALL h5eclear_f(hdferr)
!No automatic error checking!
CALL h5eset_auto_f(0, hdferr)
......@@ -91,7 +95,9 @@
!<--Locals
INTEGER(HID_t)::testid
INTEGER ::hdferr
!>
!>
testid = 0
hdferr = 0
CALL h5eclear_f(hdferr)
!No automatic error checking!
CALL h5eset_auto_f(0, hdferr)
......
......@@ -8,7 +8,7 @@ CONTAINS
lmaxb,ntype,n_u,lda_u,f0,f2,f4,f6,&
u)
USE m_constants, ONLY : pi_const
USE m_constants
USE m_sgaunt
IMPLICIT NONE
......@@ -34,11 +34,11 @@ CONTAINS
IF (lda_u(itype).GE.0) THEN
n = n + 1
l_l(n) = lda_u(itype)
fk(1,n) = f0(n) / 27.21
fk(2,n) = f2(n) / 27.21
fk(3,n) = f4(n) / 27.21
fk(1,n) = f0(n) / hartree_to_ev_const
fk(2,n) = f2(n) / hartree_to_ev_const
fk(3,n) = f4(n) / hartree_to_ev_const
IF (l_l(n).EQ.3) THEN
fk(4,n) = f6(n) / 27.21
fk(4,n) = f6(n) / hartree_to_ev_const
ELSEIF (l_l(n).GT.3) THEN
CALL juDFT_error("LDA+U for p, d or f-states!", calledby="umtx")
ENDIF
......@@ -110,8 +110,8 @@ CONTAINS
! WRITE (6,*) 'J-matr:'
! IF (l.eq.2) WRITE (6,111) ((u(i,j,j,i,n),i=-l,l),j=-l,l)
! IF (l.eq.3) WRITE (6,211) ((u(i,j,j,i,n),i=-l,l),j=-l,l)
! PRINT*,'U-av:',avu*27.21
! PRINT*,'J-av:',avj*27.21
! PRINT*,'U-av:',avu*hartree_to_ev_const
! PRINT*,'J-av:',avj*hartree_to_ev_const
111 FORMAT (5f8.4)
211 FORMAT (7f8.4)
112 FORMAT (10e20.10)
......
......@@ -20,6 +20,7 @@ CONTAINS
SUBROUTINE v_mmp(sym,atoms,jspins,lmaxb,ns_mmp,u,f0,f2, vs_mmp,results)
USE m_types
USE m_constants
IMPLICIT NONE
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_results),INTENT(INOUT) :: results
......@@ -50,15 +51,15 @@ CONTAINS
l = atoms%lda_u(itype)%l
IF (l.GE.0) THEN
n = n + 1
u_htr = atoms%lda_u(itype)%u / 27.21
j_htr = atoms%lda_u(itype)%j / 27.21
u_htr = f0(n)/27.21
u_htr = atoms%lda_u(itype)%u / hartree_to_ev_const
j_htr = atoms%lda_u(itype)%j / hartree_to_ev_const
u_htr = f0(n)/hartree_to_ev_const
IF (l.EQ.1) THEN
j_htr = f2(n)/(5*27.21)
j_htr = f2(n)/(5*hartree_to_ev_const)
ELSEIF (l.EQ.2) THEN
j_htr = 1.625*f2(n)/(14*27.21)
j_htr = 1.625*f2(n)/(14*hartree_to_ev_const)
ELSEIF (l.EQ.3) THEN
j_htr = (286.+195*451/675+250*1001/2025)*f2(n)/(6435*27.21)
j_htr = (286.+195*451/675+250*1001/2025)*f2(n)/(6435*hartree_to_ev_const)
ENDIF
!
! calculate spin-density 'rho_sig' and total density 'rho_tot'
......
......@@ -117,8 +117,12 @@
integer:: ierr(2)
#endif
mpi%mpi_comm=mpi_comm
CALL fleur_init(mpi,input,dimension,atoms,sphhar,cell,stars,sym,noco,vacuum,&
sliceplot,banddos,obsolete,enpara,xcpot,results,jij,kpts,hybrid,oneD,l_opti)
CALL timestart("Initialization")
CALL fleur_init(mpi,input,dimension,atoms,sphhar,cell,stars,sym,noco,vacuum,&
sliceplot,banddos,obsolete,enpara,xcpot,results,jij,kpts,hybrid,&
oneD,l_opti)
CALL timestop("Initialization")
hybrid%l_hybrid = (&
xcpot%icorr == icorr_pbe0 .OR.&
......@@ -277,6 +281,7 @@
IF ( mpi%irank == 0 ) WRITE(*,'(A)') '...done'
ELSEIF ( it == 1 ) THEN ! allocate some dummy arrays
IF (it==1) THEN ! temporary until HF is not excluded by #if any more
IF ( noco%l_soc ) THEN
dimension%neigd2 = dimension%neigd*2
ELSE
......
......@@ -14,7 +14,7 @@ CONTAINS
CHARACTER(LEN=500):: infostring
PRINT *," Welcome to FLEUR (www.flapw.de) "
PRINT *," MaX-Release 1.2 (www.max-centre.eu)"
PRINT *," MaX-Release 1.3 (www.max-centre.eu)"
IF (.NOT. (juDFT_was_argument("-h").OR.juDFT_was_argument("--help"))) RETURN
......@@ -38,6 +38,7 @@ CONTAINS
WRITE(*,'(a)')"-genEnpara : write enpara file"
WRITE(*,'(a)')""
WRITE(*,'(a)')"-xmlInput or -xml : use inp.xml instead of inp"
WRITE(*,'(a)')"-toXML : convert inp file to XML input file (experimental)"
WRITE(*,'(a)')""
WRITE(*,'(a)')"-check : run in check mode, i.e. stop after init"
WRITE(*,'(a)')""
......
......@@ -24,6 +24,7 @@
USE m_ylm
USE m_InitParallelProcesses
USE m_xmlOutput
USE m_constants
USE m_winpXML
USE m_setupMPI
USE m_cdn_io
......@@ -165,12 +166,12 @@
filename = ''
numSpecies = SIZE(speciesRepAtomType)
CALL w_inpXML(&
& atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,(/1,1,1/),kpts%l_gamma,&
& noel,namex,relcor,a1,a2,a3,scale,dtild,input%comment,&
& xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
& atomTypeSpecies,speciesRepAtomType,.TRUE.,filename,&
& .TRUE.,numSpecies,enpara)
atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,(/1,1,1/),kpts%l_gamma,&
noel,namex,relcor,a1,a2,a3,scale,dtild,input%comment,&
xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
atomTypeSpecies,speciesRepAtomType,.TRUE.,filename,&
.TRUE.,numSpecies,enpara)
DEALLOCATE(noel,atomTypeSpecies,speciesRepAtomType)
DEALLOCATE(xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs)
END IF
......@@ -183,6 +184,17 @@
ELSE ! else branch of "IF (input%l_inpXML) THEN"
namex = ' '
relcor = ' '
!--- J<
jij%l_wr=.TRUE.
jij%nqptd=1
jij%nmagn=1
jij%mtypes=1
jij%phnd=1
!--- J>
CALL dimens(&
& mpi,input,&
& sym,stars,&
......@@ -264,19 +276,14 @@
atoms%numStatesProvided(:) = 0
atoms%vr0(:) = 0.0
jij%M(:) = 0.0
jij%l_magn(:) =.FALSE.
atoms%vr0(:) = 0.0
results%force(:,:,:) = 0.0
CALL timestart("preparation:stars,lattice harmonics,+etc")
!--- J<
jij%l_wr=.TRUE.
jij%nqptd=1