Calculations

Voronoi

Input plug-in for a voronoi calculation.

class aiida_kkr.calculations.voro.VoronoiCalculation(*args: Any, **kwargs: Any)[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

_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) This is a copy of the find_parent_structure that moved to tools.find_parent to keep backwards compatibility.

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: Any, **kwargs: Any)[source]

AiiDA calculation plugin for a KKR calculation.

_check_illegal_parameter_overwrite(parent_calc, parameters)[source]

check if no keys are illegally overwritten (i.e. compare with keys in self._do_never_modify)

_copy_BdG_pot(retrieved, tempfolder)[source]

Activate BdG mode and copy den_lm_ir files of the previous output to the input of this calculation.

_get_BdG_filelist(parameters, natom, nspin)[source]

Add list of BdG output files to retrieve list

_get_Jij_filelist(parameters, natom)[source]

Add Jij output files to retrieve list

_get_deci_file(parameters)[source]

Add deci-out file to retrieve list

_get_default_retrieve_list()[source]

initialize retrieve list with these files

_get_dos_filelist(parameters, natom, nspin, addition='')[source]

return file list of DOS output files to add to retrieve list

_get_kkrflex_filelist(parameters)[source]

Add kkrflex_* files to the retrieve list if needed

_get_local_copy_list(parent_calc, voro_parent, tempfolder, parameters)[source]

Decide what files to copy based on settings to the code (e.g. KKRFLEX option needs scoef)

_get_parent_calc(parent_calc_folder)[source]

Get the parent calculation from the remote folder that is given as input

_get_qdos_filelist(parameters, natom, nspin, addition='')[source]

Add qdos output files to retrieve list if needed

_get_shapes_array(parent_calc, voro_parent)[source]

Get the shapes array from the parent calcualtion or the voronoi parent

_get_structure_inputs(parent_calc, parameters)[source]

extract structure, voronoi parent calculation and some structure properties

_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

_use_nonco_bfield(parameters, structure, tempfolder)[source]

Set external non-collinear bfield (writes bfield.dat to tempfolder) used in constraint calculations.

_write_scoef_file(tempfolder, parameters, structure, use_alat_input)[source]

Write the scoef file for KKRFLEX writeout

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: Any, **kwargs: Any)[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: Any, **kwargs: Any)[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

KKRnano

Input plug-in for a KKRnano calculation.

class aiida_kkr.calculations.kkrnano.KKRnanoCalculation(*args: Any, **kwargs: Any)[source]

AiiDA calculation plugin for a KKRnano calculation

_check_input_dict(inputdict, num_mpi_procs, convert)[source]

checks if all essential keys are contained in the inputdict and if it has the right format

_check_valid_parent(parent_calc_folder)[source]

Check that calc is a valid parent for a KKRnano. It can be a VoronoiCalculation, KKRnanoCalculation

_getParametersEntry(key, value)[source]

writing out various entry types from a dict into the format suitable for KKRnano

_get_lattice_constant(structure, passed_lattice_const)[source]

determine whether a passed lattice constant should be used

_get_local_copy_list(parent_calc_remote, local_copy_list_for_continued)[source]

find files to copy from the parent_folder’s retrieved to the input of a KKRnano calculation

_get_rbasis_atom_symbol(atomic_number)[source]

returns either an element symbol or a vacuum symbol

classmethod _get_struc(parent_calc)[source]

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

classmethod _has_struc(parent_folder)[source]

Check if parent_folder has strucwithpot information in its input

_is_KkrnanoCalc(calc)[source]

check if calc contains the file out_potential

_write_efermi_file(efermi_handle, efermi)[source]

write file EFERMI necessary to restart a calculation.

_write_input_file(input_file_handle, parameters, structure, passed_lattice_const)[source]

write the input.conf file for KKRnano

_write_nonco_angles(nonco_angles_handle, nonco_angles, structure)[source]

write nonco_angles.dat file for KKRnano created from dictionary with structure dict={‘atom’:{1:{‘theta’:0.0,’phi’:00.0, ‘fix_angle_mode’:1},…} The angles ‘theta’ (polar angle going from z- to x-direction) and ‘phi’ (azimuthal angle) are given in deg. ‘fix_angle_mode’ takes values 0,1,2,3. 0 is for relaxation of the spin-direciton, 1 is for fixing it; 2 and 3 are for constraining fields calculations.

_write_potential_file(potential_handle, strucwithpot)[source]

write file potential from strucwithpot object’s potential files.

_write_rbasis(rbasis_handle, structure, passed_lattice_const)[source]

write the rbasis.xyz file for KKRnano

_write_shapefun_file(shapefun_handle, strucwithpot)[source]

write file potential from strucwithpot object’s potential files.

classmethod define(spec)[source]

define internals and inputs / outputs of calculation

classmethod find_parent_struc_from_voro_or_stwpd(parent_folder)[source]

Find the StructureData node recuresively in chain of parent calculations (structure node is input to voronoi calculation or in input StrucWithPotData node of KKRnano calculation)

returns structure, parent_folder

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