pengwann.interactions.AtomicInteraction#
- class pengwann.interactions.AtomicInteraction(i, j, symbol_i, symbol_j, sub_interactions, dos_matrix=None, wohp=None, wobi=None, iwohp=None, iwobi=None, population=None, charge=None)#
Data structure regarding the interaction between two atoms.
Within
pengwann, the interaction between two atoms is comprised of the interactions between their respective Wannier functions, hence each AtomicInteraction object is associated with a set of WannierInteraction objects.AtomicInteraction instances can be indexed much like numpy arrays e.g.
atomic_interaction[i, j]will return all of the WannierInteraction objects arising from interactions between Wannier functionsiandj. In addition, iterating through an AtomicInteraction object yields the underlying WannierInteraction objects stored in the sub_interactions field.- Attributes:
- i
int The index identifying atom i.
- j
int The index identifying atom j.
- symbol_i
str The elemental symbol for atom i.
- symbol_j
str The elemental symbol for atom j.
tagstrGenerate a simple string that identifies this particular AtomicInteraction.
- sub_interactions: sequence of WannierInteraction
The WannierInteraction objects concerning the interactions between the atoms’ respective Wannier functions.
- dos_matrix
ndarrayoffloatorNone, optional The DOS matrix associated with the interacting atoms. Defaults to None.
- wohp
ndarrayoffloatorNone, optional The WOHP associated with the interacting atoms. Defaults to None.
- wobi
ndarrayoffloatorNone, optional The WOBI associated with the interacting atoms. Defaults to None.
- iwohp
floatorndarrayoffloatorNone, optional The IWOHP (integrated WOHP) associated with the interacting atoms. Defaults to None.
- iwobi
floatorndarrayoffloatorNone, optional The IWOBI (integrated WOBI) associated with the interacting atoms. Defaults to None.
- population
floatorndarrayoffloatorNone, optional The population (integrated DOS matrix) associated with the interacting atoms. Defaults to None.
- charge
floatorndarrayoffloatorNone, optional The charge associated with the interacting atoms. This yields atomic charges in the conventional sense only when the interacting atoms are identical (i.e. for on-site interactions).
- i
Methods
with_integrals(energies, mu[, ...])Return a new AtomicInteraction object with integrated descriptors.
Return a new AtomicInteraction object with summed DOS matrices, WOHPs and WOBIs.
See also
Notes
It is generally expected that this class will be initialised with solely the information required to specify the interacting atoms, namely the i, j, symbol_i, symbol_j and the sub_interactions. The remaining fields will usually only be set by methods of the
DescriptorCalculatorclass.Examples
To obtain the WannierInteraction between atoms 0 and 1:
>>> wannier_interaction_01 = atomic_interaction[0, 1]
To iterate over all WannierInteraction objects:
>>> for wannier_interaction in atomic_interaction: >>> # Do something for each interaction.
To iterate over all the interactions between Wannier function 0 and any other Wannier function:
>>> for wannier_interaction in atomic_interaction[0]: >>> # Do something for each interaction.