3 # Overview # {#dependencies}
7 In order to properly evaluate an
IMP::Restraint, all of its input
IMP::Particle and
IMP::Container objects must first be updated (eg, the non-bonded list contents must be correct and the coordinates of rigid body members must be correct). This requires processing the set of all dependencies amongst particles, containers, restraints and all and determing which need to be updated and in what order (so that
IMP::ScoreState objects only are asked to update things after their inputs are updated).
9 # Dependency graph # {#dependency_graph}
16 # Caching dependencies # {#dependency_caching}
18 Since generating and traversing the dependency graph is reasonably expensive, the relationships encoded in it are cached in the
IMP::Model. Specifically, the when dependencies are needed, the graph is generated and,
for each restraint, the ordered list of required (upstream) IMP::
ScoreState objects is computed. This is stored in the IMP::
Restraint. Subsequent evaluations of the restraint can simply used the cached list update the required data. These caches are cleared whenever
22 - the contents of a containers like IMP::container::ListSingletonContainer is changed
void before_evaluate()
Force update of the structure.
IMP::kernel::ScoreState ScoreState
void after_evaluate(DerivativeAccumulator *accpt)
Do post evaluation work if needed.
IMP::base::Vector< IMP::base::Pointer< Restraint > > Restraints
Return all close unordered pairs of particles taken from the SingletonContainer.
ScoreStates maintian invariants in the Model.
DependencyGraph get_dependency_graph(kernel::Model *m)
IMP::base::Vector< IMP::base::Pointer< ScoreState > > ScoreStates
Abstract class for containers of particles.
Class to handle individual model particles.
IMP::kernel::DependencyGraph DependencyGraph
A decorator for a rigid body.
IMP::kernel::Restraint Restraint
A shared container for Singletons.
const algebra::Vector3D & get_internal_coordinates() const
Return the current orientation of the body.
Class for storing model, its restraints, constraints, and particles.