diff --git a/modules/mol/alg/pymod/structure_analysis.py b/modules/mol/alg/pymod/structure_analysis.py
index 761a308079cca5dd75a78cf641b6826e9c9c4770..7cbd0dd4b32bb7e6f4093ed23bbbb52a700fc320 100644
--- a/modules/mol/alg/pymod/structure_analysis.py
+++ b/modules/mol/alg/pymod/structure_analysis.py
@@ -113,3 +113,19 @@ def CalculateBestFitPlane(sele1):
   f=GetFrameFromEntity(eh)
   return f.GetODRPlane(sele1)
 
+def CalculateHelixAxis(sele1):
+  """
+  This function calculates the best fit cylinder to the CA atoms in sele1,
+  and returns its axis as a Line3.  residues should be ordered correctly
+  in the EntityView.
+  Input:
+    sele1 : EntityView
+  It returns a geom::Line3
+  """
+  if not sele1.IsValid():
+    print 'invalid view'
+    return
+  eh=sele1.GetHandle()
+  f=GetFrameFromEntity(eh)
+  return f.FitCylinder(sele1)
+