mod bank¶
- module bank¶
A population held apart by an annealed distance, after conformational space annealing.
Lee, Lee and Scheraga, arXiv cond-mat/0307690.
This is the mechanism behind the only published results that solve the hard Lennard-Jones sizes reliably: ten independent runs finding every known global minimum up to 183 points, against 4 runs in 1000 for a basin-hopping variant at 75 points. What carries it is not the perturbation operator. It is the replacement rule and the schedule on
Dcut, which “plays the role of the temperature in simulated annealing”.The rule has one idea in it. A new solution is compared against the member it most resembles, not against the worst member. If the two are closer than
Dcutthey are the same solution as far as the search is concerned, and only the better of them is kept; if the new one resembles nothing in the bank it is a genuinely different region and it displaces the worst member instead. A bank under that rule cannot collapse onto one funnel, which is the failure a low-temperature chain has no defence against.Dcutstarts wide, so distinct-looking solutions are held apart and the search stays broad, and narrows, so finer distinctions are resolved as the budget runs down. The schedule iscrate::diversity; the distance is the caller’s, and for clusters it is the shape distance incrate::shape.What this is not
The published method perturbs by cutting one solution and splicing in part of another. Nothing here does that: the perturbation is the caller’s, and in this crate it is the move library and the biased chain in
crate::methods::cluster_hopping. The bank supplies the diversity control and nothing else, which is the part the results rest on.Enums
- enum Admission¶
What happened to a candidate offered to the bank.
- Improved(usize)¶
Better than the member it resembles, and took its place.
- Duplicate(usize)¶
Resembles a member and is not better; discarded.
- Displaced(usize)¶
Resembles nothing in the bank, and displaced the worst member.
- Added(usize)¶
Resembles nothing and the bank had room.
- Rejected¶
Resembles nothing, the bank is full, and it is worse than every member.
Structs and Unions
- struct Bank¶
A population under the conformational-space-annealing replacement rule.
- dcut: f64¶
Current
Dcut. Set by the caller from acrate::diversityschedule.
- offered: usize¶
Candidates offered.
- novel: usize¶
Candidates that resembled nothing in the bank.
Implementations
- impl Bank¶
Functions
- fn is_empty(&self) -> bool¶
Whether the bank holds nothing.
- fn len(&self) -> usize¶
How many solutions the bank holds.
- fn mark_used(&mut self, i: usize)¶
Marks a member as having been searched from.
-
fn mean_distance<D>(&self, mut distance: D) -> Option<f64>¶
where
D: FnMut(ArrayView1<f64>, ArrayView1<f64>) -> f64
¶ Mean pairwise distance among the members, for setting the initial
Dcutfrom the data rather than by hand.
- fn new(capacity: usize, dcut: f64) -> Self¶
An empty bank holding at most
capacitymembers.
- fn next_start(&self) -> Option<usize>¶
Picks a member to search from next.
Least-used first, breaking ties by energy. The bank is a set of regions to explore, not a ranking, so spending every start on the current best defeats the point of holding the others; and a member nothing has ever been found near is the one whose surroundings are least known.
-
fn offer<D>(&mut self, state: ArrayView1<f64>, energy: f64, mut distance: D) -> Admission¶
where
D: FnMut(ArrayView1<f64>, ArrayView1<f64>) -> f64
¶ Offers a solution to the bank.
distancemeasures how far the candidate is from a member, and is the caller’s: for clusters it is a shape distance, which makesDcuta length. The comparison is against the nearest member, which is the whole rule. Comparing against the worst instead lets a bank fill with near-copies of one good solution, and a bank in one funnel searches one funnel.
- fn seed(&mut self, state: ArrayView1<f64>, energy: f64) -> bool¶
Adds a solution without applying the replacement rule.
For the seeding phase only, and it is not a convenience.
Dcutis meant to come from the spread of the first population, so the first population cannot be filtered by aDcut: with a placeholder threshold wide enough to admit anything, every seed after the first resembles the first, the bank ends the phase holding one member, and there is no spread to measure. Measured on LJ38, eight seeding chains left a bank of one.Returns
falsewhen the bank is full, which ends the phase.