# asr.magnetic_anisotropy¶

## Summary¶

This is the documentation for `asr.magnetic_anisotropy`-recipe. This recipe is comprised of a single instruction, namely:

Run this recipe through the CLI interface

```\$ asr run asr.magnetic_anisotropy
```

or as a python module

```\$ python -m asr.magnetic_anisotropy
```

## Detailed description¶

Magnetic anisotropy.

## Steps¶

### asr.magnetic_anisotropy¶

asr.magnetic_anisotropy.main(atoms, calculator={'charge': 0, 'convergence': {'bands': 'CBM+3.0'}, 'kpts': {'density': 12.0, 'gamma': True}, 'mode': {'ecut': 800, 'name': 'pw'}, 'name': 'gpaw', 'nbands': '200%', 'occupations': {'name': 'fermi-dirac', 'width': 0.05}, 'txt': 'gs.txt', 'xc': 'PBE'})[source]

Calculate the magnetic anisotropy.

Uses the magnetic anisotropy to calculate the preferred spin orientation for magnetic (FM/AFM) systems.

Return type

`asr.magnetic_anisotropy.Result`

Returns

• theta (Polar angle in radians)

• phi (Azimuthal angle in radians)

Parameters
class asr.magnetic_anisotropy.Result(E_y, dE_zx, dE_zy, E_z, E_x, phi, spin_axis, theta)[source]
Parameters
property E_x: float

Soc. total energy, x-direction [eV/unit cell]

Return type

`float`

property E_y: float

Soc. total energy, y-direction [eV/unit cell]

Return type

`float`

property E_z: float

Soc. total energy, z-direction [eV/unit cell]

Return type

`float`

property dE_zx: float

Magnetic anisotropy energy between x and z axis [meV/unit cell]

Return type

`float`

property dE_zy: float

Magnetic anisotropy energy between y and z axis [meV/unit cell]

Return type

`float`

property phi: float

Easy axis, polar coordinates, phi [radians]

Return type

`float`

property spin_axis: str

Magnetic easy axis

Return type

`str`

property theta: float

Easy axis, polar coordinates, theta [radians]

Return type

`float`