Hamiltonian

class pysktb.Hamiltonian(structure, inter, numba=1)

Object to represent hamiltonian of a system

Attributes:

E_PREFIX

Methods:

calc_g(kpt)

calc g mat as func of bond matrix, dist_mat_vec, and k g mat is phase factor

calc_ham_wo_k()

calc hamiltonian with out k all g factor is set to 1

clean_eig(eigen_val[, eig])

clean the eigen values and eigenvectors

get_dos(energy[, eig, w, nk])

energy: energy range to get the DOS eig: could passs the energy eig values (useful if the system is 2D or want to generate your own k mesh) nk: k point sampling 1x3 for x,y,z directions w: gaussian width

get_ham(kpt[, l_soc])

returns the hamiltonian for a given k point

get_kpts(path, nk)

get k points along a path

get_orb_ind(orbit)

returns the orbital index in the hameltonian

k_cart2red(k)

convert k point from cartesian to reduced coordinates

k_red2cart(k)

convert k point from reduced to cartesian coordinates

plot_kproj(eigen_vals, vecs, k_dist, index)

plots band structure projected on to subbands vecs: eigenvecs in format [band*2,kpoint,orbital] (bands*2 for spins) eigen_vals: eigen values k_dist: distance between k points index: orbital index to plot the projection on ax: axis object to plot it on cmap: colormap value

solve_k([k_point, eig_vectors])

solve the hamiltonian at a single k point

solve_kpath([k_list, eig_vectors, soc, parallel])

solve along a give k path k_list: list of k points (can be generated by get_kpts) returns: eig: eig_vectors: spits out the eigvectors in the format [band*2,kpoint,orbital] (bands*2 for spins) parallel: 0 No parallelization (parallelized over k) 1 Parallelized over k 2 parallelized using jit optimization (work in progress donot use)

total_energy([filled_band, nk, dim, soc])

get total energy of the system

E_PREFIX = 'e_'
calc_g(kpt)

calc g mat as func of bond matrix, dist_mat_vec, and k g mat is phase factor

calc_ham_wo_k()

calc hamiltonian with out k all g factor is set to 1

clean_eig(eigen_val, eig=None)

clean the eigen values and eigenvectors

get_dos(energy, eig=None, w=0.01, nk=[20, 20, 20])

energy: energy range to get the DOS eig: could passs the energy eig values (useful if the system is 2D or want to generate your own k mesh) nk: k point sampling 1x3 for x,y,z directions w: gaussian width

get_ham(kpt, l_soc=True)

returns the hamiltonian for a given k point

get_kpts(path, nk)

get k points along a path

static get_orb_ind(orbit)

returns the orbital index in the hameltonian

k_cart2red(k)

convert k point from cartesian to reduced coordinates

k_red2cart(k)

convert k point from reduced to cartesian coordinates

static plot_kproj(eigen_vals, vecs, k_dist, index, ax=None, cmap='bwr')

plots band structure projected on to subbands vecs: eigenvecs in format [band*2,kpoint,orbital] (bands*2 for spins) eigen_vals: eigen values k_dist: distance between k points index: orbital index to plot the projection on ax: axis object to plot it on cmap: colormap value

example : eigen_vals,vecs=ham.solve_kpath(k_path, eig_vectors=True) fig,ax=plt.subplots() ham.plot_kproj(eigen_vals,vecs,k_dist,index=[0,1],ax=ax)

solve_k(k_point=None, eig_vectors=False)

solve the hamiltonian at a single k point

solve_kpath(k_list=None, eig_vectors=False, soc=True, parallel=1)

solve along a give k path k_list: list of k points (can be generated by get_kpts) returns: eig: eig_vectors: spits out the eigvectors in the format [band*2,kpoint,orbital] (bands*2 for spins) parallel: 0 No parallelization (parallelized over k)

1 Parallelized over k 2 parallelized using jit optimization (work in progress donot use)

total_energy(filled_band=0, nk=10, dim=3, soc=True)

get total energy of the system