aiida_mlip.parsers package¶
Submodules¶
aiida_mlip.parsers.base_parser module¶
Parsers provided by aiida_mlip.
- class aiida_mlip.parsers.base_parser.BaseParser(node: ProcessNode)[source]¶
Bases:
Parser
Parser class for parsing output of calculation.
- Parameters:
- nodeaiida.orm.nodes.process.process.ProcessNode
ProcessNode of calculation.
Methods
__init__(node: aiida.orm.nodes.process.process.ProcessNode)
Initialize the BaseParser instance.
parse(**kwargs: Any) -> int:
Parse outputs, store results in the database.
- Returns:
- int
An exit code.
- Raises:
- exceptions.ParsingError
If the ProcessNode being passed was not produced by a Base Calcjob.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {'CACHE_VERSION': 'int | None'}¶
- __init__(node: ProcessNode)[source]¶
Check that the ProcessNode being passed was produced by a Base Calcjob.
- Parameters:
- nodeaiida.orm.nodes.process.process.ProcessNode
ProcessNode of calculation.
- __module__ = 'aiida_mlip.parsers.base_parser'¶
- _abc_impl = <_abc._abc_data object>¶
aiida_mlip.parsers.descriptors_parser module¶
Parsers provided by aiida_mlip.
- class aiida_mlip.parsers.descriptors_parser.DescriptorsParser(node: ProcessNode)[source]¶
Bases:
SPParser
Parser class for parsing output of descriptors calculation.
Inherits from SPParser.
- Parameters:
- nodeaiida.orm.nodes.process.process.ProcessNode
ProcessNode of calculation.
- Raises:
- exceptions.ParsingError
If the ProcessNode being passed was not produced by a DescriptorsCalc.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {'CACHE_VERSION': 'int | None'}¶
- __init__(node: ProcessNode)[source]¶
Check that the ProcessNode being passed was produced by a Descriptors.
- Parameters:
- nodeaiida.orm.nodes.process.process.ProcessNode
ProcessNode of calculation.
- __module__ = 'aiida_mlip.parsers.descriptors_parser'¶
- _abc_impl = <_abc._abc_data object>¶
aiida_mlip.parsers.md_parser module¶
MD parser.
- class aiida_mlip.parsers.md_parser.MDParser(node: ProcessNode)[source]¶
Bases:
BaseParser
Parser class for parsing output of molecular dynamics simulation.
Inherits from SPParser.
- Parameters:
- nodeaiida.orm.nodes.process.process.ProcessNode
ProcessNode of calculation.
Methods
parse(**kwargs: Any) -> int:
Parse outputs, store results in the database.
- Returns:
- int
An exit code.
- Raises:
- exceptions.ParsingError
If the ProcessNode being passed was not produced by a MD.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {'CACHE_VERSION': 'int | None'}¶
- __init__(node: ProcessNode)[source]¶
Check that the ProcessNode being passed was produced by a MD.
- Parameters:
- nodeaiida.orm.nodes.process.process.ProcessNode
ProcessNode of calculation.
- __module__ = 'aiida_mlip.parsers.md_parser'¶
- _abc_impl = <_abc._abc_data object>¶
aiida_mlip.parsers.opt_parser module¶
Geom optimisation parser.
- class aiida_mlip.parsers.opt_parser.GeomOptParser(node: ProcessNode)[source]¶
Bases:
SPParser
Parser class for parsing output of geometry optimisation calculation.
Inherits from SPParser.
- Parameters:
- nodeaiida.orm.nodes.process.process.ProcessNode
ProcessNode of calculation.
Methods
parse(**kwargs: Any) -> int:
Parse outputs, store results in the database.
- Returns:
- int
An exit code.
- Raises:
- exceptions.ParsingError
If the ProcessNode being passed was not produced by a GeomOpt.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {'CACHE_VERSION': 'int | None'}¶
- __init__(node: ProcessNode)[source]¶
Check that the ProcessNode being passed was produced by a GeomOpt.
- Parameters:
- nodeaiida.orm.nodes.process.process.ProcessNode
ProcessNode of calculation.
- __module__ = 'aiida_mlip.parsers.opt_parser'¶
- _abc_impl = <_abc._abc_data object>¶
aiida_mlip.parsers.sp_parser module¶
Parsers provided by aiida_mlip.
- class aiida_mlip.parsers.sp_parser.SPParser(node: ProcessNode)[source]¶
Bases:
BaseParser
Parser class for parsing output of calculation.
- Parameters:
- nodeaiida.orm.nodes.process.process.ProcessNode
ProcessNode of calculation.
Methods
__init__(node: aiida.orm.nodes.process.process.ProcessNode)
Initialize the SPParser instance.
parse(**kwargs: Any) -> int:
Parse outputs, store results in the database.
- Returns:
- int
An exit code.
- Raises:
- exceptions.ParsingError
If the ProcessNode being passed was not produced by a SinglepointCalc.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {'CACHE_VERSION': 'int | None'}¶
- __init__(node: ProcessNode)[source]¶
Check that the ProcessNode being passed was produced by a Singlepoint.
- Parameters:
- nodeaiida.orm.nodes.process.process.ProcessNode
ProcessNode of calculation.
- __module__ = 'aiida_mlip.parsers.sp_parser'¶
- _abc_impl = <_abc._abc_data object>¶
aiida_mlip.parsers.train_parser module¶
Parser for mlip train.
- class aiida_mlip.parsers.train_parser.TrainParser(node: ProcessNode)[source]¶
Bases:
Parser
Parser class for parsing output of calculation.
- Parameters:
- nodeaiida.orm.nodes.process.process.ProcessNode
ProcessNode of calculation.
Methods
__init__(node: aiida.orm.nodes.process.process.ProcessNode)
Initialize the TrainParser instance.
parse(**kwargs: Any) -> int:
Parse outputs, store results in the database.
_get_remote_dirs(mlip_dict: [str, Any]) -> [str, Path]:
Get the remote directories based on mlip config file.
_validate_retrieved_files(output_filename: str, model_name: str) -> bool:
Validate that the expected files have been retrieved.
_save_models(model_output: Path, compiled_model_output: Path) -> None:
Save model and compiled model as outputs.
_parse_results(result_name: Path) -> None:
Parse the results file and store the results dictionary.
_save_folders(remote_dirs: [str, Path]) -> None:
Save log and checkpoint folders as outputs.
- Returns:
- int
An exit code.
- Raises:
- exceptions.ParsingError
If the ProcessNode being passed was not produced by a Train Calcjob.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {'CACHE_VERSION': 'int | None'}¶
- __init__(node: ProcessNode)[source]¶
Initialize the TrainParser instance.
- Parameters:
- nodeaiida.orm.nodes.process.process.ProcessNode
ProcessNode of calculation.
- __module__ = 'aiida_mlip.parsers.train_parser'¶
- _abc_impl = <_abc._abc_data object>¶
- _get_remote_dirs(mlip_dict: dict) dict [source]¶
Get the remote directories based on mlip config file.
- Parameters:
- mlip_dictdict
Dictionary containing mlip config file.
- Returns:
- dict
Dictionary of remote directories.
- _parse_results(result_name: Path) None [source]¶
Parse the results file and store the results dictionary.
- Parameters:
- result_namePath
Path to the result file.
- _save_folders(remote_dirs: dict) None [source]¶
Save log and checkpoint folders as outputs.
- Parameters:
- remote_dirsdict
Dictionary of remote folders.
- _save_models(model_output: Path, compiled_model_output: Path) None [source]¶
Save model and compiled model as outputs.
- Parameters:
- model_outputPath
Path to the model output file.
- compiled_model_outputPath
Path to the compiled model output file.
- _validate_retrieved_files(output_filename: str, model_name: str) bool [source]¶
Validate that the expected files have been retrieved.
- Parameters:
- output_filenamestr
The expected output filename.
- model_namestr
The name of the model as found in the config file key name.
- Returns:
- bool
True if the expected files are retrieved, False otherwise.
Module contents¶
Parsers for calculations.