Cp2kInputGenerator¶
- class atomate2.cp2k.sets.base.Cp2kInputGenerator(user_input_settings=<factory>, user_kpoints_settings=<factory>, auto_kspacing=True, use_structure_charge=False, sort_structure=True, symprec=0.1, force_gamma=False, config_dict=<factory>)[source]¶
Bases:
InputGenerator
A class to generate Cp2k input sets.
- Parameters:
user_input_settings (dict) – Updates to the inputs in the base config dict.
user_kpoints_settings (dict | pymatgen.io.vasp.inputs.Kpoints) – Updates to the kpoint settings in the base config dict
sort_structure (bool) – Whether to sort the structure (using the default sort order of electronegativity) before generating input files. Defaults to True, the behavior you would want most of the time. This ensures that similar atomic species are grouped together.
symprec (float) – Tolerance for symmetry finding, used for line mode band structure k-points.
config_dict (dict) – The config dictionary to use containing the base input set settings.
auto_kspacing (bool)
use_structure_charge (bool)
force_gamma (bool)
- get_input_set(structure=None, prev_dir=None, optional_files=None)[source]¶
Get a CP2K input set.
Note, if both
structure
andprev_dir
are set, then the structure specified will be preferred over the final structure from the last CP2K run.- Parameters:
structure (Structure | Molecule | None) – A structure.
prev_dir (Path | str | None) – A previous directory to generate the input set from.
optional_files (dict | None | Literal[False]) – Additional files (e.g. vdw kernel file) to be included in the input set. If False, no optional files will be included. Defaults to writing a BASIS and POTENTIAL file.
- Returns:
A Cp2k input set.
- Return type:
Cp2kInput
- get_input_updates(structure, prev_input)[source]¶
Get updates to the cp2k input for this calculation type.
- Parameters:
structure (Structure) – A structure.
prev_input (Cp2kInput) – A Cp2kInput from a previous calculation.
bandgap – The band gap.
cp2k_output – A Cp2kOutput from a previous calculation.
- Returns:
A dictionary of updates to apply.
- Return type:
- get_kpoints_updates(structure, prev_input=None)[source]¶
Get updates to the kpoints configuration for this calculation type.
Note, these updates will be ignored if the user has set user_kpoint_settings.
- Parameters:
structure (Structure) – A structure.
prev_input (Cp2kInput | None) – A Cp2kInput from a previous calculation.
bandgap – The band gap.
cp2k_output – A Cp2kOutput from a previous calculation.
- Returns:
A dictionary of updates to apply to the KPOINTS config.
- Return type: