tbplas.TBPMSolver
- class tbplas.TBPMSolver(model: PrimitiveCell | Sample, echo_details: bool = True)
Wrapper class over C++ TBPM subroutines.
- _model
model for which TBPM calculations will be performed
- Type:
‘PrimitiveCell’ or ‘Sample’ instance
- _cpp_model
c++ interface of model
- Type:
‘CPPPrimitiveCell’ or ‘CPPSample’ instance
- _cpp_solver
c++ interface of solver
- Type:
‘CPPTBPMSolverForPrimitiveCell’ or ‘CPPTBPMSolverForSample’ instance
- _cpp_model_data
container of data to which _cpp_model is referenced to avoid dangling pointers
- Type:
namedtuple
- _mpi_env
mpi parallel environment
- Type:
‘MPIEnv’ instance
- config
parameters controlling TBPM calculation
- Type:
‘TBPMConfig’ instance
- __init__(model: PrimitiveCell | Sample, echo_details: bool = True) None
- Parameters:
model – model for which TBPM calculations will be performed
echo_details – whether to output parallelization details
Methods
__init__
(model[, echo_details])Calculate correlation function of optical (AC) conductivity. :return: (4, num_steps) complex128 array AC correlation function along xx, yx, xy, yy directions Unit is e^2/hbar^2 * (eV)^2 * nm^2.
Calculate correlation function of band structure. :return: (k_len, corr_bands) k_len: (num_kpt,) float64 array length of k-path in 1/nm corr_bands: (num_kpt, num_steps+1) complex128 array correlation functions for each k-point.
Calculate correlation function of electronic (DC) conductivity. :return: (corr_dos, corr_dc) corr_dos: (num_steps,) complex128 array dimensionless DOS correlation function corr_dc: (2, num_eng, num_steps_dc) complex128 array DC conductivity correlation function in e^2/hbar^2 * (eV)^2 * nm^2 in accordance with config.dckb_energies.
Calculate correlation function of density of states (DOS). :return: (num_steps+1, ) complex128 array dimensionless DOS correlation function.
Calculate correlation function of dynamical polarization. :return: (num_qpt, num_steps) float64 array dimensionless Dynamical polarization correlation function.
Calculate Hall conductivity according to Kubo-Bastin formula.
Calculate local density of states (LDOS) using Haydock recursion method.
Calculate squared quasi-eigenstates. :return: (num_qe, num_orb) float64 array Each row is a squared quasi-eigenstate at energy of config.qe_energies.
calc_wft
()Calculate propagation of wave function from given initial state. :return: (num_time, num_orb) complex128 array Each row is time-dependent wave function at config.wft_time_save.
Attributes
Wrapper for determine the master process for compatibility.
- __init__(model: PrimitiveCell | Sample, echo_details: bool = True) None
- Parameters:
model – model for which TBPM calculations will be performed
echo_details – whether to output parallelization details
- calc_corr_ac_cond() ndarray
Calculate correlation function of optical (AC) conductivity. :return: (4, num_steps) complex128 array
AC correlation function along xx, yx, xy, yy directions Unit is e^2/hbar^2 * (eV)^2 * nm^2.
- calc_corr_bands() Tuple[ndarray, ndarray]
Calculate correlation function of band structure. :return: (k_len, corr_bands)
k_len: (num_kpt,) float64 array length of k-path in 1/nm corr_bands: (num_kpt, num_steps+1) complex128 array correlation functions for each k-point
- calc_corr_dc_cond() Tuple[ndarray, ndarray]
Calculate correlation function of electronic (DC) conductivity. :return: (corr_dos, corr_dc)
corr_dos: (num_steps,) complex128 array dimensionless DOS correlation function corr_dc: (2, num_eng, num_steps_dc) complex128 array DC conductivity correlation function in e^2/hbar^2 * (eV)^2 * nm^2 in accordance with config.dckb_energies.
- calc_corr_dos() ndarray
Calculate correlation function of density of states (DOS). :return: (num_steps+1, ) complex128 array
dimensionless DOS correlation function
- calc_corr_dyn_pol() ndarray
Calculate correlation function of dynamical polarization. :return: (num_qpt, num_steps) float64 array
dimensionless Dynamical polarization correlation function.
- calc_hall_cond() Tuple[ndarray, ndarray]
Calculate Hall conductivity according to Kubo-Bastin formula.
Reference: https://journals.aps.org/prl/pdf/10.1103/PhysRevLett.114.116602
The unit of hall_cond in 2d case from eqn. 1 of the reference follows: [hall_cond] = [hbar*e^2/Omega] * [dE * Trace<…>]
= hbar*e^2/nm^2 * 1/eV * nm^2/hbar^2 * eV = e^2/hbar
which is consistent with AC and DC conductivity. Note that the delta function in the formula has the unit of 1/eV.
The unit can also be determined from enq. 4 as: [hall_cond] = [e^2*hbar/(Omega*delaE^2)] * [mu]
= hbar/(nm^2*V^2) * nm^2 * (eV)^2 / hbar^2 = e^2/hbar
Note that the scaled energy is dimensionless.
- Returns:
(energies, conductivity) energies: (num_eng, ) float64 array chemical potentials specified in config.dckb_energies conductivity: (num_eng, ) float64 array Hall conductivity according to energies
- calc_ldos_haydock() Tuple[ndarray, ndarray]
Calculate local density of states (LDOS) using Haydock recursion method.
CAUTION: this method works for only one site. Although it can be adopted to deal with multiple sites, the time usage will be unaffordable. Use TBPM instead if you want to calculate LDOS for multiple sites.
Ref: https://journals.jps.jp/doi/10.1143/JPSJ.80.054710
- Returns:
(energies, ldos) energies: (2*num_steps+1, ) float64 array energies in eV ldos: (2*num_steps+1, ) float64 array LDOS value to corresponding energies in 1/eV
- calc_quasi_eigenstates() ndarray
Calculate squared quasi-eigenstates. :return: (num_qe, num_orb) float64 array
Each row is a squared quasi-eigenstate at energy of config.qe_energies.
- calc_wft() ndarray
Calculate propagation of wave function from given initial state. :return: (num_time, num_orb) complex128 array
Each row is time-dependent wave function at config.wft_time_save.
- __weakref__
list of weak references to the object
- property is_master: bool
Wrapper for determine the master process for compatibility.