1! 2! Copyright (C) 2001-2003 PWSCF group 3! This file is distributed under the terms of the 4! GNU General Public License. See the file `License' 5! in the root directory of the present distribution, 6! or http://www.gnu.org/copyleft/gpl.txt . 7! 8!---------------------------------------------------------------------------- 9! 10MODULE noncollin_module 11 USE kinds, ONLY : DP 12 USE parameters, ONLY : ntypx 13 ! 14 SAVE 15 ! 16 INTEGER :: & 17 npol, & ! number of coordinates of wfc 18 report, & ! print the local quantities (magnet. and rho) 19 ! every #report iterations 20 nspin_lsda = 1, & ! =1 when nspin=1,4 =2 when nspin=2 21 nspin_mag = 1, & ! =1 when nspin=1,4 (domag=.false.), =2 when 22 ! nspin=2, =4 nspin=4 (domag=.true.) 23 nspin_gga = 1, & ! =1 when nspin=1,4 (domag=.false.) 24 ! =2 when nspin=2,4 (domag=.true.) (needed with gga) 25 i_cons = 0 ! indicator for constrained local quantities 26 ! 27 INTEGER, ALLOCATABLE :: & 28 ! ! when spherical (non-overlapping) integration 29 pointlist(:) ! regions are defined around atoms this index 30 ! says for each point in the fft grid to which 31 ! atom it is assigned (0 if no atom is selected) 32 ! 33 LOGICAL :: & 34 noncolin, & ! true if noncollinear magnetism is allowed 35 lsign=.FALSE. ! if true use the sign feature to calculate 36 ! rhoup and rhodw 37 ! 38 REAL (DP) :: & 39 angle1(ntypx), &! Define the polar coordinates of the starting 40 angle2(ntypx), &! magnetization's direction for each atom 41 mcons(3,ntypx)=0.d0, &! constrained values for local variables 42 magtot_nc(3), &! total magnetization 43 bfield(3)=0.d0, &! magnetic field used in some cases 44 vtcon, &! contribution of the constraining fields to 45 ! the total energy 46 r_m(ntypx) = 0.0d0, &! Radius for local integrations for each type 47 lambda ! prefactor in the penalty functional 48 ! for constraints 49 ! 50 REAL (DP), ALLOCATABLE :: & 51 factlist(:), &! weight factors for local integrations 52 m_loc(:,:) ! local integrated magnetization 53 REAL(DP) :: & 54 ux(3) ! versor for deciding signs in gga 55 ! 56 CONTAINS 57 ! 58 !------------------------------------------------------------------------ 59 SUBROUTINE deallocate_noncol() 60 !------------------------------------------------------------------------ 61 ! 62 IF ( ALLOCATED( pointlist) ) DEALLOCATE( pointlist ) 63 IF ( ALLOCATED( factlist ) ) DEALLOCATE( factlist ) 64 IF ( ALLOCATED( m_loc ) ) DEALLOCATE( m_loc ) 65 ! 66 END SUBROUTINE deallocate_noncol 67 ! 68END MODULE noncollin_module 69