httk.atomistic.models.structure.numeric

Backend for numeric unitcell structure presentations.

Classes

NumericUnitcellStructure

Backend recognizing the plain-numpy structure quartet.

Module Contents

class httk.atomistic.models.structure.numeric.NumericUnitcellStructure(obj, **hints)[source]

Bases: httk.atomistic.models.structure.backend.StructureBackend

Backend recognizing the plain-numpy structure quartet.

The wrapped object must expose NumericCell/NumericSites values through cell/sites and the usual species/species_at_sites attributes. Its exact quartet is taken from an exact UnitcellStructure when available, then from the component presentations’ exact values. If neither component carries an exact value, the numeric basis and reduced_coords arrays are passed through the vector family into Cell and Sites. That last route is exact embedding of the floats: their binary float64 values, rather than their decimal spellings, become the exact values.

Parameters:
  • obj (Any) – The numeric structure presentation to wrap.

  • **hints (Any) – Backend-selection hints.

property cell: httk.atomistic.models.cell.cell.Cell[source]

Expose the exact cell quartet component.

property sites: httk.atomistic.models.sites.sites.Sites[source]

Expose the exact sites quartet component.

property species: tuple[httk.atomistic.models.species.species.Species, Ellipsis][source]

Expose the exact structure’s distinct species.

property species_at_sites: tuple[str, Ellipsis][source]

Expose the exact species name for each site.

property charge: fractions.Fraction | None[source]

Expose the explicitly assigned exact charge.

unwrap()[source]

Return the wrapped numeric presentation object.