IMP logo
IMP Reference Guide  2.22.0
The Integrative Modeling Platform
IMP::domino Namespace Reference

Divide-and-conquer inferential optimization in discrete space. More...

Detailed Description

Divide-and-conquer inferential optimization in discrete space.

Traditional optimizers require the data be encoded as a single (or a small number of) scoring function and then move the particles with a variety of random and downhill steps to try to find configurations of the particles which minimize the scoring function used. These sampling processes, in practice, provide no guarantees about whether the true minimal solutions. Since they depend on a scoring function, the set of solutions they do find are sensitive to the relative weights of the terms coming from different types of data, which can be difficult to choose correctly. Finally, the choice of which type of moves to take an when can make a large difference.

How Domino is different

The Domino sampler provides a wider variety of ways in which the data about the system can be encoded as restrictions on the allowed configurations and then enumerates all configurations that meet the restrictions, given sufficient memory/time to represent/store them all. Specifically, in a Domino encoding of a problem, each particle has a discrete set of states that it can be assigned. Data that concerns only a single particle, such as that about a particles absolute location/orientation and can be encoded directly this sampling space. Other data is encoded as filters, which determine whether a particular assignment of discrete states to a subset of the particles is acceptable or not. Most simply, a filter can be a scoring function term (a Restraint) along with an associated maximum value that term is allowed to take. Other filters include ones based on a maximum score for a set of scoring function terms, that eliminate all except one of assignments that are invariant under the permutation of particles which are deemed to be equivalent (eg to only find unique volumes occupied by proteins when sequence information is not used), that eliminate assignments where multiple variables are to the same state (eg to provide cheap excluded volume). There is no need to establish weighting between different types of experimental data.

Why Domino works

Domino can efficiently perform the enumeration by subdividing the particles into possibly overlapping subsets. The set of satisfying assignments for each subset is enumerated independently and then the subsets are repeatedly merged pairwise until only the set of all particles is remaining. A merge step involves first enumerating all consistent assignments of the two subsets being merged (that is, those assignments which agree on the assignment of any shared particles). Then, each such assignment is checked for consistency with all the filters which additionally constrain the newly created subset of particles. Since after each merge only the satisfying assignments for the currently subset are kept, and any satisfying assignment for a merged subset can be generated from satisfying assignments of subsets it was created by merging, at the end, exactly the set of satisfying assignments of the full particles set is generated.

Considerations for choosing a merge tree

Each filters is used to prune the assignments as early in the process as possible, that is, as soon as all the needed particles are first found in the same subset. In general, the earlier in the subset enumeration and merging filters can be applied, the more efficient the enumeration process. We have found that a depth first traversal of the junction tree {ref something} on a sparse subset of the interactions implied by connectivity based restraints (those derived from protein structures, proteomics, cross linking etc) is a good starting point for the merge tree. The junction tree ensures that the set of particles used by each filter occurs together in at least one of the leaf sets. The junction tree also ensures that each particle only is found in a connected subtree, helping limit the creation of assignments which will later be eliminated due to incompatibility during later merges. For further efficiency, each node of the junction tree -derived merge tree is broken down into a linear tree of subsets each containing a single particle. The particles are ordered heuristically, attempting to merge the most constrained particles first.

Domino as spatial filtering

An alternate way to think about the way Domino works is to imagine eliminating parts of the space of all possible assignments based on the filters. Initially we have a n dimensional grid (n is the number of particles), which has m (the number of states for each particles, assuming, for simplicity, they all have the same number) voxels along each dimension. Each n^m voxel in the grid is a possible assignment. Applying filters to a subset of size k involves eliminating an m-k-dimensional line of voxels (orthogonal to the k-dimension subspace of the subset, passing through the eliminated assignment of in the subset space). Each time two subsets of size k are merged, a never seen before 2k-dimensional subspace of solutions is made available that can have filters applied to it. Each such state eliminated by a filter again eliminates a m-2k-dimensional line.

Rules of Thumb

There are some good general rules of thumb for converting data into a problem suitable for a Domino sampler. First, data is only useful in the sampling process in so far as it can be used to accept or discard a configuration of a subset of the particles unconditionally. That is, simply scoring a configuration is not useful one must be able to say that a certain configuration is not worth considering. The restrictions can be relaxed in later runs to find configurations which are less good, so there is nothing to be worried about from having the filters be fine up front.

Pieces of data which concern only a single particle should be used to determine the discrete set of conformations allowed for that particle. This way, no computation has to be done during sampling for those terms.

Other data can be incorporated into the sampling process either as restraints with accompanying maximum scores (or sets of restraints with a maximum score), or more directly as filters. The latter can be more efficient, but requires more thought and so the former should be the default.

The set of data which involve only a few particles each (pair scores, connectivity etc), should be encoded as restraints and used to build the interaction graph (which is then used to build the junction tree and the merge tree). Other data that involves many particles interacting at once or all pairs of particles (eg dope scoring terms, when one can not show that most pairs of particles are never close to one another), can still be used, they just should not be used for the interaction graph.

The idea of a Table is used in several places in the module. A Table, here, is an object which, for example, knows how to create a an object which can filter the subset states of a particular subset. That is, a SubsetFilterTable knows how to create a SubsetFilter (via the SubsetFilterTable::get_subset_filter() ) which can answer queries about whether a particular SubsetState is OK (via the SubsetFilter::get_is_ok() method). This makes it easy to perform preprocessing to make the SubsetFilter::get_is_ok() calls faster. The table idea is usedf with ParticleStatesTable, SubsetStatesTable and SubsetFilterTable.

Info

Author(s): Daniel Russel, Keren Lasker

Maintainer: benmwebb

License: LGPL This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Publications:

Classes

class  Assignment
 Store a configuration of a subset. More...
 
class  AssignmentContainer
 The base class for containers of assignments. More...
 
class  AssignmentsTable
 
class  BranchAndBoundAssignmentsTable
 
class  BranchAndBoundSampler
 Sample best solutions using BranchAndBound. More...
 
class  CappedAssignmentContainer
 Store no more than a max number of states. More...
 
class  CompoundStates
 
class  DependencyScoreState
 Add a dependency to the dependency graph. More...
 
class  DiscreteSampler
 A base class for discrete samplers in Domino2. More...
 
class  DisjointSetsSubsetFilterTable
 A base class. More...
 
class  DominoSampler
 Sample best solutions using Domino. More...
 
class  EqualitySubsetFilterTable
 Do not allow two particles to be in the same state. More...
 
class  EquivalenceAndExclusionSubsetFilterTable
 Define sets of equivalent and exclusive particles. More...
 
class  EquivalenceSubsetFilterTable
 Define sets of equivalent particles. More...
 
class  ExclusionSubsetFilterTable
 Do not allow two particles to be in the same state. More...
 
class  HeapAssignmentContainer
 Store a set of k top scoring assignments. More...
 
class  IndexStates
 
class  ListAssignmentContainer
 Simple storage of a set of Assignments. More...
 
class  ListAssignmentsTable
 
class  ListSubsetFilterTable
 Maintain an explicit list of what states each particle is allowed to have. More...
 
class  MinimumRestraintScoreSubsetFilterTable
 Filter a configuration of the subset using the Model thresholds. More...
 
class  NestedRigidBodyStates
 
class  Order
 Store a persistent ordering for a subset based on the list. More...
 
class  PackedAssignmentContainer
 Store assignments in a compact form in memory. More...
 
class  PairListSubsetFilterTable
 
class  ParticlesAdaptor
 
class  ParticleStates
 
class  ParticleStatesTable
 
class  PermutationStates
 
class  ProbabilisticSubsetFilterTable
 
class  RangeViewAssignmentContainer
 Expose a range [begin, end) of an inner assignment container to consumers. More...
 
class  ReadAssignmentContainer
 Read the assignments from binary data on disk. More...
 
class  ReadHDF5AssignmentContainer
 Store the assignments in an HDF5DataSet. More...
 
class  RecursiveAssignmentsTable
 
class  RecursiveStates
 
class  RestraintCache
 
class  RestraintScoreSubsetFilterTable
 Filter a configuration of the subset using the Model thresholds. More...
 
class  RigidBodyStates
 
class  SampleAssignmentContainer
 Store a list of k assignments chosen from all those added to this table. More...
 
class  SimpleAssignmentsTable
 
class  Slice
 Store a subset of a subset or assignment. More...
 
class  Subset
 Represent a subset of the particles being optimized. More...
 
class  SubsetFilter
 
class  SubsetFilterTable
 
class  WriteAssignmentContainer
 Store the assignments on disk as binary data. More...
 
class  WriteHDF5AssignmentContainer
 Store the assignments in an HDF5DataSet. More...
 
class  XYZStates
 

Typedefs

typedef IMP::Vector
< IMP::Pointer
< AssignmentContainer > > 
AssignmentContainers
 
typedef IMP::Vector
< IMP::WeakPointer
< AssignmentContainer > > 
AssignmentContainersTemp
 
typedef IMP::Vector< AssignmentAssignments
 
typedef IMP::Vector
< IMP::Pointer
< AssignmentsTable > > 
AssignmentsTables
 
typedef IMP::Vector
< IMP::WeakPointer
< AssignmentsTable > > 
AssignmentsTablesTemp
 
typedef IMP::Vector
< IMP::Pointer
< BranchAndBoundSampler > > 
BranchAndBoundSamplers
 
typedef IMP::Vector
< IMP::WeakPointer
< BranchAndBoundSampler > > 
BranchAndBoundSamplersTemp
 
typedef IMP::Vector
< IMP::Pointer
< DiscreteSampler > > 
DiscreteSamplers
 
typedef IMP::Vector
< IMP::WeakPointer
< DiscreteSampler > > 
DiscreteSamplersTemp
 
typedef IMP::Vector
< IMP::Pointer< DominoSampler > > 
DominoSamplers
 
typedef IMP::Vector
< IMP::WeakPointer
< DominoSampler > > 
DominoSamplersTemp
 
typedef IMP::Vector
< IMP::Pointer
< EqualitySubsetFilterTable > > 
EqualitySubsetFilterTables
 
typedef IMP::Vector
< IMP::WeakPointer
< EqualitySubsetFilterTable > > 
EqualitySubsetFilterTablesTemp
 
typedef IMP::Vector
< IMP::Pointer
< EquivalenceAndExclusionSubsetFilterTable > > 
EquivalenceAndExclusionSubsetFilterTables
 
typedef IMP::Vector
< IMP::WeakPointer
< EquivalenceAndExclusionSubsetFilterTable > > 
EquivalenceAndExclusionSubsetFilterTablesTemp
 
typedef IMP::Vector
< IMP::Pointer
< EquivalenceSubsetFilterTable > > 
EquivalenceSubsetFilterTables
 
typedef IMP::Vector
< IMP::WeakPointer
< EquivalenceSubsetFilterTable > > 
EquivalenceSubsetFilterTablesTemp
 
typedef IMP::Vector
< IMP::Pointer
< ExclusionSubsetFilterTable > > 
ExclusionSubsetFilterTables
 
typedef IMP::Vector
< IMP::WeakPointer
< ExclusionSubsetFilterTable > > 
ExclusionSubsetFilterTablesTemp
 
typedef boost::graph InteractionGraph
 
typedef
InteractionGraph::EdgeNameMap 
InteractionGraphConstEdgeName
 
typedef
InteractionGraph::VertexNameMap 
InteractionGraphConstVertexName
 
typedef
InteractionGraph::edge_descriptor 
InteractionGraphEdge
 
typedef boost::graph_traits
< InteractionGraph
InteractionGraphTraits
 
typedef
InteractionGraph::vertex_descriptor 
InteractionGraphVertex
 
typedef IMP::Vector
< IMP::Pointer
< ListSubsetFilterTable > > 
ListSubsetFilterTables
 
typedef IMP::Vector
< IMP::WeakPointer
< ListSubsetFilterTable > > 
ListSubsetFilterTablesTemp
 
typedef IMP::Vector
< IMP::Pointer
< MinimumRestraintScoreSubsetFilterTable > > 
MinimumRestraintScoreSubsetFilterTables
 
typedef IMP::Vector
< IMP::WeakPointer
< MinimumRestraintScoreSubsetFilterTable > > 
MinimumRestraintScoreSubsetFilterTablesTemp
 
typedef IMP::Vector< OrderOrders
 
typedef IMP::Vector
< IMP::Pointer
< PairListSubsetFilterTable > > 
PairListSubsetFilterTables
 
typedef IMP::Vector
< IMP::WeakPointer
< PairListSubsetFilterTable > > 
PairListSubsetFilterTablesTemp
 
typedef IMP::Vector
< IMP::Pointer< ParticleStates > > 
ParticleStatesList
 
typedef IMP::Vector
< IMP::WeakPointer
< ParticleStates > > 
ParticleStatesListTemp
 
typedef IMP::Vector
< IMP::Pointer
< ParticleStatesTable > > 
ParticleStatesTables
 
typedef IMP::Vector
< IMP::WeakPointer
< ParticleStatesTable > > 
ParticleStatesTablesTemp
 
typedef IMP::Vector
< IMP::Pointer
< RestraintScoreSubsetFilterTable > > 
RestraintScoreSubsetFilterTables
 
typedef IMP::Vector
< IMP::WeakPointer
< RestraintScoreSubsetFilterTable > > 
RestraintScoreSubsetFilterTablesTemp
 
typedef IMP::Vector< SliceSlices
 
typedef IMP::Vector
< IMP::Pointer< SubsetFilter > > 
SubsetFilters
 
typedef IMP::Vector
< IMP::WeakPointer
< SubsetFilter > > 
SubsetFiltersTemp
 
typedef IMP::Vector
< IMP::Pointer
< SubsetFilterTable > > 
SubsetFilterTables
 
typedef IMP::Vector
< IMP::WeakPointer
< SubsetFilterTable > > 
SubsetFilterTablesTemp
 
typedef boost::graph SubsetGraph
 
typedef SubsetGraph::EdgeNameMap SubsetGraphConstEdgeName
 
typedef SubsetGraph::VertexNameMap SubsetGraphConstVertexName
 
typedef
SubsetGraph::edge_descriptor 
SubsetGraphEdge
 
typedef boost::graph_traits
< SubsetGraph
SubsetGraphTraits
 
typedef
SubsetGraph::vertex_descriptor 
SubsetGraphVertex
 
typedef IMP::Vector< SubsetSubsets
 

Functions

Subset get_difference (const Subset &a, const Subset &b)
 
double get_distance_if_smaller_than (const Subset &s, const Assignment &a, const Assignment &b, ParticleStatesTable *pst, const statistics::Metrics &metrics, double max)
 
algebra::VectorKD get_embedding (const Subset &s, const Assignment &a, ParticleStatesTable *pst)
 Return an embedding for an assignment. More...
 
Ints get_index (const ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
 
Subset get_intersection (const Subset &a, const Subset &b)
 
SubsetGraph get_junction_tree (const InteractionGraph &ig)
 
Assignment get_nearest_assignment (const Subset &s, const algebra::VectorKD &embedding, ParticleStatesTable *pst)
 Return the nearest assignment from an embedding. More...
 
ParticlesTemp get_order (const Subset &s, const SubsetFilterTables &sft)
 
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)
 
SubsetGraph get_restraint_graph (ScoringFunctionAdaptor rs, const ParticleStatesTable *pst)
 
Slice get_slice (Subset outer, Subset inner, const Subsets &excluded)
 
Assignments get_state_clusters (const Subset &subset, const Assignments &states, ParticleStatesTable *pst, double resolution)
 Return subset of the passed states which are representative. More...
 
Subsets get_subsets (const SubsetGraph &g)
 Gets all of the Subsets of a SubsetGraph. More...
 
Subset get_union (const Subset &a, const Subset &b)
 
void load_leaf_assignments (const Subset &subset, AssignmentsTable *at, AssignmentContainer *ac)
 Fill in assignments for a leaf. More...
 
void load_merged_assignments (const Subset &first_subset, AssignmentContainer *first, const Subset &second_subset, AssignmentContainer *second, const SubsetFilterTablesTemp &filters, AssignmentContainer *ret)
 Fill in assignments for an internal node. More...
 
void load_merged_assignments_random_order (const Subset &first_subset, AssignmentContainer *first, const Subset &second_subset, AssignmentContainer *second, const SubsetFilterTablesTemp &filters, unsigned int maximum_tries, AssignmentContainer *ret)
 Sample from the merged assignments. More...
 
void swap (Assignment &a, Assignment &b)
 
void swap (Slice &a, Slice &b)
 
void swap (Subset &a, Subset &b)
 
void swap (Order &a, Order &b)
 

Standard module functions

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

std::string get_module_version ()
 Return the version of this module, as a string. More...
 
std::string get_module_name ()
 
std::string get_data_path (std::string file_name)
 Return the full path to one of this module's data files. More...
 
std::string get_example_path (std::string file_name)
 Return the full path to one of this module's example files. More...
 
typedef boost::graph MergeTree
 
typedef MergeTree::VertexNameMap MergeTreeConstVertexName
 
typedef MergeTree::EdgeNameMap MergeTreeConstEdgeName
 
typedef boost::graph_traits
< MergeTree
MergeTreeTraits
 
typedef
MergeTree::vertex_descriptor 
MergeTreeVertex
 
typedef MergeTree::edge_descriptor MergeTreeEdge
 
void show_as_graphviz (const SubsetGraph &name, TextOutput out)
 
SubsetGraphVertexIndex get_vertex_index (const SubsetGraph &g)
 
InteractionGraph get_interaction_graph (ScoringFunctionAdaptor rs, const ParticleStatesTable *pst)
 
InteractionGraph get_interaction_graph (ScoringFunctionAdaptor rs, const ParticlesTemp &pst)
 
display::Geometries get_interaction_graph_geometry (const InteractionGraph &ig)
 
display::Geometries get_subset_graph_geometry (const SubsetGraph &ig)
 
MergeTree get_merge_tree (ScoringFunctionAdaptor input, const ParticleStatesTable *pst)
 
MergeTree get_merge_tree (const SubsetGraph &junction_tree)
 
MergeTree get_balanced_merge_tree (const SubsetGraph &junction_tree)
 
bool get_is_merge_tree (const MergeTree &tree, Subset all, bool verbose=true)
 

Read and write merge trees

Merge trees can be written to and read from a text stream. As always, this requires a canonical particles list whose order is the same for the reading and writing.

void write_merge_tree (const MergeTree &tree, const ParticlesTemp &ps, std::ostream &out)
 
MergeTree read_merge_tree (std::istream &input, const ParticlesTemp &ps)
 

Debug tools

We provide a number of different functions for helping optimize and understand domino-based sampling. These functions expose part of the implementation and are liable to change without notice.

void load_particle_states (const Subset &s, const Assignment &ss, const ParticleStatesTable *pst)
 Load the appropriate state for each particle in a Subset. More...
 
RestraintsTemp get_restraints (const Subset &s, const ParticleStatesTable *pst, const DependencyGraph &dg, RestraintSet *rs)
 

Typedef Documentation

A vector of reference-counting object pointers.

Definition at line 62 of file assignment_containers.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
AssignmentContainer

Definition at line 62 of file assignment_containers.h.

Pass or store a set of Assignment .

Definition at line 53 of file Assignment.h.

A vector of reference-counting object pointers.

Definition at line 40 of file assignment_tables.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
AssignmentsTable

Definition at line 40 of file assignment_tables.h.

A vector of reference-counting object pointers.

Definition at line 38 of file BranchAndBoundSampler.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
BranchAndBoundSampler

Definition at line 38 of file BranchAndBoundSampler.h.

A vector of reference-counting object pointers.

Definition at line 132 of file DiscreteSampler.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
DiscreteSampler

Definition at line 132 of file DiscreteSampler.h.

A vector of reference-counting object pointers.

Definition at line 122 of file DominoSampler.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
DominoSampler

Definition at line 122 of file DominoSampler.h.

A vector of reference-counting object pointers.

Definition at line 228 of file subset_filters.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
EqualitySubsetFilterTable

Definition at line 228 of file subset_filters.h.

A vector of reference-counting object pointers.

Definition at line 245 of file subset_filters.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
EquivalenceAndExclusionSubsetFilterTable

Definition at line 245 of file subset_filters.h.

A vector of reference-counting object pointers.

Definition at line 238 of file subset_filters.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
EquivalenceSubsetFilterTable

Definition at line 238 of file subset_filters.h.

A vector of reference-counting object pointers.

Definition at line 219 of file subset_filters.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
ExclusionSubsetFilterTable

Definition at line 219 of file subset_filters.h.

typedef boost::graph IMP::domino::InteractionGraph

An undirected graph with one vertex per particle of interest. Two particles are connected by an edge if a Restraint or ScoreState creates an interaction between the two particles.

See Graphs in IMP for more information.See Graphs in IMP for more information.

Definition at line 33 of file subset_graphs.h.

A vector of reference-counting object pointers.

Definition at line 289 of file subset_filters.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
ListSubsetFilterTable

Definition at line 289 of file subset_filters.h.

typedef boost::graph IMP::domino::MergeTree

A directed graph on subsets of vertices. Each vertex is named with a Subset.See Graphs in IMP for more information.

Definition at line 117 of file subset_graphs.h.

A vector of reference-counting object pointers.

Definition at line 154 of file subset_filters.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
MinimumRestraintScoreSubsetFilterTable

Definition at line 154 of file subset_filters.h.

Pass or store a set of Order .

Definition at line 76 of file Order.h.

A vector of reference-counting object pointers.

Definition at line 315 of file subset_filters.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
PairListSubsetFilterTable

Definition at line 315 of file subset_filters.h.

A vector of reference-counting object pointers.

Definition at line 64 of file particle_states.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
ParticleStates

Definition at line 64 of file particle_states.h.

A vector of reference-counting object pointers.

Definition at line 114 of file particle_states.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
ParticleStatesTable

Definition at line 114 of file particle_states.h.

A vector of reference-counting object pointers.

Definition at line 123 of file subset_filters.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
RestraintScoreSubsetFilterTable

Definition at line 123 of file subset_filters.h.

Pass or store a set of Slice .

Definition at line 70 of file Slice.h.

A vector of reference-counting object pointers.

Definition at line 65 of file subset_filters.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
SubsetFilter

Definition at line 65 of file subset_filters.h.

A vector of reference-counting object pointers.

Definition at line 341 of file subset_filters.h.

A vector of weak (non reference-counting) pointers to specified objects.

See Also
SubsetFilterTable

Definition at line 341 of file subset_filters.h.

typedef boost::graph IMP::domino::SubsetGraph

An undirected graph on subsets of vertices. Each vertex is named with a Subset.See Graphs in IMP for more information.

Definition at line 23 of file subset_graphs.h.

Pass or store a set of Subset .

Definition at line 76 of file Subset.h.

Function Documentation

MergeTree IMP::domino::get_balanced_merge_tree ( const SubsetGraph &  junction_tree)
See Also
get_merge_tree(RestraintSet*,const ParticleStatesTable*)

Compute the merge tree from a junction tree, attempting to keep it fairly balanced.

Note
the merge tree is not necessarily deterministic (you can get different answers if you run it different times with the same inputs).
std::string IMP::domino::get_data_path ( std::string  file_name)

Return the full path to one of this module's data files.

To read the data file "data_library" that was placed in the data directory of this module, do something like

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

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

Note
Each module has its own data directory, so be sure to use this function from the correct module.
double IMP::domino::get_distance_if_smaller_than ( const Subset &  s,
const Assignment &  a,
const Assignment &  b,
ParticleStatesTable *  pst,
const statistics::Metrics &  metrics,
double  max 
)

Return a distance between two assignments if they are less than a threshold. The distance returned is the l2 norm on the distances between each state as given by the corresponding metric. If no metric is passed, then the l2 norm on the embedding is used.

Warning: get_distance_if_close has not been stabilized and is likely to change without notice.

Definition at line 117 of file domino/utility.h.

+ Here is the call graph for this function:

algebra::VectorKD IMP::domino::get_embedding ( const Subset &  s,
const Assignment &  a,
ParticleStatesTable *  pst 
)

Return an embedding for an assignment.

std::string IMP::domino::get_example_path ( std::string  file_name)

Return the full path to one of this module's example files.

To read the example file "example_protein.pdb" that was placed in the examples directory of this module, do something like

std::ifstream in(IMP::domino::get_example_path("example_protein.pdb"));

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

Note
Each module has its own example directory, so be sure to use this function from the correct module.
Ints IMP::domino::get_index ( const ParticlesTemp &  particles,
const Subset &  subset,
const Subsets &  excluded 
)

If the passed particles are all contained in the Subset and are not contained any of the Subsets in excluded, then return a list of indices given the location of each passed particle in the passed subset. That is

particles[i]==subset[returned[i]];

Otherwise return an empty list.

This function is designed to be used for implementing SubsetFilterTable classes.

InteractionGraph IMP::domino::get_interaction_graph ( ScoringFunctionAdaptor  rs,
const ParticleStatesTable *  pst 
)

Compute the interaction graph of the restraints and the specified particles. The dependency graph in the model is traversed to determine how the passed particles relate to the actual particles read as input by the model. For example, if particles contains a rigid body, then a restraint which uses a member of the rigid body will have an edge from the rigid body particle.

Note
You may want to create an OptimizeRestraints object before calling this function.
These functions are here to aid in debugging of optimization protocols that use Domino. As a result, its signature and functionality may change without notice.
display::Geometries IMP::domino::get_interaction_graph_geometry ( const InteractionGraph &  ig)

Assuming that all the particles have Cartesian coordinates, output edges corresponding to the edges in the interaction graph. The edges are named by the restraint which induces them.

SubsetGraph IMP::domino::get_junction_tree ( const InteractionGraph &  ig)

Compute the exact junction tree for an interaction graph. The resulting graph has the junction tree properties

  • it is a tree
  • for any two vertices whose subsets both contain a vertex, that vertex is contained in all subsets along the path connecting those two vertices.
Note
the junction tree is not necessarily deterministic (you can get different answers if you run it different times with the same inputs).
MergeTree IMP::domino::get_merge_tree ( ScoringFunctionAdaptor  input,
const ParticleStatesTable *  pst 
)
See Also
get_merge_tree(const SubsetGraph&)

Compute the merge tree for a given restraint set and particle states table. An OptimizeRestraints object is created to improve the InteractionGraph used internally.

MergeTree IMP::domino::get_merge_tree ( const SubsetGraph &  junction_tree)
See Also
get_merge_tree(RestraintSet*,const ParticleStatesTable*)

Compute the merge tree from a junction tree.

Note
the merge tree is not necessarily deterministic (you can get different answers if you run it different times with the same inputs).
std::string IMP::domino::get_module_version ( )

Return the version of this module, as a string.

Note
This function is only available in Python.

Definition at line 5 of file EMageFit/__init__.py.

Assignment IMP::domino::get_nearest_assignment ( const Subset &  s,
const algebra::VectorKD &  embedding,
ParticleStatesTable *  pst 
)

Return the nearest assignment from an embedding.

ParticlesTemp IMP::domino::get_order ( const Subset &  s,
const SubsetFilterTables &  sft 
)

Return the order computed for the particles in the subset to be used for enumeration. This function is there in order to expose internal functionality for easier testing and should not be depended upon.

Ints IMP::domino::get_partial_index ( const ParticlesTemp &  particles,
const Subset &  subset,
const Subsets &  excluded 
)

For each of the passed particles, if it is contained in the Subset and not contained in any of the Subsets in excluded, return the index of that particle in the passed subset; otherwise, return -1. A list of all such indexes is returned. Compare with get_index().

This function is designed to be used for implementing SubsetFilterTable classes.

ParticlePairsTemp IMP::domino::get_possible_interactions ( const ParticlesTemp &  ps,
double  max_distance,
ParticleStatesTable *  pst 
)

Return the list of interactions implied by the passed balls given the allowed positions specified by the ParticleStatesTable.

SubsetGraph IMP::domino::get_restraint_graph ( ScoringFunctionAdaptor  rs,
const ParticleStatesTable *  pst 
)

The restraint graph is formed by having one node per restraint and an edge connecting two restraints if they share input particles. The associated Subsets are the set of input particles for the restraint, projected onto ps.

Note
The graph for the optimized restraints (after temporary application of OptimizeContainers and OptimizeRestraints) is returned.
RestraintsTemp IMP::domino::get_restraints ( const Subset &  s,
const ParticleStatesTable *  pst,
const DependencyGraph &  dg,
RestraintSet *  rs 
)

Return a list of all restraints from rs that do not depend on any particle in pst->get_particles() that is not in s. The dependency graph is passed for efficiency.

Slice IMP::domino::get_slice ( Subset  outer,
Subset  inner,
const Subsets &  excluded 
)

Return a slice for the inner subset if it is not contained in any of the excluded subsets, otherwise return the empty slice.

Definition at line 76 of file Slice.h.

+ Here is the call graph for this function:

Assignments IMP::domino::get_state_clusters ( const Subset &  subset,
const Assignments &  states,
ParticleStatesTable *  pst,
double  resolution 
)

Return subset of the passed states which are representative.

The states for each particle is clustered and then the passed states are reduced to only be on the centers of that clustering.

The XYZ coordinates are used for clustering, there is not currently a nice mechanism to vary this, but it should be figured out. Probably by subclasses statistics::Embedding to statistics::ParticleEmbedding which has a method which takes a particle.

display::Geometries IMP::domino::get_subset_graph_geometry ( const SubsetGraph &  ig)

Display the subsets of a subset graph, superimposed on the 3D coordinates of the particles.

Subsets IMP::domino::get_subsets ( const SubsetGraph &  g)

Gets all of the Subsets of a SubsetGraph.

void IMP::domino::load_leaf_assignments ( const Subset &  subset,
AssignmentsTable *  at,
AssignmentContainer *  ac 
)

Fill in assignments for a leaf.

void IMP::domino::load_merged_assignments ( const Subset &  first_subset,
AssignmentContainer *  first,
const Subset &  second_subset,
AssignmentContainer *  second,
const SubsetFilterTablesTemp &  filters,
AssignmentContainer *  ret 
)

Fill in assignments for an internal node.

The passed assignments, the ordering for the children is that of the node indexes for the children.

void IMP::domino::load_merged_assignments_random_order ( const Subset &  first_subset,
AssignmentContainer *  first,
const Subset &  second_subset,
AssignmentContainer *  second,
const SubsetFilterTablesTemp &  filters,
unsigned int  maximum_tries,
AssignmentContainer *  ret 
)

Sample from the merged assignments.

The passed assignments, the ordering for the children is that of the node indexes for the children.

It will try maximum_tries times to merge an assignment from the first set with a randomly chosen assignment from the second. Note that duplicate solutions may be present in the output and the output will never be guaranteed to be complete.

Warning: load_sampled_merged_assignments has not been stabilized and is likely to change without notice.
void IMP::domino::load_particle_states ( const Subset &  s,
const Assignment &  ss,
const ParticleStatesTable *  pst 
)

Load the appropriate state for each particle in a Subset.