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/SRI.hpp" |
45 |
+ |
#include "primitives/CutoffGroup.hpp" |
46 |
|
|
47 |
|
namespace oopse{ |
48 |
|
|
49 |
+ |
class Constraint; |
50 |
+ |
|
51 |
|
/** |
52 |
|
* @class Molecule Molecule.hpp "primitives/Molecule.hpp" |
53 |
|
* @brief |
70 |
|
* Sets the global index of this molecule. |
71 |
|
* @param new global index to be set |
72 |
|
*/ |
73 |
< |
void setGlobalIndex(int index) { |
73 |
> |
int setGlobalIndex(int index) { |
74 |
|
return globalIndex_; |
75 |
|
} |
76 |
|
|
138 |
|
return cutoffGroups_.size(); |
139 |
|
} |
140 |
|
|
141 |
+ |
/** Returns the total number of constraints in this molecule */ |
142 |
+ |
unsigned int getNConstraints() { |
143 |
+ |
return constraints_.size(); |
144 |
+ |
} |
145 |
+ |
|
146 |
|
/** |
147 |
|
* Returns the first atom in this molecule and initialize the iterator. |
148 |
|
* @return the first atom, return NULL if there is not cut off group in this molecule |
210 |
|
*/ |
211 |
|
CutoffGroup* nextCutoffGroup(std::vector<CutoffGroup*>::iterator& i); |
212 |
|
|
213 |
+ |
Constraint* beginConstraint(std::vector<Constraint*>::iterator& i); |
214 |
+ |
|
215 |
+ |
Constraint* nextConstraint(std::vector<Constraint*>::iterator& i); |
216 |
+ |
|
217 |
|
//void setStampID( int info ) {stampID = info;} |
218 |
|
|
219 |
|
void calcForces( void ); |
228 |
|
Vector3d getCom(); |
229 |
|
|
230 |
|
/** Moves the center of this molecule */ |
231 |
< |
void moveCom(const Vetor3d& delta); |
231 |
> |
void moveCom(const Vector3d& delta); |
232 |
|
|
233 |
|
/** Returns the velocity of center of mass of this molecule */ |
234 |
|
Vector3d getComVel(); |
236 |
|
/** Returns the total mass of this molecule */ |
237 |
|
double getTotalMass(); |
238 |
|
|
239 |
< |
friend std::ostream& operator <<(std::ostream& o, const Molecule& mol); |
239 |
> |
friend std::ostream& operator <<(std::ostream& o, Molecule& mol); |
240 |
|
|
241 |
|
private: |
242 |
|
int localIndex_; |
249 |
|
std::vector<RigidBody*> rigidBodies_; |
250 |
|
std::vector<StuntDouble*> integrableObjects_; |
251 |
|
std::vector<CutoffGroup*> cutoffGroups_; |
252 |
+ |
std::vector<Constraint*> constraints_; |
253 |
+ |
|
254 |
+ |
int stampID; |
255 |
|
}; |
256 |
|
|
257 |
|
} //namespace oopse |