aiida_pythonjob_ins.data.crystal ================================ .. py:module:: aiida_pythonjob_ins.data.crystal .. autoapi-nested-parse:: AiiDA Data node wrapping a Euphonic ``Crystal`` object. ``Crystal`` is euphonic's crystal-structure representation (cell, atom positions, species, masses). This node is the bridge between euphonic's representation and AiiDA's native ``StructureData``, and the single home for those conversions. https://euphonic.readthedocs.io/en/stable/ Classes ------- .. autoapisummary:: aiida_pythonjob_ins.data.crystal.EuphonicCrystalData Module 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``.