Commit fbf94772 by Francois Gygi

### Removed unused code from HSE and RSH functionals

parent 75919ee2
 ... ... @@ -983,77 +983,3 @@ void HSEFunctional::setxc(void) } } } #if 0 // evaluate fourier transform of nonlocal potential for given // input g2 = G^2 // fourier transform of erfc ( w r ) / r // 1/g2 * [ 1 - exp( -g2 / 4 w^2 ) ] double HSEFunctional::interaction_potential(const double& g2) { // helper variable const double r1_4w2 = 0.25 / ( omega * omega ); const double x = g2 * r1_4w2; if ( g2 == 0 ) { // trivial limit for g2 = 0 return r1_4w2; } else if ( g2 < 1e-6 ) { // taylor expansion near origin return ( 1.0 + x * ( -0.5 + x / 6.0 ) ) * r1_4w2; } else { // exact fourier transform return ( 1.0 - exp(-x) ) / g2; } } // derivative of interaction potential // input g2 = G^2 // exp( -g2 / 4 w^2 ) V(g2) // ------------------ - ----- // 4 g2 w^2 g2 double HSEFunctional::derivative_interaction_potential(const double& g2) { // helper variable const double r1_4w2 = 0.25 / ( omega * omega ); const double x = g2 * r1_4w2; const double third = 1.0 / 3.0; if ( g2 == 0 ) { // trivial limit for g2 = 0 return -0.5 * r1_4w2 * r1_4w2; } else if ( g2 < 1e-6 ) { // taylor expansion near origin return ( -0.5 + x * ( third - 0.125 * x ) ) * r1_4w2 * r1_4w2; } else { // exact derivative return ( exp(-x) * r1_4w2 - interaction_potential(g2) ) / g2; } } // scaling of the divergence correction relative to the Coulomb potential // // integral( exp(-rcut^2 G^2) * V(G^2) ) x // ------------------------------------- = 1 - ------------- // integral( exp(-rcut^2 G^2) / G^2 ) sqrt(x^2 + 1) // // with x = 2 * rcut * omega double HSEFunctional::divergence_scaling(const double& rcut) { const double x = 2.0 * rcut * omega; return 1 - x / sqrt(x * x + 1); } #endif
 ... ... @@ -992,78 +992,3 @@ void RSHFunctional::setxc(void) } } } #if 0 // evaluate Fourier transform of nonlocal potential for given // input g2 = G^2 // Fourier transform of erfc ( w r ) / r // 1/g2 * [ 1 - exp( -g2 / 4 w^2 ) ] double RSHFunctional::interaction_potential(const double& g2) { // helper variable const double r1_4w2 = 0.25 / ( omega * omega ); const double x = g2 * r1_4w2; if ( g2 == 0 ) { // trivial limit for g2 = 0 return r1_4w2; } else if ( g2 < 1e-6 ) { // taylor expansion near origin return ( 1.0 + x * ( -0.5 + x / 6.0 ) ) * r1_4w2; } else { // exact fourier transform return ( 1.0 - exp(-x) ) / g2; } } // derivative of interaction potential // input g2 = G^2 // exp( -g2 / 4 w^2 ) V(g2) // ------------------ - ----- // 4 g2 w^2 g2 double RSHFunctional::derivative_interaction_potential(const double& g2) { // helper variable const double r1_4w2 = 0.25 / ( omega * omega ); const double x = g2 * r1_4w2; const double third = 1.0 / 3.0; if ( g2 == 0 ) { // trivial limit for g2 = 0 return -0.5 * r1_4w2 * r1_4w2; } else if ( g2 < 1e-6 ) { // taylor expansion near origin return ( -0.5 + x * ( third - 0.125 * x ) ) * r1_4w2 * r1_4w2; } else { // exact derivative return ( exp(-x) * r1_4w2 - interaction_potential(g2) ) / g2; } } // scaling of the divergence correction relative to the Coulomb potential // // integral( exp(-rcut^2 G^2) * V(G^2) ) x // ------------------------------------- = 1 - ------------- // integral( exp(-rcut^2 G^2) / G^2 ) sqrt(x^2 + 1) // // with x = 2 * rcut * omega double RSHFunctional::divergence_scaling(const double& rcut) { const double x = 2.0 * rcut * omega; return 1 - x / sqrt(x * x + 1); } #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!