fplore.files package¶
Submodules¶
fplore.files.band module¶
- class fplore.files.band.Band(filepath, run=None)[source]¶
-
- classmethod apply_symmetry(data, symm_ops, basis=None)[source]¶
Applies the given symmetry operations to the k-space coordinates in data and returns a structured array with fields k and idx.
k is the coordinate of the band data in k-space. ìdx is an index of data, where the band data equivalent to k can be found.
basis is a 3x3 matrix that is used to transform the k-space to a different basis in which the symmetry operations are applied. TODO: apply to operators instead, since typically they are fewer
- property data¶
Returns the raw band data plus k-coordinates (if possible)
- get_interpolator(data=None, kind=None, bands=None)[source]¶
Returns an interpolator that accepts sampling points of shape (…, 3) and returns energy levels of shape (…, n_e).
If the sampling points span a rectilinear grid in cartesian coords, a rectilinear interpolator is returned. Otherwise, a triangulated interpolator is returned.
- property interpolator¶
Default interpolator from Band.get_interpolator()
- ksamp_idx_map(ksamp_lattice)[source]¶
dict : ijk k-sample lattice coordinates in basis parallelepiped -> unique idx
- property padded_symm_data¶
- reshape_gridded_data(data='padded_symm', missing_coords_strategy='backfold')[source]¶
Tries to detect if the band data coordinates form a regular, rectangular grid, and returns the band data indexes reshaped to that grid.
- static smooth_overlap(arr_e, e=0.0, scale=0.02, axis=2, weights=None)[source]¶
Calculates the Gaussian overlap of the energy levels in arr_e with the Fermi level or desired energy level e. Useful for generating smooth Fermi surface pseudospectra.
- Parameters:
arr_e – array containing energy levels of shape (…, n_e)
e – energy level to calculate overlap for (default: 0)
scale – scale of the gaussian (default: 0.02)
axis – extra axis or tuple of axes along which the energy levels are summed (default: -1)
weights – weights for each energy level, should have shape compatible with e_k_3d (default: None)
- property symm_data¶
Returns the band data folded back to the first BZ and applies symmetry operations. Returns an index array to reduce memory usage.
- property weights¶
- class fplore.files.band.BandBase[source]¶
Bases:
object
- class fplore.files.band.BandWeights(filepath, run=None)[source]¶
-
- property data¶
- property labels¶
- property orbitals¶
- class fplore.files.band.Hamiltonian(filepath, run=None)[source]¶
Bases:
FPLOFile
- property RTG¶
- property RTG_raw¶
- property centering¶
- property centering_raw¶
- static cluster_diag(Hcluster, n_center, transform_center=None)[source]¶
Return cluster Hamiltonian in symmetry adapted basis, i.e. transforming the basis to make the interaction between the central ion and the ligands as diagonal as possible.
- Parameters:
Hcluster – cluster Hamiltonian matrix
n_center – number of orbitals on central ion (has to be first in cluster)
transform_center – if True, allow also for a unitary transformation of the cluster center site True or ‘interaction’: SVD decomposition, interaction diagonal False: polar decomposition, no transformation of center, interaction matrix at least symmetric ‘local’: polar decomposition plus transformation of center site to diagonalize local Hamiltonian
- Return Hcluster:
cluster Hamiltonian matrix in symmetry adapted basis
- Return U:
unitary transformation matrix
- cluster_matrix(loc_center=(0, 0, 0), radius=4.0)[source]¶
Return the Hamiltonian matrix of just the cluster (within radius) around loc_center including all intra-cluster hopping.
- Parameters:
loc_center – location of the center of the cluster (element of self.wancenters)
radius – radius of the cluster in Bohr radii (default 4.0)
- Return cluster_matrix:
Hamiltonian matrix of hopping within the cluster blocks sorted by cluster_loc key order, intra-block sorted by cluster_idx key order
- Return cluster_loc:
cluster definition dictionary mapping cluster locations to corresponding Wannier site index
- Return cluster_idx:
Wannier site definition dictionary mapping Wannier site index to contained Wannier orbital indices (self.wannames/self.wancenters)
- Return uidx:
inverse of cluster_idx array mapping Wannier orbital indices (self.wannames/self.wancenters) to cluster_idx keys
Note: written assuming atomically centered Wannier functions. No guarantees what the output is otherwise.
- property data¶
- property data_raw¶
- property fullrelativistic¶
- property fullrelativistic_raw¶
- property have_spin_info¶
- property have_spin_info_raw¶
- property lattice_vectors¶
- property lattice_vectors_raw¶
- property nspin¶
- property nspin_raw¶
- property nwan¶
- property nwan_raw¶
- property symmetry_raw¶
- property wancenters¶
- property wancenters_raw¶
- property wannames¶
- property wannames_raw¶
fplore.files.base module¶
- class fplore.files.base.FPLOFile(filepath, run=None)[source]¶
Bases:
object
- is_loaded = False¶
- load_default = False¶
- registry = {'loaders': {'+band': <class 'fplore.files.band.Band'>, '+band_kp': <class 'fplore.files.band.Band'>, '+error': <class 'fplore.files.misc.Error'>, '+hamdata': <class 'fplore.files.band.Hamiltonian'>, '+points': <class 'fplore.files.misc.Points'>, '+run': <class 'fplore.files.misc.Run'>, '=.dens': <class 'fplore.files.misc.Dens'>, '=.in': <class 'fplore.files.misc.InFile'>, '=.sym': <class 'fplore.files.misc.SymFile'>}, 'loaders_re': OrderedDict([(re.compile('\\+bw(eights(lms)?|sum)(_kp)?(_unfold)?'), <class 'fplore.files.band.BandWeights'>), (re.compile('\\+i?l?n?dos\\..+'), <class 'fplore.files.dos.DOS'>)])}¶
fplore.files.config module¶
fplore.files.dos module¶
fplore.files.misc module¶
- class fplore.files.misc.Dens(filepath, run=None)[source]¶
Bases:
FPLOConfig
,FPLOFile
- load_default = False¶
- class fplore.files.misc.Error(filepath, run=None)[source]¶
Bases:
FPLOFile
- load_default = True¶
- property messages¶
- class fplore.files.misc.InFile(filepath, run=None)[source]¶
Bases:
FPLOConfig
,FPLOFile
- class fplore.files.misc.Run(filepath, run=None)[source]¶
Bases:
FPLOFile
- property data¶
- load_default = True¶
- class fplore.files.misc.SymFile(filepath, run=None)[source]¶
Bases:
FPLOConfig
,FPLOFile