CastepInputGenerator#
- class autoplex.misc.castep.utils.CastepInputGenerator(structure=None, config_dict=<factory>, user_param_settings=<factory>, user_cell_settings=<factory>, sort_structure=True)[source]#
Bases:
object
Base class for CASTEP input set generation.
It is used to manage both .param and .cell file settings for CASTEP calculations.
- Parameters:
structure (Structure | None) – The crystal structure for the calculation
config_dict (dict) – Base configuration dictionary with default CASTEP settings
user_param_settings (dict) – User-specified .param file settings (equivalent to VASP INCAR)
user_cell_settings (dict) – User-specified .cell file settings
sort_structure (bool) – Whether to sort atoms by electronegativity before calculation
- property param_updates: dict#
Updates to the PARAM config for this calculation type.
Override this method in subclasses to define calculation-specific parameter settings.
- Returns:
Dictionary of CASTEP .param file parameters
- Return type:
dict
- property cell_updates: dict#
Updates to the CELL config for this calculation type.
Override this method in subclasses to define calculation-specific cell settings.
- Returns:
Dictionary of CASTEP .cell file parameters
- Return type:
dict
- get_input_set(structure=None)[source]#
Generate CASTEP input set as dictionary.
- Parameters:
structure (Structure | None) – Structure to use for calculation. If None, uses self.structure
- Returns:
Dictionary containing ‘param’, ‘cell’, and ‘structure’ keys
- Return type:
dict
- Raises:
ValueError – If no structure is available