Viewing AMBER trajectories with dino
This tutorial describes how to view AMBER trajectories with dino.
The files used in this tutorial can be found at:
/sb/apps/dino/examples/binpos
water16.pdb is an AMBER pdb file of this system
water16.trj is a formatted AMBER trajectory
water16.binpos is the binpos version of the trajectory
water16.scr are a script of the dino commands listed above.
- First, you need an AMBER trajectory. Let's say we have one called
water16.trj
- The next thing you have to do is convert the formatted (ASCII) AMBER
trajectory into a binary format called "binpos". There are a few tools
that let you do this. The best tool is ptraj. Ptraj documentation can be
found in the AMBER manual, or at:
http://www.chpc.utah.edu/~cheatham/ptraj.html
- I wrote another crude but simple to use tool called mkbinpos which can
do this job. I will describe how to use mkbinpos here.
mkbinpos reads one or more trajectory files that you specify on the command
line and writes them to stdout. Here is mkbinpos usage:
% mkbinpos
usage: mkbinpos -n n_atoms [-box] trajectory_files
-
As you can see, in order to use mkbinpos, you need to know the number of atoms
in your system and pass it along with the -n option. Also, if your trajectory
is of a system in a periodic water box (e.g. a PME calculation), you need to
pass the -box option to mkbinpos so that it knows to skip over the box
dimension entries found at the end of each frame of the input trajectory files.
This example system has 6980 atoms. If you don't already know how
many atoms your system has, you can get it from several places. I usually get
this info from a PDB file that was created from the prmtop file with ambpdb:
% tail -1 water16.pdb
ATOM 6980 H2 WAT 491 38.844 25.358 34.021
From the above we see that the last atom is #6980.
-
This example is a periodic system, so we also have to remember to pass the
-box option. Here is the full command to convert water16.trj to water16.binpos:
% mkbinpos -n 6980 -box water16.trj > water16.binpos
water16.trj : Using 20940 coordinates (3*6980 atoms) as trajectory frame size
559 trajectory frames converted to binpos format.
- If you have several "pieces" of trajectory that you want to stitch
together into one binpos file, you can do that easily. Just specify them all
in the correct simulation-time order:
% mkbinpos -n 6980 -box 1.trj 2.trj 3.trj > all.binpos
-
Now you have the binpos format trajectory file and are ready to start dino...
% dino
Welcome to dino v0.8.5-1 (http://www.dino3d.org)
Graphics Subsystem ID: NVIDIA Corporation Quadro2 MXR/AGP/3DNOW!
OpenGL Version 1.3
dino> load water16.pdb // load a pdb file corresponding to this trajectory
dino> .water16 load water16.binpos // load the trajectory
dino> .water16 new -name all // create object
dino> scene center [.water16] // center object
dino> scene autoslab // set slab
dino> .water16 play // start playback. Other commands are 'step' and 'stop'
- That's it! You should have the trajectory playing in the dino window,
rendered as lines. You can do some more fancy rendering, too, but it may
require a script to update the display of the solid objects. For example if
you had the CA trace rendered as hsc and wanted to view the trajectory of that:
.water16.ca render
.water16 step
.water16.ca render
.water16 step
.water16.ca render
.water16 step
...
...
...
Put many such commands in a script and that would emulate playing back the
solid rendered objects, too. My understanding is that this behavior may be
fixed in future versions of dino so that this workaround for solid rendered
objects wouldn't be necessary.
|