Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_Space_filling_model_surface_volume_workflow< Traits, OutputArchive > Class Template Reference

Generic workflow of Space_filling_model_surface_volume for reading the command line options of the applications and running the calculations. More...

#include <Space_filling_model_surface_volume_workflow.hpp>

Public Types

typedef Traits::Particle_annotator Particle_annotator
 Loader of annotations for the input particles.
More...
 
typedef Traits::Molecular_geometry_loader Molecular_geometry_loader
 Loader for the input particles.
More...
 
typedef SBL::Modules::T_Alpha_complex_of_molecular_model_module< Traits > Alpha_complex_module
 Module building the alpha-complex of an input set of particles. Module building the alpha-complex of an input set of particles. More...
 
typedef SBL::Modules::T_Union_of_balls_boundary_3_module< Traits > Boundary_module
 Module building the boundary of the union of input 3D balls. Module building the boundary of the union of input 3D balls. More...
 
typedef SBL::Modules::T_Union_of_balls_mesh_3_module< Traits > Sampler_module
 Module building the boundary of the union of input 3D balls. Module building the boundary of the union of input 3D balls. More...
 
typedef SBL::Modules::T_Union_of_balls_surface_volume_3_module< Traits, OutputArchive > Surface_volume_module
 Module computing the surface area and the volume of the union of an input set of 3D balls. Module computing the surface area and the volume of the union of an input set of 3D balls. More...
 

Workflow

void start (int argc, char *argv[])
 Starts the workflow by reading the command line options, and pushing on the stack the start vertex. More...
 
Surface_volume_moduleget_volume_module (void)
 Access to the volume engine : More...
 
std::string get_output_prefix (void) const
 Access to the output prefix : More...
 

Detailed Description

template<class Traits, class OutputArchive = boost::archive::xml_oarchive>
class T_Space_filling_model_surface_volume_workflow< Traits, OutputArchive >

Generic workflow of Space_filling_model_surface_volume for reading the command line options of the applications and running the calculations.

This workflow instantiates one loader and four modules:

Template Parameters
TraitsTraits class defining the types used in the applications of Space_filling_model_surface_volume (see T_Space_filling_model_surface_volume_traits).
OutputArchiveArchive concept from the Boost library, allowing to switch between a full serialization of the output data with for example the class boost::archive::xml_oarchive, or a main serialization with the class SBL::IO::T_Multiple_archives_serialization_xml_oarchive.

Member Typedef Documentation

◆ Alpha_complex_module

Module building the alpha-complex of an input set of particles. Module building the alpha-complex of an input set of particles.

It is designed such that the input can be either a collection of 3D spheres representing the particles, or a collection of particles with the type derived from ParticleTraits, depending on the type of the output $\alpha$-complex:

  • Alpha_shape_3 or Fixed_alpha_shape_3 : the input is a collection of particles represented by weighted points (Weighted_point), that is a 3D point (the center of a particle represented as a 3D sphere) with an associated weight (the squared radius of the 3D sphere).

The input collection of particles can be set using the method T_Alpha_complex_of_molecular_model_module::get_particles, that return a reference over the container of particles. Note also that the 3D triangulation underlying the output $\alpha$-complex can be parametrized using the method T_Alpha_complex_of_molecular_model_module::get_triangulation. This is particularly useful when an additional radius has to be set to all the particles when using the class SBL::CSB::T_Alpha_complex_of_molecular_model, for example in the case of the Solvent Accessible Model,solvent accessible model.

Template Parameters
ModuleTraitsTraits class defining the types T_Alpha_complex_of_molecular_model_module::Alpha_complex and T_Alpha_complex_of_molecular_model_module::Particles_container.

◆ Boundary_module

Module building the boundary of the union of input 3D balls. Module building the boundary of the union of input 3D balls.

The boundary of the union of balls, which consists of spherical polygons bounded by circle arcs themselves bounded by points, is represented using the Halfedge Data Structure of the CGAL library: each spherical cap is represented by a face, each face being possibly bounded by one or more oriented edges called the halfedges. When two faces are adjacent, they share a common edge represented by two halfedges with opposite orientations.

The package Union_of_balls_boundary_3 provides the class SBL::GT::T_Union_of_balls_boundary_3_data_structure< WeightedAlphaComplex3 , bool IS_CCW , HalfedgeDSBase > for representing this halfedge data structure. The first template parameter is the representation of the $\alpha$-complex of the input data. The second parameter is a tag determining the orientation of all the half-edges around a face (by default, the face lies to the left of the bounding half-edges). Finally, the third parameter is the base class for the used halfedge data structure (a base minimal structure is given by default).

The input is the $\alpha$-complex of the input 3D balls and can be set with the method SBL::Modules::T_Union_of_balls_boundary_3_module::get_alpha_complex that returns a reference to a pointer over the input $\alpha$-complex.

The output boundary is accessible using the method SBL::Modules::T_Union_of_balls_boundary_3_module::get_boundary

Template Parameters
ModuleTraitsTraits class defining the types SBL::Modules::T_Union_of_balls_boundary_3_module::Union_of_balls_boundary_3.
ExactNTOptional parameter for the exact number type used with the filtered algebraic kernel (CGAL::Gmpq by default).

◆ Molecular_geometry_loader

typedef Traits::Molecular_geometry_loader Molecular_geometry_loader

Loader for the input particles.


◆ Particle_annotator

typedef Traits::Particle_annotator Particle_annotator

Loader of annotations for the input particles.


◆ Sampler_module

Module building the boundary of the union of input 3D balls. Module building the boundary of the union of input 3D balls.

The boundary of the union of balls, which consists of spherical polygons bounded by circle arcs themselves bounded by points, is represented using the Halfedge Data Structure of the CGAL library: each spherical cap is represented by a face, each face being possibly bounded by one or more oriented edges called the halfedges. When two faces are adjacent, they share a common edge represented by two halfedges with opposite orientations.

The package Union_of_balls_boundary_3 provides the class SBL::GT::T_Union_of_balls_boundary_3_data_structure< WeightedAlphaComplex3 , bool IS_CCW , HalfedgeDSBase > for representing this halfedge data structure. The first template parameter is the representation of the $\alpha$-complex of the input data. The second parameter is a tag determining the orientation of all the half-edges around a face (by default, the face lies to the left of the bounding half-edges). Finally, the third parameter is the base class for the used halfedge data structure (a base minimal structure is given by default).

The input is the $\alpha$-complex of the input 3D balls and can be set with the method SBL::Modules::T_Union_of_balls_boundary_3_module::get_alpha_complex that returns a reference to a pointer over the input $\alpha$-complex.

The output boundary is accessible using the method SBL::Modules::T_Union_of_balls_boundary_3_module::get_boundary

Template Parameters
ModuleTraitsTraits class defining the types SBL::Modules::T_Union_of_balls_boundary_3_module::Union_of_balls_boundary_3.
ExactNTOptional parameter for the exact number type used with the filtered algebraic kernel (CGAL::Gmpq by default).

◆ Surface_volume_module

Module computing the surface area and the volume of the union of an input set of 3D balls. Module computing the surface area and the volume of the union of an input set of 3D balls.

It computes the volumes and surface areas from the boundary data structure SBL::GT::T_Union_of_balls_boundary_3_data_structure, itself constructed from the $\alpha$-complex of an input set of 3D balls..

Remind that the restriction $R$ of a ball to its Voronoi region is the intersection of this ball to its Voronoi region.

Two computations are required for determining the volume of a restriction $R$:

  • computing the volume of a pyramid whose base is a spherical cap, and whose apex is the center of the ball of $R$,
  • computing the volume of a pyramid whose base is the restriction of a Voronoi face bounding $R$, and whose apex is the center of the ball of $R$.

Adding up the volumes of all pyramids partitioning $R$ yields the volume of $R$. Note that the computation of the volume of pyramids whose base is a spherical cap requires computing the surface area of this cap. In particular, the sum of all surface areas from a restriction defines the surface area of this restriction.

The package Union_of_balls_surface_volume_3 provides the class SBL::GT::T_Union_of_balls_surface_volume_3< AlphaComplex3 , SphericalKernel3 , UnionOfBallsBoundary3 > computing the volume of all the restrictions of an input set of balls. The first parameter is a model of the $\alpha$-complex of the input balls. Note that the number type used for representing the input data is derived from AlphaComplex3 . The second parameter is a kernel used to define objects and constructions related the computation over a sphere. It defines also the number type used for representing the intersection points between the spheres. The last template parameter is a representation of the boundary of the union of balls.

The input can be either:

The output is a structure having two public attributes:

  • exact : it is a pointer over a "as most as possible" exact calculation of the surfaces' areas and volumes.
  • inexact: it is a pointer over a more approximated, but faster calculation of the surfaces' areas and volumes.

Only one of these two computations is done when running the module, the other attribute being set to the NULL pointer. This structure is accessible with the method SBL::Modules::T_Union_of_balls_surface_volume_3_module::get_surface_volume

Template Parameters
ModuleTraitsTraits class defining the type SBL::Modules::T_Union_of_balls_surface_volume_3_module::Alpha_complex.
OutputArchiveArchive concept from the Boost library, allowing to switch between a full serialization of the output data with for example the class boost::archive::xml_oarchive, or a multiple archives serialization with the class SBL::IO::T_Multiple_archives_serialization_xml_oarchive.

Member Function Documentation

◆ get_output_prefix()

std::string get_output_prefix ( void  ) const
inline

Access to the output prefix :

◆ get_volume_module()

T_Space_filling_model_surface_volume_workflow< Traits, OutputArchive >::Surface_volume_module & get_volume_module ( void  )
inline

Access to the volume engine :

◆ start()

void start ( int  argc,
char *  argv[] 
)
inline

Starts the workflow by reading the command line options, and pushing on the stack the start vertex.