Single Mutant Search¶
Single Mutant Search is a mutation-based search strategy that generates candidate pools by applying single-point mutations to existing sequences. This is particularly useful for local exploration around known high-performing sequences in protein engineering.
The top_k parameter controls how many training sequences are mutated. With the default of 1,
only the best-labelled sequence is mutated, so the search explores a single neighbourhood at a time.
With a larger value, the top_k best-labelled sequences are each mutated and the results pooled
together, so the search covers several local optima at once rather than stalling when no neighbour
of the current best improves. A mutant reachable from more than one sequence appears only once in
the pool. Sequences with equal labels are ranked by their position in the training set (earliest
first), so top_k=1 always selects the same sequence as single-best selection.
- class alf_tools.optimizer.search.single_mutant_search.SingleMutantSearch(alphabet='ARNDCQEGHILKMFPSTWYV', top_k=1)[source]¶
Bases:
SearchProtocolSearch protocol that enumerates single-point mutants of the top-K training sequences.
For each of the
top_khighest-labelled training sequences, every single-position substitution overalphabetis enumerated. Different seeds can produce the same mutant, so duplicates are dropped while keeping the first one generated, which makes the pool order deterministic.top_k=1, the default, is a pure hill-climb on a single neighbourhood; higher values keep several local optima under exploration at once.