aiida.orm.implementation.sqlalchemy.calculation.job package¶
-
class
aiida.orm.implementation.sqlalchemy.calculation.job.
JobCalculation
(**kwargs)[source]¶ Bases:
aiida.orm.implementation.general.calculation.job.AbstractJobCalculation
,aiida.orm.implementation.sqlalchemy.calculation.Calculation
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.orm.implementation.sqlalchemy.calculation.job'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 120¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
_logger
= <celery.utils.log.ProcessAwareLogger object>¶
-
_plugin_type_string
= 'calculation.job.JobCalculation.'¶
-
_query_type_string
= 'calculation.job.'¶
-
_set_state
(state)[source]¶ Set the state of the calculation.
Set it in the DbCalcState to have also the uniqueness check. Moreover (except for the IMPORTED state) also store in the ‘state’ attribute, useful to know it also after importing, and for faster querying.
Todo
Add further checks to enforce that the states are set in order?
Parameters: state – a string with the state. This must be a valid string, from aiida.common.datastructures.calc_states
.Raise: ModificationNotAllowed if the given state was already set.
-
get_state
(from_attribute=False)[source]¶ Get the state of the calculation.
Note
this method returns the None if no state is found
Parameters: from_attribute – if set to True, read it from the attributes (the attribute is also set with set_state, unless the state is set to IMPORTED; in this way we can also see the state before storing). Returns: a string, if a state is found or None
-