{ "name": "MinimumImage", "summary": "A displacement brought to its nearest periodic image in a box of length Box: the minimum image convention.", "tags": [ "molecular dynamics", "periodic boundary conditions" ], "sources": [ { "title": "Allen and Tildesley, Computer Simulation of Liquids, section 1.5.2" } ], "cases": [ { "call": "MinimumImage(0.75, 1.0)" }, { "call": "MinimumImage(-0.75, 1.0)" }, { "call": "MinimumImage(2.3, 1.0)" }, { "call": "MinimumImage(0.5, 1.0)" }, { "call": "MinimumImage(-12.0, 10.0)" } ], "references": [ { "lang": "python", "level": "plain", "file": "ref/python/plain.py", "note": "The same formula with math.floor." }, { "lang": "c", "level": "plain", "file": "ref/c/plain.c", "note": "The same formula with floor from math.h." }, { "lang": "mojo", "level": "plain", "file": "ref/mojo/plain.mojo", "note": "The same formula in Mojo, with floor from std.math." } ], "proof": { "lang": "dafny", "file": "proof/minimum_image.dfy", "note": "Over real numbers the result lies in [-Box / 2, Box / 2) and differs from Dx by a whole number of box lengths." } }