src/IntRank2/IntRank2.cc
/* Here we set the 5 spherical spin tensor components applicable to spin-spin
   interactions. These can be akin to hyperfine interactions (elecron-nucleon)
   or dipolar interacions (electron-electron and nucleon-nucleon).  Since this
   class maintains "scaled" spin tensors, all spin-spin interactions share the
   same spin tensors. The five arrays will only differ between interactions if
   the spin quantum values differ.  This class maintains a static linked list
   of such spin tensors to avoid regenerating them during computations 
   involving multi-spin systems.
                                              +
                                           m  |
                                T    = (-1)  T
                                 2,m          2,-m
           1/2
        [1]                              1                            1
  T   = |-| * [3I S - I.S]       T   = - -(I S + I S )         T    = - I S
   2,0  [6]      z z              2,1    2  + z   z +           2,2   2  + +

                                             SPIN PAIR INTERACTIONS
          Input                R2I     : Rank 2 interaction (this)
	  Note			       : Dont Forget To Set Ival & Sval 1st
          Output               none    : Interaction Spin Tensor spherical
                                         spin components are generated       */
Here we set the 5 spherical spin tensor components applicable to spin-spin
interactions. These can be akin to hyperfine interactions (elecron-nucleon)
or dipolar interacions (electron-electron and nucleon-nucleon).  Since this
class maintains "scaled" spin tensors, all spin-spin interactions share the
same spin tensors. The five arrays will only differ between interactions if
the spin quantum values differ.  This class maintains a static linked list
of such spin tensors to avoid regenerating them during computations
involving multi-spin systems.

SPIN PAIR INTERACTIONS
Input                R2I     : Rank 2 interaction (this)
Note                         : Dont Forget To Set Ival & Sval 1st
Output               none    : Interaction Spin Tensor spherical
spin components are generated
Here we set the 5 spherical spin tensor components applicable to spin - spin interactions . These can be akin to hyperfine interactions ( elecron - nucleon ) or dipolar interacions ( electron - electron and nucleon - nucleon ) . Since this class maintains " scaled " spin tensors all spin - spin interactions share the same spin tensors . The five arrays will only differ between interactions if the spin quantum values differ . This class maintains a static linked list of such spin tensors to avoid regenerating them during computations involving multi - spin systems . SPIN PAIR INTERACTIONS Input R2I : Rank 2 interaction ( this ) Note : Dont Forget To Set Ival & Sval 1st Output none : Interaction Spin Tensor spherical spin components are generated
void IntRank2::setSPSP()
  {                                                                            
  IntRank2TList::iterator item, prev;		
  item = SPSPlist.begin();			
  while(item != SPSPlist.end())			
    {                                           
    if((*item).equalto(Ival,Sval))		
      {                                         
      IntRank2T::operator= (*item);
      return;
      }
    else if((*item).lessthan(Ival,Sval)) 	
      {                                         
      prev = item;				
      item++;
      }
    else                                        
      {                                         
      IntRank2T::setSPSP();			
      SPSPlist.insert(item, *this);		
      return;
      }
    }
  IntRank2T::setSPSP();				
  SPSPlist.push_back(*this);			
  return;                                       
  }
void IntRank2 :: setSPSP ( ) { IntRank2TList :: iterator item , prev ; item = SPSPlist . begin ( ) ; while ( item != SPSPlist . end ( ) ) { if ( ( * item ) . equalto ( Ival , Sval ) ) { IntRank2T :: operator = ( * item ) ; return ; } else if ( ( * item ) . lessthan ( Ival , Sval ) ) { prev = item ; item ++ ; } else { IntRank2T :: setSPSP ( ) ; SPSPlist . insert ( item , * this ) ; return ; } } IntRank2T :: setSPSP ( ) ; SPSPlist . push_back ( * this ) ; return ; }
Here we set the 5 spherical spin tensor components applicable to spin-spin
interactions.
Here we set the 5 spherical spin tensor components applicable to spin - spin interactions .
// Item in spin tensor list // Start of Quad tensor list // Loop through list entries // and look for match // If we do find a match // just copy it and return // If we don't find a match // we need to continue looking // until the list ends // Here we must make a new // entry.  So construct two // spin interaction spin tensor // list // We will only reach this if // no list or at list end! So // new interaction & append