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

Optimized representation of the covalent structure of a molecular conformation. More...

#include <Molecular_covalent_structure_optimal.hpp>

Classes

struct  Bond_angle_rep
 
struct  Bond_rep
 
struct  Torsion_angle_rep
 

Public Types

enum  Bond_type { SIMPLE_BOND = 1 , DOUBLE_BOND = 2 , TRIPLE_BOND = 3 }
 
typedef T_Molecular_covalent_structure_optimal< ParticleInfo > Self
 
typedef T_Particle_info_traits< ParticleInfo > Particle_info_traits
 
typedef Particle_info_traits::Particle_info Particle_info
 
typedef Particle_info_traits::Less Particle_info_less
 
typedef unsigned int Particle_rep
 
typedef std::map< Particle_info, Particle_rep, Particle_info_lessInfo_map
 
typedef boost::iterators::counting_iterator< int > Particles_iterator
 
typedef std::vector< Bond_rep >::const_iterator Bonds_iterator
 
typedef std::vector< Bond_angle_rep >::const_iterator Bond_angles_iterator
 
typedef std::vector< Torsion_angle_rep >::const_iterator Dihedral_angles_iterator
 
typedef std::vector< Torsion_angle_rep >::const_iterator Improper_angles_iterator
 
typedef std::list< Bond_rep >::const_iterator Incident_bonds_iterator
 

Accessors

std::vector< Particle_info > & get_particles ()
 
unsigned get_non_bonded_parameters_index (Particle_rep p) const
 
void set_non_bonded_parameters_index (Particle_rep p, unsigned i)
 
std::vector< Bond_rep > & get_bonds ()
 
std::vector< std::list< Bond_rep > > & get_incident_bonds ()
 
std::vector< Bond_angle_rep > & get_bond_angles ()
 
std::vector< Torsion_angle_rep > & get_proper_angles ()
 
std::vector< Torsion_angle_rep > & get_improper_angles ()
 
std::unordered_map< std::size_t, Bond_rep > & get_particles_to_bond_map ()
 
std::unordered_map< std::size_t, Bond_angle_rep > & get_bonds_to_bond_angle_map ()
 
std::unordered_map< std::size_t, Torsion_angle_rep > & get_bonds_to_proper_angle_map ()
 
std::unordered_map< std::size_t, Torsion_angle_rep > & get_bonds_to_improper_angle_map ()
 
Info_mapget_info_map ()
 
std::vector< unsigned > & get_molecules_vec (void)
 
template<class OutputIterator >
OutputIterator get_molecules (OutputIterator out)
 
std::vector< unsigned > & get_molecule_vec (void)
 
template<class OutputIterator >
OutputIterator get_particles_in_molecule (std::size_t p, OutputIterator out)
 
std::vector< bool > & get_are_12 ()
 
std::vector< bool > & get_are_13 ()
 
std::vector< bool > & get_are_14 ()
 
bool are_1_4 (const Particle_rep &p, const Particle_rep &q) const
 
bool are_1_3 (const Particle_rep &p, const Particle_rep &q) const
 
bool are_1_2 (const Particle_rep &p, const Particle_rep &q) const
 
unsigned get_number_of_particles (void) const
 
unsigned get_number_of_modeled_particles (void) const
 
unsigned get_number_of_embedded_particles (void) const
 
bool is_fully_embedded (void) const
 
unsigned get_number_of_bonds (void) const
 
unsigned get_number_of_modeled_bonds (void) const
 
unsigned get_number_of_embedded_bonds (void) const
 
Particle_info get_particle_info (Particle_rep p) const
 
std::pair< Particle_rep, Particle_repget_particles (Bond_rep b) const
 
Bond_rep get_bond (Bond_angle_rep b, unsigned i) const
 
Bond_rep get_bond (Torsion_angle_rep b, unsigned i) const
 
Particle_rep get_particle_rep (Bond_rep b, unsigned i) const
 
Particle_rep get_particle_rep (Bond_angle_rep b, unsigned i) const
 
Particle_rep get_particle_rep (Torsion_angle_rep b, unsigned i) const
 
std::pair< bool, Bond_repget_bond_rep (Particle_rep p, Particle_rep q) const
 
Bond_rep get_mirror_bond_rep (Bond_rep u) const
 
std::pair< bool, Bond_angle_repget_bond_angle_rep (Bond_rep b_1, Bond_rep b_2) const
 
std::pair< bool, Torsion_angle_repget_torsion_angle_rep (Bond_rep b_1, Bond_rep b_2, Bond_rep b_3) const
 
std::pair< bool, Particle_repfind_particle (const Particle_info &info) const
 
int get_model_position (Particle_rep p) const
 
template<class Conformation >
SBL::Models::T_Conformation_traits< Conformation >::FT get_x (const Conformation &C, Particle_rep p) const
 
template<class Conformation >
SBL::Models::T_Conformation_traits< Conformation >::FT get_y (const Conformation &C, Particle_rep p) const
 
template<class Conformation >
SBL::Models::T_Conformation_traits< Conformation >::FT get_z (const Conformation &C, Particle_rep p) const
 

Traversal

Particles_iterator particles_begin (bool is_embedded=true) const
 
Particles_iterator particles_end (bool is_embedded=true) const
 
Bonds_iterator bonds_begin (bool is_embedded=true) const
 
Bonds_iterator bonds_end (bool is_embedded=true) const
 
Incident_bonds_iterator incident_bonds_begin (Particle_rep p, bool is_embedded=true) const
 
Incident_bonds_iterator incident_bonds_end (Particle_rep p, bool is_embedded=true) const
 
Bond_angles_iterator bond_angles_begin (bool is_embedded=true) const
 Iterate over the bond angles (u, v, w) so that u and v are the largest indices lower than w such that (u, v) and (v, w) are bonds. More...
 
Bond_angles_iterator bond_angles_end (bool is_embedded=true) const
 Iterate over the bond angles (u, v, w) so that u and v are the largest indices lower than w such that (u, v) and (v, w) are bonds. More...
 
Dihedral_angles_iterator dihedral_angles_begin (bool is_embedded=true) const
 Iterate over the torsion angles (u, v, w, t) so that u, v and w are the largest indices lower than t such that (u, v), (v, w) and (w, t) are bonds. More...
 
Dihedral_angles_iterator dihedral_angles_end (bool is_embedded=true) const
 Iterate over the torsion angles (u, v, w, t) so that u, v and w are the largest indices lower than t such that (u, v), (v, w) and (w, t) are bonds. More...
 
Improper_angles_iterator improper_angles_begin (bool is_embedded=true) const
 Iterate over the torsion angles (u, v, w, t) so that (u, v), (u, w) and (u, t) are bonds. More...
 
Improper_angles_iterator improper_angles_end (bool is_embedded=true) const
 Iterate over the torsion angles (u, v, w, t) so that (u, v), (u, w) and (u, t) are bonds. More...
 

Detailed Description

template<class ParticleInfo = std::string>
class SBL::CSB::T_Molecular_covalent_structure_optimal< ParticleInfo >

Optimized representation of the covalent structure of a molecular conformation.

ASK Augustin

Template Parameters
ParticleInfoInformation to attached to the particle (default is a simple string). It should be comparable (less operator) and streamable.

Member Typedef Documentation

◆ Bond_angles_iterator

typedef std::vector<Bond_angle_rep>::const_iterator Bond_angles_iterator

◆ Bonds_iterator

typedef std::vector<Bond_rep>::const_iterator Bonds_iterator

◆ Dihedral_angles_iterator

typedef std::vector<Torsion_angle_rep>::const_iterator Dihedral_angles_iterator

◆ Improper_angles_iterator

typedef std::vector<Torsion_angle_rep>::const_iterator Improper_angles_iterator

◆ Incident_bonds_iterator

typedef std::list<Bond_rep>::const_iterator Incident_bonds_iterator

◆ Info_map

◆ Particle_info

typedef Particle_info_traits::Particle_info Particle_info

◆ Particle_info_less

typedef Particle_info_traits::Less Particle_info_less

◆ Particle_info_traits

◆ Particle_rep

typedef unsigned int Particle_rep

◆ Particles_iterator

typedef boost::iterators::counting_iterator<int> Particles_iterator

◆ Self

Member Enumeration Documentation

◆ Bond_type

enum Bond_type
Enumerator
SIMPLE_BOND 
DOUBLE_BOND 
TRIPLE_BOND 

Member Function Documentation

◆ are_1_2()

bool are_1_2 ( const Particle_rep p,
const Particle_rep q 
) const
inline

◆ are_1_3()

bool are_1_3 ( const Particle_rep p,
const Particle_rep q 
) const
inline

◆ are_1_4()

bool are_1_4 ( const Particle_rep p,
const Particle_rep q 
) const
inline

◆ bond_angles_begin()

T_Molecular_covalent_structure_optimal< ParticleInfo >::Bond_angles_iterator bond_angles_begin ( bool  is_embedded = true) const
inline

Iterate over the bond angles (u, v, w) so that u and v are the largest indices lower than w such that (u, v) and (v, w) are bonds.

◆ bond_angles_end()

T_Molecular_covalent_structure_optimal< ParticleInfo >::Bond_angles_iterator bond_angles_end ( bool  is_embedded = true) const
inline

Iterate over the bond angles (u, v, w) so that u and v are the largest indices lower than w such that (u, v) and (v, w) are bonds.

◆ bonds_begin()

T_Molecular_covalent_structure_optimal< ParticleInfo >::Bonds_iterator bonds_begin ( bool  is_embedded = true) const
inline

◆ bonds_end()

T_Molecular_covalent_structure_optimal< ParticleInfo >::Bonds_iterator bonds_end ( bool  is_embedded = true) const
inline

◆ dihedral_angles_begin()

T_Molecular_covalent_structure_optimal< ParticleInfo >::Dihedral_angles_iterator dihedral_angles_begin ( bool  is_embedded = true) const
inline

Iterate over the torsion angles (u, v, w, t) so that u, v and w are the largest indices lower than t such that (u, v), (v, w) and (w, t) are bonds.

◆ dihedral_angles_end()

T_Molecular_covalent_structure_optimal< ParticleInfo >::Dihedral_angles_iterator dihedral_angles_end ( bool  is_embedded = true) const
inline

Iterate over the torsion angles (u, v, w, t) so that u, v and w are the largest indices lower than t such that (u, v), (v, w) and (w, t) are bonds.

◆ find_particle()

std::pair< bool, typename T_Molecular_covalent_structure_optimal< ParticleInfo >::Particle_rep > find_particle ( const Particle_info info) const
inline

◆ get_are_12()

std::vector<bool>& get_are_12 ( )
inline

◆ get_are_13()

std::vector<bool>& get_are_13 ( )
inline

◆ get_are_14()

std::vector<bool>& get_are_14 ( )
inline

◆ get_bond() [1/2]

T_Molecular_covalent_structure_optimal< ParticleInfo >::Bond_rep get_bond ( Bond_angle_rep  b,
unsigned  i 
) const

◆ get_bond() [2/2]

T_Molecular_covalent_structure_optimal< ParticleInfo >::Bond_rep get_bond ( Torsion_angle_rep  b,
unsigned  i 
) const

◆ get_bond_angle_rep()

std::pair< bool, typename T_Molecular_covalent_structure_optimal< ParticleInfo >::Bond_angle_rep > get_bond_angle_rep ( Bond_rep  b_1,
Bond_rep  b_2 
) const
inline

◆ get_bond_angles()

std::vector<Bond_angle_rep>& get_bond_angles ( )
inline

◆ get_bond_rep()

std::pair< bool, typename T_Molecular_covalent_structure_optimal< ParticleInfo >::Bond_rep > get_bond_rep ( Particle_rep  p,
Particle_rep  q 
) const
inline

◆ get_bonds()

std::vector<Bond_rep>& get_bonds ( )
inline

◆ get_bonds_to_bond_angle_map()

std::unordered_map<std::size_t, Bond_angle_rep>& get_bonds_to_bond_angle_map ( )
inline

◆ get_bonds_to_improper_angle_map()

std::unordered_map<std::size_t, Torsion_angle_rep>& get_bonds_to_improper_angle_map ( )
inline

◆ get_bonds_to_proper_angle_map()

std::unordered_map<std::size_t, Torsion_angle_rep>& get_bonds_to_proper_angle_map ( )
inline

◆ get_improper_angles()

std::vector<Torsion_angle_rep>& get_improper_angles ( )
inline

◆ get_incident_bonds()

std::vector<std::list<Bond_rep> >& get_incident_bonds ( )
inline

◆ get_info_map()

Info_map& get_info_map ( )
inline

◆ get_mirror_bond_rep()

T_Molecular_covalent_structure_optimal< ParticleInfo >::Bond_rep get_mirror_bond_rep ( Bond_rep  u) const
inline

◆ get_model_position()

int get_model_position ( Particle_rep  p) const
inline

◆ get_molecule_vec()

std::vector<unsigned>& get_molecule_vec ( void  )
inline

◆ get_molecules()

OutputIterator get_molecules ( OutputIterator  out)
inline

◆ get_molecules_vec()

std::vector<unsigned>& get_molecules_vec ( void  )
inline

◆ get_non_bonded_parameters_index()

unsigned get_non_bonded_parameters_index ( Particle_rep  p) const
inline

◆ get_number_of_bonds()

unsigned get_number_of_bonds ( void  ) const
inline

◆ get_number_of_embedded_bonds()

unsigned get_number_of_embedded_bonds ( void  ) const
inline

◆ get_number_of_embedded_particles()

unsigned get_number_of_embedded_particles ( void  ) const
inline

◆ get_number_of_modeled_bonds()

unsigned get_number_of_modeled_bonds ( void  ) const
inline

◆ get_number_of_modeled_particles()

unsigned get_number_of_modeled_particles ( void  ) const
inline

◆ get_number_of_particles()

unsigned get_number_of_particles ( void  ) const
inline

◆ get_particle_info()

Particle_info get_particle_info ( Particle_rep  p) const
inline

◆ get_particle_rep() [1/3]

T_Molecular_covalent_structure_optimal< ParticleInfo >::Particle_rep get_particle_rep ( Bond_angle_rep  b,
unsigned  i 
) const
inline

◆ get_particle_rep() [2/3]

T_Molecular_covalent_structure_optimal< ParticleInfo >::Particle_rep get_particle_rep ( Bond_rep  b,
unsigned  i 
) const
inline

◆ get_particle_rep() [3/3]

T_Molecular_covalent_structure_optimal< ParticleInfo >::Particle_rep get_particle_rep ( Torsion_angle_rep  b,
unsigned  i 
) const
inline

◆ get_particles() [1/2]

std::vector<Particle_info>& get_particles ( )
inline

◆ get_particles() [2/2]

std::pair< typename T_Molecular_covalent_structure_optimal< ParticleInfo >::Particle_rep, typename T_Molecular_covalent_structure_optimal< ParticleInfo >::Particle_rep > get_particles ( Bond_rep  b) const
inline

◆ get_particles_in_molecule()

OutputIterator get_particles_in_molecule ( std::size_t  p,
OutputIterator  out 
)
inline

◆ get_particles_to_bond_map()

std::unordered_map<std::size_t, Bond_rep>& get_particles_to_bond_map ( )
inline

◆ get_proper_angles()

std::vector<Torsion_angle_rep>& get_proper_angles ( )
inline

◆ get_torsion_angle_rep()

std::pair< bool, typename T_Molecular_covalent_structure_optimal< ParticleInfo >::Torsion_angle_rep > get_torsion_angle_rep ( Bond_rep  b_1,
Bond_rep  b_2,
Bond_rep  b_3 
) const
inline

◆ get_x()

SBL::Models::T_Conformation_traits< Conformation >::FT get_x ( const Conformation C,
Particle_rep  p 
) const
inline

◆ get_y()

SBL::Models::T_Conformation_traits< Conformation >::FT get_y ( const Conformation C,
Particle_rep  p 
) const
inline

◆ get_z()

SBL::Models::T_Conformation_traits< Conformation >::FT get_z ( const Conformation C,
Particle_rep  p 
) const
inline

◆ improper_angles_begin()

T_Molecular_covalent_structure_optimal< ParticleInfo >::Improper_angles_iterator improper_angles_begin ( bool  is_embedded = true) const
inline

Iterate over the torsion angles (u, v, w, t) so that (u, v), (u, w) and (u, t) are bonds.

◆ improper_angles_end()

T_Molecular_covalent_structure_optimal< ParticleInfo >::Improper_angles_iterator improper_angles_end ( bool  is_embedded = true) const
inline

Iterate over the torsion angles (u, v, w, t) so that (u, v), (u, w) and (u, t) are bonds.

◆ incident_bonds_begin()

T_Molecular_covalent_structure_optimal< ParticleInfo >::Incident_bonds_iterator incident_bonds_begin ( Particle_rep  p,
bool  is_embedded = true 
) const
inline

◆ incident_bonds_end()

T_Molecular_covalent_structure_optimal< ParticleInfo >::Incident_bonds_iterator incident_bonds_end ( Particle_rep  p,
bool  is_embedded = true 
) const
inline

◆ is_fully_embedded()

bool is_fully_embedded ( void  ) const
inline

◆ particles_begin()

T_Molecular_covalent_structure_optimal< ParticleInfo >::Particles_iterator particles_begin ( bool  is_embedded = true) const
inline

◆ particles_end()

T_Molecular_covalent_structure_optimal< ParticleInfo >::Particles_iterator particles_end ( bool  is_embedded = true) const
inline

◆ set_non_bonded_parameters_index()

void set_non_bonded_parameters_index ( Particle_rep  p,
unsigned  i 
)
inline