mod twin¶
- module twin¶
Changing morphology by twinning, at the cost of one boundary layer.
The move set has had two kinds of proposal and neither crosses a funnel. A displacement moves points and lets the quench find a nearby minimum, so the reachable set is whatever a displacement reaches, and on 98 points that does not include the tetrahedral funnel from anywhere in the icosahedral one. Rebuilding the structure from a local order does cross funnels, and was measured at 0 of 34 against a control at 2 of 8, because a rebuilt candidate shares nothing with the incumbent and quenches far above it: the chain rejects it, and the full quench it forced is paid anyway.
What sits between them is the operation the packings themselves differ by. Face-centred cubic, hexagonal, decahedral and icosahedral packings are the same close packing with different stacking, and they are related by reflections in their dense planes: a decahedron is five tetrahedra sharing twin boundaries, and an icosahedron is twenty. So the move that turns one morphology into another is not a rebuild, it is a twin.
Why this preserves the energy a rebuild throws away
Reflecting the points on one side of a dense plane leaves every neighbour relation on that side intact, and every relation on the other side intact, and changes only the contacts across the plane. The cost is one boundary layer rather than the whole structure, which is what makes the proposal survive an acceptance test that a rebuilt candidate cannot.
Nothing here is specific to one potential
A dense plane is found by projecting the points onto a candidate normal and looking for a projection where many of them coincide. The normals come from the structure’s own neighbour directions. Both are properties of a point set, so the move applies wherever a packing does, and it carries no knowledge of what is being optimised.
Functions
- fn dense_planes(x: ArrayView1<f64>, n: usize, layer: f64) -> Vec<Plane>¶
Dense planes of
x, most populated first.A plane is dense when many points project to the same distance along its normal, which is what a lattice plane is. The layer tolerance is a fraction of the spacing, so the test is scale free.
- fn propose<R: Rng + ?Sized>(x: ArrayView1<f64>, n: usize, rng: &mut R) -> Array1<f64>¶
Twins
xacross one of its dense planes, chosen at random among the densest.The densest plane is the one whose boundary costs least, so the choice is restricted to the top few rather than taken uniformly, and randomised within them so repeated draws are different proposals.
- fn spacing(x: ArrayView1<f64>, n: usize) -> f64¶
Mean nearest-neighbour distance, the structure’s own length scale.
- fn twin(x: ArrayView1<f64>, n: usize, plane: &Plane, mode: Mode, layer: f64) -> Array1<f64>¶
Twins
xacrossplane.Points on the far side of the plane are mapped onto the other side’s stacking; points within one layer of the plane are left where they are, since they belong to the boundary itself and moving them tears it.
The result is a structure whose local order is unchanged everywhere except across the boundary, which is the property this move exists for.
Enums
- enum Mode¶
How the far half is produced.
- Reflect¶
Replace the far half by the mirror image of the near half.
The construction that gives a twin its registry. Moving the far half by the twin law instead, which is what a two-fold rotation about the normal does for a close packing, is crystallographically the right operation and produces the wrong structure here: the two halves keep their own in-plane origins, so neighbours across the boundary land at distances that are not the packing’s, and Lennard-Jones charges for each one. Measured, that proposal was accepted on 52 of 2228 draws against 0.63 for a surface move, and scored 1 of 6 against a control at 1 of 6.
Mirroring the near half onto the far side cannot have that fault: every distance on the far side is a distance that already existed on the near side, and the boundary is the plane both halves were built against.
- Rotate¶
Rotate about the normal by a fifth of a turn.
The disclination that turns close packing into a five-fold axis, which is what a decahedron and an icosahedron have and a lattice cannot.
Structs and Unions