Prefix mi_. Every buffer is caller-owned. A nonzero return means
failure; read mi_last_error() on the same thread.
| Symbol | Role |
|---|---|
mi_cell |
Lattice vectors a, b, c and origin |
mi_cell_ortho |
Header-only diagonal box |
mi_cell_from_vectors |
Columns a, b, c |
mi_cell_from_lammps |
xlo xhi ylo yhi zlo zhi plus tilts |
mi_cell_from_lammps_bounds |
Dump bound spans plus tilts |
mi_cell_from_ase |
Row-major 3x3 |
mi_cell_from_con |
CON 3x3 |
mi_cell_from_con_box |
Lengths and angles in degrees |
mi_cell_from_vesin |
vesin 3x3 |
mi_displacement |
Wrapped q - p |
mi_displacement_euclidean |
Smith test, else the Selling slicer |
mi_dist2 |
Squared minimum-image distance |
mi_dist2_many |
One source, packed candidates |
mi_dist2_pairs |
Packed pair lists |
mi_dist2_euclidean_many |
Euclidean nearest image, one source, packed candidates |
mi_dist2_euclidean_pairs |
Euclidean nearest image, packed pair lists |
mi_dist2_euclidean_pairs_warm |
Euclidean pairs from the previous frame's shifts |
mi_dist2_ortho_diffs |
Highway-shaped ortho wrap, AVX when present |
mi_dist2_shifted_many |
One lattice shift, many candidates |
mi_fixed_many |
Positions to 64-bit fixed-point fractions |
mi_dist2_fixed |
Squared distance between two fixed-point positions |
mi_dist2_many_fixed |
One fixed-point source, packed candidates |
mi_dist2_pairs_fixed |
Packed fixed-point pair lists |
mi_fixed32_many, mi_dist2_fixed32 |
32-bit fixed-point fractions and distance |
mi_dist2_many_fixed32, mi_dist2_pairs_fixed32 |
32-bit fixed-point batches |
mi_reduce_pairs |
Drop self images, unique pairs |
mi_last_error |
Thread-local error string |
mi_version |
Process-static version |
The C++ header minimage.hpp is a RAII wrap of this ABI.
docs.rs/minimage is the Rust reference.
Python
| Method | Role |
|---|---|
dist2_many(p, qs) |
One source, rows of candidates |
dist2_pairs(ps, qs) |
Paired rows |
dist2_euclidean_many(p, qs), dist2_euclidean_pairs(ps, qs) |
Euclidean nearest image |
dist2_euclidean_pairs_warm(ps, qs, images) |
Distances and updated shifts across frames |
wrap_many(diffs) |
Engine wrap of each row |
fixed(r), fixed_many(rs) |
Fixed-point fractions, uint64 |
dist2_fixed(a, b) |
Two fixed-point positions |
dist2_many_fixed(p, qs) |
One fixed-point source, rows |
dist2_pairs_fixed(ps, qs) |
Paired fixed-point rows |
fixed32(r), fixed32_many(rs), dist2_fixed32(a, b) |
32-bit fixed point, uint32 |
dist2_many_fixed32(p, qs), dist2_pairs_fixed32(ps, qs) |
32-bit fixed-point batches |
An array argument is any DLPack producer on the host, read in place; an array result is a numpy array. A list in gives a list out.
Burn
| Item | Role |
|---|---|
Lattice::new(cell, device, dtype) |
H and Hinv on a device |
Lattice::rows |
Packed rows to an (n, 3) tensor |
Lattice::fractions |
Fold on the CPU in double precision, upload |
Lattice::fractional |
Fold on the device |
Lattice::wrap, dist2_pairs, dist2_many |
Cartesian rows |
Lattice::displacement_fractional, dist2_pairs_fractional, dist2_many_fractional |
Fraction rows, exact wrap |
to_vec |
A rank-one tensor back as doubles |