faunus
Public Member Functions | List of all members
Faunus::SASA::SASA Class Reference

derived class of SASABase which uses O(N^2) neighbour search More...

#include <sasa.h>

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

Public Member Functions

void init (const Space &spc) override
 resizes areas buffer to size of ParticleVector and fill radii buffer with radii More...
 
std::vector< SASABase::NeighbourscalcNeighbourData (const Space &spc, const std::vector< index_type > &target_indices) const override
 calculates neighbourData objects of particles specified by target indices in ParticleVector More...
 
SASA::Neighbours calcNeighbourDataOfParticle (const Space &spc, index_type target_index) const override
 calculates neighbourData object of a target particle specified by target indiex in ParticleVector More...
 
void update ([[maybe_unused]] const Space &spc, [[maybe_unused]] const Change &change) override
 updates radii vector in case of matter change More...
 
 SASA (const Space &spc, double probe_radius, int slices_per_atom)
 
 SASA (const json &j, const Space &spc)
 
- Public Member Functions inherited from Faunus::SASA::SASABase
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 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...
 

Additional Inherited Members

- Public Attributes inherited from Faunus::SASA::SASABase
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 inherited from Faunus::SASA::SASABase
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 inherited from Faunus::SASA::SASABase
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

derived class of SASABase which uses O(N^2) neighbour search

Constructor & Destructor Documentation

◆ SASA()

Faunus::SASA::SASA::SASA ( 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

◆ calcNeighbourData()

std::vector< SASA::Neighbours > Faunus::SASA::SASA::calcNeighbourData ( const Space spc,
const std::vector< index_type > &  target_indices 
) const
overridevirtual

calculates neighbourData objects of particles specified by target indices in ParticleVector

Parameters
space
target_indicesabsolute indicies of target particles in ParticleVector

Implements Faunus::SASA::SASABase.

◆ calcNeighbourDataOfParticle()

SASA::Neighbours Faunus::SASA::SASA::calcNeighbourDataOfParticle ( const Space spc,
index_type  target_index 
) const
overridevirtual

calculates neighbourData object of a target particle specified by target indiex in ParticleVector

using the naive O(N) neighbour search for a given target particle

Parameters
space
target_indexindicex of target particle in ParticleVector

Implements Faunus::SASA::SASABase.

◆ init()

void Faunus::SASA::SASA::init ( const Space spc)
overridevirtual

resizes areas buffer to size of ParticleVector and fill radii buffer with radii

Parameters
space

Implements Faunus::SASA::SASABase.

◆ update()

void Faunus::SASA::SASA::update ( [[maybe_unused] ] const Space spc,
[[maybe_unused] ] const Change change 
)
override

updates radii vector in case of matter change

Parameters
space
change

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