1
2! Copyright (C) 2012 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine addlorbcnd
7use modmain
8implicit none
9! local variables
10integer is,nlo,l,io
11if (.not.lorbcnd) return
12! add conduction local-orbitals to each species
13do is=1,nspecies
14  nlo=nlorb(is)
15  do l=0,lmaxo
16    nlo=nlo+1
17    if (nlo.gt.maxlorb) then
18      write(*,*)
19      write(*,'("Error(addlorbcnd): nlorb too large : ",I8)') nlo
20      write(*,'(" for species ",I4)') is
21      write(*,'("Adjust maxlorb in modmain and recompile code")')
22      write(*,*)
23      stop
24    end if
25    lorbl(nlo,is)=l
26    lorbord(nlo,is)=lorbordc
27    do io=1,lorbordc
28      lorbe0(io,nlo,is)=0.15d0
29      lorbdm(io,nlo,is)=io-1
30      lorbve(io,nlo,is)=.true.
31    end do
32  end do
33  nlorb(is)=nlo
34end do
35end subroutine
36
37