# [molpro-user] Using numerical grid and weights in an external program

Jayashree yfpjaya at gmail.com
Wed Jun 11 12:17:07 BST 2014

```Hi all,

I generated and saved a 3D grid in a molpro output file. The x,y,z
coordinates and weights (w_k) are printed for each atom.For evaluating the
atomic contribution to any molecular integral (say one-electron for now), I
use the formula:

I_k = sum(x,y,z) F(x,y,z) w_k(x,y,z) where k runs over all atomic indices.

If I then sum the atomic contributions, I should get the total number of
electrons. My question is:
Is there a missing factor involved in this formula?
I tried a simple test of evaluating the atomic contribution to the electron
ground state density where F stands for
F(x,y,z) = sum(AO1,AO2) AO1(x,y,z)* AO2(x,y,z) Denmat(AO1,AO2)
, and did not obtain the correct number of electrons.

Using the following molpro input for example, in a propane calculation
gives me
Density functional                    25.99999792     STEST=25.99999792.

Input file:
***,propane print grid
memory,128,m
symmetry,nosym
angstrom
gthresh,grid=1.0e-8
geometry={
11

C        ,         1.82738088 ,  0.82142856 ,  0.00000000 ,
H        ,         2.18403531 , -0.18738144 ,  0.00000000 ,
H        ,         2.18405372 ,  1.32582675 , -0.87365150 ,
H        ,         0.75738088 ,  0.82144174 ,  0.00000000 ,
C        ,         2.34072310 ,  1.54738483 ,  1.25740497 ,
H        ,         3.41072308 ,  1.54720226 ,  1.25750243 ,
H        ,         1.98389084 ,  1.04309903 ,  2.13105625 ,
C        ,         1.82763676 ,  2.99939805 ,  1.25726452 ,
H        ,         2.18547770 ,  3.50398400 ,  0.38419930 ,
H        ,         0.75763749 ,  2.99993878 ,  1.25613883 ,
H        ,         2.18363852 ,  3.50325677 ,  2.13150084
}
cartesian
basis=6-31g
{grid,1800.2,new;
angular,legendre;
gridprint,grid=2}
dfunc,stest
ks-scf

I can see that molpro correctly obtains the total number of electrons.
Thanks for any help and suggestions,
Jayashree
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.molpro.net/pipermail/molpro-user/attachments/20140611/753cf7fd/attachment.html>
```