Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_Spheres_3_file_loader< Sphere3, Point3 > Class Template Reference


Loader for one or more txt files listing 3D spheres More...

#include "Spheres_3_file_loader.hpp"

Static Public Member Functions

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

Accessors

static void add_input_file_name (const std::string &file_name)
 Add manually the name of an input text file. More...
 
unsigned get_number_of_loaded_geometric_models (void) const
 Number of loaded files. More...
 
const Molecular_geometric_model & get_geometric_model (unsigned i) const
 ith container of the loaded 3D spheres from the ith file (const). More...
 
Molecular_geometric_model & get_geometric_model (unsigned i)
 ith container of the loaded 3D spheres from the ith file. More...
 
const Molecular_geometric_model & get_geometric_model (void) const
 Container of the loaded 3D spheres (const). More...
 
Molecular_geometric_model & get_geometric_model (void)
 Container of the loaded 3D spheres. More...
 
std::vector< Molecular_geometric_model > & get_molecular_systems (void)
 To match updated API of Molecular_system_loader. More...
 

Mandatory Requirements

boost::program_options::options_description add_options (void) override
 Virtual method for adding options to the module. More...
 
bool load (unsigned verbose, std::ostream &out) override
 Load function. 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...
 
std::string get_name (void) const override
 Return the name of the class itself. More...
 

Management

void set_loader_instance_name (const std::string &loader_instance_name)
 
const std::string & get_loader_instance_name (void) const
 

Detailed Description

template<class Sphere3, class Point3 = typename Sphere3::Point>
class SBL::Models::T_Spheres_3_file_loader< Sphere3, Point3 >


Loader for one or more txt files listing 3D spheres

It simply loads one or more files listing 3D spheres (1 sphere per line with the center coordinates and the radius) onto containers. Note that for compatibility with the CGAL library, even if the spheres are describes with their radius in the input file, the squared radius is stored in the objects of type Sphere3

Template Parameters
Sphere3Representation of a 3D sphere, that should be constructible from its center and its radius.
Point3Representation of the center of a 3D sphere, that should be constructible from its coordinates.

Member Function Documentation

◆ add_input_file_name()

void add_input_file_name ( const std::string &  file_name)
inlinestatic

Add manually the name of an input text file.

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

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

Checks that the input options' values are coherent.

Reimplemented from T_Module_option_description< Dummy >.

◆ get_geometric_model() [1/4]

T_Spheres_3_file_loader< Sphere3, Point3 >::Molecular_geometric_model & get_geometric_model ( unsigned  i)
inline

ith container of the loaded 3D spheres from the ith file.

Precondition
there are at least (i+1) loaded files.

◆ get_geometric_model() [2/4]

const T_Spheres_3_file_loader< Sphere3, Point3 >::Molecular_geometric_model & get_geometric_model ( unsigned  i) const
inline

ith container of the loaded 3D spheres from the ith file (const).

Precondition
there are at least (i+1) loaded files.

◆ get_geometric_model() [3/4]

T_Spheres_3_file_loader< Sphere3, Point3 >::Molecular_geometric_model & get_geometric_model ( void  )
inline

Container of the loaded 3D spheres.

Precondition
Only one text file name was given.

◆ get_geometric_model() [4/4]

const T_Spheres_3_file_loader< Sphere3, Point3 >::Molecular_geometric_model & get_geometric_model ( void  ) const
inline

Container of the loaded 3D spheres (const).

Precondition
Only one text file name was given.

◆ get_molecular_systems()

std::vector<Molecular_geometric_model>& get_molecular_systems ( void  )
inline

To match updated API of Molecular_system_loader.

◆ get_name()

std::string get_name ( void  ) const
inlineoverridevirtual

Return the name of the class itself.

Reimplemented from Loader_base.

◆ get_number_of_loaded_geometric_models()

unsigned get_number_of_loaded_geometric_models ( void  ) const
inline

Number of loaded files.

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

◆ load()

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

Reimplemented from Loader_base.