tbplas.RegularOrbitalMapVac

class tbplas.RegularOrbitalMapVac(dim: ndarray, num_orb_pc: int, vac_id_sc: ndarray, orb_id_pc: ndarray)

Similar to RegularOrbitalMap, but can handle cases with vacancies.

_dim

dimension of the supercell along a, b, and c directions

Type:

(3, ) int32 array

_num_orb_pc

number of orbitals in primitive cell

Type:

int

_vac_id_sc

indices of vacancies in supercell representation

Type:

(num_vac,) int64 array

_orb_id_pc

indices of orbitals in primitive cell representation

Type:

(num_orb_sc, 4) int32 array

__init__(dim: ndarray, num_orb_pc: int, vac_id_sc: ndarray, orb_id_pc: ndarray) None

NOTE: Currently, this class is applied in SuperCell class only. It is assumed this class will check the parameters passed to this class. No assertions will be made here. :param dim: dimension of the supercell along a, b and c directions :param num_orb_pc: number of orbitals in primitive cell :param vac_id_sc: indices of vacancies in sc representation :param orb_id_pc: indices of orbitals in pr representation

Methods

__init__(dim, num_orb_pc, vac_id_sc, orb_id_pc)

NOTE: Currently, this class is applied in SuperCell class only.

pc2sc(id_pc)

Convert orbital (NOT VACANCY) index from pc representation to sc representation.

pc2sc_array(id_pc_array)

Convert an array of orbital (NOT VACANCY) indices from pc representation to sc representation. :param id_pc_array: (num_orb, 4) int32 array or list of id_pc_t orbital indices in primitive cell representation :return: (num_orb, ) int64 array orbital indices in supercell representation.

sc2pc(id_sc)

Convert orbital (NOT VACANCY) index from sc representation to pc representation.

sc2pc_array(id_sc_array)

Convert an array of orbital (NOT VACANCY) indices from sc representation to pc representation. :param id_sc_array: (num_orb, ) int64 array or list of int64 orbital indices in supercell representation :return: (num_orb, 4) int32 array orbital indices in primitive cell representation.

__init__(dim: ndarray, num_orb_pc: int, vac_id_sc: ndarray, orb_id_pc: ndarray) None

NOTE: Currently, this class is applied in SuperCell class only. It is assumed this class will check the parameters passed to this class. No assertions will be made here. :param dim: dimension of the supercell along a, b and c directions :param num_orb_pc: number of orbitals in primitive cell :param vac_id_sc: indices of vacancies in sc representation :param orb_id_pc: indices of orbitals in pr representation

pc2sc(id_pc: Tuple[int, int, int, int] | ndarray) int

Convert orbital (NOT VACANCY) index from pc representation to sc representation.

NOTE: This method is safe, but EXTREMELY SLOW. If you are going to call this method many times, use orb_id_pc2sc_array instead.

Parameters:

id_pc – (ia, ib, ic, io), or equivalent int32 array index of orbital in primitive cell representation

Returns:

index of orbital in supercell representation

pc2sc_array(id_pc_array: ndarray | List[Tuple[int, int, int, int]]) ndarray

Convert an array of orbital (NOT VACANCY) indices from pc representation to sc representation. :param id_pc_array: (num_orb, 4) int32 array or list of id_pc_t

orbital indices in primitive cell representation

Returns:

(num_orb, ) int64 array orbital indices in supercell representation

sc2pc(id_sc: int) Tuple[int, int, int, int]

Convert orbital (NOT VACANCY) index from sc representation to pc representation.

NOTE: This method is safe, but EXTREMELY SLOW. If you are going to call this method many times, use orb_id_sc2pc_array instead.

Parameters:

id_sc – index of orbital in supercell representation

Returns:

index of orbital in primitive cell representation

sc2pc_array(id_sc_array: ndarray | List[int]) ndarray

Convert an array of orbital (NOT VACANCY) indices from sc representation to pc representation. :param id_sc_array: (num_orb, ) int64 array or list of int64

orbital indices in supercell representation

Returns:

(num_orb, 4) int32 array orbital indices in primitive cell representation

__weakref__

list of weak references to the object