Simpatico  v1.10
tools/neighbor/CellAtom.h
1 #ifndef TOOLS_CELL_ATOM_H
2 #define TOOLS_CELL_ATOM_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 <tools/chemistry/Atom.h>
12 #include <util/space/Vector.h>
13 #include <util/global.h>
14 
15 namespace Tools
16 {
17 
23  class CellAtom
24  {
25 
26  public:
27 
28  void setPtr(Atom* atomPtr)
29  { ptr_ = atomPtr; }
30 
31  void update()
32  {
33  position_ = ptr_->position;
34  id_ = ptr_->id;
35  }
36 
37  Atom* ptr() const
38  { return ptr_; }
39 
40  int id() const
41  {
42  //return ptr_->id();
43  return id_;
44  }
45 
46  const Vector& position() const
47  {
48  //return ptr_->position();
49  return position_;
50  }
51 
52  private:
53 
54  Vector position_;
55  Atom* ptr_;
56  int id_;
57 
58  };
59 
60 }
61 #endif
A Vector is a Cartesian vector.
Definition: Vector.h:75
int id
Unique global index (tag)
File containing preprocessor macros for error handling.
Single-processor classes for pre- and post-processing MD trajectories.
A point particle in an MD simulation.
Vector position
Atom position.
Data for an atom in a CellList.