httk.atomistic.compat¶
ASE interoperability for the httk.atomistic structure family.
The protocol deliberately describes only the four ASE Atoms methods needed for
conversion. ASE is optional: duck-typed objects can be converted without installing
ASE, while ASEAtomsView is available only when
ASE itself is installed.
Classes¶
The minimal method surface needed to treat an object as ASE |
|
Backend for ASE |
Module Contents¶
- class httk.atomistic.compat.ASEAtomsProtocol[source]¶
Bases:
ProtocolThe minimal method surface needed to treat an object as ASE
Atoms.This is a runtime-checkable, duck-typed protocol. ASE is not required: any object providing these four methods qualifies for
ASEAtomsBackend.
- class httk.atomistic.compat.ASEAtomsBackend(obj: ASEAtomsProtocol, **hints: Any)[source]¶
Bases:
httk.atomistic.structure_backend.StructureBackendBackend for ASE
Atomsand compatible duck-typed objects.Conversion is eager because reading the four methods and normalizing their values is real work. The original object remains available through
unwrap().- property cell: httk.atomistic.cell.Cell[source]¶
The exact cell converted from the native cell rows.
- property sites: httk.atomistic.sites.Sites[source]¶
The exact reduced coordinates converted from the native positions.
- property species: tuple[httk.atomistic.species.Species, Ellipsis][source]¶
The distinct single-element species in first-appearance order.