tbplas.GeneralOrbitalMap
- class tbplas.GeneralOrbitalMap
 Helper class for converting orbital indices between pc and sc representations in general cases.
NOTE: The orbital indices passed to ‘add’ method must not be duplicate. Otherwise, bugs will be definitely raised.
- _id_pc
 orbital indices in pc representation
- Type:
 List[Tuple[int, int, int, int]]
- _id_sc
 map of orbital indices from pc to sc representation
- Type:
 Dict[Tuple[int, int, int, int], int]
- _counter
 counter of the orbitals
- Type:
 int
- __init__() None
 
Methods
__init__()add(id_pc)Add an orbital from index in pc representation.
pc2sc(id_pc)Convert orbital index from pc to sc representation.
sc2pc(id_sc)Convert orbital index from sc to pc representation.
Attributes
Get the current number of orbitals added to the map.
- __init__() None
 
- add(id_pc: Tuple[int, int, int, int]) None
 Add an orbital from index in pc representation. :param id_pc: index of the orbital :return: None
- pc2sc(id_pc: Tuple[int, int, int, int]) int
 Convert orbital index from pc to sc representation. :param id_pc: index of the orbital :return: corresponding index in sc representation
- sc2pc(id_sc: int) Tuple[int, int, int, int]
 Convert orbital index from sc to pc representation. :param id_sc: index of the orbital :return: corresponding index in pc representation
- __weakref__
 list of weak references to the object
- property counter: int
 Get the current number of orbitals added to the map. :return: current counter starting from 0