ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/types/MoleculeStamp.cpp
(Generate patch)

Comparing trunk/OOPSE-3.0/src/types/MoleculeStamp.cpp (file contents):
Revision 2493 by tim, Tue Dec 6 21:01:08 2005 UTC vs.
Revision 2507 by tim, Sat Dec 10 16:54:40 2005 UTC

# Line 202 | Line 202 | struct BendLessThan : public std::binary_function<IntT
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 };
212
205   void MoleculeStamp::checkBends() {
206      for(int i = 0; i < getNBends(); ++i) {
207          BendStamp* bendStamp = getBendStamp(i);
# Line 257 | Line 249 | void MoleculeStamp::checkBends() {
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();
# Line 344 | Line 336 | void MoleculeStamp::checkBends() {
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 < getNTorsions(); ++i) {
342          TorsionStamp* torsionStamp = getTorsionStamp(i);
# Line 385 | Line 363 | void MoleculeStamp::checkTorsions() {
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();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines