# vaspspn

To interpolate the spin operator expectation value, the matrix
\(s_{mn}({\bf q})=\langle u_{m{\bf q}}\vert\hat{\sigma}\vert u_{n{\bf q}}\rangle\)
is needed. To facilitate study of spin-dependent properties within VASP
code, a submodule wannierberri.utils.vaspspn is
included, which computes \(S_{mn{\bf q}}\) based on the normalized
pseudo-wavefunction read from the `WAVECAR`

file. Note that the use of
pseudo-wavefunction instead of the full PAW (Blöchl 1994) wavefunction
is an approximation, which however in practice gives a rather accurate
interpolation of spin.

An utility to calculate the `.spn`

file for wannier90 from `WAVECAR`

file generated by
VASP.

Computes \(s_{mn}({\bf q})=\langle u_{m{\bf q}}\vert\hat{\sigma}\vert u_{n{\bf q}}\rangle\) based on the normalized
pseudo-wavefunction read from the `WAVECAR`

file.

WARNING : vaspspn uses pseudo-wavefunction instead of the full PAW (Blöchl 1994) wavefunction This approximation usually gives reasonable results for interpolation of spin in non-spin-degenerate materials, but is known to give wrong results for spin hall conductivity in spin-degenerate (preserving P*T symmetry) bandstructures (see Issue #274)

A better alternative is provided by Chengcheng Xiao

usage :

```
python3 -m wannierberri.utils.vaspspn option=value
```

- Options
`-h`- print this help message

- fin
- inputfile name.default: WAVECAR
- fout
- outputfile namedefault: wannier90.spn
- IBstart
- the first band to be considered (counting starts from 1).default: 1
- NB
- number of bands in the output. If NB<=0 all bands are used.default: 0
- norm
- how to normalize the eigenstates, if they are not perfectly orthonormalnorm=norm (D) - normalize each state individuallynorm=none - do not normalize WFs, take as they are.