c======================================================================= c This subroutine computes dipole matrix elements for 1-D c quantum systems. It is currently set up for the system c c H0 = p**2/(2*m) - V0*x, x < L (infinite wall at L) c c This routine is used in the 'accel' program (accel.f) c======================================================================= subroutine dipole(minst,maxst,E,x) implicit none integer ist, jst c----------------------------------------------------------------------- c minst: minimum state in basis c maxst: maximum " c E: vector containing energy eigenvalues c x: array containing dipole matrix elements c----------------------------------------------------------------------- integer minst, maxst real*8 E(minst: maxst) real*8 x(minst:maxst,minst:maxst) c----------------------------------------------------------------------- c Common block for communication with accel.f, getE.f, fcn.f c----------------------------------------------------------------------- include 'fcn.inc' c----------------------------------------------------------------------- c Compute dipole matrix elements c----------------------------------------------------------------------- do ist = minst, maxst do jst = minst, maxst if (ist .eq. jst) then x(jst,ist) = -2.0d0*E(ist)/(3.0d0*V0) else x(jst,ist) = -V0/(m*(E(jst)-E(ist))**2) end if end do end do return end