httk.atomistic.integrations.vasp.trajectory¶
Lazy VASP trajectory access through neutral httk payloads.
This backend is explicit-only: a generic trajectory source must not claim an OUTCAR/XDATCAR path.
Classes¶
Read VASP OUTCAR and/or XDATCAR data lazily. |
Module Contents¶
- class httk.atomistic.integrations.vasp.trajectory.VASPTrajectory(source, **hints)[source]¶
Bases:
httk.atomistic.models.trajectory.backend.TrajectoryBackendRead VASP OUTCAR and/or XDATCAR data lazily.
XDATCAR supplies geometry when present. OUTCAR observables use the per-frame
energy_sigma0, parsed as a float, plus temperature andstress_gpa_voigt(). One bounded pass caches those three scalar/6-tuple sequences; frame geometry is never cached.XDATCAR geometry is preferred when both files are available. Cartesian coordinates are reduced exactly against the frame cell. A mismatch between OUTCAR and XDATCAR frame counts raises an error.
- Parameters:
source (Any) – A VASP trajectory path, directory, payload, or VASP-outputs-like object.
**hints (Any) – Backend-selection hints.
- property species: tuple[Any, Ellipsis][source]¶
Return the composition inferred from POSCAR, XDATCAR, or OUTCAR.
- property reference_frames: None[source]¶
Return
Nonebecause VASP frames are not bounded references.
- frame(i)[source]¶
Read one VASP frame by index.
- Parameters:
i (int) – Frame index; negative indexes count from the end.
- Returns:
The requested unit-cell structure.
- Raises:
IndexError – If the frame index is out of range.
ValueError – If the source has no complete frame geometry.
- Return type:
- frames()[source]¶
Stream VASP frame geometry without caching full frames.
- Yields:
Unit-cell structures in source order.