# When variational Monte Carlo becomes visual

23 Sep 2013Today I was playing around with the output of the code from Jørgen’s thesis, and figured it would be fun to visualize the random walk in the variational Monte Carlo calculation.

[youtube=www.youtube.com/watch?v=H4AYC-nSgZY]

For the interested, this is a visualization of a variational Monte Carlo calculation for the hydrogen molecule. The algorithm used is the Metropolis-Hastings algorithm. The two blue spheres represent the atomic nuclei, while the green spheres are the current electron configuration being sampled. The distance between the nuclei is about two times the distance for hydrogen in the ground state. The red spheres represent some of the history of the computation. If the complete history was included, the red spheres could have been interpreted as the electron density, but as you may notice, the history included is too short, so that the electron density fluctuates through the video. (Hint: Look at the density between the atoms - it varies between different times in the video.)