201 |
|
} |
202 |
|
|
203 |
|
} |
204 |
– |
|
205 |
– |
struct BendLessThan : public std::binary_function<IntTuple4, IntTuple4, bool> { |
206 |
– |
bool operator()(IntTuple3 b1, IntTuple3 b2) { |
207 |
– |
return b1.first < b2.first |
208 |
– |
|| (!(b2.first < b1.first) && b1.second < b2.second) |
209 |
– |
|| (!(b2.first < b1.first) && !(b2.second < b2.second) && b1.third < b2.third); |
210 |
– |
} |
211 |
– |
}; |
204 |
|
|
205 |
|
void MoleculeStamp::checkBends() { |
206 |
|
for(int i = 0; i < getNBends(); ++i) { |
249 |
|
} |
250 |
|
|
251 |
|
|
252 |
< |
std::set<IntTuple3, BendLessThan> allBends; |
253 |
< |
std::set<IntTuple3, BendLessThan>::iterator iter; |
252 |
> |
std::set<IntTuple3> allBends; |
253 |
> |
std::set<IntTuple3>::iterator iter; |
254 |
|
for(int i = 0; i < getNBends(); ++i) { |
255 |
|
BendStamp* bendStamp= getBendStamp(i); |
256 |
|
std::vector<int> bend = bendStamp->getMembers(); |
336 |
|
} |
337 |
|
|
338 |
|
} |
347 |
– |
|
348 |
– |
struct TorsionLessThan : public std::binary_function<IntTuple4, IntTuple4, bool> { |
349 |
– |
bool operator()(IntTuple4 t1, IntTuple4 t2) { |
350 |
– |
|
351 |
– |
return t1.first < t2.first |
352 |
– |
|| (!(t2.first < t1.first) && t1.second < t2.second) |
353 |
– |
|| (!(t2.first < t1.first) && !(t2.second < t2.second) && t1.third < t2.third) |
354 |
– |
||(!(t2.first < t1.first) && !(t2.second < t2.second) && !(t2.third < t1.third) && t1.fourth < t2.fourth); |
355 |
– |
} |
339 |
|
|
357 |
– |
|
358 |
– |
|
359 |
– |
}; |
360 |
– |
|
361 |
– |
|
340 |
|
void MoleculeStamp::checkTorsions() { |
341 |
< |
for(int i = 0; i < getNBends(); ++i) { |
341 |
> |
for(int i = 0; i < getNTorsions(); ++i) { |
342 |
|
TorsionStamp* torsionStamp = getTorsionStamp(i); |
343 |
|
std::vector<int> torsionAtoms = torsionStamp ->getMembers(); |
344 |
|
std::vector<int>::iterator j =std::find_if(torsionAtoms.begin(), torsionAtoms.end(), std::bind2nd(std::greater<int>(), getNAtoms()-1)); |
363 |
|
} |
364 |
|
} |
365 |
|
|
366 |
< |
std::set<IntTuple4, TorsionLessThan> allTorsions; |
367 |
< |
std::set<IntTuple4, TorsionLessThan>::iterator iter; |
366 |
> |
std::set<IntTuple4> allTorsions; |
367 |
> |
std::set<IntTuple4>::iterator iter; |
368 |
|
for(int i = 0; i < getNTorsions(); ++i) { |
369 |
|
TorsionStamp* torsionStamp= getTorsionStamp(i); |
370 |
|
std::vector<int> torsion = torsionStamp->getMembers(); |