castep_outputs.utilities.datatypes

Contents

castep_outputs.utilities.datatypes#

Types produced by castep_outputs.

Module Attributes

ParserFunction

Parser protocol

AtomIndex

CASTEP atom keys.

ThreeVector

Standard 3D vector.

ComplexThreeVector

Complex 3D vector.

SixVector

Voigt notation vector.

ThreeByThreeMatrix

Three by three matrix.

AtomPropBlock

Atom properties linking unique atom to a physical property.

BondData

Full bond information for all pairs.

Classes

BandStructure

Band structure table information.

BondInfo

Single-bond information from final bonding report.

CellInfo

Information from cell block data.

CharTable

Character table from group theory analysis of eigenvectors.

ConstraintsReport

Constraints block information.

DelocActiveSpace

Information about delocalised internal coordinates.

DelocInternalsTable

Table of delocalised internal coordinates.

DipoleTable

Molecular dipole status.

ElasticProperties

Elastic properties as measured from elastic calculation.

FinalConfig

Final configuration following optimisation.

GeomTable

Mid-run geom opt status table.

GeomTableElem

Element of mid-run geom opt status.

HeaderAtomInfo

Atom info from header.

InitialSpin

Initial spins as read from cell file.

InternalConstraints

Internal constraints information.

KPoint

Single \(k\)-point definition.

KPointsList

\(k\)-points list specification.

KPointsSpec

\(k\)-point grid specification.

MDInfo

Per-step MD information block.

MemoryEst

Memory estimate.

MullikenInfo

Mulliken population analysis report.

Occupancies

SCF Band occupancies report.

PSPotDebugInfo

Debugging information from pseudopotential information.

PSPotElecStruct

Reference electronic structure detail.

PSPotEnergy

PS pot energy minimisation summary.

PSPotProj

Pseudopotential projector information.

PSPotReport

PS pot report from table summary.

PSPotStrInfo

Information about pseudopotential string.

PSPotTableInfo

Information from the PS pot table summary.

PhononSymmetryReport

Symmetry analysis report for phonon calculations.

QData

Phonon Q-Point data.

RamanReport

Raman susceptibility report.

SCFContrib

Contributions making up total SCF state.

SCFDebugInfo

SCF full verbosity output summary.

SCFReport

Full SCF report summary.

SCFSection

SCF step component.

StandardHeader

Standard header from CASTEP outputs.

SymmetryReport

Symmetry block information.

Symop

Symmetry operation definition.

TDDFTData

Time-dependent DFT information.

Thermodynamics

Thermodynamic properties.

WvfnLineMin

Wavefunction minimisation report.

castep_outputs.utilities.datatypes.AtomIndex#

CASTEP atom keys.

castep_outputs.utilities.datatypes.AtomPropBlock#

Atom properties linking unique atom to a physical property.

class castep_outputs.utilities.datatypes.BandStructure[source]#

Bases: TypedDict

Band structure table information.

band: tuple[int, ...]#

Band number.

energy: tuple[float, ...]#

Energy in eV.

kpgrp: int#

\(k\)-point group.

kx: float#

\(k\)-point x coordinate.

ky: float#

\(k\)-point y coordinate.

kz: float#

\(k\)-point z coordinate.

spin: int#

Band spin.

castep_outputs.utilities.datatypes.BondData#

Full bond information for all pairs.

class castep_outputs.utilities.datatypes.BondInfo[source]#

Bases: TypedDict

Single-bond information from final bonding report.

length: float#

Length of bond in Ang.

population: float#

Electronic population of bond in fundamental charge.

spin: float | None#

Total spin in bond.

class castep_outputs.utilities.datatypes.CellInfo[source]#

Bases: TypedDict

Information from cell block data.

cell_angles: ThreeVector#

Cell lattice angles in Degrees.

density_amu: float#

Density of cell in atomic mass units / Ang^3.

density_g: float#

Density of cell in grams / Ang^3

lattice_parameters: ThreeVector#

Cell side lengths in Ang.

real_lattice: ThreeByThreeMatrix#

Lattice parameters as 3x3 matrix.

recip_lattice: ThreeByThreeMatrix#

Reciprocal space lattice as 3x3 matrix.

volume: float#

Total volume of cell in Ang^3

class castep_outputs.utilities.datatypes.CharTable[source]#

Bases: TypedDict

Character table from group theory analysis of eigenvectors.

chars: tuple[tuple[str, int], ...]#

List of symmetry operations for each point.

mul: int#

Multiplolarity.

name: str#

Point group name.

rep: str#

Irreducible representation.

castep_outputs.utilities.datatypes.ComplexThreeVector#

Complex 3D vector.

class castep_outputs.utilities.datatypes.ConstraintsReport[source]#

Bases: TypedDict

Constraints block information.

cell_constraints: tuple[int, int, int, int, int, int]#

Constraints on a,b,c,:math:alpha,:math:beta,:math:gamma.

0 implies fixed, matching indices are tied.

com_constrained: bool#

Whether centre of mass is constrained.

ionic_constraints: dict[castep_outputs.utilities.datatypes.AtomIndex, castep_outputs.utilities.datatypes.ThreeByThreeMatrix]#

Nonlinear constraints on ions.

number_of_cell_constraints: int#

Number of constraints on cell vectors.

number_of_ionic_constraints: int#

Number of constraints on ions.

class castep_outputs.utilities.datatypes.DelocActiveSpace[source]#

Bases: TypedDict

Information about delocalised internal coordinates.

active_space_size: int#

Size of the active space.

num_dof: int#

Number of degrees of freedom.

num_primitive_internals: int#

Number of primitive internal coordinates.

class castep_outputs.utilities.datatypes.DelocInternalsTable[source]#

Bases: TypedDict

Table of delocalised internal coordinates.

constraint_mapping: dict[int, int]#

Dictionary mapping constraint ID to primative.

num_angles: int#

Number of angular coordinates.

num_bonds: int#

Number of bond coordinates.

num_dihedrals: int#

Number of dihedral coordinates.

num_internals: int#

Total number of internal coordinates.

class castep_outputs.utilities.datatypes.DipoleTable[source]#

Bases: TypedDict

Molecular dipole status.

centre_electronic: ThreeVector#

Weighted average position of electronic charge in system in Ang.

centre_positive: ThreeVector#

Weighted average position of positive ionic charge in system in Ang.

dipole_direction: ThreeVector#

Direction vector of dipole.

dipole_magnitude: float#

Magnitude of dipole moment in Debye.

total_ionic: float#

Total charge in system in fundamental charge.

total_valence: float#

Total valence charge in system in fundamental charge.

class castep_outputs.utilities.datatypes.ElasticProperties[source]#

Bases: TypedDict

Elastic properties as measured from elastic calculation.

bulk_modulus: ThreeVector#

Bulk Modulus in GPa.

longitudinal_waves: float#

Average longitudinal speed of sound in Ang/ps.

poisson_ratios: SixVector#

Poisson Ratios.

shear_modulus: ThreeVector#

Shear Modulus in GPa.

speed_of_sound: ThreeByThreeMatrix#

Speed of sound in Ang/ps.

transverse_waves: float#

Average transverse speed of sound in Ang/ps.

young_s_modulus: ThreeVector#

Young’s Modulus in GPa.

class castep_outputs.utilities.datatypes.FinalConfig[source]#

Bases: TypedDict

Final configuration following optimisation.

atoms: AtomPropBlock#

Positions of atoms in cell in Ang.

cell: CellInfo#

Cell info block denoting final state.

final_bulk_modulus: float#

Estimated bulk modulus in GPa.

final_enthalpy: float#

Estimated enthalpy in eV.

class castep_outputs.utilities.datatypes.GeomTable[source]#

Bases: TypedDict

Mid-run geom opt status table.

de_ion: GeomTableElem#

Energy/ion in eV.

dr_max: GeomTableElem#

Maximum ion step between optimisation steps in Ang.

f_max: GeomTableElem#

Maximum force in system in eV/Ang.

smax: GeomTableElem#

Strain on system in GPa.

class castep_outputs.utilities.datatypes.GeomTableElem[source]#

Bases: TypedDict

Element of mid-run geom opt status.

converged: bool#

Whether component has converted.

tolerance: float#

Current tolerance limit.

value: float#

Current measured value.

class castep_outputs.utilities.datatypes.HeaderAtomInfo[source]#

Bases: TypedDict

Atom info from header.

index: tuple[int, ...]#

Atom indices.

mass: tuple[float, ...]#

Atom masses.

spec: list[str]#

Atom species.

u: tuple[float, ...]#

Positions in u.

v: tuple[float, ...]#

Positions in v.

w: tuple[float, ...]#

Positions in w.

class castep_outputs.utilities.datatypes.InitialSpin[source]#

Bases: TypedDict

Initial spins as read from cell file.

fix: bool#

Whether spin can vary.

magmom: float#

Magnetic moment in Bohr magnetons.

spin: float#

Spin as spin quantum number.

class castep_outputs.utilities.datatypes.InternalConstraints[source]#

Bases: TypedDict

Internal constraints information.

constraints: dict[int, castep_outputs.utilities.datatypes.ThreeVector]#

Dictionary mapping constraint index to constraints.

current: float#

Current value of constraint.

satisfied: bool#

Whether the constraint is satisfied.

target: float | None#

Required constraint value; None if satisfied.

type: Literal['Bond', 'Angle', 'Torsion']#

Constraint type.

class castep_outputs.utilities.datatypes.KPoint[source]#

Bases: TypedDict

Single \(k\)-point definition.

qpt: ThreeVector#

\(k\)-point position.

weight: float#

\(k\)-point weighting.

class castep_outputs.utilities.datatypes.KPointsList[source]#

Bases: TypedDict

\(k\)-points list specification.

num_kpoints: int#

Number of \(k\)-points.

points: list[KPoint]#

List of \(k\)-points.

class castep_outputs.utilities.datatypes.KPointsSpec[source]#

Bases: TypedDict

\(k\)-point grid specification.

kpoint_mp_grid: tuple[int, int, int]#

Monkhurst-Pack Grid.

kpoint_mp_offset: ThreeVector#

Monkhurst-Pack offset in 1/Ang.

num_kpoints: int#

Number of \(k\)-points.

class castep_outputs.utilities.datatypes.MDInfo[source]#

Bases: TypedDict

Per-step MD information block.

hamilt_energy: float#

Hamiltonian energy in eV.

kinetic_energy: float#

Kinetic energy in eV.

\(\mathcal{K} = \sum\limits^{N}\frac{1}{2}mv^{2}\)

potential_energy: float#

Potential energy in eV.

temperature: float#

Kinetic temperature in eV.

\(T = k_{B} \frac{\left<2\mathcal{K}\right>}{3N}\)

time: float#

Current MD time passed in s.

total_energy: float#

Sum of KE and PE.

class castep_outputs.utilities.datatypes.MemoryEst[source]#

Bases: TypedDict

Memory estimate.

disk: float#

Estimated disk usage in MiB.

memory: float#

Estimated RAM usage in MiB.

class castep_outputs.utilities.datatypes.MullikenInfo[source]#

Bases: TypedDict

Mulliken population analysis report.

Notes

In case of spin_sep == True, the properties: total, s, p, d and f also have spin-separated components (up and down) e.g. up_total, down_s.

charge: float#

Total charge in fundamental charge.

spin: float#

Total spin.

spin_sep: bool#

Whether orbitals are split by spins.

total: float#

Number of electrons in all orbitals.

class castep_outputs.utilities.datatypes.Occupancies[source]#

Bases: TypedDict

SCF Band occupancies report.

band: int#

Band index.

eigenvalue: float#

Total eigenvalue.

occupancy: float#

Calculated occupancy.

class castep_outputs.utilities.datatypes.PSPotDebugInfo[source]#

Bases: TypedDict

Debugging information from pseudopotential information.

eigenvalue: float#

Eigenvalue of nl

nl: int#

Nonlocal orbital number.

type: Literal['AE', 'PS']#

Type of ?

class castep_outputs.utilities.datatypes.PSPotElecStruct[source]#

Bases: TypedDict

Reference electronic structure detail.

energy: float#

Energy of orbital.

occupation: float#

Electronic occupancy of shell.

orb: str#

Orbital e.g. 6d3/2.

class castep_outputs.utilities.datatypes.PSPotEnergy[source]#

Bases: TypedDict

PS pot energy minimisation summary.

charge_spilling: tuple[float, ...]#

Spin spilling from pure state.

pseudo_atomic_energy: float#

Electronic energy of atom.

class castep_outputs.utilities.datatypes.PSPotProj[source]#

Bases: TypedDict

Pseudopotential projector information.

orbital: int#

Electronic orbital.

shell: Literal['s', 'p', 'd', 'f']#

Electronic shell state.

type: Literal['U', 'UU', 'N', 'L', 'G', 'H', 'P', 'LG', 'LL', 'GG', 'LGG', None]#

Pseudopotential projector handling. Type can be:

  • U - a single ultrasoft projector.

  • UU - Two ultrasoft projectors.

  • N - a single norm-conserving projector.

  • L - use this projector as the local component.

  • G - an ultrasoft GIPAW Gamma projector.

  • H - an norm-conserving GIPAW Gamma projector.

  • P - Dummy: do not make a projector.

  • LG - Make Gammas for local channel (not done by default).

An unlabelled projector will be None

class castep_outputs.utilities.datatypes.PSPotReport[source]#

Bases: TypedDict

PS pot report from table summary.

augmentation_charge_rinner: tuple[float, ...]#

Argumentation charge nodification.

detail: PSPotStrInfo#

Full breakdown of PSPot string.

element: str#

Chemical element being calculated.

ionic_charge: float#

Core charge of ion.

level_of_theory: Literal['LDA']#

Level of DFT theory used.

partial_core_correction: tuple[float, ...]#

Correction to partial core charge.

pseudopotential_definition: PSPotTableInfo#

Pseudopotential breakdown of projectors.

reference_electronic_structure: list[PSPotElecStruct]#

Outer electronic orbital set.

solver: Literal['Koelling-Harmon', 'Schroedinger', 'ZORA', 'Dirac (FR)', 'Unknown']#

Pseudopotential calculator.

class castep_outputs.utilities.datatypes.PSPotStrInfo[source]#

Bases: TypedDict

Information about pseudopotential string.

Notes

Further info on PSPot strings:

beta_radius: float#

Pseudisation radius for augmentation functions (\(\beta\)) in Bohr.

coarse: float#

Estimated cut-off energy for coarse precision in Ha.

core_radius: float#

Pseudisation radius for pseudo-core charge in Bohr.

fine: float#

Estimated cut-off energy for fine precision in Ha.

local_channel: int#

0, 1, 2 for s, p, d respectively.

medium: float#

Estimated cut-off energy for medium precision in Ha.

opt: list[str]#

Extra options.

print: bool#

Print detailed debug information of PSpot.

proj: str#

Projection

projectors: tuple[PSPotProj, ...]#

All pseudopotential projectors.

r_inner: float#

Pseudisation radius for augmentation functions in Bohr.

string: str#

Total PSPot string.

class castep_outputs.utilities.datatypes.PSPotTableInfo[source]#

Bases: TypedDict

Information from the PS pot table summary.

beta: float | str#

The projector name.

e: float#

Energy of corresponding orbital.

j: int#

Spin quantum number.

l: int#

Angular momentum quantum number.

norm: Literal[0, 1]#

1=Norm-conserving, 0=Ultrasoft

rc: float#

Orbital cutoff.

scheme: Literal['2b', 'es', 'ev', 'fh', 'pn', 'pv', 'qb', 'qc', 'tm']#

Pseudisation scheme.

  • qc - qc tuned.

  • tm - Troullier-Martins pseudosation scheme.

  • pn - Polynomial fit.

  • pb - Bessel fit.

  • es - “extra soft” scheme.

  • esr=val - Extra-soft with explicit specification of r_c.

  • nonlcc - Do not generate of unscreen with a pseudo-core charge.

  • schro - Use non-relativistic schroedinger equation for AE calculation (default is scalar relativistic eqn).

  • aug - Explicitly turn on augmentation charges.

  • scpsp - Generate a self-consistent pseudopotential.

castep_outputs.utilities.datatypes.ParserFunction#

Parser protocol

class castep_outputs.utilities.datatypes.PhononSymmetryReport[source]#

Bases: TypedDict

Symmetry analysis report for phonon calculations.

mat: tuple[tuple[int | float, ...], ...]#

Matrix of symmetry operations.

title: str#

Class/type of analysis.

class castep_outputs.utilities.datatypes.QData[source]#

Bases: TypedDict

Phonon Q-Point data.

char_table: CharTable#

Group theory analysis at Q-point.

frequency: tuple[float, ...]#

Frequencies

ir_active: tuple[Literal['Y', 'N'], ...]#

IR Active.

ir_intensity: tuple[float, ...]#

IR Intensities.

irrep: tuple[str, ...]#

Irreducible representation.

n: tuple[int, ...]#

IDs

qpt: ThreeVector#

Q-Point in 1/Ang.

raman_active: tuple[Literal['Y', 'N'], ...]#

Raman active.

raman_intensity: tuple[float, ...]#

Raman intensities.

class castep_outputs.utilities.datatypes.RamanReport[source]#

Bases: TypedDict

Raman susceptibility report.

depolarisation: float | None#

Depolarisation ratio in 0.5 A/amu.

ii: float#

\(\sum\limits_{i} \sigma{}_{ii}^{2} -\) \(\sum\limits_{i,j} \sigma{}_{ij}\sigma{}_{ji}\)

tensor: ThreeByThreeMatrix#

Raman susceptibility.

trace: float#

Trace of susceptibility.

class castep_outputs.utilities.datatypes.SCFContrib[source]#

Bases: TypedDict

Contributions making up total SCF state.

apolar_correction: float#

Correction for apolarity.

electronic_entropy_term_ts: float#

Correction for electronic entropy (TS).

ewald_energy_const: float#

Ewald contribution.

exchange_correlation_energy: float#

XC energy.

fermi_energy: float#

Fermi energy.

hartree_energy: float#

Hartree energy.

hubbard_u_correction: float#

Hubbard U component.

kinetic_energy: float#

Kinetic contribution.

local_pseudopotential_energy: float#

PSPot contribution.

non_coulombic_energy_const: float#

Non coulombic energy constraint.

non_local_energy: float#

NLXC contribution.

potential_energy_total: float#

Potential energy total.

total_free_energy_e_ts: float#

Free energy.

xc_correction: float#

Correction to XC energy.

class castep_outputs.utilities.datatypes.SCFDebugInfo[source]#

Bases: TypedDict

SCF full verbosity output summary.

contributions: SCFContrib#

Contributions making up total state.

eigenvalue: list[SCFSection]#

SCF iterative solution.

kinetic_eigenvalue: list[float]#

Eigenvalue with kinetic contribution.

no_bands: int#

Number of bands in calculation.

class castep_outputs.utilities.datatypes.SCFReport[source]#

Bases: TypedDict

Full SCF report summary.

constraint_energy: float#

Energy in constraint (if constrained).

debug_info: SCFDebugInfo#

SCF Debug information at high verbosity.

density_residual: float | None#

Density mixing residual.

dipole_corr_energy: float#

Total energy difference due to dipole correction.

eigenvalue: list[SCFSection]#

Eigenvalue breakdown of minimisation.

energy: float#

System energy in eV.

energy_gain: float#

Energy difference in step.

fermi_energy: float#

Calculated Fermi energy.

kinetic_eigenvalue: float#

Kinetic eigenvalue at each band.

no_bands: int#

Number of bands to minimise.

time: float#

Wall time since start.

class castep_outputs.utilities.datatypes.SCFSection[source]#

Bases: TypedDict

SCF step component.

change: float#

Difference between initial and final in eV.

final: float#

Final energy in eV.

initial: float#

Initial energy in eV.

castep_outputs.utilities.datatypes.SixVector#

Voigt notation vector.

class castep_outputs.utilities.datatypes.StandardHeader[source]#

Bases: TypedDict

Standard header from CASTEP outputs.

Includes:

  • phonon

  • phonon_dos

  • efield

  • tddft

  • bands

coords: HeaderAtomInfo | dict[AtomIndex, ThreeVector]#

Atomic info.

unit_cell: ThreeByThreeMatrix#

System box.

class castep_outputs.utilities.datatypes.SymmetryReport[source]#

Bases: TypedDict

Symmetry block information.

maximum_deviation_from_symmetry: str#

Largest deviation from ideal symmetry in Ang.

n_primitives: int#

Number of primitive cells in system.

number_of_symmetry_operations: int#

Number of symmetry operations.

point_group_of_crystal: str#

Space group.

space_group_of_crystal: str#

Point group.

symop: list[Symop]#

List of all symmetry operations.

class castep_outputs.utilities.datatypes.Symop[source]#

Bases: TypedDict

Symmetry operation definition.

displacement: ThreeVector#

Displacement vector for symop.

rotation: ThreeByThreeMatrix#

Rotational transformation for symop.

List of atoms which are identical under symmetry.

class castep_outputs.utilities.datatypes.TDDFTData[source]#

Bases: TypedDict

Time-dependent DFT information.

energy: float#

State energy in eV.

error: float#

Estimated error.

type: str#

Spurious, Single, Doublet, etc.

Type:

Whether state is

class castep_outputs.utilities.datatypes.Thermodynamics[source]#

Bases: TypedDict

Thermodynamic properties.

Notes

See https://www.tcm.phy.cam.ac.uk/castep/documentation/WebHelp/content/modules/castep/thcastepthermo.htm for more info.

cv: tuple[float, ...]#

Heat capacity in J/mol/K.

e: tuple[float, ...]#

Temperature dependence of energy in eV.

f: tuple[float, ...]#

Free energy in eV.

s: tuple[float, ...]#

Entropy in J/mol/K.

t: tuple[float, ...]#

Temperature in K.

zero_point_energy: float#

Zero-point energy in eV.

castep_outputs.utilities.datatypes.ThreeByThreeMatrix#

Three by three matrix.

castep_outputs.utilities.datatypes.ThreeVector#

Standard 3D vector.

class castep_outputs.utilities.datatypes.WvfnLineMin[source]#

Bases: TypedDict

Wavefunction minimisation report.

gain: tuple[float, ...]#

Energy change in eV.

init_de_dstep: float#

Estimated gradient.

init_energy: float#

Energy before minimisation.

steps: tuple[float, ...]#

Steps in units.