38 |
|
#include "math/Vector3.hpp" |
39 |
|
#include "primitives/Atom.hpp" |
40 |
|
#include "primitives/RigidBody.hpp" |
41 |
+ |
#include "primitives/Bond.hpp" |
42 |
+ |
#include "primitives/Bend.hpp" |
43 |
+ |
#include "primitives/Torsion.hpp" |
44 |
+ |
#include "primitives/CutoffGroup.hpp" |
45 |
|
|
46 |
|
namespace oopse{ |
47 |
|
|
67 |
|
* Sets the global index of this molecule. |
68 |
|
* @param new global index to be set |
69 |
|
*/ |
70 |
< |
void setGlobalIndex(int index) { |
70 |
> |
int setGlobalIndex(int index) { |
71 |
|
return globalIndex_; |
72 |
|
} |
73 |
|
|
135 |
|
return cutoffGroups_.size(); |
136 |
|
} |
137 |
|
|
138 |
+ |
/** Returns the total number of constraints in this molecule */ |
139 |
+ |
unsigned int getNConstraints() { |
140 |
+ |
return constraints_.size(); |
141 |
+ |
} |
142 |
+ |
|
143 |
|
/** |
144 |
|
* Returns the first atom in this molecule and initialize the iterator. |
145 |
|
* @return the first atom, return NULL if there is not cut off group in this molecule |
207 |
|
*/ |
208 |
|
CutoffGroup* nextCutoffGroup(std::vector<CutoffGroup*>::iterator& i); |
209 |
|
|
210 |
+ |
Constraint* beginConstraint(std::vector<Constraint*>::iterator& i); |
211 |
+ |
|
212 |
+ |
Constraint* nextConstraint(std::vector<Constraint*>::iterator& i); |
213 |
+ |
|
214 |
|
//void setStampID( int info ) {stampID = info;} |
215 |
|
|
216 |
|
void calcForces( void ); |
225 |
|
Vector3d getCom(); |
226 |
|
|
227 |
|
/** Moves the center of this molecule */ |
228 |
< |
void moveCom(const Vetor3d& delta); |
228 |
> |
void moveCom(const Vector3d& delta); |
229 |
|
|
230 |
|
/** Returns the velocity of center of mass of this molecule */ |
231 |
|
Vector3d getComVel(); |
233 |
|
/** Returns the total mass of this molecule */ |
234 |
|
double getTotalMass(); |
235 |
|
|
236 |
< |
friend std::ostream& operator <<(std::ostream& o, const Molecule& mol); |
236 |
> |
friend std::ostream& operator <<(std::ostream& o, Molecule& mol); |
237 |
|
|
238 |
|
private: |
239 |
|
int localIndex_; |
246 |
|
std::vector<RigidBody*> rigidBodies_; |
247 |
|
std::vector<StuntDouble*> integrableObjects_; |
248 |
|
std::vector<CutoffGroup*> cutoffGroups_; |
249 |
+ |
std::vector<Constraint*> constraints_; |
250 |
|
}; |
251 |
|
|
252 |
|
} //namespace oopse |