aiida_chemshell.calculations.base module¶
Core ChemShell calculations module.
- class aiida_chemshell.calculations.base.ChemShellCalculation(*args: Any, **kwargs: Any)¶
Bases:
CalcJobAiiDA calculation plugin wrapper for ChemShell calculations.
- Currently supports the following tasks:
Single point energy
Geometry optimisation
- DEFAULT_INPUT_TAGS = {'calculation_parameters': ('ChemShell Calculation Parameters', 'Base parameters for the ChemShell Task object.'), 'force_field_file': ('ChemShell Force Field File', 'Force field parameters for the ChemShell MM interface.'), 'mm_parameters': ('ChemShell MM Parameters', 'Parameters for the ChemShell MM interface.'), 'optimisation_parameters': ('ChemShell Optimisation Parameters', 'Parameters for the ChemShell geometry optimisation task.'), 'qm_parameters': ('ChemShell QM Parameters', 'Parameters for the ChemShell QM Theory object.'), 'qmmm_parameters': ('ChemShell QM/MM Parameters', 'Parameters for the ChemShell QM/MM interface.'), 'structure': ('Input Chemical Structure', 'The input structure for the ChemShell calculation.'), 'structure2': ('Secondary Input Structure', 'The additional (final) input structure for the ChemShell calculation.'), 'structure_index': ('Structure Input Index', 'Index used to select a structure from a multi-structure input.')}¶
- FILE_DLFIND = '_dl_find.cjson'¶
- FILE_RESULTS = 'result.json'¶
- FILE_SCRIPT = 'chemshell_input.py'¶
- FILE_STDOUT = 'output.log'¶
- FILE_TMP_STRUCTURE = 'input_structure.xyz'¶
- FILE_TMP_STRUCTURE2 = 'input_structure_2.xyz'¶
- FILE_TRJFRC = 'path_force.xyz'¶
- FILE_TRJPTH = 'path.xyz'¶
- apply_default_input_tags() None¶
Apply default labels and descriptions to the calculation input nodes.
Iterates over the provided input nodes and, for any node defined in
DEFAULT_INPUT_TAGSthat does not already have a label or description set, assigns the corresponding default value. Existing labels and descriptions are left untouched.
- chemsh_script_generator() str¶
Generate the input script for a ChemShell calculation.
- Returns:
script – A string containing the ChemShell input script for the calculation.
- Return type:
str
- classmethod default_process_label(node) str¶
AiiDA Process label definition (Class Method).
Defines the process label to be associated with the created ProcessNode stored in the AiiDA database.
- Parameters:
node (ProcessNode) – The process (or its ProcessNode) whose inputs are inspected to build the label.
- Returns:
The process label based on what inputs have been provided.
- Return type:
str
- classmethod define(spec: CalcJobProcessSpec) None¶
Define the inputs, outputs and metadata of the ChemShell calculation.
- Parameters:
spec (CalcJobProcessSpec) – The AiiDA Process specification object for the job.
- classmethod get_mm_theory_key(theory: ChemShellMMTheory) str¶
Get the key for the MM theory interface in ChemShell.
- Parameters:
theory (ChemShellMMTheory) – The MM theory interface to get the key for.
- Returns:
The ChemShell class key for the MM theory interface.
- Return type:
str
- classmethod get_qm_theory_key(theory: ChemShellQMTheory) str¶
Get the key for the QM theory interface in ChemShell.
- Parameters:
theory (ChemShellQMTheory) – The MM theory interface to get the key for.
- Returns:
The ChemShell class key for the QM theory interface.
- Return type:
str
- classmethod get_valid_calculation_parameter_keys() tuple[str, str]¶
Return the valid parameter keys for the ChemShell Single Point calculation.
- Returns:
A tuple of valid parameter keys for the ChemShell calculation.
- Return type:
tuple[str, str]
- classmethod get_valid_mm_parameter_keys(theory: str = '') dict[str, type]¶
Return a dictionary of valid parameter keys for the ChemShell MM interface.
- Parameters:
theory (str) – The MM theory whose valid parameter keys should be returned (e.g. ‘DL_POLY’). Defaults to an empty string.
- Returns:
A mapping of valid MM parameter keys to their expected value types for the ChemShell calculation.
- Return type:
dict[str, type]
- classmethod get_valid_optimisation_parameter_keys() tuple[str]¶
Return the valid parameter keys for a ChemShell geometry optimisation task.
- Returns:
A tuple of valid optimisation parameter keys for the ChemShell calculation.
- Return type:
tuple[str]
- classmethod get_valid_qm_parameter_keys() dict¶
Return a dictionary of valid parameter keys for the ChemShell calculation.
- Returns:
A mapping of valid Theory parameter keys to their expected value types for the ChemShell calculation.
- Return type:
dict[str, type]
- prepare_for_submission(folder: Folder) CalcInfo¶
Prepare the ChemShell calculation for submission.
- Parameters:
folder (Folder) – An aiida.common.folders.Folder specifying the temporary working directory for the calculation.
- Returns:
calcInfo – An aiida.common.CalcInfo instance.
- Return type:
CalcInfo
- classmethod validate_calculation_parameters(value: Dict | None, _) str | None¶
Validate the ChemShell Single Point calculation input parameters.
- Parameters:
value (Dict | None) – A dictionary of parameters for the ChemShell calculation. If None, no validation is performed.
- Returns:
Returns None if the parameters are valid, otherwise returns an error message string.
- Return type:
str | None
- classmethod validate_inputs_namespace(value: Dict, namespace: PortNamespace) str | None¶
Perform additional validation checks on the total inputs namespace.
- classmethod validate_mm_parameters(value: Dict | None, _) str | None¶
Validate the MM interface parameter inputs to the ChemShell calculation.
- Parameters:
value (Dict | None) – A dictionary of parameters for the ChemShell calculation. If None, no validation is performed.
- Returns:
Returns None if the parameters are valid, otherwise returns an error message string.
- Return type:
str | None
- classmethod validate_optimisation_parameters(value: Dict | None, _) str | None¶
Validate the ChemShell optimisation input parameters.
- Parameters:
value (Dict | None) – A dictionary of parameters for the ChemShell geometry optimisation task. If None, no validation is performed.
- Returns:
Returns None if the parameters are valid, otherwise returns an error message string.
- Return type:
str | None
- classmethod validate_qm_parameters(value: Dict | None, _) str | None¶
Validate the Theory object parameters to be passed to the ChemShell calculation.
- Parameters:
value (Dict | None) – A dictionary of parameters for the ChemShell calculation. If None, no validation is performed.
- Returns:
Returns None if the parameters are valid, otherwise returns an error message string.
- Return type:
str | None
- classmethod validate_structure_file(value: SinglefileData | StructureData | None, _) str | None¶
Validate the ChemShell input structure file.
- Parameters:
value (SinglefileData | StructureData | None) – The input structure to validate. This can be either a file containing the structure or an AiiDA StructureData object. If None, no validation is performed.
- Returns:
Returns None if no error is found otherwise returns an error message
- Return type:
str | None