1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Minimum-image convention for a periodic parallelepiped.
//!
//! [`Cell`] holds the 3x3 lattice H and a dump-cell origin. Constructors
//! accept a LAMMPS bound box plus tilts, a CON lattice or
//! length-angle box, an ASE-style 3x3 cell, and a vesin box. Distances
//! are the fractional wrap `ds = wrap(Hinv (q - p))`, then `dr = H ds`.
//! That is the LAMMPS lamda / eOn / HOOMD engine convention and is the
//! Euclidean MIC on a restricted, tilt-reduced cell for cutoff-scale
//! pairs. [`Cell::reduce_tilts`] is GROMACS `correct_box`;
//! [`Cell::to_restricted`] is the LAMMPS general-to-restricted rotation;
//! [`Cell::displacement_euclidean`] is the Smith half-edge test, then a
//! Minkowski-reduced 27-image when the wrap is long. [`dist2_many`], [`wrap_many`], and
//! [`dist2_ortho_diffs`] batch the engine wrap. [`reduce_pairs`] turns a
//! vesin image pair list into one minimum-image pair and drops the self
//! image.
//!
//! It is a LODE library. The Rust crate is the implementation. The C
//! ABI (`mi_*`) is the hourglass waist, the same shape as
//! [linkcell](https://github.com/d-SEAMS/linkcell) and
//! [readcon-core](https://github.com/lode-org/readcon-core). C++ is a
//! RAII header over that ABI.
//!
//! ```
//! use minimage::Cell;
//!
//! # fn main() -> Result<(), minimage::Error> {
//! let sim = Cell::ortho(10.0, 10.0, 10.0)?;
//! let left = [0.2, 0.0, 0.0];
//! let right = [9.4, 0.0, 0.0];
//! assert!((sim.dist2(left, right) - 0.64).abs() < 1e-12);
//! # Ok(())
//! # }
//! ```
pub use ;
pub use ;
pub use Error;
pub use ;
pub use ;
pub use *;