UP | HOME

LODE crate

minimage

Minimum-image convention on a general parallelepiped. Rust core, minimage_* C ABI waist, C++ and Python on the other side.

Tutorial Install Source LODE

What it is

linkcell walks k-nearest neighbours. vesin builds cutoff pair lists. Both need the same wrap: fold through H, pick one image, never the self image. This crate is that wrap.

Cell holds the 3x3 lattice and a dump-cell origin. Constructors accept LAMMPS bounds plus xy, xz, yz tilts, a CON lattice or length-angle box, an ASE-style 3x3 cell, and a vesin box. PartialCell handles slabs, wires, and open systems where only some axes are periodic.

Diataxis

Getting started
install from Cargo, pip, Meson, CMake, or pkg-config.
Tutorial
a wrapped pair (0.64 on a 10-wide box, 0.25 on the sheared LAMMPS dump, and Euclidean nearest image on a hex prism).
How-to
embed from C (minimage_*), C++, Python, and Burn; cut a release.
Explanation
MIC and H, triclinic conventions, Selling reduction, error behaviour, dump bounds, and vesin reduction.
SIMD paths and dispatch
runtime path selection, MINIMAGE_SIMD, and bit-identical batches.
Reference
minimage_* C ABI, C++, Rust, Python, and Burn APIs.

Install

cargo add minimage
pip install minimage

C and C++ take the staticlib or shared library plus include/minimage.h or include/minimage.hpp. Meson exposes minimage_dep. CMake exposes minimage::minimage.