Index: fittingview/src/sans/perspectives/fitting/models.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/models.py	(revision 0da4eba9ae2364228607b8b104a26ea93d6e3f51)
+++ fittingview/src/sans/perspectives/fitting/models.py	(revision f518eef6514f2ec3d3901bc5700fd103f33301da)
@@ -587,4 +587,8 @@
         self.shape_indep_list.append(GelFitModel)
         self.model_name_list.append(GelFitModel.__name__)
+        
+        from sans.models.FractalO_Z import FractalO_Z
+        self.shape_indep_list.append(FractalO_Z)
+        self.model_name_list.append(FractalO_Z.__name__)
     
         #Looking for plugins
Index: sansmodels/include/FractalQtoN.h
===================================================================
--- sansmodels/include/FractalQtoN.h	(revision f518eef6514f2ec3d3901bc5700fd103f33301da)
+++ sansmodels/include/FractalQtoN.h	(revision f518eef6514f2ec3d3901bc5700fd103f33301da)
@@ -0,0 +1,50 @@
+#if !defined(FractalQtoN_h)
+#define FractalQtoN_h
+#include "parameters.hh"
+
+/**
+ * Structure definition for FractalO_Z (factor) parameters
+ */
+//[PYTHONCLASS] = FractalO_Z
+//[DESCRIPTION] =<text>Structure factor for interacting particles:                   
+// Schmidt J Appl Cryst (1991), 24, 414-435 See equation (19)
+// Hurd; Schaefer; Martin, Phys Rev A (1987), 35, 2361-2364 See equation (2)
+// </text>.
+
+class FractalO_Z{
+public:
+
+  // Model parameters
+
+  /// Something scale
+  //  [DEFAULT]=scale= 10000.0
+  Parameter scale;
+
+  //  [DEFAULT]=m_fractal= 1.8
+  Parameter m_fractal;
+
+  //  [DEFAULT]=cluster_rg= 3520.0
+  Parameter cluster_rg;
+  
+  //  [DEFAULT]=s_fractal= 2.5
+  Parameter s_fractal;
+
+  //  [DEFAULT]=primary_rg= 82.0
+  Parameter primary_rg;
+
+  //  [DEFAULT]=background= 0.01
+  Parameter background;
+
+
+  // Constructor
+  FractalO_Z();
+
+  // Operators to get I(Q)
+  double operator()(double q);
+  double operator()(double qx, double qy);
+  double calculate_ER();
+  double calculate_VR();
+  double evaluate_rphi(double q, double phi);
+};
+
+#endif
Index: sansmodels/src/c_models/FractalQtoN.cpp
===================================================================
--- sansmodels/src/c_models/FractalQtoN.cpp	(revision f518eef6514f2ec3d3901bc5700fd103f33301da)
+++ sansmodels/src/c_models/FractalQtoN.cpp	(revision f518eef6514f2ec3d3901bc5700fd103f33301da)
@@ -0,0 +1,146 @@
+
+/*
+	This software was developed by the University of Tennessee as part of the
+	Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
+	project funded by the US National Science Foundation.
+
+	If you use DANSE applications to do scientific research that leads to
+	publication, we ask that you acknowledge the use of the software with the
+	following sentence:
+
+	"This work benefited from DANSE software developed under NSF award DMR-0520547."
+
+	copyright 2008, University of Tennessee
+
+    See Schmidt, J Appl Cryst, 24, (1991), 414-435, Eqn (19)
+    See Hurd, Schaefer & Martin, 35, (1987), 2361-2364
+
+    Ported to C++ from Fortran by Robert Whitley (2012)
+*/
+
+#include <math.h>
+#include "parameters.hh"
+#include <stdio.h>
+#include "FractalQtoN.h"
+using namespace std;
+
+FractalO_Z::FractalO_Z()
+{
+    scale = Parameter(10000.0, true);
+    m_fractal = Parameter(1.8);
+    cluster_rg = Parameter(3250.0);
+    s_fractal = Parameter(2.5);
+    primary_rg = Parameter(82.0);
+    background = Parameter(0.01);
+}
+
+double FractalO_Z :: operator()(double q)
+{
+    double dp[3];
+    dp[0] = m_fractal();
+    dp[1] = s_fractal();
+    
+    
+    if (dp[0] <= 0)
+    {
+        //std::cout << "\n\nThe mass fractal dimension must be > 0!";
+        //std::cout << "\nWill set to 3.";
+        dp[0] = 3.0;
+    }
+    else 
+    {
+        if (dp[0] > 6)
+        {
+            //std::cout << "\n\nThe mass fractal dimension must be <= 6!";
+            //std::cout << "\nWill be set to 3."; 
+            dp[0] = 3.0;
+        }
+    }
+    
+    if (dp[1] <= 0)
+    {
+        //std::cout << "\n\nThe surface dimension must be > 0!";
+        //std::cout << "\nWill be set to 2.";
+        dp[1] = 2.0;
+    }
+    else
+    {
+        if (dp[1] > 6)
+        {
+            //std::cout << "\n\nThe surface dimension must be <= 6!";
+            //std::cout << "\nWill be set to 2.";
+            dp[1] = 2.0;
+        }
+    }
+    
+    double a(dp[0]/2.0);
+    double b((cluster_rg() * cluster_rg())/(3.0*a) );
+    
+    // If C goes negative, it will crash with undefined exponentiation.
+    // So (Ds + Dm) <= 6
+    // c = ((ds-6.0)/-2.0)-a
+    if ((dp[1] > (6.0-dp[0])) && (primary_rg() > 0.0))
+    {
+        dp[1] = 6.0 - dp[0];
+        //std::cout << "\n\nThe surface fractal dimension must be <= (6-Dm)!\n";
+        //std::cout << setprecision(5) << fixed << dp[1];
+    }
+    
+    // c = (ds -6.0 + dm)/-2.0;
+    double c = (6.0 - dp[1] - dp[0])/2.0;
+    double d(0.0);
+    
+    // If c = 0 then it will crash with a floating divide by zero.
+    if (c == 0)
+    {
+        d = 1.0e+37;
+    }
+    else
+    {
+        d = (primary_rg() * primary_rg()) / (3.0 * c);
+    }
+
+    double eVar = q*q*b;
+    double fVar = q*q*d;
+    double g = pow((1.0+eVar),a);
+    double h = pow((1.0+fVar),c);
+    double i = g*h;
+    double result((scale()/i) + background() );
+    return result;
+}
+
+
+/**
+ * Function to evaluate 2D scattering function
+ * @param q_x: value of Q along x
+ * @param q_y: value of Q along y
+ * @return: function value
+ */
+double FractalO_Z :: operator()(double qx, double qy) {
+  double q = sqrt(qx*qx + qy*qy);
+  return (*this).operator()(q);
+}
+
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the cylinder
+ * @param q: q-value
+ * @param phi: angle phi
+ * @return: function value
+ */
+double FractalO_Z :: evaluate_rphi(double q, double phi) {
+  double qx = q*cos(phi);
+  double qy = q*sin(phi);
+  return (*this).operator()(qx, qy);
+}
+/**
+ * Function to calculate effective radius
+ * @return: effective radius value
+ */
+double FractalO_Z :: calculate_ER() {
+  //NOT implemented yet!!!
+  return 0.0;
+}
+double FractalO_Z :: calculate_VR() {
+  return 1.0;
+}
