Earlier this semester I had a project where I had to calculate the solvent-accessible surface area of a protein given its 3-dimensional structure (in a PDB file). The suggested method of implementation was to simulate the surface of each atom by distributing 500 points (roughly) evenly across the surface defined by its van der Waals radius. Although that sounds straightforward, it actually took me a while to figure out how to randomly sample points from a sphere defined by a point and a radius.
I did some extensive searching on Google, but most of the methods I found came with the caveat that there would be a greater concentration of points near the poles than at the equator. I finally came across this page, which offered a clear and concise method for sampling points from a sphere.
- Set up a 2-dimensional coordinate system: the z dimension (running from -R to R, where R is the van der Waals radius) and (longitude, running from 0 to radians)
- Generate random coordinates: and
- Use the following relation () to calculate latitude ():
- Finally, convert to Cartesian (xyz) coordinates
Repeat this process 500 times for each atom to simulate its surface!