faunus
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Faunus::SASA::SASABase Class Referenceabstract

base class for calculating solvent accessible surface areas of target particles derived classes implement specific neighbour search algorithms More...

#include <sasa.h>

Inheritance diagram for Faunus::SASA::SASABase:
Inheritance graph
[legend]
Collaboration diagram for Faunus::SASA::SASABase:
Collaboration graph
[legend]

Classes

struct  Neighbours
 

Public Member Functions

double calcSASAOfParticle (const Space &spc, const Particle &particle) const
 
template<typename TBegin , typename TEnd >
double calcSASA (const Space &spc, TBegin begin, TEnd end) const
 calculates total sasa of either particles or groups between given iterators More...
 
template<typename TSpecies >
double calcSASAOf (const Space &spc, const TSpecies &species) const
 
void updateSASA (const std::vector< SASABase::Neighbours > &neighbours_data, const std::vector< index_type > &target_indices)
 updates sasa of target particles More...
 
virtual void init (const Space &spc)=0
 
virtual std::vector< SASABase::NeighbourscalcNeighbourData (const Space &spc, const std::vector< index_type > &target_indices) const =0
 
virtual SASABase::Neighbours calcNeighbourDataOfParticle (const Space &spc, index_type target_index) const =0
 
virtual void update (const Space &spc, const Change &change)=0
 
const std::vector< double > & getAreas () const
 
 SASABase (const Space &spc, double probe_radius, int slices_per_atom)
 
template<>
double calcSASAOf (const Space &spc, const Group &group) const
 calculates total sasa of a group More...
 
template<>
double calcSASAOf (const Space &spc, const Particle &particle) const
 calculates total sasa of a particle More...
 

Public Attributes

bool needs_syncing = false
 flag indicating if syncing of cell_lists is needed this is important in case there is a particle insertion which is rejected due to containerOverlap, because the sasa->update is not called
 

Protected Member Functions

index_type indexOf (const Particle &particle) const
 first particle in ParticleVector More...
 
double calcSASAOfParticle (const Neighbours &neighbour) const
 Calcuates SASA of a single particle defined by NeighbourData object. More...
 
double exposedArcLength (std::vector< std::pair< double, double >> &arcs) const
 Calcuates total arc length in radians of overlapping arcs defined by two angles. More...
 

Protected Attributes

double probe_radius = 1.4
 radius of the probe sphere
 
std::vector< double > areas
 vector holding SASA area of each atom
 
std::vector< double > sasa_radii
 Radii buffer for all particles.
 
int slices_per_atom = 20
 number of slices of each sphere in SASA calculation
 
const double two_pi = 2.0 * std::numbers::pi
 
const Particlefirst_particle
 

Detailed Description

base class for calculating solvent accessible surface areas of target particles derived classes implement specific neighbour search algorithms

Constructor & Destructor Documentation

◆ SASABase()

Faunus::SASA::SASABase::SASABase ( const Space spc,
double  probe_radius,
int  slices_per_atom 
)
Parameters
spc
probe_radiusin angstrom
slices_per_atomnumber of slices of each sphere in sasa calculations

Member Function Documentation

◆ calcSASA()

template<typename TBegin , typename TEnd >
double Faunus::SASA::SASABase::calcSASA ( const Space spc,
TBegin  begin,
TEnd  end 
) const
inline

calculates total sasa of either particles or groups between given iterators

Parameters
spc
beginiterator to either a first particle or group in a range
enditerator to either end of particle or group in a range
Template Parameters
TBegin
TEnd

◆ calcSASAOf() [1/2]

template<>
double Faunus::SASA::SASABase::calcSASAOf ( const Space spc,
const Group group 
) const

calculates total sasa of a group

Parameters
spc
Group
Returns
total sasa of a given group

◆ calcSASAOf() [2/2]

template<>
double Faunus::SASA::SASABase::calcSASAOf ( const Space spc,
const Particle particle 
) const

calculates total sasa of a particle

Parameters
spc
Particle
Returns
total sasa of a given particle

◆ calcSASAOfParticle()

double Faunus::SASA::SASABase::calcSASAOfParticle ( const Neighbours neighbour) const
protected

Calcuates SASA of a single particle defined by NeighbourData object.

cuts a sphere in z-direction, for each slice, radius of circle_i in the corresponding z-plane is calculated then for each neighbour, calculate the overlaping part of circle_i with neighbouring circle_j and add these arcs into vector, finally from this vector, calculate the exposed part of circle_i

Parameters
neighbourNeighbourData object of given particle

◆ exposedArcLength()

double Faunus::SASA::SASABase::exposedArcLength ( std::vector< std::pair< double, double >> &  arcs) const
protected

Calcuates total arc length in radians of overlapping arcs defined by two angles.

Parameters
vectorof arcs, defined by a pair (first angle, second angle)

◆ indexOf()

index_type Faunus::SASA::SASABase::indexOf ( const Particle particle) const
inlineprotected

first particle in ParticleVector

returns absolute index of particle in ParticleVector

Parameters
particle

◆ updateSASA()

void Faunus::SASA::SASABase::updateSASA ( const std::vector< SASABase::Neighbours > &  neighbours_data,
const std::vector< index_type > &  target_indices 
)

updates sasa of target particles

Parameters
neighboursarray of NeighbourData objects
target_indicesabsolute indicies of target particles in ParticleVector

The documentation for this class was generated from the following files: