[gmx-users] pca on amber MD output

Florian Haberl Florian.Haberl at chemie.uni-erlangen.de
Thu Oct 5 17:19:19 CEST 2006

On Thursday 05 October 2006 16:56, nadiav at soton.ac.uk wrote:
> Hi gromacs users,
> I am a new user to gromacs and realise that there are lots of comments on
> the archive already about using gromacs with amber outputs but I am getting
> rather mixed messages.
> I would like to clarify a few things.  I have an Amber trjectory file saved
> through VMD in a .pdb format and a pdb file for the topology.
> I see that some say that one should convert the trajectory file, some say
> that gromacs reads .pdb and others mention changing the extension to .g87
> and so on.  My main question is about the fact that amber works in
> Angstroms and gromacs in nm.  Should I convert my trajectory.pdb and
> topology.pdb to nm before carrying out principal component analysis?
> I would be grateful for any comments.

take a look at 


Notes for using GROMACS to analyze AMBER trajectories

These notes are of mostly historical interest, now that IED is able to read 
output from Ptraj. In general it will be easier to analyze AMBER trajectories 
with Ptraj than with GROMACS.

GROMACS can be used to analyze trajectories produced by the SANDER module of 
AMBER. GROMACS will read the AMBER trajectory if it is renamed to have an 
extension of .g87 . GROMACS will not read the AMBER prmtop topology file, but 
you can produce a pdb file to use as the topology file like this

ambpdb -p prmtop <prmcrd >topol.pdb

There is one problem with using GROMACS to analyze AMBER data: GROMACS assumes 
coordinates are in nanometers, while AMBER writes them in Angstroms.You can 
ignore this problem, in which case all your atoms will be ten times further 
apart than they should be in IED. Since VMD uses distances to determine 
bonding for PDB files, this means that if you use a PDB topology file, you 
won't see any bonds. If you use the van der Waals representation (with an 
increased radius) and remember to divide any distances you measure by 10, 
this may be acceptable.

If you are comfortable with recompiling GROMACS, you can use the following 
patch so that your distances will be correct and bonds will appear. Note that 
with this patch, all .g87 files are assumed to be in units of Angstroms, so 
if you think you may actually need to read a .g87 file in units of 
nanometers, this may not be a good idea.

The following patch should be applied to src/gmxlib/trxio.c

--- trxio.c     2002-02-28 02:49:31.000000000 -0800
+++ trxio.c     2003-12-12 17:11:34.000000000 -0800
@@ -453,14 +453,14 @@
        /* else eof! */
        return FALSE;
-      x[i][m]=x0;
+      x[i][m]=x0 * 0.1;
   if (bReadBox) {
     for(m=0; (m<DIM); m++) {
       if (fscanf(status,"%lf",&x0) != 1)
        return FALSE;
-      box[m][m]=x0;
+      box[m][m]=x0 * 0.1;
   return TRUE;

It should be also possible to save a multiple pdb file and than read it with 
gromacs and convert it to gromacs style trajectory.

> Thank you in advance,
> Nadia Vahdati
> J.W.Essex group
> University of Southampton
> UK.
> _______________________________________________
> gmx-users mailing list    gmx-users at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-users
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at gromacs.org.
> Can't post? Read http://www.gromacs.org/mailing_lists/users.php



 Florian Haberl                        
 Universitaet Erlangen/ Nuernberg
 Naegelsbachstr 25
 D-91052 Erlangen
 Telephone:  	+49(0) − 9131 − 85 26581
 Mailto: florian.haberl AT chemie.uni-erlangen.de

More information about the gromacs.org_gmx-users mailing list