aiida_vasp.calcs.vasp#
This module contains the class that prepares a specific VASP calculation.
Module Contents#
Classes#
General-purpose VASP calculation. |
Functions#
List unique elements in input list, in order of first occurrence. |
|
Return a list of ordered unique symbols in the structure |
API#
- class aiida_vasp.calcs.vasp.VaspCalculation(*args, **kwargs)[source]#
Bases:
aiida_vasp.calcs.base.VaspCalcBaseGeneral-purpose VASP calculation.
By default retrieves only the ‘OUTCAR’, ‘vasprun.xml’, ‘CONTCAR’ and Wannier90 input / output objects. These objects are deleted after parsing. Additional retrieve objects can be specified via the
settings['ADDITIONAL_RETRIEVE_TEMPORARY_LIST']input. In addition, if you want to keep any objects after parsing, put them insettings['ADDITIONAL_RETRIEVE_LIST']which is empty by default.Floating point precision for writing POSCAR objects can be adjusted using
settings['poscar_precision'], default: 10The following assumes you are familiar with the AiiDA data structures and how to set up and run an AiiDA calculation in general.
Example usage:
from aiida.orm import CalculationFactory, DataFactory from aiida.work import submit proc = CalculationFactory('vasp.vasp').process() inputs = proc.get_inputs_template() inputs.parameter = <Dict with INCAR params> inputs.structure = <StructureData> inputs.kpoints = <KpointsData> inputs.settings = <Dict with parser settings etc.> inputs.potential = DataFactory('vasp.potcar').get_potcars_from_structure(structure, ...) inputs.code = <Code representing vasp on your cluster> submit(proc, **inputs)
Which is very similar to the workchain example.
Since we do not want the content parsers to know about the AiiDA infrastructure, i.e. processes etc. we have no access to the exit codes defined on the CalcJob. We thus have to deal with failures in parsing directly in the write calls here.
Initialization
Construct a CalcJob instance.
Construct the instance only if it is a sub class of CalcJob, otherwise raise InvalidOperation.
See documentation of
aiida.engine.Process.- _VASP_OUTPUT = 'vasp_output'#
- _ALWAYS_RETRIEVE_LIST = None#
- _query_type_string = 'vasp.vasp'#
- _plugin_type_string = 'vasp.vasp'#
- prepare_for_submission(folder: aiida.common.folders.Folder) aiida.common.CalcInfo[source]#
Add all objects to the list of objects to be retrieved.
Notice that we here utilize both the retrieve batch of objects, which are always stored after retrieval and the temporary retrieve list which is automatically cleared after parsing.
- _need_kp() bool[source]#
Return wether an input kpoints node is needed or not.
- Return output:
True if input kpoints node is needed False otherwise needs ‘parameters’ input to be set.
- _need_chgcar() bool[source]#
Test wether an charge_densities input is needed or not.
- Return output:
True if CHGCAR must be present False otherwise.
- _need_wavecar() bool[source]#
Test wether a wavefunctions input is needed or not.
- Return output:
True if WAVECAR must be present used False otherwise.
- _structure() aiida.orm.StructureData[source]#
Get the input structure as AiiDa StructureData.
This is required in order to support CifData as input as well.
- write_additional(folder: aiida.common.folders.Folder, calcinfo: aiida.common.CalcInfo) None[source]#
Write CHGAR and WAVECAR if needed.
- write_incar(dst: str, validate_tags: bool = True) None[source]#
Write the INCAR.
Passes the parameters node (Dict) from to the INCAR parser for preparation and writes to dst.
- Parameters:
dst – absolute path of the object to write to
- write_poscar(dst: str) None[source]#
Write the POSCAR.
Passes the structures node (StructureData) to the POSCAR parser for preparation and writes to dst.
- Parameters:
dst – absolute path of the object to write to
- write_potcar(dst: str) None[source]#
Concatenates multiple POTCARs into one in the same order as the elements appear in POSCAR.
- Parameters:
dst – absolute path of the object to write to