Simpatico  v1.10
ddMd/neighbor/CellAtom.h
1 #ifndef DDMD_CELL_ATOM_H
2 #define DDMD_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 <ddMd/chemistry/Atom.h>
12 #include <util/space/Vector.h>
13 #include <util/global.h>
14 
15 namespace DdMd
16 {
17 
21  class CellAtom
22  {
23 
24  public:
25 
26  #if 0
27  struct Tag {
28  Atom* ptr;
29  int cellRank;
30  };
31  #endif
32 
33  void setPtr(Atom* atomPtr)
34  { ptr_ = atomPtr; }
35 
36  void update()
37  {
38  position_ = ptr_->position();
39  id_ = ptr_->id();
40  }
41 
42  Atom* ptr() const
43  { return ptr_; }
44 
45  int id() const
46  {
47  //return ptr_->id();
48  return id_;
49  }
50 
51  const Vector& position() const
52  {
53  //return ptr_->position();
54  return position_;
55  }
56 
57  Mask* maskPtr() const
58  {
59  return &(ptr_->mask());
60  }
61 
62  private:
63 
64  Vector position_;
65  Atom* ptr_;
66  int id_;
67 
68  };
69 
70 }
71 #endif
Set of Atoms for which pair interactions with a parent Atom are "masked".
A Vector is a Cartesian vector.
Definition: Vector.h:75
Data for an atom in a CellList.
Vector & position()
Get position Vector by reference.
File containing preprocessor macros for error handling.
A point particle in an MD simulation.
Parallel domain decomposition (DD) MD simulation.