aiida_crystal17.data package¶
Submodules¶
aiida_crystal17.data.basis_set module¶
A data type to store CRYSTAL17 basis sets.
-
class
aiida_crystal17.data.basis_set.
BasisSetData
(filepath, **kwargs)[source]¶ Bases:
aiida.orm.nodes.data.data.Data
A data type to store CRYSTAL17 basis sets.
It is intended to work much like the UpfData type
The basis file must contain one basis set in the CRYSTAL17 format
lines beginning # will be ignored
the file can also start with a fenced, yaml formatted header section (starting/ending ‘—’) (Note keys should not contain ‘.’s)
only the actual basis data (not commented lines or the header section) will be stored as a file and hashed
Example file
# an ignored comment --- author: J Smith year: 1999 --- 8 2 1 0 3 2. 0. 1 1 3 6. 0.
Read and store a file containing a single basis set.
- Parameters
filepath (str or filelike) –
-
_abc_impl
= <_abc_data object>¶
-
_logger
= <Logger aiida_crystal17.data.basis_set.BasisSetData (WARNING)>¶
-
_plugin_type_string
= 'data.crystal17.basisset.BasisSetData.'¶
-
_query_type_string
= 'data.crystal17.basisset.'¶
-
_validate
()[source]¶ Perform validation of the Data object.
Note
validation of data source checks license and requires attribution to be provided in field ‘description’ of source in the case of any CC-BY* license. If such requirement is too strict, one can remove/comment it out.
-
property
content
¶ Return the content string for insertion into .d12 file.
- Returns
content_str
-
property
element
¶ Return the element symbol associated with the basis set.
-
property
filename
¶ Return the name of the file stored.
-
classmethod
from_md5
(md5)[source]¶ Return a list of all Basis Sets that match a given MD5 hash.
Note that the hash has to be stored in a _md5 attribute, otherwise the basis will not be found.
-
get_basis_family_names
()[source]¶ Get the list of all basiset family names to which the basis belongs.
-
classmethod
get_basis_group_map
(group_name)[source]¶ Get a mapping of elements to basissets in a basis set family.
- Parameters
group_name (str) – the group name of the basis set
- Returns
a mapping of element to basis set
- Return type
- Raises
aiida.common.exceptions.MultipleObjectsError – if there is more than one element s
-
classmethod
get_basis_groups
(filter_elements=None, user=None)[source]¶ Return all names of groups of type BasisFamily, possibly with some filters.
- Parameters
filter_elements – A string or a list of strings. If present, returns only the groups that contains one Basis for every element present in the list. Default=None, meaning that all families are returned.
user – if None (default), return the groups for all users. If defined, it should be either a DbUser instance, or a string for the username (that is, the user email).
-
classmethod
get_basissets_by_kind
(structure, family_name)[source]¶ Get a dictionary of {kind: basis} for all the kinds within the given structure using the given basis set family name.
- Parameters
structure – The structure that will be used.
family_name – the name of the group containing the basis sets
-
classmethod
get_basissets_from_structure
(structure, family_name, by_kind=False)[source]¶ Given a family name (a BasisSetFamily group in the DB) and an AiiDA structure, return a dictionary associating each element or kind name (if
by_kind=True
) with its BasisSetData object.- Raises
aiida.common.exceptions.MultipleObjectsError – if more than one Basis Set for the same element is found in the group.
aiida.common.exceptions.NotExistent – if no Basis Set for an element in the group is found in the group.
-
classmethod
get_or_create
(basis_file, use_first=False, store_basis=True)[source]¶ Pass the same parameter of the init; if a file with the same md5 is found, that BasisSetData is returned.
- Parameters
basis_file – an absolute filename on disk, or a filelike object
use_first – if False (default), raise an exception if more than one basis set is found. If it is True, instead, use the first available basis set.
store_basis (bool) – If false, the BasisSetData objects are not stored in the database.
- Return (basis, created)
where basis is the BasisSetData object, and create is either True if the object was created, or False if the object was retrieved from the DB.
-
property
md5sum
¶ Return the md5 hash of the basis set.
- Returns
-
property
metadata
¶ Return the attribute data as a nested dictionary.
- Returns
metadata dict
-
open
(mode='r')[source]¶ Return an open file handle to the content of this data node.
- Parameters
mode – the mode with which to open the file handle
- Returns
a file handle in read mode
-
classmethod
prepare_and_validate_inputs
(structure, basissets=None, basis_family=None)[source]¶ validate and prepare a dictionary mapping elements of the structure to a BasisSetData node, for use as input to a calculation
- Parameters
structure (aiida.StructureData) –
basissets (dict) – a dictionary where keys are the symbol names and value are BasisSetData nodes
basis_family (str) – basis set family name to use
- Raises
ValueError – if neither basissets or basis_family is specified or if no BasisSetData is found for every element in the structure
-
set_file
(basis_file)[source]¶ Pre-parse the file to store the attributes and content separately.
- Parameters
basis_file (str or filelike) –
- Raises
ValueError – a file has already been set for this BasisSetData instance
-
store
(with_transaction=True, use_cache=None)[source]¶ Store a new node in the DB, also saving its repository directory and attributes, and reparsing the file so that the md5 and the element are correctly reset.
After being called attributes cannot be changed anymore! Instead, extras can be changed only AFTER calling this store() function.
- Note
After successful storage, those links that are in the cache, and for which also the parent node is already stored, will be automatically stored. The others will remain unstored.
- Parameters
with_transaction – if False, no transaction is used. This is meant to be used ONLY if the outer calling function has already a transaction open!
-
classmethod
upload_basisset_family
(folder, group_name, group_description, stop_if_existing=True, extension='.basis', dry_run=False)[source]¶ Upload a set of Basis Set files in a given group.
- Parameters
folder – a path (str or pathlib.Path) containing all Basis Set files to be added. Only files ending in set extension (case-sensitive) considered
group_name – the name of the group to create. If it exists and is non-empty, a UniquenessError is raised.
group_description – a string to be set as the group description. Overwrites previous descriptions, if the group was existing.
stop_if_existing – if True, check for the md5 of the files and, if file already exists in the DB, raises a MultipleObjectsError. If False, simply adds the existing BasisSetData node to the group.
extension – the filename extension to look for
dry_run – If True, do not change the database.
-
class
aiida_crystal17.data.basis_set.
BasisSetFamily
(label=None, user=None, description='', type_string=None, backend=None)[source]¶ Bases:
aiida.orm.groups.Group
Group that represents a basis set family containing BasisSetData nodes.
Create a new group. Either pass a dbgroup parameter, to reload a group from the DB (and then, no further parameters are allowed), or pass the parameters for the Group creation.
Deprecated since version 1.2.0: The parameter type_string will be removed in v2.0.0 and is now determined automatically.
- Parameters
label (str) – The group label, required on creation
description (str) – The group description (by default, an empty string)
user (
aiida.orm.User
) – The owner of the group (by default, the automatic user)type_string (str) – a string identifying the type of group (by default, an empty string, indicating an user-defined group.
-
_abc_impl
= <_abc_data object>¶
-
_type_string
= 'crystal17.basisset'¶
-
aiida_crystal17.data.basis_set.
md5_from_string
(string, encoding='utf-8')[source]¶ Return md5 hash of a string.
- Parameters
string – the string to hash
encoding – the encoding to use
- Returns
-
aiida_crystal17.data.basis_set.
parse_basis
(basis_file)[source]¶ Get relevant information from the basis file.
- Parameters
basis_file – absolute path to a file or open filelike object
- Returns
(metadata_dict, content_str)
The basis file must contain one basis set in the CRYSTAL17 format
blank lines and lines beginning ‘#’ will be ignored
the file can also start with a fenced (with —), yaml formatted header section (Note keys should not contain ‘.’s)
Example
# an ignored comment --- author: J Smith year: 1999 --- 8 2 1 0 3 2. 0. 1 1 3 6. 0.
-
aiida_crystal17.data.basis_set.
retrieve_basis_sets
(files, stop_if_existing)[source]¶ Retrieve existing basis sets or create if them, if they do not exist.
- Parameters
files – list of basis set file paths
stop_if_existing – if True, check for the md5 of the files and, if the file already exists in the DB, raises a MultipleObjectsError. If False, simply adds the existing BasisSetData node to the group.
- Returns
aiida_crystal17.data.gcube module¶
Aiida data type to store a gaussian cube.
-
class
aiida_crystal17.data.gcube.
GaussianCube
(fileobj, binary=True, **kwargs)[source]¶ Bases:
aiida.orm.nodes.data.data.Data
Aiida data type to store a gaussian cube.
The file is stored within a compressed zip folder, reducing storage space.
The specification can be found at: http://h5cube-spec.readthedocs.io/en/latest/cubeformat.html
CRYSTAL outputs include DENSCUBE.DAT, SPINCUBE.DAT, POTCUBE.DAT.
Store a gaussian cube file.
- Parameters
-
_abc_impl
= <_abc_data object>¶
-
_compression_method
= 8¶
-
_cube_filename
= 'gaussian.cube'¶
-
_logger
= <Logger aiida_crystal17.data.gcube.GaussianCube (WARNING)>¶
-
_plugin_type_string
= 'data.crystal17.gcube.GaussianCube.'¶
-
_query_type_string
= 'data.crystal17.gcube.'¶
-
_zip_filename
= 'gcube.zip'¶
-
compute_integration_atom
(indices, radius, pbc=True, True, True)[source]¶ Integrate the density over a sphere.
-
compute_integration_sphere
(positions, radius, pbc=True, True, True)[source]¶ Integrate the density over a sphere.
-
get_cube_data
(return_density=False, dist_units='angstrom')[source]¶ Parse gaussian cube files to a data structure.
- Parameters
- Returns
- Return type
aiida_crystal17.data.input_params module¶
-
class
aiida_crystal17.data.input_params.
CryInputParamsData
(data=None, unflatten=False, **kwargs)[source]¶ Bases:
aiida.orm.nodes.data.data.Data
stores a validated dictionary of input parameters for CryMainCalculations
stores a validated dictionary of input parameters for CryMainCalculations
- Parameters
-
_abc_impl
= <_abc_data object>¶
-
_data_schema
= {'$schema': 'http://json-schema.org/draft-04/schema#', 'additionalProperties': False, 'description': 'Allowed Inputs For CRYSTAL17 .d12 file', 'properties': {'basis_set': {'additionalProperties': False, 'description': 'Basis sets input and control', 'properties': {'CHARGED': {'description': 'forces the overall system to be neutral even when the number of electrons in the reference cell is different from the sum of nuclear charges, by adding a uniform background charge density to neutralize the charge in the reference cell.', 'type': 'boolean'}}, 'title': 'Block 2', 'type': 'object'}, 'geometry': {'additionalProperties': False, 'description': 'Geometry input, manipulation and optimisation control', 'properties': {'ROTCRY': {'description': 'Rotation of the crystal with respect to the reference system cell. Can be null (AUTO), array(3) (ANGROT), or array((3,3)) (MATROT)', 'items': {'items': {'type': 'number'}, 'maxItems': 3, 'minItems': 3, 'type': ['number', 'array']}, 'maxItems': 3, 'minItems': 3, 'type': ['null', 'array']}, 'info_external': {'description': 'keywords for external output', 'items': {'enum': ['COORPRT', 'EXTPRT', 'FINDSYM', 'STRUCPRT', 'SYMMOPS'], 'type': 'string', 'uniqueItems': True}, 'type': 'array'}, 'info_print': {'description': 'keywords for printing', 'items': {'enum': ['ATOMSYMM', 'MAKESAED', 'PRSYMDIR', 'SYMMDIR', 'SYMMOPS', 'PRINTCHG'], 'type': 'string', 'uniqueItems': True}, 'type': 'array'}, 'optimise': {'additionalProperties': False, 'description': 'optimisation block inputs', 'properties': {'convergence': {'additionalProperties': False, 'description': 'optimisation convergence criteria', 'properties': {'FINALRUN': {'description': 'run final Wf single point scf with optimized geometry', 'maximum': 4, 'minimum': 1, 'type': 'integer'}, 'MAXCYCLE': {'description': 'max number of optimization steps', 'minimum': 1, 'type': 'integer'}, 'TOLDEE': {'description': 'total energy difference between two steps', 'minimum': 1, 'type': 'integer'}, 'TOLDEG': {'description': 'RMS of the gradient', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'number'}, 'TOLDEX': {'description': 'RMS of the displacement', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'number'}}, 'type': 'object'}, 'gradient': {'description': 'the minimisation gradient to use', 'enum': ['NUMGRATO', 'NUMGRCEL', 'NUMGRALL'], 'type': 'string'}, 'hessian': {'description': 'the initial hessian matrix to use', 'enum': ['HESSIDEN', 'HESSMOD1', 'HESSMOD2', 'HESSNUM', 'HESSOPT'], 'type': 'string'}, 'info_print': {'description': 'keywords for printing', 'items': {'enum': ['PRINTFORCES', 'PRINTHESS', 'PRINTOPT', 'PRINT'], 'type': 'string', 'uniqueItems': True}, 'type': 'array'}, 'restart': {'default': False, 'description': 'whether to insert the RESTART command (requires an OPTINFO.DAT file to be present)', 'type': 'boolean'}, 'type': {'description': 'the optimisation type', 'enum': ['FULLOPTG', 'CELLONLY', 'INTREDUN', 'ITATOCEL', 'CVOLOPT'], 'type': 'string'}}, 'type': ['object', 'boolean']}}, 'title': 'Block 1', 'type': 'object'}, 'scf': {'additionalProperties': False, 'dependencies': {'dft': {'not': {'required': ['single']}}, 'single': {'not': {'required': ['dft']}}}, 'description': 'Single particle Hamiltonian and SCF control', 'properties': {'GUESSP': {'default': False, 'description': 'whether to insert the GUESSP command (requires a fort.20 file to be present)', 'type': 'boolean'}, 'dft': {'additionalProperties': False, 'description': 'the exchange-correlation functional to use', 'properties': {'SPIN': {'description': 'whether to use spin polarisation', 'type': 'boolean'}, 'd3': {'additionalProperties': False, 'description': 'C6 based London dispersion correction', 'properties': {'A1': {'type': 'number'}, 'A2': {'type': 'number'}, 'ABC': {'default': False, 'type': 'boolean'}, 'CNRADIUS': {'type': 'number'}, 'RADIUS': {'type': 'number'}, 'RS6': {'type': 'number'}, 'RS8': {'type': 'number'}, 'S6': {'type': 'number'}, 'S8': {'type': 'number'}, 'VERSION': {'default': 4, 'maximum': 4, 'minimum': 2, 'type': 'integer'}}, 'type': 'object'}, 'grid': {'description': 'the (pruned) integration grid', 'enum': ['OLDGRID', 'LGRID', 'XLGRID', 'XXLGRID'], 'type': 'string'}, 'grid_weights': {'description': 'the grid point weights of the integration grid', 'enum': ['BECKE', 'SAVIN'], 'type': 'string'}, 'numerical': {'additionalProperties': False, 'definition': 'Numerical accuracy and computational parameters control', 'properties': {'LIMBEK': {'description': 'size of local arrays for integration weights', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'TOLLDENS': {'description': 'density tolerance', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'TOLLGRID': {'description': 'grid weight tolerance', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}}, 'type': 'object'}, 'xc': {'description': 'the exchange-correlation functional', 'oneOf': [{'type': 'array', 'additionalItems': False, 'items': [{'type': 'string', 'enum': ['LDA', 'VBH', 'BECKE', 'PBE', 'PBESOL', 'PWGGA', 'mPW91', 'SOGGA', 'WCGGA']}, {'type': 'string', 'enum': ['PZ', 'VBH', 'VWN', 'LYP', 'PBE', 'PBESOL', 'PWGGA', 'PWLSD', 'WL']}]}, {'type': 'string', 'enum': ['SVWN', 'BLYP', 'PBEXC', 'PBESOLXC', 'SOGGAXC', 'B3PW', 'B3LYP', 'PBE0', 'PBESOL0', 'B1WC', 'WC1LYP', 'B97H', 'PBE0-13', 'HSE06', 'HSESOL', 'SC-BLYP', 'HISS', 'RSHXLDA', 'wB97', 'wB97X', 'LC-wPBE', 'LC-wPBESOL', 'LC-wBLYP', 'LC-BLYP', 'CAM-B3LYP', 'M06L', 'B2PLYP', 'B2GPPLYP', 'mPW2PLYP', 'DHYBRID']}, {'type': 'object', 'additionalProperties': False, 'minProperties': 1, 'maxProperties': 1, 'properties': {'LSRSH-PBE': {'type': 'array', 'additionalItems': False, 'minItems': 3, 'items': [{'description': 'value of the length scale separation, w', 'type': 'number', 'minimum': 0, 'exclusiveMinimum': True}, {'description': 'value of the coefficient for the SR-HF exchange term', 'type': 'number', 'minimum': 0, 'exclusiveMinimum': True}, {'description': 'value of the coefficient for the LR-HF exchange term', 'type': 'number', 'minimum': 0, 'exclusiveMinimum': True}]}}}]}}, 'required': ['xc'], 'type': 'object'}, 'fock_mixing': {'description': 'convergence acceleration tool', 'oneOf': [{'type': 'string', 'enum': ['DIIS', 'DIISALLK', 'SLOSHING', 'NODIIS', 'ANDERSON']}, {'type': 'object', 'additionalProperties': False, 'minProperties': 1, 'maxProperties': 1, 'properties': {'BROYDEN': {'type': 'array', 'minItems': 3, 'maxitems': 3, 'items': [{'description': 'W0 parameter in Anderson’s paper', 'type': 'number', 'minimum': 0, 'exclusiveMinimum': True}, {'description': 'percent of Fock/KS matrices mixing when Broyden method is switched on', 'type': 'integer', 'minimum': 0, 'exclusiveMinimum': True}, {'description': 'SCf iteration after which Broyden method is active', 'type': 'integer', 'minimum': 2}]}}}]}, 'k_points': {'description': 'The IS and ISP value to use for SHRINK, IS can be a single value or a value for each direction', 'items': [{'type': ['integer', 'array'], 'minimum': 1, 'minItems': 3, 'maxItems': 3, 'items': {'type': 'integer', 'minimum': 1}}, {'type': 'integer', 'minimum': 1}], 'maxItems': 2, 'minItems': 2, 'type': 'array'}, 'numerical': {'additionalProperties': False, 'definition': 'Numerical accuracy and computational parameters control', 'properties': {'BIPOLAR': {'additionalItems': False, 'description': 'Bipolar expansion approximation control', 'items': [{'description': 'overlap threshold for Coulomb', 'type': 'integer', 'minimum': 0, 'exclusiveMinimum': True}, {'description': 'overlap threshold for Exchange', 'type': 'integer', 'minimum': 0, 'exclusiveMinimum': True}], 'minItems': 2, 'type': 'array'}, 'BIPOSIZE': {'description': 'Size of buffer for Coulomb integrals bipolar expansion', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'EXCHPERM': {'description': 'use permutation of centers in exchange integrals', 'type': 'boolean'}, 'EXCHSIZE': {'description': 'Size of buffer for Exchange integrals bipolar expansion', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'FMIXING': {'description': 'Fock/KS matrix (cycle i and i-1) mixing', 'minimum': 0, 'type': 'integer'}, 'ILASIZE': {'description': 'Maximum size of array ILA for 2-electron integral calculation', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'INTGPACK': {'description': 'Choice of integrals package', 'maximum': 3, 'minimum': 0, 'type': 'integer'}, 'LEVSHIFT': {'additionalItems': False, 'description': 'Eigenvalue level shifting', 'items': [{'description': 'The level shifter is set to ISHIFT*0.1 hartree', 'type': 'integer', 'minimum': 0, 'exclusiveMinimum': True}, {'description': 'locking on/off', 'type': 'integer', 'minimum': 0, 'maximum': 1}], 'minItems': 2, 'type': 'array'}, 'MADELIND': {'description': 'reciprocal lattice vector indices for Madelung sums', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'MAXCYCLE': {'description': 'maximum number of cycles', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'NOBIPCOU': {'description': 'Coulomb bielectronic integrals computed exactly', 'type': 'boolean'}, 'NOBIPEXCH': {'description': 'Exchange bielectronic integrals computed exactly', 'type': 'boolean'}, 'NOBIPOLA': {'description': 'All bielectronic integrals computed exactly', 'type': 'boolean'}, 'POLEORDR': {'description': 'Maximum order of multipolar expansion', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'SMEAR': {'description': 'temperature smearing of Fermi surface', 'minimum': 0, 'type': 'number'}, 'TOLDEE': {'description': 'convergence on total energy', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'TOLINTEG': {'description': 'Bipolar expansion approximation control', 'items': {'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'maxItems': 5, 'minItems': 5, 'type': 'array'}, 'TOLPSEUD': {'description': 'Pseudopotential tolerance', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}}, 'type': 'object'}, 'post_scf': {'description': 'keywords for post SCF calculations', 'items': {'enum': ['FULLTIME', 'POSTSCF', 'EXCHGENE', 'GRADCAL', 'PPAN'], 'type': 'string', 'uniqueItems': True}, 'type': 'array'}, 'single': {'enum': ['RHF', 'UHF', 'MP2'], 'type': 'string'}, 'spinlock': {'additionalProperties': False, 'description': 'the difference between alpha and beta electrons is fixed for initial scf cycles', 'maxProperties': 1, 'minProperties': 1, 'properties': {'BETALOCK': {'description': 'lock the number of beta electrons [nbeta, ncycles]', 'items': {'type': 'integer'}, 'maxItems': 2, 'minItems': 2, 'type': 'array'}, 'SPINLOC2': {'description': 'fills separately the alpha and beta bands with the appropriate # of electrons [nalpha-nbeta, ncycles]', 'items': [{'type': 'number'}, {'type': 'integer'}], 'maxItems': 2, 'minItems': 2, 'type': 'array'}, 'SPINLOCK': {'description': 'shift the eigenvalues in order to lock the system in a specific spin state [nalpha-nbeta, ncycles]', 'items': {'type': 'integer'}, 'maxItems': 2, 'minItems': 2, 'type': 'array'}}, 'type': 'object'}}, 'required': ['k_points'], 'title': 'Block 3', 'type': 'object'}, 'title': {'description': 'the title of the run', 'type': 'string'}}, 'required': ['scf'], 'title': 'CRYSTAL17 Input', 'type': 'object'}¶
-
_logger
= <Logger aiida_crystal17.data.input_params.CryInputParamsData (WARNING)>¶
-
_plugin_type_string
= 'data.crystal17.parameters.CryInputParamsData.'¶
-
_query_type_string
= 'data.crystal17.parameters.'¶
-
_update_attributes
(data)[source]¶ Update the current attribute with the keys provided in the dictionary.
- Parameters
data – a dictionary with the keys to substitute. It works like dict.update(), adding new keys and overwriting existing keys.
-
_validate
()[source]¶ Perform validation of the Data object.
Note
validation of data source checks license and requires attribution to be provided in field ‘description’ of source in the case of any CC-BY* license. If such requirement is too strict, one can remove/comment it out.
-
property
data
¶ Return an instance of AttributeManager that transforms the dictionary into an attribute dict.
Note
this will allow one to do node.dict.key as well as node.dict[key].
- Returns
an instance of the AttributeResultManager.
-
data_schema
= {'$schema': 'http://json-schema.org/draft-04/schema#', 'additionalProperties': False, 'description': 'Allowed Inputs For CRYSTAL17 .d12 file', 'properties': {'basis_set': {'additionalProperties': False, 'description': 'Basis sets input and control', 'properties': {'CHARGED': {'description': 'forces the overall system to be neutral even when the number of electrons in the reference cell is different from the sum of nuclear charges, by adding a uniform background charge density to neutralize the charge in the reference cell.', 'type': 'boolean'}}, 'title': 'Block 2', 'type': 'object'}, 'geometry': {'additionalProperties': False, 'description': 'Geometry input, manipulation and optimisation control', 'properties': {'ROTCRY': {'description': 'Rotation of the crystal with respect to the reference system cell. Can be null (AUTO), array(3) (ANGROT), or array((3,3)) (MATROT)', 'items': {'items': {'type': 'number'}, 'maxItems': 3, 'minItems': 3, 'type': ['number', 'array']}, 'maxItems': 3, 'minItems': 3, 'type': ['null', 'array']}, 'info_external': {'description': 'keywords for external output', 'items': {'enum': ['COORPRT', 'EXTPRT', 'FINDSYM', 'STRUCPRT', 'SYMMOPS'], 'type': 'string', 'uniqueItems': True}, 'type': 'array'}, 'info_print': {'description': 'keywords for printing', 'items': {'enum': ['ATOMSYMM', 'MAKESAED', 'PRSYMDIR', 'SYMMDIR', 'SYMMOPS', 'PRINTCHG'], 'type': 'string', 'uniqueItems': True}, 'type': 'array'}, 'optimise': {'additionalProperties': False, 'description': 'optimisation block inputs', 'properties': {'convergence': {'additionalProperties': False, 'description': 'optimisation convergence criteria', 'properties': {'FINALRUN': {'description': 'run final Wf single point scf with optimized geometry', 'maximum': 4, 'minimum': 1, 'type': 'integer'}, 'MAXCYCLE': {'description': 'max number of optimization steps', 'minimum': 1, 'type': 'integer'}, 'TOLDEE': {'description': 'total energy difference between two steps', 'minimum': 1, 'type': 'integer'}, 'TOLDEG': {'description': 'RMS of the gradient', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'number'}, 'TOLDEX': {'description': 'RMS of the displacement', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'number'}}, 'type': 'object'}, 'gradient': {'description': 'the minimisation gradient to use', 'enum': ['NUMGRATO', 'NUMGRCEL', 'NUMGRALL'], 'type': 'string'}, 'hessian': {'description': 'the initial hessian matrix to use', 'enum': ['HESSIDEN', 'HESSMOD1', 'HESSMOD2', 'HESSNUM', 'HESSOPT'], 'type': 'string'}, 'info_print': {'description': 'keywords for printing', 'items': {'enum': ['PRINTFORCES', 'PRINTHESS', 'PRINTOPT', 'PRINT'], 'type': 'string', 'uniqueItems': True}, 'type': 'array'}, 'restart': {'default': False, 'description': 'whether to insert the RESTART command (requires an OPTINFO.DAT file to be present)', 'type': 'boolean'}, 'type': {'description': 'the optimisation type', 'enum': ['FULLOPTG', 'CELLONLY', 'INTREDUN', 'ITATOCEL', 'CVOLOPT'], 'type': 'string'}}, 'type': ['object', 'boolean']}}, 'title': 'Block 1', 'type': 'object'}, 'scf': {'additionalProperties': False, 'dependencies': {'dft': {'not': {'required': ['single']}}, 'single': {'not': {'required': ['dft']}}}, 'description': 'Single particle Hamiltonian and SCF control', 'properties': {'GUESSP': {'default': False, 'description': 'whether to insert the GUESSP command (requires a fort.20 file to be present)', 'type': 'boolean'}, 'dft': {'additionalProperties': False, 'description': 'the exchange-correlation functional to use', 'properties': {'SPIN': {'description': 'whether to use spin polarisation', 'type': 'boolean'}, 'd3': {'additionalProperties': False, 'description': 'C6 based London dispersion correction', 'properties': {'A1': {'type': 'number'}, 'A2': {'type': 'number'}, 'ABC': {'default': False, 'type': 'boolean'}, 'CNRADIUS': {'type': 'number'}, 'RADIUS': {'type': 'number'}, 'RS6': {'type': 'number'}, 'RS8': {'type': 'number'}, 'S6': {'type': 'number'}, 'S8': {'type': 'number'}, 'VERSION': {'default': 4, 'maximum': 4, 'minimum': 2, 'type': 'integer'}}, 'type': 'object'}, 'grid': {'description': 'the (pruned) integration grid', 'enum': ['OLDGRID', 'LGRID', 'XLGRID', 'XXLGRID'], 'type': 'string'}, 'grid_weights': {'description': 'the grid point weights of the integration grid', 'enum': ['BECKE', 'SAVIN'], 'type': 'string'}, 'numerical': {'additionalProperties': False, 'definition': 'Numerical accuracy and computational parameters control', 'properties': {'LIMBEK': {'description': 'size of local arrays for integration weights', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'TOLLDENS': {'description': 'density tolerance', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'TOLLGRID': {'description': 'grid weight tolerance', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}}, 'type': 'object'}, 'xc': {'description': 'the exchange-correlation functional', 'oneOf': [{'type': 'array', 'additionalItems': False, 'items': [{'type': 'string', 'enum': ['LDA', 'VBH', 'BECKE', 'PBE', 'PBESOL', 'PWGGA', 'mPW91', 'SOGGA', 'WCGGA']}, {'type': 'string', 'enum': ['PZ', 'VBH', 'VWN', 'LYP', 'PBE', 'PBESOL', 'PWGGA', 'PWLSD', 'WL']}]}, {'type': 'string', 'enum': ['SVWN', 'BLYP', 'PBEXC', 'PBESOLXC', 'SOGGAXC', 'B3PW', 'B3LYP', 'PBE0', 'PBESOL0', 'B1WC', 'WC1LYP', 'B97H', 'PBE0-13', 'HSE06', 'HSESOL', 'SC-BLYP', 'HISS', 'RSHXLDA', 'wB97', 'wB97X', 'LC-wPBE', 'LC-wPBESOL', 'LC-wBLYP', 'LC-BLYP', 'CAM-B3LYP', 'M06L', 'B2PLYP', 'B2GPPLYP', 'mPW2PLYP', 'DHYBRID']}, {'type': 'object', 'additionalProperties': False, 'minProperties': 1, 'maxProperties': 1, 'properties': {'LSRSH-PBE': {'type': 'array', 'additionalItems': False, 'minItems': 3, 'items': [{'description': 'value of the length scale separation, w', 'type': 'number', 'minimum': 0, 'exclusiveMinimum': True}, {'description': 'value of the coefficient for the SR-HF exchange term', 'type': 'number', 'minimum': 0, 'exclusiveMinimum': True}, {'description': 'value of the coefficient for the LR-HF exchange term', 'type': 'number', 'minimum': 0, 'exclusiveMinimum': True}]}}}]}}, 'required': ['xc'], 'type': 'object'}, 'fock_mixing': {'description': 'convergence acceleration tool', 'oneOf': [{'type': 'string', 'enum': ['DIIS', 'DIISALLK', 'SLOSHING', 'NODIIS', 'ANDERSON']}, {'type': 'object', 'additionalProperties': False, 'minProperties': 1, 'maxProperties': 1, 'properties': {'BROYDEN': {'type': 'array', 'minItems': 3, 'maxitems': 3, 'items': [{'description': 'W0 parameter in Anderson’s paper', 'type': 'number', 'minimum': 0, 'exclusiveMinimum': True}, {'description': 'percent of Fock/KS matrices mixing when Broyden method is switched on', 'type': 'integer', 'minimum': 0, 'exclusiveMinimum': True}, {'description': 'SCf iteration after which Broyden method is active', 'type': 'integer', 'minimum': 2}]}}}]}, 'k_points': {'description': 'The IS and ISP value to use for SHRINK, IS can be a single value or a value for each direction', 'items': [{'type': ['integer', 'array'], 'minimum': 1, 'minItems': 3, 'maxItems': 3, 'items': {'type': 'integer', 'minimum': 1}}, {'type': 'integer', 'minimum': 1}], 'maxItems': 2, 'minItems': 2, 'type': 'array'}, 'numerical': {'additionalProperties': False, 'definition': 'Numerical accuracy and computational parameters control', 'properties': {'BIPOLAR': {'additionalItems': False, 'description': 'Bipolar expansion approximation control', 'items': [{'description': 'overlap threshold for Coulomb', 'type': 'integer', 'minimum': 0, 'exclusiveMinimum': True}, {'description': 'overlap threshold for Exchange', 'type': 'integer', 'minimum': 0, 'exclusiveMinimum': True}], 'minItems': 2, 'type': 'array'}, 'BIPOSIZE': {'description': 'Size of buffer for Coulomb integrals bipolar expansion', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'EXCHPERM': {'description': 'use permutation of centers in exchange integrals', 'type': 'boolean'}, 'EXCHSIZE': {'description': 'Size of buffer for Exchange integrals bipolar expansion', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'FMIXING': {'description': 'Fock/KS matrix (cycle i and i-1) mixing', 'minimum': 0, 'type': 'integer'}, 'ILASIZE': {'description': 'Maximum size of array ILA for 2-electron integral calculation', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'INTGPACK': {'description': 'Choice of integrals package', 'maximum': 3, 'minimum': 0, 'type': 'integer'}, 'LEVSHIFT': {'additionalItems': False, 'description': 'Eigenvalue level shifting', 'items': [{'description': 'The level shifter is set to ISHIFT*0.1 hartree', 'type': 'integer', 'minimum': 0, 'exclusiveMinimum': True}, {'description': 'locking on/off', 'type': 'integer', 'minimum': 0, 'maximum': 1}], 'minItems': 2, 'type': 'array'}, 'MADELIND': {'description': 'reciprocal lattice vector indices for Madelung sums', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'MAXCYCLE': {'description': 'maximum number of cycles', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'NOBIPCOU': {'description': 'Coulomb bielectronic integrals computed exactly', 'type': 'boolean'}, 'NOBIPEXCH': {'description': 'Exchange bielectronic integrals computed exactly', 'type': 'boolean'}, 'NOBIPOLA': {'description': 'All bielectronic integrals computed exactly', 'type': 'boolean'}, 'POLEORDR': {'description': 'Maximum order of multipolar expansion', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'SMEAR': {'description': 'temperature smearing of Fermi surface', 'minimum': 0, 'type': 'number'}, 'TOLDEE': {'description': 'convergence on total energy', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'TOLINTEG': {'description': 'Bipolar expansion approximation control', 'items': {'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}, 'maxItems': 5, 'minItems': 5, 'type': 'array'}, 'TOLPSEUD': {'description': 'Pseudopotential tolerance', 'exclusiveMinimum': True, 'minimum': 0, 'type': 'integer'}}, 'type': 'object'}, 'post_scf': {'description': 'keywords for post SCF calculations', 'items': {'enum': ['FULLTIME', 'POSTSCF', 'EXCHGENE', 'GRADCAL', 'PPAN'], 'type': 'string', 'uniqueItems': True}, 'type': 'array'}, 'single': {'enum': ['RHF', 'UHF', 'MP2'], 'type': 'string'}, 'spinlock': {'additionalProperties': False, 'description': 'the difference between alpha and beta electrons is fixed for initial scf cycles', 'maxProperties': 1, 'minProperties': 1, 'properties': {'BETALOCK': {'description': 'lock the number of beta electrons [nbeta, ncycles]', 'items': {'type': 'integer'}, 'maxItems': 2, 'minItems': 2, 'type': 'array'}, 'SPINLOC2': {'description': 'fills separately the alpha and beta bands with the appropriate # of electrons [nalpha-nbeta, ncycles]', 'items': [{'type': 'number'}, {'type': 'integer'}], 'maxItems': 2, 'minItems': 2, 'type': 'array'}, 'SPINLOCK': {'description': 'shift the eigenvalues in order to lock the system in a specific spin state [nalpha-nbeta, ncycles]', 'items': {'type': 'integer'}, 'maxItems': 2, 'minItems': 2, 'type': 'array'}}, 'type': 'object'}}, 'required': ['k_points'], 'title': 'Block 3', 'type': 'object'}, 'title': {'description': 'the title of the run', 'type': 'string'}}, 'required': ['scf'], 'title': 'CRYSTAL17 Input', 'type': 'object'}¶
aiida_crystal17.data.kinds module¶
-
class
aiida_crystal17.data.kinds.
KindData
(data=None, **kwargs)[source]¶ Bases:
aiida.orm.nodes.data.data.Data
stores additional data for StructureData Kinds
Stores the kind data for a structure
- Parameters
data – the data to set, e.g. {‘kind_names’: [‘Fe’], ‘spin_alpha’: [True], ‘spin_beta’: [False]}
-
_abc_impl
= <_abc_data object>¶
-
_data_schema
= {'$schema': 'http://json-schema.org/draft-07/schema', 'additionalProperties': False, 'patternProperties': {'.+': {'type': 'array'}}, 'properties': {'kind_names': {'items': {'type': 'string'}, 'minimum': 1, 'type': 'array', 'uniqueItems': True}}, 'required': ['kind_names'], 'title': 'additional kind data', 'type': 'object'}¶
-
_logger
= <Logger aiida_crystal17.data.kinds.KindData (WARNING)>¶
-
_plugin_type_string
= 'data.crystal17.kinds.KindData.'¶
-
_query_type_string
= 'data.crystal17.kinds.'¶
-
_update_attributes
(data)[source]¶ Update the current attribute with the keys provided in the dictionary.
- Parameters
data – a dictionary with the keys to substitute. It works like dict.update(), adding new keys and overwriting existing keys.
-
_validate
()[source]¶ Perform validation of the Data object.
Note
validation of data source checks license and requires attribution to be provided in field ‘description’ of source in the case of any CC-BY* license. If such requirement is too strict, one can remove/comment it out.
-
property
data
¶ Return an instance of AttributeManager that transforms the dictionary into an attribute dict.
Note
this will allow one to do node.dict.key as well as node.dict[key].
- Returns
an instance of the AttributeResultManager.
-
data_schema
= {'$schema': 'http://json-schema.org/draft-07/schema', 'additionalProperties': False, 'patternProperties': {'.+': {'type': 'array'}}, 'properties': {'kind_names': {'items': {'type': 'string'}, 'minimum': 1, 'type': 'array', 'uniqueItems': True}}, 'required': ['kind_names'], 'title': 'additional kind data', 'type': 'object'}¶
-
property
field_dict
¶ Return an AttributeDict with nested keys <field>.<kind_name> = value
-
property
kind_dict
¶ Return an AttributeDict with nested keys <kind_name>.<field> = value
aiida_crystal17.data.symmetry module¶
-
class
aiida_crystal17.data.symmetry.
SymmetryData
(**kwargs)[source]¶ Bases:
aiida.orm.nodes.data.data.Data
Stores data regarding the symmetry of a structure
symmetry operations are stored on file (in the style of ArrayData)
the rest of the values (and the number of symmetry operators) are stored as attributes in the database
Stores the symmetry data for a structure
symmetry operations are stored on file (in the style of ArrayData)
the rest of the values are stored as attributes in the database
- Parameters
data – the data to set
-
_abc_impl
= <_abc_data object>¶
-
_data_schema
= {'$schema': 'http://json-schema.org/draft-07/schema', 'additionalProperties': True, 'properties': {'basis': {'description': 'whether the symmetry operations are fractional or cartesian', 'enum': ['fractional', 'cartesian'], 'type': 'string'}, 'computation': {'description': 'details of the computation', 'type': 'object'}, 'equivalent_sites': {'description': 'mapping table to equivalent atomic sites', 'items': {'type': 'integer'}, 'type': 'array'}, 'hall_number': {'description': 'Hall number defining the symmetry group', 'maximum': 530, 'minimum': 1, 'type': ['null', 'integer']}, 'operations': {'description': 'symmetry operations, should at least include the unity operation', 'items': {'description': 'each item should be a list of [r00,r10,r20,r01,r11,r21,r02,r12,r22,t0,t1,t2]', 'items': {'type': 'number'}, 'maxItems': 12, 'minItems': 12, 'type': 'array'}, 'minItems': 1, 'type': 'array', 'uniqueItems': True}}, 'required': ['hall_number', 'operations', 'basis'], 'title': 'structure symmetry settings', 'type': 'object'}¶
-
_logger
= <Logger aiida_crystal17.data.symmetry.SymmetryData (WARNING)>¶
-
_ops_filename
= 'operations.npy'¶
-
_plugin_type_string
= 'data.crystal17.symmetry.SymmetryData.'¶
-
_query_type_string
= 'data.crystal17.symmetry.'¶
-
_update_attributes
(data)[source]¶ Update the current attribute with the keys provided in the dictionary.
- Parameters
data – a dictionary with the keys to substitute. It works like dict.update(), adding new keys and overwriting existing keys.
-
_validate
()[source]¶ Perform validation of the Data object.
Note
validation of data source checks license and requires attribution to be provided in field ‘description’ of source in the case of any CC-BY* license. If such requirement is too strict, one can remove/comment it out.
-
compare_operations
(ops, decimal=5)[source]¶ compare operations against stored ones
- Parameters
ops – list of (flattened) symmetry operations
decimal – number of decimal points to round values to
- Returns
dict of differences
-
property
data
¶ Return the data as an AttributeDict
-
data_schema
= {'$schema': 'http://json-schema.org/draft-07/schema', 'additionalProperties': True, 'properties': {'basis': {'description': 'whether the symmetry operations are fractional or cartesian', 'enum': ['fractional', 'cartesian'], 'type': 'string'}, 'computation': {'description': 'details of the computation', 'type': 'object'}, 'equivalent_sites': {'description': 'mapping table to equivalent atomic sites', 'items': {'type': 'integer'}, 'type': 'array'}, 'hall_number': {'description': 'Hall number defining the symmetry group', 'maximum': 530, 'minimum': 1, 'type': ['null', 'integer']}, 'operations': {'description': 'symmetry operations, should at least include the unity operation', 'items': {'description': 'each item should be a list of [r00,r10,r20,r01,r11,r21,r02,r12,r22,t0,t1,t2]', 'items': {'type': 'number'}, 'maxItems': 12, 'minItems': 12, 'type': 'array'}, 'minItems': 1, 'type': 'array', 'uniqueItems': True}}, 'required': ['hall_number', 'operations', 'basis'], 'title': 'structure symmetry settings', 'type': 'object'}¶
-
property
hall_number
¶
-
property
num_symops
¶
-
set_data
(data)[source]¶ Replace the current data with another one.
- Parameters
data – The dictionary to set.
-
property
spacegroup_info
¶ Translate Hall number to space group type information. Returned as an attribute dict
Module contents¶
Data types provided by plugin
Register data types via the “aiida.data” entry point in setup.json.