IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE > Class Template Reference

#include <IMP/score_functor/Statistical.h>

Inheritance diagram for IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >:

Detailed Description

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
class IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >

Create a pairwise statistical potential from a file. The Keys passed as a template argument are used to determine how to map the names of the types as described in the loaded file to indexes. That is, if atom::ResidueKey is passed as the Keys, the potential will expect a file which has one line for each pair of residue names.

The expected file format is:

    bin_width number_a number_b [offset]
    key_0a key_0b bin0 bin1 bin2...
    key_1a key_1b bin0 bin1 bin2...

The order of the lines (after the first one) does not matter. The bin_width is how much distance is allocated per bin (the distance used is that between the points). number_a and number_b are the numbers of particle types (number_b should only be specified if BIPARTITE is set).

Note
The values read in the file are for bins. That is, the first bin is from offset to offset+width. The second is offset+width to offset+ 2width. As a result, when interpolation is used, the function achieves the bin value at the center of the bin.
Parameters
[in]Keyis an IMP::Key which maps between names and indices
[in]BIPARTITEIf true, the two sets of particles being stored are different (e.g. a protein atom and a ligand atom), otherwise they are assumed to both be the same. Appropriate values must be provided in the file.
[in]INTERPOLATEIf true, even the scores without derivatives are spline interpolated. If false, only the evaluation of derivatives is interpolated with a spline.

Definition at line 53 of file Statistical.h.

Public Member Functions

 Statistical (IntKey k, double threshold, TextInput data_file)
 Statistical (IntKey k, double threshold, TextInput data_file, unsigned int shift)
bool get_is_bipartite () const
bool get_is_interpolated () const
bool get_is_trivially_zero (Model *m, const ParticleIndexPair &p, double squared_distance) const
double get_max () const
double get_maximum_range (Model *, const ParticleIndexPair &) const
IntPair get_number_of_particle_types () const
double get_offset () const
double get_score (Model *m, const ParticleIndexPair &pp, double distance) const
DerivativePair get_score_and_derivative (Model *m, const Array< 2, ParticleIndex > &pp, double distance) const
Floats get_second_derivatives (unsigned int i, unsigned int j) const
double get_spacing () const
double get_threshold () const
Floats get_values (unsigned int i, unsigned int j) const
Public Member Functions inherited from IMP::score_functor::Score
ModelObjectsTemp get_inputs (Model *m, const ParticleIndexes &pis) const
template<unsigned int D>
bool get_is_trivially_zero (Model *m, const Array< D, ParticleIndex > &p, double squared_distance) const
template<unsigned int D>
double get_maximum_range (Model *m, const Array< D, ParticleIndex > &p) const
template<unsigned int D>
double get_score (Model *m, const Array< D, ParticleIndex > &p, double distance) const
 Return the score at the passed feature size (eg distance).
template<unsigned int D>
DerivativePair get_score_and_derivative (Model *m, const Array< D, ParticleIndex > &p, double distance) const
 Return the score and derivative at the passed feature size (eg distance).
void show (std::ostream &) const

Constructor & Destructor Documentation

◆ Statistical() [1/3]

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::Statistical ( IntKey k,
double threshold,
TextInput data_file )
Parameters
[in]kThe attribute to use for determining the particle types
[in]thresholdThe maximum distance to score
[in]data_fileWhere to load the file from.

Definition at line 64 of file Statistical.h.

◆ Statistical() [2/3]

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::Statistical ( IntKey k,
double threshold,
TextInput data_file,
unsigned int shift )
Parameters
[in]kThe attribute to use for determining the particle types
[in]thresholdThe maximum distance to score
[in]data_fileWhere to load the file from.
[in]shiftThe offset for the types of the second set of types. eg, if the score is on protein and ligand atoms, the ligand atom types start with the value shift.

Definition at line 76 of file Statistical.h.

◆ Statistical() [3/3]

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::Statistical ( )

Definition at line 85 of file Statistical.h.

Member Function Documentation

◆ get_is_bipartite()

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
bool IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::get_is_bipartite ( ) const

Definition at line 127 of file Statistical.h.

◆ get_is_interpolated()

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
bool IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::get_is_interpolated ( ) const

Definition at line 128 of file Statistical.h.

◆ get_is_trivially_zero()

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
bool IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::get_is_trivially_zero ( Model * m,
const ParticleIndexPair & p,
double squared_distance ) const

Definition at line 112 of file Statistical.h.

◆ get_max()

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
double IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::get_max ( ) const

Definition at line 119 of file Statistical.h.

◆ get_maximum_range()

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
double IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::get_maximum_range ( Model * ,
const ParticleIndexPair &  ) const

Definition at line 109 of file Statistical.h.

◆ get_number_of_particle_types()

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
IntPair IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::get_number_of_particle_types ( ) const

Definition at line 129 of file Statistical.h.

◆ get_offset()

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
double IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::get_offset ( ) const

Definition at line 117 of file Statistical.h.

◆ get_score()

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
double IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::get_score ( Model * m,
const ParticleIndexPair & pp,
double distance ) const

Definition at line 88 of file Statistical.h.

◆ get_score_and_derivative()

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
DerivativePair IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::get_score_and_derivative ( Model * m,
const Array< 2, ParticleIndex > & pp,
double distance ) const

Definition at line 98 of file Statistical.h.

◆ get_second_derivatives()

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
Floats IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::get_second_derivatives ( unsigned int i,
unsigned int j ) const

Definition at line 124 of file Statistical.h.

◆ get_spacing()

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
double IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::get_spacing ( ) const

Definition at line 120 of file Statistical.h.

◆ get_threshold()

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
double IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::get_threshold ( ) const

Definition at line 118 of file Statistical.h.

◆ get_values()

template<class Key, bool BIPARTITE, bool INTERPOLATE, bool SPARSE = false>
Floats IMP::score_functor::Statistical< Key, BIPARTITE, INTERPOLATE, SPARSE >::get_values ( unsigned int i,
unsigned int j ) const

Definition at line 121 of file Statistical.h.


The documentation for this class was generated from the following file: