src/BWRRelax/relaxJ.cc
// ______________________________________________________________________
// Anisotropic Rotor Spectral Density Functions - Dynamic Frequency Shift 
// ______________________________________________________________________
//
Anisotropic Rotor Spectral Density Functions - Dynamic Frequency Shift
Anisotropic Rotor Spectral Density Functions - Dynamic Frequency Shift
double Q_reduced(double *tau, double *c1, double *c2, double omega, int hertz)
  {
  double J, Jtmp;
  if(hertz) omega *= (6.283185307);	
  J = 0;
  for(int i=0; i<5; i++)
    {
    Jtmp = tau[i]/(1+tau[i]*tau[i]*omega*omega);
    J += omega*tau[i]*c1[i]*c2[i]*Jtmp;
    }
  return J/5.0;
  }
double Q_reduced ( double * tau , double * c1 , double * c2 , double omega , int hertz ) { double J , Jtmp ; if ( hertz ) omega *= ( 6.283185307 ) ; J = 0 ; for ( int i = 0 ; i < 5 ; i ++ ) { Jtmp = tau [ i ] / ( 1 + tau [ i ] * tau [ i ] * omega * omega ) ; J += omega * tau [ i ] * c1 [ i ] * c2 [ i ] * Jtmp ; } return J / 5.0 ; }
______________________________________________________________________
Anisotropic Rotor Spectral Density Functions - Dynamic Frequency Shift
______________________________________________________________________
______________________________________________________________________ Anisotropic Rotor Spectral Density Functions - Dynamic Frequency Shift ______________________________________________________________________
// Input		tau  : five correlation times (sec) // 			c1   : five coefficients of interaction 1 // 			c2   : five coefficients of interaction 2 //	 		omega: frequency, (Hz or rad/sec) //			rad  : flag for Hz or rad/sec // Output		J(w) : spectral density value at omega // 			       for isotropic rigid diffusion // Note		             : output units match tau	 // Switch to radians per second if needed