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
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.
- _create_or_update_ldaupot(parent_calc, tempfolder, natom)[source]
Writes ldaupot to tempfolder.
If parent_calc is found and it contains an onld ldaupot, we reuse the values for wldau, uldau and phi from there.
- _get_dos_filelist(parameters, natom, nspin, addition='')[source]
return file list of DOS output files to add to retrieve list
- _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_old_ldaupot(parent_calc, tempfolder)[source]
Copy old ldaupot from retrieved of parent or extract from tarball. If no parent_calc is present this step is skipped.
- _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
- _init_ldau(tempfolder, parent_calc, natom)[source]
Check if settings_LDAU is in input and set up LDA+U calculation. Reuse old ldaupot of parent_folder contains a file ldaupot.
- _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.
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).
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.
- _activate_jij_calc(runflag, params_kkrimp, GFhost_folder, tempfolder)[source]
Adapt runoptions to use Jij calculation and set inputs for Jij run
- _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_natom(tempfolder)[source]
Get the number of atoms in the impurity cluster from kkrflex_atominfo file
- _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
- _initialize_kkrimp_params(params_host, parameters, GFhost_folder, tempfolder)[source]
Initialize KKRimp parameters and set keys that are the same as in the host calculation
- _set_nosoc(params_host, GFhost_folder, tempfolder)[source]
Check if host is a noSOC calculation and then set the kkrflex_spinorbitperatom accordingly
- _use_lloyd(runflag, GFhost_folder, tempfolder, wfac_renorm=False)[source]
Use the LLYsimple version of KKRimp code with the average renormalization factor from the host calculation
- _write_kkrflex_angle(parameters, GFhost_folder, tempfolder)[source]
Create the kkrflex_angle file in tempfolder
- _write_kkrflex_rimpshift(tempfolder, parameters)[source]
Create the kkrflex_rimpshift file in tempfolder for U-transformation
- 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 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.
- get_remote_symlink(local_copy_list)[source]
Check if host GF is found on remote machine and reuse from there
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
- 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
- _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.