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
dhisNoneand 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
- 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
dhisNoneand 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_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_mRyThe DM vector, but in mRy.
D_meVThe DM vector, but in meV.
J_S_mRyThe symmetric part of the exchange tensor, but in mRy.
J_S_meVThe symmetric part of the exchange tensor, but in meV.
J_iso_mRyThe isotropic exchange, but in mRy.
J_iso_meVThe isotropic exchange, but in meV.
J_mRyThe exchange tensor, but in mRy.
J_meVThe exchange tensor, but in meV.
SBI1Spin box indices of the first magnetic entity.
SBI2Spin box indices of the second magnetic entity.
SBS1Spin box size of the first magnetic entity.
SBS2Spin box size of the second magnetic entity.
cellUnit cell of the system.
distanceDistance of the magnetic entities.
energies_mRyThe energies, but in mRy.
energies_meVThe energies, but in meV.
number_of_pairssupercell_shift_xyzSupercell shift in Angstrom.
tagsTags of the magnetic entities.
xyzCoordinates of the magnetic entities.
xyz_centerCenter coordinates of the magnetic entities.