API Reference
wannier90io.parse_win_raw(string: str) -> dict
Parse WIN
Parameters:
Name | Type | Description | Default |
---|---|---|---|
string |
str
|
the WIN text |
required |
Returns:
Type | Description |
---|---|
dict
|
the parsed WIN |
Source code in wannier90io/_win.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
|
wannier90io.parse_nnkp_raw(string: str) -> dict
Parse NNKP
Parameters:
Name | Type | Description | Default |
---|---|---|---|
string |
str
|
the NNKP text |
required |
Returns:
Type | Description |
---|---|
dict
|
the parsed NNKP |
Source code in wannier90io/_nnkp.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
|
wannier90io.parse_wout_iteration_info(stream: typing.TextIO) -> dict
Parse WOUT iteration info
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stream |
typing.TextIO
|
a file-like stream |
required |
Returns:
Type | Description |
---|---|
dict
|
the parsed WOUT iteration info |
Source code in wannier90io/_wout.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
wannier90io.read_amn(stream: typing.TextIO) -> np.ndarray
Read projections matrix
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stream |
typing.TextIO
|
a file-like stream |
required |
Returns:
Type | Description |
---|---|
np.ndarray
|
projections matrix (Nk, Nb, Np) |
Source code in wannier90io/_amn.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
wannier90io.write_amn(stream: typing.TextIO, amn: np.ndarray, header: typing.Optional[str] = 'HEADER')
Write projections matrix
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stream |
typing.TextIO
|
a file-like stream |
required |
amn |
np.ndarray
|
projections matrix (Nk, Nb, Np) |
required |
header |
typing.Optional[str]
|
header |
'HEADER'
|
Source code in wannier90io/_amn.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
wannier90io.read_chk(stream: typing.TextIO) -> dict
Read checkpoint
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stream |
typing.TextIO
|
a file-like stream |
required |
Returns:
Type | Description |
---|---|
dict
|
dict |
Source code in wannier90io/_chk.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
wannier90io.read_u(stream: typing.TextIO) -> tuple[np.ndarray, np.ndarray]
Read unitary matrix file (seedname_u.mat) or the rectangular U_dis matrix file (seedname_u_dis.mat).
Note
for the _u.mat file, num_bands == num_wann.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stream |
typing.TextIO
|
a file-like stream |
required |
Returns:
Type | Description |
---|---|
np.ndarray
|
kpoint coordinates in fractional coordinates (num_kpts, 3) |
np.ndarray
|
U matrix U(k) or U_dis(k) (num_kpts, num_bands, num_wann) |
Source code in wannier90io/_u.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|
wannier90io.read_unk_formatted(stream: typing.TextIO) -> tuple[int, np.ndarray]
Read wavefunction files (UNKnnnnn.n files) in formatted format.
Note that the UNK files must have been created using the wvfn_formatted
option set to True in the interface code (e.g. pw2wannier90.x for the
Quantum ESPRESSO interface). Note that this is not the default, however
for reading into an external code, this is recommended for portability.
Note
for now only works in the non-spinor case. Spinor case still to be implemented.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stream |
typing.TextIO
|
a file-like stream |
required |
Returns:
Type | Description |
---|---|
int
|
k-point index ik (integer) |
np.ndarray
|
complex wavefunction (ngx, ngy, ngz, Nb) |
Source code in wannier90io/_unk.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
wannier90io.read_eig(stream: typing.TextIO) -> np.ndarray
Read eigenvalues matrix
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stream |
typing.TextIO
|
a file-like stream |
required |
Returns:
Type | Description |
---|---|
np.ndarray
|
eigenvalues matrix (Nk, Nb) |
Source code in wannier90io/_eig.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
wannier90io.write_eig(stream: typing.TextIO, eig: np.ndarray)
Write eigenvalues matrix
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stream |
typing.TextIO
|
a file-like stream |
required |
eig |
np.ndarray
|
eigenvalues matrix (Nk, Nb) |
required |
Source code in wannier90io/_eig.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
wannier90io.read_mmn(stream: typing.TextIO) -> tuple[np.ndarray, np.ndarray]
Read overlaps matrix
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stream |
typing.TextIO
|
a file-like stream |
required |
Returns:
Type | Description |
---|---|
np.ndarray
|
overlaps matrix (Nk, Nn, Nb, Nb) |
np.ndarray
|
nnkps (Nk, Nn, 5) |
Source code in wannier90io/_mmn.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|