non collinear variables put into Modules

git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@360 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
moscac 2003-10-30 13:58:42 +00:00
parent cd6efe6773
commit 59cf4dd721
2 changed files with 50 additions and 3 deletions

View File

@ -329,6 +329,7 @@
! number of spinors
! "nspin = 1" for LDA simulations
! "nspin = 2" for LSD simulations
! "nspin = 4" for NON COLLINEAR simulations
REAL(dbl) :: nelup = 0.d0, neldw = 0.d0
! meaningful only if "nspin = 2",
@ -388,14 +389,29 @@
REAL(dbl) :: eopreg = 0.0d0
REAL(dbl) :: eamp = 0.0d0
REAL(dbl) :: eamp = 0.0d0
LOGICAL :: noncolin = .FALSE.
REAL(dbl) :: lambda = 1.0
INTEGER :: i_cons = 0
REAL(dbl) :: mcons(3,nsx) = 0.0
REAL(dbl) :: angle1(nsx) = 0.0
REAL(dbl) :: angle2(nsx) = 0.0
INTEGER :: report = 1
NAMELIST / system / ibrav, celldm, a, b, c, cosab, cosac, cosbc, nat,&
ntyp, nbnd, nelec, ecutwfc, ecutrho, nr1, nr2, nr3, nr1s, nr2s, &
nr3s, nr1b, nr2b, nr3b, nosym, starting_magnetization, &
occupations, degauss, ngauss, nelup, neldw, nspin, ecfixed, &
qcutz, q2sigma, xc_type, lda_plus_U, Hubbard_U, Hubbard_alpha, &
edir, emaxpos, eopreg, eamp, smearing
edir, emaxpos, eopreg, eamp, smearing, &
noncolin, mcons, lambda, i_cons, angle1, angle2, report
!=----------------------------------------------------------------------------=!
! ELECTRONS Namelist Input Parameters

View File

@ -133,6 +133,16 @@
emaxpos = 0.5d0
eopreg = 0.1d0
eamp = 1.0d-3
!!!!!
! Non collinear program variables
!!!!!
noncolin = .FALSE.
mcons = 0.0
lambda = 1.0
i_cons = 0
angle1 = 0.0
angle2 = 0.0
report = 1
RETURN
END SUBROUTINE
@ -363,6 +373,16 @@
CALL mp_bcast( emaxpos, ionode_id )
CALL mp_bcast( eopreg, ionode_id )
CALL mp_bcast( eamp, ionode_id )
!!!!!!!!
! noncolliner broadcast
!!!!!!!!
CALL mp_bcast( noncolin, ionode_id )
CALL mp_bcast( angle1, ionode_id )
CALL mp_bcast( angle2, ionode_id )
CALL mp_bcast( report, ionode_id )
CALL mp_bcast( i_cons, ionode_id )
CALL mp_bcast( mcons, ionode_id )
CALL mp_bcast( lambda, ionode_id )
RETURN
END SUBROUTINE
@ -638,7 +658,18 @@
IF( nosym ) &
CALL errore( sub_name ,' nosym not implemented in FPMD ', -1)
END IF
RETURN
!!!!!!!
! Non collinear check
!!!!!!!
IF( noncolin ) THEN
IF(diagonalization == 'cg') &
CALL errore( sub_name ,' cg not allowed with noncolin ',-1)
IF(diagonalization == 'diis') &
CALL errore( sub_name ,' diis not allowed with noncolin ',-1)
IF(i_cons < 0 .OR. i_cons > 2) &
CALL errore( sub_name ,' wrong i_cons ',-1)
END IF
RETURN
END SUBROUTINE
!=----------------------------------------------------------------------------=!