httk.atomistic.models.species.plain_view

A view presenting any species backend as an OPTIMADE species dict.

Classes

PlainSpeciesView

A view presenting an underlying species backend as an OPTIMADE species dict.

Module Contents

class httk.atomistic.models.species.plain_view.PlainSpeciesView(obj, **hints)[source]

Bases: httk.atomistic.models.species.view_base.SpeciesViewBase, dict

A view presenting an underlying species backend as an OPTIMADE species dict.

This view is a genuine dict carrying the OPTIMADE species fields (optional fields that are None are omitted; list-valued fields are plain lists). Unlike the immutable-subclass views, a dict is mutable, so this view is a detached copy: mutating it does not affect the underlying backend.

Parameters:
unwrap()[source]

Return the raw object behind the backend.

Returns:

The unwrapped source object.

Return type:

Any

unview()[source]

Return the presented species as a plain mapping.

Returns:

The detached presentation mapping.

Return type:

dict[str, Any]