httk.atomistic.models.structure.plain_view

A view presenting any structure backend as an spglib-like (lattice, positions, numbers) triple.

Classes

PlainStructureView

A view presenting an underlying structure backend as a primitive triple.

Module Contents

class httk.atomistic.models.structure.plain_view.PlainStructureView(obj, **hints)[source]

Bases: httk.atomistic.models.structure.view.StructureView, tuple

A view presenting an underlying structure backend as a primitive triple.

This view is a genuine (lattice, positions, numbers) tuple, built eagerly and immutable. Because the primitive representation carries only bare atomic numbers, every site’s species must be a single, unattached chemical element (see Species.is_single_element); otherwise a TypeError is raised.

Parameters:
unwrap()[source]

Return the raw value wrapped by the backend.

Returns:

The original source value.

Return type:

Any

unview()[source]

Return this presentation as an ordinary primitive triple.

Returns:

The lattice, positions, and atomic numbers.

Return type:

tuple