castep_outputs.parsers.md_geom_file_parser#

Parse castep .md or .geom files.

Functions

parse_geom_file(md_geom_file)

Parse standard .md and .geom files.

parse_md_file(md_geom_file)

Parse standard .md and .geom files.

parse_md_geom_file(md_geom_file)

Parse standard .md and .geom files.

parse_md_geom_frame(block)

Parse a single frame of a .md/.geom file.

Classes

MDAtomProps

Atom properties on MD and GeomOpt.

MDGeomTimestepInfo

MD and GeomOpt output info.

class castep_outputs.parsers.md_geom_file_parser.MDAtomProps[source]#

Bases: TypedDict

Atom properties on MD and GeomOpt.

F: ThreeVector#

Alias of force

R: ThreeVector#

Alias of position

V: ThreeVector#

Alias of velocity

force: ThreeVector#

Force on atom in Ha/Bohr.

position: ThreeVector#

Position of atom in Bohr.

velocity: ThreeVector#

Velocity of atom in Bohr/aut.

class castep_outputs.parsers.md_geom_file_parser.MDGeomTimestepInfo[source]#

Bases: TypedDict

MD and GeomOpt output info.

Notes

Also contains AtomIndex keys to per-atom information.

E: list[float]#

Alias of energy.

P: list[float]#

Alias of pressure.

S: ThreeByThreeMatrix#

Alias of stress.

T: list[float]#

Alias of temperature.

energy: tuple[float, float, float]#

total, potential, kinetic.

Type:

Current energies

h: ThreeByThreeMatrix#

Alias of lattice_vectors.

hv: ThreeByThreeMatrix#

Alias of lattice_velocity.

ions: dict[AtomIndex, MDAtomProps]#

Atomic properties

lattice_vectors: ThreeByThreeMatrix#

Current cell vectors.

lattice_velocity: ThreeByThreeMatrix#

Current cell changes.

pressure: tuple[float]#

Hydrostatic pressure.

stress: ThreeByThreeMatrix#

Current stresses.

temperature: tuple[float]#

Instantaneous temperature.

time: float#

Elapsed MD Time.

castep_outputs.parsers.md_geom_file_parser.parse_geom_file(md_geom_file)#

Parse standard .md and .geom files.

Parameters:

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

Returns:

Step-by-step Parsed info.

Return type:

list[MDGeomTimestepInfo]

castep_outputs.parsers.md_geom_file_parser.parse_md_file(md_geom_file)#

Parse standard .md and .geom files.

Parameters:

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

Returns:

Step-by-step Parsed info.

Return type:

list[MDGeomTimestepInfo]

castep_outputs.parsers.md_geom_file_parser.parse_md_geom_file(md_geom_file)[source]#

Parse standard .md and .geom files.

Parameters:

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

Returns:

Step-by-step Parsed info.

Return type:

list[MDGeomTimestepInfo]

castep_outputs.parsers.md_geom_file_parser.parse_md_geom_frame(block)[source]#

Parse a single frame of a .md/.geom file.

Parameters:

block (Block) – Block containing frame of data.

Returns:

Parsed frame of data.

Return type:

MDGeomTimestepInfo