src/ESRLib/SpinSpace.cc
// Input		ss    : A spin system
//  			pset  : A parameter set
// Output		pset  : Parameter set with spin system
//			        parameters added to it
Input          ss    : A spin system
pset  : A parameter set
Output         pset  : Parameter set with spin system
parameters added to it
Input ss : A spin system pset : A parameter set Output pset : Parameter set with spin system parameters added to it
void SpinSpace::PSetAdd(ParameterSet& pset, int idx) const
  {
  string pname;
  string pdata;
  string pstate;
  SinglePar par;
  string prefx;                                 
  if(idx != -1)                                 
    prefx = string("[")+Gdec(idx)+string("]");   
   pname = prefx + string("SysName");		
   pstate = string("Name of the Spin System");
   pdata = name();
   par = SinglePar(pname, 2, pdata, pstate);
   pset.push_back(par);
   pname = prefx + string("NSpins");		
   pstate = string("Number of Spins in the System");
   pdata = Gdec(spins());
   par = SinglePar(pname, 1, pdata, pstate);
   pset.push_back(par);
   int ns = spins();
   pstate = string("Spin Isotope Type");	
   for(int i=0; i < ns; i++)
     {
     pname = prefx + string("Iso(");
     pname += Gdec(i);
     pname += string(")");
     pdata = symbol(i);
     par = SinglePar(pname, 2, pdata, pstate);
     pset.push_back(par);
     }
   return;
   }
void SpinSpace :: PSetAdd ( ParameterSet & pset , int idx ) const { string pname ; string pdata ; string pstate ; SinglePar par ; string prefx ; if ( idx != -1 ) prefx = string ( " " ) + Gdec ( idx ) + string ( " " ) ; pname = prefx + string ( " " ) ; pstate = string ( " " ) ; pdata = name ( ) ; par = SinglePar ( pname , 2 , pdata , pstate ) ; pset . push_back ( par ) ; pname = prefx + string ( " " ) ; pstate = string ( " " ) ; pdata = Gdec ( spins ( ) ) ; par = SinglePar ( pname , 1 , pdata , pstate ) ; pset . push_back ( par ) ; int ns = spins ( ) ; pstate = string ( " " ) ; for ( int i = 0 ; i < ns ; i ++ ) { pname = prefx + string ( " " ) ; pname += Gdec ( i ) ; pname += string ( " " ) ; pdata = symbol ( i ) ; par = SinglePar ( pname , 2 , pdata , pstate ) ; pset . push_back ( par ) ; } return ; }
Input          ss    : A spin system
pset  : A parameter set
Output         pset  : Parameter set with spin system
parameters added to it
Input ss : A spin system pset : A parameter set Output pset : Parameter set with spin system parameters added to it
// Input		ss	: A spin system //                      pset	: Parameter set //                      idx     : Parameter index value used for //                                prefix [#] in output names // Output               void    : Spin system parameters are //                                are added to the parameter set //                                with interaction prefix idx // Note                         : The parameter names & types //                                output here MUST match those used //                                in setting spin systems //                                from parameters sets // Parameter prefix // Only use suffix if idx // is NOT -1 // Add Spin System Name // Add Number of Spins // Add Isotope Labels