c---------------------------------------------------------------------- subroutine hooke(nm,omega,cud,cd,dd,h,z,o,en,fv1,fv2,h0,h1, c basically Kieron's program to diagonalize the Hamiltonian for Hooke's c atom. Only modified so that it can be called as subroutine & over,gaml) c It solves Hooke's atom for any spring constant k. c by expanding the interparticle wavefunction in powers of u. c c author: Kieron Burke, modified to a subroutine, Heiko Appel, 11.23.99 c in: nm - max matrix size for inversion c nm2 - bigger vector size for storing gamma functions c h - hamiltonian matrix c en - list of eignevalues c z - list of eigenvectors c fv1,fv2 - dummy vectors c o - overlap matrix c gaml - list of log(gamma) functions c h0,h1,over - long vectors containing useful quantities for c constructing Hamiltonian c out: c - coefficients in wavefunction expansion in powers of x c cu - coefficients in expansion in powers of u c d - coefficients in square of wavefunction c calls: RSG implicit real*8(a-h,o-z) real*8 h(0:nm,0:nm),en(0:nm),z(0:nm,0:nm),fv1(0:nm),fv2(0:nm) real*8 o(0:nm,0:nm),gaml(0:2*nm+2),cud(0:2*nm),cd(0:nm) real*8 h0((nm+1)*(nm+2)/2),h1((nm+1)*(nm+2)/2) real*8 over((nm+1)*(nm+2)/2),dd(0:2*nm) c integer nm2=(nm+1)*(nm+2)/2