94 |
|
|
95 |
|
} |
96 |
|
|
97 |
+ |
void Molecule::addConstraintPair(ConstraintPair* cp) { |
98 |
+ |
if (std::find(constraintPairs_.begin(), constraintPairs_.end(), cp) == constraintPairs_.end()) { |
99 |
+ |
constraintPairs_.push_back(cp); |
100 |
+ |
} |
101 |
+ |
|
102 |
+ |
} |
103 |
+ |
|
104 |
+ |
|
105 |
|
void Molecule::complete() { |
106 |
|
|
107 |
|
std::set<Atom*> rigidAtoms; |
211 |
|
CutoffGroup* Molecule::nextCutoffGroup(std::vector<CutoffGroup*>::iterator& i) { |
212 |
|
++i; |
213 |
|
return (i == cutoffGroups_.end()) ? NULL : *i; |
214 |
+ |
} |
215 |
+ |
|
216 |
+ |
ConstraintPair* Molecule::beginConstraintPair(std::vector<ConstraintPair*>::iterator& i) { |
217 |
+ |
i = constraintPairs_.begin(); |
218 |
+ |
return (i == constraintPairs_.end()) ? NULL : *i; |
219 |
+ |
} |
220 |
+ |
|
221 |
+ |
ConstraintPair* Molecule::nextConstraintPair(std::vector<ConstraintPair*>::iterator& i) { |
222 |
+ |
++i; |
223 |
+ |
return (i == constraintPairs_.end()) ? NULL : *i; |
224 |
|
} |
225 |
|
|
226 |
|
double Molecule::getMass() { |
319 |
|
o << mol.getNRigidBodies() << " rigid bodies" << std::endl; |
320 |
|
o << mol.getNIntegrableObjects() << "integrable objects" << std::endl; |
321 |
|
o << mol.getNCutoffGroups() << "cutoff groups" << std::endl; |
322 |
< |
|
322 |
> |
o << mol.getNConstraintPairs() << "constraint pairs" << std::endl; |
323 |
|
return o; |
324 |
|
} |
325 |
|
|