mod splice¶
- module splice¶
Cut-and-splice mixing of two quenched clusters. Cut-and-splice mixing of two quenched clusters.
Lee, Lee and Scheraga, arXiv cond-mat/0307690. The published conformational space annealing hit rates rest on this operator: a random plane through the centroid region takes one side from parent A and the complementary side from parent B, then repairs the atom count so N is preserved. The bank in
crate::methods::bankdecides what to keep; this module is the mix.The result is a 3N trial, not a minimum. The caller quenches.
Functions
- fn cut_and_splice<R: Rng + ?Sized>(a: ArrayView1<f64>, b: ArrayView1<f64>, species: Option<&[u32]>, min_sep: f64, rng: &mut R) -> Array1<f64>¶
Mixes two quenched clusters by a random plane cut.
aandbare flattened 3N coordinates of the same N.species, when given, is one label per point and is shared by both parents; the child keeps that composition.min_sepis the closest approach enforced after the splice, in the same length units as the coordinates.The plane has a random orientation and an offset through the centroid region. Atoms on one side come from
a, the complementary side fromb. If that selection is not N atoms (or not the parent composition), unused atoms nearest the complementary side of the donor fill the deficit.
- fn splice_at_plane(a: ArrayView1<f64>, b: ArrayView1<f64>, species: Option<&[u32]>, min_sep: f64, normal: [f64; 3], offset: f64) -> Array1<f64>¶
Mixes two quenched clusters with a prescribed cutting plane.
normalis a direction, not necessarily unit.offsetis the signed distance from the origin in the recentred frame: an atom atrsits on theaside when normal · r > offset.