Manage AiiDA queries.
aiida.backends.general.abstractqueries.
AbstractQueryManager
Bases: abc.ABC
abc.ABC
__abstractmethods__
__dict__
__init__
backend (aiida.orm.implementation.sql.backends.SqlBackend) – The AiiDA backend
aiida.orm.implementation.sql.backends.SqlBackend
__module__
__weakref__
list of weak references to the object (if defined)
_abc_impl
_extract_formula
Extract formula from the structure object.
akinds – list of kinds, e.g. [{‘mass’: 55.845, ‘name’: ‘Fe’, ‘symbols’: [‘Fe’], ‘weights’: [1.0]}, {‘mass’: 15.9994, ‘name’: ‘O’, ‘symbols’: [‘O’], ‘weights’: [1.0]}]
asites – list of structure sites e.g. [{‘position’: [0.0, 0.0, 0.0], ‘kind_name’: ‘Fe’}, {‘position’: [2.0, 2.0, 2.0], ‘kind_name’: ‘O’}]
args (dict) – a namespace with parsed command line parameters, here only ‘element’ and ‘element_only’ are used
a string with formula if the formula is found
apply_new_uuid_mapping
get_all_parents
Get all the parents of given nodes
node_pks – one node pk or an iterable of node pks
a list of aiida objects with all the parents of the nodes
get_bands_and_parents_structure
Search for bands and return bands and the closest structure that is a parent of the instance. This is the backend independent way, can be overriden for performance reason
pk as string, formula as string, creation date, bandsdata-label
get_creation_statistics
Return a dictionary with the statistics of node creation, summarized by day.
Days when no nodes were created are not present in the returned ctime_by_day dictionary.
user_pk – If None (default), return statistics for all users. If user pk is specified, return only the statistics for the given user.
a dictionary as follows:
{ "total": TOTAL_NUM_OF_NODES, "types": {TYPESTRING1: count, TYPESTRING2: count, ...}, "ctime_by_day": {'YYYY-MMM-DD': count, ...}
where in ctime_by_day the key is a string in the format ‘YYYY-MM-DD’ and the value is an integer with the number of nodes created that day.
get_duplicate_uuids
Return a list of rows with identical UUID
table – Database table with uuid column, e.g. ‘db_dbnode’
list of tuples of (id, uuid) of rows with duplicate UUIDs