Calculations

Voronoi

Input plug-in for a voronoi calculation.

class aiida_kkr.calculations.voro.VoronoiCalculation(*args, **kwargs)[source]

AiiDA calculation plugin for a voronoi calculation (creation of starting potential and shapefun).

_check_valid_parent(parent_calc_folder)[source]

Check that calc is a valid parent for a FleurCalculation. It can be a VoronoiCalculation, KKRCalculation

classmethod _get_parent(input_folder)[source]

get the parent folder of the calculation. If not parent was found return input folder

classmethod _get_remote(parent_folder)[source]

get remote_folder from input if parent_folder is not already a remote folder

classmethod _get_struc(parent_calc)[source]

Get structure from a parent_folder (result of a calculation, typically a remote folder)

classmethod _has_struc(parent_folder)[source]

Check if parent_folder has structure information in its input

_is_KkrCalc(calc)[source]

check if calc contains the file out_potential

classmethod define(spec)[source]

define internals and inputs / outputs of calculation

classmethod find_parent_structure(parent_folder)[source]

Find the Structure node recuresively in chain of parent calculations (structure node is input to voronoi calculation)

prepare_for_submission(tempfolder)[source]

Create the input files from the input nodes passed to this instance of the CalcJob.

Parameters:tempfolder – an aiida.common.folders.Folder to temporarily write files on disk
Returns:aiida.common.datastructures.CalcInfo instance

KKRcode

Input plug-in for a KKR calculation.

class aiida_kkr.calculations.kkr.KkrCalculation(*args, **kwargs)[source]

AiiDA calculation plugin for a KKR calculation.

_kick_out_corestates_kkrhost(local_copy_list, tempfolder)[source]

Compare value of core states from potential file in local_copy_list with EMIN and kick corestate out of potential if they lie inside the energy contour.

_prepare_qdos_calc(parameters, kpath, structure, tempfolder, use_alat_input)[source]

prepare a qdos (i.e. bandstructure) calculation, can only be done if k-points are given in input Note: this changes some settings in the parameters to ensure a DOS contour and low smearing temperature Also the qvec.dat file is written here.

_set_ef_value_potential(ef_set, local_copy_list, tempfolder)[source]

Set EF value ef_set in the potential file.

_set_parent_remotedata(remotedata)[source]

Used to set a parent remotefolder in the restart of fleur.

_use_decimation(parameters, tempfolder)[source]

Activate decimation mode and copy decifile from output of deciout_parent calculation

_use_initial_noco_angles(parameters, structure, tempfolder)[source]

Set starting values for non-collinear calculation (writes nonco_angle.dat to tempfolder). Adapt FIXMOM runopt according to fix_dir input in initial_noco_angle input node

classmethod define(spec)[source]

Init internal parameters at class load time

prepare_for_submission(tempfolder)[source]

Create input files.

param tempfolder:
 aiida.common.folders.Folder subclass where the plugin should put all its files.
param inputdict:
 dictionary of the input nodes as they would be returned by get_inputs_dict
aiida_kkr.calculations.kkr._update_params(parameters, change_values)[source]

change parameters node from change_values list of key value pairs Retrun input parameter node if change_values list is empty

KKRcode - calculation importer

Plug-in to import a KKR calculation. This is based on the PwImmigrantCalculation of the aiida-quantumespresso plugin.

class aiida_kkr.calculations.kkrimporter.KkrImporterCalculation(*args, **kwargs)[source]

Importer dummy calculation for a previous KKR run

Parameters:
  • remote_workdir (str) – Absolute path to the directory where the job was run. The transport of the computer you link ask input to the calculation is the transport that will be used to retrieve the calculation’s files. Therefore, remote_workdir should be the absolute path to the job’s directory on that computer.
  • input_file_names – The file names of the job’s input file.
  • output_file_name (dict with str entries) – The file names of the job’s output file (i.e. the file containing the stdout of kkr.x).
_init_internal_params()[source]

Init internal parameters at class load time

KKRimp

Input plug-in for a KKRimp calculation.

class aiida_kkr.calculations.kkrimp.KkrimpCalculation(*args, **kwargs)[source]

AiiDA calculation plugin for a KKRimp calculation.

_change_atominfo(imp_info, kkrflex_file_paths, tempfolder)[source]

change kkrflex_atominfo to match impurity case

_check_and_extract_input_nodes(tempfolder)[source]

Extract input nodes from inputdict and check consitency of input nodes :param inputdict: dict of inputnodes :returns:

  • parameters (aiida_kkr.tools.kkr_params.kkrparams), optional: parameters of KKRimp that end up in config.cfg
  • code (KKRimpCodeNode): code of KKRimp on some machine
  • imp_info (DictNode): parameter node of the impurity information, extracted from host_parent_calc
  • kkrflex_file_paths (dict): dictionary of {filenames: absolute_path_to_file} for the kkrflex-files
  • shapfun_path (str): absolute path of the shapefunction of the host parent calculation
  • host_parent_calc (KkrCalculation): node of the parent host calculation where the kkrflex-files were created
  • impurity_potential (SinglefileData): single file data node containing the starting potential for the impurity calculation
  • parent_calc_folder (RemoteData): remote directory of a parent KKRimp calculation
_check_key_setting_consistency(params_kkrimp, key, val)[source]

Check if key/value pair that is supposed to be set is not in conflict with previous settings of parameters in params_kkrimp

_extract_and_write_config(parent_calc_folder, params_host, parameters, tempfolder, GFhost_folder)[source]

fill kkr params for KKRimp and write config file also writes kkrflex_llyfac file if Lloyd is used in the host system

_get_and_verify_hostfiles(tempfolder)[source]

Check inputdict for host_Greenfunction_folder and extract impurity_info, paths to kkrflex-files and path of shapefun file

Parameters:

inputdict – input dictionary containing all input nodes to KkrimpCalculation

Returns:

  • imp_info: Dict node containing impurity information like position, Z_imp, cluster size, etc.
  • kkrflex_file_paths: dict of absolute file paths for the kkrflex files
  • shapefun_path: absolute path of the shapefunction file in the host calculation (needed to construct shapefun_imp)
  • shapes: mapping array of atoms to shapes (<SHAPE> input)

Note:

shapefun_path is None if host_Greenfunction calculation was not full-potential

Raises:
  • InputValidationError, if inputdict does not contain ‘host_Greenfunction’
  • InputValidationError, if host_Greenfunction_folder not of right type
  • UniquenessError, if host_Greenfunction_folder does not have exactly one parent
  • InputValidationError, if host_Greenfunction does not have an input node impurity_info
  • InputValidationError, if host_Greenfunction was not a KKRFLEX calculation
_get_pot_and_shape(imp_info, shapefun, shapes, impurity_potential, parent_calc_folder, tempfolder, structure)[source]

write shapefun from impurity info and host shapefun and copy imp. potential

returns: file handle to potential file

adapt_retrieve_tmatnew(tempfolder, allopts, retrieve_list)[source]

Add out_magneticmoments and orbitalmoments files to retrieve list

add_jij_files(tempfolder, retrieve_list)[source]

check if KkrimpCalculation is in Jij mode and add OUT_JIJMAT to retrieve list if needed

add_lmdos_files_to_retrieve(tempfolder, allopts, retrieve_list, kkrflex_file_paths)[source]

Add DOS files to retrieve list

create_or_update_ldaupot(parent_calc_folder, tempfolder)[source]

Writes ldaupot to tempfolder.

If parent_calc_folder is found and it contains an onld ldaupot, we reuse the values for wldau, uldau and phi from there.

classmethod define(spec)[source]

Init internal parameters at class load time

classmethod get_ldaupot_from_retrieved(retrieved, tempfolder)[source]

Extract ldaupot from output of KKRimp retreived to tempfolder. The extracted file in tempfolder will be named ldaupot_old.

returns True of ldaupot was found, otherwise returns False

get_old_ldaupot(parent_calc_folder, tempfolder)[source]

Copy old ldaupot from retrieved of parent or extract from tarball. If no parent_calc_folder is present this step is skipped.

Check if host GF is found on remote machine and reuse from there

get_run_test_opts(parameters)[source]

Extract run and test options from input parameters

init_ldau(tempfolder, retrieve_list, parent_calc_folder)[source]

Check if settings_LDAU is in input and set up LDA+U calculation. Reuse old ldaupot of parent_folder contains a file ldaupot.

prepare_for_submission(tempfolder)[source]

Create input files.

param tempfolder:
 aiida.common.folders.Folder subclass where the plugin should put all its files.
param inputdict:
 dictionary of the input nodes as they would be returned by get_inputs_dict
aiida_kkr.calculations.kkrimp.get_ldaupot_text(ldau_settings, ef_Ry, natom, initialize=True)[source]

create the text for the ldaupot file