Simpatico
v1.10
|
Identifies clusters of molecules, such as micelles.
Definition at line 34 of file ClusterIdentifier.h.
#include <ClusterIdentifier.h>
Public Member Functions | |
ClusterIdentifier (System &system) | |
Constructor. More... | |
~ClusterIdentifier () | |
Destructor. More... | |
virtual void | initialize (int speciesId, int atomTypeId, double cutoff) |
Clear accumulator. More... | |
void | identifyClusters () |
Identify all clusters (main operation). More... | |
int | nCluster () const |
Get number of clusters. More... | |
ClusterLink & | link (int moleculeId) |
Get a specific ClusterLink, by id of the associated molecule. More... | |
Cluster & | cluster (int id) |
Get a specific cluster, indexed in the order identified. More... | |
bool | isValid () const |
Return true if valid, or throw Exception otherwise. More... | |
McMd::ClusterIdentifier::ClusterIdentifier | ( | System & | system | ) |
Constructor.
system | reference to parent System object |
Definition at line 28 of file ClusterIdentifier.cpp.
McMd::ClusterIdentifier::~ClusterIdentifier | ( | ) |
Destructor.
Definition at line 42 of file ClusterIdentifier.cpp.
|
virtual |
Clear accumulator.
speciesId | index of species in clusters |
atomTypeId | typeId of atoms in micelle core |
cutoff | pair distance cutoff |
Definition at line 49 of file ClusterIdentifier.cpp.
References McMd::Cluster::addLink(), McMd::Simulation::atomCapacity(), McMd::Molecule::begin(), McMd::System::boundary(), Simp::Species::capacity(), cluster(), McMd::ClusterLink::clusterId(), Simp::OrthorhombicBoundary::distanceSq(), McMd::CellList::getNeighbors(), McMd::Cluster::id(), McMd::Molecule::id(), McMd::ClusterLink::molecule(), McMd::Atom::molecule(), Util::ArrayIterator< Data >::notEnd(), McMd::Atom::position(), McMd::CellList::setAtomCapacity(), McMd::System::simulation(), Util::FSArray< Data, Capacity >::size(), McMd::Simulation::species(), and UTIL_THROW.
Referenced by McMd::ClusterHistogram::loadParameters(), and McMd::ClusterHistogram::readParameters().
void McMd::ClusterIdentifier::identifyClusters | ( | ) |
Identify all clusters (main operation).
Definition at line 129 of file ClusterIdentifier.cpp.
References McMd::CellList::addAtom(), McMd::Cluster::addLink(), McMd::System::begin(), McMd::System::boundary(), McMd::Cluster::clear(), McMd::ClusterLink::clusterId(), Util::PArrayIterator< Data >::get(), isValid(), McMd::ClusterLink::molecule(), Util::ArrayIterator< Data >::notEnd(), Util::PArrayIterator< Data >::notEnd(), McMd::Cluster::setId(), McMd::CellList::setup(), and Simp::OrthorhombicBoundary::shift().
Referenced by McMd::ClusterHistogram::sample().
|
inline |
Get number of clusters.
Definition at line 69 of file ClusterIdentifier.h.
Referenced by isValid(), and McMd::ClusterHistogram::sample().
|
inline |
Get a specific ClusterLink, by id of the associated molecule.
moleculeId | molecule index. |
Definition at line 77 of file ClusterIdentifier.h.
|
inline |
Get a specific cluster, indexed in the order identified.
The id argument of this function is a consecutive array index, with 0 <= id < nCluster, which need not be equal to the cluster identifier returned by Cluster::id().
id | cluster array index, 0 <- id < nCluster. |
Definition at line 89 of file ClusterIdentifier.h.
Referenced by initialize(), and McMd::ClusterHistogram::sample().
bool McMd::ClusterIdentifier::isValid | ( | ) | const |
Return true if valid, or throw Exception otherwise.
Definition at line 197 of file ClusterIdentifier.cpp.
References McMd::System::begin(), McMd::ClusterLink::clusterId(), Util::ConstPArrayIterator< Data >::get(), McMd::ClusterLink::molecule(), nCluster(), McMd::System::nMolecule(), Util::ConstPArrayIterator< Data >::notEnd(), and UTIL_THROW.
Referenced by identifyClusters().