Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.

Authors: F. Cazals and T. Dreyfus
A molecular structure has two components:
When particles are represented by 3D balls, a natural way to model the shape of a molecule is the 3D weighted complex : it is a simplicial complex whose topology is exactly the one of the union of the particles.
This package provides wrappers for using the CGAL 3D complex data structures over a collection of particles.
This package was designed with a twofold aim:
In the following, we introduce the main classes, then the different functionality of the package Alpha_complex_of_molecular_model .
The main class is SBL::CSB::T_Alpha_complex_of_molecular_model< ParticleTraits, TAlphaComplexVertexBase , TAlphaComplexCellBase , TAlphaComplexBase > . It inherits from the template parameter TAlphaComplexBase and adds the functionality for inserting a particle whose type is provided by the concept ParticleTraits. The four template parameters are:
The type of the underlying triangulation is the class SBL::CSB::T_Triangulation_of_molecular_model< ParticleTraits, TAlphaComplexVertexBase , TAlphaComplexCellBase >, whose template parameters were already described.
Finally, types such as geometric and combinatorial primitives, and the base data structure of the 3D triangulation are automatically instantiated from the traits class SBL::CSB::T_Alpha_complex_of_molecular_model_traits< ParticleTraits, TAlphaComplexVertexBase , TAlphaComplexCellBase >, where the template parameters are the same as the class SBL::CSB::T_Triangulation_of_molecular_model.
Three examples are given for illustrating the different possibilities of use of the class SBL::CSB::T_Alpha_complex_of_molecular_model :
Vertices of the CGAL complex data structures are partially serialized from the package Alpha_complexes_extensions. In addition, the base class SBL::CSB::T_Particle_vertex_base, used for representing vertices in the complex with an attached particle, is serialized. In order to use the serialization of the vertices, one just has to include the file "SBL/IO/Alpha_complex_of_molecular_model_serialize.hpp" in its own source file.
Vertices, edges and faces of the complex of particles are drawable by including the file "SBL/IO/Alpha_complex_of_molecular_model_molecular_draw.hpp", as explained in the package Molecular_viewers. An example of use is shown on in section Drawing the Simplices
This package provides also the module SBL::CSB:T_Alpha_complex_of_molecular_model_module< ModuleTraits > that computes the complex of an input container of particles and computes statistics on the topology of the output complex. The parameter ModuleTraits just has to define the input container type (Particles_container) and the output complex type (Alpha_complex). An example of use is shown on in section Using the Module
In this example, atoms of a molecule are loaded from a PDB file, then annotated with default radii, and finally inserted in a complex data structure. The number of finite simplices is printed at the end of calculations.
This example presents the CGAL class CGAL::Alpha_shape_3 with the SBL class SBL::CSB:T_Alpha_complex_of_molecular_model for varying the parameter after constructing the complex. This example is very similar to the example of section A Simple Example, except for three steps:
This example shows how to compute the complex of a container of custom particle types. In particular, it adds a UnionFind structure to the particles and compute the number of connected component in the complex.
This example shows how to draw the simplices of an complex in a visualization state file for VMD. In particular, it uses the molecular viewer SBL::IO::VMD_viewer and does the following steps:
This example presents the module SBL::Modules::T_Alpha_complex_of_molecular_model_module with the particle type SBL::Models::T_Atom_with_hierarchical_info_and_annotations_traits.
First, the Module_traits class has to define the type Alpha_complex and the type Particles_container. In order to avoid any duplication of particles, the type Particles_container is defined as a wrapper of the class Molecular_system::Molecular_model that contains all the loaded atoms. Then, the complex module is parametrized by the Module_traits class.
Second, the particles are loaded and annotated, and the module is created and initialized with the input atoms.
Third, the module is run and statistics are printed.
This package also offers the following application(s):