castep_outputs.parsers.cell_param_file_parser#

Parse castep .cell and .param files.

Functions

parse_cell_file()

Parse castep .cell and param files.

parse_cell_param_file()

Parse castep .cell and param files.

parse_param_file()

Parse castep .cell and param files.

Classes

NonLinearConstraint

Non-linear constraint information.

PositionsInfo

Information from positions block.

XCDef

Information from XC definitions block.

XCDefParams

XC definition params.

class castep_outputs.parsers.cell_param_file_parser.NonLinearConstraint[source]#

Bases: TypedDict

Non-linear constraint information.

atoms: dict[castep_outputs.utilities.datatypes.AtomIndex, castep_outputs.utilities.datatypes.ThreeVector]#

Atoms and constraint definition.

key: Literal['distance', 'bend', 'torsion']#

Type of non-linear constraint.

class castep_outputs.parsers.cell_param_file_parser.PositionsInfo[source]#

Bases: TypedDict

Information from positions block.

mix_index: int#

Mixture index.

pos: ThreeVector#

Atomic position.

spin: float#

Ion spin.

units: str#

Units.

weight: float#

Mixture weight.

class castep_outputs.parsers.cell_param_file_parser.XCDef[source]#

Bases: TypedDict

Information from XC definitions block.

class castep_outputs.parsers.cell_param_file_parser.XCDefParams[source]#

Bases: TypedDict

XC definition params.

castep_outputs.parsers.cell_param_file_parser.parse_cell_file(cell_param_file)#
castep_outputs.parsers.cell_param_file_parser.parse_cell_file(cell_param_file)
castep_outputs.parsers.cell_param_file_parser.parse_cell_file(cell_param_file)

Parse castep .cell and param files.

Parameters:

cell_param_file (TextIO) – Open handle to file to parse.

Returns:

Parsed info.

Return type:

list[dict[str, str | float | tuple[float, str] | dict[str, Any] | dict[str | tuple[str, int], str | dict[str, float]] | dict[str, Sequence[str | float | dict[str, str | float]] | str | float | dict[str, str | float] | dict[str, Sequence[str | float | dict[str, str | float]] | str | float | dict[str, str | float]]] | XCDef]]

castep_outputs.parsers.cell_param_file_parser.parse_cell_param_file(cell_param_file)[source]#
castep_outputs.parsers.cell_param_file_parser.parse_cell_param_file(cell_param_file)
castep_outputs.parsers.cell_param_file_parser.parse_cell_param_file(cell_param_file)

Parse castep .cell and param files.

Parameters:

cell_param_file (TextIO) – Open handle to file to parse.

Returns:

Parsed info.

Return type:

list[dict[str, str | float | tuple[float, str] | dict[str, Any] | dict[str | tuple[str, int], str | dict[str, float]] | dict[str, Sequence[str | float | dict[str, str | float]] | str | float | dict[str, str | float] | dict[str, Sequence[str | float | dict[str, str | float]] | str | float | dict[str, str | float]]] | XCDef]]

castep_outputs.parsers.cell_param_file_parser.parse_param_file(cell_param_file)#
castep_outputs.parsers.cell_param_file_parser.parse_param_file(cell_param_file)
castep_outputs.parsers.cell_param_file_parser.parse_param_file(cell_param_file)

Parse castep .cell and param files.

Parameters:

cell_param_file (TextIO) – Open handle to file to parse.

Returns:

Parsed info.

Return type:

list[dict[str, str | float | tuple[float, str] | dict[str, Any] | dict[str | tuple[str, int], str | dict[str, float]] | dict[str, Sequence[str | float | dict[str, str | float]] | str | float | dict[str, str | float] | dict[str, Sequence[str | float | dict[str, str | float]] | str | float | dict[str, str | float]]] | XCDef]]