Index: sansmodels/src/sans/models/c_extensions/Hardsphere.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/Hardsphere.c	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_extensions/Hardsphere.c	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,37 @@
+/**
+ * Structure factor for a hardsphere
+ * @author: Jae Hie Cho / UTK
+ */
+
+#include "Hardsphere.h"
+#include "libStructureFactor.h"
+#include <math.h>
+#include <stdio.h>
+
+/**
+ * Function to evaluate 1D scattering function
+ * @param pars: parameters of the HardsphereStructure 
+ * @param q: q-value
+ * @return: function value
+ */
+double Hardsphere_analytical_1D(HardsphereParameters *pars, double q) {
+	double dp[2];
+	
+	dp[0] = pars->radius;
+	dp[1] = pars->volfraction;	
+	return HardSphereStruct(dp, q);
+}
+    
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the HardsphereStructure
+ * @param q: q-value
+ * @return: function value
+ */
+double Hardsphere_analytical_2D(HardsphereParameters *pars, double q, double phi) {
+	return Hardsphere_analytical_1D(pars,q);
+}
+
+double Hardsphere_analytical_2DXY(HardsphereParameters *pars, double qx, double qy){
+	return Hardsphere_analytical_1D(pars,sqrt(qx*qx+qy*qy));	
+}
Index: sansmodels/src/sans/models/c_extensions/Hardsphere.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/Hardsphere.h	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_extensions/Hardsphere.h	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,42 @@
+#if !defined(Hardsphere_h)
+#define Hardsphere_h
+
+/**
+ * Structure definition for HardsphereStructure (factor) parameters
+ */
+ //[PYTHONCLASS] = HardsphereStructure
+ //[DISP_PARAMS] = radius
+ //[DESCRIPTION] =<text>Structure factor for interacting particles:
+ //
+ //  The interparticle potential is
+ //
+ //                     U(r)= inf   , r < 2R
+ //                         = 0     , r >= 2R
+ //
+ //						R: radius of the Hardsphere particle
+ //						V:The volume fraction 
+ //
+ //    Ref: Percus., J. K.,etc., J. Phy. Rev. 
+ //    1958, 110, 1.
+ //	 </text>
+ //[FIXED]= radius.width  
+typedef struct {
+    /// Radius of hardsphere [A]
+    //  [DEFAULT]=radius=50.0 A
+    double radius;
+
+    ///	Volume fraction
+    //  [DEFAULT]=volfraction= 0.2
+    double volfraction;
+} HardsphereParameters;
+
+
+
+/// 1D scattering function
+double Hardsphere_analytical_1D(HardsphereParameters *pars, double q);
+
+/// 2D scattering function
+double Hardsphere_analytical_2D(HardsphereParameters *pars, double q, double phi);
+double Hardsphere_analytical_2DXY(HardsphereParameters *pars, double qx, double qy);
+
+#endif
Index: sansmodels/src/sans/models/c_extensions/HayterMSA.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/HayterMSA.c	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_extensions/HayterMSA.c	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,42 @@
+/**
+ * SquareWell Structure factor 
+ * @author: Jae Hie Cho / UTK
+ */
+
+#include "HayterMSA.h"
+#include "libStructureFactor.h"
+#include <math.h>
+
+
+/**
+ * Function to evaluate 1D scattering function
+ * @param pars: parameters of the HayterPenfoldMSA
+ * @param q: q-value
+ * @return: function value
+ */
+double HayterMSA_analytical_1D(HayterMSAParameters *pars, double q) {
+	double dp[6];
+
+	dp[0] = pars->radius;
+	dp[1] = pars->charge;
+	dp[1] = pars->volfraction;
+	dp[3] = pars->temperature;
+	dp[4] = pars->saltconc;
+	dp[5] = pars->dielectconst;
+	
+	return HayterPenfoldMSA(dp, q);
+}
+    
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the HayterPenfoldMSA
+ * @param q: q-value
+ * @return: function value
+ */
+double HayterMSA_analytical_2D(HayterMSAParameters *pars, double q, double phi) {
+	return HayterMSA_analytical_1D(pars,q);
+}
+
+double HayterMSA_analytical_2DXY(HayterMSAParameters *pars, double qx, double qy){
+	return HayterMSA_analytical_1D(pars,sqrt(qx*qx+qy*qy));	
+}
Index: sansmodels/src/sans/models/c_extensions/HayterMSA.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/HayterMSA.h	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_extensions/HayterMSA.h	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,60 @@
+#if !defined(HayterMSA_h)
+#define HayterMSA_h
+
+/**
+ * Structure definition for screened Coulomb interaction
+ */
+ //[PYTHONCLASS] = HayterMSAStructure
+ //[DISP_PARAMS] = radius
+ //[DESCRIPTION] =<text>To calculate the structure factor (the Fourier transform   
+ //                     of the pair correlation function g(r)) for 
+ //                     a system of charged, spheroidal objects in    
+ //                     a dielectric medium. When combined with an 
+ //                     appropriate form factor, this allows 
+ //                     for inclusion of the interparticle 
+ //                     interference effects due to screened coulomb 
+ //                     repulsion between charged particles.
+ //                     (note: charge > 0 required.)
+ //
+ //                     Ref: JP Hansen and JB Hayter, Molecular 
+ //                           Physics 46, 651-656 (1982).
+ //
+ //				</text>
+ //[FIXED]= radius.width  
+ 
+typedef struct {
+    ///	Radius of particle [A]
+    //  [DEFAULT]=radius=20.75 A
+    double radius;
+
+    /// charge
+    //  [DEFAULT]=charge= 19
+    double charge;
+
+    /// Volume fraction
+    //  [DEFAULT]=volfraction= 0.0192
+    double volfraction;
+
+	///	Temperature [K]
+    //  [DEFAULT]=temperature= 318.16 K 
+    double temperature;
+
+	///	Monovalent salt concentration [M] 
+    //  [DEFAULT]=saltconc= 0 
+    double saltconc;
+
+    ///	Dielectric constant of solvent 
+    //  [DEFAULT]=dielectconst= 71.08 
+    double dielectconst;
+} HayterMSAParameters;
+
+
+
+/// 1D scattering function
+double HayterMSA_analytical_1D(HayterMSAParameters *pars, double q);
+
+/// 2D scattering function
+double HayterMSA_analytical_2D(HayterMSAParameters *pars, double q, double phi);
+double HayterMSA_analytical_2DXY(HayterMSAParameters *pars, double qx, double qy);
+
+#endif
Index: sansmodels/src/sans/models/c_extensions/SquareWell.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/SquareWell.c	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_extensions/SquareWell.c	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,42 @@
+/**
+ * SquareWell Structure factor 
+ * @author: Jae Hie Cho / UTK
+ */
+
+#include "SquareWell.h"
+#include "libStructureFactor.h"
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+
+/**
+ * Function to evaluate 1D scattering function
+ * @param pars: parameters of the SquareWellStruct
+ * @param q: q-value
+ * @return: function value
+ */
+double SquareWell_analytical_1D(SquareWellParameters *pars, double q) {
+	double dp[4];
+
+	dp[0] = pars->radius;
+	dp[1] = pars->volfraction;
+	dp[2] = pars->welldepth;
+	dp[3] = pars->wellwidth;
+	
+	return SquareWellStruct(dp, q);
+}
+    
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the SquareWellStruct
+ * @param q: q-value
+ * @return: function value
+ */
+double SquareWell_analytical_2D(SquareWellParameters *pars, double q, double phi) {
+	return SquareWell_analytical_1D(pars,q);
+}
+
+double SquareWell_analytical_2DXY(SquareWellParameters *pars, double qx, double qy){
+	return SquareWell_analytical_1D(pars,sqrt(qx*qx+qy*qy));	
+}
Index: sansmodels/src/sans/models/c_extensions/SquareWell.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/SquareWell.h	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_extensions/SquareWell.h	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,54 @@
+#if !defined(SquareWell_h)
+#define SquareWell_h
+
+/**Structure definition for SquareWell parameters
+*/
+//   [PYTHONCLASS] = SquareWellStructure
+//   [DISP_PARAMS] = radius
+//   [DESCRIPTION] = <text> Structure Factor for interacting particles:
+//
+//  The interaction potential is
+//
+//		U(r)= inf   , r < 2R
+//			= -d    , 2R <= r <=2Rw
+//			= 0     , r >= 2Rw
+//
+//		R: radius (A)of the particle, v: volume fraction
+//		d: well depth
+//		w: well width; multiples of the particle diameter
+//
+//		Ref: Sharma, R. V.; Sharma, K. C., Physica, 
+//            1977, 89A, 213.
+//   			</text>
+//   [FIXED]= radius.width 
+
+
+typedef struct {
+    ///	Radius of particle [A]
+    //  [DEFAULT]=radius=50.0 A
+    double radius;
+
+    /// Volume fraction
+    //  [DEFAULT]=volfraction= 0.040
+    double volfraction;
+
+    ///	Well depth [kT]
+    //  [DEFAULT]=welldepth= 1.50 kT
+    double welldepth;
+
+    ///	Well width 
+    //  [DEFAULT]=wellwidth= 1.20 
+    double wellwidth;
+
+} SquareWellParameters;
+
+
+
+/// 1D scattering function
+double SquareWell_analytical_1D(SquareWellParameters *pars, double q);
+
+/// 2D scattering function
+double SquareWell_analytical_2D(SquareWellParameters *pars, double q, double phi);
+double SquareWell_analytical_2DXY(SquareWellParameters *pars, double qx, double qy);
+
+#endif
Index: sansmodels/src/sans/models/c_extensions/StickyHS.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/StickyHS.c	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_extensions/StickyHS.c	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,39 @@
+/**
+ * Structure factor for a hardsphere
+ * @author: Jae Hie Cho / UTK
+ */
+
+#include "StickyHS.h"
+#include "libStructureFactor.h"
+#include <math.h>
+
+
+/**
+ * Function to evaluate 1D scattering function
+ * @param pars: parameters of the StickyHS_struct
+ * @param q: q-value
+ * @return: function value
+ */
+double StickyHS_analytical_1D(StickyHSParameters *pars, double q) {
+	double dp[4];
+	
+	dp[0] = pars->radius;
+	dp[1] = pars->volfraction;	
+	dp[2] = pars->perturb;
+	dp[3] = pars->stickiness;	
+	return StickyHS_Struct(dp, q);
+}
+    
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the StickyHS_struct
+ * @param q: q-value
+ * @return: function value
+ */
+double StickyHS_analytical_2D(StickyHSParameters *pars, double q, double phi) {
+	return StickyHS_analytical_1D(pars,q);
+}
+
+double StickyHS_analytical_2DXY(StickyHSParameters *pars, double qx, double qy){
+	return StickyHS_analytical_1D(pars,sqrt(qx*qx+qy*qy));	
+}
Index: sansmodels/src/sans/models/c_extensions/StickyHS.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/StickyHS.h	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_extensions/StickyHS.h	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,54 @@
+#if !defined(StickyHS_h)
+#define StickyHS_h
+
+/**
+ * Structure definition for StickyHS_struct (struncture factor) parameters
+ */
+ //[PYTHONCLASS] = StickyHSStructure
+ //[DISP_PARAMS] = radius
+ //[DESCRIPTION] =<text> Structure Factor for interacting particles:
+ //
+ //  The interaction potential is
+ //
+ //                     U(r)= inf , r < 2R
+ //                         = -Uo  , 2R < r < 2R + w
+ //                         = 0   , r >= 2R +w
+ //
+ //						R: radius of the hardsphere 
+ //                     stickiness = [exp(Uo/kT)]/(12*perturb)
+ //                     perturb = w/(w+ 2R) , 0.01 =< w <= 0.1
+ //                     w: The width of the square well ,w > 0
+ //						v: The volume fraction , v > 0
+ //
+ //                     Ref: Menon, S. V. G.,et.al., J. Chem. Phys., 
+ //                          1991, 95(12), 9186-9190.
+ //				</text>
+ //[FIXED]= radius.width  
+typedef struct {
+    /// Radius of hardsphere [A]
+    //  [DEFAULT]=radius=50.0 A
+    double radius;
+
+    ///	Volume fraction
+    //  [DEFAULT]=volfraction= 0.1
+    double volfraction;
+
+	/// Perturbation Parameter ( between 0.01 - 0.1)
+    //  [DEFAULT]=perturb=0.05
+    double perturb;
+
+    ///	Stickiness
+    //  [DEFAULT]=stickiness= 0.2
+    double stickiness;
+} StickyHSParameters;
+
+
+
+/// 1D scattering function
+double StickyHS_analytical_1D(StickyHSParameters *pars, double q);
+
+/// 2D scattering function
+double StickyHS_analytical_2D(StickyHSParameters *pars, double q, double phi);
+double StickyHS_analytical_2DXY(StickyHSParameters *pars, double qx, double qy);
+
+#endif
Index: sansmodels/src/sans/models/c_extensions/c_models.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/c_models.c	(revision af03ddd0932915d6659404ab7824e4223ea2944f)
+++ sansmodels/src/sans/models/c_extensions/c_models.c	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -31,4 +31,8 @@
 	addCEllipsoidModel(m);
 	addCSphereModel(m);
+	addCHardsphereStructure(m);
+	addCStickyHSStructure(m);
+	addCHayterMSAStructure(m);
+	addCSquareWellStructure(m);
 	addCEllipticalCylinderModel(m);
 	addDisperser(m);
Index: sansmodels/src/sans/models/c_extensions/core_shell.h
===================================================================
--- sansmodels/src/sans/models/c_extensions/core_shell.h	(revision 836fe6e73d15cf2f32c74bbf3b953b37d776f2ff)
+++ sansmodels/src/sans/models/c_extensions/core_shell.h	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -7,5 +7,15 @@
  //[PYTHONCLASS] = CoreShellModel
  //[DISP_PARAMS] = radius, thickness
- //[DESCRIPTION] =""
+ //[DESCRIPTION] =<text> Form factor for a monodisperse spherical
+ //                         particle with a core-shell structure:
+ //                       The form factor is normalized by the 
+ //                        total particle volume.
+ // 
+ //						radius: core radius
+ //                     thickness: shell thickness
+ //
+ //                     Ref: Guinier, A. and G. Fournet, 
+ //                          John Wiley and Sons, New York, 1955.
+ //				</text>
  //[FIXED]= <text> thickness.width;radius.width</text>
 typedef struct {
Index: sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,357 @@
+/**
+	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
+ */
+
+/** CHardsphereStructure
+ *
+ * C extension 
+ *
+ * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
+ *          DO NOT MODIFY THIS FILE, MODIFY Hardsphere.h
+ *          AND RE-RUN THE GENERATOR SCRIPT
+ *
+ */
+ 
+extern "C" {
+#include <Python.h>
+#include "structmember.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <time.h>
+#include "Hardsphere.h"
+}
+
+#include "models.hh"
+#include "dispersion_visitor.hh"
+
+/// Error object for raised exceptions
+static PyObject * CHardsphereStructureError = NULL;
+
+
+// Class definition
+typedef struct {
+    PyObject_HEAD
+    /// Parameters
+    PyObject * params;
+    /// Dispersion parameters
+    PyObject * dispersion;
+    /// Underlying model object
+    HardsphereStructure * model;
+    /// Log for unit testing
+    PyObject * log;
+} CHardsphereStructure;
+
+
+static void
+CHardsphereStructure_dealloc(CHardsphereStructure* self)
+{
+    self->ob_type->tp_free((PyObject*)self);
+    
+
+}
+
+static PyObject *
+CHardsphereStructure_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+    CHardsphereStructure *self;
+    
+    self = (CHardsphereStructure *)type->tp_alloc(type, 0);
+   
+    return (PyObject *)self;
+}
+
+static int
+CHardsphereStructure_init(CHardsphereStructure *self, PyObject *args, PyObject *kwds)
+{
+    if (self != NULL) {
+    	
+    	// Create parameters
+        self->params = PyDict_New();
+        self->dispersion = PyDict_New();
+        self->model = new HardsphereStructure();
+        
+        // Initialize parameter dictionary
+        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",50.000000));
+        PyDict_SetItemString(self->params,"volfraction",Py_BuildValue("d",0.200000));
+        // Initialize dispersion / averaging parameter dict
+        DispersionVisitor* visitor = new DispersionVisitor();
+        PyObject * disp_dict;
+        disp_dict = PyDict_New();
+        self->model->radius.dispersion->accept_as_source(visitor, self->model->radius.dispersion, disp_dict);
+        PyDict_SetItemString(self->dispersion, "radius", disp_dict);
+
+
+         
+        // Create empty log
+        self->log = PyDict_New();
+        
+        
+
+    }
+    return 0;
+}
+
+static PyMemberDef CHardsphereStructure_members[] = {
+    {"params", T_OBJECT, offsetof(CHardsphereStructure, params), 0,
+     "Parameters"},
+	{"dispersion", T_OBJECT, offsetof(CHardsphereStructure, dispersion), 0,
+	  "Dispersion parameters"},     
+    {"log", T_OBJECT, offsetof(CHardsphereStructure, log), 0,
+     "Log"},
+    {NULL}  /* Sentinel */
+};
+
+/** Read double from PyObject
+    @param p PyObject
+    @return double
+*/
+double CHardsphereStructure_readDouble(PyObject *p) {
+    if (PyFloat_Check(p)==1) {
+        return (double)(((PyFloatObject *)(p))->ob_fval);
+    } else if (PyInt_Check(p)==1) {
+        return (double)(((PyIntObject *)(p))->ob_ival);
+    } else if (PyLong_Check(p)==1) {
+        return (double)PyLong_AsLong(p);
+    } else {
+        return 0.0;
+    }
+}
+
+
+/**
+ * Function to call to evaluate model
+ * @param args: input q or [q,phi]
+ * @return: function value
+ */
+static PyObject * run(CHardsphereStructure *self, PyObject *args) {
+	double q_value, phi_value;
+	PyObject* pars;
+	int npars;
+	
+	// Get parameters
+	
+	    // Reader parameter dictionary
+    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
+    self->model->volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
+    // Read in dispersion parameters
+    PyObject* disp_dict;
+    DispersionVisitor* visitor = new DispersionVisitor();
+    disp_dict = PyDict_GetItemString(self->dispersion, "radius");
+    self->model->radius.dispersion->accept_as_destination(visitor, self->model->radius.dispersion, disp_dict);
+
+	
+	// Get input and determine whether we have to supply a 1D or 2D return value.
+	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
+	    PyErr_SetString(CHardsphereStructureError, 
+	    	"CHardsphereStructure.run expects a q value.");
+		return NULL;
+	}
+	  
+	// Check params
+	if( PyList_Check(pars)==1) {
+		
+		// Length of list should be 2 for I(q,phi)
+	    npars = PyList_GET_SIZE(pars); 
+	    if(npars!=2) {
+	    	PyErr_SetString(CHardsphereStructureError, 
+	    		"CHardsphereStructure.run expects a double or a list of dimension 2.");
+	    	return NULL;
+	    }
+	    // We have a vector q, get the q and phi values at which
+	    // to evaluate I(q,phi)
+	    q_value = CHardsphereStructure_readDouble(PyList_GET_ITEM(pars,0));
+	    phi_value = CHardsphereStructure_readDouble(PyList_GET_ITEM(pars,1));
+	    // Skip zero
+	    if (q_value==0) {
+	    	return Py_BuildValue("d",0.0);
+	    }
+		return Py_BuildValue("d",(*(self->model)).evaluate_rphi(q_value,phi_value));
+
+	} else {
+
+		// We have a scalar q, we will evaluate I(q)
+		q_value = CHardsphereStructure_readDouble(pars);		
+		
+		return Py_BuildValue("d",(*(self->model))(q_value));
+	}	
+}
+
+/**
+ * Function to call to evaluate model in cartesian coordinates
+ * @param args: input q or [qx, qy]]
+ * @return: function value
+ */
+static PyObject * runXY(CHardsphereStructure *self, PyObject *args) {
+	double qx_value, qy_value;
+	PyObject* pars;
+	int npars;
+	
+	// Get parameters
+	
+	    // Reader parameter dictionary
+    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
+    self->model->volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
+    // Read in dispersion parameters
+    PyObject* disp_dict;
+    DispersionVisitor* visitor = new DispersionVisitor();
+    disp_dict = PyDict_GetItemString(self->dispersion, "radius");
+    self->model->radius.dispersion->accept_as_destination(visitor, self->model->radius.dispersion, disp_dict);
+
+	
+	// Get input and determine whether we have to supply a 1D or 2D return value.
+	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
+	    PyErr_SetString(CHardsphereStructureError, 
+	    	"CHardsphereStructure.run expects a q value.");
+		return NULL;
+	}
+	  
+	// Check params
+	if( PyList_Check(pars)==1) {
+		
+		// Length of list should be 2 for I(qx, qy))
+	    npars = PyList_GET_SIZE(pars); 
+	    if(npars!=2) {
+	    	PyErr_SetString(CHardsphereStructureError, 
+	    		"CHardsphereStructure.run expects a double or a list of dimension 2.");
+	    	return NULL;
+	    }
+	    // We have a vector q, get the qx and qy values at which
+	    // to evaluate I(qx,qy)
+	    qx_value = CHardsphereStructure_readDouble(PyList_GET_ITEM(pars,0));
+	    qy_value = CHardsphereStructure_readDouble(PyList_GET_ITEM(pars,1));
+	    return Py_BuildValue("d",(*(self->model))(qx_value,qy_value));
+
+	} else {
+
+		// We have a scalar q, we will evaluate I(q)
+		qx_value = CHardsphereStructure_readDouble(pars);		
+		
+		return Py_BuildValue("d",(*(self->model))(qx_value));
+	}	
+}
+
+static PyObject * reset(CHardsphereStructure *self, PyObject *args) {
+    
+
+    return Py_BuildValue("d",0.0);
+}
+
+static PyObject * set_dispersion(CHardsphereStructure *self, PyObject *args) {
+	PyObject * disp;
+	const char * par_name;
+
+	if ( !PyArg_ParseTuple(args,"sO", &par_name, &disp) ) {
+	    PyErr_SetString(CHardsphereStructureError,
+	    	"CHardsphereStructure.set_dispersion expects a DispersionModel object.");
+		return NULL;
+	}
+	void *temp = PyCObject_AsVoidPtr(disp);
+	DispersionModel * dispersion = static_cast<DispersionModel *>(temp);
+
+
+	// Ugliness necessary to go from python to C
+	    // TODO: refactor this
+    if (!strcmp(par_name, "radius")) {
+        self->model->radius.dispersion = dispersion;
+    } else {
+	    PyErr_SetString(CHardsphereStructureError,
+	    	"CHardsphereStructure.set_dispersion expects a valid parameter name.");
+		return NULL;
+	}
+
+	DispersionVisitor* visitor = new DispersionVisitor();
+	PyObject * disp_dict = PyDict_New();
+	dispersion->accept_as_source(visitor, dispersion, disp_dict);
+	PyDict_SetItemString(self->dispersion, par_name, disp_dict);
+    return Py_BuildValue("i",1);
+}
+
+
+static PyMethodDef CHardsphereStructure_methods[] = {
+    {"run",      (PyCFunction)run     , METH_VARARGS,
+      "Evaluate the model at a given Q or Q, phi"},
+    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
+      "Evaluate the model at a given Q or Qx, Qy"},
+    {"reset",    (PyCFunction)reset   , METH_VARARGS,
+      "Reset pair correlation"},
+    {"set_dispersion",      (PyCFunction)set_dispersion     , METH_VARARGS,
+      "Set the dispersion model for a given parameter"},
+   {NULL}
+};
+
+static PyTypeObject CHardsphereStructureType = {
+    PyObject_HEAD_INIT(NULL)
+    0,                         /*ob_size*/
+    "CHardsphereStructure",             /*tp_name*/
+    sizeof(CHardsphereStructure),             /*tp_basicsize*/
+    0,                         /*tp_itemsize*/
+    (destructor)CHardsphereStructure_dealloc, /*tp_dealloc*/
+    0,                         /*tp_print*/
+    0,                         /*tp_getattr*/
+    0,                         /*tp_setattr*/
+    0,                         /*tp_compare*/
+    0,                         /*tp_repr*/
+    0,                         /*tp_as_number*/
+    0,                         /*tp_as_sequence*/
+    0,                         /*tp_as_mapping*/
+    0,                         /*tp_hash */
+    0,                         /*tp_call*/
+    0,                         /*tp_str*/
+    0,                         /*tp_getattro*/
+    0,                         /*tp_setattro*/
+    0,                         /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
+    "CHardsphereStructure objects",           /* tp_doc */
+    0,		               /* tp_traverse */
+    0,		               /* tp_clear */
+    0,		               /* tp_richcompare */
+    0,		               /* tp_weaklistoffset */
+    0,		               /* tp_iter */
+    0,		               /* tp_iternext */
+    CHardsphereStructure_methods,             /* tp_methods */
+    CHardsphereStructure_members,             /* tp_members */
+    0,                         /* tp_getset */
+    0,                         /* tp_base */
+    0,                         /* tp_dict */
+    0,                         /* tp_descr_get */
+    0,                         /* tp_descr_set */
+    0,                         /* tp_dictoffset */
+    (initproc)CHardsphereStructure_init,      /* tp_init */
+    0,                         /* tp_alloc */
+    CHardsphereStructure_new,                 /* tp_new */
+};
+
+
+static PyMethodDef module_methods[] = {
+    {NULL} 
+};
+
+/**
+ * Function used to add the model class to a module
+ * @param module: module to add the class to
+ */ 
+void addCHardsphereStructure(PyObject *module) {
+	PyObject *d;
+	
+    if (PyType_Ready(&CHardsphereStructureType) < 0)
+        return;
+
+    Py_INCREF(&CHardsphereStructureType);
+    PyModule_AddObject(module, "CHardsphereStructure", (PyObject *)&CHardsphereStructureType);
+    
+    d = PyModule_GetDict(module);
+    CHardsphereStructureError = PyErr_NewException("CHardsphereStructure.error", NULL, NULL);
+    PyDict_SetItemString(d, "CHardsphereStructureError", CHardsphereStructureError);
+}
+
Index: sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,369 @@
+/**
+	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
+ */
+
+/** CHayterMSAStructure
+ *
+ * C extension 
+ *
+ * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
+ *          DO NOT MODIFY THIS FILE, MODIFY HayterMSA.h
+ *          AND RE-RUN THE GENERATOR SCRIPT
+ *
+ */
+ 
+extern "C" {
+#include <Python.h>
+#include "structmember.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <time.h>
+#include "HayterMSA.h"
+}
+
+#include "models.hh"
+#include "dispersion_visitor.hh"
+
+/// Error object for raised exceptions
+static PyObject * CHayterMSAStructureError = NULL;
+
+
+// Class definition
+typedef struct {
+    PyObject_HEAD
+    /// Parameters
+    PyObject * params;
+    /// Dispersion parameters
+    PyObject * dispersion;
+    /// Underlying model object
+    HayterMSAStructure * model;
+    /// Log for unit testing
+    PyObject * log;
+} CHayterMSAStructure;
+
+
+static void
+CHayterMSAStructure_dealloc(CHayterMSAStructure* self)
+{
+    self->ob_type->tp_free((PyObject*)self);
+    
+
+}
+
+static PyObject *
+CHayterMSAStructure_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+    CHayterMSAStructure *self;
+    
+    self = (CHayterMSAStructure *)type->tp_alloc(type, 0);
+   
+    return (PyObject *)self;
+}
+
+static int
+CHayterMSAStructure_init(CHayterMSAStructure *self, PyObject *args, PyObject *kwds)
+{
+    if (self != NULL) {
+    	
+    	// Create parameters
+        self->params = PyDict_New();
+        self->dispersion = PyDict_New();
+        self->model = new HayterMSAStructure();
+        
+        // Initialize parameter dictionary
+        PyDict_SetItemString(self->params,"temperature",Py_BuildValue("d",318.160000));
+        PyDict_SetItemString(self->params,"saltconc",Py_BuildValue("d",0.000000));
+        PyDict_SetItemString(self->params,"dielectconst",Py_BuildValue("d",71.080000));
+        PyDict_SetItemString(self->params,"volfraction",Py_BuildValue("d",0.019200));
+        PyDict_SetItemString(self->params,"charge",Py_BuildValue("d",19.000000));
+        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",20.750000));
+        // Initialize dispersion / averaging parameter dict
+        DispersionVisitor* visitor = new DispersionVisitor();
+        PyObject * disp_dict;
+        disp_dict = PyDict_New();
+        self->model->radius.dispersion->accept_as_source(visitor, self->model->radius.dispersion, disp_dict);
+        PyDict_SetItemString(self->dispersion, "radius", disp_dict);
+
+
+         
+        // Create empty log
+        self->log = PyDict_New();
+        
+        
+
+    }
+    return 0;
+}
+
+static PyMemberDef CHayterMSAStructure_members[] = {
+    {"params", T_OBJECT, offsetof(CHayterMSAStructure, params), 0,
+     "Parameters"},
+	{"dispersion", T_OBJECT, offsetof(CHayterMSAStructure, dispersion), 0,
+	  "Dispersion parameters"},     
+    {"log", T_OBJECT, offsetof(CHayterMSAStructure, log), 0,
+     "Log"},
+    {NULL}  /* Sentinel */
+};
+
+/** Read double from PyObject
+    @param p PyObject
+    @return double
+*/
+double CHayterMSAStructure_readDouble(PyObject *p) {
+    if (PyFloat_Check(p)==1) {
+        return (double)(((PyFloatObject *)(p))->ob_fval);
+    } else if (PyInt_Check(p)==1) {
+        return (double)(((PyIntObject *)(p))->ob_ival);
+    } else if (PyLong_Check(p)==1) {
+        return (double)PyLong_AsLong(p);
+    } else {
+        return 0.0;
+    }
+}
+
+
+/**
+ * Function to call to evaluate model
+ * @param args: input q or [q,phi]
+ * @return: function value
+ */
+static PyObject * run(CHayterMSAStructure *self, PyObject *args) {
+	double q_value, phi_value;
+	PyObject* pars;
+	int npars;
+	
+	// Get parameters
+	
+	    // Reader parameter dictionary
+    self->model->temperature = PyFloat_AsDouble( PyDict_GetItemString(self->params, "temperature") );
+    self->model->saltconc = PyFloat_AsDouble( PyDict_GetItemString(self->params, "saltconc") );
+    self->model->dielectconst = PyFloat_AsDouble( PyDict_GetItemString(self->params, "dielectconst") );
+    self->model->volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
+    self->model->charge = PyFloat_AsDouble( PyDict_GetItemString(self->params, "charge") );
+    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
+    // Read in dispersion parameters
+    PyObject* disp_dict;
+    DispersionVisitor* visitor = new DispersionVisitor();
+    disp_dict = PyDict_GetItemString(self->dispersion, "radius");
+    self->model->radius.dispersion->accept_as_destination(visitor, self->model->radius.dispersion, disp_dict);
+
+	
+	// Get input and determine whether we have to supply a 1D or 2D return value.
+	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
+	    PyErr_SetString(CHayterMSAStructureError, 
+	    	"CHayterMSAStructure.run expects a q value.");
+		return NULL;
+	}
+	  
+	// Check params
+	if( PyList_Check(pars)==1) {
+		
+		// Length of list should be 2 for I(q,phi)
+	    npars = PyList_GET_SIZE(pars); 
+	    if(npars!=2) {
+	    	PyErr_SetString(CHayterMSAStructureError, 
+	    		"CHayterMSAStructure.run expects a double or a list of dimension 2.");
+	    	return NULL;
+	    }
+	    // We have a vector q, get the q and phi values at which
+	    // to evaluate I(q,phi)
+	    q_value = CHayterMSAStructure_readDouble(PyList_GET_ITEM(pars,0));
+	    phi_value = CHayterMSAStructure_readDouble(PyList_GET_ITEM(pars,1));
+	    // Skip zero
+	    if (q_value==0) {
+	    	return Py_BuildValue("d",0.0);
+	    }
+		return Py_BuildValue("d",(*(self->model)).evaluate_rphi(q_value,phi_value));
+
+	} else {
+
+		// We have a scalar q, we will evaluate I(q)
+		q_value = CHayterMSAStructure_readDouble(pars);		
+		
+		return Py_BuildValue("d",(*(self->model))(q_value));
+	}	
+}
+
+/**
+ * Function to call to evaluate model in cartesian coordinates
+ * @param args: input q or [qx, qy]]
+ * @return: function value
+ */
+static PyObject * runXY(CHayterMSAStructure *self, PyObject *args) {
+	double qx_value, qy_value;
+	PyObject* pars;
+	int npars;
+	
+	// Get parameters
+	
+	    // Reader parameter dictionary
+    self->model->temperature = PyFloat_AsDouble( PyDict_GetItemString(self->params, "temperature") );
+    self->model->saltconc = PyFloat_AsDouble( PyDict_GetItemString(self->params, "saltconc") );
+    self->model->dielectconst = PyFloat_AsDouble( PyDict_GetItemString(self->params, "dielectconst") );
+    self->model->volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
+    self->model->charge = PyFloat_AsDouble( PyDict_GetItemString(self->params, "charge") );
+    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
+    // Read in dispersion parameters
+    PyObject* disp_dict;
+    DispersionVisitor* visitor = new DispersionVisitor();
+    disp_dict = PyDict_GetItemString(self->dispersion, "radius");
+    self->model->radius.dispersion->accept_as_destination(visitor, self->model->radius.dispersion, disp_dict);
+
+	
+	// Get input and determine whether we have to supply a 1D or 2D return value.
+	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
+	    PyErr_SetString(CHayterMSAStructureError, 
+	    	"CHayterMSAStructure.run expects a q value.");
+		return NULL;
+	}
+	  
+	// Check params
+	if( PyList_Check(pars)==1) {
+		
+		// Length of list should be 2 for I(qx, qy))
+	    npars = PyList_GET_SIZE(pars); 
+	    if(npars!=2) {
+	    	PyErr_SetString(CHayterMSAStructureError, 
+	    		"CHayterMSAStructure.run expects a double or a list of dimension 2.");
+	    	return NULL;
+	    }
+	    // We have a vector q, get the qx and qy values at which
+	    // to evaluate I(qx,qy)
+	    qx_value = CHayterMSAStructure_readDouble(PyList_GET_ITEM(pars,0));
+	    qy_value = CHayterMSAStructure_readDouble(PyList_GET_ITEM(pars,1));
+	    return Py_BuildValue("d",(*(self->model))(qx_value,qy_value));
+
+	} else {
+
+		// We have a scalar q, we will evaluate I(q)
+		qx_value = CHayterMSAStructure_readDouble(pars);		
+		
+		return Py_BuildValue("d",(*(self->model))(qx_value));
+	}	
+}
+
+static PyObject * reset(CHayterMSAStructure *self, PyObject *args) {
+    
+
+    return Py_BuildValue("d",0.0);
+}
+
+static PyObject * set_dispersion(CHayterMSAStructure *self, PyObject *args) {
+	PyObject * disp;
+	const char * par_name;
+
+	if ( !PyArg_ParseTuple(args,"sO", &par_name, &disp) ) {
+	    PyErr_SetString(CHayterMSAStructureError,
+	    	"CHayterMSAStructure.set_dispersion expects a DispersionModel object.");
+		return NULL;
+	}
+	void *temp = PyCObject_AsVoidPtr(disp);
+	DispersionModel * dispersion = static_cast<DispersionModel *>(temp);
+
+
+	// Ugliness necessary to go from python to C
+	    // TODO: refactor this
+    if (!strcmp(par_name, "radius")) {
+        self->model->radius.dispersion = dispersion;
+    } else {
+	    PyErr_SetString(CHayterMSAStructureError,
+	    	"CHayterMSAStructure.set_dispersion expects a valid parameter name.");
+		return NULL;
+	}
+
+	DispersionVisitor* visitor = new DispersionVisitor();
+	PyObject * disp_dict = PyDict_New();
+	dispersion->accept_as_source(visitor, dispersion, disp_dict);
+	PyDict_SetItemString(self->dispersion, par_name, disp_dict);
+    return Py_BuildValue("i",1);
+}
+
+
+static PyMethodDef CHayterMSAStructure_methods[] = {
+    {"run",      (PyCFunction)run     , METH_VARARGS,
+      "Evaluate the model at a given Q or Q, phi"},
+    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
+      "Evaluate the model at a given Q or Qx, Qy"},
+    {"reset",    (PyCFunction)reset   , METH_VARARGS,
+      "Reset pair correlation"},
+    {"set_dispersion",      (PyCFunction)set_dispersion     , METH_VARARGS,
+      "Set the dispersion model for a given parameter"},
+   {NULL}
+};
+
+static PyTypeObject CHayterMSAStructureType = {
+    PyObject_HEAD_INIT(NULL)
+    0,                         /*ob_size*/
+    "CHayterMSAStructure",             /*tp_name*/
+    sizeof(CHayterMSAStructure),             /*tp_basicsize*/
+    0,                         /*tp_itemsize*/
+    (destructor)CHayterMSAStructure_dealloc, /*tp_dealloc*/
+    0,                         /*tp_print*/
+    0,                         /*tp_getattr*/
+    0,                         /*tp_setattr*/
+    0,                         /*tp_compare*/
+    0,                         /*tp_repr*/
+    0,                         /*tp_as_number*/
+    0,                         /*tp_as_sequence*/
+    0,                         /*tp_as_mapping*/
+    0,                         /*tp_hash */
+    0,                         /*tp_call*/
+    0,                         /*tp_str*/
+    0,                         /*tp_getattro*/
+    0,                         /*tp_setattro*/
+    0,                         /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
+    "CHayterMSAStructure objects",           /* tp_doc */
+    0,		               /* tp_traverse */
+    0,		               /* tp_clear */
+    0,		               /* tp_richcompare */
+    0,		               /* tp_weaklistoffset */
+    0,		               /* tp_iter */
+    0,		               /* tp_iternext */
+    CHayterMSAStructure_methods,             /* tp_methods */
+    CHayterMSAStructure_members,             /* tp_members */
+    0,                         /* tp_getset */
+    0,                         /* tp_base */
+    0,                         /* tp_dict */
+    0,                         /* tp_descr_get */
+    0,                         /* tp_descr_set */
+    0,                         /* tp_dictoffset */
+    (initproc)CHayterMSAStructure_init,      /* tp_init */
+    0,                         /* tp_alloc */
+    CHayterMSAStructure_new,                 /* tp_new */
+};
+
+
+static PyMethodDef module_methods[] = {
+    {NULL} 
+};
+
+/**
+ * Function used to add the model class to a module
+ * @param module: module to add the class to
+ */ 
+void addCHayterMSAStructure(PyObject *module) {
+	PyObject *d;
+	
+    if (PyType_Ready(&CHayterMSAStructureType) < 0)
+        return;
+
+    Py_INCREF(&CHayterMSAStructureType);
+    PyModule_AddObject(module, "CHayterMSAStructure", (PyObject *)&CHayterMSAStructureType);
+    
+    d = PyModule_GetDict(module);
+    CHayterMSAStructureError = PyErr_NewException("CHayterMSAStructure.error", NULL, NULL);
+    PyDict_SetItemString(d, "CHayterMSAStructureError", CHayterMSAStructureError);
+}
+
Index: sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,363 @@
+/**
+	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
+ */
+
+/** CSquareWellStructure
+ *
+ * C extension 
+ *
+ * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
+ *          DO NOT MODIFY THIS FILE, MODIFY SquareWell.h
+ *          AND RE-RUN THE GENERATOR SCRIPT
+ *
+ */
+ 
+extern "C" {
+#include <Python.h>
+#include "structmember.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <time.h>
+#include "SquareWell.h"
+}
+
+#include "models.hh"
+#include "dispersion_visitor.hh"
+
+/// Error object for raised exceptions
+static PyObject * CSquareWellStructureError = NULL;
+
+
+// Class definition
+typedef struct {
+    PyObject_HEAD
+    /// Parameters
+    PyObject * params;
+    /// Dispersion parameters
+    PyObject * dispersion;
+    /// Underlying model object
+    SquareWellStructure * model;
+    /// Log for unit testing
+    PyObject * log;
+} CSquareWellStructure;
+
+
+static void
+CSquareWellStructure_dealloc(CSquareWellStructure* self)
+{
+    self->ob_type->tp_free((PyObject*)self);
+    
+
+}
+
+static PyObject *
+CSquareWellStructure_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+    CSquareWellStructure *self;
+    
+    self = (CSquareWellStructure *)type->tp_alloc(type, 0);
+   
+    return (PyObject *)self;
+}
+
+static int
+CSquareWellStructure_init(CSquareWellStructure *self, PyObject *args, PyObject *kwds)
+{
+    if (self != NULL) {
+    	
+    	// Create parameters
+        self->params = PyDict_New();
+        self->dispersion = PyDict_New();
+        self->model = new SquareWellStructure();
+        
+        // Initialize parameter dictionary
+        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",50.000000));
+        PyDict_SetItemString(self->params,"welldepth",Py_BuildValue("d",1.500000));
+        PyDict_SetItemString(self->params,"volfraction",Py_BuildValue("d",0.040000));
+        PyDict_SetItemString(self->params,"wellwidth",Py_BuildValue("d",1.200000));
+        // Initialize dispersion / averaging parameter dict
+        DispersionVisitor* visitor = new DispersionVisitor();
+        PyObject * disp_dict;
+        disp_dict = PyDict_New();
+        self->model->radius.dispersion->accept_as_source(visitor, self->model->radius.dispersion, disp_dict);
+        PyDict_SetItemString(self->dispersion, "radius", disp_dict);
+
+
+         
+        // Create empty log
+        self->log = PyDict_New();
+        
+        
+
+    }
+    return 0;
+}
+
+static PyMemberDef CSquareWellStructure_members[] = {
+    {"params", T_OBJECT, offsetof(CSquareWellStructure, params), 0,
+     "Parameters"},
+	{"dispersion", T_OBJECT, offsetof(CSquareWellStructure, dispersion), 0,
+	  "Dispersion parameters"},     
+    {"log", T_OBJECT, offsetof(CSquareWellStructure, log), 0,
+     "Log"},
+    {NULL}  /* Sentinel */
+};
+
+/** Read double from PyObject
+    @param p PyObject
+    @return double
+*/
+double CSquareWellStructure_readDouble(PyObject *p) {
+    if (PyFloat_Check(p)==1) {
+        return (double)(((PyFloatObject *)(p))->ob_fval);
+    } else if (PyInt_Check(p)==1) {
+        return (double)(((PyIntObject *)(p))->ob_ival);
+    } else if (PyLong_Check(p)==1) {
+        return (double)PyLong_AsLong(p);
+    } else {
+        return 0.0;
+    }
+}
+
+
+/**
+ * Function to call to evaluate model
+ * @param args: input q or [q,phi]
+ * @return: function value
+ */
+static PyObject * run(CSquareWellStructure *self, PyObject *args) {
+	double q_value, phi_value;
+	PyObject* pars;
+	int npars;
+	
+	// Get parameters
+	
+	    // Reader parameter dictionary
+    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
+    self->model->welldepth = PyFloat_AsDouble( PyDict_GetItemString(self->params, "welldepth") );
+    self->model->volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
+    self->model->wellwidth = PyFloat_AsDouble( PyDict_GetItemString(self->params, "wellwidth") );
+    // Read in dispersion parameters
+    PyObject* disp_dict;
+    DispersionVisitor* visitor = new DispersionVisitor();
+    disp_dict = PyDict_GetItemString(self->dispersion, "radius");
+    self->model->radius.dispersion->accept_as_destination(visitor, self->model->radius.dispersion, disp_dict);
+
+	
+	// Get input and determine whether we have to supply a 1D or 2D return value.
+	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
+	    PyErr_SetString(CSquareWellStructureError, 
+	    	"CSquareWellStructure.run expects a q value.");
+		return NULL;
+	}
+	  
+	// Check params
+	if( PyList_Check(pars)==1) {
+		
+		// Length of list should be 2 for I(q,phi)
+	    npars = PyList_GET_SIZE(pars); 
+	    if(npars!=2) {
+	    	PyErr_SetString(CSquareWellStructureError, 
+	    		"CSquareWellStructure.run expects a double or a list of dimension 2.");
+	    	return NULL;
+	    }
+	    // We have a vector q, get the q and phi values at which
+	    // to evaluate I(q,phi)
+	    q_value = CSquareWellStructure_readDouble(PyList_GET_ITEM(pars,0));
+	    phi_value = CSquareWellStructure_readDouble(PyList_GET_ITEM(pars,1));
+	    // Skip zero
+	    if (q_value==0) {
+	    	return Py_BuildValue("d",0.0);
+	    }
+		return Py_BuildValue("d",(*(self->model)).evaluate_rphi(q_value,phi_value));
+
+	} else {
+
+		// We have a scalar q, we will evaluate I(q)
+		q_value = CSquareWellStructure_readDouble(pars);		
+		
+		return Py_BuildValue("d",(*(self->model))(q_value));
+	}	
+}
+
+/**
+ * Function to call to evaluate model in cartesian coordinates
+ * @param args: input q or [qx, qy]]
+ * @return: function value
+ */
+static PyObject * runXY(CSquareWellStructure *self, PyObject *args) {
+	double qx_value, qy_value;
+	PyObject* pars;
+	int npars;
+	
+	// Get parameters
+	
+	    // Reader parameter dictionary
+    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
+    self->model->welldepth = PyFloat_AsDouble( PyDict_GetItemString(self->params, "welldepth") );
+    self->model->volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
+    self->model->wellwidth = PyFloat_AsDouble( PyDict_GetItemString(self->params, "wellwidth") );
+    // Read in dispersion parameters
+    PyObject* disp_dict;
+    DispersionVisitor* visitor = new DispersionVisitor();
+    disp_dict = PyDict_GetItemString(self->dispersion, "radius");
+    self->model->radius.dispersion->accept_as_destination(visitor, self->model->radius.dispersion, disp_dict);
+
+	
+	// Get input and determine whether we have to supply a 1D or 2D return value.
+	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
+	    PyErr_SetString(CSquareWellStructureError, 
+	    	"CSquareWellStructure.run expects a q value.");
+		return NULL;
+	}
+	  
+	// Check params
+	if( PyList_Check(pars)==1) {
+		
+		// Length of list should be 2 for I(qx, qy))
+	    npars = PyList_GET_SIZE(pars); 
+	    if(npars!=2) {
+	    	PyErr_SetString(CSquareWellStructureError, 
+	    		"CSquareWellStructure.run expects a double or a list of dimension 2.");
+	    	return NULL;
+	    }
+	    // We have a vector q, get the qx and qy values at which
+	    // to evaluate I(qx,qy)
+	    qx_value = CSquareWellStructure_readDouble(PyList_GET_ITEM(pars,0));
+	    qy_value = CSquareWellStructure_readDouble(PyList_GET_ITEM(pars,1));
+	    return Py_BuildValue("d",(*(self->model))(qx_value,qy_value));
+
+	} else {
+
+		// We have a scalar q, we will evaluate I(q)
+		qx_value = CSquareWellStructure_readDouble(pars);		
+		
+		return Py_BuildValue("d",(*(self->model))(qx_value));
+	}	
+}
+
+static PyObject * reset(CSquareWellStructure *self, PyObject *args) {
+    
+
+    return Py_BuildValue("d",0.0);
+}
+
+static PyObject * set_dispersion(CSquareWellStructure *self, PyObject *args) {
+	PyObject * disp;
+	const char * par_name;
+
+	if ( !PyArg_ParseTuple(args,"sO", &par_name, &disp) ) {
+	    PyErr_SetString(CSquareWellStructureError,
+	    	"CSquareWellStructure.set_dispersion expects a DispersionModel object.");
+		return NULL;
+	}
+	void *temp = PyCObject_AsVoidPtr(disp);
+	DispersionModel * dispersion = static_cast<DispersionModel *>(temp);
+
+
+	// Ugliness necessary to go from python to C
+	    // TODO: refactor this
+    if (!strcmp(par_name, "radius")) {
+        self->model->radius.dispersion = dispersion;
+    } else {
+	    PyErr_SetString(CSquareWellStructureError,
+	    	"CSquareWellStructure.set_dispersion expects a valid parameter name.");
+		return NULL;
+	}
+
+	DispersionVisitor* visitor = new DispersionVisitor();
+	PyObject * disp_dict = PyDict_New();
+	dispersion->accept_as_source(visitor, dispersion, disp_dict);
+	PyDict_SetItemString(self->dispersion, par_name, disp_dict);
+    return Py_BuildValue("i",1);
+}
+
+
+static PyMethodDef CSquareWellStructure_methods[] = {
+    {"run",      (PyCFunction)run     , METH_VARARGS,
+      "Evaluate the model at a given Q or Q, phi"},
+    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
+      "Evaluate the model at a given Q or Qx, Qy"},
+    {"reset",    (PyCFunction)reset   , METH_VARARGS,
+      "Reset pair correlation"},
+    {"set_dispersion",      (PyCFunction)set_dispersion     , METH_VARARGS,
+      "Set the dispersion model for a given parameter"},
+   {NULL}
+};
+
+static PyTypeObject CSquareWellStructureType = {
+    PyObject_HEAD_INIT(NULL)
+    0,                         /*ob_size*/
+    "CSquareWellStructure",             /*tp_name*/
+    sizeof(CSquareWellStructure),             /*tp_basicsize*/
+    0,                         /*tp_itemsize*/
+    (destructor)CSquareWellStructure_dealloc, /*tp_dealloc*/
+    0,                         /*tp_print*/
+    0,                         /*tp_getattr*/
+    0,                         /*tp_setattr*/
+    0,                         /*tp_compare*/
+    0,                         /*tp_repr*/
+    0,                         /*tp_as_number*/
+    0,                         /*tp_as_sequence*/
+    0,                         /*tp_as_mapping*/
+    0,                         /*tp_hash */
+    0,                         /*tp_call*/
+    0,                         /*tp_str*/
+    0,                         /*tp_getattro*/
+    0,                         /*tp_setattro*/
+    0,                         /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
+    "CSquareWellStructure objects",           /* tp_doc */
+    0,		               /* tp_traverse */
+    0,		               /* tp_clear */
+    0,		               /* tp_richcompare */
+    0,		               /* tp_weaklistoffset */
+    0,		               /* tp_iter */
+    0,		               /* tp_iternext */
+    CSquareWellStructure_methods,             /* tp_methods */
+    CSquareWellStructure_members,             /* tp_members */
+    0,                         /* tp_getset */
+    0,                         /* tp_base */
+    0,                         /* tp_dict */
+    0,                         /* tp_descr_get */
+    0,                         /* tp_descr_set */
+    0,                         /* tp_dictoffset */
+    (initproc)CSquareWellStructure_init,      /* tp_init */
+    0,                         /* tp_alloc */
+    CSquareWellStructure_new,                 /* tp_new */
+};
+
+
+static PyMethodDef module_methods[] = {
+    {NULL} 
+};
+
+/**
+ * Function used to add the model class to a module
+ * @param module: module to add the class to
+ */ 
+void addCSquareWellStructure(PyObject *module) {
+	PyObject *d;
+	
+    if (PyType_Ready(&CSquareWellStructureType) < 0)
+        return;
+
+    Py_INCREF(&CSquareWellStructureType);
+    PyModule_AddObject(module, "CSquareWellStructure", (PyObject *)&CSquareWellStructureType);
+    
+    d = PyModule_GetDict(module);
+    CSquareWellStructureError = PyErr_NewException("CSquareWellStructure.error", NULL, NULL);
+    PyDict_SetItemString(d, "CSquareWellStructureError", CSquareWellStructureError);
+}
+
Index: sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,363 @@
+/**
+	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
+ */
+
+/** CStickyHSStructure
+ *
+ * C extension 
+ *
+ * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
+ *          DO NOT MODIFY THIS FILE, MODIFY StickyHS.h
+ *          AND RE-RUN THE GENERATOR SCRIPT
+ *
+ */
+ 
+extern "C" {
+#include <Python.h>
+#include "structmember.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <time.h>
+#include "StickyHS.h"
+}
+
+#include "models.hh"
+#include "dispersion_visitor.hh"
+
+/// Error object for raised exceptions
+static PyObject * CStickyHSStructureError = NULL;
+
+
+// Class definition
+typedef struct {
+    PyObject_HEAD
+    /// Parameters
+    PyObject * params;
+    /// Dispersion parameters
+    PyObject * dispersion;
+    /// Underlying model object
+    StickyHSStructure * model;
+    /// Log for unit testing
+    PyObject * log;
+} CStickyHSStructure;
+
+
+static void
+CStickyHSStructure_dealloc(CStickyHSStructure* self)
+{
+    self->ob_type->tp_free((PyObject*)self);
+    
+
+}
+
+static PyObject *
+CStickyHSStructure_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+    CStickyHSStructure *self;
+    
+    self = (CStickyHSStructure *)type->tp_alloc(type, 0);
+   
+    return (PyObject *)self;
+}
+
+static int
+CStickyHSStructure_init(CStickyHSStructure *self, PyObject *args, PyObject *kwds)
+{
+    if (self != NULL) {
+    	
+    	// Create parameters
+        self->params = PyDict_New();
+        self->dispersion = PyDict_New();
+        self->model = new StickyHSStructure();
+        
+        // Initialize parameter dictionary
+        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",50.000000));
+        PyDict_SetItemString(self->params,"stickiness",Py_BuildValue("d",0.200000));
+        PyDict_SetItemString(self->params,"volfraction",Py_BuildValue("d",0.100000));
+        PyDict_SetItemString(self->params,"perturb",Py_BuildValue("d",0.050000));
+        // Initialize dispersion / averaging parameter dict
+        DispersionVisitor* visitor = new DispersionVisitor();
+        PyObject * disp_dict;
+        disp_dict = PyDict_New();
+        self->model->radius.dispersion->accept_as_source(visitor, self->model->radius.dispersion, disp_dict);
+        PyDict_SetItemString(self->dispersion, "radius", disp_dict);
+
+
+         
+        // Create empty log
+        self->log = PyDict_New();
+        
+        
+
+    }
+    return 0;
+}
+
+static PyMemberDef CStickyHSStructure_members[] = {
+    {"params", T_OBJECT, offsetof(CStickyHSStructure, params), 0,
+     "Parameters"},
+	{"dispersion", T_OBJECT, offsetof(CStickyHSStructure, dispersion), 0,
+	  "Dispersion parameters"},     
+    {"log", T_OBJECT, offsetof(CStickyHSStructure, log), 0,
+     "Log"},
+    {NULL}  /* Sentinel */
+};
+
+/** Read double from PyObject
+    @param p PyObject
+    @return double
+*/
+double CStickyHSStructure_readDouble(PyObject *p) {
+    if (PyFloat_Check(p)==1) {
+        return (double)(((PyFloatObject *)(p))->ob_fval);
+    } else if (PyInt_Check(p)==1) {
+        return (double)(((PyIntObject *)(p))->ob_ival);
+    } else if (PyLong_Check(p)==1) {
+        return (double)PyLong_AsLong(p);
+    } else {
+        return 0.0;
+    }
+}
+
+
+/**
+ * Function to call to evaluate model
+ * @param args: input q or [q,phi]
+ * @return: function value
+ */
+static PyObject * run(CStickyHSStructure *self, PyObject *args) {
+	double q_value, phi_value;
+	PyObject* pars;
+	int npars;
+	
+	// Get parameters
+	
+	    // Reader parameter dictionary
+    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
+    self->model->stickiness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "stickiness") );
+    self->model->volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
+    self->model->perturb = PyFloat_AsDouble( PyDict_GetItemString(self->params, "perturb") );
+    // Read in dispersion parameters
+    PyObject* disp_dict;
+    DispersionVisitor* visitor = new DispersionVisitor();
+    disp_dict = PyDict_GetItemString(self->dispersion, "radius");
+    self->model->radius.dispersion->accept_as_destination(visitor, self->model->radius.dispersion, disp_dict);
+
+	
+	// Get input and determine whether we have to supply a 1D or 2D return value.
+	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
+	    PyErr_SetString(CStickyHSStructureError, 
+	    	"CStickyHSStructure.run expects a q value.");
+		return NULL;
+	}
+	  
+	// Check params
+	if( PyList_Check(pars)==1) {
+		
+		// Length of list should be 2 for I(q,phi)
+	    npars = PyList_GET_SIZE(pars); 
+	    if(npars!=2) {
+	    	PyErr_SetString(CStickyHSStructureError, 
+	    		"CStickyHSStructure.run expects a double or a list of dimension 2.");
+	    	return NULL;
+	    }
+	    // We have a vector q, get the q and phi values at which
+	    // to evaluate I(q,phi)
+	    q_value = CStickyHSStructure_readDouble(PyList_GET_ITEM(pars,0));
+	    phi_value = CStickyHSStructure_readDouble(PyList_GET_ITEM(pars,1));
+	    // Skip zero
+	    if (q_value==0) {
+	    	return Py_BuildValue("d",0.0);
+	    }
+		return Py_BuildValue("d",(*(self->model)).evaluate_rphi(q_value,phi_value));
+
+	} else {
+
+		// We have a scalar q, we will evaluate I(q)
+		q_value = CStickyHSStructure_readDouble(pars);		
+		
+		return Py_BuildValue("d",(*(self->model))(q_value));
+	}	
+}
+
+/**
+ * Function to call to evaluate model in cartesian coordinates
+ * @param args: input q or [qx, qy]]
+ * @return: function value
+ */
+static PyObject * runXY(CStickyHSStructure *self, PyObject *args) {
+	double qx_value, qy_value;
+	PyObject* pars;
+	int npars;
+	
+	// Get parameters
+	
+	    // Reader parameter dictionary
+    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") );
+    self->model->stickiness = PyFloat_AsDouble( PyDict_GetItemString(self->params, "stickiness") );
+    self->model->volfraction = PyFloat_AsDouble( PyDict_GetItemString(self->params, "volfraction") );
+    self->model->perturb = PyFloat_AsDouble( PyDict_GetItemString(self->params, "perturb") );
+    // Read in dispersion parameters
+    PyObject* disp_dict;
+    DispersionVisitor* visitor = new DispersionVisitor();
+    disp_dict = PyDict_GetItemString(self->dispersion, "radius");
+    self->model->radius.dispersion->accept_as_destination(visitor, self->model->radius.dispersion, disp_dict);
+
+	
+	// Get input and determine whether we have to supply a 1D or 2D return value.
+	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
+	    PyErr_SetString(CStickyHSStructureError, 
+	    	"CStickyHSStructure.run expects a q value.");
+		return NULL;
+	}
+	  
+	// Check params
+	if( PyList_Check(pars)==1) {
+		
+		// Length of list should be 2 for I(qx, qy))
+	    npars = PyList_GET_SIZE(pars); 
+	    if(npars!=2) {
+	    	PyErr_SetString(CStickyHSStructureError, 
+	    		"CStickyHSStructure.run expects a double or a list of dimension 2.");
+	    	return NULL;
+	    }
+	    // We have a vector q, get the qx and qy values at which
+	    // to evaluate I(qx,qy)
+	    qx_value = CStickyHSStructure_readDouble(PyList_GET_ITEM(pars,0));
+	    qy_value = CStickyHSStructure_readDouble(PyList_GET_ITEM(pars,1));
+	    return Py_BuildValue("d",(*(self->model))(qx_value,qy_value));
+
+	} else {
+
+		// We have a scalar q, we will evaluate I(q)
+		qx_value = CStickyHSStructure_readDouble(pars);		
+		
+		return Py_BuildValue("d",(*(self->model))(qx_value));
+	}	
+}
+
+static PyObject * reset(CStickyHSStructure *self, PyObject *args) {
+    
+
+    return Py_BuildValue("d",0.0);
+}
+
+static PyObject * set_dispersion(CStickyHSStructure *self, PyObject *args) {
+	PyObject * disp;
+	const char * par_name;
+
+	if ( !PyArg_ParseTuple(args,"sO", &par_name, &disp) ) {
+	    PyErr_SetString(CStickyHSStructureError,
+	    	"CStickyHSStructure.set_dispersion expects a DispersionModel object.");
+		return NULL;
+	}
+	void *temp = PyCObject_AsVoidPtr(disp);
+	DispersionModel * dispersion = static_cast<DispersionModel *>(temp);
+
+
+	// Ugliness necessary to go from python to C
+	    // TODO: refactor this
+    if (!strcmp(par_name, "radius")) {
+        self->model->radius.dispersion = dispersion;
+    } else {
+	    PyErr_SetString(CStickyHSStructureError,
+	    	"CStickyHSStructure.set_dispersion expects a valid parameter name.");
+		return NULL;
+	}
+
+	DispersionVisitor* visitor = new DispersionVisitor();
+	PyObject * disp_dict = PyDict_New();
+	dispersion->accept_as_source(visitor, dispersion, disp_dict);
+	PyDict_SetItemString(self->dispersion, par_name, disp_dict);
+    return Py_BuildValue("i",1);
+}
+
+
+static PyMethodDef CStickyHSStructure_methods[] = {
+    {"run",      (PyCFunction)run     , METH_VARARGS,
+      "Evaluate the model at a given Q or Q, phi"},
+    {"runXY",      (PyCFunction)runXY     , METH_VARARGS,
+      "Evaluate the model at a given Q or Qx, Qy"},
+    {"reset",    (PyCFunction)reset   , METH_VARARGS,
+      "Reset pair correlation"},
+    {"set_dispersion",      (PyCFunction)set_dispersion     , METH_VARARGS,
+      "Set the dispersion model for a given parameter"},
+   {NULL}
+};
+
+static PyTypeObject CStickyHSStructureType = {
+    PyObject_HEAD_INIT(NULL)
+    0,                         /*ob_size*/
+    "CStickyHSStructure",             /*tp_name*/
+    sizeof(CStickyHSStructure),             /*tp_basicsize*/
+    0,                         /*tp_itemsize*/
+    (destructor)CStickyHSStructure_dealloc, /*tp_dealloc*/
+    0,                         /*tp_print*/
+    0,                         /*tp_getattr*/
+    0,                         /*tp_setattr*/
+    0,                         /*tp_compare*/
+    0,                         /*tp_repr*/
+    0,                         /*tp_as_number*/
+    0,                         /*tp_as_sequence*/
+    0,                         /*tp_as_mapping*/
+    0,                         /*tp_hash */
+    0,                         /*tp_call*/
+    0,                         /*tp_str*/
+    0,                         /*tp_getattro*/
+    0,                         /*tp_setattro*/
+    0,                         /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
+    "CStickyHSStructure objects",           /* tp_doc */
+    0,		               /* tp_traverse */
+    0,		               /* tp_clear */
+    0,		               /* tp_richcompare */
+    0,		               /* tp_weaklistoffset */
+    0,		               /* tp_iter */
+    0,		               /* tp_iternext */
+    CStickyHSStructure_methods,             /* tp_methods */
+    CStickyHSStructure_members,             /* tp_members */
+    0,                         /* tp_getset */
+    0,                         /* tp_base */
+    0,                         /* tp_dict */
+    0,                         /* tp_descr_get */
+    0,                         /* tp_descr_set */
+    0,                         /* tp_dictoffset */
+    (initproc)CStickyHSStructure_init,      /* tp_init */
+    0,                         /* tp_alloc */
+    CStickyHSStructure_new,                 /* tp_new */
+};
+
+
+static PyMethodDef module_methods[] = {
+    {NULL} 
+};
+
+/**
+ * Function used to add the model class to a module
+ * @param module: module to add the class to
+ */ 
+void addCStickyHSStructure(PyObject *module) {
+	PyObject *d;
+	
+    if (PyType_Ready(&CStickyHSStructureType) < 0)
+        return;
+
+    Py_INCREF(&CStickyHSStructureType);
+    PyModule_AddObject(module, "CStickyHSStructure", (PyObject *)&CStickyHSStructureType);
+    
+    d = PyModule_GetDict(module);
+    CStickyHSStructureError = PyErr_NewException("CStickyHSStructure.error", NULL, NULL);
+    PyDict_SetItemString(d, "CStickyHSStructureError", CStickyHSStructureError);
+}
+
Index: sansmodels/src/sans/models/c_models/Hardsphere.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/Hardsphere.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_models/Hardsphere.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,121 @@
+/**
+	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
+ */
+
+/**
+ * Scattering model classes
+ * The classes use the IGOR library found in
+ *   sansmodels/src/libigor
+ *
+ *	TODO: refactor so that we pull in the old sansmodels.c_extensions
+ */
+
+#include <math.h>
+#include "models.hh"
+#include "parameters.hh"
+#include <stdio.h>
+using namespace std;
+
+extern "C" {
+	#include "libStructureFactor.h"
+	#include "Hardsphere.h"
+}
+
+HardsphereStructure :: HardsphereStructure() {
+	radius      = Parameter(50.0, true);
+	radius.set_min(0.0);
+	volfraction = Parameter(0.20, true);
+	volfraction.set_min(0.0);
+}
+
+/**
+ * Function to evaluate 1D scattering function
+ * The NIST IGOR library is used for the actual calculation.
+ * @param q: q-value
+ * @return: function value
+ */
+double HardsphereStructure :: operator()(double q) {
+	double dp[2];
+
+	// Fill parameter array for IGOR library
+	// Add the background after averaging
+	dp[0] = radius();
+	dp[1] = volfraction();
+
+	// Get the dispersion points for the radius
+	vector<WeightPoint> weights_rad;
+	radius.get_weights(weights_rad);
+
+	// Perform the computation, with all weight points
+	double sum = 0.0;
+	double norm = 0.0;
+
+	// Loop over radius weight points
+	for(int i=0; i<weights_rad.size(); i++) {
+		dp[0] = weights_rad[i].value;
+
+		sum += weights_rad[i].weight
+				* HardSphereStruct(dp, q);
+		norm += weights_rad[i].weight;
+	}
+	return sum/norm ;
+}
+
+/**
+ * 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 HardsphereStructure :: operator()(double qx, double qy) {
+	HardsphereParameters dp;
+	// Fill parameter array
+	dp.radius      = radius();
+	dp.volfraction = volfraction();
+
+	// Get the dispersion points for the radius
+	vector<WeightPoint> weights_rad;
+	radius.get_weights(weights_rad);
+
+	// Perform the computation, with all weight points
+	double sum = 0.0;
+	double norm = 0.0;
+
+	// Loop over radius weight points
+	for(int i=0; i<weights_rad.size(); i++) {
+		dp.radius = weights_rad[i].value;
+
+					double _ptvalue = weights_rad[i].weight
+						* Hardsphere_analytical_2DXY(&dp, qx, qy);
+					sum += _ptvalue;
+
+					norm += weights_rad[i].weight;
+	}
+	// Averaging in theta needs an extra normalization
+	// factor to account for the sin(theta) term in the
+	// integration (see documentation).
+	return sum/norm;
+}
+
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the cylinder
+ * @param q: q-value
+ * @param phi: angle phi
+ * @return: function value
+ */
+double HardsphereStructure :: evaluate_rphi(double q, double phi) {
+	double qx = q*cos(phi);
+	double qy = q*sin(phi);
+	return (*this).operator()(qx, qy);
+}
Index: sansmodels/src/sans/models/c_models/HayterMSA.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/HayterMSA.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_models/HayterMSA.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,170 @@
+/**
+	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
+ */
+
+/**
+ * Scattering model classes
+ * The classes use the IGOR library found in
+ *   sansmodels/src/libigor
+ *
+ *	TODO: refactor so that we pull in the old sansmodels.c_extensions
+ */
+
+#include <math.h>
+#include "models.hh"
+#include "parameters.hh"
+#include <stdio.h>
+using namespace std;
+
+extern "C" {
+	#include "libStructureFactor.h"
+	#include "HayterMSA.h"
+}
+
+HayterMSAStructure :: HayterMSAStructure() {
+	radius      = Parameter(20.75, true);
+	radius.set_min(0.0);
+	charge      = Parameter(19.0, true);
+	charge.set_min(0.0);
+	volfraction = Parameter(0.0192, true);
+	volfraction.set_min(0.0);
+	temperature = Parameter(318.16, true);
+	temperature.set_min(0.0);
+	saltconc   = Parameter(0.0);
+	dielectconst  = Parameter(71.08);
+}
+
+/**
+ * Function to evaluate 1D scattering function
+ * The NIST IGOR library is used for the actual calculation.
+ * @param q: q-value
+ * @return: function value
+ */
+double HayterMSAStructure :: operator()(double q) {
+	double dp[6];
+
+	// Fill parameter array for IGOR library
+	// Add the background after averaging
+	dp[0] = radius();
+	dp[1] = charge();
+	dp[2] = volfraction();
+	dp[3] = temperature();
+	dp[4] = saltconc();
+	dp[5] = dielectconst();
+
+	// Get the dispersion points for the radius
+	vector<WeightPoint> weights_rad;
+	radius.get_weights(weights_rad);
+
+	// Perform the computation, with all weight points
+	double sum = 0.0;
+	double norm = 0.0;
+
+	// Loop over radius weight points
+	for(int i=0; i<weights_rad.size(); i++) {
+		dp[0] = weights_rad[i].value;
+
+		sum += weights_rad[i].weight
+				* HayterPenfoldMSA(dp, q);
+		norm += weights_rad[i].weight;
+	}
+	return sum/norm ;
+}
+
+/**
+ * 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 HayterMSAStructure :: operator()(double qx, double qy) {
+	HayterMSAParameters dp;
+	// Fill parameter array
+	dp.radius      = radius();
+	dp.charge      = charge();
+	dp.volfraction = volfraction();
+	dp.temperature   = temperature();
+	dp.saltconc   = saltconc();
+	dp.dielectconst   = dielectconst();
+
+	// Get the dispersion points for the radius
+	vector<WeightPoint> weights_rad;
+	radius.get_weights(weights_rad);
+
+	// Perform the computation, with all weight points
+	double sum = 0.0;
+	double norm = 0.0;
+
+	// Loop over radius weight points
+	for(int i=0; i<weights_rad.size(); i++) {
+		dp.radius = weights_rad[i].value;
+
+					double _ptvalue = weights_rad[i].weight
+						* HayterMSA_analytical_2DXY(&dp, qx, qy);
+					sum += _ptvalue;
+
+					norm += weights_rad[i].weight;
+	}
+	// Averaging in theta needs an extra normalization
+	// factor to account for the sin(theta) term in the
+	// integration (see documentation).
+	return sum/norm;
+}
+
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the cylinder
+ * @param q: q-value
+ * @param phi: angle phi
+ * @return: function value
+ */
+double HayterMSAStructure :: evaluate_rphi(double q, double phi) {
+	double qx = q*cos(phi);
+	double qy = q*sin(phi);
+	return (*this).operator()(qx, qy);
+}
+
+// Testing code
+/*
+int main(void)
+{
+	SquareWellModel c = SquareWellModel();
+
+	printf("I(Qx=%g,Qy=%g) = %g\n", 0.001, 0.001, c(0.001, 0.001));
+	printf("I(Q=%g) = %g\n", 0.001, c(0.001));
+	c.radius.dispersion = new GaussianDispersion();
+	c.radius.dispersion->npts = 100;
+	c.radius.dispersion->width = 5;
+
+	//c.length.dispersion = GaussianDispersion();
+	//c.length.dispersion.npts = 20;
+	//c.length.dispersion.width = 65;
+
+	printf("I(Q=%g) = %g\n", 0.001, c(0.001));
+	printf("I(Q=%g) = %g\n", 0.001, c(0.001));
+	printf("I(Qx=%g, Qy=%g) = %g\n", 0.001, 0.001, c(0.001, 0.001));
+	printf("I(Q=%g,  Phi=%g) = %g\n", 0.00447, .7854, c.evaluate_rphi(sqrt(0.00002), .7854));
+
+
+
+	double i_avg = c(0.01, 0.01);
+	double i_1d = c(sqrt(0.0002));
+
+	printf("\nI(Qx=%g, Qy=%g) = %g\n", 0.01, 0.01, i_avg);
+	printf("I(Q=%g)         = %g\n", sqrt(0.0002), i_1d);
+	printf("ratio %g %g\n", i_avg/i_1d, i_1d/i_avg);
+
+
+	return 0;
+}
+*/
Index: sansmodels/src/sans/models/c_models/SquareWell.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/SquareWell.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_models/SquareWell.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,162 @@
+/**
+	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
+ */
+
+/**
+ * Scattering model classes
+ * The classes use the IGOR library found in
+ *   sansmodels/src/libigor
+ *
+ *	TODO: refactor so that we pull in the old sansmodels.c_extensions
+ */
+
+#include <math.h>
+#include "models.hh"
+#include "parameters.hh"
+#include <stdio.h>
+using namespace std;
+
+extern "C" {
+	#include "libStructureFactor.h"
+	#include "SquareWell.h"
+}
+
+SquareWellStructure :: SquareWellStructure() {
+	radius      = Parameter(50.0, true);
+	radius.set_min(0.0);
+	volfraction = Parameter(0.04, true);
+	volfraction.set_min(0.0);
+	welldepth   = Parameter(1.50);
+	wellwidth  = Parameter(1.20);
+}
+
+/**
+ * Function to evaluate 1D scattering function
+ * The NIST IGOR library is used for the actual calculation.
+ * @param q: q-value
+ * @return: function value
+ */
+double SquareWellStructure :: operator()(double q) {
+	double dp[4];
+
+	// Fill parameter array for IGOR library
+	// Add the background after averaging
+	dp[0] = radius();
+	dp[1] = volfraction();
+	dp[2] = welldepth();
+	dp[3] = wellwidth();
+
+	// Get the dispersion points for the radius
+	vector<WeightPoint> weights_rad;
+	radius.get_weights(weights_rad);
+
+	// Perform the computation, with all weight points
+	double sum = 0.0;
+	double norm = 0.0;
+
+	// Loop over radius weight points
+	for(int i=0; i<weights_rad.size(); i++) {
+		dp[0] = weights_rad[i].value;
+
+		sum += weights_rad[i].weight
+				* SquareWellStruct(dp, q);
+		norm += weights_rad[i].weight;
+	}
+	return sum/norm ;
+}
+
+/**
+ * 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 SquareWellStructure :: operator()(double qx, double qy) {
+	SquareWellParameters dp;
+	// Fill parameter array
+	dp.radius      = radius();
+	dp.volfraction = volfraction();
+	dp.welldepth   = welldepth();
+	dp.wellwidth   = wellwidth();
+
+	// Get the dispersion points for the radius
+	vector<WeightPoint> weights_rad;
+	radius.get_weights(weights_rad);
+
+	// Perform the computation, with all weight points
+	double sum = 0.0;
+	double norm = 0.0;
+
+	// Loop over radius weight points
+	for(int i=0; i<weights_rad.size(); i++) {
+		dp.radius = weights_rad[i].value;
+
+					double _ptvalue = weights_rad[i].weight
+						* SquareWell_analytical_2DXY(&dp, qx, qy);
+					sum += _ptvalue;
+
+					norm += weights_rad[i].weight;
+	}
+	// Averaging in theta needs an extra normalization
+	// factor to account for the sin(theta) term in the
+	// integration (see documentation).
+	return sum/norm;
+}
+
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the cylinder
+ * @param q: q-value
+ * @param phi: angle phi
+ * @return: function value
+ */
+double SquareWellStructure :: evaluate_rphi(double q, double phi) {
+	double qx = q*cos(phi);
+	double qy = q*sin(phi);
+	return (*this).operator()(qx, qy);
+}
+
+// Testing code
+/*
+int main(void)
+{
+	SquareWellModel c = SquareWellModel();
+
+	printf("I(Qx=%g,Qy=%g) = %g\n", 0.001, 0.001, c(0.001, 0.001));
+	printf("I(Q=%g) = %g\n", 0.001, c(0.001));
+	c.radius.dispersion = new GaussianDispersion();
+	c.radius.dispersion->npts = 100;
+	c.radius.dispersion->width = 5;
+
+	//c.length.dispersion = GaussianDispersion();
+	//c.length.dispersion.npts = 20;
+	//c.length.dispersion.width = 65;
+
+	printf("I(Q=%g) = %g\n", 0.001, c(0.001));
+	printf("I(Q=%g) = %g\n", 0.001, c(0.001));
+	printf("I(Qx=%g, Qy=%g) = %g\n", 0.001, 0.001, c(0.001, 0.001));
+	printf("I(Q=%g,  Phi=%g) = %g\n", 0.00447, .7854, c.evaluate_rphi(sqrt(0.00002), .7854));
+
+
+
+	double i_avg = c(0.01, 0.01);
+	double i_1d = c(sqrt(0.0002));
+
+	printf("\nI(Qx=%g, Qy=%g) = %g\n", 0.01, 0.01, i_avg);
+	printf("I(Q=%g)         = %g\n", sqrt(0.0002), i_1d);
+	printf("ratio %g %g\n", i_avg/i_1d, i_1d/i_avg);
+
+
+	return 0;
+}
+*/
Index: sansmodels/src/sans/models/c_models/StickyHS.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/StickyHS.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
+++ sansmodels/src/sans/models/c_models/StickyHS.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -0,0 +1,129 @@
+/**
+	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
+ */
+
+/**
+ * Scattering model classes
+ * The classes use the IGOR library found in
+ *   sansmodels/src/libigor
+ *
+ *	TODO: refactor so that we pull in the old sansmodels.c_extensions
+ */
+
+#include <math.h>
+#include "models.hh"
+#include "parameters.hh"
+#include <stdio.h>
+using namespace std;
+
+extern "C" {
+	#include "libStructureFactor.h"
+	#include "StickyHS.h"
+}
+
+StickyHSStructure :: StickyHSStructure() {
+	radius      = Parameter(50.0, true);
+	radius.set_min(0.0);
+	volfraction = Parameter(0.10, true);
+	volfraction.set_min(0.0);
+	perturb = Parameter(0.05, true);
+	perturb.set_min(0.0);
+	stickiness = Parameter(0.20, true);;	
+	stickiness.set_min(0.0);
+}
+
+/**
+ * Function to evaluate 1D scattering function
+ * The NIST IGOR library is used for the actual calculation.
+ * @param q: q-value
+ * @return: function value
+ */
+double StickyHSStructure :: operator()(double q) {
+	double dp[4];
+
+	// Fill parameter array for IGOR library
+	// Add the background after averaging
+	dp[0] = radius();
+	dp[1] = volfraction();
+	dp[2] = perturb();
+	dp[3] = stickiness();
+
+	// Get the dispersion points for the radius
+	vector<WeightPoint> weights_rad;
+	radius.get_weights(weights_rad);
+
+	// Perform the computation, with all weight points
+	double sum = 0.0;
+	double norm = 0.0;
+
+	// Loop over radius weight points
+	for(int i=0; i<weights_rad.size(); i++) {
+		dp[0] = weights_rad[i].value;
+
+		sum += weights_rad[i].weight
+				* StickyHS_Struct(dp, q);
+		norm += weights_rad[i].weight;
+	}
+	return sum/norm ;
+}
+
+/**
+ * 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 StickyHSStructure :: operator()(double qx, double qy) {
+	StickyHSParameters dp;
+	// Fill parameter array
+	dp.radius      = radius();
+	dp.volfraction = volfraction();
+	dp.perturb = perturb();
+	dp.stickiness = stickiness();
+
+	// Get the dispersion points for the radius
+	vector<WeightPoint> weights_rad;
+	radius.get_weights(weights_rad);
+
+	// Perform the computation, with all weight points
+	double sum = 0.0;
+	double norm = 0.0;
+
+	// Loop over radius weight points
+	for(int i=0; i<weights_rad.size(); i++) {
+		dp.radius = weights_rad[i].value;
+
+					double _ptvalue = weights_rad[i].weight
+						* StickyHS_analytical_2DXY(&dp, qx, qy);
+					sum += _ptvalue;
+
+					norm += weights_rad[i].weight;
+	}
+	// Averaging in theta needs an extra normalization
+	// factor to account for the sin(theta) term in the
+	// integration (see documentation).
+	return sum/norm;
+}
+
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the cylinder
+ * @param q: q-value
+ * @param phi: angle phi
+ * @return: function value
+ */
+double StickyHSStructure :: evaluate_rphi(double q, double phi) {
+	double qx = q*cos(phi);
+	double qy = q*sin(phi);
+	return (*this).operator()(qx, qy);
+}
Index: sansmodels/src/sans/models/c_models/c_models.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/c_models.cpp	(revision 8809e4829d357a9366a256b3595b75252de8b2c2)
+++ sansmodels/src/sans/models/c_models/c_models.cpp	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -10,4 +10,8 @@
 void addCCylinderModel(PyObject *module);
 void addCSphereModel(PyObject *module);
+void addCHardsphereStructure(PyObject *module);
+void addCStickyHSStructure(PyObject *module);
+void addCSquareWellStructure(PyObject *module);
+void addCHayterMSAStructure(PyObject *module);
 void addCCoreShellModel(PyObject *module);
 void addCCoreShellCylinderModel(PyObject *module);
@@ -19,5 +23,4 @@
 	//void addCCoreShellModel(PyObject *module);
 	//void addCEllipsoidModel(PyObject *module);
-	//void addCSphereModel(PyObject *module);
 	//void addCEllipticalCylinderModel(PyObject *module);
 	void addDisperser(PyObject *module);
@@ -147,4 +150,8 @@
 	addCEllipsoidModel(m);
 	addCSphereModel(m);
+	addCHardsphereStructure(m);
+	addCStickyHSStructure(m);
+	addCSquareWellStructure(m);
+	addCHayterMSAStructure(m);
 	addCEllipticalCylinderModel(m);
 	addDisperser(m);
Index: sansmodels/src/sans/models/c_models/models.hh
===================================================================
--- sansmodels/src/sans/models/c_models/models.hh	(revision 0f5bc9ff2027432913fd8d2cb067675244acdaf6)
+++ sansmodels/src/sans/models/c_models/models.hh	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -60,4 +60,72 @@
 };
 
+class HardsphereStructure{
+public:
+	// Model parameters
+	Parameter radius;
+	Parameter volfraction;
+
+	// Constructor
+	HardsphereStructure();
+
+	// Operators to get I(Q)
+	double operator()(double q);
+	double operator()(double qx, double qy);
+	double evaluate_rphi(double q, double phi);
+};
+
+class StickyHSStructure{
+public:
+	// Model parameters
+	Parameter radius;
+	Parameter volfraction;
+	Parameter perturb;
+	Parameter stickiness;
+
+	// Constructor
+	StickyHSStructure();
+
+	// Operators to get I(Q)
+	double operator()(double q);
+	double operator()(double qx, double qy);
+	double evaluate_rphi(double q, double phi);
+};
+
+class SquareWellStructure{
+public:
+	// Model parameters
+	Parameter radius;
+	Parameter volfraction;
+	Parameter welldepth;
+	Parameter wellwidth;
+
+	// Constructor
+	SquareWellStructure();
+
+	// Operators to get I(Q)
+	double operator()(double q);
+	double operator()(double qx, double qy);
+	double evaluate_rphi(double q, double phi);
+};
+
+class HayterMSAStructure{
+public:
+	// Model parameters
+	Parameter radius;
+	Parameter charge;
+	Parameter volfraction;
+	Parameter temperature;
+	Parameter saltconc;
+	Parameter dielectconst;
+	
+	// Constructor
+	HayterMSAStructure();
+
+	// Operators to get I(Q)
+	double operator()(double q);
+	double operator()(double qx, double qy);
+	double evaluate_rphi(double q, double phi);
+};
+
 class CoreShellModel{
 public:
Index: sansmodels/src/setup.py
===================================================================
--- sansmodels/src/setup.py	(revision 8809e4829d357a9366a256b3595b75252de8b2c2)
+++ sansmodels/src/setup.py	(revision 25579e8c451417db52ac6ed70a3c116d52d8717d)
@@ -25,5 +25,5 @@
     content += "  http://danse.us/trac/sans/\n"
     content += "  @copyright 2007:"
-    content += "  Mathieu Doucet (University of Tennessee), for the DANSE project\n\n"
+    content += "  SANS/DANSE Group (University of Tennessee), for the DANSE project\n\n"
     content += "\"\"\"\n"
     content += "def model():\n"
@@ -96,4 +96,16 @@
         #srcdir+"/sphere.c",
         "sans/models/c_models/CSphereModel.cpp",
+        srcdir+"/SquareWell.c",
+        "sans/models/c_models/CSquareWellStructure.cpp",  
+        "sans/models/c_models/SquareWell.cpp", 
+        srcdir+"/StickyHS.c",         
+        "sans/models/c_models/CStickyHSStructure.cpp", 
+        "sans/models/c_models/StickyHS.cpp",      
+        srcdir+"/Hardsphere.c",         
+        "sans/models/c_models/CHardsphereStructure.cpp", 
+        "sans/models/c_models/Hardsphere.cpp",      
+        srcdir+"/HayterMSA.c",         
+        "sans/models/c_models/CHayterMSAStructure.cpp", 
+        "sans/models/c_models/HayterMSA.cpp",      
         "sans/models/c_models/sphere.cpp",
         #srcdir+"/CCylinderModel.c",
@@ -121,4 +133,5 @@
         srcdir+"/disperser.c",
         igordir+"/libCylinder.c",
+        igordir+"/libStructureFactor.c",
         igordir+"/libSphere.c",
         srcdir+"/gaussian.c",
