Finally, modifying X in ``setup.m'' to [0 0 0; x 0 0] for x=0.50,
1.00, 1.25, 1.50, 1.75, 2.00, 4.00, and 6.00 bohr, and running
``setup.m'', ``ewald.m'' and ``Hatoms.m'' (be sure to use gbl_f=2!)
each time, compute the total energy of the
molecule at the above
separations.
Debugging: At a separation of 1.5 bohr (X=[0 0 0; 1.5 0 0] in ``setup.m'' and gbl_f=2 in ``setup.m''), you should find a total energy of -1.136 hartree, corresponding to an Ewald energy of 0.3135897639081198 H and an electronic energy of -1.4495422745929 H. (Again your electronic energy may vary slightly due to different levels of convergence.)
From this data, you should be able to extract the LDA predictions for
the bond length, energy and effective spring constant for H
. See
the files ``/home/Faculty/muchomas/Minicourse/H2*'' for a plot and summary of
an analysis of the results with a comparison to data from the CRC
handbook!