Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_Space_filling_model_interface_finder_module< ModuleTraits > Class Template Reference

Module building the Interfaces Graph of a molecular structure. More...

#include <Space_filling_model_interface_finder_module.hpp>

Public Types

typedef T_Space_filling_model_interface_finder_module< ModuleTraits > Self
 
typedef SBL::Modules::Module_base Base
 
typedef ModuleTraits::Particle_traits Particle_traits
 Model of ParticleTraits for defining particles with a system's label. More...
 
typedef ModuleTraits::Particles_container Particles_container
 Container for the input particles (atoms or pseudo-atoms). More...
 
typedef ModuleTraits::Get_label_identifier Get_label_identifier
 Functor returning the identifier of the primitive label of a particle. More...
 
typedef ModuleTraits::Alpha_complex Alpha_complex
 Derived class from CGAL alpha-complex for filling it with particles. More...
 
typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS, Vertex_properties, Edge_properties > Interfaces_graph
 Representation of the interfaces graph, where vertices are labeled with an identifier, and edges are weighted with the number of c.c and the number of contacts. More...
 

Public Member Functions

template<class Name1 , class Name2 >
T_Space_filling_model_interface_finder_module< ModuleTraits >::template T_Double_label_writer< Name1, Name2 > make_double_label_writer (const Name1 &name1, const Name2 &name2) const
 

Static Public Member Functions

static boost::program_options::options_description *& get_options (void)
 Access to the options' description of the module. More...
 
static bool has_options (void)
 
static void delete_options (void)
 
static void initialize_options (const std::string &caption)
 

Input Accessors

Particles_container *& get_particles (void)
 Reference to the container of particles. More...
 
Get_label_identifierget_label_identifier (void)
 Reference to the functor labeling the particles. More...
 

Output Accessors

const Alpha_complex *& get_alpha_complex (void) const
 Const reference to a pointer over the output $\alpha$-complex. More...
 
Alpha_complex *& get_alpha_complex (void)
 Reference to a pointer over the output $\alpha$-complex. More...
 
Interfaces_graphget_interfaces_graph (void)
 Const reference to the output Interfaces Graph. More...
 
const Interfaces_graphget_interfaces_graph (void) const
 Reference to the output Interfaces Graph. More...
 

Mandatory Requirements

void run (unsigned verbose, std::ostream &out)
 Runs the module following the input options. More...
 
bool is_runnable (void) const
 Checks that all the input options were set. More...
 
void statistics (std::ostream &out)
 Reports high-level statistics on the module. More...
 
Selfclone (void) const
 Clones the object using the copy constructor. More...
 
std::string get_name (void) const
 Returns the name of the package. More...
 

Optional Requirements

boost::program_options::options_description add_options (void) const
 Virtual method for adding options to the module. More...
 
bool check_options (std::string &message) const
 Checks that the input options' values are coherent. More...
 
std::string get_output_prefix (void) const
 Returns a prefix that concatains the input line options used when running the module. More...
 
void report (const std::string &prefix)
 Reports the output and statistics in output files. More...
 

Modules Management

void set_module_instance_name (const std::string &module_instance_name)
 Sets a name for this instance of this module. In particular, it will be used in the prefix of output files generated by a collection of modules. More...
 
const std::string & get_module_instance_name (void) const
 Get the name of this instance of this module. More...
 
void set_report_mode (std::ios_base::openmode report_mode)
 Set a report mode, that is open or append modes. More...
 
void set_report_mode (std::ios_base::openmode &report_mode)
 Set a report mode, that is open or append modes. More...
 
const std::ios_base::openmode get_report_mode (void) const
 Get the report mode to be used when reporting. More...
 

Others

template<class Self_ >
Self_ * clone (const Self_ *s) const
 Clones the object using the copy constructor. More...
 
virtual bool is_logical_module (void) const
 Checks that this module defines a logical operator. More...
 
virtual bool is_condition_module (void) const
 Checks that this module defines a condition operator. More...
 
virtual bool operator() (void)
 Only for condition modules, for returning the predicate value. More...
 
virtual bool is_modules_collection (void) const
 Checks that this module defines a collection of modules. More...
 

Detailed Description

template<class ModuleTraits>
class T_Space_filling_model_interface_finder_module< ModuleTraits >

Module building the Interfaces Graph of a molecular structure.

It first groups all particles of each primitive partner's label. Then, it looks for all binary tricolor primitive interfaces, meaning that:

  • it looks for all possible pairs of different primitive partner's labels,
  • it records for each such pair the bicolor and mediated contacts (i.e direct contacts, and contacts mediated by mediator's particles).

The particle type is defined in the traits class T_Space_filling_model_interface_finder_module::Particle_traits and are store in a container of type T_Space_filling_model_interface_finder_traits::Particles_container. The method T_Space_filling_model_interface_finder_traits::get_particles returns a reference toi the particles' container. It is also possible to add a constant value to the radius of all particles with the method

The primitive label of a particle is identified using the functor T_Space_filling_model_interface_finder_traits::Get_label_identifier. The method T_Space_filling_model_interface_finder_traits::get_label_identifier returns a reference to this functor.

The contacts between particles are deduced from the $\alpha$-complex instantiated from the type T_Space_filling_model_interface_finder_module::Alpha_complex. The method T_Space_filling_model_interface_finder_traits::get_alpha_complex returns a reference to the output $\alpha$-complex.

Finally, the output Interfaces Graph has the type T_Space_filling_model_interface_finder_module::Interfaces_graph : it is a boost graph where vertices are labeled with the corresponding partner's primitive label, and edges are weighted by the number of contacts at the corresponding interface. The method T_Space_filling_model_interface_finder_module::get_interfaces_graph returns a reference to the Interfaces Graph.

Template Parameters
ModuleTraitsTraits class defining the types T_Space_filling_model_interface_finder_module::Particle_traits, T_Space_filling_model_interface_finder_module::Particles_container, T_Space_filling_model_interface_finder_module::Get_label_identifier and T_Space_filling_model_interface_finder_module::Alpha_complex.

Member Typedef Documentation

◆ Alpha_complex

typedef ModuleTraits::Alpha_complex Alpha_complex

Derived class from CGAL alpha-complex for filling it with particles.

It uses ParticleTraits for determining the geometrical kernel used for the representation and computation of the $\alpha$-complex, and for attaching atom data to their corresponding vertex.

Template Parameters
ParticleTraitsTraits class defining geometric properties of a particle.
TAlphaComplexVertexBaseBase class for representing a vertex in the 3D $\alpha$-complex. It has SBL::CSB::T_Alpha_complex_vertex_base_3 as default type.
TAlphaComplexCellBaseBase class for representing a cell in the 3D $\alpha$-complex. It has SBL::CSB::T_Alpha_complex_cell_base_3 as default type.
TAlphaComplexBaseBase template representation of the $\alpha$-complex it-self without biological context. It allows to switch easily between the class CGAL::Fixed_alpha_shape_3 and the class CGAL::Alpha_shape_3. It has SBL::CSB::T_Alpha_complex_base_3 as default type, that is a wrapper for using both CGAL data structures.

◆ Base

◆ Get_label_identifier

typedef ModuleTraits::Get_label_identifier Get_label_identifier

Functor returning the identifier of the primitive label of a particle.

It takes as argument a particle, and return the identifier of its primitive label. The type of the identifier is named result_type and has to be a concatenable type (e.g a string).

◆ Interfaces_graph

typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, Vertex_properties, Edge_properties> Interfaces_graph

Representation of the interfaces graph, where vertices are labeled with an identifier, and edges are weighted with the number of c.c and the number of contacts.

◆ Particle_traits

typedef ModuleTraits::Particle_traits Particle_traits

Model of ParticleTraits for defining particles with a system's label.

...

Template Parameters
ParticleTraitsBaseBase model of ParticleTraits.
PartnerLabelsTraitsModel of MolecularSystemLabelsTraits for partners' labels.
MediatorLabelsTraitsModel of MolecularSystemLabelsTraits for mediators' labels.
ExtraLabelsTraitsModel of MolecularSystemLabelsTraits for extra labels.
IsSerializedLabelBoolean that checks that the labels are serialized in the output (default is true).

◆ Particles_container

typedef ModuleTraits::Particles_container Particles_container

Container for the input particles (atoms or pseudo-atoms).

See ParticleTraits for more details.

◆ Self

Member Function Documentation

◆ add_options()

boost::program_options::options_description add_options ( void  ) const
inlinevirtual

Virtual method for adding options to the module.

Reimplemented from T_Module_option_description< Dummy >.

◆ check_options()

bool check_options ( std::string &  message) const
inlinevirtual

Checks that the input options' values are coherent.

Reimplemented from T_Module_option_description< Dummy >.

◆ clone() [1/2]

Self_* clone ( const Self_ *  s) const
inlineinherited

Clones the object using the copy constructor.

◆ clone() [2/2]

T_Space_filling_model_interface_finder_module< ModuleTraits > * clone ( void  ) const
inline

Clones the object using the copy constructor.

◆ delete_options()

static void delete_options ( void  )
inlinestaticinherited

◆ get_alpha_complex() [1/2]

T_Space_filling_model_interface_finder_module< ModuleTraits >::Alpha_complex *& get_alpha_complex ( void  )
inline

Reference to a pointer over the output $\alpha$-complex.

◆ get_alpha_complex() [2/2]

const T_Space_filling_model_interface_finder_module< ModuleTraits >::Alpha_complex *& get_alpha_complex ( void  ) const
inline

Const reference to a pointer over the output $\alpha$-complex.

◆ get_interfaces_graph() [1/2]

T_Space_filling_model_interface_finder_module< ModuleTraits >::Interfaces_graph & get_interfaces_graph ( void  )
inline

Const reference to the output Interfaces Graph.

◆ get_interfaces_graph() [2/2]

const T_Space_filling_model_interface_finder_module< ModuleTraits >::Interfaces_graph & get_interfaces_graph ( void  ) const
inline

Reference to the output Interfaces Graph.

◆ get_label_identifier()

T_Space_filling_model_interface_finder_module< ModuleTraits >::Get_label_identifier & get_label_identifier ( void  )
inline

Reference to the functor labeling the particles.

◆ get_module_instance_name()

const std::string& get_module_instance_name ( void  ) const
inlineinherited

Get the name of this instance of this module.

◆ get_name()

std::string get_name ( void  ) const
inlinevirtual

Returns the name of the package.

Reimplemented from Module_base.

◆ get_options()

static boost::program_options::options_description*& get_options ( void  )
inlinestaticinherited

Access to the options' description of the module.

◆ get_output_prefix()

std::string get_output_prefix ( void  ) const
inlinevirtual

Returns a prefix that concatains the input line options used when running the module.

Reimplemented from T_Module_option_description< Dummy >.

◆ get_particles()

T_Space_filling_model_interface_finder_module< ModuleTraits >::Particles_container *& get_particles ( void  )
inline

Reference to the container of particles.

◆ get_report_mode()

const std::ios_base::openmode get_report_mode ( void  ) const
inlineinherited

Get the report mode to be used when reporting.

◆ has_options()

static bool has_options ( void  )
inlinestaticinherited

◆ initialize_options()

static void initialize_options ( const std::string &  caption)
inlinestaticinherited

◆ is_condition_module()

virtual bool is_condition_module ( void  ) const
inlineprotectedvirtualinherited

Checks that this module defines a condition operator.

◆ is_logical_module()

virtual bool is_logical_module ( void  ) const
inlineprotectedvirtualinherited

Checks that this module defines a logical operator.

◆ is_modules_collection()

virtual bool is_modules_collection ( void  ) const
inlineprotectedvirtualinherited

Checks that this module defines a collection of modules.

◆ is_runnable()

bool is_runnable ( void  ) const
inlinevirtual

Checks that all the input options were set.

Reimplemented from Module_base.

◆ make_double_label_writer()

T_Space_filling_model_interface_finder_module<ModuleTraits>::template T_Double_label_writer<Name1, Name2> make_double_label_writer ( const Name1 &  name1,
const Name2 &  name2 
) const

◆ operator()()

virtual bool operator() ( void  )
inlineprotectedvirtualinherited

Only for condition modules, for returning the predicate value.

◆ report()

void report ( const std::string &  prefix)
inlinevirtual

Reports the output and statistics in output files.

Reimplemented from Module_base.

◆ run()

void run ( unsigned  verbose,
std::ostream &  out 
)
inlinevirtual

Runs the module following the input options.

Implements Module_base.

◆ set_module_instance_name()

void set_module_instance_name ( const std::string &  module_instance_name)
inlineinherited

Sets a name for this instance of this module. In particular, it will be used in the prefix of output files generated by a collection of modules.

◆ set_report_mode() [1/2]

void set_report_mode ( std::ios_base::openmode &  report_mode)
inlineinherited

Set a report mode, that is open or append modes.

◆ set_report_mode() [2/2]

void set_report_mode ( std::ios_base::openmode  report_mode)
inlineinherited

Set a report mode, that is open or append modes.

◆ statistics()

void statistics ( std::ostream &  out)
inlinevirtual

Reports high-level statistics on the module.

Reimplemented from Module_base.