Changes in src/analysis_correlation.cpp [c78d44:58bbd3]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/analysis_correlation.cpp
rc78d44 r58bbd3 179 179 } 180 180 181 // outmap = new PairCorrelationMap;182 // for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)183 // if ((*MolWalker)->ActiveFlag) {184 // double * FullMatrix = ReturnFullMatrixforSymmetric(World::getInstance().getDomain());185 // double * FullInverseMatrix = InverseMatrix(FullMatrix);186 // DoeLog(2) && (eLog()<< Verbose(2) << "Current molecule is " << *MolWalker << "." << endl);187 // for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {188 // DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);189 // if ((type1 == NULL) || ((*iter)->type == type1)) {190 // periodicX = *(*iter)->node;191 // periodicX.MatrixMultiplication(FullInverseMatrix); // x now in [0,1)^3192 // // go through every range in xyz and get distance193 // for (n[0]=-ranges[0]; n[0] <= ranges[0]; n[0]++)194 // for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)195 // for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {196 // checkX = Vector(n[0], n[1], n[2]) + periodicX;197 // checkX.MatrixMultiplication(FullMatrix);198 // for (MoleculeList::const_iterator MolOtherWalker = MolWalker; MolOtherWalker != molecules->ListOfMolecules.end(); MolOtherWalker++)199 // if ((*MolOtherWalker)->ActiveFlag) {200 // DoLog(2) && (Log() << Verbose(2) << "Current other molecule is " << *MolOtherWalker << "." << endl);201 // for (molecule::const_iterator runner = (*MolOtherWalker)->begin(); runner != (*MolOtherWalker)->end(); ++runner) {202 // DoLog(3) && (Log() << Verbose(3) << "Current otheratom is " << **runner << "." << endl);203 // if ((*iter)->nr < (*runner)->nr)204 // if ((type2 == NULL) || ((*runner)->type == type2)) {205 // periodicOtherX = *(*runner)->node;206 // periodicOtherX.MatrixMultiplication(FullInverseMatrix); // x now in [0,1)^3207 // // go through every range in xyz and get distance208 // for (Othern[0]=-ranges[0]; Othern[0] <= ranges[0]; Othern[0]++)209 // for (Othern[1]=-ranges[1]; Othern[1] <= ranges[1]; Othern[1]++)210 // for (Othern[2]=-ranges[2]; Othern[2] <= ranges[2]; Othern[2]++) {211 // checkOtherX = Vector(Othern[0], Othern[1], Othern[2]) + periodicOtherX;212 // checkOtherX.MatrixMultiplication(FullMatrix);213 // distance = checkX.distance(checkOtherX);214 // //Log() << Verbose(1) <<"Inserting " << *(*iter) << " and " << *(*runner) << endl;215 // outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> ((*iter), (*runner)) ) );216 // }217 // }218 // }219 // }220 // }221 // }222 // }223 // delete[](FullMatrix);224 // delete[](FullInverseMatrix);225 // }226 227 181 return outmap; 228 182 }; … … 239 193 CorrelationToPointMap *outmap = NULL; 240 194 double distance = 0.; 195 double *cell_size = World::getInstance().getDomain(); 241 196 242 197 if (molecules->ListOfMolecules.empty()) { … … 254 209 for (vector<element *>::const_iterator type = elements.begin(); type != elements.end(); ++type) 255 210 if ((*type == NULL) || ((*iter)->type == *type)) { 256 distance = (*iter)->node->PeriodicDistance(*point, World::getInstance().getDomain());211 distance = (*iter)->node->PeriodicDistance(*point, cell_size); 257 212 DoLog(4) && (Log() << Verbose(4) << "Current distance is " << distance << "." << endl); 258 213 outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> ((*iter), point) ) );
Note:
See TracChangeset
for help on using the changeset viewer.