IMP logo
IMP Reference Guide  2.20.1
The Integrative Modeling Platform
IMP::domino::DominoSampler Class Reference

Sample best solutions using Domino. More...

#include <IMP/domino/DominoSampler.h>

+ Inheritance diagram for IMP::domino::DominoSampler:

Detailed Description

Sample best solutions using Domino.

Note that if there are many solutions, the ConfigurationSet returned by get_sample() might be huge (in terms of memory usage) and slow to generate. The Assignments returned by get_sample_assignments() can be a lot smaller and faster.

Definition at line 32 of file DominoSampler.h.

Public Member Functions

 DominoSampler (Model *m, std::string name="DominoSampler %1%")
 
 DominoSampler (Model *m, ParticleStatesTable *pst, std::string name="DominoSampler %1%")
 
Assignments do_get_sample_assignments (const IMP::domino::Subset &known) const override
 
virtual std::string get_type_name () const override
 
virtual ::IMP::VersionInfo get_version_info () const override
 Get information about the module and version of the object. More...
 
void set_use_cross_subset_filtering (bool tf)
 
- Public Member Functions inherited from IMP::domino::DiscreteSampler
 DiscreteSampler (Model *m, ParticleStatesTable *pst, std::string name)
 
unsigned int get_maximum_number_of_assignments () const
 
Assignments get_sample_assignments (const Subset &s) const
 
void set_maximum_number_of_assignments (unsigned int mx)
 
void set_particle_states (Particle *p, ParticleStates *se)
 
void set_restraints (RestraintsAdaptor rs)
 Set the Restraints to use in the RestraintScoreSubsetFilterTable. More...
 
void set_particle_states_table (ParticleStatesTable *cse)
 
void set_assignments_table (AssignmentsTable *sst)
 
ParticleStatesTableget_particle_states_table () const
 
void remove_subset_filter_table (SubsetFilterTable *d)
 
void remove_subset_filter_tables (const SubsetFilterTables &d)
 
void set_subset_filter_tables (const SubsetFilterTables &ps)
 
void set_subset_filter_tables_order (const SubsetFilterTables &objs)
 
unsigned int add_subset_filter_table (SubsetFilterTable *obj)
 
void add_subset_filter_tables (const SubsetFilterTables &objs)
 
void clear_subset_filter_tables ()
 
unsigned int get_number_of_subset_filter_tables () const
 
bool get_has_subset_filter_tables ()
 
SubsetFilterTableget_subset_filter_table (unsigned int i) const
 
SubsetFilterTables get_subset_filter_tables () const
 
void erase_subset_filter_table (unsigned int i)
 
void reserve_subset_filter_tables (unsigned int sz)
 
- Public Member Functions inherited from IMP::Sampler
 Sampler (Model *m, std::string name="Sampler %1%")
 
ConfigurationSetcreate_sample () const
 
Modelget_model () const
 
ScoringFunctionget_scoring_function () const
 Return the scoring function that is being used. More...
 
void set_scoring_function (ScoringFunctionAdaptor sf)
 
- Public Member Functions inherited from IMP::Object
virtual void clear_caches ()
 
CheckLevel get_check_level () const
 
LogLevel get_log_level () const
 
void set_check_level (CheckLevel l)
 
void set_log_level (LogLevel l)
 Set the logging level used in this object. More...
 
void set_was_used (bool tf) const
 
void show (std::ostream &out=std::cout) const
 
const std::string & get_name () const
 
void set_name (std::string name)
 

Advanced

Default values are provided, you only need to replace these if you want to do something special. See the overview of the module for a general description.

void set_merge_tree (const MergeTree &mt)
 Specify the merge tree directly. More...
 

Statistics

If you specify the merge tree explicitly, you can query for statistics about particular nodes in the merge tree.

unsigned int get_number_of_assignments_for_vertex (unsigned int tree_vertex) const
 Get the number of states found for the merge at that vertex of the tree. More...
 
Assignments get_sample_assignments_for_vertex (unsigned int tree_vertex) const
 Return a few subset states from that merge. More...
 

Interactive mode

Once a merge tree is specified, one can interactively perform the sampling by requesting that domino fill in the Assignments for a given node of the merge tree from the assignments for the children. This can be useful for debugging Domino as well as for providing a distributed implementation.

For each method, you can pass max_states to limit how many states are generated.

You might want to just use load_leaf_assignments() and load_merged_assignments() instead.

Assignments get_vertex_assignments (unsigned int node_index, unsigned int max_states=std::numeric_limits< int >::max()) const
 Fill in assignments for a leaf. More...
 
Assignments get_vertex_assignments (unsigned int node_index, const Assignments &first, const Assignments &second, unsigned int max_states=std::numeric_limits< int >::max()) const
 Fill in assignments for an internal node. More...
 
void load_vertex_assignments (unsigned int node_index, AssignmentContainer *ac, unsigned int max_states=std::numeric_limits< int >::max()) const
 Fill in assignments for a leaf. More...
 
void load_vertex_assignments (unsigned int node_index, AssignmentContainer *first, AssignmentContainer *second, AssignmentContainer *ac, unsigned int max_states=std::numeric_limits< int >::max()) const
 Fill in assignments for an internal node. More...
 

Additional Inherited Members

- Public Attributes inherited from IMP::domino::DiscreteSampler
list subset_filter_tables
 A Python list of SubsetFilterTables More...
 
- Protected Member Functions inherited from IMP::domino::DiscreteSampler
virtual ConfigurationSetdo_sample () const override
 
AssignmentsTableget_assignments_table_to_use (const SubsetFilterTables &sfts, unsigned int max=std::numeric_limits< int >::max()) const
 
RestraintsTemp get_restraints () const
 
SubsetFilterTables get_subset_filter_tables_to_use (const RestraintsTemp &rs, ParticleStatesTable *pst) const
 
- Protected Member Functions inherited from IMP::Object
 Object (std::string name)
 Construct an object with the given name. More...
 
virtual void do_destroy ()
 

Member Function Documentation

unsigned int IMP::domino::DominoSampler::get_number_of_assignments_for_vertex ( unsigned int  tree_vertex) const

Get the number of states found for the merge at that vertex of the tree.

Assignments IMP::domino::DominoSampler::get_sample_assignments_for_vertex ( unsigned int  tree_vertex) const

Return a few subset states from that merge.

virtual ::IMP::VersionInfo IMP::domino::DominoSampler::get_version_info ( ) const
overridevirtual

Get information about the module and version of the object.

Reimplemented from IMP::Object.

Definition at line 46 of file DominoSampler.h.

Assignments IMP::domino::DominoSampler::get_vertex_assignments ( unsigned int  node_index,
unsigned int  max_states = std::numeric_limits< int >::max() 
) const

Fill in assignments for a leaf.

Assignments IMP::domino::DominoSampler::get_vertex_assignments ( unsigned int  node_index,
const Assignments first,
const Assignments second,
unsigned int  max_states = std::numeric_limits< int >::max() 
) const

Fill in assignments for an internal node.

The passed assignments, the ordering for the children is the node index for the children.

void IMP::domino::DominoSampler::load_vertex_assignments ( unsigned int  node_index,
AssignmentContainer ac,
unsigned int  max_states = std::numeric_limits< int >::max() 
) const

Fill in assignments for a leaf.

void IMP::domino::DominoSampler::load_vertex_assignments ( unsigned int  node_index,
AssignmentContainer first,
AssignmentContainer second,
AssignmentContainer ac,
unsigned int  max_states = std::numeric_limits< int >::max() 
) const

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::DominoSampler::set_merge_tree ( const MergeTree mt)

Specify the merge tree directly.

void IMP::domino::DominoSampler::set_use_cross_subset_filtering ( bool  tf)

perform filtering between subsets based by eliminating states that cannot be realized in a subset.

Definition at line 62 of file DominoSampler.h.


The documentation for this class was generated from the following file: