aiida_pythonjob_ins.data

Custom AiiDA Data types wrapping Euphonic objects.

Submodules

Classes

EuphonicCrystalData

Store a Euphonic Crystal object as an AiiDA node.

ForceConstantsData

Store a Euphonic ForceConstants object as an AiiDA node.

QpointPhononModesData

Store a Euphonic QpointPhononModes object as an AiiDA node.

Package Contents

class aiida_pythonjob_ins.data.EuphonicCrystalData(euphonic_object: Any | None = None, **kwargs)[source]

Bases: aiida_pythonjob_ins.data.base.EuphonicJSONData

Store a Euphonic Crystal object as an AiiDA node.

Note: this deliberately does not use CrystalStructureMixin – the wrapped object is the crystal (it has no .crystal attribute), so to_structure is defined directly here.

get_crystal() euphonic.Crystal[source]

Return the wrapped euphonic.Crystal.

to_structure() aiida.orm.StructureData[source]

Convert to a native AiiDA StructureData (no ASE).

to_spglib_cell() tuple[source]

Return the spglib (lattice, positions, numbers) tuple.

Delegates to euphonic’s own Crystal.to_spglib_cell.

classmethod from_structure(structure: aiida.orm.StructureData) Self[source]

Build a node from a native AiiDA StructureData.

class aiida_pythonjob_ins.data.ForceConstantsData(euphonic_object: Any | None = None, **kwargs)[source]

Bases: aiida_pythonjob_ins.data.mixins.CrystalStructureMixin, aiida_pythonjob_ins.data.base.EuphonicJSONData

Store a Euphonic ForceConstants object as an AiiDA node.

get_force_constants() euphonic.ForceConstants[source]

Return the wrapped euphonic.ForceConstants.

classmethod from_castep(filepath: str | pathlib.Path) Self[source]

Build a node by reading a CASTEP .castep_bin/.check file.

Uses the public reader ForceConstants.from_castep.

classmethod from_phonopy(**kwargs) Self[source]

Build a node from Phonopy output via ForceConstants.from_phonopy.

Requires the optional phonopy extra. Keyword arguments are forwarded (e.g. path, summary_name, fc_name).

class aiida_pythonjob_ins.data.QpointPhononModesData(euphonic_object: Any | None = None, **kwargs)[source]

Bases: aiida_pythonjob_ins.data.mixins.CrystalStructureMixin, aiida_pythonjob_ins.data.base.EuphonicJSONData

Store a Euphonic QpointPhononModes object as an AiiDA node.

get_modes() euphonic.QpointPhononModes[source]

Return the wrapped euphonic.QpointPhononModes.

to_kpoints() aiida.orm.KpointsData[source]

Convert the q-point positions to a native KpointsData.

Note: Euphonic modes carry no high-symmetry labels, so the returned KpointsData has positions only. Labels come from the KpointsData used to generate the path (see the dispersion workflow).

to_bands(kpoints: aiida.orm.KpointsData | None = None) aiida.orm.BandsData[source]

Convert to a native BandsData (frequencies as bands) for plotting.

Euphonic modes don’t carry high-symmetry labels, so pass the path KpointsData to carry its labels (and exact positions) onto the BandsData; then BandsData.show_mpl() yields a labelled plot.