conkit.misc.selectalg module

Energy function templates for restraint generation

class SubselectionAlgorithm[source]

Bases: object

A class to collect all subselection algorithms

classmethod 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
Returns:

  • list – The decoy indices to keep
  • list – The decoy indices to throw

classmethod 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
Returns:
  • list – The decoy indices to keep
  • list – The decoy indices to throw
classmethod 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
Returns:

  • list – The decoy indices to keep
  • list – The decoy indices to throw

classmethod 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
Returns:

  • list – The decoy indices to keep
  • list – The decoy indices to throw