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. It also carries the file input/output stack for atomistic data — the CIF/mCIF reader and writer, the VASP POSCAR/CONTCAR and output-file readers, the WAVECAR binary reader/writer, and the OPTIMADE trajectory JSON Lines holding format — registering these readers with httk-core through httk.registry.io.atomistic.
Quick links
API reference: Reference
Structures: Structures
Composition and formulas: Composition and formula families
Structure prototypes: Prototype families
Asymmetric units: Asymmetric units
Subgroups and pathfinding: Subgroups and pathfinding
Site moments (magnetism): Site moments
Integrations (ASE, pymatgen, VASP): Integrations
Data precision: Data precision
Periodicity (slabs, wires, molecules): Periodicity
Lattice reduction: Lattice reduction (Niggli)
Primitive cells: Primitive cells
Reading and writing CIF files: Reading and writing CIF files
Reading POSCAR/CONTCAR files: Reading VASP POSCAR / CONTCAR files
Reading VASP output files: Reading VASP output files
Reading and writing WAVECAR files: Reading and writing VASP WAVECAR files
Plane-wave wavefunctions: Plane-wave wavefunctions
Trajectory JSON Lines: Trajectory JSON Lines
Runnable examples: Examples
Examples notebook: Examples
Disorder walkthrough: Disorder, vacancies, and attached species
The topic pages above are short and practical; the ones with a full guide link onward to it in the Details section of the sidebar.
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 UnitcellStructure, PlainStructureView
structure = UnitcellStructure(
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 = PlainStructureView(structure)
Documentation
- Reference
- Structures
- Composition and formula families
- Prototype families
- Reading and writing CIF files
- Reading VASP POSCAR / CONTCAR files
- Reading VASP output files
- Reading and writing VASP WAVECAR files
- Plane-wave wavefunctions
- Trajectory JSON Lines
- Asymmetric units
- Subgroups and pathfinding
- Site moments
- Integrations
- Data precision
- Periodicity
- Lattice reduction (Niggli)
- Primitive cells
- Examples
- Asymmetric units: reading a CIF, expanding it, and going back again
- Building a UnitcellStructure 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 UnitcellStructure
- Reading, inspecting and writing CIF files
- Reading VASP POSCAR and CONTCAR files
- Read a small synthetic VASP output directory.
- Data precision: letting the file choose the tolerance
- Serving structures as OPTIMADE, with derived fields and custom properties
- Examples
- Disorder, vacancies, and attached species