8#ifndef IMPDOMINO_UTILITY_H
9#define IMPDOMINO_UTILITY_H
11#include <IMP/domino/domino_config.h>
19#include <IMP/container/internal/ClosePairContainer.h>
24#ifdef IMP_DOMINO_USE_IMP_RMF
25# include <RMF/config.h>
26# if RMF_HAS_DEPRECATED_BACKENDS
27# include <RMF/HDF5/Group.h>
31IMPKERNEL_BEGIN_NAMESPACE
34IMPKERNEL_END_NAMESPACE
36IMPDOMINO_BEGIN_NAMESPACE
38class AssignmentsTable;
39class AssignmentContainer;
40class SubsetFilterTable;
51class ParticleStatesTable;
98 const ParticlesTemp &ps,
double max_distance,
123 "Dimensions of embeddings don't match.");
125 for (
unsigned int i = 0; i < a.size(); ++i) {
127 if (!metrics.empty() && metrics[i]) {
131 pst->get_particle_states(s[i])->get_embedding(a[i]);
133 pst->get_particle_states(s[i])->get_embedding(b[i]);
134 cur = (ea - eb).get_squared_magnitude();
137 if (d > square(max)) {
138 IMP_LOG_VERBOSE(
"Returning " << std::sqrt(d) <<
" > " << max <<
" for "
139 << a <<
" and " << b << std::endl);
144 << std::sqrt(d) << std::endl);
148IMPDOMINO_END_NAMESPACE
A Bayesian inference-based sampler.
Storage of a model, its restraints, constraints and particles.
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
Used to hold a set of related restraints.
A container for Singletons.
A Bayesian inference-based sampler.
Base class for writing geometry to a file.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
Object used to hold a set of restraints.
Store a configuration of a subset.
Represent a subset of the particles being optimized.
Build dependency graphs on models.
#define IMP_LOG_VERBOSE(expr)
void load_particle_states(const Subset &s, const Assignment &ss, const ParticleStatesTable *pst)
Load the appropriate state for each particle in a Subset.
algebra::VectorKD get_embedding(const Subset &s, const Assignment &a, ParticleStatesTable *pst)
Return an embedding for an assignment.
double get_distance_if_smaller_than(const Subset &s, const Assignment &a, const Assignment &b, ParticleStatesTable *pst, const statistics::Metrics &metrics, double max)
Ints get_partial_index(const ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
ParticlePairsTemp get_possible_interactions(const ParticlesTemp &ps, double max_distance, ParticleStatesTable *pst)
RestraintsTemp get_restraints(const Subset &s, const ParticleStatesTable *pst, const DependencyGraph &dg, RestraintSet *rs)
Ints get_index(const ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
Assignment get_nearest_assignment(const Subset &s, const algebra::VectorKD &embedding, ParticleStatesTable *pst)
Return the nearest assignment from an embedding.
IMP::Vector< Subset > Subsets
IMP::Vector< IMP::Pointer< Metric > > Metrics
IMP::Vector< Int > Ints
Standard way to pass a bunch of Int values.
IMP::Vector< IMP::WeakPointer< Restraint > > RestraintsTemp
IMP::Vector< ParticlePair > ParticlePairsTemp
boost::graph DependencyGraph
Directed graph on the interactions between the various objects in the model.
double get_distance(const VectorD< D > &v1, const VectorD< D > &v2)
Compute the distance between two vectors.
A Bayesian inference-based sampler.