Friday, December 18, 2009

getting atom trajectory files from GROMACS

What I mean by atom trajectories is the xyz coordinates of each atom at each time step. I could not find any program in the gmx package that did this, so I wrote my own. You can get it here.

From gromacs, use the trjconv program to create a series of pdb files for each time step of the simulation.

trjconv -s swnt -f traj.trr -o last.pdb -sep

swnt is the structure, traj is the trajectory file created from running a dynamics simulation and last.pdb is the name you give to the pdb series.

After running the script you get a text file for each atom the has the time and xyz coordinates:

Here is a sample output for atom 1

No comments: