diff --git a/modules/mol/alg/pymod/export_structure_analysis.cc b/modules/mol/alg/pymod/export_structure_analysis.cc
index 4a07ad5687dde446003d82ec5db8bc3cf8d310a6..5a91310949eab28d1ba49dfdaa42763c8beff47e 100644
--- a/modules/mol/alg/pymod/export_structure_analysis.cc
+++ b/modules/mol/alg/pymod/export_structure_analysis.cc
@@ -28,5 +28,6 @@ void export_StructureAnalysis()
 {
   def("GetPosListFromView",&GetPosListFromView, (arg("view")));
   def("CalculateAverageAgreementWithDensityMap",&CalculateAverageAgreementWithDensityMap,(arg("pos_list"),arg("density_map")));
+  def("CalculateAgreementWithDensityMap",&CalculateAgreementWithDensityMap,(arg("pos_list"),arg("density_map")));
   def("WrapEntityInPeriodicCell",&WrapEntityInPeriodicCell,(arg("Entity"),arg("cell_center"),arg("nasis_vec")));
 }
\ No newline at end of file
diff --git a/modules/mol/alg/src/structure_analysis.cc b/modules/mol/alg/src/structure_analysis.cc
index f4d4a50ba66044b8edc870e340ad6e5d7138bd3d..73bfca844b831e7afac45ef09ec73d0f4345233b 100644
--- a/modules/mol/alg/src/structure_analysis.cc
+++ b/modules/mol/alg/src/structure_analysis.cc
@@ -38,15 +38,24 @@ geom::Vec3List GetPosListFromView(const EntityView& view){
   }
   return vl;
 }    
-  
-Real CalculateAverageAgreementWithDensityMap(const geom::Vec3List& vl, img::MapHandle& density_map){
-  Real sum,v;
-  sum=0;
+
+std::vector<Real> CalculateAgreementWithDensityMap(const geom::Vec3List& vl, img::MapHandle& density_map){
   CheckHandleValidity(density_map);
+  std::vector<Real> v;
+  v.reserve(vl.size());
   for (geom::Vec3List::const_iterator v1=vl.begin(),e=vl.end(); v1!=e; ++v1) {
     img::Point p(density_map.CoordToIndex(*v1));
-    v=density_map.GetReal(p);
-    sum=sum+v;
+    v.push_back(density_map.GetReal(p));
+  }
+  return v;
+}
+  
+Real CalculateAverageAgreementWithDensityMap(const geom::Vec3List& vl, img::MapHandle& density_map){
+  CheckHandleValidity(density_map);
+  std::vector<Real> v=CalculateAgreementWithDensityMap(vl, density_map);
+  Real sum=0.0;
+  for (std::vector<Real>::const_iterator i=v.begin(),e=v.end(); i!=e; ++i) {
+    sum=sum+*i;
   }
   return sum/float(vl.size());
 }
diff --git a/modules/mol/alg/src/structure_analysis.hh b/modules/mol/alg/src/structure_analysis.hh
index 529357037fbd00febf3d31ac1eb1d035a961a373..798dc09739f93f8c9cf5921119be590a103c4458 100644
--- a/modules/mol/alg/src/structure_analysis.hh
+++ b/modules/mol/alg/src/structure_analysis.hh
@@ -32,6 +32,7 @@
 
 namespace ost { namespace mol { namespace alg {
   geom::Vec3List DLLEXPORT_OST_MOL_ALG GetPosListFromView(const EntityView& view);
+  std::vector<Real> DLLEXPORT_OST_MOL_ALG CalculateAgreementWithDensityMap(const geom::Vec3List& vl, img::MapHandle& density_map);
   Real DLLEXPORT_OST_MOL_ALG CalculateAverageAgreementWithDensityMap(const geom::Vec3List& vl, img::MapHandle& density_map);
   void DLLEXPORT_OST_MOL_ALG WrapEntityInPeriodicCell(EntityHandle eh, const geom::Vec3 cell_center, const geom::Vec3 basis_vec);
 }}}//ns