httk.atomistic.models.sites.view

A view presenting any sites backend as a Sites object (the class representation).

Classes

SitesView

A view presenting an underlying sites backend as a Sites object.

Module Contents

class httk.atomistic.models.sites.view.SitesView(obj, **hints)[source]

Bases: httk.atomistic.models.sites.view_base.SitesViewBase, httk.atomistic.models.sites.sites.Sites

A view presenting an underlying sites backend as a Sites object.

This view is a genuine Sites, so it can be passed anywhere a Sites is accepted. Its state is built lazily on first access from the backend.

Parameters:
reduced_coords_floats()[source]

Present the backend’s native float coordinates, else the validated exact ones.

Returns:

The reduced coordinates as float rows.

Return type:

list[list[float]]

property num_sites: int[source]

Return the number of coordinate rows without forcing the exact fill when unfilled.

Returns:

The number of sites.

Return type:

int

unwrap()[source]

Return the raw object behind the backend.

Returns:

The unwrapped source object.

Return type:

Any

unview()[source]

Return this presentation as standalone exact sites.

Returns:

The exact sites representation.

Return type:

httk.atomistic.models.sites.sites.Sites