/* * Function: Normalize * * The program compute the normalization of the GTO. * * Parameter: * * const GTO *g contain the angular momentum(l, m, n). * const GTO_PARTIAL *gp contain the exponent and the contract * coefficient */ inline double Normalize(const GTO *g, const GTO_PARTIAL *gp) { double alpha = gp->alpha; int l = g->l; int m = g->m; int n = g->n; return gp->coeff * pow(2*alpha/M_PI, 0.75) * sqrt(pow(4*alpha, l + m + n)/ (factorial_2(2*l-1) * factorial_2(2*m-1) * factorial_2(2*n-1))); }
double I_xyz(int l1, double pax, int l2, double pbx, double gamma, int flags) { // 《量子化学》中册 P63 (10.6.8) (10.6.9) (10.6.10) int i; double sum = 0; // BUG 2i for (i = 0; i < floor((l1 + l2) * 0.5) + 1; i++) { sum += factorial_2(2*i - 1) / gsl_pow_int(2 * gamma, i) * \ fi_l_ll_pax_pbx(2*i, l1, l2, pax, pbx, flags); } return sum; }