Module for plugins to import data from external databases into an AiiDA database.
aiida.tools.dbimporters.
DbImporter
Bases: object
object
Base class implementation for an external database importer.
__dict__
__module__
__weakref__
list of weak references to the object (if defined)
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.
aiida.tools.dbimporters.baseclasses.
CifEntry
Bases: aiida.tools.dbimporters.baseclasses.DbEntry
aiida.tools.dbimporters.baseclasses.DbEntry
Represents an entry from the structure database (COD, ICSD, …).
cif
Returns raw contents of a CIF file as string.
get_aiida_structure
AiiDA structure corresponding to the CIF file.
get_ase_structure
Returns ASE representation of the CIF.
Note
To be removed, as it is duplicated in aiida.orm.nodes.data.cif.CifData.
aiida.orm.nodes.data.cif.CifData
get_cif_node
Creates a CIF node, that can be used in AiiDA workflow.
aiida.orm.nodes.data.cif.CifData object
get_parsed_cif
Returns data structure, representing the CIF file. Can be created using PyCIFRW or any other open-source parser.
list of lists
get_raw_cif
contents of a file as string
DbEntry
Represents an entry from external database.
__init__
Sets the basic parameters for the database entry:
db_name – name of the source database
db_uri – URI of the source database
id – structure identifyer in the database
version – version of the database
extras – a dictionary with some extra parameters (e.g. database ID number)
uri – URI of the structure (should be permanent)
__repr__
Return repr(self).
_license
contents
Returns raw contents of a file as string.
DbSearchResults
Base class for database results.
All classes, inheriting this one and overriding at(), are able to benefit from having functions __iter__, __len__ and __getitem__.
at()
__iter__
__len__
__getitem__
DbSearchResultsIterator
Iterator for search results.
Initialize self. See help(type(self)) for accurate signature.
__next__
Return the next entry in the iterator.
Instances of aiida.tools.dbimporters.baseclasses.DbSearchResults can be used as iterators.
aiida.tools.dbimporters.baseclasses.DbSearchResults
_get_source_dict
Returns a dictionary, which is passed as kwargs to the created DbEntry instance, describing the source of the entry.
result_dict – dictionary, describing an entry in the results.
_get_url
Returns an URL of an entry CIF file.
_return_class
at
Returns position-th result as aiida.tools.dbimporters.baseclasses.DbEntry.
position
position – zero-based index of a result.
IndexError – if position is out of bounds.
fetch_all
Returns all query results as an array of aiida.tools.dbimporters.baseclasses.DbEntry.
next
Returns the next result of the query (instance of aiida.tools.dbimporters.baseclasses.DbEntry).
StopIteration – when the end of result array is reached.
UpfEntry
Represents an entry from the pseudopotential database.
get_upf_node
Creates an UPF node, that can be used in AiiDA workflow.
aiida.orm.nodes.data.upf.UpfData object
aiida.orm.nodes.data.upf.UpfData