Site-site radial distribution functions, sometimes called g(r) for short, are one of the most important measured quantities in molecular simulations. As usual, wikipedia has a nice overview of them. Probably the most famous non-trivial g(r) is the water oxygen-oxygen radial distribution function. It's often taught in statistical mechanics courses that it's possible to compare a simulation g(r) with X-ray or neutron-diffraction experiments with a simple Fourier transform. In fact, this is almost never the case due to sources of error in experiments. Check out the Introduction to this article by AK Soper for more info on the kinds of error which prevent the simple Fourier transform from converting experimental structure factors to a g(r).
In any case, the point of this post is to put the raw data for an experimental g(r) for water. The AK Soper article uses the empirical potential structure refinement method for converting experimental neutron diffraction data at 298 K 1 bar into the three radial distribution functions for water (O-O, O-H, H-H). This is the best method I know of for obtaining these radial distribution functions and this is the data used to test the TIP4P/2005 water model. I've extracted the data from their paper and made it available here. Make sure to cite their paper if you use the data in a publication. Hopefully these g(r)s will help you in creating your own new special water models! See the figure below the break:
Thursday, December 12, 2013
Tuesday, October 1, 2013
Indexing an Emacs Macro
This post is about how to increment and paste a counter while executing an emacs macro. For some reason, this is not easy to find on the Internet. So I'll write it down on my blog since I keep forgetting.
- Set the start point of the counter
M-: (setq i 1) - Start recording macro with
C-x ( - Insert index as needed with
C-u M-: i - Increment index when finished with macro
M-: (setq i (+ i 1)) - Complete macro with
C-x ) - Execute Macro with
C-x e
ALT-(# of times) C-x e.
Thursday, May 16, 2013
Extending Radial Distributions
Radial distribution functions are one of the most important quantities to calculate when running a molecular dynamics simulation. They give good insight into the phase and pair potentials between molecules. Practically, they are calculated according to the following equation:
Tuesday, April 30, 2013
Cube-Sphere Intersection Volume
This week's math problem was particularly difficult. I wanted to know the intersection volume between a cube and a sphere. Imagine a sphere contained in a cube. The sphere will first touch the cube when its radius is equal to half the width of the cube. Until that point, its volume is just the formula for the volume of a sphere. Once the sphere's radius is
2 sqrt(3) times the width of the cube, then it completely engulfs the cube and the intersection of the 2 objects is just the volume of a cube. In between, I've found it looks like this:
Thursday, April 25, 2013
Bacteria in Blender
I made this while drinking my morning coffee. I just stretched a UV Sphere, stuck two layers of hair on it (flagella, cilia) and added a few modifiers to get it bumpy. The texture is just some glass, Voronoi textures, and diffuse shaders. Meh, it's OK.
Wednesday, April 24, 2013
Generating n-Dimensional Lattice Coordinates
It comes up sometimes in my research that I need to generate coordinates along a lattice. For example, when generating an initial structure for a molecular dynamics simulation. I thought I share my code for this. The code works by recursively enumerating each dimension in a lattice and calling a given function each time it reaches a point. So, it could be used to execute any function along a lattice. Here's what it looks like for a 2D and 3D example. In the 3D example I didn't choose a cubic number of points on the lattice, so that it sort of stops in the middle.
Tuesday, April 23, 2013
Category Colors in R
I thought I'd write down the color palette I use for categories. I've seen many discussions about gradient color choices, but category colors are less often discussed. I have a function given below which generates colors where there is not meant to be an ordering to the color. It is important when data points are near, that they are easy to distinguish with the eye. It makes more sense to see it:
Subscribe to:
Posts (Atom)





