23#include "gsl/gsl_fit.h"
64 double total_mass = 0.;
81 return box_geo.folded_position(
com);
90 for (
auto b = a; ++b !=
particles.end();) {
91 auto const dist = box_geo
129 std::vector<std::size_t>
idx(v.size());
130 std::iota(
idx.begin(),
idx.end(), std::size_t{0u});
134 idx, [&v](std::size_t
i1, std::size_t
i2) {
return v[
i1] < v[
i2]; });
138std::pair<double, double>
181 throw std::runtime_error(
182 "The fractal dimension of a cluster with fewer than two distinct "
183 "radial shells (e.g. a 2-particle cluster) is undefined. Provide a "
184 "larger cluster or a smaller dr.");
192 runtimeErrorMsg() <<
"GSL (gnu scientific library) is required for fractal "
193 "dimension calculation.";
198void Cluster::sanity_checks()
const {
202 throw std::runtime_error(
203 "Cluster analysis is not compatible with non-cuboid box types");
Vector implementation and trait types for boost qvm interoperability.
Utils::Vector3d center_of_mass()
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 o...
Utils::Vector3d center_of_mass_subcluster(std::vector< int > const &particle_ids)
Calculate the center of mass of the cluster.
std::vector< int > particles
Ids of the particles in the cluster.
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)
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
This file contains the errorhandling code for severe errors, like a broken bond or illegal parameter ...
#define runtimeErrorMsg()
std::vector< std::size_t > sort_indices(const std::vector< T > &v)
const Particle & get_particle_data(int p_id)
Get particle data.
Particles creation and deletion.
constexpr auto const & pos() const
constexpr auto const & mass() const