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

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

#include "Pairwise_structural_alignment_module.hpp"

Public Types

enum  run_type { SCORE, LRMSD, RANDOM }
 The run type for the module. More...
 
typedef SBL::Modules::T_Alignment_structures_module< ModuleTraits, AlignmentEngine > Base
 
typedef T_Pairwise_structural_alignment_module< ModuleTraits, AlignmentEngine > Self
 
typedef AlignmentEngine Alignment_engine
 
typedef Alignment_engine::Aligned_pair Aligned_pair
 
typedef Alignment_engine::Alignment_type Alignment_type
 
typedef Base::Sequence_length_type Sequence_length_type
 
typedef Base::Structure Structure
 
typedef ModuleTraits::Residue_set Residue_set
 
typedef ModuleTraits::Alignment_residue Alignment_residue
 
typedef ModuleTraits::Atom Atom
 
typedef ModuleTraits::Molecular_system Molecular_system
 
typedef ModuleTraits::Shelf Shelf
 
typedef SBL::CSB::T_Score_ordering_computer< Structure, Alignment_engineScore_ordering_computer
 
typedef ModuleTraits::FT FT
 
typedef ModuleTraits::Molecular_distance Molecular_distance
 
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...
 

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 bool has_options (void)
 
static void delete_options (void)
 
static void initialize_options (const std::string &caption)
 

Attributes

The score ordering computer

 T_Pairwise_structural_alignment_module (void)
 
 T_Pairwise_structural_alignment_module (const Self &other)
 

Mandatory Requirements

void run (unsigned verbose, std::ostream &out)
 Runs the module following the input options. More...
 

Optional Requirements

const boost::program_options::options_description * get_options (void) const
 Access to the options' description of the module. More...
 
boost::program_options::options_description *& get_options (void)
 Access to the options' description of the module. More...
 
boost::program_options::options_description add_options () 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...
 
void report (const std::string &prefix)
 Reports the output and statistics in output files. More...
 

Printers

void print_alignment (const std::string &filename)
 Print the alignment (as a pairing of residue sequence numbers) More...
 
void write_pymol_script (const std::string &filename)
 Write a PyMol script. More...
 
template<class Archive >
void serialize (Archive &ar, const unsigned BOOST_PFTO int version)
 Serialize. More...
 

Accessors

Structure *& get_aligned_structure_1 ()
 Return the aligned residues belonging to the first chain. More...
 
Structure *& get_aligned_structure_2 ()
 Return the aligned residues belonging to the second chain. More...
 
double get_alignment_lRMSD () const
 Return the least RMSD. More...
 
double get_distance_RMSD () const
 Return the distance RMSD. More...
 
unsigned get_size () const
 Return the alignment size. More...
 
double get_similarity_percentage () const
 Return the sequence similarity percentage. More...
 
double get_identity_percentage () const
 Return the sequence identity percentage. More...
 
Residue_set get_first_chain_motif_as_residue_set (void)
 Return the first motif as a residue set (as defined in the traits class). More...
 
Residue_set get_second_chain_motif_as_residue_set (void)
 Return the second motif as a residue set (as defined in the traits class). More...
 
double get_lrmsd_ratio (void)
 
bool is_structural_motif (void) const
 
template<class OutputIterator >
void get_first_structure_score_ordering (OutputIterator out)
 
template<class OutputIterator >
void get_second_structure_score_ordering (OutputIterator out)
 
static unsigned get_size_threshold (void)
 
static Shelf *& get_shelf ()
 Return the shelf. More...
 

Modifiers

void set_persistence_one (std::pair< double, double > persistence)
 Set the persistence values for the blocks. More...
 
void set_persistence_two (std::pair< double, double > persistence)
 
void set_run_type (run_type new_type)
 Set the run type of the module. More...
 
static void set_reference_lrmsd (double lrmsd)
 Set the reference lRMSD (used to determine if a motif is interesting) 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_typeget_substition_matrix_type (void)
 
static string & get_alignment_viewer_name (void)
 
static Sequence_length_typeget_percentage_length_type (void)
 

Mandatory Requirements

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...
 
std::string get_name (void) const
 Returns the name of the package. 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 AlignmentEngine>
class SBL::Modules::T_Pairwise_structural_alignment_module< ModuleTraits, AlignmentEngine >

Module which computes a pairwise structural alignment of two protein structures Module which computes a pairwise structural alignment of two protein structures.

It is designed such that the input can be either a collection of 3D spheres representing the particles, or a collection of particles with the type derived from ParticleTraits, depending on the type of the output $\alpha$-complex:

Template Parameters
ModuleTraitsTraits class defining the types T_Alpha_complex_of_molecular_model_module::Alpha_complex and T_Alpha_complex_of_molecular_model_module::Particles_container.

Member Typedef Documentation

◆ Aligned_pair

◆ Aligner_algorithm

Core algorithm performing the alignment.

◆ Alignment_engine

typedef AlignmentEngine Alignment_engine

◆ Alignment_residue

typedef ModuleTraits::Alignment_residue Alignment_residue

◆ Alignment_type

◆ Atom

typedef ModuleTraits::Atom Atom

◆ Base

typedef SBL::Modules::T_Alignment_structures_module<ModuleTraits, AlignmentEngine> Base

◆ FT

typedef ModuleTraits::FT FT
inherited

◆ Molecular_distance

typedef ModuleTraits::Molecular_distance Molecular_distance
inherited

◆ Molecular_system

typedef ModuleTraits::Molecular_system Molecular_system

◆ Residue_set

typedef ModuleTraits::Residue_set Residue_set

◆ Score_ordering_computer

◆ Self

typedef T_Pairwise_structural_alignment_module<ModuleTraits, AlignmentEngine> Self

◆ Sequence_length_type

◆ Shelf

typedef ModuleTraits::Shelf Shelf

◆ Structure

typedef Base::Structure Structure

◆ Structure_unit

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

Member Enumeration Documentation

◆ run_type

enum run_type

The run type for the module.

SCORE type dictates that the module should run the initial alignment and compute calpha ranks. LRMSD dictates that the module should only compute the alignment and return the lRMSD (used for the module collection).

Enumerator
SCORE 
LRMSD 
RANDOM 

Constructor & Destructor Documentation

◆ T_Pairwise_structural_alignment_module() [1/2]

◆ T_Pairwise_structural_alignment_module() [2/2]

T_Pairwise_structural_alignment_module ( const Self other)
inline

Member Function Documentation

◆ add_options()

boost::program_options::options_description add_options ( ) 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.

◆ delete_options()

static void delete_options ( void  )
inlinestaticinherited

◆ get_aligned_structure_1()

Structure*& get_aligned_structure_1 ( )
inline

Return the aligned residues belonging to the first chain.

◆ get_aligned_structure_2()

Structure*& get_aligned_structure_2 ( )
inline

Return the aligned residues belonging to the second chain.

◆ get_aligner_algorithm() [1/2]

T_Alignment_structures_module< ModuleTraits, AlignmentEngine >::Aligner_algorithm & get_aligner_algorithm ( void  )
inlineinherited

◆ get_aligner_algorithm() [2/2]

const T_Alignment_structures_module< ModuleTraits, AlignmentEngine >::Aligner_algorithm & get_aligner_algorithm ( void  ) const
inlineinherited

◆ get_alignment()

const T_Alignment_structures_module< ModuleTraits, AlignmentEngine >::Alignment_type & get_alignment ( void  ) const
inlineinherited

◆ get_alignment_engine() [1/2]

T_Alignment_structures_module< ModuleTraits, AlignmentEngine >::Alignment_engine *& get_alignment_engine ( void  )
inlineinherited

◆ get_alignment_engine() [2/2]

const T_Alignment_structures_module< ModuleTraits, AlignmentEngine >::Alignment_engine * get_alignment_engine ( void  ) const
inlineinherited

◆ get_alignment_lRMSD()

double get_alignment_lRMSD ( ) const
inline

Return the least RMSD.

◆ get_alignment_viewer_name()

static string& get_alignment_viewer_name ( void  )
inlinestaticinherited

◆ get_distance_RMSD()

double get_distance_RMSD ( ) const
inline

Return the distance RMSD.

◆ get_first_chain_motif_as_residue_set()

Residue_set get_first_chain_motif_as_residue_set ( void  )
inline

Return the first motif as a residue set (as defined in the traits class).

◆ get_first_structure()

T_Alignment_structures_module< ModuleTraits, AlignmentEngine >::Structure *& get_first_structure ( void  )
inlineinherited

◆ get_first_structure_score_ordering()

void get_first_structure_score_ordering ( OutputIterator  out)
inline

◆ get_identity_percentage()

double get_identity_percentage ( ) const
inline

Return the sequence identity percentage.

◆ get_lrmsd_ratio()

double get_lrmsd_ratio ( void  )
inline

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

Returns the name of the package.

Reimplemented from Module_base.

◆ get_options() [1/2]

const boost::program_options::options_description* get_options ( void  ) const
inline

Access to the options' description of the module.

◆ get_options() [2/2]

boost::program_options::options_description*& get_options ( void  )
inline

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_Potential_energy_parameters< CovalentStructure, UnitSystemTraits, FT >, T_Module_based_workflow< Dummy >, T_Module_based_workflow<>, T_Molecular_interfaces_module< ModuleTraits >, T_Potential_energy_parameters< CovalentStructure, UnitSystemTraits, FT >, 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_Correlated_motions_by_domain_module< ModuleTraits >, T_Protein_representation_loader< ProteinRepresentation, MolecularCovalentStructureBuilder, PDBLineFormat >, T_PDB_file_loader< ESBTLMolecularSystem, PDBLineFormat >, T_PDB_file_loader< Molecular_system >, 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_Space_filling_model_interpolated_approximation_module< ModuleTraits >, T_Morse_theory_based_analyzer_module< ModuleTraits, MorseSmaleWittenChainComplex >, T_Union_of_balls_boundary_patch_shelling_3_module< ModuleTraits, OutputArchive >, 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_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_Union_of_balls_boundary_3_module< ModuleTraits, ExactNT >, T_Earth_mover_distance_module< ModuleTraits >, T_Modules_collection< Module, SetIndividualInput >, T_Union_of_balls_mesh_3_module< ModuleTraits >, T_Module_condition< void, Predicate >, 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_Buried_surface_area_with_labels_module< ModuleTraits >, T_Spatial_search_module< ModuleTraits, ApproximatedSpatialSearchEngine >, T_Nearest_neighbors_graph_builder_module< ModuleTraits >, T_Dynamic_annotator_for_residues< SetDynamicAnnotation >, T_Energy_landscape_transition_graph_landmarks_paths_module< ModuleTraits >, T_Exploration_parameters_default< NumberType, Distance >, T_Minimal_oriented_spanning_forest_module< ModuleTraits, SpatialSearchEngine >, T_Name_annotator_for_pseudo_atoms< SetAnnotatedName >, T_Acceptance_test_module< ModuleTraits >, T_Primitive_labels_loader< PartnerLabelsTraits, MediatorLabelsTraits, ExtraLabelsTraits >, T_Sample_selector_module< ModuleTraits >, T_Spheres_3_file_loader< Sphere3, Point3 >, 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_Sequences_loader< FT >, T_Weighted_vertex_graph_loader< PointD, WeightType, GraphType >, T_Graph_loader< GraphType, FT >, T_Graph_loader< Graph >, T_Graph_loader< GraphType, FT >, T_Weights_file_loader< FT >, T_Transition_graph_builder_from_DB_of_critical_points_module< ModuleTraits >, 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_Weighted_points_d_loader< PointD, WeightType >, T_Numbers_file_loader< FT, Tag >, T_Module_conjunction< ModuleOrLoader1, ModuleOrLoader2 >, T_Point_cloud_hausdorff_distance_d_module< ModuleTraits >, T_Clustering_loader< Graph, Clustering >, T_Graph_loader< Graph >, T_Clustering_loader< Graph, Clustering >, No_particle_annotator, Conformations_loader, and Space_filling_model_loader.

◆ get_percentage_length_type()

static Sequence_length_type& get_percentage_length_type ( void  )
inlinestaticinherited

◆ get_report_mode()

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

Get the report mode to be used when reporting.

◆ get_second_chain_motif_as_residue_set()

Residue_set get_second_chain_motif_as_residue_set ( void  )
inline

Return the second motif as a residue set (as defined in the traits class).

◆ get_second_structure()

T_Alignment_structures_module< ModuleTraits, AlignmentEngine >::Structure *& get_second_structure ( void  )
inlineinherited

◆ get_second_structure_score_ordering()

void get_second_structure_score_ordering ( OutputIterator  out)
inline

◆ get_shelf()

static Shelf*& get_shelf ( )
inlinestatic

Return the shelf.

◆ get_similarity_percentage()

double get_similarity_percentage ( ) const
inline

Return the sequence similarity percentage.

◆ get_size()

unsigned get_size ( ) const
inline

Return the alignment size.

◆ get_size_threshold()

static unsigned get_size_threshold ( void  )
inlinestatic

◆ get_substition_matrix_type()

static SBL::CSB::Alignment_substitution_matrix_type& get_substition_matrix_type ( void  )
inlinestaticinherited

◆ has_options()

static bool has_options ( void  )
inlinestaticinherited

◆ initialize_engine()

void initialize_engine ( void  )
inlineinherited

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

Checks that all the input options were set.

Reimplemented from Module_base.

◆ is_structural_motif()

bool is_structural_motif ( void  ) const
inline

◆ operator()()

virtual bool operator() ( void  )
inlineprotectedvirtualinherited

Only for condition modules, for returning the predicate value.

◆ print_alignment()

void print_alignment ( const std::string &  filename)
inline

Print the alignment (as a pairing of residue sequence numbers)

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

◆ serialize()

void serialize ( Archive &  ar,
const unsigned BOOST_PFTO int  version 
)
inline

Serialize.

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

void set_persistence_one ( std::pair< double, double >  persistence)
inline

Set the persistence values for the blocks.

◆ set_persistence_two()

void set_persistence_two ( std::pair< double, double >  persistence)
inline

◆ set_reference_lrmsd()

static void set_reference_lrmsd ( double  lrmsd)
inlinestatic

Set the reference lRMSD (used to determine if a motif is interesting)

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

◆ set_run_type()

void set_run_type ( run_type  new_type)
inline

Set the run type of the module.

◆ statistics()

void statistics ( std::ostream &  out)
inlinevirtualinherited

Reports high-level statistics on the module.

Reimplemented from Module_base.

◆ write_pymol_script()

void write_pymol_script ( const std::string &  filename)
inline

Write a PyMol script.