IMP  2.0.1
The Integrative Modeling Platform
IMP::domino Namespace Reference

See IMP.domino Overview for more information.

Classes

class  Assignment
 Store a configuration of a subset. More...
 
class  AssignmentContainer
 
class  AssignmentsTable
 
class  BranchAndBoundAssignmentsTable
 
class  BranchAndBoundSampler
 Sample best solutions using BranchAndBound. More...
 
class  CappedAssignmentContainer
 
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
 
class  IndexStates
 
class  ListAssignmentContainer
 
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
 
class  PairListSubsetFilterTable
 
class  ParticlesAdaptor
 
class  ParticleStates
 
class  ParticleStatesTable
 
class  PermutationStates
 
class  ProbabilisticSubsetFilterTable
 
class  RangeViewAssignmentContainer
 
class  ReadAssignmentContainer
 
class  ReadHDF5AssignmentContainer
 
class  RecursiveAssignmentsTable
 
class  RecursiveStates
 
class  RestraintCache
 
class  RestraintScoreSubsetFilterTable
 Filter a configuration of the subset using the Model thresholds. More...
 
class  RigidBodyStates
 
class  SampleAssignmentContainer
 
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
 
class  WriteHDF5AssignmentContainer
 
class  XYZStates
 

Typedefs

typedef IMP::base::Vector
< IMP::base::Pointer
< AssignmentContainer > > 
AssignmentContainers
 
typedef IMP::base::Vector
< Assignment
Assignments
 
typedef IMP::base::Vector
< IMP::base::Pointer
< AssignmentsTable > > 
AssignmentsTables
 
typedef IMP::base::Vector
< IMP::base::Pointer
< BranchAndBoundSampler > > 
BranchAndBoundSamplers
 
typedef IMP::base::Vector
< IMP::base::Pointer
< DiscreteSampler > > 
DiscreteSamplers
 
typedef IMP::base::Vector
< IMP::base::Pointer
< DominoSampler > > 
DominoSamplers
 
typedef IMP::base::Vector
< IMP::base::Pointer
< EqualitySubsetFilterTable > > 
EqualitySubsetFilterTables
 
typedef IMP::base::Vector
< IMP::base::Pointer
< EquivalenceAndExclusionSubsetFilterTable > > 
EquivalenceAndExclusionSubsetFilterTables
 
typedef IMP::base::Vector
< IMP::base::Pointer
< EquivalenceSubsetFilterTable > > 
EquivalenceSubsetFilterTables
 
typedef IMP::base::Vector
< IMP::base::Pointer
< ExclusionSubsetFilterTable > > 
ExclusionSubsetFilterTables
 
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::base::Vector
< IMP::base::Pointer
< ListSubsetFilterTable > > 
ListSubsetFilterTables
 
typedef IMP::base::Vector
< IMP::base::Pointer
< MinimumRestraintScoreSubsetFilterTable > > 
MinimumRestraintScoreSubsetFilterTables
 
typedef IMP::base::Vector< OrderOrders
 
typedef IMP::base::Vector
< IMP::base::Pointer
< PairListSubsetFilterTable > > 
PairListSubsetFilterTables
 
typedef IMP::base::Vector
< IMP::base::Pointer
< ParticleStates > > 
ParticleStatesList
 
typedef IMP::base::Vector
< IMP::base::Pointer
< ParticleStatesTable > > 
ParticleStatesTables
 
typedef IMP::base::Vector
< IMP::base::Pointer
< RestraintScoreSubsetFilterTable > > 
RestraintScoreSubsetFilterTables
 
typedef IMP::base::Vector< SliceSlices
 
typedef IMP::base::Vector
< IMP::base::Pointer
< SubsetFilter > > 
SubsetFilters
 
typedef IMP::base::Vector
< IMP::base::Pointer
< SubsetFilterTable > > 
SubsetFilterTables
 
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::base::Vector< SubsetSubsets
 

Functions

std::string get_data_path (std::string file_name)
 Return the full path to installed data. More...
 
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.
 
std::string get_example_path (std::string file_name)
 Return the path to installed example data for this module. 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.
 
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)
 
Subsets get_subsets (const SubsetGraph &g)
 Gets all of the Subsets of a SubsetGraph.
 
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.
 
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 (Order &a, Order &b)
 
void swap (Subset &a, Subset &b)
 

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 ()
 

Debugging Junction Trees

typedef boost::graph CliqueGraph
 
InteractionGraph get_triangulated (const InteractionGraph &input)
 
CliqueGraph get_clique_graph (const InteractionGraph &input)
 
SubsetGraph get_minimum_spanning_tree (const CliqueGraph &input)
 
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
 
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 an 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 helpering optimize and understand domino-based sampling. These functions are 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)
 
RestraintsTemp get_restraints (const Subset &s, const ParticleStatesTable *pst, const DependencyGraph &dg, RestraintSet *rs)
 

Typedef Documentation

Pass or store a set of Assignment .

Definition at line 45 of file Assignment.h.

Store a set of objects.

Definition at line 45 of file assignment_tables.h.

typedef boost::graph IMP::domino::CliqueGraph

See Graphs for more information.

Definition at line 62 of file subset_graphs.h.

Store a set of objects.

Definition at line 126 of file DiscreteSampler.h.

Store a set of objects.

Definition at line 128 of file DominoSampler.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 and 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.

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

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

Definition at line 130 of file subset_graphs.h.

Pass or store a set of Order .

Definition at line 67 of file Order.h.

Store a set of objects.

Definition at line 63 of file particle_states.h.

Store a set of objects.

Definition at line 114 of file particle_states.h.

Pass or store a set of Slice .

Definition at line 61 of file Slice.h.

Store a set of objects.

Definition at line 67 of file subset_filters.h.

Store a set of objects.

Definition at line 347 of file subset_filters.h.

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

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

Definition at line 24 of file subset_graphs.h.

Pass or store a set of Subset .

Definition at line 79 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 nececessarily 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)

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 tools/imppy.sh script.

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 125 of file domino/utility.h.

+ Here is the call graph for this function:

std::string IMP::domino::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

IMP::atom::read_pdb(IMP::atom::get_example_path("example_protein.pdb", model));

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

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 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 an 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 Domino2. 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 nececessarily 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 nececessarily deterministic (you can get different answers if you run it different times with the same inputs).
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 
)

All of the passed particles are not contained in an ofthe Subsets in excluded, then return a a list of indices given the location of each passed particle in the passed subset or -1 if it is missing.

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 67 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.

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

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 
)

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.