Tools to operate on AiiDA ORM class instances
What functionality should go directly in the ORM class in aiida.orm and what in aiida.tools?
The ORM class should define basic functions to set and get data from the object More advanced functionality to operate on the ORM class instances can be placed in aiida.toolsto prevent the ORM namespace from getting too cluttered.
The ORM class should define basic functions to set and get data from the object
to prevent the ORM namespace from getting too cluttered.
Note
Modules in this sub package may require the database environment to be loaded
aiida.tools.
CalculationTools
Bases: object
object
Base class for CalculationTools.
__dict__
__init__
Initialize self. See help(type(self)) for accurate signature.
__module__
__weakref__
list of weak references to the object (if defined)
DbImporter
Base class implementation for an external database importer.
get_supported_keywords
Returns the list of all supported query keywords.
list of strings
query
Method to query the database.
id – database-specific entry identificator
element – element name from periodic table of elements
number_of_elements – number of different elements
mineral_name – name of mineral
chemical_name – chemical name of substance
formula – chemical formula
volume – volume of the unit cell in cubic angstroms
spacegroup – symmetry space group symbol in Hermann-Mauguin notation
spacegroup_hall – symmetry space group symbol in Hall notation
a – length of lattice vector in angstroms
b – length of lattice vector in angstroms
c – length of lattice vector in angstroms
alpha – angles between lattice vectors in degrees
beta – angles between lattice vectors in degrees
gamma – angles between lattice vectors in degrees
z – number of the formula units in the unit cell
measurement_temp – temperature in kelvins at which the unit-cell parameters were measured
measurement_pressure – pressure in kPa at which the unit-cell parameters were measured
diffraction_temp – mean temperature in kelvins at which the intensities were measured
diffraction_pressure – mean pressure in kPa at which the intensities were measured
authors – authors of the publication
journal – name of the journal
title – title of the publication
year – year of the publication
journal_volume – journal volume of the publication
journal_issue – journal issue of the publication
first_page – first page of the publication
last_page – last page of the publication
doi – digital object identifyer (DOI), refering to the publication
NotImplementedError – if search using given keyword is not implemented.
setup_db
Sets the database parameters. The method should reconnect to the database using updated parameters, if already connected.
get_explicit_kpoints_path
Returns a dictionary whose contents depend on the method but includes at least the following keys
parameters: Dict node explicit_kpoints: KpointsData node with explicit kpoints path
parameters: Dict node
explicit_kpoints: KpointsData node with explicit kpoints path
The contents of the parameters depends on the method but contains at least the keys
‘point_coords’: a dictionary with ‘kpoints-label’: [float coordinates] ‘path’: a list of length-2 tuples, with the labels of the startingand ending point of each label section
‘point_coords’: a dictionary with ‘kpoints-label’: [float coordinates]
and ending point of each label section
The ‘seekpath’ method which is the default also returns the following additional nodes
primitive_structure: StructureData with the primitive cell conv_structure: StructureData with the conventional cell
primitive_structure: StructureData with the primitive cell
conv_structure: StructureData with the conventional cell
Note that the generated kpoints for the seekpath method only apply on the returned primitive_structure and not on the input structure that was provided
structure – a StructureData node
method – the method to use for kpoint generation, options are ‘seekpath’ and ‘legacy’. It is strongly advised to use the default ‘seekpath’ as the ‘legacy’ implementation is known to have bugs for certain structure cells
kwargs – optional keyword arguments that depend on the selected method
dictionary as described above in the docstring
get_kpoints_path
spglib_tuple_to_structure
Convert a tuple of the format (cell, scaled_positions, element_numbers) to an AiiDA structure.
Unless the element_numbers are identical to the Z number of the atoms, you should pass both kind_info and kinds, with the same format as returned by get_tuple_from_aiida_structure.
structure_tuple – the structure in format (structure_tuple, kind_info)
kind_info – a dictionary mapping the kind_names to the numbers used in element_numbers. If not provided, assumes {element_name: element_Z}
kinds – a list of the kinds of the structure.
structure_to_spglib_tuple
Convert an AiiDA structure to a tuple of the format (cell, scaled_positions, element_numbers).
structure – the AiiDA structure
(structure_tuple, kind_info, kinds) where structure_tuple is a tuple of format (cell, scaled_positions, element_numbers); kind_info is a dictionary mapping the kind_names to the numbers used in element_numbers. When possible, it uses the Z number of the element, otherwise it uses numbers > 1000; kinds is a list of the kinds of the structure.