Subject: PyQuante v1.03: Python Code for Quantum Chemistry (GPL)

From: Rick Muller <[email-masked]>
Date: Tue, 17 Sep 2002 15:35:59 -0700

PyQuante is a suite of programs for writing quantum chemistry
software. The program is written in the Python programming language,
but has many "rate-determining" modules also written in C for
speed. The resulting code is not nearly as fast as Jaguar, Gaussian,
or GAMESS, but the resulting code is much easier to understand and
modify.

The goal of this software is not necessarily to provide a working
quantum chemistry program (although it will hopefully do that), but
rather to provide a well-engineered set of tools so that scientists
can construct their own quantum chemistry programs without going
through the tedium of having to write everything.

The program is released under the GNU General Public License and is
thus freeware. PyQuante can be downloaded from
http://pyquante.sourceforge.net. People can subscribe to the
pyquante-users mailing list at
http://lists.sourceforge.net/lists/listinfo/pyquante-users

Here is an example of what the closed-shell Hartree-Fock scripts look
like:

(best viewed in a fixed-width font...)

def rhf(atomlist):
     "General wrapper for restricted closed-shell hartree fock"
     from basis_631ss import basis
     bfs = getbasis(atomlist,basis)
     S,h = get1ints(bfs,atomlist)
     Ints = get2ints(bfs)
     energy = scf(atomlist,S,h,Ints)
     return energy

def scf(atomlist,S,h,Ints,charge=0,ConvCriteria=0.0001,MaxIter=20):
     "Run the self-consistent field optimization of the  wave function"
     evecs = get_guess(h,S)
     nel = get_nel_from_atomlist(atomlist,charge)
     nclosed,nopen = divmod(nel,2)
     enuke = get_enuke_from_atomlist(atomlist)
     print "nocc, enuke: ",nocc,enuke
     eold = 0.
     for i in range(MaxIter):
         D = mkdens(evecs,0,nocc)
         G = get2JmK(Ints,D)
         F = h+G
         evals,evecs = GHeigenvectors(F,S)
         energy = get_energy(h,F,D,enuke)
         print energy
         if abs(energy-eold) < ConvCriteria: break
         eold = energy
     return energy

This is a preliminary release. Simple HF and LDA calculations work, but 
not much else. Still, it should be useful for people who want to learn 
more about how quantum chemistry calculations work.

Rick