Simpatico  v1.10
ClusterIdentifier.h
1 #ifndef MCMD_CLUSTER_IDENTIFIER_H
2 #define MCMD_CLUSTER_IDENTIFIER_H
3 
4 /*
5 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
6 *
7 * Copyright 2010 - 2017, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include <mcMd/analyzers/system/Cluster.h> // member template argument
12 #include <mcMd/analyzers/system/ClusterLink.h> // member template argument
13 #include <mcMd/neighbor/CellList.h> // member
14 #include <simp/boundary/Boundary.h> // argument (typedef)
15 #include <util/containers/DArray.h> // member template
16 #include <util/containers/GArray.h> // member template
17 #include <util/containers/GStack.h> // member template
18 
19 namespace Simp {
20  class Species;
21 }
22 
23 namespace McMd
24 {
25 
26  class System;
27 
28  using namespace Util;
29  using namespace Simp;
30 
35  {
36 
37  public:
38 
44  ClusterIdentifier(System &system);
45 
50 
58  virtual
59  void initialize(int speciesId, int atomTypeId, double cutoff);
60 
64  void identifyClusters();
65 
69  int nCluster() const
70  { return clusters_.size(); }
71 
77  ClusterLink& link(int moleculeId)
78  { return links_[moleculeId]; }
79 
89  Cluster& cluster(int id)
90  { return clusters_[id]; }
91 
95  bool isValid() const;
96 
97  private:
98 
100  DArray<ClusterLink> links_;
101 
103  GArray<Cluster> clusters_;
104 
106  GStack<ClusterLink> workStack_;
107 
109  CellList cellList_;
110 
112  System* systemPtr_;
113 
115  int speciesId_;
116 
118  int atomTypeId_;
119 
121  double cutoff_;
122 
123  // Private functions
124 
128  System& system()
129  { return *systemPtr_; }
130 
134  void processNextMolecule(Cluster& cluster);
135 
136  };
137 
138 }
139 #endif
An automatically growable Stack.
Definition: GStack.h:28
An automatically growable array, analogous to a std::vector.
Definition: GArray.h:33
Cluster & cluster(int id)
Get a specific cluster, indexed in the order identified.
int nCluster() const
Get number of clusters.
A set of interacting Molecules enclosed by a Boundary.
Definition: System.h:115
Classes used by all simpatico molecular simulations.
ClusterLink & link(int moleculeId)
Get a specific ClusterLink, by id of the associated molecule.
Utility classes for scientific computation.
Definition: accumulators.mod:1
A cell list for Atom objects in a periodic system boundary.
Dynamically allocatable contiguous array template.
Definition: DArray.h:31
Cluster of molecules.
Definition: Cluster.h:31
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
Identifies clusters of molecules, such as micelles.