Index: realSpaceModeling/pointsmodelpy/pointsmodelpymodule/Make.mm
===================================================================
--- realSpaceModeling/pointsmodelpy/pointsmodelpymodule/Make.mm	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/pointsmodelpy/pointsmodelpymodule/Make.mm	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,32 @@
+# -*- Makefile -*-
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#                               Michael A.G. Aivazis
+#                        California Institute of Technology
+#                        (C) 1998-2005  All Rights Reserved
+#
+# <LicenseText>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+
+PROJECT = SANSsimulation
+PACKAGE = pointsmodelpymodule
+MODULE = pointsmodelpy
+
+include std-pythonmodule.def
+include local.def
+
+PROJ_CXX_SRCLIB = -lpointsmodelpy -lgeoshapespy -liqPy
+
+PROJ_SRCS = \
+    bindings.cc \
+    exceptions.cc \
+    misc.cc
+
+
+# version
+# $Id$
+
+# End of file
Index: realSpaceModeling/pointsmodelpy/pointsmodelpymodule/bindings.cc
===================================================================
--- realSpaceModeling/pointsmodelpy/pointsmodelpymodule/bindings.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/pointsmodelpy/pointsmodelpymodule/bindings.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,146 @@
+// -*- C++ -*-
+// @copyright: University of Tennessee, for the DANSE project
+
+//#include <portinfo>
+#include <Python.h>
+
+#include "bindings.h"
+
+#include "misc.h"          // miscellaneous methods
+
+// the method table
+
+struct PyMethodDef pypointsmodelpy_methods[] = {
+
+    // new_loresmodel
+    {pypointsmodelpy_new_loresmodel__name__, pypointsmodelpy_new_loresmodel,
+     METH_VARARGS, pypointsmodelpy_new_loresmodel__doc__},
+
+    // LORESModel method:add(geoshape,sld)
+    {pypointsmodelpy_lores_add__name__, pypointsmodelpy_lores_add,
+     METH_VARARGS, pypointsmodelpy_lores_add__doc__},
+
+    // LORESModel method:GetPoints(vector<Point3D> &)
+    {pypointsmodelpy_get_lorespoints__name__, pypointsmodelpy_get_lorespoints,
+     METH_VARARGS, pypointsmodelpy_get_lorespoints__doc__},
+
+    // new_pdbmodel
+    {pypointsmodelpy_new_pdbmodel__name__, pypointsmodelpy_new_pdbmodel,
+     METH_VARARGS, pypointsmodelpy_new_pdbmodel__doc__},
+
+    // PDBModel method: AddPDB(const char*)
+    {pypointsmodelpy_pdbmodel_add__name__, pypointsmodelpy_pdbmodel_add,
+     METH_VARARGS, pypointsmodelpy_pdbmodel_add__doc__},
+
+    // PDBModel method: GetPoints(Point3DVector &)
+    {pypointsmodelpy_get_pdbpoints__name__, pypointsmodelpy_get_pdbpoints,
+     METH_VARARGS, pypointsmodelpy_get_pdbpoints__doc__},
+
+    // new_complexmodel
+    {pypointsmodelpy_new_complexmodel__name__, pypointsmodelpy_new_complexmodel,
+     METH_VARARGS, pypointsmodelpy_new_complexmodel__doc__},
+
+    // ComplexModel method: Add(PointsModel *)
+    {pypointsmodelpy_complexmodel_add__name__, pypointsmodelpy_complexmodel_add,
+     METH_VARARGS, pypointsmodelpy_complexmodel_add__doc__},
+
+    // ComplexModel method: GetPoints(Point3DVector &)
+    {pypointsmodelpy_get_complexpoints__name__, pypointsmodelpy_get_complexpoints,
+     METH_VARARGS, pypointsmodelpy_get_complexpoints__doc__},
+
+    //new_point3dvec
+    {pypointsmodelpy_new_point3dvec__name__, pypointsmodelpy_new_point3dvec,
+     METH_VARARGS, pypointsmodelpy_new_point3dvec__doc__},
+
+    //fillpoints
+    //{pypointsmodelpy_fillpoints__name__, pypointsmodelpy_fillpoints,
+    //METH_VARARGS, pypointsmodelpy_fillpoints__doc__},
+
+    //distdistribution calculation for LORES model
+    {pypointsmodelpy_get_lores_pr__name__, pypointsmodelpy_get_lores_pr,
+     METH_VARARGS, pypointsmodelpy_get_lores_pr__doc__},
+
+    //distdistribution 2D (on xy plane)
+    {pypointsmodelpy_distdistribution_xy__name__, pypointsmodelpy_distdistribution_xy,
+     METH_VARARGS, pypointsmodelpy_distdistribution_xy__doc__},
+
+    //distdistribution calculation for PDB model
+    {pypointsmodelpy_get_pdb_pr__name__, pypointsmodelpy_get_pdb_pr,
+     METH_VARARGS, pypointsmodelpy_get_pdb_pr__doc__},
+
+    //distdistribution calculation on XY plane for PDB model
+    {pypointsmodelpy_get_pdb_pr_xy__name__, pypointsmodelpy_get_pdb_pr_xy,
+     METH_VARARGS, pypointsmodelpy_get_pdb_pr_xy__doc__},
+
+    //distdistribution calculation for Complex model
+    {pypointsmodelpy_get_complex_pr__name__, pypointsmodelpy_get_complex_pr,
+     METH_VARARGS, pypointsmodelpy_get_complex_pr__doc__},
+
+    //calculateIQ
+    {pypointsmodelpy_get_lores_iq__name__, pypointsmodelpy_get_lores_iq,
+     METH_VARARGS, pypointsmodelpy_get_lores_iq__doc__},
+
+    //calculateI(single Q)
+    {pypointsmodelpy_get_lores_i__name__, pypointsmodelpy_get_lores_i,
+     METH_VARARGS, pypointsmodelpy_get_lores_i__doc__},
+
+    //calculateI(single Q)
+    {pypointsmodelpy_get_complex_i__name__, pypointsmodelpy_get_complex_i,
+     METH_VARARGS, pypointsmodelpy_get_complex_i__doc__},
+
+    //calculateI(single Q)
+    {pypointsmodelpy_get_complex_i_error__name__, pypointsmodelpy_get_complex_i_error,
+     METH_VARARGS, pypointsmodelpy_get_complex_i_error__doc__},
+
+    //calculateIQ 2D
+    {pypointsmodelpy_calculateIQ_2D__name__, pypointsmodelpy_calculateIQ_2D,
+     METH_VARARGS, pypointsmodelpy_calculateIQ_2D__doc__},
+
+    //calculateIQ 2D(Qx,Qy)
+    {pypointsmodelpy_calculateI_Qxy__name__, pypointsmodelpy_calculateI_Qxy,
+     METH_VARARGS, pypointsmodelpy_calculateI_Qxy__doc__},
+
+    //PDBModel calculateIQ
+    {pypointsmodelpy_get_pdb_iq__name__, pypointsmodelpy_get_pdb_iq,
+     METH_VARARGS, pypointsmodelpy_get_pdb_iq__doc__},
+
+    //PDBModel calculateIQ(Qx,Qy)
+    {pypointsmodelpy_get_pdb_Iqxy__name__, pypointsmodelpy_get_pdb_Iqxy,
+     METH_VARARGS, pypointsmodelpy_get_pdb_Iqxy__doc__},
+
+    //ComplexModel calculateIQ
+    {pypointsmodelpy_get_complex_iq__name__, pypointsmodelpy_get_complex_iq,
+     METH_VARARGS, pypointsmodelpy_get_complex_iq__doc__},
+
+    //outputPR
+    {pypointsmodelpy_outputPR__name__, pypointsmodelpy_outputPR,
+     METH_VARARGS, pypointsmodelpy_outputPR__doc__},
+
+    //outputPR_xy
+    {pypointsmodelpy_outputPR_xy__name__, pypointsmodelpy_outputPR_xy,
+     METH_VARARGS, pypointsmodelpy_outputPR_xy__doc__},
+
+    //PDBModel outputPR
+    {pypointsmodelpy_save_pdb_pr__name__, pypointsmodelpy_save_pdb_pr,
+     METH_VARARGS, pypointsmodelpy_save_pdb_pr__doc__},
+
+    //ComplexModel outputPR
+    {pypointsmodelpy_save_complex_pr__name__, pypointsmodelpy_save_complex_pr,
+     METH_VARARGS, pypointsmodelpy_save_complex_pr__doc__},
+
+    //outputPDB
+    {pypointsmodelpy_outputPDB__name__, pypointsmodelpy_outputPDB,
+     METH_VARARGS, pypointsmodelpy_outputPDB__doc__},
+
+    {pypointsmodelpy_copyright__name__, pypointsmodelpy_copyright,
+     METH_VARARGS, pypointsmodelpy_copyright__doc__},
+
+
+// Sentinel
+    {0, 0}
+};
+
+// version
+// $Id$
+
+// End of file
Index: realSpaceModeling/pointsmodelpy/pointsmodelpymodule/bindings.h
===================================================================
--- realSpaceModeling/pointsmodelpy/pointsmodelpymodule/bindings.h	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/pointsmodelpy/pointsmodelpymodule/bindings.h	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,26 @@
+// -*- C++ -*-
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+//                               Michael A.G. Aivazis
+//                        California Institute of Technology
+//                        (C) 1998-2005  All Rights Reserved
+// 
+//  <LicenseText>
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+
+#if !defined(pypointsmodelpy_bindings_h)
+#define pypointsmodelpy_bindings_h
+
+// the method table
+
+extern struct PyMethodDef pypointsmodelpy_methods[];
+
+#endif
+
+// version
+// $Id$
+
+// End of file
Index: realSpaceModeling/pointsmodelpy/pointsmodelpymodule/exceptions.cc
===================================================================
--- realSpaceModeling/pointsmodelpy/pointsmodelpymodule/exceptions.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/pointsmodelpy/pointsmodelpymodule/exceptions.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,22 @@
+// -*- C++ -*-
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+//                               Michael A.G. Aivazis
+//                        California Institute of Technology
+//                        (C) 1998-2005  All Rights Reserved
+// 
+//  <LicenseText>
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+
+//#include <portinfo>
+#include <Python.h>
+
+PyObject *pypointsmodelpy_runtimeError = 0;
+    
+// version
+// $Id$
+
+// End of file
Index: realSpaceModeling/pointsmodelpy/pointsmodelpymodule/exceptions.h
===================================================================
--- realSpaceModeling/pointsmodelpy/pointsmodelpymodule/exceptions.h	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/pointsmodelpy/pointsmodelpymodule/exceptions.h	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,26 @@
+// -*- C++ -*-
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+//                               Michael A.G. Aivazis
+//                        California Institute of Technology
+//                        (C) 1998-2005  All Rights Reserved
+// 
+//  <LicenseText>
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+
+#if !defined(pypointsmodelpy_exceptions_h)
+#define pypointsmodelpy_exceptions_h
+
+// exceptions
+
+extern PyObject *pypointsmodelpy_runtimeError;
+
+#endif
+
+// version
+// $Id$
+
+// End of file
Index: realSpaceModeling/pointsmodelpy/pointsmodelpymodule/local.def
===================================================================
--- realSpaceModeling/pointsmodelpy/pointsmodelpymodule/local.def	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/pointsmodelpy/pointsmodelpymodule/local.def	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,26 @@
+# -*- Makefile -*-
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#                               Michael A.G. Aivazis
+#                        California Institute of Technology
+#                        (C) 1998-2005  All Rights Reserved
+#
+# <LicenseText>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+
+# C++
+
+    PROJ_CXX_INCLUDES = ..   \
+			../libpointsmodelpy   \
+			../../analmodelpy/libanalmodelpy  \
+			../../geoshapespy/libgeoshapespy  \
+			../../iqPy/libiqPy  \
+			../../iqPy/libiqPy/tnt  
+
+# version
+# $Id$
+
+# End of file
Index: realSpaceModeling/pointsmodelpy/pointsmodelpymodule/misc.cc
===================================================================
--- realSpaceModeling/pointsmodelpy/pointsmodelpymodule/misc.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/pointsmodelpy/pointsmodelpymodule/misc.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,639 @@
+// -*- C++ -*-
+#include <Python.h>
+
+#include <vector>
+#include <cstring>
+#include <stdexcept>
+#include "Point3D.h"
+#include "misc.h"
+#include "lores_model.h"
+#include "pdb_model.h"
+#include "complex_model.h"
+#include "geo_shape.h"
+#include "iq.h"
+
+// copyright
+
+char pypointsmodelpy_copyright__doc__[] = "";
+char pypointsmodelpy_copyright__name__[] = "copyright";
+
+static char pypointsmodelpy_copyright_note[] = 
+    "pointsmodelpy python module: Copyright (c) 2007 University of Tennessee";
+
+
+PyObject * pypointsmodelpy_copyright(PyObject *, PyObject *)
+{
+    return Py_BuildValue("s", pypointsmodelpy_copyright_note);
+}
+    
+// new_loresmodel 
+//wrapper for LORESModel constructor LORESModel(double density)
+
+char pypointsmodelpy_new_loresmodel__doc__[] = "Low-resolution shapes:real space geometric complex models";
+char pypointsmodelpy_new_loresmodel__name__[] = "new_loresmodel";
+
+PyObject * pypointsmodelpy_new_loresmodel(PyObject *, PyObject *args)
+{
+  double density = 0;
+
+  int ok = PyArg_ParseTuple(args, "d",&density);
+  if(!ok) return NULL;
+
+  LORESModel *newlores = new LORESModel(density);
+  return PyCObject_FromVoidPtr(newlores, PyDelLores);
+}
+    
+void PyDelLores(void *ptr){
+  LORESModel * oldlores = static_cast<LORESModel *>(ptr);
+  delete oldlores;
+  return;
+}
+
+//LORESModel methods add(GeoShape &, double sld)
+char pypointsmodelpy_lores_add__name__[] = "lores_add";
+char pypointsmodelpy_lores_add__doc__[] = "loresmodel method:add(Geoshape &,sld)";
+
+PyObject * pypointsmodelpy_lores_add(PyObject *, PyObject *args){
+  double sld = 1;
+  PyObject *pyloresmodel = 0, *pyshape = 0;
+  int ok = PyArg_ParseTuple(args, "OOd", &pyloresmodel, &pyshape, &sld);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pyloresmodel);
+  void *temp2 = PyCObject_AsVoidPtr(pyshape);
+
+  LORESModel * thislores = static_cast<LORESModel *>(temp);
+  GeoShape * thisshape = static_cast<GeoShape *>(temp2);
+
+  thislores->Add(*thisshape, sld);
+
+  return Py_BuildValue("i", 0);
+}
+
+//LORESModel methods GetPoints(vector<Point3D> &)
+char pypointsmodelpy_get_lorespoints__name__[] = "get_lorespoints";
+char pypointsmodelpy_get_lorespoints__doc__[] = "get the points from the lores model";
+
+PyObject * pypointsmodelpy_get_lorespoints(PyObject *, PyObject *args){
+  PyObject *pyloresmodel = 0, *pypoint3dvec = 0;
+  int ok = PyArg_ParseTuple(args, "OO", &pyloresmodel, &pypoint3dvec);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pyloresmodel);
+  void *temp2 = PyCObject_AsVoidPtr(pypoint3dvec);
+
+  LORESModel * thislores = static_cast<LORESModel *>(temp);
+  vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2);
+
+  int npts = thislores->GetPoints(*thisvec);
+  //temporary
+  thislores->WritePoints2File(*thisvec);
+  return Py_BuildValue("i", npts);
+}
+
+// new_pdbmodel 
+//wrapper for PDBModel constructor PDBModel()
+
+char pypointsmodelpy_new_pdbmodel__doc__[] = "PDB model: contain atomic coordinate from PDB file & Scattering length density";
+char pypointsmodelpy_new_pdbmodel__name__[] = "new_pdbmodel";
+
+PyObject * pypointsmodelpy_new_pdbmodel(PyObject *, PyObject *args)
+{
+  PDBModel *newpdb = new PDBModel();
+  return PyCObject_FromVoidPtr(newpdb, PyDelPDB);
+}
+    
+void PyDelPDB(void *ptr){
+  PDBModel * oldpdb = static_cast<PDBModel *>(ptr);
+  delete oldpdb;
+  return;
+}
+
+//PDBModel methods AddPDB(char * pdbfile) 
+char pypointsmodelpy_pdbmodel_add__name__[] = "pdbmodel_add";
+char pypointsmodelpy_pdbmodel_add__doc__[] = "Add a structure from PDB";
+
+PyObject * pypointsmodelpy_pdbmodel_add(PyObject *, PyObject *args){
+  PyObject *pypdbmodel = 0;
+  char * pdbfile;
+
+  int ok = PyArg_ParseTuple(args, "Os", &pypdbmodel, &pdbfile);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pypdbmodel);
+
+  PDBModel * thispdb = static_cast<PDBModel *>(temp);
+
+  thispdb->AddPDB(pdbfile);
+
+  return Py_BuildValue("i", 0);
+}
+
+//PDBModel methods GetPoints(Point3DVector &) 
+char pypointsmodelpy_get_pdbpoints__name__[] = "get_pdbpoints";
+char pypointsmodelpy_get_pdbpoints__doc__[] = "Get atomic points from pdb with SLD";
+
+PyObject * pypointsmodelpy_get_pdbpoints(PyObject *, PyObject *args){
+  PyObject *pypdbmodel = 0, *pypoint3dvec = 0;
+  int ok = PyArg_ParseTuple(args, "OO", &pypdbmodel, &pypoint3dvec);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pypdbmodel);
+  void *temp2 = PyCObject_AsVoidPtr(pypoint3dvec);
+
+  PDBModel * thispdb = static_cast<PDBModel *>(temp);
+  vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2);
+
+  int npts = thispdb->GetPoints(*thisvec);
+
+  return Py_BuildValue("i", npts);
+}
+
+// new_complexmodel 
+//wrapper for ComplexModel constructor ComplexModel()
+
+char pypointsmodelpy_new_complexmodel__doc__[] = "COMPLEX model: contain LORES and PDB models";
+char pypointsmodelpy_new_complexmodel__name__[] = "new_complexmodel";
+
+PyObject * pypointsmodelpy_new_complexmodel(PyObject *, PyObject *args)
+{
+  ComplexModel *newcomplex = new ComplexModel();
+  return PyCObject_FromVoidPtr(newcomplex, PyDelComplex);
+}
+    
+void PyDelComplex(void *ptr){
+  ComplexModel * oldcomplex = static_cast<ComplexModel *>(ptr);
+  delete oldcomplex;
+  return;
+}
+
+//ComplexModel methods Add(PointsModel *) 
+char pypointsmodelpy_complexmodel_add__name__[] = "complexmodel_add";
+char pypointsmodelpy_complexmodel_add__doc__[] = "Add LORES model or PDB Model,type has to be specified (either PDB or LORES)";
+
+PyObject * pypointsmodelpy_complexmodel_add(PyObject *, PyObject *args){
+  PyObject *pycomplexmodel = 0, *pymodel = 0;
+  char * modeltype;
+
+  int ok = PyArg_ParseTuple(args, "OOs", &pycomplexmodel,&pymodel, &modeltype);
+  if(!ok) return NULL;
+
+  void *temp2 = PyCObject_AsVoidPtr(pycomplexmodel);
+  ComplexModel *thiscomplex = static_cast<ComplexModel *>(temp2);
+
+  void *temp = PyCObject_AsVoidPtr(pymodel);
+  if (strcmp(modeltype,"LORES") == 0){
+    LORESModel * thislores = static_cast<LORESModel *>(temp);
+    thiscomplex->Add(thislores);
+  }
+  else if (strcmp(modeltype,"PDB") == 0){
+    PDBModel * thispdb = static_cast<PDBModel *>(temp);
+    thiscomplex->Add(thispdb);
+  }
+  else{
+    throw runtime_error("The model type is either PDB or LORES");
+  }
+
+  return Py_BuildValue("i", 0);
+}
+
+//ComplexModel methods GetPoints(Point3DVector &) 
+char pypointsmodelpy_get_complexpoints__name__[] = "get_complexpoints";
+char pypointsmodelpy_get_complexpoints__doc__[] = "Get points from complex model (container for LORES & PDB model)";
+
+PyObject * pypointsmodelpy_get_complexpoints(PyObject *, PyObject *args){
+  PyObject *pycomplexmodel = 0, *pypoint3dvec = 0;
+  int ok = PyArg_ParseTuple(args, "OO", &pycomplexmodel, &pypoint3dvec);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pycomplexmodel);
+  void *temp2 = PyCObject_AsVoidPtr(pypoint3dvec);
+
+  ComplexModel * thiscomplex = static_cast<ComplexModel *>(temp);
+  vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2);
+
+  int npts = thiscomplex->GetPoints(*thisvec);
+
+  return Py_BuildValue("i", npts);
+}
+
+//create a new vector that holds of class Point3D objects 
+char pypointsmodelpy_new_point3dvec__doc__[] = "";
+char pypointsmodelpy_new_point3dvec__name__[] = "new_point3dvec";
+
+PyObject * pypointsmodelpy_new_point3dvec(PyObject *, PyObject *args)
+{
+  PyObject *pyvec = 0;
+
+  vector<Point3D> *newvec = new vector<Point3D>();
+
+  return PyCObject_FromVoidPtr(newvec, PyDelPoint3DVec);
+}
+
+void PyDelPoint3DVec(void *ptr)
+{
+  vector<Point3D> * oldvec = static_cast<vector<Point3D> *>(ptr);
+  delete oldvec;
+  return;
+
+}
+
+//LORESModel method distribution(point3dvec)
+char pypointsmodelpy_get_lores_pr__name__[] = "get_lores_pr";
+char pypointsmodelpy_get_lores_pr__doc__[] = "calculate distance distribution function";
+
+PyObject * pypointsmodelpy_get_lores_pr(PyObject *, PyObject *args)
+{
+  PyObject *pymodel = 0, *pypoint3dvec = 0;
+  int ok = PyArg_ParseTuple(args, "OO", &pymodel, &pypoint3dvec);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pymodel);
+  void *temp2 = PyCObject_AsVoidPtr(pypoint3dvec);
+  vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2);
+
+  LORESModel * thislores = static_cast<LORESModel *>(temp);
+  double rmax = thislores->DistDistribution(*thisvec);
+  
+  return Py_BuildValue("d", rmax);
+}
+
+//LORESModel method distribution_xy(point3dvec)
+char pypointsmodelpy_distdistribution_xy__name__[] = "distdistribution_xy";
+char pypointsmodelpy_distdistribution_xy__doc__[] = "calculate distance distribution function on XY plane";
+
+PyObject * pypointsmodelpy_distdistribution_xy(PyObject *, PyObject *args)
+{
+  PyObject *pymodel = 0, *pypoint3dvec = 0;
+  int ok = PyArg_ParseTuple(args, "OO", &pymodel, &pypoint3dvec);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pymodel);
+  void *temp2 = PyCObject_AsVoidPtr(pypoint3dvec);
+
+  LORESModel * thislores = static_cast<LORESModel *>(temp);
+
+  vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2);
+  thislores->DistDistributionXY(*thisvec);
+
+  return Py_BuildValue("i", 0);
+}
+
+//PDBModel method distribution_xy(point3dvec)
+char pypointsmodelpy_get_pdb_pr_xy__name__[] = "get_pdb_pr_xy";
+char pypointsmodelpy_get_pdb_pr_xy__doc__[] = "calculate distance distribution function on XY plane";
+
+PyObject * pypointsmodelpy_get_pdb_pr_xy(PyObject *, PyObject *args)
+{
+  PyObject *pymodel = 0, *pypoint3dvec = 0;
+  int ok = PyArg_ParseTuple(args, "OO", &pymodel, &pypoint3dvec);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pymodel);
+  void *temp2 = PyCObject_AsVoidPtr(pypoint3dvec);
+  vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2);
+
+  PDBModel * thispdb = static_cast<PDBModel *>(temp);
+  thispdb->DistDistributionXY(*thisvec);
+
+  return Py_BuildValue("i", 0);
+}
+
+//PDBModel method distribution(point3dvec)
+char pypointsmodelpy_get_pdb_pr__name__[] = "get_pdb_pr";
+char pypointsmodelpy_get_pdb_pr__doc__[] = "calculate distance distribution function";
+
+PyObject * pypointsmodelpy_get_pdb_pr(PyObject *, PyObject *args)
+{
+  PyObject *pymodel = 0, *pypoint3dvec = 0;
+  int ok = PyArg_ParseTuple(args, "OO", &pymodel, &pypoint3dvec);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pymodel);
+  void *temp2 = PyCObject_AsVoidPtr(pypoint3dvec);
+  vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2);
+
+  PDBModel * thispdb = static_cast<PDBModel *>(temp);
+  thispdb->DistDistribution(*thisvec);
+
+  return Py_BuildValue("i", 0);
+}
+
+//ComplexModel method distribution(point3dvec)
+char pypointsmodelpy_get_complex_pr__name__[] = "get_complex_pr";
+char pypointsmodelpy_get_complex_pr__doc__[] = "calculate distance distribution function";
+
+PyObject * pypointsmodelpy_get_complex_pr(PyObject *, PyObject *args)
+{
+  PyObject *pymodel = 0, *pypoint3dvec = 0;
+  int ok = PyArg_ParseTuple(args, "OO", &pymodel, &pypoint3dvec);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pymodel);
+  void *temp2 = PyCObject_AsVoidPtr(pypoint3dvec);
+  vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2);
+
+  ComplexModel * thiscomplex = static_cast<ComplexModel *>(temp);
+  thiscomplex->DistDistribution(*thisvec);
+
+  return Py_BuildValue("i", 0);
+}
+
+//LORESModel method CalculateIQ(iq)
+char pypointsmodelpy_get_lores_iq__name__[] = "get_lores_iq";
+char pypointsmodelpy_get_lores_iq__doc__[] = "calculate scattering intensity";
+
+PyObject * pypointsmodelpy_get_lores_iq(PyObject *, PyObject *args)
+{
+  PyObject *pylores = 0, *pyiq = 0;
+  int ok = PyArg_ParseTuple(args, "OO", &pylores, &pyiq);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pylores);
+  void *temp2 = PyCObject_AsVoidPtr(pyiq);
+
+  LORESModel * thislores = static_cast<LORESModel *>(temp);
+  IQ * thisiq = static_cast<IQ *>(temp2);
+
+  thislores->CalculateIQ(thisiq);
+
+  return Py_BuildValue("i",0);
+}
+
+//LORESModel method CalculateIQ(q)
+char pypointsmodelpy_get_lores_i__name__[] = "get_lores_i";
+char pypointsmodelpy_get_lores_i__doc__[] = "calculate averaged scattering intensity from a single q";
+
+PyObject * pypointsmodelpy_get_lores_i(PyObject *, PyObject *args)
+{
+  PyObject *pylores = 0;
+  double q = 0;
+  int ok = PyArg_ParseTuple(args, "Od", &pylores, &q);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pylores);
+
+  LORESModel * thislores = static_cast<LORESModel *>(temp);
+
+  double I = thislores->CalculateIQ(q);
+
+  return Py_BuildValue("d",I);
+}
+
+// method calculateIQ_2D(iq)
+char pypointsmodelpy_calculateIQ_2D__name__[] = "calculateIQ_2D";
+char pypointsmodelpy_calculateIQ_2D__doc__[] = "calculate scattering intensity";
+
+PyObject * pypointsmodelpy_calculateIQ_2D(PyObject *, PyObject *args)
+{
+  PyObject *pylores = 0, *pyiq = 0;
+  double theta = 0;
+  int ok = PyArg_ParseTuple(args, "OOd", &pylores, &pyiq,&theta);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pylores);
+  void *temp2 = PyCObject_AsVoidPtr(pyiq);
+
+  LORESModel * thislores = static_cast<LORESModel *>(temp);
+  IQ * thisiq = static_cast<IQ *>(temp2);
+
+  thislores->CalculateIQ_2D(thisiq,theta);
+
+  return Py_BuildValue("i",0);
+}
+
+// method calculateI_Qxy(Qx,Qy)
+char pypointsmodelpy_calculateI_Qxy__name__[] = "calculateI_Qxy";
+char pypointsmodelpy_calculateI_Qxy__doc__[] = "calculate scattering intensity on a 2D pixel";
+
+PyObject * pypointsmodelpy_calculateI_Qxy(PyObject *, PyObject *args)
+{
+  PyObject *pylores = 0;
+  double qx = 0, qy = 0;
+  double I = 0;
+
+  int ok = PyArg_ParseTuple(args, "Odd", &pylores, &qx,&qy);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pylores);
+  LORESModel * thislores = static_cast<LORESModel *>(temp);
+
+  I = thislores->CalculateIQ_2D(qx,qy);
+
+  return Py_BuildValue("d",I);
+}
+
+// PDBModel method calculateIQ(iq)
+char pypointsmodelpy_get_pdb_iq__name__[] = "get_pdb_iq";
+char pypointsmodelpy_get_pdb_iq__doc__[] = "calculate scattering intensity for PDB model";
+
+PyObject * pypointsmodelpy_get_pdb_iq(PyObject *, PyObject *args)
+{
+  PyObject *pymodel = 0, *pyiq = 0;
+  int ok = PyArg_ParseTuple(args, "OO", &pymodel, &pyiq);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pymodel);
+  void *temp2 = PyCObject_AsVoidPtr(pyiq);
+
+  PDBModel * thispdb = static_cast<PDBModel *>(temp);
+  IQ * thisiq = static_cast<IQ *>(temp2);
+
+  thispdb->CalculateIQ(thisiq);
+
+  return Py_BuildValue("i",0);
+}
+
+// PDBModel method calculateIQ_2D(qx,qy)
+char pypointsmodelpy_get_pdb_Iqxy__name__[] = "get_pdb_Iqxy";
+char pypointsmodelpy_get_pdb_Iqxy__doc__[] = "calculate scattering intensity by a given (qx,qy) for PDB model";
+
+PyObject * pypointsmodelpy_get_pdb_Iqxy(PyObject *, PyObject *args)
+{
+  PyObject *pypdb = 0;
+  double qx = 0, qy = 0;
+  double I = 0;
+
+  int ok = PyArg_ParseTuple(args, "Odd", &pypdb, &qx,&qy);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pypdb);
+  PDBModel * thispdb = static_cast<PDBModel *>(temp);
+
+  I = thispdb->CalculateIQ_2D(qx,qy);
+
+  return Py_BuildValue("d",I);
+}
+
+// ComplexModel method calculateIQ(iq)
+char pypointsmodelpy_get_complex_iq__name__[] = "get_complex_iq";
+char pypointsmodelpy_get_complex_iq__doc__[] = "calculate scattering intensity for COMPLEX model";
+
+PyObject * pypointsmodelpy_get_complex_iq(PyObject *, PyObject *args)
+{
+  PyObject *pymodel = 0, *pyiq = 0;
+  int ok = PyArg_ParseTuple(args, "OO", &pymodel, &pyiq);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pymodel);
+  void *temp2 = PyCObject_AsVoidPtr(pyiq);
+
+  ComplexModel * thiscomplex = static_cast<ComplexModel *>(temp);
+  IQ * thisiq = static_cast<IQ *>(temp2);
+
+  thiscomplex->CalculateIQ(thisiq);
+
+  return Py_BuildValue("i",0);
+}
+
+//LORESModel method CalculateIQ(q) 
+char pypointsmodelpy_get_complex_i__name__[] = "get_complex_i";
+char pypointsmodelpy_get_complex_i__doc__[] = "calculate averaged scattering intensity from a single q";
+
+PyObject * pypointsmodelpy_get_complex_i(PyObject *, PyObject *args)
+{
+  PyObject *pylores = 0;
+  double q = 0;
+  int ok = PyArg_ParseTuple(args, "Od", &pylores, &q);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pylores);
+
+  ComplexModel * thiscomplex = static_cast<ComplexModel *>(temp);
+
+  double I = thiscomplex->CalculateIQ(q);
+
+  return Py_BuildValue("d",I);
+}
+
+char pypointsmodelpy_get_complex_i_error__name__[] = "get_complex_i_error";
+char pypointsmodelpy_get_complex_i_error__doc__[] = "calculate error on averaged scattering intensity from a single q";
+
+PyObject * pypointsmodelpy_get_complex_i_error(PyObject *, PyObject *args)
+{
+  PyObject *pylores = 0;
+  double q = 0;
+  int ok = PyArg_ParseTuple(args, "Od", &pylores, &q);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pylores);
+
+  ComplexModel * thiscomplex = static_cast<ComplexModel *>(temp);
+
+  double I = thiscomplex->CalculateIQError(q);
+
+  return Py_BuildValue("d",I);
+}
+
+
+
+
+//method outputPR(string filename)
+char pypointsmodelpy_outputPR__name__[] = "outputPR";
+char pypointsmodelpy_outputPR__doc__[] = "print out P(R) to a file";
+
+PyObject * pypointsmodelpy_outputPR(PyObject *, PyObject *args)
+{
+  PyObject *pymodel = 0;
+  char *outfile;
+  int ok = PyArg_ParseTuple(args, "Os", &pymodel, &outfile);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pymodel);
+
+  LORESModel * thislores = static_cast<LORESModel *>(temp);
+
+  thislores->OutputPR(outfile);
+
+  return Py_BuildValue("i", 0);
+}
+
+//method outputPR_xy(string filename)
+char pypointsmodelpy_outputPR_xy__name__[] = "outputPR_xy";
+char pypointsmodelpy_outputPR_xy__doc__[] = "print out P(R) to a file";
+
+PyObject * pypointsmodelpy_outputPR_xy(PyObject *, PyObject *args)
+{
+  PyObject *pyloresmodel = 0;
+  char *outfile;
+  int ok = PyArg_ParseTuple(args, "Os", &pyloresmodel, &outfile);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pyloresmodel);
+
+  LORESModel * thislores = static_cast<LORESModel *>(temp);
+
+  thislores->OutputPR_XY(outfile);
+
+  return Py_BuildValue("i", 0);
+}
+
+//PDBModel method outputPR(string filename)
+char pypointsmodelpy_save_pdb_pr__name__[] = "save_pdb_pr";
+char pypointsmodelpy_save_pdb_pr__doc__[] = "print out P(R) to a file";
+
+PyObject * pypointsmodelpy_save_pdb_pr(PyObject *, PyObject *args)
+{
+  PyObject *pymodel = 0;
+  char *outfile;
+  int ok = PyArg_ParseTuple(args, "Os", &pymodel, &outfile);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pymodel);
+
+  PDBModel * thispdb = static_cast<PDBModel *>(temp);
+
+  thispdb->OutputPR(outfile);
+
+  return Py_BuildValue("i", 0);
+}
+
+//ComplexModel method outputPR(string filename)
+char pypointsmodelpy_save_complex_pr__name__[] = "save_complex_pr";
+char pypointsmodelpy_save_complex_pr__doc__[] = "print out P(R) to a file";
+
+PyObject * pypointsmodelpy_save_complex_pr(PyObject *, PyObject *args)
+{
+  PyObject *pymodel = 0;
+  char *outfile;
+  int ok = PyArg_ParseTuple(args, "Os", &pymodel, &outfile);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pymodel);
+
+  ComplexModel * thiscomplex = static_cast<ComplexModel *>(temp);
+
+  thiscomplex->OutputPR(outfile);
+
+  return Py_BuildValue("i", 0);
+}
+
+
+//method outputPDB(string filename)
+char pypointsmodelpy_outputPDB__name__[] = "outputPDB";
+char pypointsmodelpy_outputPDB__doc__[] = "save the monte-carlo distributed points of the geomodel into a PDB format file.\
+                                           a .pdb extension will be automatically added";
+
+PyObject * pypointsmodelpy_outputPDB(PyObject *, PyObject *args)
+{
+  PyObject *pyloresmodel = 0, *pypoint3dvec=0;
+  char *outfile;
+  int ok = PyArg_ParseTuple(args, "OOs", &pyloresmodel, &pypoint3dvec,&outfile);
+  if(!ok) return NULL;
+
+  void *temp = PyCObject_AsVoidPtr(pyloresmodel);
+
+  LORESModel * thislores = static_cast<LORESModel *>(temp);
+
+  void *temp2 = PyCObject_AsVoidPtr(pypoint3dvec);
+  vector<Point3D> * thisvec = static_cast<vector<Point3D> *>(temp2);
+
+  thislores->OutputPDB(*thisvec,outfile);
+
+  return Py_BuildValue("i", 0);
+}
+
+// version
+// $Id$
+
+// End of file
Index: realSpaceModeling/pointsmodelpy/pointsmodelpymodule/misc.h
===================================================================
--- realSpaceModeling/pointsmodelpy/pointsmodelpymodule/misc.h	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/pointsmodelpy/pointsmodelpymodule/misc.h	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,207 @@
+#if !defined(pypointsmodelpy_misc_h)
+#define pypointsmodelpy_misc_h
+
+// @copyright: University of Tennessee, for the DANSE project
+extern char pypointsmodelpy_copyright__name__[];
+extern char pypointsmodelpy_copyright__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_copyright(PyObject *, PyObject *);
+
+// LORESModel constructor LORESModel(double density)
+extern char pypointsmodelpy_new_loresmodel__name__[];
+extern char pypointsmodelpy_new_loresmodel__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_new_loresmodel(PyObject *, PyObject *);
+
+//Clean LORESModel constructor memory usage
+static void PyDelLores(void *);
+
+//LORESModel methods add(GeoShapes &, double sld)
+extern char pypointsmodelpy_lores_add__name__[];
+extern char pypointsmodelpy_lores_add__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_lores_add(PyObject *, PyObject *);
+
+//LORESModel methods GetPoints(vector<Point3D> &)
+extern char pypointsmodelpy_get_lorespoints__name__[];
+extern char pypointsmodelpy_get_lorespoints__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_get_lorespoints(PyObject *, PyObject *);
+
+//PDBModel constructor PDBModel()
+extern char pypointsmodelpy_new_pdbmodel__name__[];
+extern char pypointsmodelpy_new_pdbmodel__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_new_pdbmodel(PyObject *, PyObject *);
+
+//Clean PDBModel constructor memory usage
+static void PyDelPDB(void *);
+
+//PDBModel method AddPDB(string)
+extern char pypointsmodelpy_pdbmodel_add__name__[];
+extern char pypointsmodelpy_pdbmodel_add__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_pdbmodel_add(PyObject *, PyObject *);
+
+//PDBModel method GetPoints(Point3DVector &)
+extern char pypointsmodelpy_get_pdbpoints__name__[];
+extern char pypointsmodelpy_get_pdbpoints__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_get_pdbpoints(PyObject *, PyObject *);
+
+//ComplexModel constructor ComplexModel()
+extern char pypointsmodelpy_new_complexmodel__name__[];
+extern char pypointsmodelpy_new_complexmodel__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_new_complexmodel(PyObject *, PyObject *);
+
+//Clean Complexodel constructor memory usage
+static void PyDelComplex(void *);
+
+//ComplexModel method AddComplex(string)
+extern char pypointsmodelpy_complexmodel_add__name__[];
+extern char pypointsmodelpy_complexmodel_add__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_complexmodel_add(PyObject *, PyObject *);
+
+//ComplexModel method GetPoints(Point3DVector &)
+extern char pypointsmodelpy_get_complexpoints__name__[];
+extern char pypointsmodelpy_get_complexpoints__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_get_complexpoints(PyObject *, PyObject *);
+
+//generate a new vector of points3d
+extern char pypointsmodelpy_new_point3dvec__name__[];
+extern char pypointsmodelpy_new_point3dvec__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_new_point3dvec(PyObject *, PyObject *);
+
+//clean new_point3dvec
+static void PyDelPoint3DVec(void *);
+
+// method FillPoints(loresmodel, point3dvec)
+//extern char pypointsmodelpy_fillpoints__name__[];
+//extern char pypointsmodelpy_fillpoints__doc__[];
+//extern "C"
+//PyObject * pypointsmodelpy_fillpoints(PyObject *, PyObject *);
+
+// LORESModel method distdistribution(point3dvec)
+extern char pypointsmodelpy_get_lores_pr__name__[];
+extern char pypointsmodelpy_get_lores_pr__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_get_lores_pr(PyObject *, PyObject *);
+
+// method distdistribution_xy(point3dvec)
+extern char pypointsmodelpy_distdistribution_xy__name__[];
+extern char pypointsmodelpy_distdistribution_xy__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_distdistribution_xy(PyObject *, PyObject *);
+
+// PDBModel method distdistribution(point3dvec)
+extern char pypointsmodelpy_get_pdb_pr__name__[];
+extern char pypointsmodelpy_get_pdb_pr__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_get_pdb_pr(PyObject *, PyObject *);
+
+// PDBModel method distdistribution_xy(point3dvec)
+extern char pypointsmodelpy_get_pdb_pr_xy__name__[];
+extern char pypointsmodelpy_get_pdb_pr_xy__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_get_pdb_pr_xy(PyObject *, PyObject *);
+
+// ComplexModel method distdistribution(point3dvec)
+extern char pypointsmodelpy_get_complex_pr__name__[];
+extern char pypointsmodelpy_get_complex_pr__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_get_complex_pr(PyObject *, PyObject *);
+
+// LORESModel method calculateIQ(iq)
+extern char pypointsmodelpy_get_lores_iq__name__[];
+extern char pypointsmodelpy_get_lores_iq__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_get_lores_iq(PyObject *, PyObject *);
+
+// LORESModel method CalculateIQ(q)
+extern char pypointsmodelpy_get_lores_i__name__[];
+extern char pypointsmodelpy_get_lores_i__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_get_lores_i(PyObject *, PyObject *);
+
+// ComplexModel method CalculateIQ(q)
+extern char pypointsmodelpy_get_complex_i__name__[];
+extern char pypointsmodelpy_get_complex_i__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_get_complex_i(PyObject *, PyObject *);
+
+// ComplexModel method CalculateIQError(q)
+extern char pypointsmodelpy_get_complex_i_error__name__[];
+extern char pypointsmodelpy_get_complex_i_error__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_get_complex_i_error(PyObject *, PyObject *);
+
+// method calculateIQ_2D(iq,theta)
+extern char pypointsmodelpy_calculateIQ_2D__name__[];
+extern char pypointsmodelpy_calculateIQ_2D__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_calculateIQ_2D(PyObject *, PyObject *);
+
+// method calculateI_Qxy(Qx,Qy)
+extern char pypointsmodelpy_calculateI_Qxy__name__[];
+extern char pypointsmodelpy_calculateI_Qxy__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_calculateI_Qxy(PyObject *, PyObject *);
+
+// PDBModel method calculateIQ(iq)
+extern char pypointsmodelpy_get_pdb_iq__name__[];
+extern char pypointsmodelpy_get_pdb_iq__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_get_pdb_iq(PyObject *, PyObject *);
+
+// PDBModel method calculateIQ_2D(qx,qy)
+extern char pypointsmodelpy_get_pdb_Iqxy__name__[];
+extern char pypointsmodelpy_get_pdb_Iqxy__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_get_pdb_Iqxy(PyObject *, PyObject *);
+
+// ComplexModel method calculateIQ(iq)
+extern char pypointsmodelpy_get_complex_iq__name__[];
+extern char pypointsmodelpy_get_complex_iq__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_get_complex_iq(PyObject *, PyObject *);
+
+// method outputPR
+extern char pypointsmodelpy_outputPR__name__[];
+extern char pypointsmodelpy_outputPR__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_outputPR(PyObject *, PyObject *);
+
+// method outputPR_xy
+extern char pypointsmodelpy_outputPR_xy__name__[];
+extern char pypointsmodelpy_outputPR_xy__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_outputPR_xy(PyObject *, PyObject *);
+
+// PDBModel method outputPR
+extern char pypointsmodelpy_save_pdb_pr__name__[];
+extern char pypointsmodelpy_save_pdb_pr__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_save_pdb_pr(PyObject *, PyObject *);
+
+// ComplexModel method outputPR
+extern char pypointsmodelpy_save_complex_pr__name__[];
+extern char pypointsmodelpy_save_complex_pr__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_save_complex_pr(PyObject *, PyObject *);
+
+// method outputPDB
+extern char pypointsmodelpy_outputPDB__name__[];
+extern char pypointsmodelpy_outputPDB__doc__[];
+extern "C"
+PyObject * pypointsmodelpy_outputPDB(PyObject *, PyObject *);
+
+#endif
+
+// version
+// $Id$
+
+// End of file
Index: realSpaceModeling/pointsmodelpy/pointsmodelpymodule/pointsmodelpymodule.cc
===================================================================
--- realSpaceModeling/pointsmodelpy/pointsmodelpymodule/pointsmodelpymodule.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
+++ realSpaceModeling/pointsmodelpy/pointsmodelpymodule/pointsmodelpymodule.cc	(revision f2d6445700c382c6d6dc62bc2017ea43391f7e0d)
@@ -0,0 +1,52 @@
+// -*- C++ -*-
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+//                               Michael A.G. Aivazis
+//                        California Institute of Technology
+//                        (C) 1998-2005  All Rights Reserved
+// 
+//  <LicenseText>
+// 
+//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// 
+
+//#include <portinfo>
+
+#include <Python.h>
+
+#include "exceptions.h"
+#include "bindings.h"
+
+
+char pypointsmodelpy_module__doc__[] = "";
+
+// Initialization function for the module (*must* be called initpointsmodelpy)
+extern "C"
+void
+initpointsmodelpy()
+{
+    // create the module and add the functions
+    PyObject * m = Py_InitModule4(
+        "pointsmodelpy", pypointsmodelpy_methods,
+        pypointsmodelpy_module__doc__, 0, PYTHON_API_VERSION);
+
+    // get its dictionary
+    PyObject * d = PyModule_GetDict(m);
+
+    // check for errors
+    if (PyErr_Occurred()) {
+        Py_FatalError("can't initialize module pointsmodelpy");
+    }
+
+    // install the module exceptions
+    pypointsmodelpy_runtimeError = PyErr_NewException("pointsmodelpy.runtime", 0, 0);
+    PyDict_SetItemString(d, "RuntimeException", pypointsmodelpy_runtimeError);
+
+    return;
+}
+
+// version
+// $Id$
+
+// End of file
