Module with Node sub classes for calculation processes.
aiida.orm.nodes.process.calculation.
CalcFunctionNode
Bases: aiida.orm.utils.mixins.FunctionCalculationMixin, aiida.orm.nodes.process.calculation.calculation.CalculationNode
aiida.orm.utils.mixins.FunctionCalculationMixin
aiida.orm.nodes.process.calculation.calculation.CalculationNode
ORM class for all nodes representing the execution of a calcfunction.
__abstractmethods__
__annotations__
__module__
_abc_impl
_logger
_plugin_type_string
_query_type_string
validate_outgoing
Validate adding a link of the given type from ourself to a given node.
A calcfunction cannot return Data, so if we receive an outgoing link to a stored Data node, that means the user created a Data node within our function body and stored it themselves or they are returning an input node. The latter use case is reserved for @workfunctions, as they can have RETURN links.
target – the node to which the link is going
link_type – the link type
link_label – the link label
TypeError – if target is not a Node instance or link_type is not a LinkType enum
ValueError – if the proposed link is invalid
CalcJobNode
Bases: aiida.orm.nodes.process.calculation.calculation.CalculationNode
ORM class for all nodes representing the execution of a CalcJob.
CALC_JOB_STATE_KEY
REMOTE_WORKDIR_KEY
RETRIEVE_LIST_KEY
RETRIEVE_SINGLE_FILE_LIST_KEY
RETRIEVE_TEMPORARY_LIST_KEY
SCHEDULER_DETAILED_JOB_INFO_KEY
SCHEDULER_JOB_ID_KEY
SCHEDULER_LAST_CHECK_TIME_KEY
SCHEDULER_LAST_JOB_INFO_KEY
SCHEDULER_STATE_KEY
_get_objects_to_hash
Return a list of objects which should be included in the hash.
This method is purposefully overridden from the base Node class, because we do not want to include the repository folder in the hash. The reason is that the hash of this node is computed in the store method, at which point the input files that will be stored in the repository have not yet been generated. Including these anyway in the computation of the hash would mean that the hash of the node would change as soon as the process has started and the input files have been written to the repository.
_hash_ignored_attributes
_raw_input_folder
Get the input folder object.
the input folder object.
NotExistent: if the raw folder hasn’t been created yet
_repository_base_path
_tools
_updatable_attributes
_validate_retrieval_directive
Validate a list or tuple of file retrieval directives.
directives – a list or tuple of file retrieveal directives
ValueError – if the format of the directives is invalid
delete_state
Delete the calculation job state attribute if it exists.
get_authinfo
Return the AuthInfo that is configured for the Computer set for this node.
AuthInfo
get_builder_restart
Return a ProcessBuilder that is ready to relaunch the same CalcJob that created this node.
The process class will be set based on the process_type of this node and the inputs of the builder will be prepopulated with the inputs registered for this node. This functionality is very useful if a process has completed and you want to relaunch it with slightly different inputs.
In addition to prepopulating the input nodes, which is implemented by the base ProcessNode class, here we also add the options that were passed in the metadata input of the CalcJob process.
~aiida.engine.processes.builder.ProcessBuilder instance
get_description
Return a string with a description of the node based on its properties.
get_detailed_job_info
Return the detailed job info dictionary.
the dictionary with detailed job info if defined or None
get_job_id
Return job id that was assigned to the calculation by the scheduler.
the string representation of the scheduler job id
get_last_job_info
Return the last information asked to the scheduler about the status of the job.
a JobInfo object (that closely resembles a dictionary) or None.
get_option
Retun the value of an option that was set for this CalcJobNode
name – the option name
the option value or None
ValueError for unknown option
get_options
Return the dictionary of options set for this CalcJobNode
dictionary of the options and their values
get_parser_class
Return the output parser object for this calculation or None if no parser is set.
a Parser class.
aiida.common.exceptions.EntryPointError – if the parser entry point can not be resolved.
get_remote_workdir
Return the path to the remote (on cluster) scratch folder of the calculation.
a string with the remote path
get_retrieve_list
Return the list of files/directories to be retrieved on the cluster after the calculation has completed.
a list of file directives
get_retrieve_singlefile_list
Return the list of files to be retrieved on the cluster after the calculation has completed.
list of single file retrieval directives
Deprecated since version 1.0.0: Will be removed in v2.0.0, use aiida.orm.nodes.process.calculation.calcjob.CalcJobNode.get_retrieve_temporary_list() instead.
aiida.orm.nodes.process.calculation.calcjob.CalcJobNode.get_retrieve_temporary_list()
get_retrieve_temporary_list
Return list of files to be retrieved from the cluster which will be available during parsing.
get_retrieved_node
Return the retrieved data folder.
the retrieved FolderData node or None if not found
get_scheduler_lastchecktime
Return the time of the last update of the scheduler state by the daemon or None if it was never set.
a datetime object or None
get_scheduler_state
Return the status of the calculation according to the cluster scheduler.
a JobState enum instance.
get_scheduler_stderr
Return the scheduler stdout output if the calculation has finished and been retrieved, None otherwise.
scheduler stdout output or None
get_scheduler_stdout
Return the scheduler stderr output if the calculation has finished and been retrieved, None otherwise.
scheduler stderr output or None
get_state
Return the calculation job active sub state.
The calculation job state serves to give more granular state information to CalcJobs, in addition to the generic process state, while the calculation job is active. The state can take values from the enumeration defined in aiida.common.datastructures.CalcJobState and can be used to query for calculation jobs in specific active states.
instance of aiida.common.datastructures.CalcJobState or None if invalid value, or not set
get_transport
Return the transport for this calculation.
Transport configured with the AuthInfo associated to the computer of this node
link_label_retrieved
Return the link label used for the retrieved FolderData node.
res
To be used to get direct access to the parsed parameters.
an instance of the CalcJobResultManager.
a practical example on how it is meant to be used: let’s say that there is a key ‘energy’ in the dictionary of the parsed results which contains a list of floats. The command calc.res.energy will return such a list.
set_detailed_job_info
Set the detailed job info dictionary.
detailed_job_info – a dictionary with metadata with the accounting of a completed job
set_job_id
Set the job id that was assigned to the calculation by the scheduler.
Note
the id will always be stored as a string
job_id – the id assigned by the scheduler after submission
set_last_job_info
Set the last job info.
last_job_info – a JobInfo object
set_option
Set an option to the given value
value – the value to set
TypeError for values with invalid type
set_options
Set the options for this CalcJobNode
options – dictionary of option and their values to set
set_remote_workdir
Set the absolute path to the working directory on the remote computer where the calculation is run.
remote_workdir – absolute filepath to the remote working directory
set_retrieve_list
Set the retrieve list.
This list of directives will instruct the daemon what files to retrieve after the calculation has completed. list or tuple of files or paths that should be retrieved by the daemon.
retrieve_list – list or tuple of with filepath directives
set_retrieve_singlefile_list
Set the retrieve singlefile list.
The files will be stored as SinglefileData instances and added as output nodes to this calculation node. The format of a single file directive is a tuple or list of length 3 with the following entries:
the link label under which the file should be added the SinglefileData class or sub class to use to store the filepath relative to the remote working directory of the calculation
the link label under which the file should be added
the SinglefileData class or sub class to use to store
the filepath relative to the remote working directory of the calculation
retrieve_singlefile_list – list or tuple of single file directives
Deprecated since version 1.0.0: Will be removed in v2.0.0. Use set_retrieve_temporary_list() instead.
set_retrieve_temporary_list()
set_retrieve_temporary_list
Set the retrieve temporary list.
The retrieve temporary list stores files that are retrieved after completion and made available during parsing and are deleted as soon as the parsing has been completed.
retrieve_temporary_list – list or tuple of with filepath directives
set_scheduler_state
Set the scheduler state.
state – an instance of JobState
set_state
Set the calculation active job state.
state – a string with the state from aiida.common.datastructures.CalcJobState.
aiida.common.datastructures.CalcJobState
ValueError if state is invalid
tools
Return the calculation tools that are registered for the process type associated with this calculation.
If the entry point name stored in the process_type of the CalcJobNode has an accompanying entry point in the aiida.tools.calculations entry point category, it will attempt to load the entry point and instantiate it passing the node to the constructor. If the entry point does not exist, cannot be resolved or loaded, a warning will be logged and the base CalculationTools class will be instantiated and returned.
CalculationTools instance
CalculationNode
Bases: aiida.orm.nodes.process.process.ProcessNode
aiida.orm.nodes.process.process.ProcessNode
Base class for all nodes representing the execution of a calculation process.
_cachable
_storable
_unstorable_message
inputs
Return an instance of NodeLinksManager to manage incoming INPUT_CALC links
The returned Manager allows you to easily explore the nodes connected to this node via an incoming INPUT_CALC link. The incoming nodes are reachable by their link labels which are attributes of the manager.
NodeLinksManager
outputs
Return an instance of NodeLinksManager to manage outgoing CREATE links
The returned Manager allows you to easily explore the nodes connected to this node via an outgoing CREATE link. The outgoing nodes are reachable by their link labels which are attributes of the manager.
Module with Node sub class for calculation function processes.
aiida.orm.nodes.process.calculation.calcfunction.
Module with Node sub class for calculation job processes.
aiida.orm.nodes.process.calculation.calcjob.
Module with Node sub class for calculation processes.
aiida.orm.nodes.process.calculation.calculation.