httk.atomistic.numeric_unitcell_structure_view ============================================== .. py:module:: httk.atomistic.numeric_unitcell_structure_view .. autoapi-nested-parse:: A plain-numpy presentation of a structure backend. Classes ------- .. autoapisummary:: httk.atomistic.numeric_unitcell_structure_view.NumericUnitcellStructureView Module Contents --------------- .. py:class:: NumericUnitcellStructureView(obj: httk.atomistic.structure_like.StructureLike, **hints: Any) Bases: :py:obj:`httk.atomistic.structure_view.StructureView` A plain-numpy presentation of a :class:`~httk.atomistic.Structure`. Where a ``Structure`` holds its geometry exactly (a surd ``cell`` basis, rational reduced coordinates, and an exact Cartesian frame), this view mirrors that interface but returns plain numpy numbers: its :attr:`cell` is a :class:`~httk.atomistic.NumericCell`, its :attr:`sites` a :class:`~httk.atomistic.NumericSites`, and :meth:`cartesian_sites` a ``float64`` numpy array. The ``species``/``species_at_sites`` are passed through unchanged. It is for callers who do not need exact arithmetic and just want numpy arrays. The presentation is numpy-backed, so constructing it **requires numpy** (the ``httk-atomistic[numpy]`` extra) and raises :class:`ImportError` eagerly when it is unavailable. The exact object is always one hop away via :attr:`exact`. This is a view, not a ``Structure`` subclass. Its exact ``Structure`` is built eagerly from the backend quartet during construction. .. py:property:: cell :type: httk.atomistic.numeric_cell.NumericCell The cell as a :class:`~httk.atomistic.NumericCell`. .. py:property:: sites :type: httk.atomistic.numeric_sites.NumericSites The sites as a :class:`~httk.atomistic.NumericSites`. .. py:property:: species :type: tuple[httk.atomistic.species.Species, Ellipsis] The distinct species, passed through unchanged. .. py:property:: species_at_sites :type: tuple[str, Ellipsis] The species name occupying each site, passed through unchanged. .. py:method:: cartesian_sites() -> httk.core.NumericVector The Cartesian site positions as an ``(N, 3)`` ``float64`` numpy array. .. py:property:: exact :type: httk.atomistic.structure.Structure The exact :class:`~httk.atomistic.Structure` this view presents. .. py:method:: unwrap() -> Any Return the raw object wrapped by the backend.