1 |
< |
#ifndef _CUTOFFGROUP_H_ |
2 |
< |
#define _CUTOFFGROUP_H_ |
1 |
> |
#ifndef PRIMITIVES_CUTOFFGROUP_HPP |
2 |
> |
#define PRIMITIVES_CUTOFFGROUP_HPP |
3 |
> |
|
4 |
|
#include "primitives/Atom.hpp" |
5 |
+ |
#include "math/Vector3.hpp" |
6 |
|
|
7 |
+ |
namespace oopse { |
8 |
+ |
|
9 |
|
class CutoffGroup{ |
10 |
|
public: |
11 |
|
|
16 |
|
|
17 |
|
void addAtom(Atom* atom) {cutoffAtomList.push_back(atom);} |
18 |
|
|
19 |
< |
Atom* beginAtom(vector<Atom*>::iterator& i){ |
19 |
> |
Atom* beginAtom(std::vector<Atom*>::iterator& i){ |
20 |
|
i = cutoffAtomList.begin(); |
21 |
|
return i != cutoffAtomList.end()? *i : NULL; |
22 |
|
} |
23 |
|
|
24 |
< |
Atom* nextAtom(vector<Atom*>::iterator& i){ |
24 |
> |
Atom* nextAtom(std::vector<Atom*>::iterator& i){ |
25 |
|
i++; |
26 |
|
return i != cutoffAtomList.end()? *i : NULL; |
27 |
|
} |
28 |
|
|
29 |
|
double getMass(){ |
30 |
< |
vector<Atom*>::iterator i; |
30 |
> |
std::vector<Atom*>::iterator i; |
31 |
|
Atom* atom; |
32 |
|
double mass; |
33 |
|
|
46 |
|
return totalMass; |
47 |
|
} |
48 |
|
|
49 |
< |
void getCOM(double com[3]){ |
49 |
> |
void getCOM(Vector3d& com){ |
50 |
|
|
51 |
< |
vector<Atom*>::iterator i; |
51 |
> |
std::vector<Atom*>::iterator i; |
52 |
|
Atom* atom; |
53 |
< |
double pos[3]; |
53 |
> |
Vector3d pos; |
54 |
|
double mass; |
55 |
|
|
56 |
|
com[0] = 0; |
84 |
|
int getGlobalIndex() {return globalIndex;} |
85 |
|
void setGlobalIndex(int id) {this->globalIndex = id;} |
86 |
|
private: |
87 |
< |
vector<Atom*> cutoffAtomList; |
87 |
> |
std::vector<Atom*> cutoffAtomList; |
88 |
|
bool haveTotalMass; |
89 |
|
double totalMass; |
90 |
|
int globalIndex; |
91 |
|
|
92 |
|
}; |
93 |
|
|
94 |
< |
#endif |
94 |
> |
}//end namespace oopse |
95 |
> |
#endif //PRIMITIVES_CUTOFFGROUP_HPP |