faunus
Public Member Functions | List of all members
Faunus::SASA::SASACellList< CellList > Class Template Reference

derived class of SASABase which uses cell lists for neighbour search currently can be used only for geometries with either 3 or 0 periodic boundaries More...

#include <sasa.h>

Inheritance diagram for Faunus::SASA::SASACellList< CellList >:
Inheritance graph
[legend]
Collaboration diagram for Faunus::SASA::SASACellList< CellList >:
Collaboration graph
[legend]

Public Member Functions

 SASACellList (const Space &spc, double probe_radius, int slices_per_atom)
 
 SASACellList (const json &j, const Space &spc)
 
void init (const Space &spc) override
 constructs cell_list with appropriate cell_length and fills it with particles from space More...
 
SASABase::Neighbours calcNeighbourDataOfParticle (const Space &spc, index_type target_index) const override
 calculates neighbourData object of a target particle More...
 
std::vector< SASABase::NeighbourscalcNeighbourData (const Space &spc, const std::vector< index_type > &target_indices) const override
 calculates neighbourData objects of particles More...
 
void update (const Space &spc, const Change &change) override
 updates cell_list according to change, if the volume changes the cell_list gets rebuilt More...
 
- 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...
 
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

template<typename CellList>
class Faunus::SASA::SASACellList< CellList >

derived class of SASABase which uses cell lists for neighbour search currently can be used only for geometries with either 3 or 0 periodic boundaries

Todo:

update function does perhaps unnecessary containsMember(Member&) checks

create a wrapper class for cell_list so that the Space dependence is in there and not here

Constructor & Destructor Documentation

◆ SASACellList()

template<typename CellList >
Faunus::SASA::SASACellList< CellList >::SASACellList ( 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()

template<typename CellList >
std::vector< SASABase::Neighbours > Faunus::SASA::SASACellList< CellList >::calcNeighbourData ( const Space spc,
const std::vector< index_type > &  target_indices 
) const
overridevirtual

calculates neighbourData objects of particles

specified by target indices in ParticleVector using cell lists

Parameters
space
target_indicesabsolute indicies of target particles in ParticleVector

Implements Faunus::SASA::SASABase.

◆ calcNeighbourDataOfParticle()

template<typename CellList >
SASABase::Neighbours Faunus::SASA::SASACellList< CellList >::calcNeighbourDataOfParticle ( const Space spc,
index_type  target_index 
) const
overridevirtual

calculates neighbourData object of a target particle

specified by target index in ParticleVector using cell list

Parameters
space
target_indexindicex of target particle in ParticleVector

Implements Faunus::SASA::SASABase.

◆ init()

template<typename CellList >
void Faunus::SASA::SASACellList< CellList >::init ( const Space spc)
overridevirtual

constructs cell_list with appropriate cell_length and fills it with particles from space

Parameters
space

Implements Faunus::SASA::SASABase.

◆ update()

template<typename CellList >
void Faunus::SASA::SASACellList< CellList >::update ( const Space spc,
const Change change 
)
overridevirtual

updates cell_list according to change, if the volume changes the cell_list gets rebuilt

also updates radii in case of matter change

Parameters
space
change

Implements Faunus::SASA::SASABase.


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