src/BWRRelax/relaxQCSA.cc
// ______________________________________________________________________
// *********** Quadrupole & CSA Cross Relaxation Superoperators *********
// ______________________________________________________________________
Quadrupole & CSA Cross Relaxation Superoperators
Quadrupole & CSA Cross Relaxation Superoperators
super_op RQCX(const sys_dynamic& sys, gen_op& Ho, int level)
   {
   int hs = sys.HS();				
   int ls = hs*hs;				
   Ho.set_EBR();				
   matrix mx(ls, ls, 0.0);			
   super_op LOp(mx, Ho.get_basis());		
   double taus[5];				
   taust(taus, sys.taus());			
   double chi = chit(sys.taus());		
   double *w;				
   w = new double[hs];
   gen_op Holab; 				
   if(abs(level) > 1)				
     {						
     Holab = Hcs_lab(sys);
     Holab += HJ(sys);				
     Holab.Op_base(Ho, 1.e-7);			
     if(!Holab.test_EBR())			
       std::cout << "\n\tWarning relax_QCSA: "
            << " Unable to Obtain Proper Ho(lab) Eigenbasis";
     Holab.eigvals(w);
     }
   RQCX(LOp, sys, Ho, w, taus, chi, level);	
   delete [] w;
   return LOp;
   }
super_op RQCX ( const sys_dynamic & sys , gen_op & Ho , int level ) { int hs = sys . HS ( ) ; int ls = hs * hs ; Ho . set_EBR ( ) ; matrix mx ( ls , ls , 0.0 ) ; super_op LOp ( mx , Ho . get_basis ( ) ) ; double taus [ 5 ] ; taust ( taus , sys . taus ( ) ) ; double chi = chit ( sys . taus ( ) ) ; double * w ; w = new double [ hs ] ; gen_op Holab ; if ( abs ( level ) > 1 ) { Holab = Hcs_lab ( sys ) ; Holab += HJ ( sys ) ; Holab . Op_base ( Ho , 1.e-7 ) ; if ( ! Holab . test_EBR ( ) ) std :: cout << " \n \t " << " " ; Holab . eigvals ( w ) ; } RQCX ( LOp , sys , Ho , w , taus , chi , level ) ; delete [ ] w ; return LOp ; }
______________________________________________________________________
 Quadrupole & CSA Cross Relaxation Superoperators
______________________________________________________________________
______________________________________________________________________ Quadrupole & CSA Cross Relaxation Superoperators ______________________________________________________________________
// Input		sys   : Dynamic spin system //			Ho    : Static Hamiltonian //			level : Relaxation treatment level // Output		LOp   : Quadrupole & CSA cross relaxation //			        superoperator // Note			      :	Computed in the eigenbasis of Ho // Total system Hilbert space // Total system Liouville space // Insure Ho is in its eigenbasis (Hz) // Construct zero superoperator // Put into Ho eigenbasis //		    Prepare the Spectral Density Components // Get 5 taus for spectral densities // Set 5 taus // Get the system chi value // Set up for system energy levels (LAB) // these will be in Hertz, ~10**8 in value // Needed for higher level computations // involving spectral density functions //	This is H in the lab frame //	It must be in Ho eigenbasis //	and should recognize its EBR //	      Get the Quadrupolar & CSA Cross Relaxation Superoperator // Set LOp to Quad & CSA R superop