Commit 4e17db7e authored by Gregor Michalicek's avatar Gregor Michalicek

Quick fix for the relaxation of the noco alpha and beta angles.

...the usage has to be changed at some point. At the moment a
nocoinp file is generated. The noco input from that file overwrites
the noco input in inp.xml
parent ac8a3484
...@@ -34,7 +34,7 @@ SUBROUTINE genNewNocoInp(input,atoms,noco,noco_new) ...@@ -34,7 +34,7 @@ SUBROUTINE genNewNocoInp(input,atoms,noco,noco_new)
alphdiff = 2.0*pi_const*(noco%qss(1)*atoms%taual(1,iAtom) + & alphdiff = 2.0*pi_const*(noco%qss(1)*atoms%taual(1,iAtom) + &
noco%qss(2)*atoms%taual(2,iAtom) + & noco%qss(2)*atoms%taual(2,iAtom) + &
noco%qss(3)*atoms%taual(3,iAtom) ) noco%qss(3)*atoms%taual(3,iAtom) )
noco_new%alph(iType) = noco%alph(iType) - alphdiff noco_new%alph(iType) = noco_new%alph(iType) - alphdiff
DO WHILE (noco_new%alph(iType) > +pi_const) DO WHILE (noco_new%alph(iType) > +pi_const)
noco_new%alph(iType)= noco_new%alph(iType) - 2.0*pi_const noco_new%alph(iType)= noco_new%alph(iType) - 2.0*pi_const
END DO END DO
...@@ -42,7 +42,7 @@ SUBROUTINE genNewNocoInp(input,atoms,noco,noco_new) ...@@ -42,7 +42,7 @@ SUBROUTINE genNewNocoInp(input,atoms,noco,noco_new)
noco_new%alph(iType)= noco_new%alph(iType) + 2.0*pi_const noco_new%alph(iType)= noco_new%alph(iType) + 2.0*pi_const
END DO END DO
ELSE ELSE
noco_new%alph(iType) = noco%alph(iType) noco_new%alph(iType) = noco_new%alph(iType)
END IF END IF
iatom= iatom + atoms%neq(iType) iatom= iatom + atoms%neq(iType)
END DO END DO
......
...@@ -44,6 +44,10 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,& ...@@ -44,6 +44,10 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
IMPLICIT NONE IMPLICIT NONE
#ifdef CPP_MPI
INCLUDE 'mpif.h'
#endif
! Type instance arguments ! Type instance arguments
TYPE(t_results),INTENT(INOUT) :: results TYPE(t_results),INTENT(INOUT) :: results
TYPE(t_mpi),INTENT(IN) :: mpi TYPE(t_mpi),INTENT(IN) :: mpi
...@@ -54,7 +58,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,& ...@@ -54,7 +58,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
TYPE(t_sliceplot),INTENT(IN) :: sliceplot TYPE(t_sliceplot),INTENT(IN) :: sliceplot
TYPE(t_input),INTENT(IN) :: input TYPE(t_input),INTENT(IN) :: input
TYPE(t_vacuum),INTENT(IN) :: vacuum TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_noco),INTENT(IN) :: noco TYPE(t_noco),INTENT(INOUT) :: noco
TYPE(t_sym),INTENT(IN) :: sym TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_stars),INTENT(IN) :: stars TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_cell),INTENT(IN) :: cell TYPE(t_cell),INTENT(IN) :: cell
...@@ -81,7 +85,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,& ...@@ -81,7 +85,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
!Local Scalars !Local Scalars
REAL :: fix, qtot, dummy,eFermiPrev REAL :: fix, qtot, dummy,eFermiPrev
INTEGER :: jspin, jspmax INTEGER :: jspin, jspmax, ierr
#ifdef CPP_HDF #ifdef CPP_HDF
INTEGER(HID_T) :: banddosFile_id INTEGER(HID_T) :: banddosFile_id
#endif #endif
...@@ -161,6 +165,8 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,& ...@@ -161,6 +165,8 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
!Calculate and write out spin densities at the nucleus and magnetic moments in the spheres !Calculate and write out spin densities at the nucleus and magnetic moments in the spheres
CALL magMoms(dimension,input,atoms,noco_new,vTot,moments) CALL magMoms(dimension,input,atoms,noco_new,vTot,moments)
noco = noco_new
!Generate and save the new nocoinp file if the directions of the local !Generate and save the new nocoinp file if the directions of the local
!moments are relaxed or a constraint B-field is calculated. !moments are relaxed or a constraint B-field is calculated.
IF (ANY(noco%l_relax(:atoms%ntype)).OR.noco%l_constr) THEN IF (ANY(noco%l_relax(:atoms%ntype)).OR.noco%l_constr) THEN
...@@ -168,10 +174,23 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,& ...@@ -168,10 +174,23 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
END IF END IF
IF (noco%l_soc) CALL orbMagMoms(input,atoms,noco,moments%clmom) IF (noco%l_soc) CALL orbMagMoms(input,atoms,noco,moments%clmom)
END IF END IF
END IF ! mpi%irank.EQ.0 END IF ! mpi%irank.EQ.0
#ifdef CPP_MPI #ifdef CPP_MPI
CALL MPI_BCAST(noco%l_ss,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(noco%l_mperp,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(noco%l_constr,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(noco%mix_b,1,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(noco%alphInit,atoms%ntype,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(noco%alph,atoms%ntype,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(noco%beta,atoms%ntype,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(noco%b_con,atoms%ntype*2,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(noco%l_relax,atoms%ntype,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(noco%qss,3,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL mpi_bc_potden(mpi,stars,sphhar,atoms,input,vacuum,oneD,noco,outDen) CALL mpi_bc_potden(mpi,stars,sphhar,atoms,input,vacuum,oneD,noco,outDen)
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment