i=1 µi

ˆ

H= . (4.11)

N

The range for the random steps should be chosen such that the acceptance

ratio lies in the range 40 to 70%. Note that variational methods are not

exact, as they depend on the quality of the trial function.

4.3.4 Relaxation methods

We now turn to solutions that make use of relaxation towards the stationary

solution in time. We introduce an arti¬cial time dependence into the wave

86 Quantum chemistry: solving the time-independent Schr¨dinger equation

o

function ψ(x, „ ) and consider the partial di¬erential equation

V ’E

‚ψ

∇2 ψ ’

= ψ. (4.12)

‚„ 2m

It is clear that, if ψ equals an eigenfunction and E equals the corresponding

eigenvalue of the Hamiltonian, the right-hand side of the equation vanishes

and ψ will not change in time. If E di¬ers from the eigenvalue by ”E,

the total magnitude of ψ (e.g., the integral over ψ 2 ) will either increase or

decrease with time:

dI ”E

I, I = ψ 2 dx.

= (4.13)

d„

So, the magnitude of the wave function is not in general conserved. If ψ is not

an eigenfunction, it can be considered as a superposition of eigenfunctions

φn :

ψ(x, „ ) = cn („ )φn (x). (4.14)

n

Each component will now behave in time according to

E ’ En

dcn

= cn , (4.15)

d„

or

E ’ En

cn („ ) = cn (0) exp „. (4.16)

This shows that functional components with high eigenvalues will decay

faster than those with lower eigenvalues; after su¬ciently long time only

the ground state, having the lowest eigenvalue, will survive. Whether the

ground state will decay or grow depends on the value chosen for E and it will

be possible to determine the energy of the ground state by monitoring the

scaling necessary to keep the magnitude of ψ constant. Thus the relaxation

methods will determine the ground state wave function and energy. Excited

states can only be found by explicitly preventing the ground state to mix

into the solution; e.g., if any ground state component is consistently removed

during the evolution, the function will decay to the ¬rst excited state.

Comparing (4.12), setting E = 0, with the time-dependent Schr¨dinger o

equation (4.1), we see that these equations are equivalent if t is replaced

by i„ . So, formally, we can say that the relaxation equation is the TDSE

in imaginary time. This sounds very sophisticated, but there is no deep

physics behind this equivalence and its main function will be to impress

one™s friends!

As an example we™ll generate the ground state for the Morse oscillator

4.3 The few-particle problem 87

(see page 6) of the HF molecule. There exists an analytical solution for the

Morse oscillator:5

( ω0 )2

1 1

En = ω0 (n + ) ’ (n + )2 , (4.17)

2 4D 2

yielding

1 ω0

’

E0 = ω0 , (4.18)

2 16D

3 9 ω0

’

E1 = ω0 . (4.19)

2 16D

For HF (see Table 1.1) the ground state energy is 24.7617 kJ/mol for the

harmonic approximation and 24.4924 kJ/mol for the Morse potential. The

¬rst excited state is 74.2841 kJ/mol (h.o.) and 71.8633 kJ/mol (Morse). In

order to solve (4.12) ¬rst discretize the distance x in a selected range, with

interval ”x. The second derivative is discretized as

ψi’1 ’ 2ψi + ψi+1

‚2ψ

= . (4.20)

‚x2 (”x)2

If we choose

m(”x)2 mH + mF

def

”„ = , m= , (4.21)

mH mF

then we ¬nd that the second derivative leads to a computationally convenient

change in ψi :

ψi („ + ”„ ) = 1 ψi’1 („ ) + 1 ψi+1 („ ). (4.22)

2 2

Using a table of values for the Morse potential at the discrete distances,

multiplied by ”„ / and denoted below by W , the following Python function

will perform one step in „ .

python program 4.3 SRstep(n,x,y,W)

Integrates one step of single-particle Schr¨dinger equation in imaginary time.

o

01 def SRstep(x,y,W):

02 # x=distance array;

03 # y=positive wave function; sum(y)=1 required;

y[0]=y[1]=y[-2]=y[-1]=0.

04 # W=potential*delta tau/hbar

05 # returns wave function and energy*delta tau/hbar

06 z=concatenate(([0.],0.5*(y[2:]+y[:-2]),[0.]))

07 z[1]=z[-2]=0.

5 See the original article of Morse (1929) or more recent texts as Levin (2002); for details and

derivation see Mathews and Walker (1970) or Fl¨ gge (1974).

u

88 Quantum chemistry: solving the time-independent Schr¨dinger equation

o

V (kJ/mol)

x103

1

0.8

wave function first excited state

dissociation energy

0.6

wave function

ground state

0.4

potential energy

0.2

first excited state

ground state level

0.05 0.1 0.15 0.2 0.25 0.3

rHF (nm)

Figure 4.2 The Morse potential for the vibration of hydrogen ¬‚uoride and the

solution for the ground and ¬rst excited state vibrational levels (in the absence of

molecular rotation), obtained by relaxation in imaginary time.