aiida_vasp.calcs.vasp#
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)[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.
- property _parameters#
Make sure all parameters are lowercase.
- _need_kp()[source]#
Return wether an input kpoints node is needed or not.
- Return output:
True if input kpoints node is needed (py:method::VaspCalculation.use_kpoints), False otherwise
needs ‘parameters’ input to be set (py:method::VaspCalculation.use_parameters)
- _need_chgcar()[source]#
Test wether an charge_densities input is needed or not.
- Return output:
True if CHGCAR must be present (py:method::NscfCalculation.use_charge_densities), False otherwise
needs ‘parameters’ input to be set (py:method::NscfCalculation.use_parameters)
- _need_wavecar()[source]#
Test wether a wavefunctions input is needed or not.
- Return output:
True if WAVECAR must be present used (py:method::NscfCalculation.use_wavefunctions), False otherwise
needs ‘parameters’ input to be set (py:method::NscfCalculation.use_parameters)
- _structure()[source]#
Get the input structure as AiiDa StructureData.
This is required in order to support CifData as input as well.
- write_incar(dst, validate_tags=True)[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)[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)[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
- write_kpoints(dst)[source]#
Write the KPOINTS.
Passes the kpoints node (KpointsData) to the KPOINTS parser for preparation and writes to dst.
- Parameters:
dst – absolute path of the object to write to
- classmethod immigrant(code, remote_path, **kwargs)[source]#
Returns VaspImmigrant class and associated inputs. This method will be obsolete at v3.0
- Parameters:
code – a Code instance for the code originally used.
remote_path – The directory on the code’s computer in which the simulation was run.
metadata – dict.
settings – dict. Used for non-default parsing instructions, etc.
potential_family – str.
potential_mapping – dict.
use_wavecar – bool. Try to read WAVECAR.
:param use_chgcar bool. Try to read CHGCAR.