# Reference¶

## Calculation and Parser classes¶

class aiida_wannier90.parsers.Wannier90Parser(calculation)

Wannier90 output parser. Will parse global gauge invarient spread as well as the centers, spreads and, if possible the Imaginary/Real ratio of the wannier functions. Will also check to see if the output converged.

## Helper modules¶

### Writing input files¶

This submodule contains helper functions to create input files.

aiida_wannier90.io.write_win(filename, parameters, kpoints=None, structure=None, kpoint_path=None, projections=None, random_projections=False)

Write input to a .win file.

Parameters: filename (str) – Path of the file where the input is written. parameters (dict, aiida.orm.data.parameter.ParameterData) – Additional input parameters, as specified in the Wannier90 user guide. structure (aiida.orm.data.structure.StructureData) – Structure of the calculated material. kpoints (aiida.orm.data.array.kpoints.KpointsData) – Mesh of k-points used for the Wannierization procedure. kpoint_path (aiida.orm.data.parameter.ParameterData) – List of k-points used for band interpolation. projections (aiida.orm.data.orbital.OrbitalData, aiida.orm.data.base.List[str]) – Orbitals used for the projections. Can be specified either as AiiDA OrbitalData, or as a list of strings specifying the projections in Wannier90’s format. random_projections (aiida.orm.data.base.Bool) – If OrbitalData is used for projections, enables random projections completion

### Creating OrbitalData instances¶

aiida_wannier90.orbitals.generate_projections(list_of_projection_dicts, structure)

Use this method to emulate the input style of wannier90, when setting the orbitals (see chapter 3 in the wannier90 user guide). Position can be provided either in cartesian coordiantes using position_cart or can be assigned based on an input structure and kind_name. Pass a list of dictionaries, in which the keys of each dictionary correspond to those below. Also that radial, and ang_mtm_mr both use 0 indexing as opposed to 1 indexing, effectively meaning that both should be offset by 1. E.g. an orbital with 1 radial node would use radial=2 (wannier90 syntax), and then be converted to radial_nodes=1 (AiiDa plugin syntax) inside the stored orbital.

Note

The key entries used here, may not correspond to the keys used internally by the orbital objects, for example, ang_mtm_mr will be converted to magnetic_number in the orbital object the value stored in orbital is listed in (braces).

Note

To keep in line with python-indexing as much as possible, the values of radial, and ang_mtm_mr our out of sync with their radial_nodes, angular_momentum counterparts. Specifically, radial and ang_mtm_mr both start at 1 while radial_nodes and angular_momentum both start at 0, thus making the two off by a factor of 1.

Parameters: position_cart – position in cartesian coordinates or list of positions in cartesian coordinates (position) kind_name – kind_name, for use with the structure (kind_name) radial – number of radial nodes (radial_nodes + 1) ang_mtm_name – orbital name or list of orbital names, cannot be used in conjunction with ang_mtm_l or ang_mtm_mr (See ang_mtm_l and ang_mtm_mr) ang_mtm_l – angular momentum, if ang_mtm_mr is not specified will return all orbitals associated with it (angular_momentum) ang_mtm_mr – magnetic angular momentum number must be specified along with ang_mtm_l (magnetic_number + 1) spin – the spin, spin up can be specified with 1,u or U and spin down can be specified using -1,d,D (spin) zona – as specified in user guide, applied to all orbitals (diffusivity) zaxis – the zaxis, list of three floats as described in wannier user guide (z_orientation) xaxis – the xaxis, list of three floats as described in the wannier user guide (x_orientation) spin_axis – the spin alignment axis, as described in the user guide (spin_orientation)