Commit 94573185 authored by burak's avatar burak

Hubbard_J for lda_plus_u_kind=0 is added.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/[email protected] c92efa57-630b-4861-b058-cf58834340f0
parent b39a7299
......@@ -386,8 +386,10 @@ MODULE input_parameters
INTEGER, PARAMETER :: nspinx=2
REAL(DP) :: starting_ns_eigenvalue(lqmax,nspinx,nsx) = -1.0_DP
REAL(DP) :: hubbard_u(nsx) = 0.0_DP
REAL(DP) :: hubbard_j0(nsx) = 0.0_DP
REAL(DP) :: hubbard_j(3,nsx) = 0.0_DP
REAL(DP) :: hubbard_alpha(nsx) = 0.0_DP
REAL(DP) :: hubbard_beta(nsx) = 0.0_DP
CHARACTER(len=80) :: U_projection_type = 'atomic'
LOGICAL :: la2F = .false.
......@@ -499,6 +501,7 @@ MODULE input_parameters
occupations, degauss, nspin, ecfixed, &
qcutz, q2sigma, lda_plus_U, lda_plus_u_kind, &
Hubbard_U, Hubbard_J, Hubbard_alpha, &
Hubbard_J0, Hubbard_beta, &
edir, emaxpos, eopreg, eamp, smearing, starting_ns_eigenvalue, &
U_projection_type, input_dft, la2F, assume_isolated, &
nqx1, nqx2, nqx3, ecutfock, &
......
......@@ -196,8 +196,10 @@ MODULE read_namelists_module
lda_plus_U = .FALSE.
lda_plus_u_kind = 0
Hubbard_U = 0.0_DP
Hubbard_J0 = 0.0_DP
Hubbard_J = 0.0_DP
Hubbard_alpha = 0.0_DP
Hubbard_beta = 0.0_DP
step_pen=.false.
A_pen=0.0_DP
sigma_pen=0.01_DP
......@@ -850,8 +852,10 @@ MODULE read_namelists_module
CALL mp_bcast( lda_plus_U, ionode_id )
CALL mp_bcast( lda_plus_u_kind, ionode_id )
CALL mp_bcast( Hubbard_U, ionode_id )
CALL mp_bcast( Hubbard_J0, ionode_id )
CALL mp_bcast( Hubbard_J, ionode_id )
CALL mp_bcast( Hubbard_alpha, ionode_id )
CALL mp_bcast( Hubbard_beta, ionode_id )
CALL mp_bcast( step_pen, ionode_id )
CALL mp_bcast( A_pen, ionode_id )
CALL mp_bcast( sigma_pen, ionode_id )
......
......@@ -86,7 +86,9 @@ CONTAINS
CASE ('ATOMIC_SPECIES')
atom_mass = 0.0_DP
hubbard_u = 0.0_DP
hubbard_j0 = 0.0_DP
hubbard_alpha = 0.0_DP
hubbard_beta = 0.0_DP
starting_magnetization = sm_not_set
starting_ns_eigenvalue = -1.0_DP
angle1 = 0.0_DP
......@@ -191,7 +193,9 @@ CONTAINS
CALL mp_bcast( atom_label, ionode_id )
CALL mp_bcast( taspc, ionode_id )
CALL mp_bcast( hubbard_u, ionode_id )
CALL mp_bcast( hubbard_j0, ionode_id )
CALL mp_bcast( hubbard_alpha, ionode_id )
CALL mp_bcast( hubbard_beta, ionode_id )
CALL mp_bcast( starting_magnetization, ionode_id )
CALL mp_bcast( starting_ns_eigenvalue, ionode_id )
CALL mp_bcast( angle1, ionode_id )
......@@ -719,10 +723,18 @@ CONTAINS
CALL iotk_scan_dat_inside( xmlinputunit, hubbard_alpha( is ),&
ierr = ierr)
!
CASE ( 'hubbard_beta' )
CALL iotk_scan_dat_inside( xmlinputunit, hubbard_beta( is ),&
ierr = ierr)
!
CASE ( 'hubbard_u' )
CALL iotk_scan_dat_inside( xmlinputunit, hubbard_u( is ),&
ierr = ierr)
!
CASE ( 'hubbard_j0' )
CALL iotk_scan_dat_inside( xmlinputunit, hubbard_j0( is ),&
ierr = ierr)
!
CASE ( 'starting_ns_eigenvalue' )
!
CALL iotk_scan_attr( attr_in, 'ns', index1, ierr = ierr )
......
......@@ -1203,8 +1203,8 @@ MODULE xml_io_base
!
!------------------------------------------------------------------------
SUBROUTINE write_xc( dft, nsp, lda_plus_u, lda_plus_u_kind, Hubbard_lmax, &
Hubbard_l, Hubbard_U, Hubbard_J, Hubbard_alpha, &
inlc, vdw_table_name, pseudo_dir, dirname )
Hubbard_l, Hubbard_U, Hubbard_J, Hubbard_J0, Hubbard_beta, &
Hubbard_alpha, inlc, vdw_table_name, pseudo_dir, dirname )
!------------------------------------------------------------------------
!
CHARACTER(LEN=*), INTENT(IN) :: dft
......@@ -1213,7 +1213,8 @@ MODULE xml_io_base
INTEGER, OPTIONAL, INTENT(IN) :: nsp
INTEGER, OPTIONAL, INTENT(IN) :: Hubbard_lmax
INTEGER, OPTIONAL, INTENT(IN) :: Hubbard_l(:)
REAL(DP), OPTIONAL, INTENT(IN) :: Hubbard_U(:), Hubbard_J(:,:), Hubbard_alpha(:)
REAL(DP), OPTIONAL, INTENT(IN) :: Hubbard_U(:), Hubbard_J(:,:), Hubbard_alpha(:), &
Hubbard_J0(:), Hubbard_beta(:)
INTEGER, OPTIONAL, INTENT(IN) :: inlc
CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: vdw_table_name, pseudo_dir, dirname
!
......@@ -1231,9 +1232,11 @@ MODULE xml_io_base
IF ( .NOT. PRESENT( Hubbard_lmax ) .OR. &
.NOT. PRESENT( Hubbard_l ) .OR. &
.NOT. PRESENT( Hubbard_U ) .OR. &
.NOT. PRESENT( Hubbard_J0 ) .OR. &
.NOT. PRESENT( Hubbard_J ) .OR. &
.NOT. PRESENT( nsp ) .OR. &
.NOT. PRESENT( Hubbard_alpha ) ) &
.NOT. PRESENT( Hubbard_alpha ) .OR. &
.NOT. PRESENT( Hubbard_beta ) ) &
CALL errore( 'write_xc', &
' variables for LDA+U not present', 1 )
!
......@@ -1250,8 +1253,12 @@ MODULE xml_io_base
!
CALL iotk_write_dat( iunpun, "HUBBARD_J", Hubbard_J(1:3,1:nsp), COLUMNS = 3 )
!
CALL iotk_write_dat( iunpun, "HUBBARD_J0", Hubbard_J0(1:nsp) )
!
CALL iotk_write_dat( iunpun, "HUBBARD_ALPHA", Hubbard_alpha(1:nsp) )
!
CALL iotk_write_dat( iunpun, "HUBBARD_BETA", Hubbard_beta(1:nsp) )
!
END IF
!
......
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