Hi Lyall,
The 30X faster part is actually a common misunderstanding. A GPU is 30X faster at VECTOR calculations than a standard CPU.

All calculations are NOT vector calculations. A vector is a direction and velocity(or speed for the non-technical out there)
How most simulations are done:
It is my understanding that most molecular simulations are done using a 4D cartesian map with the 3 standard (l,w,h) dimensions and time as the 4th. 8) This can be called a 4D matrix or a 4D array. I prefer the term array and will use it in this discussion. 8)
Basicly this produces a cube with the molecule in the middle being moved thru time. The next position of each atom is based on its current and previous positions within the cube space. 8)
The big problem with this is its "granularity". The cube contains only so many points within its 3D space. Atoms can only move from point to point, they can't move part of a point. 8O The more points the more acurate but slower and more memory hungry. In a way you can think of this as doing the simulation with integer arithmetic only. Cubes with few points are very fast but lead to bigger and bigger errors the longer in simulated time this runs. Cubes with many points require large amounts of memory and are very slow in real time. 8O It can be troublesome to decide exactly how accurate it needs to be since accuracy takes longer, possibly a LOT longer :?
Vector arrays: 8)
Vectors aren't that easy to do with digital computers.
🙁 That has traditionally been the relm of analog computing and mostly limited to navigation for the last 30 years or so, when used at all.
😱 However, we do live in an analog world and one of the most worked on areas of digital representations of an analog world is in computer graphics, and especally moving graphics(the 3d shooter is king whether we like it or not). A graphics GPU is a processor specially designed to simulate an analog world. It isn't very good at regular computing stuff but is great at what it does do.

It turns out the best way to do moving graphics is to represent everything as colored moving triangles.

We, in this discussion, are mostly just interested in the moving part which is represented as a direction and a velocity, this is called a vector. 8)
How vectors are different: :?
The array no longer represents a cube of space moving thru time with an atom located here and there within the 3D array.
😀 Now our array consists of our time steps with each time containing an element for each atoms vector. In the cartesian map above there were always a lot of empty elements and each atom had to land squairly in an array element.
🙁 With vectors we don't keep spatial relationships for each atom, just directions and velocities. This saves a lot of memory but is very slow and difficult to keep track of for a standard CPU, however this is what a graphics GPU is designed to do all by its self. Each time step is a "frame".
OK, so what does it all mean? :roll:
Even though the GPU is 30X faster than the CPU (and that depends on which CPU you are talking about), this 30X just applies to Vector simulations, i.e. a Vector simulation is 30X faster on a GPU than on a CPU (which CPU?). But we don't do Vector simulations with CPUs because they are too slow, we do faster but less accurate spatial simulations which the GPU can't do. 8O