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 functions i and j. In addition, iterating through an AtomicInteraction object yields the underlying WannierInteraction objects stored in the sub_interactions field.

Attributes:
iint

The index identifying atom i.

jint

The index identifying atom j.

symbol_istr

The elemental symbol for atom i.

symbol_jstr

The elemental symbol for atom j.

tagstr

Generate 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_matrixndarray of float or None, optional

The DOS matrix associated with the interacting atoms. Defaults to None.

wohpndarray of float or None, optional

The WOHP associated with the interacting atoms. Defaults to None.

wobindarray of float or None, optional

The WOBI associated with the interacting atoms. Defaults to None.

iwohpfloat or ndarray of float or None, optional

The IWOHP (integrated WOHP) associated with the interacting atoms. Defaults to None.

iwobifloat or ndarray of float or None, optional

The IWOBI (integrated WOBI) associated with the interacting atoms. Defaults to None.

populationfloat or ndarray of float or None, optional

The population (integrated DOS matrix) associated with the interacting atoms. Defaults to None.

chargefloat or ndarray of float or None, 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).

Methods

with_integrals(energies, mu[, ...])

Return a new AtomicInteraction object with integrated descriptors.

with_summed_descriptors()

Return a new AtomicInteraction object with summed DOS matrices, WOHPs and WOBIs.

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 DescriptorCalculator class.

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.