170 |
|
return atoms_[i]; |
171 |
|
} |
172 |
|
|
173 |
< |
Atom* Molecule::beginAtom(std::vector<Atom*>::iterator& i) { |
173 |
> |
Atom* beginAtom(std::vector<Atom*>::iterator& i) { |
174 |
|
i = atoms_.begin(); |
175 |
|
return (i == atoms_.end()) ? NULL : *i; |
176 |
|
} |
177 |
|
|
178 |
< |
Atom* Molecule::nextAtom(std::vector<Atom*>::iterator& i) { |
178 |
> |
Atom* nextAtom(std::vector<Atom*>::iterator& i) { |
179 |
|
++i; |
180 |
|
return (i == atoms_.end()) ? NULL : *i; |
181 |
|
} |
182 |
|
|
183 |
< |
Bond* Molecule::beginBond(std::vector<Bond*>::iterator& i) { |
183 |
> |
Bond* beginBond(std::vector<Bond*>::iterator& i) { |
184 |
|
i = bonds_.begin(); |
185 |
|
return (i == bonds_.end()) ? NULL : *i; |
186 |
|
} |
187 |
|
|
188 |
< |
Bond* Molecule::nextBond(std::vector<Bond*>::iterator& i) { |
188 |
> |
Bond* nextBond(std::vector<Bond*>::iterator& i) { |
189 |
|
++i; |
190 |
|
return (i == bonds_.end()) ? NULL : *i; |
191 |
|
|
192 |
|
} |
193 |
|
|
194 |
< |
Bend* Molecule::beginBend(std::vector<Bend*>::iterator& i) { |
194 |
> |
Bend* beginBend(std::vector<Bend*>::iterator& i) { |
195 |
|
i = bends_.begin(); |
196 |
|
return (i == bends_.end()) ? NULL : *i; |
197 |
|
} |
198 |
|
|
199 |
< |
Bend* Molecule::nextBend(std::vector<Bend*>::iterator& i) { |
199 |
> |
Bend* nextBend(std::vector<Bend*>::iterator& i) { |
200 |
|
++i; |
201 |
|
return (i == bends_.end()) ? NULL : *i; |
202 |
|
} |
203 |
|
|
204 |
< |
Torsion* Molecule::beginTorsion(std::vector<Torsion*>::iterator& i) { |
204 |
> |
Torsion* beginTorsion(std::vector<Torsion*>::iterator& i) { |
205 |
|
i = torsions_.begin(); |
206 |
|
return (i == torsions_.end()) ? NULL : *i; |
207 |
|
} |
208 |
|
|
209 |
< |
Torsion* Molecule::nextTorsion(std::vector<Torsion*>::iterator& i) { |
209 |
> |
Torsion* nextTorsion(std::vector<Torsion*>::iterator& i) { |
210 |
|
++i; |
211 |
|
return (i == torsions_.end()) ? NULL : *i; |
212 |
|
} |
213 |
|
|
214 |
< |
RigidBody* Molecule::beginRigidBody(std::vector<RigidBody*>::iterator& i) { |
214 |
> |
RigidBody* beginRigidBody(std::vector<RigidBody*>::iterator& i) { |
215 |
|
i = rigidBodies_.begin(); |
216 |
|
return (i == rigidBodies_.end()) ? NULL : *i; |
217 |
|
} |
218 |
|
|
219 |
< |
RigidBody* Molecule::nextRigidBody(std::vector<RigidBody*>::iterator& i) { |
219 |
> |
RigidBody* nextRigidBody(std::vector<RigidBody*>::iterator& i) { |
220 |
|
++i; |
221 |
|
return (i == rigidBodies_.end()) ? NULL : *i; |
222 |
|
} |
223 |
|
|
224 |
< |
StuntDouble* Molecule::beginIntegrableObject(std::vector<StuntDouble*>::iterator& i) { |
224 |
> |
StuntDouble* beginIntegrableObject(std::vector<StuntDouble*>::iterator& i) { |
225 |
|
i = integrableObjects_.begin(); |
226 |
|
return (i == integrableObjects_.end()) ? NULL : *i; |
227 |
|
} |
228 |
|
|
229 |
< |
StuntDouble* Molecule::nextIntegrableObject(std::vector<StuntDouble*>::iterator& i) { |
229 |
> |
StuntDouble* nextIntegrableObject(std::vector<StuntDouble*>::iterator& i) { |
230 |
|
++i; |
231 |
|
return (i == integrableObjects_.end()) ? NULL : *i; |
232 |
|
} |
233 |
|
|
234 |
< |
CutoffGroup* Molecule::beginCutoffGroup(std::vector<CutoffGroup*>::iterator& i) { |
234 |
> |
CutoffGroup* beginCutoffGroup(std::vector<CutoffGroup*>::iterator& i) { |
235 |
|
i = cutoffGroups_.begin(); |
236 |
|
return (i == cutoffGroups_.end()) ? NULL : *i; |
237 |
|
} |
238 |
|
|
239 |
< |
CutoffGroup* Molecule::nextCutoffGroup(std::vector<CutoffGroup*>::iterator& i) { |
239 |
> |
CutoffGroup* nextCutoffGroup(std::vector<CutoffGroup*>::iterator& i) { |
240 |
|
++i; |
241 |
|
return (i == cutoffGroups_.end()) ? NULL : *i; |
242 |
|
} |
243 |
|
|
244 |
< |
ConstraintPair* Molecule::beginConstraintPair(std::vector<ConstraintPair*>::iterator& i) { |
244 |
> |
ConstraintPair* beginConstraintPair(std::vector<ConstraintPair*>::iterator& i) { |
245 |
|
i = constraintPairs_.begin(); |
246 |
|
return (i == constraintPairs_.end()) ? NULL : *i; |
247 |
|
} |
248 |
|
|
249 |
< |
ConstraintPair* Molecule::nextConstraintPair(std::vector<ConstraintPair*>::iterator& i) { |
249 |
> |
ConstraintPair* nextConstraintPair(std::vector<ConstraintPair*>::iterator& i) { |
250 |
|
++i; |
251 |
|
return (i == constraintPairs_.end()) ? NULL : *i; |
252 |
|
} |
253 |
|
|
254 |
< |
ConstraintElem* Molecule::beginConstraintElem(std::vector<ConstraintElem*>::iterator& i) { |
254 |
> |
ConstraintElem* beginConstraintElem(std::vector<ConstraintElem*>::iterator& i) { |
255 |
|
i = constraintElems_.begin(); |
256 |
|
return (i == constraintElems_.end()) ? NULL : *i; |
257 |
|
} |
258 |
|
|
259 |
< |
ConstraintElem* Molecule::nextConstraintElem(std::vector<ConstraintElem*>::iterator& i) { |
259 |
> |
ConstraintElem* nextConstraintElem(std::vector<ConstraintElem*>::iterator& i) { |
260 |
|
++i; |
261 |
|
return (i == constraintElems_.end()) ? NULL : *i; |
262 |
|
} |
276 |
|
/** Returns the velocity of center of mass of this molecule */ |
277 |
|
Vector3d getComVel(); |
278 |
|
|
279 |
– |
/** Returns the total mass of this molecule */ |
280 |
– |
double getTotalMass(); |
281 |
– |
|
279 |
|
friend std::ostream& operator <<(std::ostream& o, Molecule& mol); |
280 |
|
|
281 |
|
private: |