diff --git a/modules/mol/alg/pymod/structure_analysis.py b/modules/mol/alg/pymod/structure_analysis.py
index 662ed914da1da9c0655631133c19c7fcfe91e50e..761a308079cca5dd75a78cf641b6826e9c9c4770 100644
--- a/modules/mol/alg/pymod/structure_analysis.py
+++ b/modules/mol/alg/pymod/structure_analysis.py
@@ -84,3 +84,32 @@ def GetAlphaHelixContent(sele1):
   f=GetFrameFromEntity(eh)
   return f.GetAlphaHelixContent(sele1)
 
+
+def CalculateBestFitLine(sele1):
+  """
+  This function calculates the best fit line to the atoms in sele1.
+  Input:
+    sele1 : EntityView
+  It returns a geom::Line3
+  """
+  if not sele1.IsValid():
+    print 'invalid view'
+    return
+  eh=sele1.GetHandle()
+  f=GetFrameFromEntity(eh)
+  return f.GetODRLine(sele1)
+
+def CalculateBestFitPlane(sele1):
+  """
+  This function calculates the best fit plane to the atoms in sele1.
+  Input:
+    sele1 : EntityView
+  It returns a geom::Plane
+  """
+  if not sele1.IsValid():
+    print 'invalid view'
+    return
+  eh=sele1.GetHandle()
+  f=GetFrameFromEntity(eh)
+  return f.GetODRPlane(sele1)
+