SUBROUTINE Equilth (k,rho,we,wexe,usys,zet,seq, th3,delt,g2,g3) ! ! This routine calculates the delves' theta where the oscillators ! are centered; that is, where z=a tan(theta)-b cot(theta) +c is ! zero. It puts this at the maximum of the wavefunction for ! a Morse oscillator determined from the asymptotic diatomic ! except that (1) things may be shifted by the empirical ! scaling factors ! used, and (2) it is modified by terms which assure that the proper ! boundary conditions are satisfied at theta = 0 and pi/2. ! In May 1991, the additional factor was (sin 2 theta)**zet. ! In May 1992, the additional factor was (cos theta)**zet. ! atomic units. ! R. T Pack. ! USE Numeric_Kinds_Module USE FileUnits_Module USE Numbers_Module IMPLICIT NONE INTEGER k, i, ithcall, isav, j REAL(Kind=WP_Kind) rho, we, wexe, usys, zet, seq, cosm REAL(Kind=WP_Kind) sin, cos, asin, th3, fudge REAL(Kind=WP_Kind) betm, d, d2, exp REAL(Kind=WP_Kind) f1, f2, f3, test, si, co, co2, co3, delt, thetam REAL(Kind=WP_Kind) ex, ga2, ga3, g2, g3, tan, gamm, exu REAL(Kind=WP_Kind) th1(3), th2(3) DATA th1, th2 /6*zero/ DATA ithcall /0/ DATA test /1.d-9/ ! WRITE(Out_Unit,*)'begining of routine equilth' ! begin executable statements IF(ithcall==0)THEN ithcall=1 ENDIF ! ! determine parameters of asymptotic Morse wavefunction betm = sqrt(two*usys*wexe) d = we/(two*wexe) ! ! parameters of Morse wavefunction in theta, at finite rho. ! thetam is theta of minimum of Morse potential. thetam=halfpi cosm=zero IF(rho>seq)THEN thetam=asin(seq/rho) cosm=cos(thetam) fudge = delt +(one-delt)*cosm gamm=betm*rho*fudge d2=d/fudge ELSE exu=exp(-betm*(rho-seq)) fudge=exu*(exu-one)*seq/betm + (rho*delt)**2 fudge=sqrt(fudge) gamm=betm*fudge d2=d*rho/fudge ENDIF ! initial estimates IF(th1(k)==zero)THEN th1(k)=0.9*halfpi IF(thetamhalfpi) th3=halfpi-(1.d-7)*i IF(th3