Reference

Calculation and Parser classes

calcjobaiida_wannier90.calculations.Wannier90Calculation

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

Inputs:

  • bands_kpoints, (KpointsData, NoneType), optional – A list of k-points along a path to be used for bands interpolation; it should contain labels. Specify either this or kpoint_path.
  • code, (AbstractCode, NoneType), optional – The Code to use for this job. This input is required, unless the remote_folder input is specified, which means an existing job is being imported and no code will actually be run.
  • kpoint_path, (Dict, NoneType), optional – Description of the k-points 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, NoneType), optional – Get input files (.amn, .mmn, …) from a class FolderData stored in the AiiDA repository.
  • metadata, Namespace
    Namespace Ports
    • call_link_label, str, optional, is_metadata – The label to use for the CALL link if the process is called by another process.
    • computer, (Computer, NoneType), optional, is_metadata – When using a “local” code, set the computer on which the calculation should be run.
    • description, (str, NoneType), optional, is_metadata – Description to set on the process node.
    • dry_run, bool, optional, is_metadata – When set to True will prepare the calculation job for submission but not actually launch it.
    • label, (str, NoneType), optional, is_metadata – Label to set on the process node.
    • options, Namespace
      Namespace Ports
      • account, (str, NoneType), optional, is_metadata – Set the account to use in for the queue on the remote computer
      • additional_retrieve_list, (list, tuple, NoneType), optional, is_metadata – List of relative file paths that should be retrieved in addition to what the plugin specifies.
      • append_text, str, optional, is_metadata – 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, is_metadata – 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, is_metadata – Set a dictionary of custom environment variables for this calculation
      • environment_variables_double_quotes, bool, optional, is_metadata – If set to True, use double quotes instead of single quotes to escape the environment variables specified in environment_variables.
      • import_sys_environment, bool, optional, is_metadata – If set to true, the submission script will load the system environment variables
      • input_filename, str, optional, is_metadata
      • max_memory_kb, (int, NoneType), optional, is_metadata – Set the maximum memory (in KiloBytes) to be asked to the scheduler
      • max_wallclock_seconds, (int, NoneType), optional, is_metadata – Set the wallclock in seconds asked to the scheduler
      • mpirun_extra_params, (list, tuple), optional, is_metadata – 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, is_metadata
      • parser_name, str, optional, is_metadata
      • prepend_text, str, optional, is_metadata – Set the calculation-specific prepend text, which is going to be prepended in the scheduler-job script, just before the code execution
      • priority, (str, NoneType), optional, is_metadata – Set the priority of the job to be queued
      • qos, (str, NoneType), optional, is_metadata – Set the quality of service to use in for the queue on the remote computer
      • queue_name, (str, NoneType), optional, is_metadata – Set the name of the queue on the remote computer
      • rerunnable, (bool, NoneType), optional, is_metadata – Determines if the calculation can be requeued / rerun.
      • resources, dict, required, is_metadata – 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, is_metadata – Filename to which the content of stderr of the scheduler is written.
      • scheduler_stdout, str, optional, is_metadata – Filename to which the content of stdout of the scheduler is written.
      • stash, Namespace – Optional directives to stash files after the calculation job has completed.
        Namespace Ports
        • source_list, (tuple, list, NoneType), optional, is_metadata – Sequence of relative filepaths representing files in the remote directory that should be stashed.
        • stash_mode, (str, NoneType), optional, is_metadata – Mode with which to perform the stashing, should be value of aiida.common.datastructures.StashMode.
        • target_base, (str, NoneType), optional, is_metadata – The base location to where the files should be stashd. For example, for the copy stash mode, this should be an absolute filepath on the remote computer.
      • submit_script_filename, str, optional, is_metadata – Filename to which the job submission script is written.
      • withmpi, bool, optional, is_metadata
    • store_provenance, bool, optional, is_metadata – If set to False provenance will not be stored in the database.
  • monitors, Namespace – Add monitoring functions that can inspect output files while the job is running and decide to prematurely terminate the job.
  • parameters, Dict, required – Input parameters for the Wannier90 code
  • projections, (OrbitalData, Dict, List, NoneType), optional – Starting projections for the Wannierisation procedure.
  • remote_folder, (RemoteData, NoneType), optional – Remote directory containing the results of an already completed calculation job without AiiDA. The inputs should be passed to the CalcJob as normal but instead of launching the actual job, the engine will recreate the input files and then proceed straight to the retrieve step where the files of this RemoteData will be retrieved as if it had been actually launched through AiiDA. If a parser is defined in the inputs, the results are parsed and attached as output nodes as usual.
  • remote_input_folder, (RemoteData, NoneType), optional – Get input files (.amn, .mmn, …) from a class RemoteData possibly stored in a remote computer.
  • settings, (Dict, NoneType), optional – Additional settings to manage the Wannier90 calculation.
  • structure, StructureData, required – input crystal structure

Outputs:

  • interpolated_bands, BandsData, optional – The interpolated band structure by Wannier90 (if any).
  • nnkp_file, SinglefileData, optional – The .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.
  • remote_stash, RemoteStashData, optional – Contents of the stash.source_list option are stored in this remote folder after job completion.
  • 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 the centres, spreads and, if available, the Imaginary/Real ratio of the Wannier functions. Will also check 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, bands_kpoints=None, projections=None, random_projections=False)[source]

Write input to a .win file.

Parameters:

OrbitalData, or as a list of strings specifying the projections in Wannier90’s format. :type projections: aiida.orm.nodes.data.orbital.OrbitalData, aiida.orm.nodes.data.list.List[str]

Parameters:

random_projections – If class OrbitalData is used for projections,

enables random projections completion :type random_projections: aiida.orm.nodes.data.bool.Bool

Create OrbitalData instances.

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

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 coordinates 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 note that radial and ang_mtm_mr_list both use 0-based indexing as opposed to 1-based indexing, effectively meaning that both should be offset by 1. E.g., an orbital with two radial nodes 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 do 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 OrbitalData node (the internal key is mentioned in brackets).

Parameters:
  • position_cart – position in Cartesian coordinates or list of positions in Cartesian coordinates (position)

  • kind_name – kind name in the input StructureData node (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' or 'D' (spin)

  • zona – as specified in user guide, applied to all orbitals (diffusivity)

  • zaxis – the z-axis of the orbital, a list of three floats as described in wannier user guide (z_orientation)

  • xaxis – the x-axis of the orbital, a 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)