inpnoco.F90 2.55 KB
Newer Older
1 2 3 4 5 6
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------

7
      MODULE m_inpnoco
8

9 10 11 12 13 14 15 16 17 18
!**********************************************************************
!     This subroutine reads the  Euler angles of the  magnetic field 
!     directions and other noncollinear parameters from the file nocoinp
!
!                                                 Philipp Kurz 98/01/28
!******** ABBREVIATIONS ***********************************************
!     alpha,beta:Euler angles of the local magnetic field direction of
!                each atom(-type). 
!**********************************************************************
      CONTAINS
19
      SUBROUTINE inpnoco(atoms,input,vacuum,noco)
20 21 22 23

      USE m_constants, ONLY : tpi_const
      USE m_rwnoco
      USE m_types
24
      USE m_nocoInputCheck
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
      IMPLICIT NONE
      TYPE(t_atoms),INTENT(INOUT) ::atoms
      TYPE(t_input),INTENT(INOUT) ::input
      TYPE(t_vacuum),INTENT(IN)   ::vacuum
      TYPE(t_noco),INTENT(INOUT)  ::noco

!     ..
!     .. Local Scalars ..
      INTEGER itype,iatom

      OPEN (24,file='nocoinp',form='formatted',status='old')

      WRITE (6,*)'This is a non-collinear calculation. The magnetic'
      WRITE (6,*)'moments of the atoms have a fixed direction.'
      WRITE (6,*)'The Euler-angles alpha and beta of this direction'
      WRITE (6,*)'are equal to the polar angles of the magnetic'
      WRITE (6,*)'moment vector phi and theta respectively.'
      WRITE (6,*)

44
      CALL rw_noco_read(atoms,noco,input)
45

46
      CALL nocoInputCheck(atoms,input,vacuum,noco)
47
         
48
      IF (noco%l_ss) THEN
49 50 51 52 53 54 55 56 57
!
!--->    the angle beta is relative to the spiral in a spin-spiral
!--->    calculation, i.e. if beta = 0 for all atoms in the unit cell
!--->    that means that the moments are "in line" with the spin-spiral
!--->    (beta = qss * taual). note: this means that only atoms within
!--->    a plane perpendicular to qss can be equivalent!
         iatom = 1
         DO itype = 1,atoms%ntype
            noco%phi = tpi_const*dot_product(noco%qss,atoms%taual(:,iatom))
58
            noco%alph(itype) = noco%alph(itype) + noco%phi
59 60 61 62 63 64 65 66 67
            iatom = iatom + atoms%neq(itype)
         ENDDO
      ENDIF

      WRITE (6,*)
      CLOSE (24)

      END SUBROUTINE inpnoco
      END MODULE m_inpnoco