Index: theoryview/perspectives/theory/basepage.py
===================================================================
--- theoryview/perspectives/theory/basepage.py	(revision a1b247163dd00d4b19fd556819b00a9ccf638299)
+++ theoryview/perspectives/theory/basepage.py	(revision fb59ed90d8d3e021f0f291a9064098aae148158d)
@@ -80,4 +80,6 @@
         ##[cb state, name, value, "+/-", error of fit, min, max , units]
         self.parameters=[]
+        # non-fittable parameter whose value is astring
+        self.str_parameters = []
         ## list of parameters to fit , must be like self.parameters
         self.param_toFit=[]
@@ -721,4 +723,6 @@
         self._reset_parameters_state(self.orientation_params,
                                      state.orientation_params)
+        self._reset_parameters_state(self.str_parameters,
+                                     state.str_parameters)
         self._reset_parameters_state(self.parameters,state.parameters)    
          ## display dispersion info layer        
@@ -1059,4 +1063,6 @@
                 elif k == "Structure Factors":
                      self.struct_rbutton.SetValue(True)
+                elif  k == "Multi-Functions":
+                    continue
                 else:
                     self.plugin_rbutton.SetValue(True)
@@ -1109,4 +1115,6 @@
                 elif k == "Structure Factors":
                     self.struct_rbutton.SetValue(True)
+                elif  k == "Multi-Functions":
+                    continue
                 else:
                     self.plugin_rbutton.SetValue(True)
@@ -1195,4 +1203,5 @@
         self.text2 = wx.StaticText( self,-1,"P(Q)*S(Q)" )
         self.mutifactor_text = wx.StaticText( self,-1,"No. of Shells: " )
+        self.mutifactor_text1 = wx.StaticText( self,-1,"" )
         self.show_sld_button = wx.Button( self,-1,"Show SLD Profile" )
         self.show_sld_button.Bind(wx.EVT_BUTTON,self._on_show_sld)
@@ -1244,4 +1253,6 @@
         mutifactor_selection.Add(self.multifactorbox)
         mutifactor_selection.Add((5,5))
+        mutifactor_selection.Add(self.mutifactor_text1)
+        mutifactor_selection.Add((10,5))
         mutifactor_selection.Add(self.show_sld_button)
         
@@ -1253,4 +1264,5 @@
         
         self._set_multfactor_combobox()
+        self.multifactorbox.SetSelection(1)
         self.show_sld_button.Hide()
         
@@ -1271,15 +1283,17 @@
         sld_data = Data1D(x,y)
         sld_data.name = 'SLD'
-   
-        self.panel = SLDPanel(self, data=sld_data,id =-1 )
+        sld_data.axes = self.sld_axes
+        self.panel = SLDPanel(self, data=sld_data,axes =self.sld_axes,id =-1 )
         self.panel.ShowModal()
 
-    def _set_multfactor_combobox(self):   
+    def _set_multfactor_combobox(self, multiplicity=10):   
         """
         Set comboBox for muitfactor of CoreMultiShellModel
-        """
-        for idx in range(0,5):
+        :param multiplicit: no. of multi-functionality
+        """
+        # build content of the combobox
+        for idx in range(0,multiplicity):
             self.multifactorbox.Append(str(idx),int(idx))
-            self.multifactorbox.SetSelection(1) 
+            #self.multifactorbox.SetSelection(1) 
         self._hide_multfactor_combobox()
         
@@ -1290,4 +1304,5 @@
         if not self.mutifactor_text.IsShown():
             self.mutifactor_text.Show(True)
+            self.mutifactor_text1.Show(True)
         if not self.multifactorbox.IsShown():
             self.multifactorbox.Show(True)  
@@ -1299,4 +1314,5 @@
         if self.mutifactor_text.IsShown():
             self.mutifactor_text.Hide()
+            self.mutifactor_text1.Hide()
         if self.multifactorbox.IsShown():
             self.multifactorbox.Hide()   
@@ -1487,10 +1503,34 @@
             # set multifactor for Mutifunctional models    
             if form_factor().__class__ in self.model_list_box["Multi-Functions"]:
+                m_id = self.multifactorbox.GetCurrentSelection()
+                multiplicity = form_factor().multiplicity_info[0]
+                self.multifactorbox.Clear()
+                #self.mutifactor_text.SetLabel(form_factor().details[])
+                self._set_multfactor_combobox(multiplicity)
                 self._show_multfactor_combobox()
-                self.show_sld_button.Show(True)
-                m_id = self.multifactorbox.GetCurrentSelection()
+                text = form_factor().multiplicity_info[1]#'No. of Shells: '
+
+                #self.mutifactor_text.Clear()
+                self.mutifactor_text.SetLabel(text)
+
+                # Check max value
+                if m_id > multiplicity -1:
+                    # default value
+                    m_id = 1
                 self.multi_factor = self.multifactorbox.GetClientData(m_id)
                 if self.multi_factor == None: self.multi_factor =1
                 form_factor = form_factor(int(self.multi_factor))
+                self.multifactorbox.SetSelection(m_id)
+                # Check len of the text1 and max_multiplicity
+                text = ''
+                if form_factor.multiplicity_info[0] == len(form_factor.multiplicity_info[2]):
+                    text = form_factor.multiplicity_info[2][self.multi_factor]
+                self.mutifactor_text1.SetLabel(text)
+                # Check if model has  get sld profile.
+                if len(form_factor.multiplicity_info[3]) > 0:
+                    self.sld_axes = form_factor.multiplicity_info[3]
+                    self.show_sld_button.Show(True)
+                else:
+                    self.sld_axes = ""
             else:
                 self._hide_multfactor_combobox()
Index: theoryview/perspectives/theory/model_panel.py
===================================================================
--- theoryview/perspectives/theory/model_panel.py	(revision 20905a0de823d5d4e35ce6b55e1584bb244e53f2)
+++ theoryview/perspectives/theory/model_panel.py	(revision fb59ed90d8d3e021f0f291a9064098aae148158d)
@@ -362,4 +362,51 @@
         event = PageInfoEvent(page = self)
         wx.PostEvent(self.parent, event)
+        
+    def _set_fun_box_list(self,fun_box):
+        """
+        Set the list of func for multifunctional models
+        
+        :param fun_box: function combo box
+        """
+        # Check if it is multi_functional model
+        if self.model.__class__ not in self.model_list_box["Multi-Functions"]:
+            return None
+        # Get the func name list
+        list = self.model.fun_list
+       
+        if len(list) == 0:
+            return None
+
+        # build function (combo)box
+        ind = 0
+        while(ind < len(list)):
+            for key, val in list.iteritems():
+                if (val == ind):
+                    fun_box.Append(key,val)
+                    break
+            ind += 1
+            
+    def _on_fun_box(self,event):
+        """
+        Select an func: Erf,Rparabola,LParabola...
+        """
+        fun_val = None
+        fun_box = event.GetEventObject()
+        name = fun_box.Name
+        value = fun_box.GetValue()
+        if self.model.fun_list.has_key(value):
+            fun_val = self.model.fun_list[value]
+        
+        self.model.setParam(name,fun_val)
+        # save state
+        self._copy_parameters_state(self.str_parameters, self.state.str_parameters)
+        # update params
+        #self._update_paramv_on_fit() 
+
+        # draw
+        self._draw_model()
+        self.Refresh()
+        # get ready for new event
+        event.Skip()
               
     def set_data(self, list=[], state=None):
@@ -507,4 +554,5 @@
         self.sizer3.Clear(True)
         self.parameters = []
+        self.str_parameters = []
         self.param_toFit=[]
         self.fixed_param=[]
@@ -532,9 +580,16 @@
             Custom compare to order, first by alphabets then second by number.
             """ 
+            # number at the last digit
             a_last = a[len(a)-1]
             b_last = b[len(b)-1]
-            
+            # default
             num_a = None
             num_b = None
+            # split the names
+            a2 = a.lower().split('_')
+            b2 = b.lower().split('_')
+            # check length of a2, b2
+            len_a2 = len(a2)
+            len_b2 = len(b2)
             # check if it contains a int number(<10)
             try: 
@@ -544,16 +599,25 @@
                 num_b = int(b_last)
             except: pass
+            # Put 'scale' near the top; happens 
+            # when numbered param name exists
+            if a == 'scale':
+                return -1
             # both have a number    
             if num_a != None and num_b != None:
-                if num_a > num_b: return 1
+                if num_a > num_b: return -1
+                # same number
                 elif num_a == num_b: 
-                    return cmp(a.lower(), b.lower())
-                else: return -1
+                    # different last names
+                    if a2[len_a2-1] != b2[len_b2-1] and num_a != 0:
+                        return -cmp(a2[len_a2-1], b2[len_b2-1])
+                    else: 
+                        return cmp(a, b) 
+                else: return 1
             # one of them has a number
             elif num_a != None: return 1
             elif num_b != None: return -1
-            # no nuumbers
+            # no numbers
             else: return cmp(a.lower(), b.lower())
-            
+
         keys.sort(custom_compare)
 
@@ -578,26 +642,51 @@
                 iy += 1
                 ix = 0
-                name = wx.StaticText(self, -1,item)
-                sizer.Add( name,( iy, ix),(1,1),
-                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-
-                ix += 1
-                value= self.model.getParam(item)
-                ctl1 = self.ModelTextCtrl(self, -1, size=(_BOX_WIDTH,20),
-                    style=wx.TE_PROCESS_ENTER)
-                
-                ctl1.SetValue(str (format_number(value)))
-                
-                sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND)
-                ix +=1
-                # Units
-                if self.model.details.has_key(item):
-                    units = wx.StaticText(self, -1, self.model.details[item][0], style=wx.ALIGN_LEFT)
+                if self.model.__class__ in self.model_list_box["Multi-Functions"]\
+                            and item in self.model.non_fittable:
+                    non_fittable_name = wx.StaticText(self, -1, item )
+                    sizer.Add(non_fittable_name,(iy, ix),(1,1),\
+                            wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+                    ## add parameter value
+                    ix += 1
+                    value= self.model.getParam(item)
+                    if len(self.model.fun_list) > 0:
+                        num = item.split('_')[1][5:7]
+                        fun_box = wx.ComboBox(self, -1,size=(100,-1),style=wx.CB_READONLY, name = '%s'% item)
+                        self._set_fun_box_list(fun_box)
+                        fun_box.SetSelection(0)
+                        #self.fun_box.SetToolTipString("A function describing the interface")
+                        wx.EVT_COMBOBOX(fun_box,-1, self._on_fun_box)
+                    else:
+                        fun_box = self.ModelTextCtrl(self, -1, size=(_BOX_WIDTH,20),
+                                        style=wx.TE_PROCESS_ENTER, name ='%s'% item)
+                        fun_box.SetToolTipString("Hit 'Enter' after typing.")
+                        fun_box.SetValue(format_number(value))
+                    sizer.Add(fun_box, (iy,ix),(1,1), wx.EXPAND)
+                    ##[cb state, name, value, "+/-", error of fit, min, max , units]
+                    self.str_parameters.append([None,item, fun_box, \
+                                                None,None,None,None,None])
                 else:
-                    units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT)
-                sizer.Add(units, (iy,ix),(1,1),  wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-                ##[cb state, name, value, "+/-", error of fit, min, max , units]
-                self.parameters.append([None,item, ctl1,
-                                        None,None, None, None,None])
+                    name = wx.StaticText(self, -1,item)
+                    sizer.Add( name,( iy, ix),(1,1),
+                                 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+    
+                    ix += 1
+                    value= self.model.getParam(item)
+                    ctl1 = self.ModelTextCtrl(self, -1, size=(_BOX_WIDTH,20),
+                        style=wx.TE_PROCESS_ENTER)
+                    
+                    ctl1.SetValue(str (format_number(value)))
+                    
+                    sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND)
+                    ix +=1
+                    # Units
+                    if self.model.details.has_key(item):
+                        units = wx.StaticText(self, -1, self.model.details[item][0], style=wx.ALIGN_LEFT)
+                    else:
+                        units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT)
+                    sizer.Add(units, (iy,ix),(1,1),  wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+                    ##[cb state, name, value, "+/-", error of fit, min, max , units]
+                    self.parameters.append([None,item, ctl1,
+                                            None,None, None, None,None])
         iy+=1
         sizer.Add((10,10),(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
Index: theoryview/perspectives/theory/models.py
===================================================================
--- theoryview/perspectives/theory/models.py	(revision e87f9fcbc3b888858794e4b31e0c3fb58e17f6fe)
+++ theoryview/perspectives/theory/models.py	(revision fb59ed90d8d3e021f0f291a9064098aae148158d)
@@ -240,8 +240,22 @@
         self.multiplication_factor.append(ParallelepipedModel)
         
+        from sans.models.CSParallelepipedModel import CSParallelepipedModel
+        self.shape_list.append(CSParallelepipedModel)
+        self.multiplication_factor.append(CSParallelepipedModel)
+        
         from sans.models.EllipticalCylinderModel import EllipticalCylinderModel
         self.shape_list.append(EllipticalCylinderModel)
         self.multiplication_factor.append(EllipticalCylinderModel)
-                
+        
+        from sans.models.BarBellModel import BarBellModel
+        self.shape_list.append(BarBellModel)
+        # not implemeted yet!
+        #self.multiplication_factor.append(BarBellModel)
+        
+        from sans.models.CappedCylinderModel import CappedCylinderModel
+        self.shape_list.append(CappedCylinderModel)
+        # not implemeted yet!
+        #self.multiplication_factor.append(CappedCylinderModel)
+        
         from sans.models.EllipsoidModel import EllipsoidModel
         self.shape_list.append(EllipsoidModel)
@@ -267,4 +281,16 @@
         from sans.models.LamellarPSHGModel import LamellarPSHGModel
         self.shape_list.append(LamellarPSHGModel)
+        
+        from sans.models.LamellarPCrystalModel import LamellarPCrystalModel
+        self.shape_list.append(LamellarPCrystalModel)
+        
+        from sans.models.SCCrystalModel import SCCrystalModel
+        self.shape_list.append(SCCrystalModel)
+        
+        from sans.models.FCCrystalModel import FCCrystalModel
+        self.shape_list.append(FCCrystalModel)
+        
+        from sans.models.BCCrystalModel import BCCrystalModel
+        self.shape_list.append(BCCrystalModel)
       
         ## Structure factor 
@@ -290,5 +316,11 @@
         self.shape_indep_list.append(BEPolyelectrolyte )
         self.form_factor_dict[str(wx.NewId())] =  [SphereModel]
-
+        
+        from sans.models.BroadPeakModel import BroadPeakModel
+        self.shape_indep_list.append(BroadPeakModel)
+        
+        from sans.models.CorrLengthModel import CorrLengthModel
+        self.shape_indep_list.append(CorrLengthModel)
+        
         from sans.models.DABModel import DABModel
         self.shape_indep_list.append(DABModel )
@@ -297,10 +329,20 @@
         self.shape_indep_list.append(DebyeModel )
         
+        #FractalModel (a c-model)is now being used instead of FractalAbsModel.
+        from sans.models.FractalModel import FractalModel
+        self.shape_indep_list.append(FractalModel )
+        
+        from sans.models.FractalCoreShellModel import FractalCoreShellModel
+        self.shape_indep_list.append(FractalCoreShellModel )
+        
+        from sans.models.GaussLorentzGelModel import GaussLorentzGelModel
+        self.shape_indep_list.append(GaussLorentzGelModel) 
+                
         from sans.models.GuinierModel import GuinierModel
         self.shape_indep_list.append(GuinierModel )
         
-        from sans.models.FractalModel import FractalModel
-        self.shape_indep_list.append(FractalModel )
-        
+        from sans.models.GuinierPorodModel import GuinierPorodModel
+        self.shape_indep_list.append(GuinierPorodModel )
+
         from sans.models.LorentzModel import LorentzModel
         self.shape_indep_list.append( LorentzModel) 
@@ -314,21 +356,38 @@
         from sans.models.Poly_GaussCoil import Poly_GaussCoil
         self.shape_indep_list.append(Poly_GaussCoil)
-                 
+        
+        from sans.models.PolymerExclVolume import PolymerExclVolume
+        self.shape_indep_list.append(PolymerExclVolume)
+        
         from sans.models.PorodModel import PorodModel
-        self.shape_indep_list.append(PorodModel )
-        
-        #FractalModel (a c-model)will be used.
-        #from sans.models.FractalAbsModel import FractalAbsModel
-        #self.shape_indep_list.append(FractalAbsModel)
+        self.shape_indep_list.append(PorodModel )      
+        
+        from sans.models.RPA10Model import RPA10Model
+        self.shape_indep_list.append(RPA10Model)
+        self.multi_func_list.append(RPA10Model)
         
         from sans.models.TeubnerStreyModel import TeubnerStreyModel
         self.shape_indep_list.append(TeubnerStreyModel )
         
+        from sans.models.TwoLorentzianModel import TwoLorentzianModel
+        self.shape_indep_list.append(TwoLorentzianModel )
+        
+        from sans.models.TwoPowerLawModel import TwoPowerLawModel
+        self.shape_indep_list.append(TwoPowerLawModel )
+        
+        from sans.models.UnifiedPowerRgModel import UnifiedPowerRgModel
+        self.shape_indep_list.append(UnifiedPowerRgModel )
+        self.multi_func_list.append(UnifiedPowerRgModel)
+        
         from sans.models.LineModel import LineModel
         self.shape_indep_list.append(LineModel)
+        
+        from sans.models.ReflectivityModel import ReflectivityModel
+        self.multi_func_list.append(ReflectivityModel)
     
         #Looking for plugins
         self.plugins = findModels()
-       
+        self._get_multifunc_models()
+        self.plugins.append(ReflectivityModel)
         return 0
 
@@ -347,3 +406,15 @@
         self.model_combobox.set_list("Multi-Functions", self.multi_func_list)
         return self.model_combobox
- 
+        
+    def _get_multifunc_models(self):
+        """
+        Get the multifunctional models
+        """
+        for item in self.plugins:
+            try:
+                # check the multiplicity if any
+                if item.multiplicity_info[0] > 1:
+                    self.multi_func_list.append(item)
+            except:
+                # pass to other items
+                pass
Index: theoryview/perspectives/theory/pagestate.py
===================================================================
--- theoryview/perspectives/theory/pagestate.py	(revision 4523b6854d1499ab35e8e024eeddfffd99dfe319)
+++ theoryview/perspectives/theory/pagestate.py	(revision fb59ed90d8d3e021f0f291a9064098aae148158d)
@@ -41,4 +41,6 @@
         # Contains link between  model ,all its parameters, and panel organization
         self.parameters =[]
+        # String parameter list that can not be fitted
+        self.str_parameters = []
         # Contains list of parameters that cannot be fitted and reference to 
         #panel objects 
@@ -124,4 +126,5 @@
         obj.enable2D = copy.deepcopy(self.enable2D)
         obj.parameters = copy.deepcopy(self.parameters)
+        obj.str_parameters = copy.deepcopy(self.str_parameters)
         obj.fixed_param = copy.deepcopy(self.fixed_param)
         obj.fittable_param = copy.deepcopy(self.fittable_param)
@@ -181,4 +184,5 @@
             rep += "maximum value : %s \n"%str(item[6][1])
             rep += "parameter unit: %s\n\n"%str(item[7])
+        rep += "number str_parameters(self.str_parameters): %s\n"%len(self.str_parameters)
         rep +="number orientation parameters"
         rep +="(self.orientation_params): %s\n"%len(self.orientation_params)
Index: theoryview/perspectives/theory/profile_dialog.py
===================================================================
--- theoryview/perspectives/theory/profile_dialog.py	(revision a1b247163dd00d4b19fd556819b00a9ccf638299)
+++ theoryview/perspectives/theory/profile_dialog.py	(revision fb59ed90d8d3e021f0f291a9064098aae148158d)
@@ -2,5 +2,5 @@
 import sys
 
-import copy,numpy
+from copy import deepcopy
 from danse.common.plottools.PlotPanel import PlotPanel
 from danse.common.plottools.plottables import Graph
@@ -17,9 +17,9 @@
 if sys.platform.count("win32")>0:
     _STATICBOX_WIDTH = 380
-    PANEL_SIZE = 420
+    PANEL_SIZE = 475
     FONT_VARIANT = 0
 else:
     _STATICBOX_WIDTH = 410
-    PANEL_SIZE = 450
+    PANEL_SIZE = 505
     FONT_VARIANT = 1
     
@@ -36,7 +36,7 @@
     ## Flag to tell the AUI manager to put this panel in the center pane
     CENTER_PANE = True
-    def __init__(self, parent=None,base=None,data =None, id = -1, *args, **kwds):
+    def __init__(self, parent=None,base=None,data =None,axes =['Radius'], id = -1, *args, **kwds):
         kwds["style"] =  wx.DEFAULT_DIALOG_STYLE
-        kwds["size"] = wx.Size(_STATICBOX_WIDTH*2,PANEL_SIZE) 
+        kwds["size"] = wx.Size(_STATICBOX_WIDTH*1.5,PANEL_SIZE) 
         wx.Dialog.__init__(self, parent, id = id,  *args, **kwds)
         if data != None:
@@ -54,6 +54,6 @@
             self.name = self.data.name
             
-            # Panel for 2D plot
-            self.plotpanel    = SLDplotpanel(self, -1, style=wx.TRANSPARENT_WINDOW)
+            # Panel for plot
+            self.plotpanel    = SLDplotpanel(self, axes, -1, style=wx.TRANSPARENT_WINDOW)
             self.cmap = DEFAULT_CMAP
             ## Create Artist and bind it
@@ -61,5 +61,6 @@
 
             self._setup_layout()
-            self.newplot=Theory1D(self.data.x,self.data.y)
+            data_plot = deepcopy(self.data)
+            self.newplot=Theory1D(data_plot.x,data_plot.y)
             self.newplot.name = 'SLD'
             self.plotpanel.add_image(self.newplot) 
@@ -76,5 +77,5 @@
         sizer = wx.GridBagSizer(14,14)
         
-        sizer.Add(self.plotpanel,(0, 0), (13, 13), wx.EXPAND | wx.LEFT| wx.RIGHT, 15)
+        sizer.Add(self.plotpanel,(0, 0), (13, 13), wx.EXPAND | wx.LEFT| wx.RIGHT, 1)
 
         #-----Button------------1
@@ -110,5 +111,5 @@
     Panel
     """
-    def __init__(self, parent, id = -1, color = None, dpi = None, **kwargs):
+    def __init__(self, parent,axes=[], id = -1, color = None, dpi = None, **kwargs):
         """
         """
@@ -120,6 +121,7 @@
         self.plots = {}
         self.graph = Graph()
-
-
+        self.axes_label = []
+        for idx in range(0,len(axes)):
+            self.axes_label.append(axes[idx])
          
     def add_image(self, plot):
@@ -133,5 +135,6 @@
         self.graph.add(plot)
         #add axes
-        self.graph.xaxis('\\rm{Radius} ', '\\AA')
+        x1_label = self.axes_label[0]
+        self.graph.xaxis('\\rm{%s} '% x1_label, '\\AA')
         self.graph.yaxis('\\rm{SLD} ', '\\AA^{-2}')
 
