faunus
Public Member Functions | Public Attributes | Friends | List of all members
Faunus::move::FindCluster Class Reference

Helper class for Cluster move for finding clusters. More...

#include <clustermove.h>

Public Member Functions

std::optional< size_t > findSeed (Random &random)
 Find first group; exclude satellites. More...
 
std::pair< std::vector< size_t >, bool > findCluster (size_t seed_index)
 Find cluster. More...
 
 FindCluster (const Space &spc, const json &j)
 

Public Attributes

std::vector< size_t > molecule_index
 index of all possible molecules to be considered
 

Friends

void to_json (json &j, const FindCluster &cluster)
 Serialize to json.
 

Detailed Description

Helper class for Cluster move for finding clusters.

Todo:
This is a break-out from Cluster and further separation of functionality could be made

Member Function Documentation

◆ findCluster()

std::pair< std::vector< size_t >, bool > Faunus::move::FindCluster::findCluster ( size_t  seed_index)

Find cluster.

Parameters
seed_indexIndex of seed_index group to evaluate the cluster around
Returns
Pair w. vector for group indices in cluster and a bool if the cluster can be safely rotated in a PBC environment

◆ findSeed()

std::optional< size_t > Faunus::move::FindCluster::findSeed ( Random random)

Find first group; exclude satellites.

Satellites are molecules that cannot be used to seed a cluster but can be part of it, i.e.

rotated and translated. Here we therefore filter out any satellite molecules, and pick a random molecule index of what remains.


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