wmatldau Subroutine

public subroutine wmatldau(ntldau, itldau, nspin, denmatc, lopt, ueff, jeff, uldau, wldau, eu, edc, mmaxd, npotd, natyp, nspind, lmax)

Uses

Uses the Coulomb matrix U (array ULDAU), the density matrix (array DENMAT) and the occupation numbers dentot (total) and (array DENTOTS) (per spin). The expression evaluated (array VLDAU) is

Note

Modifications by N. Long Xmas Juelich 2015

Note

EU,EDC initialised outside the routine

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ntldau

number of atoms on which LDA+U is applied

integer, intent(in), dimension (natyp) :: itldau

integer pointer connecting the NTLDAU atoms to their corresponding index in the unit cell

integer, intent(in) :: nspin

Counter for spin directions

complex(kind=dp), intent(inout), dimension (mmaxd, mmaxd, npotd) :: denmatc
integer, intent(in), dimension (natyp) :: lopt

angular momentum QNUM for the atoms on which LDA+U should be applied (-1 to switch it OFF)

real(kind=dp), intent(in), dimension (natyp) :: ueff

input U parameter for each atom

real(kind=dp), intent(in), dimension (natyp) :: jeff

input J parameter for each atom

real(kind=dp), intent(inout), dimension (mmaxd, mmaxd, mmaxd, mmaxd, natyp) :: uldau

calculated Coulomb matrix elements (EREFLDAU)

real(kind=dp), intent(inout), dimension (mmaxd, mmaxd, nspind, natyp) :: wldau

potential matrix

real(kind=dp), intent(inout), dimension (natyp) :: eu

Total energy corrections

real(kind=dp), intent(inout), dimension (natyp) :: edc

Double-counting correction

integer, intent(in) :: mmaxd

2*LMAX+1

integer, intent(in) :: npotd

(2(KREL+KORBIT)+(1-(KREL+KORBIT))NSPIND)*NATYP)

integer, intent(in) :: natyp

Number of kinds of atoms in unit cell

integer, intent(in) :: nspind

KREL+(1-KREL)*(NSPIN+1)

integer, intent(in) :: lmax

Maximum l component in wave function expansion