Reference

Calculation and Parser classes

calcjobaiida_wannier90.calculations.Wannier90Calculation

Plugin for Wannier90, a code for computing maximally-localized Wannier functions. See http://www.wannier.org/ for more details.

Inputs:

  • code, Code, required – The Code to use for this job.
  • kpoint_path, Dict, optional – Description of the kpoints-path to be used for bands interpolation; it should contain two properties: a list ‘path’ of length-2 tuples with the labels of the endpoints of the path; and a dictionary ‘point_coords’ giving the scaled coordinates for each high-symmetry endpoint
  • kpoints, KpointsData, required – k-point mesh used in the NSCF calculation
  • local_input_folder, FolderData, optional – Get input files (.amn, .mmn, …) from a FolderData stored in the AiiDA repository
  • metadata, Namespace
    Namespace Ports
    • call_link_label, str, optional, non_db – The label to use for the CALL link if the process is called by another process.
    • computer, Computer, optional, non_db – When using a “local” code, set the computer on which the calculation should be run.
    • description, str, optional, non_db – Description to set on the process node.
    • dry_run, bool, optional, non_db – When set to True will prepare the calculation job for submission but not actually launch it.
    • label, str, optional, non_db – Label to set on the process node.
    • options, Namespace
      Namespace Ports
      • account, str, optional, non_db – Set the account to use in for the queue on the remote computer
      • append_text, str, optional, non_db – Set the calculation-specific append text, which is going to be appended in the scheduler-job script, just after the code execution
      • custom_scheduler_commands, str, optional, non_db – Set a (possibly multiline) string with the commands that the user wants to manually set for the scheduler. The difference of this option with respect to the prepend_text is the position in the scheduler submission file where such text is inserted: with this option, the string is inserted before any non-scheduler command
      • environment_variables, dict, optional, non_db – Set a dictionary of custom environment variables for this calculation
      • import_sys_environment, bool, optional, non_db – If set to true, the submission script will load the system environment variables
      • input_filename, (str), optional, non_db
      • max_memory_kb, int, optional, non_db – Set the maximum memory (in KiloBytes) to be asked to the scheduler
      • max_wallclock_seconds, int, optional, non_db – Set the wallclock in seconds asked to the scheduler
      • mpirun_extra_params, (list, tuple), optional, non_db – Set the extra params to pass to the mpirun (or equivalent) command after the one provided in computer.mpirun_command. Example: mpirun -np 8 extra_params[0] extra_params[1] … exec.x
      • output_filename, (str), optional, non_db
      • parser_name, (str), optional, non_db
      • prepend_text, str, optional, non_db – Set the calculation-specific prepend text, which is going to be prepended in the scheduler-job script, just before the code execution
      • priority, str, optional, non_db – Set the priority of the job to be queued
      • qos, str, optional, non_db – Set the quality of service to use in for the queue on the remote computer
      • queue_name, str, optional, non_db – Set the name of the queue on the remote computer
      • resources, dict, required, non_db – Set the dictionary of resources to be used by the scheduler plugin, like the number of nodes, cpus etc. This dictionary is scheduler-plugin dependent. Look at the documentation of the scheduler for more details.
      • scheduler_stderr, str, optional, non_db – Filename to which the content of stderr of the scheduler will be written.
      • scheduler_stdout, str, optional, non_db – Filename to which the content of stdout of the scheduler will be written.
      • withmpi, bool, optional, non_db
    • store_provenance, bool, optional, non_db – If set to False provenance will not be stored in the database.
  • parameters, Dict, required – Input parameters for the Wannier90 code
  • projections, (OrbitalData, Dict, List), optional – Starting projections for the Wannierisation procedure
  • remote_input_folder, RemoteData, optional – Get input files (.amn, .mmn, …) from a RemoteData possibly stored in a remote computer
  • settings, Dict, optional –

    Additional settings to manage the Wannier90 calculation.

    It can contain the following keys:

    General options:

    • random_projections: Enables using random projections if

      or not enough projections are defined.

    • postproc_setup: Use Wannier90 in ‘postproc_setup’ mode.

      This affects which input and output files are expected.

    File handling options:

    • additional_remote_symlink_list: List of custom files to

      link on the remote.

    • additional_remote_copy_list: List of custom files to

      copy from a source on the remote.

    • additional_local_copy_list: List of custom files to copy

      from a local source.

    • additional_retrieve_list: List of additional filenames

      to be retrieved.

    • exclude_retrieve_list: List of filename patterns to

      exclude from retrieving. Does not affect files listed in additional_retrieve_list.

  • structure, StructureData, required – input crystal structure

Outputs:

  • interpolated_bands, BandsData, optional – The interpolated band structure by Wannier90 (if any).
  • nnkp_file, SinglefileData, optional – The SEEDAME.nnkp file, produced only in -pp (postproc) mode.
  • output_parameters, Dict, required – The output_parameters output node of the successful calculation.
  • remote_folder, RemoteData, required – Input files necessary to run the process will be stored in this folder node.
  • retrieved, FolderData, required – Files that are retrieved by the daemon will be stored in this node. By default the stdout and stderr of the scheduler will be added, but one can add more by specifying them in CalcInfo.retrieve_list.

class aiida_wannier90.parsers.Wannier90Parser(node)[source]

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)[source]

Write input to a .win file.

Parameters

Creating OrbitalData instances

aiida_wannier90.orbitals.generate_projections(list_of_projection_dicts, structure)[source]

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_list both use 0 indexing as opposed to 1 indexing, effectively meaning that both should be offset by 1. E.g. an orbital with ang_mtm_l_list 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_list 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_list our out of sync with their radial_nodes, angular_momentum counterparts. Specifically, radial and ang_mtm_mr_list 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_list or ang_mtm_mr_list (See ang_mtm_l_list and ang_mtm_mr_list)

  • ang_mtm_l_list – angular momentum (either an integer or a list), if ang_mtm_mr_list is not specified will return all orbitals associated with it (angular_momentum)

  • ang_mtm_mr_list – magnetic angular momentum number must be specified along with ang_mtm_l_list (magnetic_number + 1).Note that if this is specified, ang_mtm_l_list must be an integer and not a list

  • 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)