castep_outputs.cli.args

castep_outputs.cli.args#

Module containing argument parser and processing.

Module Attributes

ARG_PARSER

Main argument parser for castep outputs.

Functions

extract_parsables(args)

Extract the files to parse from the Namespace.

parse_args([to_parse])

Parse all arguments and add those caught by flags.

castep_outputs.cli.args.ARG_PARSER = ArgumentParser(prog='castep_outputs', usage=None, description='Attempts to find all files for seedname, filtered by `inc` args (default: all).\n    Explicit files can be passed using longname arguments.\n    castep_outputs can parse most castep outputs including: .castep, .cell, .param, .geom, .md, .bands, .hug, .phonon_dos, .efield, .xrd_sf, .elf_fmt, .chdiff_fmt, .pot_fmt, .den_fmt, .elastic, .ts, .magres, .tddft, .err, .phonon, .cst_esp', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)#

Main argument parser for castep outputs.

castep_outputs.cli.args.extract_parsables(args)[source]#

Extract the files to parse from the Namespace.

Parameters:

args (Namespace) – Namespace to process.

Returns:

Files to parse.

Return type:

dict[str, list[str]]

castep_outputs.cli.args.parse_args(to_parse=())[source]#

Parse all arguments and add those caught by flags.

Parameters:

to_parse (Sequence[str]) – Arguments to handle in this call.

Returns:

Parsed args.

Return type:

argparse.Namespace

Examples

parse_args()