src/BWRRelax/relaxanalyze.cc
// ------------- Dipole-Dipole Relaxation Matrix Elements ---------------
Dipole-Dipole Relaxation Matrix Elements
Dipole - Dipole Relaxation Matrix Elements
void RDDel(const sys_dynamic& sys, gen_op& Ho, spin_T* T1, spin_T* T2,
	                      int a, int aa, int b, int bb,
                               int DFS, int Windex, int Sindex)
   {
   std::string line1[100];				
   std::string line2[100];				
   std::string line3[100];				
   int signs[100];				
   std::string Elabel[3];				
   std::string Rlabel = "R";				
   std::string Mlabel = "DD";			
   std::string Slabel = "";				
   Elem_labels(Elabel, Rlabel, Mlabel, Slabel,	
                                 a, aa, b, bb);
   int Jterms=0, Lterms=0;			
   Rijkl_el(sys, Ho, 2, T1, T2, Mlabel,		
    line1, line2, line3, signs, Jterms, Lterms,	
                  a,aa,b,bb,DFS,Windex,Sindex);
   Rel(std::cout, Jterms+Lterms, line1, line2,	
                         line3, signs, Elabel);
   return;
   }
void RDDel ( const sys_dynamic & sys , gen_op & Ho , spin_T * T1 , spin_T * T2 , int a , int aa , int b , int bb , int DFS , int Windex , int Sindex ) { std :: string line1 [ 100 ] ; std :: string line2 [ 100 ] ; std :: string line3 [ 100 ] ; int signs [ 100 ] ; std :: string Elabel [ 3 ] ; std :: string Rlabel = " " ; std :: string Mlabel = " " ; std :: string Slabel = " " ; Elem_labels ( Elabel , Rlabel , Mlabel , Slabel , a , aa , b , bb ) ; int Jterms = 0 , Lterms = 0 ; Rijkl_el ( sys , Ho , 2 , T1 , T2 , Mlabel , line1 , line2 , line3 , signs , Jterms , Lterms , a , aa , b , bb , DFS , Windex , Sindex ) ; Rel ( std :: cout , Jterms + Lterms , line1 , line2 , line3 , signs , Elabel ) ; return ; }
Dipole-Dipole Relaxation Matrix Elements
Dipole - Dipole Relaxation Matrix Elements
//                                >i     l>k //                DD         --- --- --- ---        DD //         <a,aa|R  |b,bb> = \   \   \   \   <a,aa|R    |b,bb> //                           /   /   /   /          ijkl //                           --- --- --- --- //                            i   j   k   l // Input 		sys   : Dynamic spin system //			Ho    : Static Hamiltonian //			T1    : Spin tensor, mu1 for dipolar  //			T2    : Spin tensor, mu2 //			a, b  : 1st transition indices //			aa, bb: 2nd transition indices //			DFS   : Flag for dynamic frequency shifts //					> 0  J Terms Only				     //					  0  Both J and L Terms (Default) //					< 0  L Terms Only //			Windex: Flag for frequency indexing //                                 >1 = Always use spin indices //                                  0 = Use spin indices if needed //                                 -1 = Never use spin indices (default) //                                 -2 = Assume extreme narrowing //                                 -3 = Assume extreme broadening //			Sindex: Flag for spin indexing //                                  0 = Use only if needed (default) //                                  1 = Always use spin indices //                                 <1 = Never use spin indices // Output		void  : // Note			      : This routine assumes that each of //				the two interactions are rank 2 //				and that they both involve dipolar //				interactions // sosi - then the input here only needt T1 for auto, not T1 and T2 //        and the same goes for all the auto correlated stuff // Array of strings for line 1 // Array of strings for line 2 // Array of strings for line 3 // Array of flags for the signs // strings for element label, one each line // Label for relaxation matrix // Label for relaxation mechanisms // Label for spin involved (none here) // Get a label for the element // Start with no terms (J(w) or L(w))  // Get all the strings for the terms // that contribute to this particular element // Now output the element in string format