Commit 7c453ce5 authored by Daniel Wortmann's avatar Daniel Wortmann

Many fixes to be able to compile after merge

parent 0e969444
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
! This file is part of FLEUR and avhttps://gcc.gnu.org/onlinedocs/gfortran/SQRT.htmlailable as free software under the conditions ! This file is part of FLEUR and avhttps://gcc.gnu.org/onlinedocs/gfortran/SQRT.htmlailable as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail. ! of the MIT license as expressed in the LICENSE file in more detail.
!------------------------------------------------------------------------------ !------------------------------------------------------------------------------
! This routine allows to rotate the cdn in a way that the direction of magnetization aligns with the direction of the spin quantization axis. ! This routine allows to rotate the cdn in a way that the direction of magnetization aligns with the direction of the spin quantization axis.
! This routine also allows to reverse the rotation by using the angles stored in atoms (phi_mt_avg,theta_mt_avg) which are generated by the ! This routine also allows to reverse the rotation by using the angles stored in atoms (phi_mt_avg,theta_mt_avg) which are generated by the
! routine magnMomFromDen. ! routine magnMomFromDen.
! !
! Robin Hilgers, Nov '19 ! Robin Hilgers, Nov '19
MODULE m_alignSpinAxisMagn MODULE m_alignSpinAxisMagn
...@@ -19,8 +19,8 @@ USE m_polangle ...@@ -19,8 +19,8 @@ USE m_polangle
CONTAINS CONTAINS
SUBROUTINE rotateMagnetToSpinAxis(vacuum,sphhar,stars& SUBROUTINE rotateMagnetToSpinAxis(vacuum,sphhar,stars&
,sym,oneD,cell,noco,input,atoms,den) ,sym,oneD,cell,noco,input,atoms,den)
TYPE(t_input), INTENT(INOUT) :: input TYPE(t_input), INTENT(IN) :: input
TYPE(t_atoms), INTENT(INOUT) :: atoms TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_noco), INTENT(INOUT) :: noco TYPE(t_noco), INTENT(INOUT) :: noco
TYPE(t_stars),INTENT(IN) :: stars TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_vacuum),INTENT(IN) :: vacuum TYPE(t_vacuum),INTENT(IN) :: vacuum
...@@ -28,20 +28,20 @@ SUBROUTINE rotateMagnetToSpinAxis(vacuum,sphhar,stars& ...@@ -28,20 +28,20 @@ SUBROUTINE rotateMagnetToSpinAxis(vacuum,sphhar,stars&
TYPE(t_sym),INTENT(IN) :: sym TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_oneD),INTENT(IN) :: oneD TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_cell),INTENT(IN) :: cell TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_potden), INTENT(INOUT) :: den TYPE(t_potden), INTENT(INOUT) :: den
REAL :: moments(atoms%ntype,3) REAL :: moments(3,atoms%ntype)
REAL :: phiTemp(atoms%ntype),thetaTemp(atoms%ntype),pi REAL :: phiTemp(atoms%ntype),thetaTemp(atoms%ntype),pi
INTEGER :: i INTEGER :: i
pi=pimach() pi=pimach()
!!TEMP !!TEMP
! REAL :: x,y,z ! REAL :: x,y,z
phiTemp=noco%alph phiTemp=noco%alph
thetaTemp=noco%beta thetaTemp=noco%beta
CALL magnMomFromDen(input,atoms,noco,den,moments) CALL magnMomFromDen(input,atoms,noco,den,moments,thetaTemp,phiTemp)
! DO i=1, atoms%ntype ! DO i=1, atoms%ntype
! IF (abs(atoms%theta_mt_avg(i)).LE. 0.001) THEN ! IF (abs(atoms%theta_mt_avg(i)).LE. 0.001) THEN
! atoms%phi_mt_avg(i)=0.0 ! atoms%phi_mt_avg(i)=0.0
! atoms%theta_mt_avg(i)=0.0 ! atoms%theta_mt_avg(i)=0.0
! END IF ! END IF
...@@ -54,7 +54,7 @@ SUBROUTINE rotateMagnetToSpinAxis(vacuum,sphhar,stars& ...@@ -54,7 +54,7 @@ SUBROUTINE rotateMagnetToSpinAxis(vacuum,sphhar,stars&
!write(*,*) moments(2,1) !write(*,*) moments(2,1)
!write(*,*) "mz2" !write(*,*) "mz2"
!write(*,*) moments(2,3) !write(*,*) moments(2,3)
CALL flipcdn(atoms,input,vacuum,sphhar,stars,sym,noco,oneD,cell,-atoms%phi_mt_avg,-atoms%theta_mt_avg,den) CALL flipcdn(atoms,input,vacuum,sphhar,stars,sym,noco,oneD,cell,-phiTemp,-thetaTemp,den)
!write (*,*)"mx my mz" !write (*,*)"mx my mz"
!CALL sphericaltocart(SQRT(moments(1,1)**2+moments(1,2)**2+moments(1,3)**2),thetaTemp(1),phiTemp(1),x,y,z) !CALL sphericaltocart(SQRT(moments(1,1)**2+moments(1,2)**2+moments(1,3)**2),thetaTemp(1),phiTemp(1),x,y,z)
!write(*,*) x,y,z !write(*,*) x,y,z
...@@ -64,18 +64,16 @@ SUBROUTINE rotateMagnetToSpinAxis(vacuum,sphhar,stars& ...@@ -64,18 +64,16 @@ SUBROUTINE rotateMagnetToSpinAxis(vacuum,sphhar,stars&
!!write(*,*) atoms%phi_mt_avg !!write(*,*) atoms%phi_mt_avg
!write(*,*) "atoms%theta_mt_avg" !write(*,*) "atoms%theta_mt_avg"
!write(*,*) atoms%theta_mt_avg !write(*,*) atoms%theta_mt_avg
noco%alph=mod(atoms%phi_mt_avg+phiTemp,2*pimach()) noco%alph=mod(noco%alph+phiTemp,2*pimach())
noco%beta=mod(atoms%theta_mt_avg+thetaTemp,2*pimach()) noco%beta=mod(noco%alph+thetaTemp,2*pimach())
atoms%phi_mt_avg=noco%alph
atoms%theta_mt_avg=noco%beta
DO i=1, atoms%ntype DO i=1, atoms%ntype
IF(noco%alph(i)<0) noco%alph(i)=noco%alph(i)+2*pi IF(noco%alph(i)<0) noco%alph(i)=noco%alph(i)+2*pi
IF(noco%beta(i)<0) THEN IF(noco%beta(i)<0) THEN
noco%beta(i)=-noco%beta(i) noco%beta(i)=-noco%beta(i)
noco%alph=noco%alph+pi noco%alph=noco%alph+pi
END IF END IF
IF(noco%beta(i)>pi) THEN IF(noco%beta(i)>pi) THEN
noco%beta(i)=pi-mod(noco%beta(i),pi) noco%beta(i)=pi-mod(noco%beta(i),pi)
noco%alph(i)=noco%alph(i)+pi noco%alph(i)=noco%alph(i)+pi
END IF END IF
...@@ -90,8 +88,8 @@ END SUBROUTINE rotateMagnetToSpinAxis ...@@ -90,8 +88,8 @@ END SUBROUTINE rotateMagnetToSpinAxis
SUBROUTINE rotateMagnetFromSpinAxis(noco,vacuum,sphhar,stars& SUBROUTINE rotateMagnetFromSpinAxis(noco,vacuum,sphhar,stars&
,sym,oneD,cell,input,atoms,den,inDen) ,sym,oneD,cell,input,atoms,den,inDen)
TYPE(t_input), INTENT(INOUT) :: input TYPE(t_input), INTENT(IN) :: input
TYPE(t_atoms), INTENT(INOUT) :: atoms TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_noco), INTENT(INOUT) :: noco TYPE(t_noco), INTENT(INOUT) :: noco
TYPE(t_stars),INTENT(IN) :: stars TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_vacuum),INTENT(IN) :: vacuum TYPE(t_vacuum),INTENT(IN) :: vacuum
...@@ -102,11 +100,9 @@ SUBROUTINE rotateMagnetFromSpinAxis(noco,vacuum,sphhar,stars& ...@@ -102,11 +100,9 @@ SUBROUTINE rotateMagnetFromSpinAxis(noco,vacuum,sphhar,stars&
TYPE(t_potden), INTENT(INOUT) :: den, inDen TYPE(t_potden), INTENT(INOUT) :: den, inDen
CALL flipcdn(atoms,input,vacuum,sphhar,stars,sym,noco,oneD,cell,atoms%phi_mt_avg,atoms%theta_mt_avg,den) CALL flipcdn(atoms,input,vacuum,sphhar,stars,sym,noco,oneD,cell,noco%alph,noco%beta,den)
CALL flipcdn(atoms,input,vacuum,sphhar,stars,sym,noco,oneD,cell,atoms%phi_mt_avg,atoms%theta_mt_avg,inDen) CALL flipcdn(atoms,input,vacuum,sphhar,stars,sym,noco,oneD,cell,noco%alph,noco%beta,inDen)
atoms%flipSpinPhi=0
atoms%flipSpinTheta=0
noco%alph=0 noco%alph=0
noco%beta=0 noco%beta=0
...@@ -114,4 +110,3 @@ END SUBROUTINE rotateMagnetFromSpinAxis ...@@ -114,4 +110,3 @@ END SUBROUTINE rotateMagnetFromSpinAxis
END MODULE m_alignSpinAxisMagn END MODULE m_alignSpinAxisMagn
...@@ -15,7 +15,7 @@ CONTAINS ...@@ -15,7 +15,7 @@ CONTAINS
! !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
SUBROUTINE magDiMom(input,atoms,sphhar,noco,l_fmpl2,rho,magDipoles,elecDipoles) SUBROUTINE magDiMom(sym,input,atoms,sphhar,noco,l_fmpl2,rho,magDipoles,elecDipoles)
USE m_constants USE m_constants
USE m_types USE m_types
...@@ -26,7 +26,7 @@ SUBROUTINE magDiMom(input,atoms,sphhar,noco,l_fmpl2,rho,magDipoles,elecDipoles) ...@@ -26,7 +26,7 @@ SUBROUTINE magDiMom(input,atoms,sphhar,noco,l_fmpl2,rho,magDipoles,elecDipoles)
USE m_intgr USE m_intgr
IMPLICIT NONE IMPLICIT NONE
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_input), INTENT(IN) :: input TYPE(t_input), INTENT(IN) :: input
TYPE(t_atoms), INTENT(IN) :: atoms TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_sphhar), INTENT(IN) :: sphhar TYPE(t_sphhar), INTENT(IN) :: sphhar
...@@ -64,9 +64,9 @@ SUBROUTINE magDiMom(input,atoms,sphhar,noco,l_fmpl2,rho,magDipoles,elecDipoles) ...@@ -64,9 +64,9 @@ SUBROUTINE magDiMom(input,atoms,sphhar,noco,l_fmpl2,rho,magDipoles,elecDipoles)
inRho(:,:,iType,4) = inRho(:,:,iType,2) * COS(theta) inRho(:,:,iType,4) = inRho(:,:,iType,2) * COS(theta)
inRho(:,:,iType,2) = inRho(:,:,iType,2) * COS(phi)*SIN(theta) inRho(:,:,iType,2) = inRho(:,:,iType,2) * COS(phi)*SIN(theta)
ELSE ELSE
DO ilh = 0,sphhar%nlh(atoms%ntypsy(iType)) DO ilh = 0,sphhar%nlh(sym%ntypsy(iType))
DO i = 1,atoms%jri(iType) DO i = 1,atoms%jri(iType)
cdn11 = rho(i,ilh,iType,1) cdn11 = rho(i,ilh,iType,1)
cdn22 = rho(i,ilh,iType,2) cdn22 = rho(i,ilh,iType,2)
cdn21 = CMPLX(rho(i,ilh,iType,3),rho(i,ilh,iType,4)) cdn21 = CMPLX(rho(i,ilh,iType,3),rho(i,ilh,iType,4))
...@@ -89,7 +89,7 @@ SUBROUTINE magDiMom(input,atoms,sphhar,noco,l_fmpl2,rho,magDipoles,elecDipoles) ...@@ -89,7 +89,7 @@ SUBROUTINE magDiMom(input,atoms,sphhar,noco,l_fmpl2,rho,magDipoles,elecDipoles)
rhoSphHarms = CMPLX(0.0,0.0) rhoSphHarms = CMPLX(0.0,0.0)
DO i = 1, 4 DO i = 1, 4
DO iType = 1, atoms%ntype DO iType = 1, atoms%ntype
CALL lattHarmsRepToSphHarms(atoms,sphhar,iType,inRho(:,0:,iType,i),rhoSphHarms(:,:,iType,i)) CALL lattHarmsRepToSphHarms(sym,atoms,sphhar,iType,inRho(:,0:,iType,i),rhoSphHarms(:,:,iType,i))
END DO END DO
END DO END DO
......
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
! This file is part of FLEUR and avhttps://gcc.gnu.org/onlinedocs/gfortran/SQRT.htmlailable as free software under the conditions ! This file is part of FLEUR and avhttps://gcc.gnu.org/onlinedocs/gfortran/SQRT.htmlailable as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail. ! of the MIT license as expressed in the LICENSE file in more detail.
!------------------------------------------------------------------------------ !------------------------------------------------------------------------------
! This routine calculates the magnetic moments and the corresponding directions ! This routine calculates the magnetic moments and the corresponding directions
! (angles) according to the Atoms in the system. ! (angles) according to the Atoms in the system.
! !
! !
! Robin Hilgers, Nov '19 ! Robin Hilgers, Nov '19
MODULE m_magnMomFromDen MODULE m_magnMomFromDen
CONTAINS CONTAINS
SUBROUTINE magnMomFromDen(input,atoms,noco,den,moments) SUBROUTINE magnMomFromDen(input,atoms,noco,den,moments,theta_mt_avg,phi_mt_avg)
USE m_constants USE m_constants
USE m_types USE m_types
USE m_intgr USE m_intgr
...@@ -21,10 +21,12 @@ SUBROUTINE magnMomFromDen(input,atoms,noco,den,moments) ...@@ -21,10 +21,12 @@ SUBROUTINE magnMomFromDen(input,atoms,noco,den,moments)
TYPE(t_input), INTENT(IN) :: input TYPE(t_input), INTENT(IN) :: input
TYPE(t_atoms), INTENT(INOUT) :: atoms TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_noco), INTENT(IN) :: noco TYPE(t_noco), INTENT(IN) :: noco
TYPE(t_potden),INTENT(IN) :: den TYPE(t_potden),INTENT(IN) :: den
REAL, INTENT(OUT) :: moments(atoms%ntype,3) REAL, INTENT(OUT) :: moments(3,atoms%ntype)
REAL,INTENT(OUT) :: theta_mt_avg(atoms%ntype)
REAL,INTENT(OUT) :: phi_mt_avg(atoms%ntype)
INTEGER :: jsp,i,j INTEGER :: jsp,i,j
REAL :: mx,my,mz REAL :: mx,my,mz
...@@ -35,34 +37,34 @@ SUBROUTINE magnMomFromDen(input,atoms,noco,den,moments) ...@@ -35,34 +37,34 @@ SUBROUTINE magnMomFromDen(input,atoms,noco,den,moments)
IF(noco%l_mtNocoPot) THEN IF(noco%l_mtNocoPot) THEN
jsp=4 jsp=4
ELSE ELSE
jsp=input%jspins jsp=input%jspins
END IF END IF
!!Loop over Spins and Atoms !!Loop over Spins and Atoms
DO i=1, atoms%ntype DO i=1, atoms%ntype
DO j=1, jsp DO j=1, jsp
!!Integration over r !!Integration over r
CALL intgr3(den%mt(:,0,i,j), atoms%rmsh(:,i),atoms%dx(i),atoms%jri(i),dummyResults(i,j)) CALL intgr3(den%mt(:,0,i,j), atoms%rmsh(:,i),atoms%dx(i),atoms%jri(i),dummyResults(i,j))
!!Considering Lattice harmonics integral (Only L=0 component does not vanish and has a factor of sqrt(4*Pi)) !!Considering Lattice harmonics integral (Only L=0 component does not vanish and has a factor of sqrt(4*Pi))
dummyResults(i,j)=dummyResults(i,j)*sfp_const dummyResults(i,j)=dummyResults(i,j)*sfp_const
END DO END DO
END DO END DO
!!Assign results !!Assign results
DO i=1 , atoms%ntype DO i=1 , atoms%ntype
IF (noco%l_mtNocoPot) THEN IF (noco%l_mtNocoPot) THEN
moments(i,1:2)=2*dummyResults(i,3:4) moments(1:2,i)=2*dummyResults(i,3:4)
END IF END IF
moments(i,3)=dummyResults(i,1)-dummyResults(i,2) moments(3,i)=dummyResults(i,1)-dummyResults(i,2)
END DO END DO
DEALLOCATE(dummyResults) DEALLOCATE(dummyResults)
!!Calculation of Angles !!Calculation of Angles
DO i=1 , atoms%ntype DO i=1 , atoms%ntype
mx=moments(i,1) mx=moments(1,i)
my=moments(i,2) my=moments(2,i)
mz=moments(i,3) mz=moments(3,i)
CALL pol_angle(mx,my,mz,atoms%theta_mt_avg(i),atoms%phi_mt_avg(i)) CALL pol_angle(mx,my,mz,theta_mt_avg(i),phi_mt_avg(i))
IF(mx<0) atoms%theta_mt_avg(i)=-atoms%theta_mt_avg(i) IF(mx<0) theta_mt_avg(i)=-theta_mt_avg(i)
ENDDO ENDDO
END SUBROUTINE magnMomFromDen END SUBROUTINE magnMomFromDen
......
...@@ -9,14 +9,14 @@ CONTAINS ...@@ -9,14 +9,14 @@ CONTAINS
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! !
! This subroutine calculates and writes out intraatomic electric and magnetic dipole ! This subroutine calculates and writes out intraatomic electric and magnetic dipole
! moments resolved with respect to their orbital (angular momentum) origins. ! moments resolved with respect to their orbital (angular momentum) origins.
! !
! GM'2018 ! GM'2018
! !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
SUBROUTINE resMoms(input,atoms,sphhar,noco,den,rhoLRes) SUBROUTINE resMoms(sym,input,atoms,sphhar,noco,den,rhoLRes)
USE m_constants USE m_constants
USE m_types USE m_types
...@@ -24,7 +24,7 @@ SUBROUTINE resMoms(input,atoms,sphhar,noco,den,rhoLRes) ...@@ -24,7 +24,7 @@ SUBROUTINE resMoms(input,atoms,sphhar,noco,den,rhoLRes)
USE m_magDiMom USE m_magDiMom
IMPLICIT NONE IMPLICIT NONE
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_input), INTENT(IN) :: input TYPE(t_input), INTENT(IN) :: input
TYPE(t_atoms), INTENT(IN) :: atoms TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_sphhar), INTENT(IN) :: sphhar TYPE(t_sphhar), INTENT(IN) :: sphhar
...@@ -61,7 +61,7 @@ SUBROUTINE resMoms(input,atoms,sphhar,noco,den,rhoLRes) ...@@ -61,7 +61,7 @@ SUBROUTINE resMoms(input,atoms,sphhar,noco,den,rhoLRes)
! WRITE(5000,'(f15.8)') den%mt(:,:,:,4) ! WRITE(5000,'(f15.8)') den%mt(:,:,:,4)
END IF END IF
CALL magDiMom(input,atoms,sphhar,noco,noco%l_mperp,rhoTemp,t_op,elecDip) CALL magDiMom(sym,input,atoms,sphhar,noco,noco%l_mperp,rhoTemp,t_op,elecDip)
DO l = 0, atoms%lmaxd DO l = 0, atoms%lmaxd
DO lp = 0, l DO lp = 0, l
...@@ -71,7 +71,7 @@ SUBROUTINE resMoms(input,atoms,sphhar,noco,den,rhoLRes) ...@@ -71,7 +71,7 @@ SUBROUTINE resMoms(input,atoms,sphhar,noco,den,rhoLRes)
rhoTemp(:,:,:,2) = rhoLRes(:,:,llp,:,2) rhoTemp(:,:,:,2) = rhoLRes(:,:,llp,:,2)
rhoTemp(:,:,:,3) = rhoLRes(:,:,llp,:,3) rhoTemp(:,:,:,3) = rhoLRes(:,:,llp,:,3)
rhoTemp(:,:,:,4) = rhoLRes(:,:,llp,:,4) rhoTemp(:,:,:,4) = rhoLRes(:,:,llp,:,4)
CALL magDiMom(input,atoms,sphhar,noco,noco%l_mperp,rhoTemp,res_T_op(:,:,llp),resElecDip(:,:,llp)) CALL magDiMom(sym,input,atoms,sphhar,noco,noco%l_mperp,rhoTemp,res_T_op(:,:,llp),resElecDip(:,:,llp))
END DO END DO
END DO END DO
......
...@@ -13,7 +13,7 @@ MODULE m_rhosphnlo ...@@ -13,7 +13,7 @@ MODULE m_rhosphnlo
!*********************************************************************** !***********************************************************************
CONTAINS CONTAINS
SUBROUTINE rhosphnlo(itype,atoms,sphhar,sym, uloulopn,dulon,uulon,& SUBROUTINE rhosphnlo(itype,atoms,sphhar,sym, uloulopn,dulon,uulon,&
ello,vr, aclo,bclo,cclo,acnmt,bcnmt,ccnmt,f,g, rho,qmtllo) ello,vr, aclo,bclo,cclo,acnmt,bcnmt,ccnmt,f,g, rho,rholres,qmtllo)
USE m_constants, ONLY : c_light,sfp_const USE m_constants, ONLY : c_light,sfp_const
USE m_radsra USE m_radsra
......
...@@ -19,7 +19,7 @@ CONTAINS ...@@ -19,7 +19,7 @@ CONTAINS
!> The matrices generated and diagonalized here are of type m_mat as defined in m_types_mat. !> The matrices generated and diagonalized here are of type m_mat as defined in m_types_mat.
!>@author D. Wortmann !>@author D. Wortmann
SUBROUTINE eigen(mpi,stars,sphhar,atoms,xcpot,sym,kpts,vacuum,input,& SUBROUTINE eigen(mpi,stars,sphhar,atoms,xcpot,sym,kpts,vacuum,input,&
cell,enpara,banddos,noco,oneD,hybrid,iter,eig_id,results,inden,v,vx) cell,enpara,banddos,noco,oneD,mpbasis,hybrid,iter,eig_id,results,inden,v,vx)
#include"cpp_double.h" #include"cpp_double.h"
USE m_types USE m_types
...@@ -158,7 +158,7 @@ CONTAINS ...@@ -158,7 +158,7 @@ CONTAINS
IF (hybrid%l_addhf) CALL add_Vnonlocal(nk,lapw,atoms,hybrid,input,kpts,jsp,results,xcpot,noco,hmat) IF (hybrid%l_addhf) CALL add_Vnonlocal(nk,lapw,atoms,hybrid,input,kpts,jsp,results,xcpot,noco,hmat)
IF(hybrid%l_subvxc) THEN IF(hybrid%l_subvxc) THEN
CALL subvxc(lapw,kpts%bk(:,nk),input,jsp,v%mt(:,0,:,:),atoms,ud,hybrid,enpara%el0,enpara%ello0,& CALL subvxc(lapw,kpts%bk(:,nk),input,jsp,v%mt(:,0,:,:),atoms,ud,mpbasis,hybrid,enpara%el0,enpara%ello0,&
sym,cell,sphhar,stars,xcpot,mpi,oneD,hmat,vx) sym,cell,sphhar,stars,xcpot,mpi,oneD,hmat,vx)
END IF END IF
END IF ! hybrid%l_hybrid END IF ! hybrid%l_hybrid
......
...@@ -264,7 +264,7 @@ CONTAINS ...@@ -264,7 +264,7 @@ CONTAINS
IF (mpi%irank.EQ.0) CALL writeXMLElement('FermiEnergy',(/'value','units'/),attributes(1:2)) IF (mpi%irank.EQ.0) CALL writeXMLElement('FermiEnergy',(/'value','units'/),attributes(1:2))
ENDIF ENDIF
IF(.not.input%eig66(1))THEN !IF(.not.input%eig66(1))THEN
!Put w_iks into eig-file !Put w_iks into eig-file
DO jsp = 1,nspins DO jsp = 1,nspins
DO k = 1,kpts%nkpt DO k = 1,kpts%nkpt
...@@ -274,7 +274,7 @@ CONTAINS ...@@ -274,7 +274,7 @@ CONTAINS
#endif #endif
ENDDO ENDDO
ENDDO ENDDO
ENDIF !ENDIF
RETURN RETURN
8020 FORMAT (/,'FERMIE:',/,& 8020 FORMAT (/,'FERMIE:',/,&
......
...@@ -19,6 +19,7 @@ MODULE m_constants ...@@ -19,6 +19,7 @@ MODULE m_constants
INTEGER, PARAMETER :: coreState_const = 1 INTEGER, PARAMETER :: coreState_const = 1
INTEGER, PARAMETER :: valenceState_const = 2 INTEGER, PARAMETER :: valenceState_const = 2
INTEGER, PARAMETER :: lmaxU_const = 3 INTEGER, PARAMETER :: lmaxU_const = 3
COMPLEX, PARAMETER :: cmplx_0=(0.0,0.0)
REAL, PARAMETER :: pi_const=3.1415926535897932 REAL, PARAMETER :: pi_const=3.1415926535897932
REAL, PARAMETER :: tpi_const=2.*3.1415926535897932 REAL, PARAMETER :: tpi_const=2.*3.1415926535897932
REAL, PARAMETER :: fpi_const=4.*3.1415926535897932 REAL, PARAMETER :: fpi_const=4.*3.1415926535897932
...@@ -38,6 +39,17 @@ MODULE m_constants ...@@ -38,6 +39,17 @@ MODULE m_constants
INTEGER, PARAMETER :: POTDEN_TYPE_EnergyDen = 5 INTEGER, PARAMETER :: POTDEN_TYPE_EnergyDen = 5
INTEGER, PARAMETER :: POTDEN_TYPE_DEN = 1001 ! 1000 < POTDEN_TYPE ==> density INTEGER, PARAMETER :: POTDEN_TYPE_DEN = 1001 ! 1000 < POTDEN_TYPE ==> density
INTEGER, PARAMETER :: PLOT_INPDEN=1
INTEGER, PARAMETER :: PLOT_OUTDEN_Y_CORE=2
INTEGER, PARAMETER :: PLOT_INPDEN_N_CORE=3
INTEGER, PARAMETER :: PLOT_MIXDEN_Y_CORE=4
INTEGER, PARAMETER :: PLOT_MIXDEN_N_CORE=5
INTEGER, PARAMETER :: PLOT_POT_TOT=7
INTEGER, PARAMETER :: PLOT_POT_EXT=8
INTEGER, PARAMETER :: PLOT_POT_COU=9
INTEGER, PARAMETER :: PLOT_POT_VXC=10
CHARACTER(2),DIMENSION(0:103),PARAMETER :: namat_const=(/& CHARACTER(2),DIMENSION(0:103),PARAMETER :: namat_const=(/&
'va',' H','He','Li','Be',' B',' C',' N',' O',' F','Ne',& 'va',' H','He','Li','Be',' B',' C',' N',' O',' F','Ne',&
'Na','Mg','Al','Si',' P',' S','Cl','Ar',' K','Ca','Sc','Ti',& 'Na','Mg','Al','Si',' P',' S','Cl','Ar',' K','Ca','Sc','Ti',&
......
...@@ -96,7 +96,14 @@ MODULE m_types_atoms ...@@ -96,7 +96,14 @@ MODULE m_types_atoms
!lda_u information(ntype) !lda_u information(ntype)
TYPE(t_utype), ALLOCATABLE::lda_u(:) TYPE(t_utype), ALLOCATABLE::lda_u(:)
INTEGER, ALLOCATABLE :: relax(:, :) !<(3,ntype) INTEGER, ALLOCATABLE :: relax(:, :) !<(3,ntype)
INTEGER, ALLOCATABLE :: nflip(:) !<flip magnetisation of this atom !flipSpinTheta and flipSpinPhi are the angles which are given
!in the input to rotate the charge den by these polar angles.
!Typical one needs ntype angles.
REAL, ALLOCATABLE :: flipSpinPhi(:)
REAL, ALLOCATABLE :: flipSpinTheta(:)
!Logical switch which decides if the rotated cdn should be scaled.
!Yet untested feature.
LOGICAL, ALLOCATABLE :: flipSpinScale(:)
CONTAINS CONTAINS
PROCEDURE :: init=>init_atoms PROCEDURE :: init=>init_atoms
PROCEDURE :: nsp => calc_nsp_atom PROCEDURE :: nsp => calc_nsp_atom
...@@ -158,7 +165,9 @@ MODULE m_types_atoms ...@@ -158,7 +165,9 @@ MODULE m_types_atoms
call mpi_bc(this%krla,rank,mpi_comm) call mpi_bc(this%krla,rank,mpi_comm)
call mpi_bc(this%relcor,rank,mpi_comm) call mpi_bc(this%relcor,rank,mpi_comm)
call mpi_bc(this%relax,rank,mpi_comm) call mpi_bc(this%relax,rank,mpi_comm)
call mpi_bc(this%nflip,rank,mpi_comm) call mpi_bc(this%flipSpinPhi,rank,mpi_comm)
call mpi_bc(this%flipSpinTheta,rank,mpi_comm)
call mpi_bc(this%flipSpinScale,rank,mpi_comm)
#ifdef CPP_MPI #ifdef CPP_MPI
CALL mpi_COMM_RANK(mpi_comm,myrank,ierr) CALL mpi_COMM_RANK(mpi_comm,myrank,ierr)
...@@ -236,7 +245,9 @@ MODULE m_types_atoms ...@@ -236,7 +245,9 @@ MODULE m_types_atoms
ALLOCATE(this%lmax(this%ntype)) ALLOCATE(this%lmax(this%ntype))
ALLOCATE(this%nlo(this%ntype)) ALLOCATE(this%nlo(this%ntype))
ALLOCATE(this%lnonsph(this%ntype)) ALLOCATE(this%lnonsph(this%ntype))
ALLOCATE(this%nflip(this%ntype)) ALLOCATE(this%flipSpinPhi(this%ntype))
ALLOCATE(this%flipSpinTheta(this%ntype))
ALLOCATE(this%flipSpinScale(this%ntype))
ALLOCATE(this%l_geo(this%ntype)) ALLOCATE(this%l_geo(this%ntype))
ALLOCATE(this%lda_u(4*this%ntype)) ALLOCATE(this%lda_u(4*this%ntype))
ALLOCATE(this%bmu(this%ntype)) ALLOCATE(this%bmu(this%ntype))
...@@ -271,12 +282,10 @@ MODULE m_types_atoms ...@@ -271,12 +282,10 @@ MODULE m_types_atoms
this%zatom(n) = 1.0e-10 this%zatom(n) = 1.0e-10
END IF END IF
this%zatom(n) = this%nz(n) this%zatom(n) = this%nz(n)
this%flipSpinPhi(n) = evaluateFirstOnly(xml%GetAttributeValue(TRIM(ADJUSTL(xPaths))//'/@flipSpinPhi'))
this%flipSpinTheta(n) = evaluateFirstOnly(xml%GetAttributeValue(TRIM(ADJUSTL(xpaths))//'/@flipSpinTheta'))
this%flipSpinScale(n) = evaluateFirstOnly(xml%GetAttributeValue(TRIM(ADJUSTL(xpaths))//'/@flipSpinScale'))
IF (evaluateFirstBoolOnly(xml%getAttributeValue(TRIM(ADJUSTL(xPaths))//'/@flipSpin'))) THEN
this%nflip(n) = 1
ELSE
this%nflip(n) = 0
ENDIF
this%bmu(n) = evaluateFirstOnly(xml%getAttributeValue(TRIM(ADJUSTL(xPaths))//'/@magMom')) this%bmu(n) = evaluateFirstOnly(xml%getAttributeValue(TRIM(ADJUSTL(xPaths))//'/@magMom'))
!Now the xml elements !Now the xml elements
!mtSphere !mtSphere
......
...@@ -9,44 +9,31 @@ MODULE m_types_hybrid ...@@ -9,44 +9,31 @@ MODULE m_types_hybrid
USE m_types_fleurinput_base USE m_types_fleurinput_base
IMPLICIT NONE IMPLICIT NONE
PRIVATE PRIVATE
TYPE,EXTENDS(t_fleurinput_base):: t_hybrid TYPE,EXTENDS(t_fleurinput_base):: t_hybrid
LOGICAL :: l_hybrid = .false. LOGICAL :: l_hybrid = .false.
LOGICAL :: l_subvxc = .false. LOGICAL :: l_subvxc = .false.
LOGICAL :: l_calhf = .false. LOGICAL :: l_calhf = .false.
LOGICAL :: l_addhf = .false. LOGICAL :: l_addhf = .false.
INTEGER :: ewaldlambda =3