aiida_pythonjob_ins.data ======================== .. py:module:: aiida_pythonjob_ins.data .. autoapi-nested-parse:: Custom AiiDA Data types wrapping Euphonic objects. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/aiida_pythonjob_ins/data/base/index /autoapi/aiida_pythonjob_ins/data/crystal/index /autoapi/aiida_pythonjob_ins/data/force_constants/index /autoapi/aiida_pythonjob_ins/data/mixins/index /autoapi/aiida_pythonjob_ins/data/qpoint_phonon_modes/index Classes ------- .. autoapisummary:: aiida_pythonjob_ins.data.EuphonicCrystalData aiida_pythonjob_ins.data.ForceConstantsData aiida_pythonjob_ins.data.QpointPhononModesData Package Contents ---------------- .. py:class:: EuphonicCrystalData(euphonic_object: Any | None = None, **kwargs) Bases: :py:obj:`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. .. py:method:: get_crystal() -> euphonic.Crystal Return the wrapped :class:`euphonic.Crystal`. .. py:method:: to_structure() -> aiida.orm.StructureData Convert to a native AiiDA ``StructureData`` (no ASE). .. py:method:: to_spglib_cell() -> tuple Return the spglib ``(lattice, positions, numbers)`` tuple. Delegates to euphonic's own ``Crystal.to_spglib_cell``. .. py:method:: from_structure(structure: aiida.orm.StructureData) -> Self :classmethod: Build a node from a native AiiDA ``StructureData``. .. py:class:: ForceConstantsData(euphonic_object: Any | None = None, **kwargs) Bases: :py:obj:`aiida_pythonjob_ins.data.mixins.CrystalStructureMixin`, :py:obj:`aiida_pythonjob_ins.data.base.EuphonicJSONData` Store a Euphonic ``ForceConstants`` object as an AiiDA node. .. py:method:: get_force_constants() -> euphonic.ForceConstants Return the wrapped :class:`euphonic.ForceConstants`. .. py:method:: from_castep(filepath: str | pathlib.Path) -> Self :classmethod: Build a node by reading a CASTEP ``.castep_bin``/``.check`` file. Uses the public reader ``ForceConstants.from_castep``. .. py:method:: from_phonopy(**kwargs) -> Self :classmethod: 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``). .. py:class:: QpointPhononModesData(euphonic_object: Any | None = None, **kwargs) Bases: :py:obj:`aiida_pythonjob_ins.data.mixins.CrystalStructureMixin`, :py:obj:`aiida_pythonjob_ins.data.base.EuphonicJSONData` Store a Euphonic ``QpointPhononModes`` object as an AiiDA node. .. py:method:: get_modes() -> euphonic.QpointPhononModes Return the wrapped :class:`euphonic.QpointPhononModes`. .. py:method:: to_kpoints() -> aiida.orm.KpointsData 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). .. py:method:: to_bands(kpoints: aiida.orm.KpointsData | None = None) -> aiida.orm.BandsData 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.