Monday, January 16, 2012

Discontinuity in radial distribution function

This is oxygen-oxygen radial distribution function (rdf) of SPC/E water (do not use it for comparing your simulations). See the discontinuity at 8A. The discontinuity is at the potential cut-off (I am using Ewald for electrostatics with the same cut-off as Lennard Jones). There is certainly a mistake in the code. This problem was particularly interesting because for the first time I was seeing a discontinuity in the rdf. For the NPT Monte Carlo simulation, the density and energy of water matched the literature values, but the rdf always showed this discontinuity. (Ignore the discontinuity at ~12.5A, it is the 1/2 box length)
The mistake: The width of the Gaussian distribution of charge around each point-charge was set to a large value by me, because of which the complementary error function was ~10^-3 at the cut-off. By reducing the width of the Gaussian distribution, I was able to get the right rdf. Remember that if you reduce the width of the Gaussian distribution, then you will need more vectors in the Fourier series that approximates the Gaussian.
Hello everyone,

Welcome to the Molecular Simulations' blog. My aim with this blog is to post peculiar simulation problems I faced, and the solutions I found for them. The hope is that a) it will help someone stuck with a problem b) it will be a resource for me for the future in case I make the same mistake. There are many-many lists on simulations on the web. I am not interested in starting another one. The problems posted here would be the problems I have encountered - and which I found quite perplexing.