You are reading the documentation for version 2.1 of ProMod3. You may also want to read the documentation for: 1.3 2.0 3.0 3.1 3.2

# All Atom Scorers¶

## AllAtomOverallScorer class¶

class promod3.scoring.AllAtomOverallScorer

Container that allows for the storage of multiple scorers identified by a key (str) and the computation of combined scores.

Scorers need to be individually set or loaded by LoadDefaultAllAtomOverallScorer()

Contains(key)
Returns: True, if a scorer object for this key was already added. bool key (str) – Key for desired scorer.
Get(key)
Returns: Scorer with the given key (read-only access). AllAtomScorer key (str) – Key for desired scorer. RuntimeError if there is no scorer with that key.
AttachEnvironment(env)
Parameters: env (AllAtomEnv) – Link all scorers to this score environment.
CalculateLinearCombination(linear_weights, start_resnum, num_residues, chain_idx)

Calculate linear combination of scores for the desired loop(s) (extracted from environment) against the set environment (see AllAtomScorer.CalculateScore()).

Parameters: linear_weights (dict (keys: str, values: float)) – Weights for each desired scorer. You can add a constant value to each score by defining a weight with key “intercept”. start_resnum (int / list of int) – Res. number(s) defining the position(s) in the SEQRES (see AllAtomEnv for indexing) num_residues (int / list of int) – Length of loop(s). chain_idx (int / list of int) – Index of chain the loop(s) belongs to (see AllAtomEnv for indexing) Score for the given set of atoms. float RuntimeError if linear_weights has a key for which no scorer exists or anything raised in AllAtomScorer.CalculateScore() for any of the used scorers.
__getitem__(key)
__setitem__(key)

Allow read/write access (with [key]) to scorer object with given key.

Parameters: key (str) – Key for desired scorer.
promod3.scoring.LoadDefaultAllAtomOverallScorer()
Returns: Loads or creates the default scorers accessible through following keys: “aa_interaction”, “aa_packing”, “aa_clash” AllAtomOverallScorer

## AllAtomScorer base class¶

class promod3.scoring.AllAtomScorer

Base class for all the all atom scorers listed below.

AttachEnvironment(env)
Parameters: env (AllAtomEnv) – Link scorer to this score environment.
CalculateScore(start_resnum, num_residues, chain_idx)

Calculates score for the desired loop(s) (extracted from environment) against the set environment. Unless otherwise noted in the scorer, a lower “score” is better!

Parameters: start_resnum (int / list of int) – Res. number(s) defining the position(s) in the SEQRES (see AllAtomEnv for indexing) num_residues (int / list of int) – Length of loop(s). chain_idx (int / list of int) – Index of chain the loop(s) belongs to (see AllAtomEnv for indexing) Score for the given set of atoms. float (for most scorers) RuntimeError if scorer was never attached to a score environment, if scorer has never been properly initialized or if chain_index / start_resnum lead to invalid positions.
CalculateScoreProfile(start_resnum, num_residues, chain_idx=0)

Calculates per residue scores for the desired loop(s) (extracted from environment) against the set environment.

Parameters: start_resnum (int / list of int) – Res. number(s) defining the position(s) in the SEQRES (see AllAtomEnv for indexing) num_residues (int) – Length of loop(s). chain_idx (int / list of int) – Index of chain the loop(s) belongs to (see AllAtomEnv for indexing) Scores for the given loop(s), one for each residue. list of float / list of list of float

## AllAtomInteractionScorer class¶

class promod3.scoring.AllAtomInteractionScorer(cutoff, bins, seq_sep)

Inherits all functionality of AllAtomScorer. Evaluates a pairwise pseudo interaction energy between all atoms which are located within a cutoff and which are at least seq_sep residues apart. An energy is assigned to each distance using equally sized bins and distinguishing all possible pairs of atoms (usually the energy only differs for chemically distinguishable heavy atoms). By default, the scorer calculates the scores by including everything, the stuff set in the environment and the coordinates in the input loops. You can change this behaviour with the according functions.

The scorer needs to be initialized either by loading a predefined scorer (e.g. LoadAllAtomInteractionScorer()) or by setting all energies (see SetEnergy()).

Parameters: cutoff (float) – Radius in which other atoms are counted. bins (int) – Number of equally sized bins to discretize distances (range of [0,*cutoff*]). seq_sep (int) – Minimal separation in sequence two residues must have to be considered. RuntimeError if cutoff < 0, bins < 1 or seq_sep < 1.
static Load(filename)
static LoadPortable(filename)

Loads raw binary file generated with Save() (optimized for fast reading) / portable file generated with SavePortable() (slower but less machine-dependent).

Parameters: filename (str) – Path to the file from which to load. The loaded scorer AllAtomInteractionScorer RuntimeError if file cannot be opened or if file cannot be parsed (see here for details).
Save(filename)
SavePortable(filename)

Saves a raw / portable binary representation. Use portable files for distribution and convert locally to raw files. See here for details.

Parameters: filename (str) – Path to the file where it will be saved. RuntimeError if file cannot be opened.
SetEnergy(aaa1, aaa2, bin, energy)

Setup one energy value. Unless a predefined scorer is loaded, this must be called for every pair of heavy atom types and for every bin < bins. Internal symmetry is enforced => Calling SetEnergy(aaa1, aaa2, bin, energy) is equivalent to calling SetEnergy(aaa1, aaa2, bin, energy) AND SetEnergy(aaa2, aaa1, bin, energy).

Parameters: aaa1 (AminoAcidAtom) – Heavy atom type for first interaction partner. aaa2 (AminoAcidAtom) – Heavy atom type for second interaction partner. bin (int) – Discrete bin describing the interaction distance. energy (float) – Energy to set for those parameters. RuntimeError if inputs are invalid
DoInternalScores(do_it)
Parameters: do_it (bool) – Whether to include pairwise interactions within the loop. True by default.
DoExternalScores(do_it)
Parameters: do_it (bool) – Whether to include pairwise interactions towards the environment. True by default.
DoNormalize(do_it)
Parameters: do_it (bool) – Whether to normalize the calculated scores by the number of residues in the input loop. True by default.
promod3.scoring.LoadAllAtomInteractionScorer()
Returns: The default predefined AllAtomInteractionScorer (loaded from disk) AllAtomInteractionScorer

## AllAtomPackingScorer class¶

class promod3.scoring.AllAtomPackingScorer(cutoff, max_count)

Inherits all functionality of AllAtomScorer. Evaluates pseudo energies by counting surrounding atoms within a certain cutoff radius around all heavy atoms not belonging to the assessed residue itself.

The scorer needs to be initialized either by loading a predefined scorer (e.g. LoadAllAtomPackingScorer()) or by setting all energies (see SetEnergy()).

Parameters: cutoff (float) – Radius in which other atoms are counted. max_count (int) – If number of other atoms exceeds max_count, it will be set to this number. RuntimeError if cutoff < 0, max_count < 1.
static Load(filename)
static LoadPortable(filename)

Loads raw binary file generated with Save() (optimized for fast reading) / portable file generated with SavePortable() (slower but less machine-dependent).

Parameters: filename (str) – Path to the file from which to load. The loaded scorer AllAtomPackingScorer RuntimeError if file cannot be opened or if file cannot be parsed (see here for details).
Save(filename)
SavePortable(filename)

Saves a raw / portable binary representation. Use portable files for distribution and convert locally to raw files. See here for details.

Parameters: filename (str) – Path to the file where it will be saved. RuntimeError if file cannot be opened.
SetEnergy(aaa, count, energy)

Setup one energy value. Unless a predefined scorer is loaded, this must be called for every heavy atom type and for every count <= max_count.

Parameters: aaa (AminoAcidAtom) – Heavy atom type for which to set energy. count (int) – Number of surrounding atoms for which to set energy. energy (float) – Energy to set for those parameters. RuntimeError if inputs are invalid
DoNormalize(do_it)
Parameters: do_it (bool) – Whether to normalize the calculated scores by the number of residues in the input loop. True by default.
promod3.scoring.LoadAllAtomPackingScorer()
Returns: The default predefined AllAtomPackingScorer (loaded from disk) AllAtomPackingScorer

## AllAtomClashScorer class¶

class promod3.scoring.AllAtomClashScorer

Inherits all functionality of AllAtomScorer. Calculates a simple clash score of all atoms against the environment. There is no need to define any parameters here as all interaction energies are fixed (see Eq. (11) in [canutescu2003b]). By default, the scorer calculates the scores by including everything, the stuff set in the environment and the coordinates in the input loops. You can change this behaviour with the according functions.

DoInternalScores(do_it)
Parameters: do_it (bool) – Whether to include pairwise interactions within the loop. True by default.
DoExternalScores(do_it)
Parameters: do_it (bool) – Whether to include pairwise interactions towards the environment. True by default.
DoNormalize(do_it)
Parameters: do_it (bool) – Whether to normalize the calculated scores by the number of residues in the input loop. True by default.

## Search

Enter search terms or a module, class or function name.

Backbone Scorers

## Next topic

Other Scoring Functions