Skip to content

Releases: vita-rs/vita

vita@0.2.0

08 Jun 10:40
vita@0.2.0
03af876

Choose a tag to compare

🚀 Features

  • IO Module (vita-io): Implements readers and writers for standard atomistic formats — read/write asymmetry (readers produce format-specific types; writers accept any capability-bounded source), XYZ format (HasSites + HasElements + HasPositions<V>), single-frame and trajectory reading, generic writing. 72 tests.

  • Core Module (vita-core): Adds Element::from_symbol — case-sensitive symbol lookup for named (Z 1–118) and systematic (Z ≥ 119) elements. 1,360 tests.

Contributors

Full Changelog: https://github.com/vita-rs/vita/compare/vita@0.1.0...vita@0.2.0

vita-io@0.1.0

08 Jun 10:37
vita-io@0.1.0
03af876

Choose a tag to compare

🚀 Features

  1. Read/Write Asymmetry

    • Read = Concrete: each format reader produces one concrete type implementing exactly the capabilities the format records
    • Write = Generic: each format writer accepts any S bounded on those capabilities — not only the reader's output type
  2. Implements XYZ Format (vita_io::xyz)

    • Output Type: xyz::System<V: Scalar = f64>HasSites, HasElements, HasPositions<V>; positions stored in Å
    • Reading: xyz::read(reader)Reader; .system::<V>() for a single frame, .systems::<V>() for a lazy trajectory iterator; element symbols are case-insensitive
    • Writing: xyz::write::<V, U, S>(writer, source, config) — any S: HasElements + HasPositions<V>, positions converted to unit U on output
    • Config: Config { comment: &str } — per-frame metadata not captured by capabilities
    • 6 Error Kinds: UnexpectedEof, AtomCount, AtomCountRange, FieldCount, ElementSymbol, Coordinate
  3. Implements Error Infrastructure (vita_io::{Error, ParseError, Location})

    • Location: Text { line: u32, column: Option<u32> } or Binary { offset: u64 } — one-based; column is byte-offset-based
    • ParseError<K>: shared location + format-specific K; each format aliases ParseError/Error with its own ErrorKind
    • Error<K>: Io(std::io::Error) | Parse(ParseError<K>); From conversions for ? propagation
  4. Testing

    • 72 Tests: error infrastructure (14), XYZ error kinds (6), reader (25), system (17), writer (10)
    • Read: single-frame, trajectory, CRLF, scientific notation, f32/f64, all 6 error paths
    • Write: generic-type source, unit conversion, comment validation, write→read round-trip

Contributors

Full Changelog: https://github.com/vita-rs/vita/commits/vita-io@0.1.0

vita-core@0.2.0

08 Jun 10:30
vita-core@0.2.0
03af876

Choose a tag to compare

🚀 Features

  1. Adds Element::from_symbol — case-sensitive inverse of symbol()
    • Named (Z 1–118): exact IUPAC symbol ("H", "Fe", "Og")
    • Systematic (Z ≥ 119): IUPAC 1979 three-letter form ("Uue", "Bpp")
    • Round-trip: Element::from_symbol(e.symbol()) == Some(e) holds for all Z 1–255
    • Rejects silently: wrong case, unknown symbol, empty string → None
    • +6 tests → 1,360 total

Contributors

Full Changelog: https://github.com/vita-rs/vita/compare/vita-core@0.1.0...vita-core@0.2.0

vita@0.1.0

05 Jun 04:43
vita@0.1.0
6093a46

Choose a tag to compare

🚀 Features

  • Core Module (vita-core): Foundational vocabulary — 9 capability traits, 20 physical quantities with 101 unit implementations, 3D geometry (Point3 / Vector3 / Matrix3), chemical primitives (elements, isotopes, lattices), and Scalar numeric abstraction. Zero dependencies, 1,354 tests.

Contributors

Full Changelog: https://github.com/vita-rs/vita/commits/vita@0.1.0

vita-core@0.1.0

05 Jun 04:24
vita-core@0.1.0
6093a46

Choose a tag to compare

🚀 Features

  1. Capability-Driven System Model

    • 9 Traits: HasSites, HasElements, HasIsotopes, HasPositions, HasMasses, HasVelocities, HasAccelerations, HasNetCharge, HasLattice
    • Keyed Access: Per-site data via SiteId getter + bulk iterator (fn mass(&self, site) -> Mass<V, U> + fn masses(&self) -> impl Iterator<...>)
    • No Concrete System Type: Code declares trait bounds, stays blind to storage
  2. Dimensional Typesystem

    • 20 Physical Quantities: Length, Mass, Time, Energy, Force, Charge, Temperature, Pressure, Velocity, Acceleration, Angle, Area, Volume, Frequency, Momentum, Density, Concentration, AmountOfSubstance, DipoleMoment, ForceConstant
    • 101 Unit Implementations: Dalton, Hartree, Angstrom, Picosecond, Kelvin, Bar, Radian, Degree, Å ps⁻¹, …
    • Compile-Time Unit Safety: Mass<V, Dalton> + Mass<V, Gram> is a type error — explicit .to::<Dalton>() required
    • Macro-Generated: Single define_quantity! macro for all quantities — consistent API, zero duplication
  3. 3D Geometry

    • Point3, Vector3, Matrix3: Generic over component type — works with bare f64 or dimensioned Length<f64, Angstrom>
    • Type-Level Safety: Point3 - Point3 = Vector3; Point3 + Point3 refused at compile time
    • Full Linear Algebra: Dot, cross, norm, normalize, angle, transpose, determinant, inverse, matrix-vector multiply
  4. Chemical Primitives

    • 118 Named Elements: IUPAC symbols and names; systematic naming for Z > 118
    • Isotope Model: Element + mass number A, with A ≥ Z guard at construction
    • Periodic Lattice: 4 constructors — from vectors, cubic, orthorhombic, full 6-parameter crystallographic (a, b, c, α, β, γ); validates non-degeneracy
  5. Zero-Dependency Core

    • No Transitive Dependencies: Compiles against core only
    • Zero Heap Allocation: All operations on the stack; only PhantomData for unit markers
  6. Prelude for Ergonomic Import

    • use vita_core::prelude::* brings in all 9 Has* traits, Scalar, and SiteId — ready to go in one line
  7. Comprehensive Testing

    • 1,354 Tests: Construction validation, arithmetic identities, unit-conversion round-trips, comparison/ordering, iterator contracts, lattice degeneracy detection

Contributors

Full Changelog: https://github.com/vita-rs/vita/commits/vita-core@0.1.0