API Reference
|
Class for analyzing correlation functions. |
|
Berry curvature and Chern number calculator. |
|
Data class of Berry connection and curvature. |
|
Sample with attributes loaded from disk. |
|
|
Class for representing Diagonalization parameters. |
|
|
Base class for solvers based on exact diagonalization. |
Helper class for converting orbital indices between pc and sc representations in general cases. |
|
|
Class for holding hopping terms in matrix form, reserved for compatibility with old version of TBPlaS. |
|
Container of parameters produced by TBPM calculations. |
|
Lindhard function calculator. |
|
Wrapper over MPI4PY APIs. |
|
Exception for a non-existing Hopping term. |
|
Class for holding hopping terms between different primitive cells in hetero-structure. |
|
Class for fitting on-site energies and hopping parameters to reference band data. |
|
Class for representing the primitive cell. |
|
Class for reporting the progress for a time-consuming task. |
|
Similar to GeneralOrbitalMap, but the orbitals are generated using a 4-fold loops over dim_a, dim_b, dim_c and num_orb_pc. |
|
Similar to RegularOrbitalMap, but can handle cases with vacancies. |
|
Container class for hopping terms between different supercells within the sample. |
|
Class for evaluating hopping integrals using Slater-Koster formula. |
|
Class for evaluating spin-orbital coupling terms. |
|
Hard-coded spin-orbital coupling term table, generated using the 'print_soc_table' method of 'SOC' class. |
Hard-coded spin-orbital coupling term table, taking from https://journals.aps.org/prb/abstract/10.1103/PhysRevB.82.245412 |
|
|
Combination of SuperCell and SCInterHopping. |
|
Data class of spin texture. |
|
Spin texture calculator. |
|
Class for representing a supercell from which the sample is constructed. |
Class for representing TBPM parameters. |
|
|
Wrapper class over C++ TBPM subroutines. |
|
Helper class that makes unittest easier. |
|
Class for measuring the time usage of function calls within programs. |
|
Class for quick data visualization. |
|
Class for evaluating the Z2 topological invariant. |
|
Function for quick calculation of band structure. |
|
Function for quick calculation of dos. |
|
Convert Cartesian coordinates to fractional coordinates. :param lat_vec: (3, 3) float64 array Cartesian coordinates of lattice vectors, with each ROW being a vector :param cart_coord: (num_coord, 3) float64 array Cartesian coordinates to convert :param origin: (3, ) float64 array Cartesian coordinate of lattice origin :return: (num_coord, 3) float64 array fractional coordinates in basis of lattice vectors. |
|
Convert a single Cartesian coordinate to fractional. :param lat_vec: (3, 3) float64 array Cartesian coordinates of lattice vectors, with each ROW being a vector :param cart_coord: (3, ) float64 array Cartesian coordinate to convert :param origin: (3, ) float64 array Cartesian coordinate of lattice origin :return: (3, ) float64 array fractional coordinate in basis of lattice vectors. |
|
Extend primitive cell along a, b and c directions. |
|
Find neighbours between the (0, 0, 0) cell of model_bra and nearby cells of cell_ket up to given cutoff distance. |
|
Convert matrix with only one ROW or COLUMN to a ROW vector. :param data: (1, num_col) or (num_row, 1) array matrix to convert :return: (num_col, ) or (num_row, ) vector. |
|
Convert fractional coordinates to Cartesian coordinates. :param lat_vec: (3, 3) float64 array Cartesian coordinates of lattice vectors, with each ROW being a vector :param frac_coord: (num_coord, 3) float64 array fractional coordinates to convert in basis of lattice vectors :param origin: (3, ) float64 array Cartesian coordinate of lattice origin :return: (num_coord, 3) float64 array Cartesian coordinates converted from fractional coordinates. |
|
Convert a single fractional coordinate to Cartesian. :param lat_vec: (3, 3) float64 array Cartesian coordinates of lattice vectors, with each ROW being a vector :param frac_coord: (3, ) float64 array fractional coordinate to convert in basis of lattice vectors :param origin: (3, ) float64 array Cartesian coordinate of lattice origin :return: (3, ) float64 array Cartesian coordinate converted from fractional coordinate. |
|
Convert k_path generated by gen_path into distances in reciprocal space. :param lat_vec: (3, 3) float64 array Cartesian coordinates of lattice vectors, with each ROW being a vector :param kpoints: (nk, 3) float64 array fractional coordinates of kpoints :return: (nk, ) float64 array distance in reciprocal space in unit of reciprocal lattice vectors. |
|
Generate uniform mesh grid in the first Brillouin zone. :param grid_size: (na, nb, nc) dimension of mesh grid along three directions :return: (na*nb*nc, 3) float64 array fractional coordinates of kpoints in the grid. |
|
Generate path in the reciprocal space connecting highly symmetric k-points. :param hs_kpoints: (nk, 3) float64 array fractional coordinates of highly symmetric k-points :param num_interp: (nk-1, ) tuple of integers numbers of intermediate k-points between two highly symmetric k-points :return: (kpath, hs_index) kpath: (sum(num_interp)+1, 3) float64 array fractional coordinates of k-points along the path hs_index: (nk, ) int32 array indices of highly symmetric k-points in kpath. |
|
Generate lattice vectors from given lattice parameters. |
|
Generate reciprocal lattice vectors from real-space lattice vectors. |
|
Generate a list of random numbers from /dev/urandom as seeds for Python random number generator. |
|
Return current date and time. |
|
Calculate the area along given direction. :param lat_vec: (3, 3) float64 array Cartesian coordinates of lattice vectors, with each ROW being a vector :param direction: direction along which the area is evaluated, should be in ("a", "b", "c") :return: area along given direction in squared unit of lattice vectors. |
|
Calculate the volume formed by lattice vectors. :param lat_vec: (3, 3) float64 array Cartesian coordinates of lattice vectors, with each ROW being a vector :return: lattice volume in cubic unit of lattice vectors. |
|
Get the indices of quasi-eigenstates in energies, for calculating and analyzing DC conductivity. :param config: 'Config' instance parameters controlling TBPM calculation :param energies: (num_eng,) float64 array energies corresponding to TBPM steps, for indexing the quasi-eigenstates :return: indices of the quasi-eigenstates. |
|
Load a double complex matrix from hdf5 file. |
|
Load a double matrix from hdf5 file. |
|
Repack all h5 files under given directory. |
|
Repack h5 file after shrinking dataset to free disk usage. |
|
Load AC Conductivity from file. :param prefix: prefix of data file :param data_name: name of data file :return: (omegas, ac_cond) omegas: (num_omega,) float64 array energies in eV ac_cond: (num_omega,) complex128 array AC conductivity in e**2/(hbar*nm) in 3d case and e**2/hbar in 2d case. |
|
Load band structure. :param prefix: prefix of data file :param data_name: name of data file :return: (k_len, bands) k_len: (num_kpt,) float64 array, length of k-path bands: (num_kpt, num_bands) float64 array, band structure. |
|
Load Berry curvature. :param prefix: prefix of data files :param data_name: name of data file :return: (kpt_cart, bands, omega_xy) kpt_cart: (num_kpt, 3) float64 array Cartesian coordinates of k-points bands: (num_kpt, num_states) float64 array energies in eV omega_xy: (num_kpt, num_states) float64 array Berry curvature in NM^2. |
|
Load AC Conductivity correlation function. :param prefix: prefix of data file :param data_name: name of data file :return: (4, num_steps) complex128 array AC correlation function along xx, yx, xy, yy directions Unit is e^2/h_bar^2 * (eV)^2 * nm^2. |
|
Load band structure correlation function. :param prefix: prefix of data file :param data_name: name of data file :return: (k_len, corr_bands) k_len: (num_kpt, ) float64 array length of kpath in 1/nm corr_bands: (num_kpt, num_steps+1) complex128 array correlation for each k-point. |
|
Load DC conductivity correlation function. :param prefix: prefix of data file :param data_name: name of data file :return: (corr_dos, corr_dc_cond) corr_dos: (num_steps,) complex128 array dimensionless DOS correlation function corr_dc_cond: (2, num_eng, num_steps_dc) complex128 array DC conductivity correlation function in e^2/h_bar^2 * (eV)^2 * nm^2 in accordance with config.dckb_energies. |
|
Load DOS correlation function. :param prefix: prefix of data file :param data_name: name of data file :return: (num_steps+1, ) complex128 array dimensionless DOS correlation function. |
|
Load dynamic polarizability correlation function. :param prefix: prefix of data file :param data_name: name of data file :return: (num_qpt, num_steps) float64 array dimensionless Dynamical polarization correlation function. |
|
Load DOS. :param prefix: prefix of data file :param data_name: name of data file :return: (energies, dos) energies: (num_eng,) float64 array energies determined by e_min, e_max and e_step dos: (num_eng,) float64 array density of states in states/eV. |
|
Load dynamic polarizability from file. :param prefix: prefix of data file :param data_name: name of data file :return: (omegas, dyn_pol) omegas: (num_omega,) float64 array energies in eV dyn_pol: (num_qpt, num_omega) complex128 array dynamic polarizability in 1/(eV*nm**2) or 1/(eV*nm**3). |
|
Load dielectric function from file. :param prefix: prefix of data file :param data_name: name of data file :return: (omegas, epsilon) omegas: (num_omega,) float64 array energies in eV epsilon: (num_qpt, num_omega) complex128 array relative dielectric function. |
|
Load LDOS data produced by Haydock method. :param prefix: prefix of data file :param data_name: name of data file :return: (energies, conductivity) energies: (num_eng, ) float64 array chemical potentials specified in config.dckb_energies conductivity: (num_eng, ) float64 array Hall conductivity according to energies. |
|
Load LDOS data produced by Haydock method. :param prefix: prefix of data file :param data_name: name of data file :return: (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. |
|
Load squared quasi-eigenstates. :param prefix: prefix of data file :param data_name: name of data file :return: (num_qe, num_orb) float64 array Each row is a squared quasi-eigenstate at energy of config.qe_energies. |
|
Load spin data. :param prefix: prefix of data files :param data_name: name of data file :return: (kpt_cart, bands, sigma_x, sigma_y, sigma_z) kpt_cart: (num_kpt, 3) bands: (num_kpt, num_states) sigma_* (num_kpt, num_states). |
|
Load eigenvalues and eigenstates. :param prefix: prefix of data files :return: (bands, states) bands: (num_kpt, num_bands) float64 array band structure states: (num_kpt, num_bands, num_orb) complex128 array eigenstates at each k-point, with each ROW being a state. |
|
Load wave function. :param prefix: prefix of data file :param data_name: name of data file :return: (num_time, num_orb) complex128 array Each row is time-dependent wave function at config.wft_time_save. |
|
Load Z2 data. :param prefix: prefix of data file :param data_name: name of data file :return: (kb_array, phases) kb_array: (num_kb,) float64 array FRACTIONAL coordinates of the loop along b-axis phases: (num_kpt, num_occ) float64 array phases of WF centers. |
|
Make antimonene primitive cell. |
Make bilayer bismuth primitive cell. |
|
Make black phosphorus primitive cell. |
|
|
Make graphene primitive cell in diamond shape. |
|
Make graphene cell in rectangular shape. |
|
Set up the primitive cell of graphene according to Kane-Mele model. |
|
Make 8-band graphene primitive cell. |
|
Make one layer in the hetero-structure by reshaping primitive cell to given lattice vectors. :param prim_cell: primitive cell of the layer :param hetero_lattice: (3, 3) float64 array Cartesian coordinates of hetero-structure lattice vectors in NANOMETER :param kwargs: arguments for 'reshape_prim_cell' :return: layer in the hetero-structure. |
Make MoS2 primitive cell with SOC. |
|
|
Make TMDC primitive cell. |
|
Merge primitive cells and inter-hopping dictionaries to build a large primitive cell. :param args: primitive cells and inter-hopping terms within the large primitive cell :return: merged primitive cell. |
Finalize MPI environment. |
|
Initialize MPI environment. |
|
|
Load a double complex matrix from text file. |
|
Load a double matrix from text file. |
|
Print a banner like #----------------------------------# # FOO # #----------------------------------# to stdout. |
|
Print a banner like '#--------------- FOO ---------------#' to stdout. |
|
Reshape primitive cell to given lattice vectors. :param prim_cell: primitive cell from which the reshaped cell is constructed :param lat_frac: (3, 3) float64 array FRACTIONAL coordinates of lattice vectors of reshaped cell in basis vectors of primitive cell :param delta: small displacement added to orbital positions such that orbitals fall on cell borders will not be clipped :return: reshaped cell. |
|
Rotate Cartesian coordinates according to Euler angles. |
|
Rotate and shift primitive cell with respect to z-axis, reserved for compatibility. :param prim_cell: primitive cell to twist :param angle: twisting angle in RADIANs, NOT degrees :param center: (3, ) float64 array Cartesian coordinates of the rotation center in NANOMETER :param shift: distance of shift in NANOMETER :return: None. |
|
Split given list into different groups. |
|
Split range(n_max) into different groups. |
|
Create primitive cell from output of Wannier90. :param seed_name: seed_name of Wannier90 output files :param correct_hop: whether to correct hopping terms using data in seed_name_wsvec.dat :param hop_eng_cutoff: energy cutoff for hopping terms in eV Hopping terms with energy below this threshold will be dropped. :return: primitive cell created from Wannier90 output files :raise FileNotFoundError: if seed_name_wsvec.dat is not found. |
|
Exponential window function. |
|
Exponential window function with base 10. |
|
Hanning window function. |
|
Write key, value pairs to file. |