Commit 1069634b authored by Daniel Wortmann's avatar Daniel Wortmann

Merge remote-tracking branch 'origin/develop' into release

parents c74e6d87 3b8dcf56
......@@ -2,8 +2,8 @@ init/compileinfo.h
*~
#*
build
build.*
*.o
*.mod
*.x
*.swp
cmake_minimum_required(VERSION 2.8)
project(FLEUR LANGUAGES NONE)
project(FLEUR LANGUAGES C Fortran)
#some variables might be set in the environment
set(FLEUR_LIBRARIES ${FLEUR_LIBRARIES} $ENV{FLEUR_LIBRARIES})
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} $ENV{CMAKE_Fortran_FLAGS}")
if (DEFINED ENV{FLEUR_NO_SERIAL})
set(FLEUR_USE_SERIAL false)
else()
set(FLEUR_USE_SERIAL true)
endif()
include("cmake/CompilerConfig.txt")
include("cmake/Architectures.txt")
include("cmake/ReportConfig.txt")
#Here the targets and the files are defined
include("cmake/Files_and_Targets.txt")
#install(TARGETS fleur inpgen DESTINATION bin)
......
......@@ -66,30 +66,20 @@ For the compilation of FLEUR you will need:
(without you can only exploit k-point parallelism)
* HDF5 for parallel IO (if you have lots of memory, you might not need to do IO :-)
You should probably create a directory structure like this:
FLEUR now comes with a configuration script. This skript will
create a build sub-directory in the main FLEUR directory (where this file resides) and
then use cmake to generate a makefile. You should use it like
somewhere/src -this is where the source code lives, i.e. the location of this README
somewhere/build -here you can build the code
./configure.sh CONFIGURATION
change to the build directory and type:
where CONFIGURATION refers to a predefined maschine setup. Call ./configure.sh without any
argument for more information.
cmake ../src
After the configure.sh script finishes, you should do
cd build
make
This might generate the FLEUR executables. It most probable will only work on systems we know as
only for those there will be specific configurations in the cmake directory.
If you get errors, you have to configure your build system yourself.
There are two options to do that.
- Either set the environment variable FC to either ifort,pgfortran or gfortran.
Then the configuration in the cmake directory will be used from cmake.[ifort|gfortran|pgfortran].config will be used that can again work for your system or can be adjusted.
- Or you run cmake with the option -DFleur_custom_toolchain and you adjust cmake.config to your needs.
You might find inspiration in the cmake.???.config files provided for several systems.
If your build environment is recognized correctly you can obtain the following executables:
inpgen - the input generator of FLEUR
fleur - general version of FLEUR
fleur_INVS - version of FLEUR suitable for systems with inversion symmetry leading to real matrices
fleur_SOC - version of FLEUR with spin-orbit coupling
All codes might also have a _MPI attached to indicate parallel versions.
\ No newline at end of file
only for those there will be specific configurations available.
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@ MODULE m_qintsl
USE m_juDFT
CONTAINS
SUBROUTINE q_int_sl(isp,stars,atoms,sym, volsl,volintsl, cell,&
z,ne,lapw, nsl,zsl,nmtsl,oneD, qintslk)
ne,lapw, nsl,zsl,nmtsl,oneD, qintslk,zMat,realdata)
! *******************************************************
! calculate the charge of the En(k) state
! in the interstitial region of each leyer
......@@ -20,6 +20,7 @@ CONTAINS
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_zMat),INTENT(IN) :: zMat
!
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: ne,isp ,nsl
......@@ -29,11 +30,7 @@ CONTAINS
REAL, INTENT (IN) :: volintsl(atoms%natd)
REAL, INTENT (IN) :: zsl(2,atoms%natd) ,volsl(atoms%natd)
REAL, INTENT (OUT):: qintslk(:,:)!(nsl,dimension%neigd)
#if ( defined(CPP_INVERSION) && !defined(CPP_SOC) )
REAL, INTENT (IN) :: z(:,:)!(dimension%nbasfcn,dimension%neigd)
#else
COMPLEX, INTENT (IN) :: z(:,:)
#endif
LOGICAL,OPTIONAL, INTENT (IN) :: realdata
! ..
! .. Local Scalars ..
REAL q1,zsl1,zsl2,qi,volsli,volintsli
......@@ -42,11 +39,13 @@ CONTAINS
! ..
! .. Local Arrays ..
COMPLEX, ALLOCATABLE :: stfunint(:,:),z_z(:)
#if ( defined(CPP_INVERSION) && !defined(CPP_SOC) )
REAL, ALLOCATABLE :: z_h(:,:)
#else
COMPLEX, ALLOCATABLE :: z_h(:,:)
#endif
LOGICAL :: l_real
IF (PRESENT(realdata)) THEN
l_real=realdata
ELSE
l_real=zMat%l_real
ENDIF
! ..
IF (oneD%odi%d1) CALL juDFT_error("well, does not work with 1D. Not clear how to define a layer.",calledby ="q_int_sl")
!
......@@ -77,13 +76,15 @@ CONTAINS
DO n = 1,ne
z_z(:) = CMPLX(0.0,0.0)
q1 = 0.0
DO i = 1,lapw%nv(isp)
#if ( defined(CPP_INVERSION) && !defined(CPP_SOC) )
q1 = q1 + z(i,n)*z(i,n)
#else
q1 = q1 + REAL(z(i,n)*CONJG(z(i,n)))
#endif
ENDDO
IF (l_real) THEN
DO i = 1,lapw%nv(isp)
q1 = q1 + zMat%z_r(i,n)*zMat%z_r(i,n)
ENDDO
ELSE
DO i = 1,lapw%nv(isp)
q1 = q1 + REAL(zMat%z_c(i,n)*CONJG(zMat%z_c(i,n)))
ENDDO
ENDIF
z_z(1) = q1/cell%omtil
!
! ----> g.ne.0 stars
......@@ -101,13 +102,13 @@ CONTAINS
IF (ind.EQ.0 .OR. indp.EQ.0) CYCLE
phase = stars%rgphs(ix1,iy1,iz1)/ (stars%nstr(ind)*cell%omtil)
phasep = stars%rgphs(-ix1,-iy1,-iz1)/ (stars%nstr(indp)*cell%omtil)
#if ( defined(CPP_INVERSION) && !defined(CPP_SOC) )
z_z(ind) = z_z(ind) + z(j,n)*z(i,n)*REAL(phase)
z_z(indp) = z_z(indp) + z(i,n)*z(j,n)*REAL(phasep)
#else
z_z(ind) = z_z(ind) +z(j,n)*CONJG(z(i,n))*phase
z_z(indp)= z_z(indp)+z(i,n)*CONJG(z(j,n))*phasep
#endif
IF (l_real) THEN
z_z(ind) = z_z(ind) + zMat%z_r(j,n)*zMat%z_r(i,n)*REAL(phase)
z_z(indp) = z_z(indp) + zMat%z_r(i,n)*zMat%z_r(j,n)*REAL(phasep)
ELSE
z_z(ind) = z_z(ind) +zMat%z_c(j,n)*CONJG(zMat%z_c(i,n))*phase
z_z(indp)= z_z(indp)+zMat%z_c(i,n)*CONJG(zMat%z_c(j,n))*phasep
ENDIF
ENDDO
ENDDO
! ----> calculate a charge in the layer interstitial region of the film
......
......@@ -10,9 +10,9 @@ CONTAINS
kpts,input,cell,atoms,noco,banddos,&
gvac1,gvac2,&
we,ikpt,jspin,vz,vz0,&
ne,z,bkpt,lapw,&
ne,bkpt,lapw,&
evac,eig,rhtxy,rht,qvac,qvlay,&
stcoeff,cdomvz,cdomvxy)
stcoeff,cdomvz,cdomvxy,zMat,realdata)
!***********************************************************************
! ****** change vacden(....,q) for vacuum density of states shz Jan.96
......@@ -64,6 +64,7 @@ CONTAINS
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_kpts),INTENT(IN) :: kpts
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_zMat),INTENT(IN) :: zMat
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: jspin
INTEGER, INTENT (IN) :: ne
......@@ -73,23 +74,20 @@ CONTAINS
! .. Array Arguments ..
REAL, INTENT (IN) :: bkpt(3)
REAL, INTENT (IN) :: evac(2,DIMENSION%jspd)
#if ( !defined(CPP_INVERSION) || defined(CPP_SOC) )
COMPLEX, INTENT (IN):: z(DIMENSION%nbasfcn,DIMENSION%neigd)
#else
REAL, INTENT (IN):: z(DIMENSION%nbasfcn,DIMENSION%neigd)
#endif
COMPLEX, INTENT (INOUT):: rhtxy(vacuum%nmzxyd,oneD%odi%n2d-1,2,DIMENSION%jspd)
REAL, INTENT (INOUT):: rht(vacuum%nmzd,2,DIMENSION%jspd)
REAL, INTENT (OUT) :: qvlay(DIMENSION%neigd,vacuum%layerd,2,kpts%nkptd,DIMENSION%jspd)
REAL qvac(DIMENSION%neigd,2,kpts%nkptd,DIMENSION%jspd),we(dimension%neigd),vz(vacuum%nmzd,2),vz0(2)
REAL qvac(DIMENSION%neigd,2,kpts%nkptd,DIMENSION%jspd),we(DIMENSION%neigd),vz(vacuum%nmzd,2),vz0(2)
COMPLEX, INTENT (INOUT):: cdomvz(vacuum%nmzd,2)
COMPLEX, INTENT (INOUT):: cdomvxy(vacuum%nmzxyd,oneD%odi%n2d-1,2)
!
! STM-Arguments
REAL, INTENT (IN) :: eig(DIMENSION%neigd)
INTEGER, INTENT (IN) :: gvac1(DIMENSION%nv2d),gvac2(dimension%nv2d)
INTEGER, INTENT (IN) :: gvac1(DIMENSION%nv2d),gvac2(DIMENSION%nv2d)
COMPLEX, INTENT (OUT):: stcoeff(vacuum%nstars,DIMENSION%neigd,vacuum%layerd,2)
!
LOGICAL,OPTIONAL,INTENT(IN)::realdata
! local STM variables
INTEGER nv2(DIMENSION%jspd)
INTEGER kvac1(DIMENSION%nv2d,DIMENSION%jspd),kvac2(DIMENSION%nv2d,DIMENSION%jspd),map2(DIMENSION%nvd,DIMENSION%jspd)
......@@ -124,7 +122,12 @@ CONTAINS
REAL, ALLOCATABLE :: u_1(:,:,:,:),ue_1(:,:,:,:)
!+odim
! ..
LOGICAL ::l_real
IF (PRESENT(realdata)) THEN
l_real=realdata
ELSE
l_real=zMat%l_real
ENDIF
! ..
! *******************************************************************************
......@@ -334,12 +337,13 @@ CONTAINS
CMPLX(-dt_1(l,m)*bess(m) +&
t_1(l,m)*stars%sk2(irec2)*dbss(m),0.0)/&
((wronk_1)*SQRT(cell%omtil))
DO n = 1,ne
ac_1(l,m,n,ispin) = ac_1(l,m,n,ispin) +z(kspin,n)*av_1
! + conjg(z(k,n))*av_1
bc_1(l,m,n,ispin) = bc_1(l,m,n,ispin) +z(kspin,n)*bv_1
! + conjg(z(k,n))*bv_1
END DO
IF (l_real) THEN
ac_1(l,m,:ne,ispin) = ac_1(l,m,:ne,ispin) + zMat%z_r(kspin,:ne)*av_1
bc_1(l,m,:ne,ispin) = bc_1(l,m,:ne,ispin) + zMat%z_r(kspin,:ne)*bv_1
ELSE
ac_1(l,m,:ne,ispin) = ac_1(l,m,:ne,ispin) + zMat%z_c(kspin,:ne)*av_1
bc_1(l,m,:ne,ispin) = bc_1(l,m,:ne,ispin) + zMat%z_c(kspin,:ne)*bv_1
END IF
END DO ! -mb:mb
END IF
END DO
......@@ -376,10 +380,13 @@ CONTAINS
av = -c_1 * CMPLX( dte(l),zks*te(l) )
bv = c_1 * CMPLX( dt(l),zks* t(l) )
! -----> loop over basis functions
DO n = 1,ne
ac(l,n,ispin) = ac(l,n,ispin) + z(kspin,n)*av
bc(l,n,ispin) = bc(l,n,ispin) + z(kspin,n)*bv
ENDDO
IF (l_real) THEN
ac(l,:ne,ispin) = ac(l,:ne,ispin) + zMat%z_r(kspin,:ne)*av
bc(l,:ne,ispin) = bc(l,:ne,ispin) + zMat%z_r(kspin,:ne)*bv
ELSE
ac(l,:ne,ispin) = ac(l,:ne,ispin) + zMat%z_c(kspin,:ne)*av
bc(l,:ne,ispin) = bc(l,:ne,ispin) + zMat%z_c(kspin,:ne)*bv
ENDIF
ENDDO
!---> end of spin loop
ENDIF
......@@ -430,12 +437,13 @@ CONTAINS
CMPLX(-dt_1(l,m)*bess(m) +&
t_1(l,m)*stars%sk2(irec2)*dbss(m),0.0)/&
((wronk_1)*SQRT(cell%omtil))
DO n = 1,ne
ac_1(l,m,n,jspin) = ac_1(l,m,n,jspin) +z(k,n)*av_1
! + conjg(z(k,n))*av_1
bc_1(l,m,n,jspin) = bc_1(l,m,n,jspin) +z(k,n)*bv_1
! + conjg(z(k,n))*bv_1
END DO
IF (l_real) THEN
ac_1(l,m,:ne,jspin) = ac_1(l,m,:ne,jspin) + zMat%z_r(k,:ne)*av_1
bc_1(l,m,:ne,jspin) = bc_1(l,m,:ne,jspin) + zMat%z_r(k,:ne)*bv_1
ELSE
ac_1(l,m,:ne,jspin) = ac_1(l,m,:ne,jspin) + zMat%z_c(k,:ne)*av_1
bc_1(l,m,:ne,jspin) = bc_1(l,m,:ne,jspin) + zMat%z_c(k,:ne)*bv_1
ENDIF
END DO ! -mb:mb
END IF
END DO ! k = 1,lapw%nv
......@@ -467,10 +475,13 @@ CONTAINS
av = -c_1 * CMPLX( dte(l),zks*te(l) )
bv = c_1 * CMPLX( dt(l),zks* t(l) )
! -----> loop over basis functions
DO n = 1,ne
ac(l,n,jspin) = ac(l,n,jspin) + z(k,n)*av
bc(l,n,jspin) = bc(l,n,jspin) + z(k,n)*bv
ENDDO
IF (l_real) THEN
ac(l,:ne,jspin) = ac(l,:ne,jspin) + zMat%z_r(k,:ne)*av
bc(l,:ne,jspin) = bc(l,:ne,jspin) + zMat%z_r(k,:ne)*bv
ELSE
ac(l,:ne,jspin) = ac(l,:ne,jspin) + zMat%z_c(k,:ne)*av
bc(l,:ne,jspin) = bc(l,:ne,jspin) + zMat%z_c(k,:ne)*bv
ENDIF
ENDDO
END IF ! D1
ENDIF
......@@ -510,7 +521,7 @@ CONTAINS
!
IF (vacuum%nstm.EQ.3) THEN
#ifdef CPP_MPI
call judft_error("nstm==3 does not work in parallel",calledby="vacden")
CALL judft_error("nstm==3 does not work in parallel",calledby="vacden")
#else
i=0
DO n = 1, ne
......
MODULE m_abccoflo
USE m_juDFT
!*********************************************************************
! Calculates the (upper case) A, B and C coefficients for the local
! orbitals.
! Philipp Kurz 99/04
!*********************************************************************
CONTAINS
SUBROUTINE abccoflo(atoms, con1,rph,cph,ylm,ntyp,na,k,nv,&
l_lo1,alo1,blo1,clo1, nkvec, enough,alo,blo,clo,kvec)
!
!*************** ABBREVIATIONS ***************************************
! kvec : stores the number of the G-vectors, that have been used to
! construct the local orbitals
! nkvec : stores the number of G-vectors that have been found and
! accepted during the construction of the local orbitals.
! enough : enough is set to .true. when enough G-vectors have been
! accepted.
! linindq : if the norm of that part of a local orbital (contructed
! with a trial G-vector) that is orthogonal to the previous
! ones is larger than linindq, then this G-vector is
! accepted.
!*********************************************************************
!
USE m_constants
USE m_types
IMPLICIT NONE
TYPE(t_atoms),INTENT(IN) :: atoms
! ..
! .. Scalar Arguments ..
REAL, INTENT (IN) :: con1,cph ,rph
INTEGER, INTENT (IN) :: k,na,ntyp,nv
LOGICAL, INTENT (IN) :: l_lo1
LOGICAL, INTENT (OUT):: enough
! ..
! .. Array Arguments ..
INTEGER, INTENT (IN):: kvec(2* (2*atoms%llod+1),atoms%nlod) )
REAL, INTENT (IN) :: alo1(atoms%nlod),blo1(atoms%nlod),clo1(atoms%nlod)
COMPLEX, INTENT (IN) :: ylm( (atoms%lmaxd+1)**2 )
COMPLEX, INTENT (OUT):: alo(-atoms%llod:atoms%llod,2* (2*atoms%llod+1),atoms%nlod)
COMPLEX, INTENT (OUT):: blo(-atoms%llod:atoms%llod,2* (2*atoms%llod+1),atoms%nlod)
COMPLEX, INTENT (OUT):: clo(-atoms%llod:atoms%llod,2* (2*atoms%llod+1),atoms%nlod)
INTEGER,INTENT (INOUT):: nkvec(atoms%nlod)
! ..
! .. Local Scalars ..
COMPLEX term1
REAL,PARAMETER:: linindq=1.e-4
INTEGER l,lo ,mind,ll1,lm
LOGICAL linind
! ..
!
!---> the whole program is in hartree units, therefore 1/wronskian is
!---> (rmt**2)/2. the factor i**l, which usually appears in the a, b
!---> and c coefficients, is included in the t-matrices. thus, it does
!---> not show up in the formula above.
!
!-abccoflo1
IF ( l_lo1) THEN
DO lo = 1,atoms%nlo(ntyp)
IF ( (nkvec(lo).EQ.0).AND.(atoms%llo(lo,ntyp).EQ.0) ) THEN
enough = .FALSE.
nkvec(lo) = 1
m = 0
clo(m,nkvec(lo),lo) = con1* ((atoms%rmt**2)/2) / SQRT(fpi_const)
alo(m,nkvec(lo),lo) = clo(m,nkvec(lo),lo)*alo1(lo)
blo(m,nkvec(lo),lo) = clo(m,nkvec(lo),lo)*blo1(lo)
clo(m,nkvec(lo),lo) = clo(m,nkvec(lo),lo)*clo1(lo)
IF (kvec(nkvec(lo),lo)/=k) CALL juDFT_error("abccoflo:1"&
& ,calledby ="abccoflo")
ENDIF
ENDDO
ELSE
enough = .TRUE.
term1 = con1* ((atoms%rmt**2)/2)*CMPLX(rph,cph)
DO lo = 1,atoms%nlo(ntyp)
IF (atoms%invsat(na).EQ.0) THEN
IF ((nkvec(lo)).LT. (2*atoms%llo(lo,ntyp)+1)) THEN
enough = .FALSE.
nkvec(lo) = nkvec(lo) + 1
l = atoms%llo(lo,ntyp)
ll1 = l*(l+1) + 1
DO m = -l,l
lm = ll1 + m
clo(m,nkvec(lo),lo) = term1*ylm(lm)
END DO
IF ( kvec(nkvec(lo),lo) == k ) THEN
DO m = -l,l
alo(m,nkvec(lo),lo) = clo(m,nkvec(lo),lo)*alo1(lo)
blo(m,nkvec(lo),lo) = clo(m,nkvec(lo),lo)*blo1(lo)
clo(m,nkvec(lo),lo) = clo(m,nkvec(lo),lo)*clo1(lo)
END DO
! WRITE(6,9000) nkvec(lo),k,lo,na,
! + (clo(m,nkvec(lo),lo),m=-l,l)
! 9000 format(2i4,2i2,7(' (',e9.3,',',e9.3,')'))
ELSE
nkvec(lo) = nkvec(lo) - 1
ENDIF
ENDIF
ELSE
IF ((atoms%invsat(na).EQ.1) .OR. (atoms%invsat(na).EQ.2)) THEN
! only invsat=1 is needed invsat=2 for testing
IF ((nkvec(lo)).LT. (2* (2*atoms%llo(lo,ntyp)+1))) THEN
enough = .FALSE.
nkvec(lo) = nkvec(lo) + 1
l = atoms%llo(lo,ntyp)
ll1 = l*(l+1) + 1
DO m = -l,l
lm = ll1 + m
clo(m,nkvec(lo),lo) = term1*ylm(lm)
END DO
IF ( kvec(nkvec(lo),lo) == k ) THEN
DO m = -l,l
! if(l.eq.1) then
! WRITE(*,*)'k=',k,' clotmp=',clo(m,nkvec(lo),lo)
! WRITE(*,*)'clo1=',clo1(lo),' term1=',term1
! endif
alo(m,nkvec(lo),lo) = clo(m,nkvec(lo),lo)*alo1(lo)
blo(m,nkvec(lo),lo) = clo(m,nkvec(lo),lo)*blo1(lo)
clo(m,nkvec(lo),lo) = clo(m,nkvec(lo),lo)*clo1(lo)
! kvec(nkvec(lo),lo) = k
END DO
ELSE
nkvec(lo) = nkvec(lo) - 1
END IF
END IF
END IF
END IF
END DO
IF ((k.EQ.nv) .AND. (.NOT.enough)) THEN
WRITE (6,FMT=*)&
& 'abccoflo did not find enough linearly independent'
WRITE (6,FMT=*)&
& 'clo coefficient-vectors. the linear independence'
WRITE (6,FMT=*) 'quality, linindq, is set to: ',linindq,'.'
WRITE (6,FMT=*) 'this value might be to large.'
CALL juDFT_error&
& ("abccoflo: did not find enough lin. ind. clo-vectors"&
& ,calledby ="abccoflo")
END IF
ENDIF ! abccoflo1
END SUBROUTINE abccoflo
END MODULE m_abccoflo
......@@ -21,13 +21,14 @@ MODULE m_abclocdn
!*********************************************************************
CONTAINS
SUBROUTINE abclocdn(atoms, sym, noco,ccchi,kspin,iintsp,con1,phase,ylm,&
ntyp,na,k,s,nv,ne,z,nbasf0,alo1,blo1,clo1,kvec,nkvec,enough,acof,bcof,ccof)
ntyp,na,k,s,nv,ne,nbasf0,alo1,blo1,clo1,kvec,nkvec,enough,acof,bcof,ccof,zMat)
!
USE m_types
IMPLICIT NONE
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_zMat),INTENT(IN) :: zMat
! ..
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: kspin,iintsp
......@@ -47,11 +48,6 @@ CONTAINS
COMPLEX, INTENT (INOUT) :: bcof(:,0:,:)!(nobd,0:dimension%lmd,atoms%natd)
COMPLEX, INTENT (INOUT) :: ccof(-atoms%llod:,:,:,:)!(-atoms%llod:atoms%llod,nobd,atoms%nlod,atoms%natd)
INTEGER, INTENT (INOUT) :: nkvec(atoms%nlod,atoms%natd)
#if ( !defined(CPP_INVERSION) || defined(CPP_SOC) )
COMPLEX, INTENT (IN) :: z(:,:)!(dimension%nbasfcn,dimension%neigd)
#else
REAL, INTENT (IN) :: z(:,:)!(dimension%nbasfcn,dimension%neigd)
#endif
! ..
! .. Local Scalars ..
COMPLEX ctmp,term1
......@@ -61,7 +57,8 @@ CONTAINS
! .. Local Arrays ..
COMPLEX clotmp(-atoms%llod:atoms%llod)
! ..
LOGICAL :: l_real
l_real=zMat%l_real
! ..
enough(na) = .TRUE.
term1 = con1 * ((atoms%rmt(ntyp)**2)/2) * phase
......@@ -91,12 +88,16 @@ CONTAINS
!+gu_con
IF (noco%l_noco) THEN
IF (noco%l_ss) THEN
ctmp = clotmp(m)*ccchi(iintsp)*z(kspin+nbasf,i)
ctmp = clotmp(m)*ccchi(iintsp)*zMat%z_c(kspin+nbasf,i)
ELSE
ctmp = clotmp(m)*( ccchi(1)*z(nbasf,i)+ccchi(2)*z(kspin+nbasf,i) )
ctmp = clotmp(m)*( ccchi(1)*zMat%z_c(nbasf,i)+ccchi(2)*zMat%z_c(kspin+nbasf,i) )
ENDIF
ELSE
ctmp = z(nbasf,i)*clotmp(m)
IF (l_real) THEN
ctmp = zMat%z_r(nbasf,i)*clotmp(m)
ELSE
ctmp = zMat%z_c(nbasf,i)*clotmp(m)
ENDIF
ENDIF
acof(i,lm,na) = acof(i,lm,na) +ctmp*alo1(lo,ntyp)
bcof(i,lm,na) = bcof(i,lm,na) +ctmp*blo1(lo,ntyp)
......@@ -134,24 +135,28 @@ CONTAINS
!+gu_con
IF (noco%l_noco) THEN
IF (noco%l_ss) THEN
ctmp = clotmp(m)*ccchi(iintsp)*z(kspin+nbasf,i)
ctmp = clotmp(m)*ccchi(iintsp)*zMat%z_c(kspin+nbasf,i)
ELSE
ctmp = clotmp(m)*( ccchi(1)*z(nbasf,i)+ ccchi(2)*z(kspin+nbasf,i) )
ctmp = clotmp(m)*( ccchi(1)*zMat%z_c(nbasf,i)+ ccchi(2)*zMat%z_c(kspin+nbasf,i) )
ENDIF
ELSE
ctmp = z(nbasf,i)*clotmp(m)
IF (l_real) THEN
ctmp = zMat%z_r(nbasf,i)*clotmp(m)
ELSE
ctmp = zMat%z_c(nbasf,i)*clotmp(m)
ENDIF
ENDIF
acof(i,lm,na) = acof(i,lm,na) +ctmp*alo1(lo,ntyp)
bcof(i,lm,na) = bcof(i,lm,na) +ctmp*blo1(lo,ntyp)
ccof(m,i,lo,na) = ccof(m,i,lo,na) +ctmp*clo1(lo,ntyp)
#if ( defined(CPP_SOC) && defined(CPP_INVERSION) )
ctmp = z(nbasf,i)*CONJG(clotmp(m))*(-1)**(l-m)
na2 = sym%invsatnr(na)
lmp = ll1 - m
acof(i,lmp,na2) = acof(i,lmp,na2) +ctmp*alo1(lo,ntyp)
bcof(i,lmp,na2) = bcof(i,lmp,na2) +ctmp*blo1(lo,ntyp)
ccof(-m,i,lo,na2) = ccof(-m,i,lo,na2) +ctmp*clo1(lo,ntyp)
#endif
IF (noco%l_soc.AND.sym%invs) THEN
ctmp = zMat%z_c(nbasf,i)*CONJG(clotmp(m))*(-1)**(l-m)
na2 = sym%invsatnr(na)
lmp = ll1 - m
acof(i,lmp,na2) = acof(i,lmp,na2) +ctmp*alo1(lo,ntyp)
bcof(i,lmp,na2) = bcof(i,lmp,na2) +ctmp*blo1(lo,ntyp)
ccof(-m,i,lo,na2) = ccof(-m,i,lo,na2) +ctmp*clo1(lo,ntyp)
ENDIF
ENDDO ! m
ENDDO ! i = 1,ne
ELSE
......@@ -166,12 +171,9 @@ CONTAINS
ENDIF ! s > eps & l >= 1
END DO
IF ((k.EQ.nv) .AND. (.NOT.enough(na))) THEN
WRITE (6,FMT=*)&
& 'abclocdn did not find enough linearly independent'
WRITE (6,FMT=*)&
& 'ccof coefficient-vectors.'
CALL juDFT_error("did not find enough lin. ind. ccof-vectors"&
& ,calledby ="abclocdn")
WRITE (6,FMT=*) 'abclocdn did not find enough linearly independent'
WRITE (6,FMT=*) 'ccof coefficient-vectors.'
CALL juDFT_error("did not find enough lin. ind. ccof-vectors" ,calledby ="abclocdn")
END IF
END SUBROUTINE abclocdn
......
......@@ -11,9 +11,9 @@ CONTAINS
& atoms,sym,&
& noco,ccchi,kspin,iintsp,&
& con1,phase,ylm,ntyp,na,k,fgp,&
& s,nv,ne,z,nbasf0,alo1,blo1,clo1,&
& s,nv,ne,nbasf0,alo1,blo1,clo1,&
& kvec,nkvec,enough,acof,bcof,ccof,&
& acoflo,bcoflo,aveccof,bveccof,cveccof)
& acoflo,bcoflo,aveccof,bveccof,cveccof,zMat,realdata)
!
!*********************************************************************
! for details see abclocdn; calles by to_pulay
......@@ -24,6 +24,7 @@ CONTAINS
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_zMat),INTENT(IN) :: zMat
! ..
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: iintsp
......@@ -48,11 +49,7 @@ CONTAINS
COMPLEX, INTENT (INOUT) :: cveccof(:,-atoms%llod:,:,:,:)!(3,-atoms%llod:llod,nobd,atoms%nlod,atoms%natd)
LOGICAL, INTENT (OUT) :: enough(atoms%natd)
INTEGER, INTENT (INOUT) :: nkvec(atoms%nlod,atoms%natd)
#if ( defined(CPP_INVERSION) && !defined(CPP_SOC) )
REAL, INTENT (IN) :: z(:,:)!(dimension%nbasfcn,dimension%neigd)
#else
COMPLEX, INTENT (IN) :: z(:,:)!(dimension%nbasfcn,dimension%neigd)
#endif
LOGICAL,OPTIONAL,INTENT(IN) ::realdata
! ..
! .. Local Scalars ..
COMPLEX ctmp,term1
......@@ -63,7 +60,9 @@ CONTAINS
! .. Local Arrays ..
COMPLEX clotmp(-atoms%llod:atoms%llod)
! ..
LOGICAL:: l_real
l_real=zMat%l_real
IF (PRESENT(realdata)) l_real=realdata
enough(na) = .TRUE.
term1 = con1* ((atoms%rmt(ntyp)**2)/2)*phase
!
......@@ -92,12 +91,16 @@ CONTAINS
lm = ll1 + m
IF (noco%l_noco) THEN
IF (noco%l_ss) THEN
ctmp = clotmp(m)* ccchi(iintsp)*z(kspin+nbasf,ie)
ctmp = clotmp(m)* ccchi(iintsp)*zMat%z_c(kspin+nbasf,ie)
ELSE
ctmp = clotmp(m)*( ccchi(1)*z(nbasf,ie)+ccchi(2)*z(kspin+nbasf,ie) )
ctmp = clotmp(m)*( ccchi(1)*zMat%z_c(nbasf,ie)+ccchi(2)*zMat%z_c(kspin+nbasf,ie) )
ENDIF
ELSE
ctmp = z(nbasf,ie)*clotmp(m)
IF (l_real) THEN
ctmp = zMat%z_r(nbasf,ie)