IMP  2.1.0
The Integrative Modeling Platform
IMP::kernel Namespace Reference

See IMP.kernel for more information.

Classes

class  AttributeOptimizer
 Base class for optimizers that act on individual attributes. More...
 
class  CommandDispatcher
 Allow applications to easily implement commmands. More...
 
class  Configuration
 A class to store a configuration of a model. More...
 
class  ConfigurationSet
 A class to store a set of configurations of a model. More...
 
class  Constraint
 Implement a constraint on the Model. More...
 
class  Container
 Abstract class for containers of particles. More...
 
class  Decorator
 
class  DerivativeAccumulator
 Class for adding derivatives from restraints to the model. More...
 
struct  EvaluationState
 
struct  FloatIndex
 
class  GenericScopedRemoveRestraint
 Removes the Restraint until RAII object is destroyed. More...
 
class  GenericScopedRemoveScoreState
 
class  GenericScopedRestraint
 Removes the Restraint when the RAII object is destroyed. More...
 
class  GenericScopedScoreState
 
class  Key
 A base class for Keys. More...
 
class  Model
 Class for storing model, its restraints, constraints, and particles. More...
 
class  ModelObject
 
class  Optimizer
 Base class for all optimizers. More...
 
class  OptimizerState
 Shared optimizer state that is invoked upon commitment of new coordinates. More...
 
class  OptionParser
 IMP-specific subclass of optparse.OptionParser. More...
 
class  PairContainer
 A shared container for Pairs. More...
 
class  PairContainerAdaptor
 
class  PairModifier
 A base class for modifiers of ParticlePairsTemp. More...
 
class  PairPredicate
 Abstract predicate function. More...
 
class  PairScore
 Abstract score function. More...
 
class  Particle
 Class to handle individual model particles. More...
 
class  ParticleAdaptor
 
class  ParticleIndexAdaptor
 
class  ParticleIndexesAdaptor
 
class  ParticleIndexPairsAdaptor
 
class  ParticleInputs
 
class  ParticleOutputs
 
class  PythonDirectedGraph
 
class  QuadContainer
 A shared container for Quads. More...
 
class  QuadContainerAdaptor
 
class  QuadModifier
 A base class for modifiers of ParticleQuadsTemp. More...
 
class  QuadPredicate
 Abstract predicate function. More...
 
class  QuadScore
 Abstract score function. More...
 
class  Refiner
 Abstract class to implement hierarchical methods. More...
 
class  Restraint
 A restraint is a term in an IMP ScoringFunction. More...
 
class  RestraintsAdaptor
 
class  RestraintSet
 Object used to hold a set of restraints. More...
 
class  Sampler
 Base class for all samplers. More...
 
class  SaveToConfigurationSetOptimizerState
 
class  ScopedAddCacheAttribute
 
class  ScopedSetAttribute
 
class  ScoreAccumulator
 Class for adding up scores during ScoringFunction evaluation. More...
 
class  ScoreState
 ScoreStates maintian invariants in the Model. More...
 
class  ScoringFunction
 
class  ScoringFunctionAdaptor
 
class  SingletonContainer
 A shared container for Singletons. More...
 
class  SingletonContainerAdaptor
 
class  SingletonModifier
 A base class for modifiers of ParticlesTemp. More...
 
class  SingletonPredicate
 Abstract predicate function. More...
 
class  SingletonScore
 Abstract score function. More...
 
class  TripletContainer
 A shared container for Triplets. More...
 
class  TripletContainerAdaptor
 
class  TripletModifier
 A base class for modifiers of ParticleTripletsTemp. More...
 
class  TripletPredicate
 Abstract predicate function. More...
 
class  TripletScore
 Abstract score function. More...
 
class  UnaryFunction
 Abstract single variable functor class for score functions. More...
 
class  Undecorator
 

Typedefs

typedef IMP::base::Vector
< IMP::base::Pointer
< AttributeOptimizer > > 
AttributeOptimizers
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< AttributeOptimizer > > 
AttributeOptimizersTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< Configuration > > 
Configurations
 
typedef IMP::base::Vector
< IMP::base::Pointer
< ConfigurationSet > > 
ConfigurationSets
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< ConfigurationSet > > 
ConfigurationSetsTemp
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< Configuration > > 
ConfigurationsTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< Constraint > > 
Constraints
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< Constraint > > 
ConstraintsTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< Container > > 
Containers
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< Container > > 
ContainersTemp
 
typedef boost::graph DependencyGraph
 A directed graph on the interactions between the various objects in the model. More...
 
typedef
DependencyGraph::EdgeNameMap 
DependencyGraphConstEdgeName
 
typedef
DependencyGraph::VertexNameMap 
DependencyGraphConstVertexName
 
typedef
DependencyGraph::edge_descriptor 
DependencyGraphEdge
 
typedef boost::graph_traits
< DependencyGraph
DependencyGraphTraits
 
typedef
DependencyGraph::vertex_descriptor 
DependencyGraphVertex
 
typedef IMP::base::Vector
< DerivativeAccumulator
DerivativeAccumulators
 
typedef IMP::base::Vector
< EvaluationState
EvaluationStates
 
typedef IMP::base::Vector
< FloatIndex
FloatIndexes
 
typedef IMP::base::Vector
< IMP::base::Pointer
< kernel::ModelObject > > 
ModelObjects
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< kernel::ModelObject > > 
ModelObjectsTemp
 
typedef base::Vector
< ModelObjectsTemp
ModelObjectsTemps
 
typedef IMP::base::Vector
< IMP::base::Pointer
< kernel::Model > > 
Models
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< kernel::Model > > 
ModelsTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< Optimizer > > 
Optimizers
 
typedef IMP::base::Vector
< IMP::base::Pointer
< OptimizerState > > 
OptimizerStates
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< OptimizerState > > 
OptimizerStatesTemp
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< Optimizer > > 
OptimizersTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< PairContainer > > 
PairContainers
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< PairContainer > > 
PairContainersTemp
 
typedef PairModifier PairDerivativeModifier
 
typedef IMP::base::Vector
< IMP::base::Pointer
< PairModifier > > 
PairModifiers
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< PairModifier > > 
PairModifiersTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< PairPredicate > > 
PairPredicates
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< PairPredicate > > 
PairPredicatesTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< PairScore > > 
PairScores
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< PairScore > > 
PairScoresTemp
 
typedef base::Index
< ParticleIndexTag > 
ParticleIndex
 
typedef base::Vector
< ParticleIndex
ParticleIndexes
 
typedef base::Array
< 2, ParticleIndex
ParticleIndexPair
 
typedef IMP::base::Vector
< ParticleIndexPair
ParticleIndexPairs
 
typedef base::Array
< 4, ParticleIndex
ParticleIndexQuad
 
typedef IMP::base::Vector
< ParticleIndexQuad
ParticleIndexQuads
 
typedef base::Array
< 3, ParticleIndex
ParticleIndexTriplet
 
typedef IMP::base::Vector
< ParticleIndexTriplet
ParticleIndexTriplets
 
typedef base::Array
< 2, base::WeakPointer
< Particle >, Particle * > 
ParticlePair
 
typedef IMP::base::Vector
< ParticlePair
ParticlePairsTemp
 
typedef base::Array
< 4, base::WeakPointer
< Particle >, Particle * > 
ParticleQuad
 
typedef IMP::base::Vector
< ParticleQuad
ParticleQuadsTemp
 
typedef base::Vector
< base::Pointer< Particle > > 
Particles
 
typedef base::Vector
< base::WeakPointer< Particle > > 
ParticlesTemp
 
typedef base::Vector
< ParticlesTemp
ParticlesTemps
 
typedef base::Array
< 3, base::WeakPointer
< Particle >, Particle * > 
ParticleTriplet
 
typedef IMP::base::Vector
< ParticleTriplet
ParticleTripletsTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< QuadContainer > > 
QuadContainers
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< QuadContainer > > 
QuadContainersTemp
 
typedef QuadModifier QuadDerivativeModifier
 
typedef IMP::base::Vector
< IMP::base::Pointer
< QuadModifier > > 
QuadModifiers
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< QuadModifier > > 
QuadModifiersTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< QuadPredicate > > 
QuadPredicates
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< QuadPredicate > > 
QuadPredicatesTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< QuadScore > > 
QuadScores
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< QuadScore > > 
QuadScoresTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer< Refiner > > 
Refiners
 a collection of Refiner objects More...
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< Refiner > > 
RefinersTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< Restraint > > 
Restraints
 
typedef IMP::base::Vector
< IMP::base::Pointer
< RestraintSet > > 
RestraintSets
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< RestraintSet > > 
RestraintSetsTemp
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< Restraint > > 
RestraintsTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer< Sampler > > 
Samplers
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< Sampler > > 
SamplersTemp
 
typedef
GenericScopedRemoveRestraint
< Restraint
ScopedRemoveRestraint
 Remove a restraint until the object goes out of scope.
 
typedef
GenericScopedRemoveScoreState
< ScoreState
ScopedRemoveScoreState
 Remove a score state until the object goes out of scope.
 
typedef GenericScopedRestraint
< Restraint
ScopedRestraint
 Remove a restraint when the object goes out of scope.
 
typedef
GenericScopedScoreState
< ScoreState
ScopedScoreState
 Remove a score state when the object goes out of scope.
 
typedef ScopedSetAttribute
< FloatKey, Float
ScopedSetFloatAttribute
 
typedef IMP::base::Vector
< ScoreAccumulator
ScoreAccumulators
 
typedef IMP::base::Vector
< IMP::base::Pointer
< ScoreState > > 
ScoreStates
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< ScoreState > > 
ScoreStatesTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< ScoringFunction > > 
ScoringFunctions
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< ScoringFunction > > 
ScoringFunctionsTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< SingletonContainer > > 
SingletonContainers
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< SingletonContainer > > 
SingletonContainersTemp
 
typedef SingletonModifier SingletonDerivativeModifier
 
typedef IMP::base::Vector
< IMP::base::Pointer
< SingletonModifier > > 
SingletonModifiers
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< SingletonModifier > > 
SingletonModifiersTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< SingletonPredicate > > 
SingletonPredicates
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< SingletonPredicate > > 
SingletonPredicatesTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< SingletonScore > > 
SingletonScores
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< SingletonScore > > 
SingletonScoresTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< TripletContainer > > 
TripletContainers
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< TripletContainer > > 
TripletContainersTemp
 
typedef TripletModifier TripletDerivativeModifier
 
typedef IMP::base::Vector
< IMP::base::Pointer
< TripletModifier > > 
TripletModifiers
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< TripletModifier > > 
TripletModifiersTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< TripletPredicate > > 
TripletPredicates
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< TripletPredicate > > 
TripletPredicatesTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< TripletScore > > 
TripletScores
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< TripletScore > > 
TripletScoresTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< UnaryFunction > > 
UnaryFunctions
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< UnaryFunction > > 
UnaryFunctionsTemp
 
typedef IMP::base::Vector
< IMP::base::Pointer
< Undecorator > > 
Undecorators
 
typedef IMP::base::Vector
< IMP::base::WeakPointer
< Undecorator > > 
UndecoratorsTemp
 

Functions

template<class Before , class After >
Constraintcreate_constraint (Before *b, After *a, const typename Before::Argument &t, std::string name=std::string())
 
Restraints create_decomposition (const RestraintsTemp &rs)
 
ScoringFunctions create_decomposition (ScoringFunction *sf)
 
template<class Score >
Restraintcreate_restraint (Score *s, const typename Score::Argument &t, std::string name=std::string())
 
template<class Score >
Restraintcreate_restraint (const Score *s, const typename Score::Argument &t, std::string name=std::string())
 
template<class RestraintType >
ScoringFunctioncreate_scoring_function (RestraintType *rs, double weight=1.0, double max=NO_MAX, std::string name=std::string())
 
const algebra::BoundingBoxD< 3 > get_bounding_box_d_geometry (kernel::Particle *p)
 
std::string get_data_path (std::string file_name)
 Return the full path to installed data. More...
 
DependencyGraph get_dependency_graph (kernel::Model *m)
 
ParticlesTemp get_dependent_particles (ModelObject *p, const ModelObjectsTemp &all, const DependencyGraph &dg, const DependencyGraphVertexIndex &index)
 
RestraintsTemp get_dependent_restraints (ModelObject *p, const ModelObjectsTemp &all, const DependencyGraph &dg, const DependencyGraphVertexIndex &index)
 
ScoreStatesTemp get_dependent_score_states (ModelObject *p, const ModelObjectsTemp &all, const DependencyGraph &dg, const DependencyGraphVertexIndex &index)
 
std::string get_example_path (std::string file_name)
 Return the path to installed example data for this module. More...
 
ParticleIndexes get_indexes (const ParticlesTemp &ps)
 
ParticleIndexPairs get_indexes (const ParticlePairsTemp &ps)
 
ParticlesTemp get_particles (kernel::Model *m, const ParticleIndexes &ps)
 
DependencyGraph get_pruned_dependency_graph (kernel::Model *m)
 
ParticlesTemp get_required_particles (ModelObject *p, const ModelObjectsTemp &all, const DependencyGraph &dg, const DependencyGraphVertexIndex &index)
 
ScoreStatesTemp get_required_score_states (const ModelObjectsTemp &mos, ScoreStatesTemp exclude=ScoreStatesTemp())
 
ScoreStatesTemp get_required_score_states (ModelObject *p, const ModelObjectsTemp &all, const DependencyGraph &dg, const DependencyGraphVertexIndex &index)
 
template<class It >
RestraintsTemp get_restraints (It b, It e)
 
const algebra::Sphere3D get_sphere_d_geometry (kernel::Particle *p)
 
ScoreStatesTemp get_update_order (ScoreStatesTemp input)
 
const algebra::Vector3D get_vector_d_geometry (kernel::Particle *p)
 
DependencyGraphVertexIndex get_vertex_index (const DependencyGraph &g)
 
template<class Pred >
internal::PredicateEquals
< Pred, true > 
make_predicate_equal (const Pred *p, Model *m, int value)
 
template<class Pred >
internal::PredicateEquals
< Pred, false > 
make_predicate_not_equal (const Pred *p, Model *m, int value)
 
void set_sphere_d_geometry (kernel::Particle *p, const algebra::Sphere3D &v)
 
void set_vector_d_geometry (kernel::Particle *p, const algebra::Vector3D &v)
 
void show_as_graphviz (const DependencyGraph &name, base::TextOutput out)
 
void show_restraint_hierarchy (ScoringFunctionAdaptor rs, std::ostream &out=std::cout)
 Print the hierarchy of restraints. More...
 

Variables

const double BAD_SCORE
 
const double NO_MAX
 Use this value when you want to turn off maximum for restraint evaluation.
 

Attribute Keys

Each type of attribute has an associated type of key. The keys can be constructed from a string. Such construction can be expensive and so the resulting keys should be cached.

typedef Key< 0, true > FloatKey
 The type used to identify float attributes in the Particles.
 
typedef IMP::base::Vector
< FloatKey
FloatKeys
 
typedef Key< 1, true > IntKey
 The type used to identify int attributes in the Particles.
 
typedef IMP::base::Vector< IntKeyIntKeys
 
typedef Key< 2, true > StringKey
 The type used to identify string attributes in the Particles.
 
typedef IMP::base::Vector
< StringKey
StringKeys
 
typedef Key< 3, true > ParticleIndexKey
 The type used to identify a particle attribute in the Particles.
 
typedef IMP::base::Vector
< ParticleIndexKey
ParticleIndexKeys
 
typedef Key< 4, true > ObjectKey
 The type used to identify an Object attribute.
 
typedef IMP::base::Vector
< ObjectKey
ObjectKeys
 
typedef Key< 9, true > WeakObjectKey
 The type used to identify a non-ref counted Object attribute.
 
typedef IMP::base::Vector
< WeakObjectKey
WeakObjectKeys
 
typedef Key< 5, true > IntsKey
 The type used to identify int attributes in the Particles.
 
typedef IMP::base::Vector
< IntsKey
IntsKeys
 
typedef Key< 6, true > ParticleIndexesKey
 The type used to identify a particle attribute in the Particles.
 
typedef IMP::base::Vector
< ParticleIndexesKey
ParticleIndexesKeys
 
typedef Key< 7, true > ObjectsKey
 The type used to identify a particle attribute in the Particles.
 
typedef IMP::base::Vector
< ObjectsKey
ObjectsKeys
 
typedef Key< 8, true > ModelKey
 The type used to identify data stored directly in the model.
 
typedef IMP::base::Vector
< kernel::ModelKey
ModelKeys
 

Gathering restraints

It is sometimes useful to extract all the non-RestraintSet restraints from a hierarchy involving RestraintSets mixed with Restraints.

RestraintsTemp get_restraints (const RestraintsTemp &rs)
 

Inputs and outputs

These methods recursively find all inputs or outputs of a given type.

If you don't want recursive, use the non input/output variants.

ParticlesTemp get_input_particles (const ModelObjectsTemp &mos)
 
ContainersTemp get_input_containers (const ModelObjectsTemp &mos)
 
ParticlesTemp get_output_particles (const ModelObjectsTemp &mos)
 
ContainersTemp get_output_containers (const ModelObjectsTemp &mos)
 

Buffer I/O

Write/read the state of the particles to/from a buffer in memory.

Note
Not all particles need to have all the attributes, missing attributes will be skipped. However, the set of attributes must match on the write and read particles.
There is no handling of architectural issues. That is, this is only guaranteed to work if it is read and written on the same operating system and system bit length. We could probably fix this.
both these methods should be considered unstable.
base::Vector< char > write_particles_to_buffer (const ParticlesTemp &particles, const FloatKeys &keys)
 return a binary buffer with the data
 
void read_particles_from_buffer (const base::Vector< char > &buffer, const ParticlesTemp &particles, const FloatKeys &keys)
 load found attributes into the particles
 

Standard module methods

All IMP modules have a set of standard methods to help get information about the module and about files associated with the module.

std::string get_module_version ()
 
std::string get_module_name ()
 

Python Only

The following functions are only available in python.

void show_altgraph (Graph g)
 
networkx::DiGraph get_networkx_graph (Graph g)
 
std::string show_graphviz (Graph g)
 

Typedef Documentation

Store a set of objects.

Definition at line 50 of file kernel/Configuration.h.

Store a set of objects.

Definition at line 46 of file kernel/ConfigurationSet.h.

Pass a \ set of \ objects. \ See \ Configuration

Definition at line 50 of file kernel/Configuration.h.

Store a set of objects.

Definition at line 64 of file kernel/Constraint.h.

Pass a \ set of \ objects. \ See \ Constraint

Definition at line 64 of file kernel/Constraint.h.

Store a set of objects.

Definition at line 93 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ Container

Definition at line 94 of file kernel/base_types.h.

typedef boost::graph IMP::kernel::DependencyGraph

The vertices are named by the associated Object*. There is an edge from a to b, if a is an input to b. For example, there is an edge from a particle to a restraint if the restraint directly reads the particle.

See Dependencies for more information about dependencies.See Graphs in IMP for more information.

Definition at line 37 of file kernel/dependency_graph.h.

Pass or store a set of EvaluationState .

Definition at line 36 of file kernel/ScoreAccumulator.h.

Pass or store a set of FloatIndex .

Definition at line 22 of file kernel/FloatIndex.h.

Pass or store a set of FloatKey .

Definition at line 33 of file kernel/base_types.h.

Pass or store a set of IntKey .

Definition at line 37 of file kernel/base_types.h.

Pass or store a set of IntsKey .

Definition at line 57 of file kernel/base_types.h.

Pass or store a set of kernel::ModelKey .

Definition at line 75 of file kernel/base_types.h.

Store a set of objects.

Definition at line 81 of file kernel/base_types.h.

Store a set of objects.

Definition at line 85 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ kernel::Model

Definition at line 86 of file kernel/base_types.h.

Pass or store a set of ObjectKey .

Definition at line 49 of file kernel/base_types.h.

Pass or store a set of ObjectsKey .

Definition at line 71 of file kernel/base_types.h.

Store a set of objects.

Definition at line 181 of file kernel/Optimizer.h.

Store a set of objects.

Definition at line 99 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ OptimizerState

Definition at line 100 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ Optimizer

Definition at line 181 of file kernel/Optimizer.h.

Store a set of objects.

Definition at line 103 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ PairContainer

Definition at line 104 of file kernel/base_types.h.

Store a set of objects.

Definition at line 130 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ PairModifier

Definition at line 131 of file kernel/base_types.h.

Store a set of objects.

Definition at line 121 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ PairPredicate

Definition at line 122 of file kernel/base_types.h.

Store a set of objects.

Definition at line 112 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ PairScore

Definition at line 113 of file kernel/base_types.h.

typedef base::Index<ParticleIndexTag> IMP::kernel::ParticleIndex

A unique identifier for a particle within a Model. Use it to identifying particles when getting and setting attributes and constructing decorators.

See for example, Model attributes, Decorator, and Model::get_particle().

Definition at line 154 of file kernel/base_types.h.

Pass or store a set of ParticleIndexesKey .

Definition at line 61 of file kernel/base_types.h.

Pass or store a set of ParticleIndexKey .

Definition at line 45 of file kernel/base_types.h.

Pass or store a set of ParticleIndexPair .

Definition at line 161 of file kernel/base_types.h.

Pass or store a set of ParticleIndexQuad .

Definition at line 163 of file kernel/base_types.h.

Pass or store a set of ParticleIndexTriplet .

Definition at line 162 of file kernel/base_types.h.

An ordered pair of particles.

Definition at line 135 of file kernel/base_types.h.

Pass or store a set of ParticlePair .

Definition at line 139 of file kernel/base_types.h.

An ordered quad of particles.

Definition at line 144 of file kernel/base_types.h.

Pass or store a set of ParticleQuad .

Definition at line 145 of file kernel/base_types.h.

An ordered triplet of particles.

Definition at line 141 of file kernel/base_types.h.

Pass or store a set of ParticleTriplet .

Definition at line 142 of file kernel/base_types.h.

Store a set of objects.

Definition at line 107 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ QuadContainer

Definition at line 108 of file kernel/base_types.h.

Store a set of objects.

Definition at line 134 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ QuadModifier

Definition at line 135 of file kernel/base_types.h.

Store a set of objects.

Definition at line 125 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ QuadPredicate

Definition at line 126 of file kernel/base_types.h.

Store a set of objects.

Definition at line 116 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ QuadScore

Definition at line 117 of file kernel/base_types.h.

Store a set of objects.

Definition at line 74 of file kernel/Refiner.h.

Pass a \ set of \ objects. \ See \ Refiner

Definition at line 74 of file kernel/Refiner.h.

Store a set of objects.

Definition at line 79 of file kernel/base_types.h.

Store a set of objects.

Definition at line 87 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ RestraintSet

Definition at line 88 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ Restraint

Definition at line 80 of file kernel/base_types.h.

Store a set of objects.

Definition at line 56 of file kernel/Sampler.h.

Pass a \ set of \ objects. \ See \ Sampler

Definition at line 56 of file kernel/Sampler.h.

Store a set of objects.

Definition at line 89 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ ScoreState

Definition at line 90 of file kernel/base_types.h.

Store a set of objects.

Definition at line 91 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ ScoringFunction

Definition at line 92 of file kernel/base_types.h.

Store a set of objects.

Definition at line 101 of file kernel/base_types.h.

Store a set of objects.

Definition at line 128 of file kernel/base_types.h.

Store a set of objects.

Definition at line 119 of file kernel/base_types.h.

Store a set of objects.

Definition at line 110 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ SingletonScore

Definition at line 111 of file kernel/base_types.h.

Pass or store a set of StringKey .

Definition at line 41 of file kernel/base_types.h.

Store a set of objects.

Definition at line 105 of file kernel/base_types.h.

Store a set of objects.

Definition at line 132 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ TripletModifier

Definition at line 133 of file kernel/base_types.h.

Store a set of objects.

Definition at line 123 of file kernel/base_types.h.

Store a set of objects.

Definition at line 114 of file kernel/base_types.h.

Pass a \ set of \ objects. \ See \ TripletScore

Definition at line 115 of file kernel/base_types.h.

Store a set of objects.

Definition at line 56 of file kernel/UnaryFunction.h.

Pass a \ set of \ objects. \ See \ UnaryFunction

Definition at line 56 of file kernel/UnaryFunction.h.

Store a set of objects.

Definition at line 33 of file kernel/Undecorator.h.

Pass a \ set of \ objects. \ See \ Undecorator

Definition at line 33 of file kernel/Undecorator.h.

Pass or store a set of WeakObjectKey .

Definition at line 53 of file kernel/base_types.h.

Function Documentation

template<class Before , class After >
Constraint* IMP::kernel::create_constraint ( Before *  b,
After *  a,
const typename Before::Argument &  t,
std::string  name = std::string() 
)

When programming in C++, you can use generic constraint instead of a SingletonConstraint, PairConstraint, etc. The result is somewhat faster (20% or so).

Definition at line 56 of file kernel/generic.h.

Restraints IMP::kernel::create_decomposition ( const RestraintsTemp &  rs)

Return the decomposition of a list of restraints.

ScoringFunctions IMP::kernel::create_decomposition ( ScoringFunction *  sf)

Return a list of ScoringFunction objects where each is as simple as possible and evaluating the sum (and anding the good score bits) is exactly like evaluating the one ScoringFunction.

template<class Score >
Restraint* IMP::kernel::create_restraint ( Score *  s,
const typename Score::Argument &  t,
std::string  name = std::string() 
)

When programming in C++, you can use generic restraint instead of a SingletonRestraint, PairRestraint, etc. The result is somewhat faster (20% or so).

Definition at line 35 of file kernel/generic.h.

+ Here is the call graph for this function:

template<class RestraintType >
ScoringFunction* IMP::kernel::create_scoring_function ( RestraintType *  rs,
double  weight = 1.0,
double  max = NO_MAX,
std::string  name = std::string() 
)

Create a ScoringFunction on a single restraints. This can be faster than using a RestraintsScoringFunction.

Definition at line 22 of file kernel/generic.h.

const algebra::BoundingBoxD<3> IMP::kernel::get_bounding_box_d_geometry ( kernel::Particle *  p)

See generic geometry for more information.

Definition at line 199 of file XYZR.h.

+ Here is the call graph for this function:

std::string IMP::kernel::get_data_path ( std::string  file_name)

Each module has its own data directory, so be sure to use the version of this function in the correct module. To read the data file "data_library" that was placed in the data directory of module "mymodule", do something like

std::ifstream in(IMP::mymodule::get_data_path("data_library"));

This will ensure that the code works when IMP is installed or used via the setup_environment.sh script.

DependencyGraph IMP::kernel::get_dependency_graph ( kernel::Model *  m)

The dependency graph captures the interactions between Restraint, ScoreState and Particle objects. The graph has a directed edge if the source of the edge is an input for the target of the edge or the target of the edge is an output for the source. eg, there is an edge connecting a Container to the Restraint which gets its particles from the Container.

See Also
get_pruned_dependency_graph()
ParticlesTemp IMP::kernel::get_dependent_particles ( ModelObject *  p,
const ModelObjectsTemp &  all,
const DependencyGraph &  dg,
const DependencyGraphVertexIndex &  index 
)
Deprecated:
As of IMP release 2.1. See the IMP Deprecation Policy for more information about deprecation in IMP. You should act directly on the ModelObjects instead.
RestraintsTemp IMP::kernel::get_dependent_restraints ( ModelObject *  p,
const ModelObjectsTemp &  all,
const DependencyGraph &  dg,
const DependencyGraphVertexIndex &  index 
)
Deprecated:
As of IMP release 2.1. See the IMP Deprecation Policy for more information about deprecation in IMP. You should act directly on the ModelObjects instead.
ScoreStatesTemp IMP::kernel::get_dependent_score_states ( ModelObject *  p,
const ModelObjectsTemp &  all,
const DependencyGraph &  dg,
const DependencyGraphVertexIndex &  index 
)
Deprecated:
As of IMP release 2.1. See the IMP Deprecation Policy for more information about deprecation in IMP. You should act directly on the ModelObjects instead.
std::string IMP::kernel::get_example_path ( std::string  file_name)

Each module has its own example directory, so be sure to use the version of this function in the correct module. For example to read the file example_protein.pdb located in the examples directory of the IMP::atom module, do

model));

This will ensure that the code works when IMP is installed or used via the setup_environment.sh script.

ParticleIndexes IMP::kernel::get_indexes ( const ParticlesTemp &  ps)

Get the indexes from a list of particles.

ParticleIndexPairs IMP::kernel::get_indexes ( const ParticlePairsTemp &  ps)

Get the indexes from a list of particle pairs.

ContainersTemp IMP::kernel::get_input_containers ( const ModelObjectsTemp &  mos)

Return all the input particles for a given ModelObject.

ParticlesTemp IMP::kernel::get_input_particles ( const ModelObjectsTemp &  mos)

Return all the input particles for a given ModelObject.

networkx::DiGraph IMP::kernel::get_networkx_graph ( Graph  g)
Export an IMP graph to a <a href="http://networkx.lanl.gov/">networkx</a>

graph. The resulting graph can be analyzed and displaye, although the graph layout algorithms in networkx seem to be quite poor compared to graphviz.

One a mac, such graphs can be displayed by

import matplotlib
# the engine to be used must be selected before pyplot is imported
matplotlib.use("macosx")
import matplotlib.pyplot as plt
import networkx
networkx.draw_spring(xg)
plt.show()
ContainersTemp IMP::kernel::get_output_containers ( const ModelObjectsTemp &  mos)

Return all the output particles for a given ModelObject.

ParticlesTemp IMP::kernel::get_output_particles ( const ModelObjectsTemp &  mos)

Return all the output particles for a given ModelObject.

ParticlesTemp IMP::kernel::get_particles ( kernel::Model *  m,
const ParticleIndexes &  ps 
)

Get the particles from a list of indexes.

DependencyGraph IMP::kernel::get_pruned_dependency_graph ( kernel::Model *  m)

The pruned dependency graph merges all particles which have the same dependencies to produce a simpler graph.

ParticlesTemp IMP::kernel::get_required_particles ( ModelObject *  p,
const ModelObjectsTemp &  all,
const DependencyGraph &  dg,
const DependencyGraphVertexIndex &  index 
)
Deprecated:
As of IMP release 2.1. See the IMP Deprecation Policy for more information about deprecation in IMP. You should act directly on the ModelObjects instead.
ScoreStatesTemp IMP::kernel::get_required_score_states ( const ModelObjectsTemp &  mos,
ScoreStatesTemp  exclude = ScoreStatesTemp() 
)

Compute the set of score states required by the passed list of ModelObjects. This will compute dependencies if needed.

ScoreStatesTemp IMP::kernel::get_required_score_states ( ModelObject *  p,
const ModelObjectsTemp &  all,
const DependencyGraph &  dg,
const DependencyGraphVertexIndex &  index 
)
Deprecated:
As of IMP release 2.1. See the IMP Deprecation Policy for more information about deprecation in IMP. You should act directly on the ModelObjects instead.
const algebra::Sphere3D IMP::kernel::get_sphere_d_geometry ( kernel::Particle *  p)

See generic geometry for more information.

Definition at line 188 of file XYZR.h.

+ Here is the call graph for this function:

ScoreStatesTemp IMP::kernel::get_update_order ( ScoreStatesTemp  input)

Return an appropriate (topoligically sorted) order to update the score states in.

const algebra::Vector3D IMP::kernel::get_vector_d_geometry ( kernel::Particle *  p)

See generic geometry for more information.

Definition at line 172 of file XYZ.h.

+ Here is the call graph for this function:

template<class Pred >
internal::PredicateEquals<Pred, true> IMP::kernel::make_predicate_equal ( const Pred *  p,
Model *  m,
int  value 
)

Return a functor that returns true when the predicate has a certain value.

Definition at line 20 of file kernel/functor.h.

template<class Pred >
internal::PredicateEquals<Pred, false> IMP::kernel::make_predicate_not_equal ( const Pred *  p,
Model *  m,
int  value 
)

Return a functor that returns true when the predicate doesn't have a certain value.

Definition at line 29 of file kernel/functor.h.

void IMP::kernel::set_sphere_d_geometry ( kernel::Particle *  p,
const algebra::Sphere3D &  v 
)

See generic geometry for more information.

Definition at line 193 of file XYZR.h.

+ Here is the call graph for this function:

void IMP::kernel::set_vector_d_geometry ( kernel::Particle *  p,
const algebra::Vector3D &  v 
)

See generic geometry for more information.

Definition at line 176 of file XYZ.h.

+ Here is the call graph for this function:

void IMP::kernel::show_altgraph ( Graph  g)

Use the python altgraph package to graphically display a graph. Note that is requires X11 to be running (you can find it in your Utilities folder in MacOS) and the window produced is shockingly retro.

An alterntative is to write the graph to a dot file

g.show_graphviz(open("graph.dot", "w"));

then turn it to pdf with dot

dot -Tpdf graph.dot > graph.pdf

and finally view the pdf.

std::string IMP::kernel::show_graphviz ( Graph  g)

Generate a nice pdf of the graph and attempt to open the pdf. The name of the pdf will be returned in case the attempt to open it fails.

void IMP::kernel::show_restraint_hierarchy ( ScoringFunctionAdaptor  rs,
std::ostream &  out = std::cout 
)

The maximum accepted score (Restraint::get_maximum_score()) and the weight (Restraint::get_weight()) are printed for each restraint.

Variable Documentation

const double IMP::kernel::BAD_SCORE

Evaluation can return this value if limits are exceeded and it is a ScoringFunction::evaluate_if_below() or ScoringFunction::evaluate_if_good