httk.atomistic.integrations.ase¶
Expose optional ASE structure integrations.
Submodules¶
Classes¶
Import ASE |
|
Describe the minimal method surface needed to read ASE |
Package Contents¶
- class httk.atomistic.integrations.ase.ASEAtoms(obj, **hints)[source]¶
Bases:
httk.atomistic.models.structure.backend.StructureBackendImport 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().Initial magnetic moments become site moments and nonzero initial charges become charged single-element species. All-zero ASE defaults remain unstated.
- Parameters:
obj (ASEAtomsProtocol) – An ASE
Atomsobject or compatible duck-typed object.**hints (Any) – Backend-selection hints.
- property cell: httk.atomistic.models.cell.cell.Cell¶
Return the exact cell converted from native cell rows.
- property sites: httk.atomistic.models.sites.sites.Sites¶
Return the exact reduced coordinates converted from native positions.
- property species: tuple[httk.atomistic.models.species.species.Species, Ellipsis]¶
Return distinct single-element species in first-appearance order.
- property site_moments: Any¶
Return per-site moments, or
Nonefor absent and all-zero ASE defaults.
- class httk.atomistic.integrations.ase.ASEAtomsProtocol[source]¶
Bases:
ProtocolDescribe the minimal method surface needed to read ASE
Atoms.This is a runtime-checkable, duck-typed protocol. ASE is not required: any object providing these four methods qualifies for
ASEAtoms.- get_cell()[source]¶
Return the cell vectors as rows.
- Returns:
The native cell rows.
- Return type:
Any
- get_scaled_positions()[source]¶
Return the reduced positions.
- Returns:
One reduced coordinate row per site.
- Return type:
Any