httk-atomistic¶
This site documents specifically the httk-atomistic module. For the full documentation of httk₂ as a whole, see docs.httk.org.
httk-atomistic is a httk₂ module providing crystal structure representations under the namespace httk.atomistic.
Quick links
API reference: Reference
Structure guide: Structures
Asymmetric units: Asymmetric units
Data precision: Data precision
Periodicity (slabs, wires, molecules): Periodicity
Runnable examples: Examples
Examples notebook: Examples
Disorder walkthrough: Disorder, vacancies, and attached species
Install¶
Preferably work in a Python virtual environment, then do:
git clone https://github.com/httk/httk-atomistic
cd httk-atomistic
python -m pip install -e .
Usage example¶
from httk.atomistic import Structure, StructurePrimitiveView
structure = Structure(
cell=[[4.0, 0.0, 0.0], [0.0, 4.0, 0.0], [0.0, 0.0, 4.0]],
sites=[[0.0, 0.0, 0.0], [0.5, 0.5, 0.5]],
species=[
{"name": "Na", "chemical_symbols": ["Na"], "concentration": [1.0]},
{"name": "Cl", "chemical_symbols": ["Cl"], "concentration": [1.0]},
],
species_at_sites=["Na", "Cl"],
)
# Present the same structure as an spglib-like (lattice, positions, numbers) tuple.
lattice, positions, numbers = StructurePrimitiveView(structure)
Documentation
- Reference
- Structures
- Asymmetric units
- Data precision
- Periodicity
- Examples
- Asymmetric units: reading a CIF, expanding it, and going back again
- Building a Structure three ways, and reading its geometry back out exactly
- Build exact general, orthogonal, and cubic supercells
- Disorder, vacancies, and attached species: what a site can actually hold
- Reading VASP POSCAR and CONTCAR files into a Structure
- Data precision: letting the file choose the tolerance
- Serving structures as OPTIMADE, with derived fields and custom properties
- Examples
- Disorder, vacancies, and attached species
- API Reference