aiida_cusp.data.inputs.vasp_kpoint module
Datatype and methods to initialize and interact with VASP specific KPOINTS input data
- class aiida_cusp.data.inputs.vasp_kpoint.KpointWrapper(kpoints=None, structure=None)
Bases:
objectUtility class for initializing
pymatgen.io.vasp.inputs.Kpointsdata objects.Provides a wrapper for the different initialization modes provided by the pymatgen Kpoints object. Different modes can be access by setting the ‘mode’ keyword in the kpoints dictionary and by defining the datatypes passed by the ‘kpoints’ keyword (i.e. a list of kpoints will initialize an explicit kpoint grid while passing a float to the constructor will call a density based initialization mode)
Example:
>>> kpoint_param = {'mode': 'auto', 'kpoints': 100} >>> kpts = KpointWrapper(kpoints=kpoint_params) >>> print(kpts) Automatic Mesh 0 Auto 40
- Parameters:
kpoints (dict or
Kpoints) – input parameters that are used to construct theKpointsobject or a kpoints object itselfstructure (
Structure,PoscarorStructureData) – optional input structure for the calculation required for density based kpoint initialization
- classmethod auto_int()
Initialize automatic kpoint grid following the VASP automatic mode
Example:
Automatic Mesh 0 Auto 40
- classmethod build_init_mode()
Figure out the initialization mode using the defined mode and the specified type of kpoints
- classmethod complete_parameter_list()
Complete the parameter list and perform minimal initial checking
- classmethod gamma_float()
Initialize gamma grid using a given kpoint density. Enforces the usage of gamma grids.
Example:
Automatic Kpoint Scheme 0 Gamma 5 5 5
- classmethod gamma_list()
Initialize gamma grid from a list explicitly defining the number of kpoint subdivisions along the crystal axis
Example:
Automatic Kpoint Scheme 0 Gamma 5 5 5
- classmethod line_int()
Initialize list of kpoints along a high-symmetry path through the Brillouin zone. Uses a path defined by the pymatgen HighSymmPath class with a defined number of kpoint subdivisions between the path nodes.
Example:
Line_mode KPOINTS file 100 Line_mode Reciprocal 0.0 0.0 0.0 ! Gamma 0.0 0.5 0.0 ! X 0.0 0.5 0.0 ! X ... 0.0 0.5 0.0 ! X 0.5 0.5 0.0 ! M 0.5 0.5 0.5 ! R
- classmethod monkhorst_float()
Initialize kpoint grid using a given kpoint density. If the number of subdivisions is even a Monkhorst grid is constructured whereas gamma grids are used for odd kpoint subdivisions
Example:
Automatic Kpoint Scheme 0 Monkhorst 4 4 4
- classmethod monkhorst_list()
Initialize Monkhorst grid from a list explicitly defining the number of kpoint subdivisions along the crystal axis
Example:
Automatic Kpoint Scheme 0 Monkhorst 4 4 4
- classmethod normalize(kpoint)
Normalize a given
Kpointsinstance such that defined attributes match the expected types
- classmethod validate_and_initialize()
Initialize a new Kpoint object from user inputs
- class aiida_cusp.data.inputs.vasp_kpoint.VaspKpointData(kpoints=None, structure=None)
Bases:
DictAiiDA compatible node representing a VASP k-point grid based on the
Kpointsdatatype.- Parameters:
kpoints (
pymatgen.io.vasp.inputs.Kpointsor dict) – k-point grid definitions either given as a dictionary to call the internal initialization modes or directly as a pymatgenpymatgen.io.vasp.inputs.Kpointsobject.structure (
Structure,PoscarorStructureData) – 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.Kpointsinstance initialized from the node’s stored k-point data contents.- Returns:
a pymatgen Kpoints instance
- Return type:
- 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