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

Module building the bicolor, mediated and tricolor interfaces of a molecular structure. Module building the bicolor, mediated and tricolor interfaces of a molecular structure. More...

#include "Molecular_interfaces_module.hpp"

Static Public Member Functions

static boost::program_options::options_description *& get_options (void)
 Access to the options' description of the module. More...
 

Traits Requirements

typedef ModuleTraits::Molecular_interfaces_builder Molecular_interfaces_builder
 Construct all the primitive and hierarchical interfaces associated to a molecular model represented by an alpha-complex. More...
 

Other Types

typedef Molecular_interfaces_builder::Molecular_structure_classifier Molecular_structure_classifier
 Classify the particles of molecular systems that are at a given interface. More...
 
typedef Molecular_interfaces_builder::Bicolor_interface Bicolor_interface
 Wrapper for a bicolor interface. It provides iterators and queries. More...
 
typedef Molecular_interfaces_builder::Mediated_interface Mediated_interface
 Wrapper for a mediated interface. It provides iterators and queries. More...
 
typedef Molecular_interfaces_builder::Tricolor_interface Tricolor_interface
 Wrapper for a tricolor interface. It provides iterators and queries. More...
 

Input Accessors

Molecular_structure_classifier *& get_structure_classifier (void)
 Reference to a pointer to the input structure classifier. More...
 

Output Accessors

const Molecular_interfaces_builderget_interfaces_builder (void) const
 Const reference to the output interface builder. More...
 
Molecular_interfaces_builderget_interfaces_builder (void)
 Reference to the output interface builder. More...
 
const Bicolor_interfaceget_bicolor_interface (Partner_label partner_1, Partner_label partner_2) const
 Const reference to the output bicolor interface between the given partners. More...
 
Bicolor_interfaceget_bicolor_interface (Partner_label partner_1, Partner_label partner_2)
 Reference to the output bicolor interface between the given partners. More...
 
const Mediated_interfaceget_mediated_interface (Partner_label partner_1, Partner_label partner_2, Mediator_label mediator) const
 Const reference to the output mediated interface between the given partners and mediator. More...
 
Mediated_interfaceget_mediated_interface (Partner_label partner_1, Partner_label partner_2, Mediator_label mediator)
 Reference to the output mediated interface between the given partners and mediator. More...
 
const Tricolor_interfaceget_tricolor_interface (Partner_label partner_1, Partner_label partner_2, Mediator_label mediator) const
 Const reference to the output tricolor interface between the given partners and mediator. More...
 
Tricolor_interfaceget_tricolor_interface (Partner_label partner_1, Partner_label partner_2, Mediator_label mediator)
 Reference to the output tricolor interface between the given partners and mediator. More...
 

Mandatory Requirements

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

Optional Requirements

boost::program_options::options_description add_options (void) override
 Virtual method for adding options to the module. More...
 
bool check_options (std::string &message) const override
 Checks that the input options' values are coherent. More...
 
std::string get_output_prefix (void) const override
 Returns a prefix that concatains the input line options used when running the module. More...
 
void report (const std::string &prefix) override
 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...
 

Optional Requirements

void check_filesystem_directory_exists (const std::string &output_prefix)
 To avoid later crash: check filesystem / existence of directory / directory exists. 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 SBL::Modules::T_Molecular_interfaces_module< ModuleTraits >

Module building the bicolor, mediated and tricolor interfaces of a molecular structure. Module building the bicolor, mediated and tricolor interfaces of a molecular structure.

It builds from a given structure classifier an object SBL::Modules::T_Molecular_interfaces_module::Molecular_interfaces_builder that groups into data structures the contacts between two given partners, and possibly contacts mediated by a mediator:

These data structures offer iterators over the different components of the interfaces (particles of a partner or a mediator, contacts between two given partners, or mediated contacts, connected components of adjacent contacts, etc...). Note that while the primitive interfaces are computed at the construction of the SBL::Modules::T_Molecular_interfaces_module::Molecular_interfaces_builder object, the hierarchical interfaces are computed when one wants to access them.

Various statistics on the interfaces are dumped:

  • the particles: number of connected components, number of particles per connected component,
  • the contacts: number of contacts per connected component, surface area, perimeter and curvature of the interface,
  • the interface shelling (optional): integer representing how much a contact is buried in the interface.

When reporting the results into files, three files are created for each pair of partners:

  • an XML file containing the full description of all the interfaces involving the two given partners,
  • a VMD file for visualizing the interfaces involving the two given partners; note that when the interface shelling is computed, the interfaces are colored following the burying of the contacts,
  • when computing the interface shelling, a XML file describing the shelling of the interfaces of the two given partners with all possible mediators.
Template Parameters
ModuleTraitsTraits class defining the type SBL::Modules::T_Molecular_interfaces_module::Molecular_interfaces_builder.

Member Typedef Documentation

◆ Bicolor_interface

typedef Molecular_interfaces_builder::Bicolor_interface Bicolor_interface

Wrapper for a bicolor interface. It provides iterators and queries.

◆ Mediated_interface

typedef Molecular_interfaces_builder::Mediated_interface Mediated_interface

Wrapper for a mediated interface. It provides iterators and queries.

◆ Molecular_interfaces_builder

typedef ModuleTraits::Molecular_interfaces_builder Molecular_interfaces_builder

Construct all the primitive and hierarchical interfaces associated to a molecular model represented by an alpha-complex.

Initialized with the alpha-complex of a molecular model, it first classify all the contacts of the primitive interfaces using the classifier. Then, it computes the primitive interfaces. Finally, accessors are provided for getting any kind of interfaces (primitive or hierarchical).

Template Parameters
MolecularStructureTraitsTraits class defining the alpha complex and molecular interfaces.
MolecularStructureClassifierTraits Traits class defining the alpha complex and molecular interfaces.

◆ Molecular_structure_classifier

typedef Molecular_interfaces_builder::Molecular_structure_classifier Molecular_structure_classifier

Classify the particles of molecular systems that are at a given interface.

Data structure classifying the set of vertices and edges located at the interface between the partners. It also finalizes the labelling of vertices of an alpha-complex designed for a molecular system with several partners. In particular, it marks water molecules that are at the interface between the partners (interface water molecules), and the ones that are not (bulked water molecules).

Template Parameters
ParticleWithSystemLabelTraitsmodel of ParticleTraits where particles have an attached system\'s label.
MolecularModelClassifierClassify a molecular model, i.e the geometric embedding of a molecular structure.

◆ Tricolor_interface

typedef Molecular_interfaces_builder::Tricolor_interface Tricolor_interface

Wrapper for a tricolor interface. It provides iterators and queries.

Member Function Documentation

◆ add_options()

boost::program_options::options_description add_options ( void  )
inlineoverridevirtual

Virtual method for adding options to the module.

Reimplemented from T_Module_option_description< Dummy >.

◆ check_filesystem_directory_exists()

void check_filesystem_directory_exists ( const std::string &  output_prefix)
inlineinherited

To avoid later crash: check filesystem / existence of directory / directory exists.

◆ check_options()

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

Checks that the input options' values are coherent.

Reimplemented from T_Module_option_description< Dummy >.

◆ clone()

Self_* clone ( const Self_ *  s) const
inlineinherited

Clones the object using the copy constructor.

◆ get_bicolor_interface() [1/2]

T_Molecular_interfaces_module< ModuleTraits >::Bicolor_interface & get_bicolor_interface ( Partner_label  partner_1,
Partner_label  partner_2 
)
inline

Reference to the output bicolor interface between the given partners.

◆ get_bicolor_interface() [2/2]

const T_Molecular_interfaces_module< ModuleTraits >::Bicolor_interface & get_bicolor_interface ( Partner_label  partner_1,
Partner_label  partner_2 
) const
inline

Const reference to the output bicolor interface between the given partners.

◆ get_interfaces_builder() [1/2]

T_Molecular_interfaces_module< ModuleTraits >::Molecular_interfaces_builder & get_interfaces_builder ( void  )
inline

Reference to the output interface builder.

◆ get_interfaces_builder() [2/2]

const T_Molecular_interfaces_module< ModuleTraits >::Molecular_interfaces_builder & get_interfaces_builder ( void  ) const
inline

Const reference to the output interface builder.

◆ get_mediated_interface() [1/2]

T_Molecular_interfaces_module< ModuleTraits >::Mediated_interface & get_mediated_interface ( Partner_label  partner_1,
Partner_label  partner_2,
Mediator_label  mediator 
)
inline

Reference to the output mediated interface between the given partners and mediator.

◆ get_mediated_interface() [2/2]

const T_Molecular_interfaces_module< ModuleTraits >::Mediated_interface & get_mediated_interface ( Partner_label  partner_1,
Partner_label  partner_2,
Mediator_label  mediator 
) const
inline

Const reference to the output mediated interface between the given partners and mediator.

◆ 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
inlineoverridevirtual

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
inlineoverridevirtual

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

Reimplemented from T_Module_option_description< Dummy >.

◆ get_report_mode()

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

Get the report mode to be used when reporting.

◆ get_structure_classifier()

T_Molecular_interfaces_module< ModuleTraits >::Molecular_structure_classifier *& get_structure_classifier ( void  )
inline

Reference to a pointer to the input structure classifier.

◆ get_tricolor_interface() [1/2]

T_Molecular_interfaces_module< ModuleTraits >::Tricolor_interface & get_tricolor_interface ( Partner_label  partner_1,
Partner_label  partner_2,
Mediator_label  mediator 
)
inline

Reference to the output tricolor interface between the given partners and mediator.

◆ get_tricolor_interface() [2/2]

const T_Molecular_interfaces_module< ModuleTraits >::Tricolor_interface & get_tricolor_interface ( Partner_label  partner_1,
Partner_label  partner_2,
Mediator_label  mediator 
) const
inline

Const reference to the output tricolor interface between the given partners and mediator.

◆ 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
inlineoverridevirtual

Checks that all the input options were set.

Reimplemented from Module_base.

◆ operator()()

virtual bool operator() ( void  )
inlineprotectedvirtualinherited

Only for condition modules, for returning the predicate value.

◆ report()

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

Reports the output and statistics in output files.

Reimplemented from Module_base.

◆ run()

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

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

Reports high-level statistics on the module.

Reimplemented from Module_base.