# conkit.misc.selectalg module¶

Energy function templates for restraint generation

class SubselectionAlgorithm[source]

Bases: object

A class to collect all subselection algorithms

static cutoff(data, cutoff=0.287)[source]

A cutoff-defined subselection algorithm

This algorithm removes a decoy, if its score is less than the cutoff.

Parameters: data (list, tuple) – A 1D array of scores cutoff (float, optional) – The cutoff of keeping decoys list – The decoy indices to keep list – The decoy indices to throw
static ignore(data)[source]

“A subselection algorithm to keep all

This algorithm doesn’t do anything except mimic others.

It will not discard any decoys and keep all!!

Parameters: data (list, tuple) – A 1D array of scores list – The decoy indices to keep list – The decoy indices to throw
static linear(data, cutoff=0.5)[source]

A linearly-defined subselection algorithm

This algorithm removes the worst x% decoys, where x is defined by cutoff.

Parameters: data (list, tuple) – A 1D array of scores cutoff (float, optional) – The porportion of the total number of decoys to keep list – The decoy indices to keep list – The decoy indices to throw
static scaled(data, cutoff=0.5)[source]

A scaling-defined subselection algorithm

This algorithm removes a decoy, if its scaled score is less than 0.5. The scaled score is calculated by dividing the precision score by the average of the set.

Parameters: data (list, tuple) – A 1D array of scores cutoff (float, optional) – The cutoff of keeping decoys list – The decoy indices to keep list – The decoy indices to throw