PAOFLOW.topology.do_berry_phase#
Functions#
|
Compute the Berry or Zak phase for a set of occupied (or selected) bands. |
|
Compute the Berry (or Zak) phase from pre-computed Bloch eigenvectors. |
|
Diagonalise H(k) on the Berry-phase k-path and return eigenvalues and eigenvectors. |
|
Evaluate the PAO Hamiltonian H(k) at an arbitrary set of k-points. |
|
Set up the real-space lattice grid and interpolate bands on the Berry-phase contour. |
|
Get path between HSP |
|
Shift |
|
Reads in 1d array of numbers pha and makes sure that they are |
|
Reads in 2d array of phases arr_pha and makes sure that they |
Module Contents#
- PAOFLOW.topology.do_berry_phase.do_berry_phase(self)[source]#
Compute the Berry or Zak phase for a set of occupied (or selected) bands.
Dispatches to one of four k-space sampling strategies based on
attr['berry_kspace_method']:'path'Evaluate the phase along a 1-D high-symmetry path. The result is a single scalar phase (or a vector of per-band phases when
berry_eigvalsis True) written to<fname>.dat.'track'Sweep a 1-D path as a function of a transverse k-coordinate supplied by
berry_kpath_funct. Returns a 1-D array of phases (one per transverse point) and writes<fname>.dat.'circle'Integrate along a circular contour of radius
berry_kradiuscentered atberry_kcenterin the kx–ky plane. Writes a single scalar to<fname>.dat.'square'Tile the k-plane with elementary plaquettes and compute a phase on each. The resulting 2-D phase map (Berry flux) is written to
<fname>.dattogether with a corner k-grid file.
- Parameters:
self (PAOFLOW) – The calling
PAOFLOW.PAOFLOWinstance; provides access todata_controllerand indirectly to all DataController arrays and attributes.
Notes
Reads
berry_occupied,berry_sub,berry_contin,berry_fname,berry_kspace_method,berry_nk1,berry_nk2,berry_kpath_funct,berry_kradius,berry_kcenter,berry_kxlim,berry_kylim,berry_eigvals,berry_closed,berry_method,nelec,HRsfrom DataController.Writes
berry_phase(array or scalar) andberry_flux(square mode only) to DataController.
- PAOFLOW.topology.do_berry_phase.do_phase(data_controller)[source]#
Compute the Berry (or Zak) phase from pre-computed Bloch eigenvectors.
Constructs the gauge-invariant phase as the argument of the determinant of the product of overlap matrices between consecutive k-points along the contour stored in
arry['berry_kq']:\[\phi = -\operatorname{Im} \ln \det \prod_{k} \langle u_k | u_{k+1} \rangle\]Each overlap matrix is SVD-projected to the nearest unitary matrix before multiplication, which makes the result independent of the individual gauge choices at each k-point.
For the Zak variant (
method='zak') the boundary link includes the reciprocal-lattice phase factorexp(-i G·r)that accounts for the non-periodicity of the Bloch factor across the full Brillouin zone.When
berry_eigvalsis True, the eigenvalues of the product matrix are returned instead of its determinant, yielding per-band (Wannier-centre) phases.- Parameters:
data_controller (DataController) – Provides
berry_v_k,berry_contour,berry_closed,berry_method,berry_eigvals,berry_occupied,berry_sub,nelec,alat,b_vectors,tau,naw,HRs.- Returns:
If
berry_eigvalsis False: single scalar phase in radians. Ifberry_eigvalsis True: 1-D array of per-band phases, sorted.- Return type:
float or ndarray
- PAOFLOW.topology.do_berry_phase.bands_calc(data_controller)[source]#
Diagonalise H(k) on the Berry-phase k-path and return eigenvalues and eigenvectors.
Scatters
arry['berry_kq']across k-point pools, evaluates the Hamiltonian at each k viaband_loop_H(), then solves the generalised eigenvalue problem withscipy.linalg.eigh.- Parameters:
data_controller (DataController) – Must contain
HRs(real-space Hamiltonian),berry_kq(k-point array, shape(3, nkpts)),R,npool,nspin.- Returns:
E_kp_aux (ndarray, shape (nkpts_local, nawf, nspin)) – Band eigenvalues along the local k-point slice.
v_kp_aux (ndarray, shape (nkpts_local, nawf, nawf, nspin)) – Corresponding eigenvectors (columns are eigenstates).
Notes
Stores the local k-slice Hamiltonian in
arry['berry_Hks'].
- PAOFLOW.topology.do_berry_phase.band_loop_H(data_controller, kq_aux)[source]#
Evaluate the PAO Hamiltonian H(k) at an arbitrary set of k-points.
Performs the Fourier sum
\[H(\mathbf{k}) = \sum_{\mathbf{R}} H(\mathbf{R}) e^{2\pi i \mathbf{k} \cdot \mathbf{R}}\]using a single
numpy.tensordotcontraction over real-space lattice vectorsR.- Parameters:
data_controller (DataController) – Must contain
HRs(shape(nawf, nawf, nk1, nk2, nk3, nspin)) andR(shape(nR, 3), lattice vectors in crystal coordinates).kq_aux (ndarray, shape (3, nkpts_local)) – k-points for the local MPI slice, in crystal coordinates.
- Returns:
Haux – H(k) at each requested k-point for each spin channel.
- Return type:
- PAOFLOW.topology.do_berry_phase.do_berry_bands(data_controller)[source]#
Set up the real-space lattice grid and interpolate bands on the Berry-phase contour.
Orchestrates the full band interpolation required before phase evaluation:
Converts
alatfrom Bohr to Ångström for the duration of the call.Calls
get_R_grid_fft()to populate the real-space lattice-vector arrayRand associated weights.For
'path'and'track'methods, builds the k-point mesh viaberry_kpnts_interpolation_mesh().Rotates k-points from crystal to Cartesian (reciprocal-space) coordinates using
b_vectors.Calls
bands_calc()and stores eigenvalues and eigenvectors inarry['berry_E_k']andarry['berry_v_k'].Restores
alatto Bohr before returning.
- Parameters:
data_controller (DataController) – Must contain
HRs,b_vectors,alat,berry_kspace_method, and (for path/track modes)berry_path,berry_high_sym_points,berry_nk,ibrav,a_vectors.
Notes
Populates
arry['berry_E_k'],arry['berry_v_k'],arry['R'],arry['R_wght'], and (path/track)arry['berry_kq'],arry['berry_contour'].
- PAOFLOW.topology.do_berry_phase.berry_kpnts_interpolation_mesh(data_controller)[source]#
Get path between HSP
Arguments:
nk (int): total number of points in path
Returns:
kpoints : array of arrays kx,ky,kz numK : Total no. of k-points
- PAOFLOW.topology.do_berry_phase.no_2pi(x, ref)[source]#
Shift
xby multiples of 2π until it is as close as possible toref.