A Simple RHF Calculation on Hydrogen using New
HFSolver
As of version 1.6, the syntax has been greatly simplified
using the HFSolver module:
>>> from PyQuante import Molecule, SCF>>>
h2 = Molecule('h2',[(1,(0,0,0)),(1,(1.4,0,0))])>>>
solver = SCF(h2,method="HF")>>>
solver.iterate()>>> print "HF Result =
",solver.energy
With the new
solvers, you can run with an alternate basis set (say,
STO-3G), via
>>> solver =
SCF(h2,method="HF",basis="sto-3g")>>>
solver.iterate()>>> print "HF Result =
",solver.energy
At this geometry (R=1.4 bohr) this should produce an energy
of -1.1313 hartrees. Note that you may also import Molecule
and HFSolver directly from the PyQuante namespace now.