src/Gradients/sys_gradz.cc
/* These are protected functions because they allow specific aspects of the
   spin system to be set up without worrying about system consistency!       */
These are protected functions because they allow specific aspects of the
spin system to be set up without worrying about system consistency!
These are protected functions because they allow specific aspects of the spin system to be set up without worrying about system consistency!
int sys_gradz::setSsys(const ParameterSet& pset, int idx, int warn)
  {
  ParameterSet  subpset;                        
  if(idx != -1) subpset=pset.strip(idx);        
  else          subpset=pset;                   
  int TF=1;                                     
  int ns = getSpins(subpset, warn?1:0);         
  if(ns<=0)
    {
    if(warn) SysGZerr(13,1);
    else     SysGZerr(13);
    return 0;
    }
  *this = sys_gradz(ns);			
  setIs(subpset);                               
  setName(subpset);                             
  setBasis(matrix(HS(), HS(), i_matrix_type));  
  setOm(subpset);                               
  setShifts(subpset);                           
  setJs(subpset);                               
  if(electrons())                               
    {                                           
    setGs(subpset);                             
    setAs(subpset);                             
    }
  setSubSys(pset);				
  setBoGrad(pset);				
  setLength(pset);				
  return TF;
  }
int sys_gradz :: setSsys ( const ParameterSet & pset , int idx , int warn ) { ParameterSet subpset ; if ( idx != -1 ) subpset = pset . strip ( idx ) ; else subpset = pset ; int TF = 1 ; int ns = getSpins ( subpset , warn ? 1 : 0 ) ; if ( ns <= 0 ) { if ( warn ) SysGZerr ( 13 , 1 ) ; else SysGZerr ( 13 ) ; return 0 ; } * this = sys_gradz ( ns ) ; setIs ( subpset ) ; setName ( subpset ) ; setBasis ( matrix ( HS ( ) , HS ( ) , i_matrix_type ) ) ; setOm ( subpset ) ; setShifts ( subpset ) ; setJs ( subpset ) ; if ( electrons ( ) ) { setGs ( subpset ) ; setAs ( subpset ) ; } setSubSys ( pset ) ; setBoGrad ( pset ) ; setLength ( pset ) ; return TF ; }
These are protected functions because they allow specific aspects of the
spin system to be set up without worrying about system consistency!
These are protected functions because they allow specific aspects of the spin system to be set up without worrying about system consistency!
// Input		sysg	: System in z-gradient (this) //                      pset     : A parameter set //                      idx      : Parameter index value used for //                                 prefix [#] in input names //                      warn     : Warning output level //                                      0 = no warnings //                                      1 = warnings //                                     >1 = fatal warnings // Output               TF       : Spin system is filled with //                                 parameters in pset // Note                          : Three things are gleaned from //                                 the parameter set from spin_sys //                                 1.) The number of spins //                                 2.) An isotope type for each spin //                                 3.) An optional spin system name //                                 Three more parameters are taken //      Use Only Parameters With Prefix [#], So Clip [#] From Names First // Working parameter set // Get only params with [#] // Or use full pset //                Now Set Up The Spin System Directly // Track if we read OK // Get the number of spins // Set the system for ns spins // Set the isotope types // Read in the system name // Set up default basis (matrix) // Set spectrometer frequency // Set the chemical shifts // Read in scalar couplings // Read G's & J's if electrons // present in the spin system //      Set g-factors //      Set hyperfine couplings // Set the # of sub-systems // Set the field gradient // Set the effective length 