Test 3: Morse Oscillator

For this test, we use the class HarmonicOscillator from section 6.2.1 and the class MorseOscillator from section 6.3.1.

me = 9.1093837015e-31
u = 1.66053906660e-27
auofmass = u / me

De = 0.1744
a = 1.02764
xe = 1.40201
m = (1.0078250322/2.0) * auofmass
omega = a * np.sqrt(2*De/m)
h2morse = MorseOscillator(m, a, De, xe)
ngrid = 256
xmin, xmax = 0.1, 14.0
x = np.linspace(xmin, xmax, ngrid)
v = h2morse.get_potential(x)

ho = HarmonicOscillator(m, omega)
wp_morse = QuantumDynamics1D(m)
wp_morse.setup_grid(xmin, xmax, ngrid)
wp_morse.set_potential(v)

# displace Gaussian wavepacket
psi0 = ho.get_eigenfunction(wp_morse.xgrid - xe - 2.0, 0)

n = 100
nstep = 2000
tstep = (2*np.pi/omega) / n
wp_morse.propagate(tstep, nstep, psi0, method="Split Operator")
anim_morse = wp_morse.animate(
    nstep=nstep, delay=10, scalewf=0.25, plot_potential=True,
)