Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_PDB_file_loader< ESBTLMolecularSystem, PDBLineFormat > Class Template Reference

Loader for one or more PDB files, even listed in a file. Loader for one or more PDB files, even listed in a file. More...

#include "PDB_file_loader.hpp"

Public Types

typedef T_PDB_file_loader< ESBTLMolecularSystem, PDBLineFormat > Self
 
typedef SBL::IO::Loader_base Base
 
typedef ESBTLMolecularSystem ESBTL_molecular_system
 

Static Public Member Functions

static boost::program_options::options_description *& get_options (void)
 Access to the options' description of the module. More...
 
static bool has_options (void)
 
static void delete_options (void)
 
static void initialize_options (const std::string &caption)
 

Other Types

typedef ESBTL_molecular_system::Model Molecular_geometric_model
 

Accessors

static const std::string & get_input_file_name (void)
 Name of the input PDB file. More...
 
static const std::string & get_input_file_name (unsigned i)
 Name of the ith input PDB file. More...
 
static void add_input_file_name (const std::string &file_name)
 Add manually the name of an input PDB file. More...
 
static unsigned get_model_number (void)
 Number of the model used in the PDB files. More...
 
static bool is_loaded_water (void)
 Checks that water molecules are loaded. More...
 
static bool is_loaded_hydrogen (void)
 Checks that hydrogen are loaded. More...
 
static std::string get_loaded_chains (void)
 Loaded chains (if only one or none were given) More...
 
static std::string get_loaded_chains (unsigned i)
 Loaded chains (if as many as loaded PDB files) More...
 
unsigned get_number_of_loaded_geometric_models (void) const
 Number of loaded PDB files. More...
 
unsigned get_number_of_models_in_loaded_PDB (unsigned i) const
 Number of models in the ith PDB file. More...
 
const Molecular_geometric_modelget_geometric_model (unsigned i, unsigned n) const
 
Molecular_geometric_modelget_geometric_model (unsigned i, unsigned n)
 
const Molecular_geometric_modelget_geometric_model (unsigned i) const
 
Molecular_geometric_modelget_geometric_model (unsigned i)
 
const Molecular_geometric_modelget_geometric_model (void) const
 
Molecular_geometric_modelget_geometric_model (void)
 

Modifiers

static void set_occupancy_factor (unsigned i)
 Set the occupancy factor for all input PDB. More...
 
static void set_loaded_chains (const std::string &chains)
 Set the loaded chains (if only one or none were given) More...
 
static void set_loaded_chains (unsigned i, const std::string &chains)
 Set the loaded chains (if as many as loaded PDB files) More...
 
static void set_loaded_water (bool b)
 Checks that water molecules are loaded. More...
 
static void set_loaded_hetatoms (bool b)
 Checks that water molecules are loaded. More...
 

Mandatory Requirements

boost::program_options::options_description add_options (void) const
 Virtual method for adding options to the module. More...
 
bool load (unsigned verbose, std::ostream &out)
 Loads the data. More...
 
bool check_options (std::string &message) const
 Checks that the input options' values are coherent. More...
 
std::string get_output_prefix (void) const
 Returns a prefix that concatains the input line options used when running the module. More...
 
std::string get_name (void) const
 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 ESBTLMolecularSystem = ESBTL::Molecular_system<ESBTL::Default_system_items, ESBTL::CGAL::EPIC_kernel_with_atom::Point_3>, class PDBLineFormat = ESBTL::PDB::Line_format<>>
class SBL::Models::T_PDB_file_loader< ESBTLMolecularSystem, PDBLineFormat >

Loader for one or more PDB files, even listed in a file. Loader for one or more PDB files, even listed in a file.

The different options are:

  • Load of one, n or a list of PDB files,
  • Possibility to discard or not the hydrogen atoms (discarded by default) are discarded,
  • Possibility to select atoms following their occupancy factor. By default, the atoms are loaded regardless their occupancy factor.
  • In case of alternates, the first occurrence is the one selected.
  • if several models of the structure coexist, which one do we consider. Important Note about hetero atoms: When dealing with hetero atoms, these ones may be associated to a chain. If the chain is associated to a partner, these hetero atoms will be also associated to this partner.
  • For PDB models, all occupancy factors to be equal to 1. If not and for a more elaborate processing, the user should retrieve the binary program, learn about the strategies offered in case of factors < 1, and proceed accordingly.
  • In case of alternates, the first occurrence is the one selected.
Template Parameters
ESBTLMolecularSystemRepresentation of a molecular system in ESBTL (default is ESBTL::Default_system)
PDBLineFormatFormat of a line in a PDB file, determining wether a field of a line is mandatory or not (default is ESBTL::PDB::Line_format<>)

Member Typedef Documentation

◆ Base

◆ ESBTL_molecular_system

typedef ESBTLMolecularSystem ESBTL_molecular_system

◆ Molecular_geometric_model

typedef ESBTL_molecular_system::Model Molecular_geometric_model

◆ Self

typedef T_PDB_file_loader<ESBTLMolecularSystem, PDBLineFormat> Self

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

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

◆ check_options()

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

Checks that the input options' values are coherent.

Reimplemented from T_Module_option_description< Dummy >.

◆ delete_options()

static void delete_options ( void  )
inlinestaticinherited

◆ get_geometric_model() [1/6]

T_PDB_file_loader< ESBTLMolecularSystem, PDBLineFormat >::Molecular_geometric_model & get_geometric_model ( unsigned  i)
inline

ith ESBTL system corresponding to the ith loaded PDB file.

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

◆ get_geometric_model() [2/6]

const T_PDB_file_loader< ESBTLMolecularSystem, PDBLineFormat >::Molecular_geometric_model & get_geometric_model ( unsigned  i) const
inline

ith ESBTL system corresponding to the ith loaded PDB file (const).

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

◆ get_geometric_model() [3/6]

T_PDB_file_loader< ESBTLMolecularSystem, PDBLineFormat >::Molecular_geometric_model & get_geometric_model ( unsigned  i,
unsigned  n 
)
inline

n-th ESBTL molecular model from the ith ESBTL system corresponding to the ith loaded PDB file (const).

Precondition
there are at least (i+1) loaded PDB files.
there are at least n models in the i-th loaded PDB file.

◆ get_geometric_model() [4/6]

const T_PDB_file_loader< ESBTLMolecularSystem, PDBLineFormat >::Molecular_geometric_model & get_geometric_model ( unsigned  i,
unsigned  n 
) const
inline

n-th ESBTL molecular model from the ith ESBTL system corresponding to the ith loaded PDB file (const).

Precondition
there are at least (i+1) loaded PDB files.
there are at least n models in the i-th loaded PDB file.

◆ get_geometric_model() [5/6]

T_PDB_file_loader< ESBTLMolecularSystem, PDBLineFormat >::Molecular_geometric_model & get_geometric_model ( void  )
inline

ESBTL system containing the atoms of the loaded PDB file.

Precondition
Only one PDB file name was given.

◆ get_geometric_model() [6/6]

const T_PDB_file_loader< ESBTLMolecularSystem, PDBLineFormat >::Molecular_geometric_model & get_geometric_model ( void  ) const
inline

ESBTL system containing the atoms of the loaded PDB file (const).

Precondition
Only one PDB file name was given.

◆ get_input_file_name() [1/2]

const std::string & get_input_file_name ( unsigned  i)
inlinestatic

Name of the ith input PDB file.

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

◆ get_input_file_name() [2/2]

const std::string & get_input_file_name ( void  )
inlinestatic

Name of the input PDB file.

Precondition
Only one PDB file name was given.

◆ get_loaded_chains() [1/2]

std::string get_loaded_chains ( unsigned  i)
inlinestatic

Loaded chains (if as many as loaded PDB files)

◆ get_loaded_chains() [2/2]

std::string get_loaded_chains ( void  )
inlinestatic

Loaded chains (if only one or none were given)

◆ get_loader_instance_name()

const std::string& get_loader_instance_name ( void  ) const
inlineinherited

◆ get_model_number()

unsigned get_model_number ( void  )
inlinestatic

Number of the model used in the PDB files.

◆ get_name()

std::string get_name ( void  ) const
inlinevirtual

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

◆ get_number_of_models_in_loaded_PDB()

unsigned get_number_of_models_in_loaded_PDB ( unsigned  i) const
inline

Number of models in the ith PDB file.

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

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

Reimplemented from T_Module_option_description< Dummy >.

◆ has_options()

static bool has_options ( void  )
inlinestaticinherited

◆ initialize_options()

static void initialize_options ( const std::string &  caption)
inlinestaticinherited

◆ is_loaded_hydrogen()

bool is_loaded_hydrogen ( void  )
inlinestatic

Checks that hydrogen are loaded.

◆ is_loaded_water()

bool is_loaded_water ( void  )
inlinestatic

Checks that water molecules are loaded.

◆ load()

bool load ( unsigned  verbose,
std::ostream &  out 
)
inlinevirtual

Loads the data.

Reimplemented from Loader_base.

◆ set_loaded_chains() [1/2]

void set_loaded_chains ( const std::string &  chains)
inlinestatic

Set the loaded chains (if only one or none were given)

◆ set_loaded_chains() [2/2]

void set_loaded_chains ( unsigned  i,
const std::string &  chains 
)
inlinestatic

Set the loaded chains (if as many as loaded PDB files)

◆ set_loaded_hetatoms()

void set_loaded_hetatoms ( bool  b)
inlinestatic

Checks that water molecules are loaded.

◆ set_loaded_water()

void set_loaded_water ( bool  b)
inlinestatic

Checks that water molecules are loaded.

◆ set_loader_instance_name()

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

◆ set_occupancy_factor()

void set_occupancy_factor ( unsigned  i)
inlinestatic

Set the occupancy factor for all input PDB.