ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Represents a single cluster of particles. More...
#include <Cluster.hpp>
Public Member Functions | |
Cluster (std::weak_ptr< BoxGeometry const > const &box_geo) | |
void | add_particle (const Particle &p) |
add a particle to the cluster | |
Utils::Vector3d | center_of_mass_subcluster (std::vector< int > const &particle_ids) |
Calculate the center of mass of the cluster. | |
Utils::Vector3d | center_of_mass () |
double | longest_distance () |
Longest distance between any combination of two particles. | |
double | radius_of_gyration () |
Calculate radius of gyration of the cluster. | |
double | radius_of_gyration_subcluster (std::vector< int > const &particle_ids) |
std::pair< double, double > | fractal_dimension (double dr) |
Calculate the fractal dimension N(r) via r^d, where N(r) counts the number of particles in a sphere of radius n, and d denotes the fractal dimension. | |
Public Attributes | |
std::vector< int > | particles |
Ids of the particles in the cluster. | |
Represents a single cluster of particles.
Definition at line 36 of file core/cluster_analysis/Cluster.hpp.
|
inlineexplicit |
Definition at line 38 of file core/cluster_analysis/Cluster.hpp.
|
inline |
add a particle to the cluster
Definition at line 43 of file core/cluster_analysis/Cluster.hpp.
References Particle::id(), and particles.
Utils::Vector3d ClusterAnalysis::Cluster::center_of_mass | ( | ) |
Definition at line 46 of file Cluster.cpp.
References center_of_mass_subcluster(), and particles.
Referenced by fractal_dimension().
Utils::Vector3d ClusterAnalysis::Cluster::center_of_mass_subcluster | ( | std::vector< int > const & | particle_ids | ) |
Calculate the center of mass of the cluster.
Definition at line 52 of file Cluster.cpp.
References get_particle_data(), Particle::mass(), particles, and Particle::pos().
Referenced by center_of_mass(), and radius_of_gyration_subcluster().
std::pair< double, double > ClusterAnalysis::Cluster::fractal_dimension | ( | double | dr | ) |
Calculate the fractal dimension N(r) via r^d, where N(r) counts the number of particles in a sphere of radius n, and d denotes the fractal dimension.
The fitting is done by the Gnu Scientific Library.
dr | increment for when constructing the discrete version of N(r) |
Definition at line 138 of file Cluster.cpp.
References center_of_mass(), get_particle_data(), particles, radius_of_gyration_subcluster(), runtimeErrorMsg, and ClusterAnalysis::sort_indices().
double ClusterAnalysis::Cluster::longest_distance | ( | ) |
Longest distance between any combination of two particles.
Definition at line 84 of file Cluster.cpp.
References get_particle_data(), particles, and Particle::pos().
double ClusterAnalysis::Cluster::radius_of_gyration | ( | ) |
Calculate radius of gyration of the cluster.
Definition at line 104 of file Cluster.cpp.
References particles, and radius_of_gyration_subcluster().
double ClusterAnalysis::Cluster::radius_of_gyration_subcluster | ( | std::vector< int > const & | particle_ids | ) |
Definition at line 109 of file Cluster.cpp.
References center_of_mass_subcluster(), get_particle_data(), and Particle::pos().
Referenced by fractal_dimension(), and radius_of_gyration().
std::vector<int> ClusterAnalysis::Cluster::particles |
Ids of the particles in the cluster.
Definition at line 41 of file core/cluster_analysis/Cluster.hpp.
Referenced by add_particle(), center_of_mass(), center_of_mass_subcluster(), fractal_dimension(), longest_distance(), and radius_of_gyration().