httk.atomistic.integrations.ase.view

ASE Atoms view for the httk.atomistic structure family.

ASE is an optional dependency. This module intentionally imports it unconditionally, so the package-level exports can guard the import while documentation tools can see the public ASEAtomsView definition.

Classes

ASEAtomsView

Present a structure-like value as ASE Atoms.

Module Contents

class httk.atomistic.integrations.ase.view.ASEAtomsView(obj, **hints)[source]

Bases: httk.atomistic.models.structure.view.StructureView, ase.Atoms

Present a structure-like value as ASE Atoms.

The conversion carries the structure quartet: cell, reduced positions, atomic numbers, and periodicity. ASE must be installed to construct this view. Mixed or attached species cannot be represented by ASE atomic numbers and raise TypeError.

Site moments map to initial_magmoms and species charges map to initial_charges. Structure charge, species spins, labels, masses, assemblies, declared chemical composition, and non-element species are rejected rather than discarded; unwrap() recovers the original value behind the backend.

Parameters:
unwrap()[source]

Return the original value represented by the underlying backend.

unview()[source]

Return a base Atoms copy of this view.

Returns:

A standalone ASE Atoms object.

Return type:

ase.Atoms