mirror of https://gitlab.com/QEF/q-e.git
Adding calculation of Z2 topological invariant according to
PRB 83, 235401 (2011). The routine is coming soon. git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10621 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
d189c985ab
commit
22736a5945
|
@ -211,6 +211,12 @@ MODULE input_parameters
|
|||
LOGICAL :: lberry = .false.
|
||||
! if .TRUE., use modern theory of the polarization
|
||||
|
||||
LOGICAL :: lcalc_z2 = .false.
|
||||
! if .TRUE., calculate Z2 without inversion symmetry
|
||||
|
||||
REAL(DP) :: z2_m_threshold = 0.8d0, z2_z_threshold = 0.05d0
|
||||
! threshold for realizing the parallel transport gauge
|
||||
|
||||
INTEGER :: gdir = 0
|
||||
! G-vector for polarization calculation ( related to lberry )
|
||||
! only used in PW
|
||||
|
@ -270,7 +276,8 @@ MODULE input_parameters
|
|||
forc_conv_thr, pseudo_dir, disk_io, tefield, dipfield, lberry, &
|
||||
gdir, nppstr, wf_collect, printwfc, lelfield, nberrycyc, refg, &
|
||||
tefield2, saverho, tabps, lkpoint_dir, use_wannier, lecrpa, &
|
||||
tqmmm, vdw_table_name, lorbm, memory, point_label_type
|
||||
tqmmm, vdw_table_name, lorbm, memory, point_label_type, &
|
||||
lcalc_z2, z2_m_threshold, z2_z_threshold
|
||||
|
||||
!
|
||||
!=----------------------------------------------------------------------------=!
|
||||
|
|
|
@ -108,6 +108,9 @@ MODULE read_namelists_module
|
|||
disk_io = 'default'
|
||||
dipfield = .FALSE.
|
||||
lberry = .FALSE.
|
||||
lcalc_z2 = .FALSE.
|
||||
z2_m_threshold = 0.8d0
|
||||
z2_z_threshold = 0.05d0
|
||||
gdir = 0
|
||||
nppstr = 0
|
||||
wf_collect = .FALSE.
|
||||
|
@ -674,6 +677,9 @@ MODULE read_namelists_module
|
|||
CALL mp_bcast( tefield2, ionode_id, intra_image_comm )
|
||||
CALL mp_bcast( dipfield, ionode_id, intra_image_comm )
|
||||
CALL mp_bcast( lberry, ionode_id, intra_image_comm )
|
||||
CALL mp_bcast( lcalc_z2, ionode_id, intra_image_comm )
|
||||
CALL mp_bcast( z2_m_threshold,ionode_id, intra_image_comm )
|
||||
CALL mp_bcast( z2_z_threshold,ionode_id, intra_image_comm )
|
||||
CALL mp_bcast( gdir, ionode_id, intra_image_comm )
|
||||
CALL mp_bcast( nppstr, ionode_id, intra_image_comm )
|
||||
CALL mp_bcast( point_label_type, ionode_id, intra_image_comm )
|
||||
|
@ -1215,6 +1221,8 @@ MODULE read_namelists_module
|
|||
CALL infomsg( sub_name,' dipfield not yet implemented ')
|
||||
IF( lberry ) &
|
||||
CALL infomsg( sub_name,' lberry not implemented yet ')
|
||||
IF( lcalc_z2 ) &
|
||||
CALL infomsg( sub_name,' lcalc_z2 incompatible with CP ')
|
||||
IF( gdir /= 0 ) &
|
||||
CALL infomsg( sub_name,' gdir not used ')
|
||||
IF( nppstr /= 0 ) &
|
||||
|
|
|
@ -446,6 +446,15 @@ CONTAINS
|
|||
CASE ( 'lberry' )
|
||||
CALL iotk_scan_dat_inside( xmlinputunit, lberry, ierr = ierr )
|
||||
!
|
||||
CASE ( 'lcalc_z2' )
|
||||
CALL iotk_scan_dat_inside( xmlinputunit, lcalc_z2, ierr = ierr )
|
||||
!
|
||||
CASE ( 'z2_m_threshold' )
|
||||
CALL iotk_scan_dat_inside( xmlinputunit, z2_m_threshold, ierr = ierr )
|
||||
!
|
||||
CASE ( 'z2_z_threshold' )
|
||||
CALL iotk_scan_dat_inside( xmlinputunit, z2_z_threshold, ierr = ierr )
|
||||
!
|
||||
CASE ( 'lda_plus_u' )
|
||||
CALL iotk_scan_dat_inside( xmlinputunit, lda_plus_u, ierr = ierr )
|
||||
!
|
||||
|
|
|
@ -20,12 +20,16 @@ MODULE bp
|
|||
fact_hepsi, bec_evcel, mapgp_global, mapgm_global, nppstr_3d, &
|
||||
ion_pol, el_pol, fc_pol, l_el_pol_old, el_pol_old, el_pol_acc, &
|
||||
nx_el, l3dstring, efield, efield_cart, efield_cry, transform_el
|
||||
PUBLIC :: lcalc_z2, z2_m_threshold, z2_z_threshold
|
||||
PUBLIC :: allocate_bp_efield, deallocate_bp_efield, bp_global_map
|
||||
!
|
||||
LOGICAL :: &
|
||||
lberry =.false., & ! if .TRUE. calculate polarization using Berry phase
|
||||
lelfield=.false., & ! if .TRUE. finite electric field using Berry phase
|
||||
lorbm=.false. ! if .TRUE. calculate orbital magnetization (Kubo terms)
|
||||
LOGICAL :: &
|
||||
lcalc_z2 =.false. ! if .TRUE. calculate Z2 without inversion symmetry
|
||||
REAL(DP) :: z2_m_threshold, z2_z_threshold
|
||||
INTEGER :: &
|
||||
gdir, &! G-vector for polarization calculation
|
||||
nppstr, &! number of k-points (parallel vector)
|
||||
|
@ -72,7 +76,7 @@ CONTAINS
|
|||
|
||||
IMPLICIT NONE
|
||||
|
||||
IF ( lberry .OR. lelfield .OR. lorbm ) THEN
|
||||
IF ( lberry .OR. lelfield .OR. lorbm .OR. lcalc_z2) THEN
|
||||
ALLOCATE(mapgp_global(ngm_g,3))
|
||||
ALLOCATE(mapgm_global(ngm_g,3))
|
||||
ENDIF
|
||||
|
@ -89,7 +93,7 @@ CONTAINS
|
|||
|
||||
IMPLICIT NONE
|
||||
|
||||
IF ( lberry .OR. lelfield .OR. lorbm ) THEN
|
||||
IF ( lberry .OR. lelfield .OR. lorbm .OR. lcalc_z2) THEN
|
||||
IF ( ALLOCATED(mapgp_global) ) DEALLOCATE(mapgp_global)
|
||||
IF ( ALLOCATED(mapgm_global) ) DEALLOCATE(mapgm_global)
|
||||
IF ( ALLOCATED(nx_el) ) DEALLOCATE(nx_el)
|
||||
|
@ -114,7 +118,7 @@ CONTAINS
|
|||
INTEGER, ALLOCATABLE :: ln_g(:,:,:)
|
||||
INTEGER, ALLOCATABLE :: g_ln(:,:)
|
||||
|
||||
IF ( .NOT.lberry .AND. .NOT. lelfield .AND. .NOT. lorbm ) RETURN
|
||||
IF ( .NOT.lberry .AND. .NOT. lelfield .AND. .NOT. lorbm .AND. .NOT. lcalc_z2) RETURN
|
||||
! set up correspondence ln_g ix,iy,iz ---> global g index in
|
||||
! (for now...) coarse grid
|
||||
! and inverse realtion global g (coarse) to ix,iy,iz
|
||||
|
|
|
@ -32,6 +32,9 @@ SUBROUTINE iosys()
|
|||
USE bp, ONLY : nppstr_ => nppstr, &
|
||||
gdir_ => gdir, &
|
||||
lberry_ => lberry, &
|
||||
lcalc_z2_ => lcalc_z2, &
|
||||
z2_m_threshold_ => z2_m_threshold, &
|
||||
z2_z_threshold_ => z2_z_threshold, &
|
||||
lelfield_ => lelfield, &
|
||||
lorbm_ => lorbm, &
|
||||
efield_ => efield, &
|
||||
|
@ -201,7 +204,8 @@ SUBROUTINE iosys()
|
|||
pseudo_dir, disk_io, tefield, dipfield, lberry, &
|
||||
gdir, nppstr, wf_collect,lelfield,lorbm,efield, &
|
||||
nberrycyc, lkpoint_dir, efield_cart, lecrpa, &
|
||||
vdw_table_name, memory, tqmmm
|
||||
vdw_table_name, memory, tqmmm, &
|
||||
lcalc_z2, z2_m_threshold, z2_z_threshold
|
||||
|
||||
!
|
||||
! ... SYSTEM namelist
|
||||
|
@ -1049,6 +1053,9 @@ SUBROUTINE iosys()
|
|||
nppstr_ = nppstr
|
||||
gdir_ = gdir
|
||||
lberry_ = lberry
|
||||
lcalc_z2_ = lcalc_z2
|
||||
z2_m_threshold_ = z2_m_threshold
|
||||
z2_z_threshold_ = z2_z_threshold
|
||||
lelfield_ = lelfield
|
||||
lorbm_ = lorbm
|
||||
efield_ = efield
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
! ... diagonalization of the KS hamiltonian in the non-scf case
|
||||
!
|
||||
USE kinds, ONLY : DP
|
||||
USE bp, ONLY : lelfield, lberry, lorbm
|
||||
USE bp, ONLY : lelfield, lberry, lorbm, lcalc_z2
|
||||
USE check_stop, ONLY : stopped_by_user
|
||||
USE control_flags, ONLY : io_level, conv_elec
|
||||
USE ener, ONLY : ef
|
||||
|
@ -92,6 +92,7 @@
|
|||
! ... do a Berry phase polarization calculation if required
|
||||
!
|
||||
IF ( lberry ) CALL c_phase()
|
||||
!!IF ( lcalc_z2 ) CALL c_phase_z2()
|
||||
!
|
||||
! ... do an orbital magnetization (Kubo terms) calculation
|
||||
!
|
||||
|
|
|
@ -68,7 +68,7 @@ SUBROUTINE setup()
|
|||
USE uspp_param, ONLY : upf, n_atom_wfc
|
||||
USE uspp, ONLY : okvan
|
||||
USE ldaU, ONLY : lda_plus_u, init_lda_plus_u
|
||||
USE bp, ONLY : gdir, lberry, nppstr, lelfield, lorbm, nx_el, nppstr_3d,l3dstring, efield
|
||||
USE bp, ONLY : gdir, lberry, nppstr, lelfield, lorbm, nx_el, nppstr_3d,l3dstring, efield, lcalc_z2
|
||||
USE fixed_occ, ONLY : f_inp, tfixed_occ, one_atom_occupations
|
||||
USE funct, ONLY : set_dft_from_name
|
||||
USE mp_pools, ONLY : kunit
|
||||
|
@ -408,7 +408,7 @@ SUBROUTINE setup()
|
|||
nrot = 1
|
||||
nsym = 1
|
||||
!
|
||||
ELSE IF (lberry) THEN
|
||||
ELSE IF (lberry .OR. lcalc_z2) THEN
|
||||
!
|
||||
CALL kp_strings( nppstr, gdir, nrot, s, bg, npk, &
|
||||
k1, k2, k3, nk1, nk2, nk3, nkstot, xk, wk )
|
||||
|
|
Loading…
Reference in New Issue