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

Class for loading conformations from a list of PDB / cif files, or from a plain txt file listing the conformations as Point_d. Class for loading conformations from a list of PDB / cif files, or from a plain txt file listing the conformations as Point_d. More...

#include <Conformation_loader.h>

Public Member Functions

 T_Conformation_loader (void)
 Default constructor.
virtual boost::program_options::options_description add_options (void) override
 Virtual method for adding options to the module.
virtual bool check_options (std::string &message) const override
 Checks that the input options' values are coherent.
std::string get_output_prefix (void) const override
 Returns a prefix that concatains the input line options used when running the module.
bool load (unsigned verbose, std::ostream &out) override
 Load function.
std::string get_name (void) const override
 Return the name of the class itself.
void statistics (std::ostream &out)
 Prints statistics about the loaded conformations.
const std::vector< std::vector< Conformation > > & get_conformations (void) const
 Get the vector of conformations.
std::vector< std::vector< Conformation > > & get_conformations (void)
 Get the vector of conformations.
Molecular_system_loaderget_molecular_system_loader (void)
 Get the molecular system loader.
void save_conformations (void)
 Save the loaded conformations in the current dir, with output_prefix as filename.

Static Public Member Functions

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

Detailed Description

template<class Conformation_builder_ = Default_conformation_builder>
class SBL::IO::T_Conformation_loader< Conformation_builder_ >

Class for loading conformations from a list of PDB / cif files, or from a plain txt file listing the conformations as Point_d. Class for loading conformations from a list of PDB / cif files, or from a plain txt file listing the conformations as Point_d.

It combines the options from the SBL::IO::T_Molecular_system_loader and the SBL::Models::T_Points_d_file_loader. To programmatically load a conformation from a PDB / mmCIF file, one must add the file to the molecular system loader :

T_Conformation_loader<Default_conformation_builder> conformation_loader;
conformation_loader.get_molecular_system_loader().set_loaded_file_paths({"path_to_my_file"});

To load from the application command line, PDB / mmCIF files can be added as :

myapplication -f "path_to_my_file"
Template Parameters
Conformation_builder_: Functor building a conformation from a dD point or a molecular model from the SBL.

Constructor & Destructor Documentation

◆ T_Conformation_loader()

template<class Conformation_builder_>
T_Conformation_loader ( void )
inline

Default constructor.

Member Function Documentation

◆ add_options()

template<class Conformation_builder_>
boost::program_options::options_description add_options ( void )
overridevirtual

Virtual method for adding options to the module.

Adds options specific to the "Conformations loader" to the option parser and also as command line arguments.

Reimplemented from T_Module_option_description< Dummy >.

◆ check_options()

template<class Conformation_builder_>
bool check_options ( std::string & message) const
overridevirtual

Checks that the input options' values are coherent.

Reimplemented from T_Module_option_description< Dummy >.

◆ get_conformations() [1/2]

template<class Conformation_builder_>
std::vector< std::vector< typename Conformation_builder_::Conformation > > & get_conformations ( void )

Get the vector of conformations.

Returns
A reference to the vector of conformations.

◆ get_conformations() [2/2]

template<class Conformation_builder_>
const std::vector< std::vector< typename Conformation_builder_::Conformation > > & get_conformations ( void ) const

Get the vector of conformations.

Returns
A constant reference to the vector of conformations.

◆ get_molecular_system_loader()

template<class Conformation_builder_>
T_Conformation_loader< Conformation_builder_ >::Molecular_system_loader & get_molecular_system_loader ( void )

Get the molecular system loader.

Returns
A reference to the molecular system loader.

◆ get_name()

template<class Conformation_builder_>
std::string get_name ( void ) const
overridevirtual

Return the name of the class itself.

Reimplemented from Loader_base.

◆ get_options()

template<class Dummy = void>
boost::program_options::options_description *& get_options ( void )
inlinestaticinherited

Access to the options' description of the module.

◆ get_output_prefix()

template<class Conformation_builder_>
std::string get_output_prefix ( void ) const
overridevirtual

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

Reimplemented from T_Module_option_description< Dummy >.

◆ load()

template<class Conformation_builder_>
bool load ( unsigned verbose,
std::ostream & out )
inlineoverridevirtual

Load function.

Parameters
verboseVerbosity level.
[out]outOutput stream.
Returns
True if loading is successful, false otherwise. Function to call to execute the main function of a Loader

Load conformations.

Parameters
verboseVerbosity level.
[out]outOutput stream.
Returns
True if loading is successful, false otherwise. This function loads the conformations.

Reimplemented from Loader_base.

◆ save_conformations()

template<class Conformation_builder_>
void save_conformations ( void )
inline

Save the loaded conformations in the current dir, with output_prefix as filename.

◆ statistics()

template<class Conformation_builder_>
void statistics ( std::ostream & out)

Prints statistics about the loaded conformations.

Parameters
[out]outOutput stream for printing the statistics.