Calculations¶
Voronoi¶
Input plug-in for a voronoi calculation.
-
class
aiida_kkr.calculations.voro.
VoronoiCalculation
(**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
-
KKRcode¶
Input plug-in for a KKR calculation.
-
class
aiida_kkr.calculations.kkr.
KkrCalculation
(**kwargs)[source]¶ AiiDA calculation plugin for a KKR calculation .
-
_check_valid_parent
(calc)[source]¶ Check that calc is a valid parent for a FleurCalculation. It can be a VoronoiCalculation, KKRCalculation
-
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
(**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 QE).
-
_prepare_for_retrieval
(open_transport)[source]¶ Prepare the calculation for retrieval by daemon.
Parameters: open_transport (aiida.transport.plugins.local.LocalTransport or aiida.transport.plugins.ssh.SshTransport) – An open instance of the transport class of the calculation’s computer. Here, we * manually set the files to retrieve * store the calculation and all it’s input nodes * copy the input file to the calculation’s raw_input_folder in the * store the remote_workdir as a RemoteData output node
-
_set_filenames_in
(input_file_names)[source]¶ helper function to set filenames from input_file_names dict also check if at least inputcard and potential are given
-
_set_filenames_out
(output_file_names)[source]¶ helper function that sets the output file names from the output_file_names dictionary
-
create_input_nodes
(open_transport, input_file_names=None, output_file_names=None, remote_workdir=None)[source]¶ Create calculation input nodes based on the job’s files.
Parameters: open_transport (aiida.transport.plugins.local.LocalTransport or aiida.transport.plugins.ssh.SshTransport) – An open instance of the transport class of the calculation’s computer. See the tutorial for more information. This method parses the files in the job’s remote working directory to create the input nodes that would exist if the calculation were submitted using AiiDa. These nodes are: * a
'parameters'
ParameterData node, based on the namelists and their variable-value pairs; * …; and can be retrieved as a dictionary using theget_inputs_dict()
method. These input links are cached-links; nothing is stored by this method (including the calculation node itself).Keyword arguments .. note:: These keyword arguments can also be set when instantiating the class or using the
set_
methods (e.g.set_remote_workdir
). Offering to set them here simply offers the user an additional place to set their values. Only the values that have not yet been set need to be specified.Parameters: - input_file_names (dict of str values) – The file name of the job’s input files (inputcard, shapefun).
- output_file_names (dict of str values) – The file name of the job’s output files (i.e. the files containing the stdout of KKR, the output.000.txt, output.0.txt, output.2.txt, out_timing.txt, output potential, output nonco_angle file).
- 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.
Raises: - aiida.common.exceptions.InputValidationError – if
open_transport
is a different type of transport than the computer’s. - aiida.common.exceptions.InvalidOperation – if
open_transport
is not open. - aiida.common.exceptions.InputValidationError – if
remote_workdir
,input_file_names
, and/oroutput_file_names
are not set prior to or during the call of this method. - aiida.common.exceptions.FeatureNotAvailable – if the input file uses anything which is not currently implimented in aiida-kkr.
- aiida.common.exceptions.ParsingError – if there are issues parsing the input file.
- IOError – if there are issues reading the input file.
-
prepare_for_retrieval_and_parsing
(open_transport)[source]¶ Tell the daemon that the calculation is computed and ready to be parsed.
Parameters: open_transport (aiida.transport.plugins.local.LocalTransport or aiida.transport.plugins.ssh.SshTransport) – An open instance of the transport class of the calculation’s computer. See the tutorial for more information. The next time the daemon updates the status of calculations, it will see this job is in the ‘COMPUTED’ state and will retrieve its output files and parse the results. If the daemon is not currently running, nothing will happen until it is started again. This method also stores the calculation and all input nodes. It also copies the original input file to the calculation’s repository folder.
Raises: - aiida.common.exceptions.InputValidationError – if
open_transport
is a different type of transport than the computer’s. - aiida.common.exceptions.InvalidOperation – if
open_transport
is not open.
- aiida.common.exceptions.InputValidationError – if
-
set_input_file_names
(input_file_names)[source]¶ Set the file names of the job’s input file (e.g.
'inputcard'
etc.). :param input_file_names: The file names of the job’s input files (inputcard, potential, etc.). :type input_file_names: dictKeys of input_file_names dict should be one or more of:
'input_file'
'potential_file'
'shapefun_file'
Note: The keys ‘input_file’ and ‘potential_file’ are mandatory!
-
set_output_file_names
(output_file_names)[source]¶ Set the file names of the job’s output files (e.g.
'output.000.txt'
etc.).Parameters: output_file_names (dict) – The dictionary of file names of file containing the job’s outputs. Keys of output_file_names dict should be one or more of:
'out_file'
'out_potential_file'
'out_nonco_angles_file'
'output_0_file'
'output_000_file'
'output_2_file'
'timing_file'
Note: In a filename is not given, the default value of aiida_kkr.calculations.kkr are used
- 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,