grogupy.physics.Pair

class grogupy.physics.Pair(M1: MagneticEntity, M2: MagneticEntity, supercell_shift: list | ndarray[Any, dtype[_ScalarType_co]] = array([0, 0, 0]))[source]

This class contains the data and the methods related to the pairs of magnetic entities.

It sets up the instance based on the Hamiltonian of the DFT calculation, a pair of MagneticEntities and the supercell shift of the second MagneticEntities, given that the first one is not shifted. By default dh is None and we use the Hamiltonian from the magnetic entities. If the Hamiltonian from the two magnetic entities are different it raises an error.

Parameters

M1: MagneticEntity

The first magnetic entity

M2: MagneticEntity

The second magnetic entity

supercell_shift: Union[list, NDArray]

The integer coordinates of the supercell shift

Examples

The following examples show you how to create pairs in the Fe3GeTe2 system.

>>> fdf_path = "/Users/danielpozsar/Downloads/Fe3GeTe2/Fe3GeTe2.fdf"
>>> Fe3 = MagneticEntity(fdf_path, atom=3, l=2)
>>> Fe5 = MagneticEntity(fdf_path, atom=5, l=2)
>>> pair_of_Fe = Pair(Fe3, Fe5, [0,0,0])
>>> print(pair_of_Fe)
<grogupy.Pair tag1=3Fe(l:2), tag2=5Fe(l:2), Ruc=[0 0 0]>

Methods

calculate_energies(weights) :

Calculates the energies of the infinitesimal rotations.

calculate_exchange_tensor() :

Calculates the exchange tensor from the energies.

fit_exchange_tensor(ref_xcf) :

Fits the exchange tensor to the energies.

copy() :

Return a copy of this Pair

Attributes

dh_ds_id: str

ID of the underlying system so MagneticEntities cannot be mixed between Hamiltonians

M1: MagneticEntity

The first magnetic entity

M2: MagneticEntity

The second magnetic entity

supercell_shift: NDArray

The supercell shift normed by the supercell vectors

cell: NDArray

The supercell vectors

Gij: list

Projected Greens function from M1 to M2

Gji: list

Projected Greens function from M2 to M1

SBS1: int

The SPIN BOX size of M1

SBS2: int

The SPIN BOX size of M2

SBI1: NDArray

The SPIN BOX indices of M1

SBI2: NDArray

The SPIN BOX indices of M2

tags: list[str]

The tags of the two magnetic entities

supercell_shift_xyz: NDArray

The supercell shift in real coordinates

xyz: list[NDArray, NDArray]

The coordinates of the magnetic entity (it can consist of many atoms)

xyz_center: list[NDArray, NDArray]

The center of coordinates for the magnetic entities

distance: float

The distance of the magnetic entities (it uses the center of coordinates for each magnetic entity)

energiesUnion[None, NDArray]

The calculated energies for each direction

self.J_iso: Union[float, None]

Isotropic exchange, by default None

self.J: Union[NDArray, None]

Complete exchange tensor, by default None

self.J_S: Union[NDArray, None]

Symmetric exchange, by default None

self.D: Union[NDArray, None]

Dzyaloshinskii-Morilla vector, by default None

Raises

Exception

Different Hamiltonians from the magnetic entities

__init__(M1: MagneticEntity, M2: MagneticEntity, supercell_shift: list | ndarray[Any, dtype[_ScalarType_co]] = array([0, 0, 0])) None[source]

This class contains the data and the methods related to the pairs of magnetic entities.

It sets up the instance based on the Hamiltonian of the DFT calculation, a pair of MagneticEntities and the supercell shift of the second MagneticEntities, given that the first one is not shifted. By default dh is None and we use the Hamiltonian from the magnetic entities. If the Hamiltonian from the two magnetic entities are different it raises an error.

Parameters

M1: MagneticEntity

The first magnetic entity

M2: MagneticEntity

The second magnetic entity

supercell_shift: Union[list, NDArray]

The integer coordinates of the supercell shift

Examples

The following examples show you how to create pairs in the Fe3GeTe2 system.

>>> fdf_path = "/Users/danielpozsar/Downloads/Fe3GeTe2/Fe3GeTe2.fdf"
>>> Fe3 = MagneticEntity(fdf_path, atom=3, l=2)
>>> Fe5 = MagneticEntity(fdf_path, atom=5, l=2)
>>> pair_of_Fe = Pair(Fe3, Fe5, [0,0,0])
>>> print(pair_of_Fe)
<grogupy.Pair tag1=3Fe(l:2), tag2=5Fe(l:2), Ruc=[0 0 0]>

Methods

__init__(M1, M2[, supercell_shift])

This class contains the data and the methods related to the pairs of magnetic entities.

calculate_energies(weights[, append])

Calculates the energies of the infinitesimal rotations.

calculate_exchange_tensor()

Calculates the exchange tensor from the energies.

calculate_isotropic_biquadratic_only()

Calculates the isotropic and biquadratic isotropic exchange.

calculate_isotropic_only()

Calculates the isotropic exchange only.

copy()

Returns the deepcopy of the instance.

fit_exchange_tensor(ref_xcf)

Fits the exchange tensor to the energies.

reset()

Resets the simulation results of the Pair.

Attributes

D

The DM vector in eV.

D_J

The DM vector, but in J.

D_mRy

The DM vector, but in mRy.

D_meV

The DM vector, but in meV.

J

The exchange tensor, in eV.

J_J

The exchange tensor, but in J.

J_S

The symmetric part of the exchange tensor, in eV.

J_S_J

The symmetric part of the exchange tensor, but in J.

J_S_mRy

The symmetric part of the exchange tensor, but in mRy.

J_S_meV

The symmetric part of the exchange tensor, but in meV.

J_iso

The isotropic exchange, in eV.

J_iso_J

The isotropic exchange, but in J.

J_iso_mRy

The isotropic exchange, but in mRy.

J_iso_meV

The isotropic exchange, but in meV.

J_mRy

The exchange tensor, but in mRy.

J_meV

The exchange tensor, but in meV.

SBI1

Spin box indices of the first magnetic entity.

SBI2

Spin box indices of the second magnetic entity.

SBS1

Spin box size of the first magnetic entity.

SBS2

Spin box size of the second magnetic entity.

dh_ds_id

The ID of the Hamiltonian and the Density Matrix.

distance

Distance of the magnetic entities.

energies_J

The energies, but in J.

energies_mRy

The energies, but in mRy.

energies_meV

The energies, but in meV.

number_of_pairs

supercell_shift_xyz

Supercell shift in Angstrom.

tags

Tags of the magnetic entities.

xyz

Coordinates of the magnetic entities.

xyz_center

Center coordinates of the magnetic entities.