Changeset 0d111b for molecuilder/src/analysis_correlation.cpp
- Timestamp:
- Apr 29, 2010, 1:55:21 PM (16 years ago)
- Children:
- 070651, 5d1a94
- Parents:
- 90c4460 (diff), 32842d8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
molecuilder/src/analysis_correlation.cpp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/analysis_correlation.cpp
r90c4460 r0d111b 57 57 if (Walker->nr < OtherWalker->nr) 58 58 if ((type2 == NULL) || (OtherWalker->type == type2)) { 59 distance = Walker->node->PeriodicDistance( OtherWalker->node, World::getInstance().getDomain());59 distance = Walker->node->PeriodicDistance(*OtherWalker->node, World::getInstance().getDomain()); 60 60 //Log() << Verbose(1) <<"Inserting " << *Walker << " and " << *OtherWalker << endl; 61 61 outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> (Walker, OtherWalker) ) ); … … 106 106 DoLog(3) && (Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl); 107 107 if ((type1 == NULL) || (Walker->type == type1)) { 108 periodicX .CopyVector(Walker->node);108 periodicX = *(Walker->node); 109 109 periodicX.MatrixMultiplication(FullInverseMatrix); // x now in [0,1)^3 110 110 // go through every range in xyz and get distance … … 112 112 for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++) 113 113 for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) { 114 checkX.Init(n[0], n[1], n[2]); 115 checkX.AddVector(&periodicX); 114 checkX = Vector(n[0], n[1], n[2]) + periodicX; 116 115 checkX.MatrixMultiplication(FullMatrix); 117 116 for (MoleculeList::const_iterator MolOtherWalker = MolWalker; MolOtherWalker != molecules->ListOfMolecules.end(); MolOtherWalker++) … … 124 123 if (Walker->nr < OtherWalker->nr) 125 124 if ((type2 == NULL) || (OtherWalker->type == type2)) { 126 periodicOtherX .CopyVector(OtherWalker->node);125 periodicOtherX = *(OtherWalker->node); 127 126 periodicOtherX.MatrixMultiplication(FullInverseMatrix); // x now in [0,1)^3 128 127 // go through every range in xyz and get distance … … 130 129 for (Othern[1]=-ranges[1]; Othern[1] <= ranges[1]; Othern[1]++) 131 130 for (Othern[2]=-ranges[2]; Othern[2] <= ranges[2]; Othern[2]++) { 132 checkOtherX.Init(Othern[0], Othern[1], Othern[2]); 133 checkOtherX.AddVector(&periodicOtherX); 131 checkOtherX = Vector(Othern[0], Othern[1], Othern[2]) + periodicOtherX; 134 132 checkOtherX.MatrixMultiplication(FullMatrix); 135 distance = checkX.Distance( &checkOtherX);133 distance = checkX.Distance(checkOtherX); 136 134 //Log() << Verbose(1) <<"Inserting " << *Walker << " and " << *OtherWalker << endl; 137 135 outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> (Walker, OtherWalker) ) ); … … 176 174 DoLog(3) && (Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl); 177 175 if ((type == NULL) || (Walker->type == type)) { 178 distance = Walker->node->PeriodicDistance( point, World::getInstance().getDomain());176 distance = Walker->node->PeriodicDistance(*point, World::getInstance().getDomain()); 179 177 DoLog(4) && (Log() << Verbose(4) << "Current distance is " << distance << "." << endl); 180 178 outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> (Walker, point) ) ); … … 218 216 DoLog(3) && (Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl); 219 217 if ((type == NULL) || (Walker->type == type)) { 220 periodicX .CopyVector(Walker->node);218 periodicX = *(Walker->node); 221 219 periodicX.MatrixMultiplication(FullInverseMatrix); // x now in [0,1)^3 222 220 // go through every range in xyz and get distance … … 224 222 for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++) 225 223 for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) { 226 checkX.Init(n[0], n[1], n[2]); 227 checkX.AddVector(&periodicX); 224 checkX = Vector(n[0], n[1], n[2]) + periodicX; 228 225 checkX.MatrixMultiplication(FullMatrix); 229 distance = checkX.Distance( point);226 distance = checkX.Distance(*point); 230 227 DoLog(4) && (Log() << Verbose(4) << "Current distance is " << distance << "." << endl); 231 228 outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> (Walker, point) ) ); … … 322 319 DoLog(3) && (Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl); 323 320 if ((type == NULL) || (Walker->type == type)) { 324 periodicX .CopyVector(Walker->node);321 periodicX = *(Walker->node); 325 322 periodicX.MatrixMultiplication(FullInverseMatrix); // x now in [0,1)^3 326 323 // go through every range in xyz and get distance … … 329 326 for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++) 330 327 for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) { 331 checkX.Init(n[0], n[1], n[2]); 332 checkX.AddVector(&periodicX); 328 checkX = Vector(n[0], n[1], n[2]) + periodicX; 333 329 checkX.MatrixMultiplication(FullMatrix); 334 330 TriangleIntersectionList Intersections(&checkX,Surface,LC); … … 402 398 *file << runner->first; 403 399 for (int i=0;i<NDIM;i++) 404 *file << "\t" << setprecision(8) << (runner->second.first->node-> x[i] - runner->second.second->x[i]);400 *file << "\t" << setprecision(8) << (runner->second.first->node->at(i) - runner->second.second->at(i)); 405 401 *file << endl; 406 402 }
Note:
See TracChangeset
for help on using the changeset viewer.
