I’ve a series of trajectories generated from a series of relaxed ab initio optimisations performed along a simple torsion trajectory for some single small molecules. The energies from the ab initio calculations give nice, smooth energy profiles, and changes in bonding between the steps are very small. If I run these trajectories through “mdrun -rerun”, I get a reasonably good match between the potential from Gromacs and the ab intito profile (which is nice) but the Gromacs potentials are a lot noisier (say +/- 2-4 kJ mol-1).
I was thinking that mdrun -rerun simply reads in each trajectory frame and calculates the potential from the forcefield parameters in the tpr file. I.e., there are no random seeds, temperature coupling, etc. to add any velocities: it simply reads the coordinates and calculates the various bonded and non-bonded energies. Seeing as the change in geometry between each of my steps is small, I wasn’t expecting the noise from the rerun!
Or is it more complicated than that? The mdp file I’m using contains (literally) “integrator = md”.
That is what mdrun -rerun does. The quality of the output depends on how well the force field reproduces the ab initio energies or whatever target data have been used to produce the model. If there are weird results, the force field parameters are the most likely culprit. Fitting to complex potential energy surfaces can be very hard and often force field representations are crude approximations.
I realise that forcefields aren’t perfect so the match will never be perfect. I’m getting the overall shape of the ab initio profile from the rerun (and the match is surprisingly good!). It’s the noise in the profile from Gromacs that is throwing me.
The trajectory I’m currently working with is simply rotating about a bond in 1 degree steps so I would expect the changes in the interaction functions to be pretty well behaved over these small changes. (I’ve only ever used rerun before with discrete sampled points, rather than a smooth trajectory like these ones.)
I’m starting to think that I might be losing precision when I convert from a series of xyz files to a gro file for input to mdrun (Angstrom -> nm and 3 decimal places). I might have a go at hacking something together to convert it to something like a trr trajectory so I keep the precision (I don’t think this is currently doable with the usual tools.)
Sorted: converting my high-precision xyz coordinates to trr format gives me nice smooth potential curves, as I’d hoped for. (Initially, I forgot to convert from Angstrom to nm so I got HUGE potentials!)