Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/analysis_correlation.cpp

    r58bbd3 rc78d44  
    179179  }
    180180
     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)^3
     192//          // go through every range in xyz and get distance
     193//          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)^3
     207//                          // go through every range in xyz and get distance
     208//                          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
    181227  return outmap;
    182228};
     
    193239  CorrelationToPointMap *outmap = NULL;
    194240  double distance = 0.;
    195   double *cell_size = World::getInstance().getDomain();
    196241
    197242  if (molecules->ListOfMolecules.empty()) {
     
    209254        for (vector<element *>::const_iterator type = elements.begin(); type != elements.end(); ++type)
    210255          if ((*type == NULL) || ((*iter)->type == *type)) {
    211             distance = (*iter)->node->PeriodicDistance(*point, cell_size);
     256            distance = (*iter)->node->PeriodicDistance(*point, World::getInstance().getDomain());
    212257            DoLog(4) && (Log() << Verbose(4) << "Current distance is " << distance << "." << endl);
    213258            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.