bas_comp_functions.cc

Go to the documentation of this file.
00001 
00005 #include <cmath>
00006 #include <stdio.h>
00007 #include <stdlib.h>
00008 #include <libipv1/ip_lib.h>
00009 #include <libciomr/libciomr.h>
00010 #include <libqt/qt.h>
00011 
00012 #include"defines.h"
00013 #define EXTERN
00014 #include"global.h"
00015 #include <stdexcept>
00016 
00017 
00018 namespace psi { namespace CINTS {
00019 
00020   double calc_exp_basis(int shell_num, double rr){
00021     
00022     int i;
00023     int shell_type;
00024     int shell_start;
00025     int shell_end;
00026     double expon,coeff;
00027     double bastmp;
00028     
00029     shell_type = BasisSet.shells[shell_num].am;
00030     shell_start = BasisSet.shells[shell_num].fprim-1;
00031     shell_end = shell_start+BasisSet.shells[shell_num].n_prims;
00032     
00033     bastmp = 0.0;
00034     for(i=shell_start;i<shell_end;i++){
00035       expon = -BasisSet.cgtos[i].exp;
00036       coeff = BasisSet.cgtos[i].ccoeff[shell_type-1];
00037       bastmp += coeff*exp(expon*rr);
00038     }
00039     
00040     return bastmp;
00041   }
00042 
00043   double calc_radial_bas(int shell_num, double rr, double r){
00044     
00045     int i;
00046     int shell_type;
00047     int end;
00048     double bastmp;
00049     
00050     shell_type = BasisSet.shells[BasisSet.am2shell[shell_num]].am-1;
00051     bastmp = calc_exp_basis(shell_num,rr);
00052     for(i=0;i<shell_type;i++)
00053       bastmp *= r;
00054     
00055     return bastmp;
00056   }
00057   
00058 };
00059 
00060 };

Generated on Wed Feb 13 16:35:39 2008 for PSI by  doxygen 1.5.4