castep_outputs.parsers.magres_file_parser#

Parse castep .magres files.

Functions

parse_magres_file(magres_file)

Parse castep .magres file.

Classes

AtomsInfo

Per atom magres information.

MagresInfo

NMR Magnetic reponse information.

UnitsInfo

Information on magres units.

class castep_outputs.parsers.magres_file_parser.AtomsInfo[source]#

Bases: TypedDict

Per atom magres information.

anisotropy: float#

Susceptability anisotropy.

asymmetry: float#

Asymmetry ratio.

coords: ThreeVector#

Atom coordinates.

eigenvalue: ThreeVector#

Eigenvalues in \(\sigma_{\alpha\alpha}\).

eigenvector: ThreeByThreeMatrix#

Eigenvectors in \(\sigma_{\alpha\alpha}\).

isotropic: float#

Isotropic susceptability.

class castep_outputs.parsers.magres_file_parser.MagresInfo[source]#

Bases: TypedDict

NMR Magnetic reponse information.

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

Atom coordinates

lattice: tuple[float, float, float, float, float, float, float, float, float]#

Crystal lattice.

ms: dict[castep_outputs.utilities.datatypes.AtomIndex, list[float]]#

Magnetic susceptibility tensor.

class castep_outputs.parsers.magres_file_parser.UnitsInfo[source]#

Bases: TypedDict

Information on magres units.

atom: str#

Position units.

lattice: str#

Lattice length units.

ms: str#

Magnetic reponse units.

castep_outputs.parsers.magres_file_parser.parse_magres_file(magres_file)[source]#

Parse castep .magres file.

Parameters:

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

Returns:

Parsed info.

Return type:

MagresInfo