Index: src/Analysis/analysis_correlation.cpp
===================================================================
--- src/Analysis/analysis_correlation.cpp	(revision d103d335f1f411ee26c2568846556af546c71b43)
+++ src/Analysis/analysis_correlation.cpp	(revision 59fff1699458425079bb0a93f0c33d6ce50aae7d)
@@ -212,5 +212,5 @@
     LOG(1,"INFO: Resulting relative angle for molecule " << _mol->getName()
         << " is " << angle << ".");
-    outmap->insert ( make_pair (angle, *iter ) );
+    outmap->insert ( std::make_pair (angle, *iter ) );
     ++i;
   }
@@ -322,5 +322,10 @@
                 distance = domain.periodicDistance((*iter)->getPosition(),(*runner)->getPosition());
                 //LOG(1, "Inserting " << *(*iter) << " and " << *(*runner));
-                outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> ((*iter), (*runner)) ) );
+                outmap->insert (
+                    std::pair<double, std::pair <const atom *, const atom*> > (
+                        distance,
+                        std::pair<const atom *, const atom*> ((*iter), (*runner))
+                        )
+                    );
               }
           }
@@ -403,5 +408,12 @@
                               distance = checkX.distance(checkOtherX);
                               //LOG(1, "Inserting " << *(*iter) << " and " << *(*runner));
-                              outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> ((*iter), (*runner)) ) );
+                              outmap->insert (
+                                  std::pair<double, std::pair <const atom *, const atom*> > (
+                                      distance,
+                                      std::pair<const atom *, const atom*> (
+                                          (*iter),
+                                          (*runner))
+                                      )
+                                  );
                             }
                       }
@@ -444,5 +456,12 @@
           distance = domain.periodicDistance((*iter)->getPosition(),*point);
           LOG(4, "Current distance is " << distance << ".");
-          outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> ((*iter), point) ) );
+          outmap->insert (
+              std::pair<double, std::pair<const atom *, const Vector*> >(
+                  distance,
+                  std::pair<const atom *, const Vector*> (
+                      (*iter),
+                      point)
+                  )
+              );
         }
     }
@@ -491,5 +510,13 @@
                 distance = checkX.distance(*point);
                 LOG(4, "Current distance is " << distance << ".");
-                outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> (*iter, point) ) );
+                outmap->insert (
+                    std::pair<double,
+                    std::pair<const atom *, const Vector*> >(
+                        distance,
+                        std::pair<const atom *, const Vector*> (
+                            *iter,
+                            point)
+                        )
+                    );
               }
         }
@@ -533,5 +560,13 @@
           distance = Intersections.GetSmallestDistance();
           triangle = Intersections.GetClosestTriangle();
-          outmap->insert ( pair<double, pair<atom *, BoundaryTriangleSet*> >(distance, pair<atom *, BoundaryTriangleSet*> ((*iter), triangle) ) );
+          outmap->insert (
+              std::pair<double,
+              std::pair<const atom *, BoundaryTriangleSet*> >(
+                  distance,
+                  std::pair<const atom *, BoundaryTriangleSet*> (
+                      (*iter),
+                      triangle)
+                  )
+              );
         }
     }
@@ -597,5 +632,13 @@
               }
           // insert
-          outmap->insert ( pair<double, pair<atom *, BoundaryTriangleSet*> >(ShortestDistance, pair<atom *, BoundaryTriangleSet*> (*iter, ShortestTriangle) ) );
+          outmap->insert (
+              std::pair<double,
+              std::pair<const atom *, BoundaryTriangleSet*> >(
+                  ShortestDistance,
+                  std::pair<const atom *, BoundaryTriangleSet*> (
+                      *iter,
+                      ShortestTriangle)
+                  )
+              );
           //LOG(1, "INFO: Inserting " << Walker << " with distance " << ShortestDistance << " to " << *ShortestTriangle << ".");
         }
Index: src/Analysis/analysis_correlation.hpp
===================================================================
--- src/Analysis/analysis_correlation.hpp	(revision d103d335f1f411ee26c2568846556af546c71b43)
+++ src/Analysis/analysis_correlation.hpp	(revision 59fff1699458425079bb0a93f0c33d6ce50aae7d)
@@ -46,9 +46,9 @@
 /********************************************** definitions *********************************/
 
-typedef multimap<double, pair<atom *, atom *> > PairCorrelationMap;
-typedef multimap<double, atom * > DipoleAngularCorrelationMap;
-typedef multimap<double, pair<molecule *, molecule *> > DipoleCorrelationMap;
-typedef multimap<double, pair<atom *, const Vector *> > CorrelationToPointMap;
-typedef multimap<double, pair<atom *, BoundaryTriangleSet *> > CorrelationToSurfaceMap;
+typedef multimap<double, pair<const atom *, const atom *> > PairCorrelationMap;
+typedef multimap<double, const atom * > DipoleAngularCorrelationMap;
+typedef multimap<double, pair<const molecule *, const molecule *> > DipoleCorrelationMap;
+typedef multimap<double, pair<const atom *, const Vector *> > CorrelationToPointMap;
+typedef multimap<double, pair<const atom *, BoundaryTriangleSet *> > CorrelationToSurfaceMap;
 typedef map<double, int> BinPairMap;
 
