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

Module which computes a pairwise alignment of two structures. More...

#include "Alignment_structures_module.hpp"

Public Types

typedef AlignmentEngineStructures Alignment_engine
 Base engine for making alignments between structures. More...
 
typedef Alignment_engine::Aligner_algorithm Aligner_algorithm
 Core algorithm performing the alignment.
More...
 
typedef Alignment_engine::Alignment_unit Structure_unit
 Type for a unit (e.g residue or nucleotid) More...
 
typedef Alignment_engine::Alignment_type Alignment_type
 Representation of an alignment as a sequence of aligned units. More...
 
typedef Alignment_engine::Sequence_length_type Sequence_length_type
 Enum for selecting the length of the sequence to consider when computing the similarity / identity percentages. More...
 

Public Member Functions

virtual std::string get_output_prefix (void) const
 Returns a prefix that concatains the input line options used when running the module. More...
 

Static Public Member Functions

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

Input Accessors and modifiers

Structure *& get_first_structure (void)
 
Structure *& get_second_structure (void)
 
const Alignment_typeget_alignment (void) const
 
Aligner_algorithmget_aligner_algorithm (void)
 
const Aligner_algorithmget_aligner_algorithm (void) const
 
Alignment_engine *& get_alignment_engine (void)
 
const Alignment_engineget_alignment_engine (void) const
 
void initialize_engine (void)
 
static SBL::CSB::Alignment_substitution_matrix_type & get_substition_matrix_type (void)
 
static string & get_alignment_viewer_name (void)
 
static Sequence_length_typeget_percentage_length_type (void)
 

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...
 
boost::program_options::options_description add_options () const
 Virtual method for adding options to the module. More...
 
std::string get_name (void) const
 Returns the name of the package. More...
 

Optional Requirements

bool check_options (std::string &message) const
 Checks that the input options' values are coherent. 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 AlignmentEngineStructures = SBL::CSB::T_Alignment_engine_structures_apurva <typename ModuleTraits::Structure, typename ModuleTraits::FT, typename ModuleTraits::Molecular_distance>>
class SBL::Modules::T_Alignment_structures_module< ModuleTraits, AlignmentEngineStructures >

Module which computes a pairwise alignment of two structures.

Member Typedef Documentation

◆ Aligner_algorithm

Core algorithm performing the alignment.

◆ Alignment_engine

typedef AlignmentEngineStructures Alignment_engine

Base engine for making alignments between structures.

It inherits from the generic interface for all alignments and provide its base functionality. It also implements functionality specific to structural alignments, in particular for anaylzing and comparing alignments. The specific functionality concerns:

  • the molecular distance between the two aligned structures (e.g the lRMSD),
  • the Distance Difference Matrix (DDM),
  • the dRMSD of the alignment.

Due to geometric nature of the structural alignment, the structure type requires that its units define 3D coordinates, i.e the Alignment_unit defines methods x(), y() and z().

Template Parameters
StructureTypeRepresentation of a structure : it requires in particular to define the type Alignment_unit for the geometric representation of a unit to align (e.g a residue or a nucleotid with associated 3D coordinates), the type Alignment_unit indexing the units in the structure, the method size() to return the length of the sequence, and the operator [Alignment_unit_rep] for accessing to the corresponding unit of the structure.
AlignerAlgorithmBase functor for the algorithm that makes the alignment between the two input structures : it requires to define a type Score_type for the score (e.g a double, or a pair of doubles if two scores are required), to take two input structures and an output iterator over pairs of Alignment_unit_rep for the output alignment, and to return the score of the algorithm
FTNumber type representation used for all statistics except the algorithm score.
MolecularDistanceDistance functor between two molecular structures (default is lRMSD).

◆ Alignment_type

Representation of an alignment as a sequence of aligned units.

◆ Sequence_length_type

Enum for selecting the length of the sequence to consider when computing the similarity / identity percentages.

◆ Structure_unit

Type for a unit (e.g residue or nucleotid)

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

◆ check_options()

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

Checks that the input options' values are coherent.

Reimplemented from T_Module_option_description<>.

◆ clone()

Self_* clone ( const Self_ *  s) const
inlineinherited

Clones the object using the copy constructor.

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

virtual std::string get_output_prefix ( void  ) const
inlinevirtualinherited

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

Reimplemented in T_Exploration_parameters_with_layers< NumberType, Distance >, T_Module_based_workflow< Dummy >, T_Module_based_workflow<>, T_Generic_annotator_without_file< AnnotationType, SetAnnotation, GetInstanceName >, T_Space_filling_model_interface_finder_module< ModuleTraits >, T_Space_filling_model_inner_approximation_module< ModuleTraits >, T_Protein_representation_loader< ProteinRepresentation, MolecularCovalentStructureBuilder, PDBLineFormat >, T_PDB_file_loader< ESBTLMolecularSystem, PDBLineFormat >, T_PDB_file_loader< Molecular_system >, T_Molecular_interfaces_module< ModuleTraits >, T_Union_of_balls_surface_volume_3_module< ModuleTraits, OutputArchive >, T_Conformations_file_loader< ConformationType, ConformationBuilder, ESBTLMolecularSystem, PDBLineFormat >, T_Space_filling_model_shelling_diagram_comparison_module< ModuleTraits >, T_Radius_annotator_for_particles_with_annotated_name< NT, SetRadius >, T_Space_filling_model_outer_approximation_module< ModuleTraits >, T_Molecular_covalent_structure_loader_from_PDB< ParticleTraits, MolecularCovalentStructure, MolecularCovalentStructureBuilder, PDBLineFormat >, T_Morse_theory_based_analyzer_module< ModuleTraits, MorseSmaleWittenChainComplex >, T_Morse_theory_based_analyzer_module< ModuleTraits, SBL::GT::T_Morse_Smale_Witten_chain_complex_from_vertex_weighted_graph_builder< GraphType, GetWeight >::Morse_Smale_Witten_chain_complex >, T_Morse_theory_based_analyzer_module< ModuleTraits, SBL::GT::T_Morse_Smale_Witten_chain_complex_from_NNG_builder< ModuleTraits::Nearest_neighbors_graph, ModuleTraits::Morse_function, ModuleTraits::Distance_graph_function >::Morse_Smale_Witten_chain_complex >, T_Morse_theory_based_analyzer_module< ModuleTraits, SBL::GT::T_Morse_Smale_Witten_chain_complex_from_weighted_graph_builder< GraphType, GetWeight >::Morse_Smale_Witten_chain_complex >, T_Space_filling_model_interpolated_approximation_module< ModuleTraits >, T_Union_of_balls_boundary_patch_shelling_3_module< ModuleTraits, OutputArchive >, T_XTC_file_loader< ConformationType, ConformationBuilder, ESBTLMolecularSystem, PDBLineFormat >, T_Generic_annotator< KeyType, AnnotationType, MakeKey, SetAnnotation, GetOptionName, GetOptionHelp, GetOptionDisplayName >, T_Sample_extender_module< ModuleTraits >, T_Stop_criterion_module< ModuleTraits >, T_Alpha_complex_of_molecular_model_module< ModuleTraits >, T_Molecular_structure_classifier_module< ModuleTraits >, T_Exploration_parameters_update_module< ModuleTraits >, T_Earth_mover_distance_module< ModuleTraits >, T_Union_of_balls_boundary_3_module< ModuleTraits, ExactNT >, T_Union_of_balls_mesh_3_module< ModuleTraits >, T_Name_annotator_for_atoms< SetAnnotatedName >, T_Buried_surface_area_without_label_module< ModuleTraits >, T_Tertiary_quaternary_structure_annotator_module< ModuleTraits >, T_Dynamic_annotator_for_atoms< SetDynamicAnnotation >, T_Spatial_search_module< ModuleTraits, ApproximatedSpatialSearchEngine >, T_Nearest_neighbors_graph_builder_module< ModuleTraits >, T_Buried_surface_area_with_labels_module< ModuleTraits >, T_Dynamic_annotator_for_residues< SetDynamicAnnotation >, T_Energy_landscape_transition_graph_landmarks_paths_module< ModuleTraits >, T_Exploration_parameters_default< NumberType, Distance >, T_Name_annotator_for_pseudo_atoms< SetAnnotatedName >, T_Acceptance_test_module< ModuleTraits >, T_Primitive_labels_loader< PartnerLabelsTraits, MediatorLabelsTraits, ExtraLabelsTraits >, T_Spheres_3_file_loader< Sphere3, Point3 >, T_Sample_selector_module< ModuleTraits >, T_Cluster_engine_module< ModuleTraits >, T_Archive_file_loader< InputArchive, SerializedData >, T_Particle_annotator_collector< ParticleAnnotator1, ParticleAnnotator2 >, T_Archive_file_loader< boost::archive::xml_iarchive, typename Traits::Atom_shelling_forest >, T_Domain_annotator_for_particles< Annotations >, T_Multiple_archives_xml_archive_file_loader< SecondaryArchive, SecondaryData, SerializedData >, T_Molecular_covalent_structure_loader_from_MOL< MolecularCovalentStructure >, T_Graph_loader< GraphType, FT >, T_Transition_graph_builder_from_DB_of_critical_points_module< ModuleTraits >, T_Sequences_loader< FT >, T_Graph_loader< GraphType, FT >, T_Graph_loader< Graph >, T_Weighted_vertex_graph_loader< PointD, WeightType, GraphType >, T_Graph_loader< GraphType, FT >, T_Weights_file_loader< FT >, T_Points_d_file_loader< PointD >, T_Module_condition< Module, Predicate >, T_Conformational_ensemble_symmetric_difference_module< ModuleTraits >, T_Transition_graph_loader< InputArchive, TransitionGraphTraits >, T_Transition_graph_loader< boost::archive::xml_iarchive, typename Traits::Transition_graph_traits >, T_Numbers_file_loader< FT, Tag >, T_Module_conjunction< ModuleOrLoader1, ModuleOrLoader2 >, T_Point_cloud_hausdorff_distance_d_module< ModuleTraits >, T_Graph_loader< Graph >, and No_particle_annotator.

◆ get_report_mode()

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

Get the report mode to be used when reporting.

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

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