aiida_cusp.data package¶
-
class
aiida_cusp.data.
VaspKpointData
(kpoints=None, structure=None)¶ Bases:
aiida.orm.nodes.data.dict.Dict
AiiDA compatible node representing a VASP k-point grid based on the
Kpoints
datatype.Parameters: - kpoints (
pymatgen.io.vasp.inputs.Kpoints
or dict) – k-point grid definitions either given as a dictionary to call the internal initialization modes or directly as a pymatgenpymatgen.io.vasp.inputs.Kpoints
object. - structure (
Structure
,Poscar
orStructureData
) – calculation input structure (optional, only required if k-points are initialized from a density)
-
get_description
()¶ Return a descriptive string of the stored k-point contents.
-
get_kpoints
()¶ Create and return a
pymatgen.io.vasp.inputs.Kpoints
instance initialized from the node’s stored k-point data contents.Returns: a pymatgen Kpoints instance Return type: pymatgen.io.vasp.inputs.Kpoints
-
write_file
(filename)¶ Write the stored k-point grid data to VASP input file.
File creation is redirected to the
pymatgen.io.vasp.inputs.Kpoints.write_file()
method and the created output file will be formatted as VASP input file (KPOINTS)Parameters: filename (str) – destination for the output file including the desired output filename Returns: None
- kpoints (
-
class
aiida_cusp.data.
VaspPoscarData
(*args, **kwargs)¶ Bases:
aiida.orm.nodes.data.dict.Dict
-
get_aiida_structure
()¶ Create and return a
aiida.orm.StructureData
instance from the node’s stored structure data contentsReturns: an AiiDA StructureData
instanceReturn type: aiida.orm.StructureData
-
get_atoms
()¶ Create and return a
ase.Atoms
instance from the node’s stored structure data contentsReturns: an ASE-Atoms instance Return type: ase.Atoms
-
get_description
()¶ Return a short descriptive string for the stored structure data contents containing the structural composition. :return: structural composition of the stored structure :rtype: str
-
get_poscar
()¶ Create and return a
pymatgen.io.vasp.inputs.Poscar
instance initialized from the node’s stored structure data contents.Returns: a pymatgen Poscar instance Return type: pymatgen.io.vasp.inputs.Poscar
-
get_structure
()¶ Create and return a
pymatgen.core.structure.Structure
instance from the node’s stored structure data contents.Returns: a pymatgen Structure instance Return type: pymatgen.core.structure.Structure
-
write_file
(filename)¶ Write the stored Poscar contents to VASP input file.
File creation is redirected to the
pymatgen.io.vasp.inputs.Poscar.write_file()
method and the created output file will be formatted as VASP input file (POSCAR)Parameters: filename (str) – destination for the output file including the desired output filename Returns: None
-
-
class
aiida_cusp.data.
VaspIncarData
(incar=None)¶ Bases:
aiida.orm.nodes.data.dict.Dict
AiiDA compatible node representing a VASP incar data object based on the
Incar
datatype.Parameters: incar (dict or Incar
) – input parameters used to construct theIncar
object or a incar object itself (Note: may also be set to None to initialize an empty incar object and use the VASP default parameters)-
get_incar
()¶ Create and return a
Incar
instance initialized from the node’s stored incar data contents.Returns: a pymatgen Incar data instance Return type: pymatgen.io.vasp.inputs.Incar
-
write_file
(filename)¶ Write the stored incar data to VASP input file.
Output of the contents to the file is redirected to the
pymatgen.io.vasp.inputs.Incar.write_file()
method and the created output file will be formatted as VASP input file (INCAR)Parameters: filename (str) – destination for writing the output file Returns: None
-
-
class
aiida_cusp.data.
VaspPotcarData
(*args, **kwargs)¶ Bases:
aiida.orm.nodes.data.dict.Dict
Pseudopotential input datatype for VASP calculations.
Contrary to the related VaspPotcarFile class this object does not contain any proprietary potential information and only stores the potential’s uuid value and the unique potential identifiers (name, functional, version and the content hash)
-
element
¶ Make associated potential element a property
-
filenode_uuid
¶ Make associated potential UUID a property
-
classmethod
from_structure
(structure, functional, potcar_params={})¶ Create potcar input data for a given structure and functional.
Reads elements present in the passed structure and builds the input list of VaspPotcarData instances defining the potentials to be used for each element. By default the potential names are assumed to equal the corresponding element names and potentials of the latest version are used. This default behavior can be changed on a per element basis by using the potcar_params dictionary to explicitly define the potential name and / or version to be used for a given element
Assume a structure containig elements ‘A’ and ‘B’. For both elements the potentials with name ‘A_pv’ and ‘B_pv’ should be used and additionally element ‘B’ requires the use of a specific potential version, i.e. version 10000101 (Note that the version number is simply an integer representation of the creation date found in the potcar files title in the format YYYYMMDD) The above can be achived by passing the following potcar_params to the method:
potcar_params = { 'A': {'name': 'A_pv'}, 'B': {'name': 'B_pv', 'version': 10000101}, }
Note
Alternatively it is also possible to use the potcar_params to pass a simple list defining the potential names (i.e. A_pv, B_pv, …) to be used for the calculation (for all elements in the structure not defined by the passed list the default potentials will be used!) In that case potentials of the latest version are used and the method tries to figure out the elements corresponding to the potential name automatically. Because of that: make sure that each potential name starts with the corresponding element name (case sensitive!) followed by any non-letter character, for instance: Ge_d_GW, Li_sv, Cu, H1.75, etc…
Parameters: - structure (
Structure
,Poscar
,StructureData
orVaspPoscarData
) – input structure for which the potential list is generated - functional (str) – functional type of the used potentials, accepted functionals inputs are: ‘lda_us’, ‘lda’, ‘lda_52’, ‘pbe’, ‘pbe_52’, ‘pbe_54’, ‘pw91_us’ and ‘pw91’.
- potcar_params (dict or list) – optional dictionary overriding the default potential name and version used for the element given as key or a list of potential names to be used for the calculation
- structure (
-
functional
¶ Make associated potential functional a property
-
hash
¶ Make associated potential hash a property
Initialized VaspPotcarData node from given potential tags
Parameters: - name (str) – name of the potential
- version (int) – version of the potential
- functional (str) – functional of the potential
Raises: VaspPotcarDataError – if one of the non-optional parameters name, version or functional is missing
-
load_potential_file_node
()¶ Load the actual potential node associated with the potential data node
First tries to load the potential file node from the given UUID. If this fails (for instance because the VaspPotcarData node was imported from some other database) a second attempt will try to load a potential file node based on the stored content hash.
Returns: the associated VaspPotcarFile node Return type: VaspPotcarFile
Raises: VaspPotcarDataError – if no corresponding potential file node is found in the database
-
name
¶ Make associated potential name a property
-
classmethod
potcar_from_linklist
(poscar_data, linklist)¶ Assemble pymatgen Potcar object from a list of VaspPotcarData instances
Reads pseudo-potential from the passed list connecting each element with it’s potential and creates the complete Potcar file according to the element ordering fodun in the passed poscar data object.
Parameters: - poscar_data – input structure for VASP calculations
- linklist (dict) – dictionary mapping element names to VaspPotcarData instances
Returns: pymatgen Potcar data instance with containing the concatenated pseudo-potential information for all elements defined in the linklist
Return type:
-
classmethod
potcar_props_from_name_list
(potcar_name_list)¶ Create a valid potcar properties dictionary from a list of given potential names
-
version
¶ Make associated potential version a property
-
-
class
aiida_cusp.data.
VaspVasprunData
(file, filename=None, **kwargs)¶ Bases:
aiida_cusp.utils.single_archive_data.SingleArchiveData
AiiDA compatible node representing a VASP vasprun.xml output data object as gzip-compressed node in the repository.
-
get_vasprun
(**kwargs)¶ Return a
pymatgen.io.vasp.outputs.Vasprun
instance initialized from vasprun.xml data stored by the nodeGiven arguments are directly passed on to pymatgen’s Vasprun constructor. By default, a minimal setup is used to parse the vasprun.xml contents:
kwargs_default = { ionic_step_skip: None, ionic_step_offset: 0, parse_dos: False, parse_eigen: False, parse_projected_eigen: False, occu_tol: 1.0E-8, exception_on_bad_xml: True, }
However, note that the default parameters may be overridden at any time by passing the desired values when calling this function.
Parameters: - ionic_step_skip (int) – read structures and energies only for every ‘ionic_step_skip’th ionic step
- ionic_step_offset (int) – ignore energies and structures at ionic steps smaller than ‘ionic_step_offset’
- parse_dos (bool) – parse density of states from the vasprun.xml
- parse_eigen (bool) – parse eigenvalues from the vasprun.xml
- parse_projected_eigen (bool) – parse projected eigenvalues from the vasprun.xml
- occu_tol (float) – minimum occupation tolerances for determining the valence and conduction band minima
- except_on_bad_xml (bool) – throw an exception if the parsed vasprun.xml is malformed
Returns: Vasprun instance initialized from the node’s stored vasprun.xml data
Return type:
-
parser_settings
(**kwargs)¶ Update default parser settings with user defined inputs
-
-
class
aiida_cusp.data.
VaspContcarData
(*args, **kwargs)¶ Bases:
aiida_cusp.data.inputs.vasp_poscar.VaspPoscarData
AiiDA compatible node representing a VASP CONTCAR output data object
Added as separate output node for easier access when used as calculation input for restarted VASP calculations.
-
get_contcar
()¶ Create and return a
pymatgen.io.vasp.inputs.Poscar
instance initialized from the node’s stored output structure data content.Returns: a pymatgen Poscar instance Return type: pymatgen.io.vasp.inputs.Poscar
-
-
class
aiida_cusp.data.
VaspOutcarData
(file, filename=None, **kwargs)¶ Bases:
aiida_cusp.utils.single_archive_data.SingleArchiveData
AiiDA compatible node representing a VASP OUTCAR output data object as gzip-compressed node in the repository.
-
get_outcar
()¶ Return a
pymatgen.io.vasp.outputs.Outcar
instance initialized from the OUTCAR data stored by the nodeReturns: Outcar instance initialized from the node’s stored OUTCAR data Return type: Outcar
-
-
class
aiida_cusp.data.
VaspChgcarData
(file, filename=None, **kwargs)¶ Bases:
aiida_cusp.utils.single_archive_data.SingleArchiveData
AiiDA compatible node representing a VASP CHGCAR output data object as gzip-compressed node in the repository.
Added as separate output node for easier access when used as calculation input for restarted VASP calculations.
-
class
aiida_cusp.data.
VaspWavecarData
(file, filename=None, **kwargs)¶ Bases:
aiida_cusp.utils.single_archive_data.SingleArchiveData
AiiDA compatible node representing a VASP WAVECAR output data object as gzip-compressed node in the repository.
Added as separate output node for easier access when used as calculation input for restarted VASP calculations.
-
class
aiida_cusp.data.
VaspGenericData
(file, filename=None, **kwargs)¶ Bases:
aiida_cusp.utils.single_archive_data.SingleArchiveData
AiiDA compatible node representing an arbitrary VASP output data object for which no own output datatype was implemented.